@measured/puck-plugin-heading-analyzer 0.14.2-canary.dc93789 → 0.14.2-canary.e038522

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 (2) hide show
  1. package/dist/index.js +3117 -209
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -62,6 +62,60 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
62
62
  mod
63
63
  ));
64
64
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
65
+ var __publicField = (obj, key, value) => {
66
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
67
+ return value;
68
+ };
69
+ var __accessCheck = (obj, member, msg) => {
70
+ if (!member.has(obj))
71
+ throw TypeError("Cannot " + msg);
72
+ };
73
+ var __privateGet = (obj, member, getter) => {
74
+ __accessCheck(obj, member, "read from private field");
75
+ return getter ? getter.call(obj) : member.get(obj);
76
+ };
77
+ var __privateAdd = (obj, member, value) => {
78
+ if (member.has(obj))
79
+ throw TypeError("Cannot add the same private member more than once");
80
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
81
+ };
82
+ var __privateSet = (obj, member, value, setter) => {
83
+ __accessCheck(obj, member, "write to private field");
84
+ setter ? setter.call(obj, value) : member.set(obj, value);
85
+ return value;
86
+ };
87
+ var __privateWrapper = (obj, member, setter, getter) => ({
88
+ set _(value) {
89
+ __privateSet(obj, member, value, setter);
90
+ },
91
+ get _() {
92
+ return __privateGet(obj, member, getter);
93
+ }
94
+ });
95
+ var __privateMethod = (obj, member, method) => {
96
+ __accessCheck(obj, member, "access private method");
97
+ return method;
98
+ };
99
+ var __async = (__this, __arguments, generator) => {
100
+ return new Promise((resolve, reject) => {
101
+ var fulfilled = (value) => {
102
+ try {
103
+ step(generator.next(value));
104
+ } catch (e2) {
105
+ reject(e2);
106
+ }
107
+ };
108
+ var rejected = (value) => {
109
+ try {
110
+ step(generator.throw(value));
111
+ } catch (e2) {
112
+ reject(e2);
113
+ }
114
+ };
115
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
116
+ step((generator = generator.apply(__this, __arguments)).next());
117
+ });
118
+ };
65
119
 
66
120
  // ../tsup-config/react-import.js
67
121
  var import_react;
@@ -198,8 +252,8 @@ var init_colors = __esm({
198
252
  });
199
253
 
200
254
  // ../../node_modules/react-spinners/esm/BarLoader.js
201
- function BarLoader(_a) {
202
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]);
255
+ function BarLoader(_a3) {
256
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 4 : _f, _g = _a3.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]);
203
257
  var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(width), height: cssValue(height), overflow: "hidden", backgroundColor: calculateRgba(color, 0.2), backgroundClip: "padding-box" }, cssOverride);
204
258
  var style2 = function(i2) {
205
259
  return {
@@ -264,8 +318,8 @@ var init_BarLoader = __esm({
264
318
  });
265
319
 
266
320
  // ../../node_modules/react-spinners/esm/BeatLoader.js
267
- function BeatLoader(_a) {
268
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest2(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
321
+ function BeatLoader(_a3) {
322
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest2(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
269
323
  var wrapper = __assign2({ display: "inherit" }, cssOverride);
270
324
  var style2 = function(i2) {
271
325
  return {
@@ -327,8 +381,8 @@ var init_BeatLoader = __esm({
327
381
  });
328
382
 
329
383
  // ../../node_modules/react-spinners/esm/BounceLoader.js
330
- function BounceLoader(_a) {
331
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest3(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
384
+ function BounceLoader(_a3) {
385
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest3(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
332
386
  var style2 = function(i2) {
333
387
  var animationTiming = i2 === 1 ? "".concat(1 / speedMultiplier, "s") : "0s";
334
388
  return {
@@ -392,11 +446,11 @@ var init_BounceLoader = __esm({
392
446
  });
393
447
 
394
448
  // ../../node_modules/react-spinners/esm/CircleLoader.js
395
- function CircleLoader(_a) {
396
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest4(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
449
+ function CircleLoader(_a3) {
450
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest4(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
397
451
  var wrapper = __assign4({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride);
398
452
  var style2 = function(i2) {
399
- var _a2 = parseLengthAndUnit(size), value = _a2.value, unit = _a2.unit;
453
+ var _a4 = parseLengthAndUnit(size), value = _a4.value, unit = _a4.unit;
400
454
  return {
401
455
  position: "absolute",
402
456
  height: "".concat(value * (1 - i2 / 10)).concat(unit),
@@ -462,8 +516,8 @@ var init_CircleLoader = __esm({
462
516
  });
463
517
 
464
518
  // ../../node_modules/react-spinners/esm/ClimbingBoxLoader.js
465
- function ClimbingBoxLoader(_a) {
466
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest5(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
519
+ function ClimbingBoxLoader(_a3) {
520
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest5(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
467
521
  var container = __assign5({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride);
468
522
  var wrapper = {
469
523
  position: "absolute",
@@ -548,8 +602,8 @@ var init_ClimbingBoxLoader = __esm({
548
602
  });
549
603
 
550
604
  // ../../node_modules/react-spinners/esm/ClipLoader.js
551
- function ClipLoader(_a) {
552
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest6(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
605
+ function ClipLoader(_a3) {
606
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest6(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
553
607
  var style2 = __assign6({ background: "transparent !important", width: cssValue(size), height: cssValue(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride);
554
608
  if (!loading) {
555
609
  return null;
@@ -593,8 +647,8 @@ var init_ClipLoader = __esm({
593
647
  });
594
648
 
595
649
  // ../../node_modules/react-spinners/esm/ClockLoader.js
596
- function ClockLoader(_a) {
597
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest7(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
650
+ function ClockLoader(_a3) {
651
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest7(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
598
652
  var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
599
653
  var wrapper = __assign7({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride);
600
654
  var minute = {
@@ -664,11 +718,11 @@ var init_ClockLoader = __esm({
664
718
  });
665
719
 
666
720
  // ../../node_modules/react-spinners/esm/DotLoader.js
667
- function DotLoader(_a) {
668
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest8(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
721
+ function DotLoader(_a3) {
722
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest8(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
669
723
  var wrapper = __assign8({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), animationFillMode: "forwards", animation: "".concat(rotate2, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride);
670
724
  var style2 = function(i2) {
671
- var _a2 = parseLengthAndUnit(size), value = _a2.value, unit = _a2.unit;
725
+ var _a4 = parseLengthAndUnit(size), value = _a4.value, unit = _a4.unit;
672
726
  return {
673
727
  position: "absolute",
674
728
  top: i2 % 2 ? "0" : "auto",
@@ -729,8 +783,8 @@ var init_DotLoader = __esm({
729
783
  });
730
784
 
731
785
  // ../../node_modules/react-spinners/esm/FadeLoader.js
732
- function FadeLoader(_a) {
733
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 15 : _f, _g = _a.width, width = _g === void 0 ? 5 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest9(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
786
+ function FadeLoader(_a3) {
787
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 15 : _f, _g = _a3.width, width = _g === void 0 ? 5 : _g, _h = _a3.radius, radius = _h === void 0 ? 2 : _h, _j = _a3.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest9(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
734
788
  var value = parseLengthAndUnit(margin).value;
735
789
  var radiusValue = value + 18;
736
790
  var quarter = radiusValue / 2 + radiusValue / 5.5;
@@ -809,8 +863,8 @@ var init_FadeLoader = __esm({
809
863
  });
810
864
 
811
865
  // ../../node_modules/react-spinners/esm/GridLoader.js
812
- function GridLoader(_a) {
813
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest10(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
866
+ function GridLoader(_a3) {
867
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest10(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
814
868
  var sizeWithUnit = parseLengthAndUnit(size);
815
869
  var marginWithUnit = parseLengthAndUnit(margin);
816
870
  var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6;
@@ -888,8 +942,8 @@ var init_GridLoader = __esm({
888
942
  });
889
943
 
890
944
  // ../../node_modules/react-spinners/esm/HashLoader.js
891
- function HashLoader(_a) {
892
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest11(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
945
+ function HashLoader(_a3) {
946
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest11(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
893
947
  var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
894
948
  var wrapper = __assign11({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), transform: "rotate(165deg)" }, cssOverride);
895
949
  var thickness = value / 5;
@@ -959,8 +1013,8 @@ var init_HashLoader = __esm({
959
1013
  });
960
1014
 
961
1015
  // ../../node_modules/react-spinners/esm/MoonLoader.js
962
- function MoonLoader(_a) {
963
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest12(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1016
+ function MoonLoader(_a3) {
1017
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest12(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
964
1018
  var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
965
1019
  var moonSize = value / 7;
966
1020
  var wrapper = __assign12({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride);
@@ -1020,8 +1074,8 @@ var init_MoonLoader = __esm({
1020
1074
  });
1021
1075
 
1022
1076
  // ../../node_modules/react-spinners/esm/PacmanLoader.js
1023
- function PacmanLoader(_a) {
1024
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 25 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest13(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1077
+ function PacmanLoader(_a3) {
1078
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 25 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest13(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1025
1079
  var _h = parseLengthAndUnit(size), value = _h.value, unit = _h.unit;
1026
1080
  var wrapper = __assign13({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride);
1027
1081
  var ball = createAnimation("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball");
@@ -1112,8 +1166,8 @@ var init_PacmanLoader = __esm({
1112
1166
  });
1113
1167
 
1114
1168
  // ../../node_modules/react-spinners/esm/PropagateLoader.js
1115
- function PropagateLoader(_a) {
1116
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest14(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1169
+ function PropagateLoader(_a3) {
1170
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest14(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1117
1171
  var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
1118
1172
  var wrapper = __assign14({ display: "inherit", position: "relative" }, cssOverride);
1119
1173
  var style2 = function(i2) {
@@ -1187,8 +1241,8 @@ var init_PropagateLoader = __esm({
1187
1241
  });
1188
1242
 
1189
1243
  // ../../node_modules/react-spinners/esm/PulseLoader.js
1190
- function PulseLoader(_a) {
1191
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest15(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1244
+ function PulseLoader(_a3) {
1245
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest15(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1192
1246
  var wrapper = __assign15({ display: "inherit" }, cssOverride);
1193
1247
  var style2 = function(i2) {
1194
1248
  return {
@@ -1250,8 +1304,8 @@ var init_PulseLoader = __esm({
1250
1304
  });
1251
1305
 
1252
1306
  // ../../node_modules/react-spinners/esm/PuffLoader.js
1253
- function PuffLoader(_a) {
1254
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest16(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1307
+ function PuffLoader(_a3) {
1308
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest16(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1255
1309
  var wrapper = __assign16({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride);
1256
1310
  var style2 = function(i2) {
1257
1311
  return {
@@ -1321,8 +1375,8 @@ var init_PuffLoader = __esm({
1321
1375
  });
1322
1376
 
1323
1377
  // ../../node_modules/react-spinners/esm/RingLoader.js
1324
- function RingLoader(_a) {
1325
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest17(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1378
+ function RingLoader(_a3) {
1379
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest17(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1326
1380
  var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit;
1327
1381
  var wrapper = __assign17({ display: "inherit", width: cssValue(size), height: cssValue(size), position: "relative" }, cssOverride);
1328
1382
  var style2 = function(i2) {
@@ -1388,8 +1442,8 @@ var init_RingLoader = __esm({
1388
1442
  });
1389
1443
 
1390
1444
  // ../../node_modules/react-spinners/esm/RiseLoader.js
1391
- function RiseLoader(_a) {
1392
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest18(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1445
+ function RiseLoader(_a3) {
1446
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest18(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1393
1447
  var wrapper = __assign18({ display: "inherit" }, cssOverride);
1394
1448
  var even = createAnimation("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even");
1395
1449
  var odd = createAnimation("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd");
@@ -1454,8 +1508,8 @@ var init_RiseLoader = __esm({
1454
1508
  });
1455
1509
 
1456
1510
  // ../../node_modules/react-spinners/esm/RotateLoader.js
1457
- function RotateLoader(_a) {
1458
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest19(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1511
+ function RotateLoader(_a3) {
1512
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest19(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1459
1513
  var _h = parseLengthAndUnit(margin), value = _h.value, unit = _h.unit;
1460
1514
  var ball = {
1461
1515
  backgroundColor: color,
@@ -1520,8 +1574,8 @@ var init_RotateLoader = __esm({
1520
1574
  });
1521
1575
 
1522
1576
  // ../../node_modules/react-spinners/esm/ScaleLoader.js
1523
- function ScaleLoader(_a) {
1524
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 35 : _f, _g = _a.width, width = _g === void 0 ? 4 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest20(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
1577
+ function ScaleLoader(_a3) {
1578
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.height, height = _f === void 0 ? 35 : _f, _g = _a3.width, width = _g === void 0 ? 4 : _g, _h = _a3.radius, radius = _h === void 0 ? 2 : _h, _j = _a3.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest20(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]);
1525
1579
  var wrapper = __assign20({ display: "inherit" }, cssOverride);
1526
1580
  var style2 = function(i2) {
1527
1581
  return {
@@ -1585,8 +1639,8 @@ var init_ScaleLoader = __esm({
1585
1639
  });
1586
1640
 
1587
1641
  // ../../node_modules/react-spinners/esm/SkewLoader.js
1588
- function SkewLoader(_a) {
1589
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest21(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1642
+ function SkewLoader(_a3) {
1643
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest21(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1590
1644
  var style2 = __assign21({ width: "0", height: "0", borderLeft: "".concat(cssValue(size), " solid transparent"), borderRight: "".concat(cssValue(size), " solid transparent"), borderBottom: "".concat(cssValue(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride);
1591
1645
  if (!loading) {
1592
1646
  return null;
@@ -1630,8 +1684,8 @@ var init_SkewLoader = __esm({
1630
1684
  });
1631
1685
 
1632
1686
  // ../../node_modules/react-spinners/esm/SquareLoader.js
1633
- function SquareLoader(_a) {
1634
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest22(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1687
+ function SquareLoader(_a3) {
1688
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest22(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
1635
1689
  var style2 = __assign22({ backgroundColor: color, width: cssValue(size), height: cssValue(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride);
1636
1690
  if (!loading) {
1637
1691
  return null;
@@ -1675,8 +1729,8 @@ var init_SquareLoader = __esm({
1675
1729
  });
1676
1730
 
1677
1731
  // ../../node_modules/react-spinners/esm/SyncLoader.js
1678
- function SyncLoader(_a) {
1679
- var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest23(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1732
+ function SyncLoader(_a3) {
1733
+ var _b = _a3.loading, loading = _b === void 0 ? true : _b, _c = _a3.color, color = _c === void 0 ? "#000000" : _c, _d = _a3.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a3.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a3.size, size = _f === void 0 ? 15 : _f, _g = _a3.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest23(_a3, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]);
1680
1734
  var wrapper = __assign23({ display: "inherit" }, cssOverride);
1681
1735
  var style2 = function(i2) {
1682
1736
  return {
@@ -24768,7 +24822,7 @@ var require_react_dom_development = __commonJS({
24768
24822
  break;
24769
24823
  }
24770
24824
  case "backwards": {
24771
- var _tail = null;
24825
+ var _tail2 = null;
24772
24826
  var row = workInProgress2.child;
24773
24827
  workInProgress2.child = null;
24774
24828
  while (row !== null) {
@@ -24778,15 +24832,15 @@ var require_react_dom_development = __commonJS({
24778
24832
  break;
24779
24833
  }
24780
24834
  var nextRow = row.sibling;
24781
- row.sibling = _tail;
24782
- _tail = row;
24835
+ row.sibling = _tail2;
24836
+ _tail2 = row;
24783
24837
  row = nextRow;
24784
24838
  }
24785
24839
  initSuspenseListRenderState(
24786
24840
  workInProgress2,
24787
24841
  true,
24788
24842
  // isBackwards
24789
- _tail,
24843
+ _tail2,
24790
24844
  null,
24791
24845
  // last
24792
24846
  tailMode
@@ -28432,10 +28486,10 @@ var require_react_dom_development = __commonJS({
28432
28486
  return;
28433
28487
  }
28434
28488
  } else {
28435
- var _next = unwindWork(current2, completedWork);
28436
- if (_next !== null) {
28437
- _next.flags &= HostEffectMask;
28438
- workInProgress = _next;
28489
+ var _next2 = unwindWork(current2, completedWork);
28490
+ if (_next2 !== null) {
28491
+ _next2.flags &= HostEffectMask;
28492
+ workInProgress = _next2;
28439
28493
  return;
28440
28494
  }
28441
28495
  if ((completedWork.mode & ProfileMode) !== NoMode) {
@@ -33511,6 +33565,1370 @@ var init_raf_schd_esm = __esm({
33511
33565
  }
33512
33566
  });
33513
33567
 
33568
+ // ../../node_modules/@measured/dnd/node_modules/lru-cache/dist/esm/index.js
33569
+ var perf, warned, PROCESS, emitWarning, AC, AS, _a, shouldWarn, TYPE, isPosInt, getUintArray, ZeroArray, _constructing, _Stack, Stack, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _initializeTTLTracking, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, _initializeSizeTracking, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, _indexes, indexes_fn, _rindexes, rindexes_fn, _isValidIndex, isValidIndex_fn, _a2, _evict, evict_fn, _backgroundFetch, backgroundFetch_fn, _isBackgroundFetch, isBackgroundFetch_fn, _connect, connect_fn, _moveToTail, moveToTail_fn, _LRUCache, LRUCache;
33570
+ var init_esm2 = __esm({
33571
+ "../../node_modules/@measured/dnd/node_modules/lru-cache/dist/esm/index.js"() {
33572
+ init_react_import();
33573
+ perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
33574
+ warned = /* @__PURE__ */ new Set();
33575
+ PROCESS = typeof process === "object" && !!process ? process : {};
33576
+ emitWarning = (msg, type, code, fn) => {
33577
+ typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
33578
+ };
33579
+ AC = globalThis.AbortController;
33580
+ AS = globalThis.AbortSignal;
33581
+ if (typeof AC === "undefined") {
33582
+ AS = class AbortSignal {
33583
+ constructor() {
33584
+ __publicField(this, "onabort");
33585
+ __publicField(this, "_onabort", []);
33586
+ __publicField(this, "reason");
33587
+ __publicField(this, "aborted", false);
33588
+ }
33589
+ addEventListener(_, fn) {
33590
+ this._onabort.push(fn);
33591
+ }
33592
+ };
33593
+ AC = class AbortController {
33594
+ constructor() {
33595
+ __publicField(this, "signal", new AS());
33596
+ warnACPolyfill();
33597
+ }
33598
+ abort(reason) {
33599
+ var _a3, _b;
33600
+ if (this.signal.aborted)
33601
+ return;
33602
+ this.signal.reason = reason;
33603
+ this.signal.aborted = true;
33604
+ for (const fn of this.signal._onabort) {
33605
+ fn(reason);
33606
+ }
33607
+ (_b = (_a3 = this.signal).onabort) == null ? void 0 : _b.call(_a3, reason);
33608
+ }
33609
+ };
33610
+ let printACPolyfillWarning = ((_a = PROCESS.env) == null ? void 0 : _a.LRU_CACHE_IGNORE_AC_WARNING) !== "1";
33611
+ const warnACPolyfill = () => {
33612
+ if (!printACPolyfillWarning)
33613
+ return;
33614
+ printACPolyfillWarning = false;
33615
+ emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
33616
+ };
33617
+ }
33618
+ shouldWarn = (code) => !warned.has(code);
33619
+ TYPE = Symbol("type");
33620
+ isPosInt = (n2) => n2 && n2 === Math.floor(n2) && n2 > 0 && isFinite(n2);
33621
+ getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
33622
+ ZeroArray = class extends Array {
33623
+ constructor(size) {
33624
+ super(size);
33625
+ this.fill(0);
33626
+ }
33627
+ };
33628
+ _Stack = class {
33629
+ constructor(max, HeapCls) {
33630
+ __publicField(this, "heap");
33631
+ __publicField(this, "length");
33632
+ if (!__privateGet(_Stack, _constructing)) {
33633
+ throw new TypeError("instantiate Stack using Stack.create(n)");
33634
+ }
33635
+ this.heap = new HeapCls(max);
33636
+ this.length = 0;
33637
+ }
33638
+ static create(max) {
33639
+ const HeapCls = getUintArray(max);
33640
+ if (!HeapCls)
33641
+ return [];
33642
+ __privateSet(_Stack, _constructing, true);
33643
+ const s = new _Stack(max, HeapCls);
33644
+ __privateSet(_Stack, _constructing, false);
33645
+ return s;
33646
+ }
33647
+ push(n2) {
33648
+ this.heap[this.length++] = n2;
33649
+ }
33650
+ pop() {
33651
+ return this.heap[--this.length];
33652
+ }
33653
+ };
33654
+ Stack = _Stack;
33655
+ _constructing = new WeakMap();
33656
+ // private constructor
33657
+ __privateAdd(Stack, _constructing, false);
33658
+ _LRUCache = class {
33659
+ constructor(options) {
33660
+ __privateAdd(this, _initializeTTLTracking);
33661
+ __privateAdd(this, _initializeSizeTracking);
33662
+ __privateAdd(this, _indexes);
33663
+ __privateAdd(this, _rindexes);
33664
+ __privateAdd(this, _isValidIndex);
33665
+ __privateAdd(this, _evict);
33666
+ __privateAdd(this, _backgroundFetch);
33667
+ __privateAdd(this, _isBackgroundFetch);
33668
+ __privateAdd(this, _connect);
33669
+ __privateAdd(this, _moveToTail);
33670
+ // properties coming in from the options of these, only max and maxSize
33671
+ // really *need* to be protected. The rest can be modified, as they just
33672
+ // set defaults for various methods.
33673
+ __privateAdd(this, _max, void 0);
33674
+ __privateAdd(this, _maxSize, void 0);
33675
+ __privateAdd(this, _dispose, void 0);
33676
+ __privateAdd(this, _disposeAfter, void 0);
33677
+ __privateAdd(this, _fetchMethod, void 0);
33678
+ /**
33679
+ * {@link LRUCache.OptionsBase.ttl}
33680
+ */
33681
+ __publicField(this, "ttl");
33682
+ /**
33683
+ * {@link LRUCache.OptionsBase.ttlResolution}
33684
+ */
33685
+ __publicField(this, "ttlResolution");
33686
+ /**
33687
+ * {@link LRUCache.OptionsBase.ttlAutopurge}
33688
+ */
33689
+ __publicField(this, "ttlAutopurge");
33690
+ /**
33691
+ * {@link LRUCache.OptionsBase.updateAgeOnGet}
33692
+ */
33693
+ __publicField(this, "updateAgeOnGet");
33694
+ /**
33695
+ * {@link LRUCache.OptionsBase.updateAgeOnHas}
33696
+ */
33697
+ __publicField(this, "updateAgeOnHas");
33698
+ /**
33699
+ * {@link LRUCache.OptionsBase.allowStale}
33700
+ */
33701
+ __publicField(this, "allowStale");
33702
+ /**
33703
+ * {@link LRUCache.OptionsBase.noDisposeOnSet}
33704
+ */
33705
+ __publicField(this, "noDisposeOnSet");
33706
+ /**
33707
+ * {@link LRUCache.OptionsBase.noUpdateTTL}
33708
+ */
33709
+ __publicField(this, "noUpdateTTL");
33710
+ /**
33711
+ * {@link LRUCache.OptionsBase.maxEntrySize}
33712
+ */
33713
+ __publicField(this, "maxEntrySize");
33714
+ /**
33715
+ * {@link LRUCache.OptionsBase.sizeCalculation}
33716
+ */
33717
+ __publicField(this, "sizeCalculation");
33718
+ /**
33719
+ * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
33720
+ */
33721
+ __publicField(this, "noDeleteOnFetchRejection");
33722
+ /**
33723
+ * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
33724
+ */
33725
+ __publicField(this, "noDeleteOnStaleGet");
33726
+ /**
33727
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
33728
+ */
33729
+ __publicField(this, "allowStaleOnFetchAbort");
33730
+ /**
33731
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
33732
+ */
33733
+ __publicField(this, "allowStaleOnFetchRejection");
33734
+ /**
33735
+ * {@link LRUCache.OptionsBase.ignoreFetchAbort}
33736
+ */
33737
+ __publicField(this, "ignoreFetchAbort");
33738
+ // computed properties
33739
+ __privateAdd(this, _size, void 0);
33740
+ __privateAdd(this, _calculatedSize, void 0);
33741
+ __privateAdd(this, _keyMap, void 0);
33742
+ __privateAdd(this, _keyList, void 0);
33743
+ __privateAdd(this, _valList, void 0);
33744
+ __privateAdd(this, _next, void 0);
33745
+ __privateAdd(this, _prev, void 0);
33746
+ __privateAdd(this, _head, void 0);
33747
+ __privateAdd(this, _tail, void 0);
33748
+ __privateAdd(this, _free, void 0);
33749
+ __privateAdd(this, _disposed, void 0);
33750
+ __privateAdd(this, _sizes, void 0);
33751
+ __privateAdd(this, _starts, void 0);
33752
+ __privateAdd(this, _ttls, void 0);
33753
+ __privateAdd(this, _hasDispose, void 0);
33754
+ __privateAdd(this, _hasFetchMethod, void 0);
33755
+ __privateAdd(this, _hasDisposeAfter, void 0);
33756
+ // conditionally set private methods related to TTL
33757
+ __privateAdd(this, _updateItemAge, () => {
33758
+ });
33759
+ __privateAdd(this, _statusTTL, () => {
33760
+ });
33761
+ __privateAdd(this, _setItemTTL, () => {
33762
+ });
33763
+ /* c8 ignore stop */
33764
+ __privateAdd(this, _isStale, () => false);
33765
+ __privateAdd(this, _removeItemSize, (_i) => {
33766
+ });
33767
+ __privateAdd(this, _addItemSize, (_i, _s, _st) => {
33768
+ });
33769
+ __privateAdd(this, _requireSize, (_k, _v, size, sizeCalculation) => {
33770
+ if (size || sizeCalculation) {
33771
+ throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
33772
+ }
33773
+ return 0;
33774
+ });
33775
+ /**
33776
+ * A String value that is used in the creation of the default string description of an object.
33777
+ * Called by the built-in method Object.prototype.toString.
33778
+ */
33779
+ __publicField(this, _a2, "LRUCache");
33780
+ const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
33781
+ if (max !== 0 && !isPosInt(max)) {
33782
+ throw new TypeError("max option must be a nonnegative integer");
33783
+ }
33784
+ const UintArray = max ? getUintArray(max) : Array;
33785
+ if (!UintArray) {
33786
+ throw new Error("invalid max value: " + max);
33787
+ }
33788
+ __privateSet(this, _max, max);
33789
+ __privateSet(this, _maxSize, maxSize);
33790
+ this.maxEntrySize = maxEntrySize || __privateGet(this, _maxSize);
33791
+ this.sizeCalculation = sizeCalculation;
33792
+ if (this.sizeCalculation) {
33793
+ if (!__privateGet(this, _maxSize) && !this.maxEntrySize) {
33794
+ throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
33795
+ }
33796
+ if (typeof this.sizeCalculation !== "function") {
33797
+ throw new TypeError("sizeCalculation set to non-function");
33798
+ }
33799
+ }
33800
+ if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
33801
+ throw new TypeError("fetchMethod must be a function if specified");
33802
+ }
33803
+ __privateSet(this, _fetchMethod, fetchMethod);
33804
+ __privateSet(this, _hasFetchMethod, !!fetchMethod);
33805
+ __privateSet(this, _keyMap, /* @__PURE__ */ new Map());
33806
+ __privateSet(this, _keyList, new Array(max).fill(void 0));
33807
+ __privateSet(this, _valList, new Array(max).fill(void 0));
33808
+ __privateSet(this, _next, new UintArray(max));
33809
+ __privateSet(this, _prev, new UintArray(max));
33810
+ __privateSet(this, _head, 0);
33811
+ __privateSet(this, _tail, 0);
33812
+ __privateSet(this, _free, Stack.create(max));
33813
+ __privateSet(this, _size, 0);
33814
+ __privateSet(this, _calculatedSize, 0);
33815
+ if (typeof dispose === "function") {
33816
+ __privateSet(this, _dispose, dispose);
33817
+ }
33818
+ if (typeof disposeAfter === "function") {
33819
+ __privateSet(this, _disposeAfter, disposeAfter);
33820
+ __privateSet(this, _disposed, []);
33821
+ } else {
33822
+ __privateSet(this, _disposeAfter, void 0);
33823
+ __privateSet(this, _disposed, void 0);
33824
+ }
33825
+ __privateSet(this, _hasDispose, !!__privateGet(this, _dispose));
33826
+ __privateSet(this, _hasDisposeAfter, !!__privateGet(this, _disposeAfter));
33827
+ this.noDisposeOnSet = !!noDisposeOnSet;
33828
+ this.noUpdateTTL = !!noUpdateTTL;
33829
+ this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
33830
+ this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
33831
+ this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
33832
+ this.ignoreFetchAbort = !!ignoreFetchAbort;
33833
+ if (this.maxEntrySize !== 0) {
33834
+ if (__privateGet(this, _maxSize) !== 0) {
33835
+ if (!isPosInt(__privateGet(this, _maxSize))) {
33836
+ throw new TypeError("maxSize must be a positive integer if specified");
33837
+ }
33838
+ }
33839
+ if (!isPosInt(this.maxEntrySize)) {
33840
+ throw new TypeError("maxEntrySize must be a positive integer if specified");
33841
+ }
33842
+ __privateMethod(this, _initializeSizeTracking, initializeSizeTracking_fn).call(this);
33843
+ }
33844
+ this.allowStale = !!allowStale;
33845
+ this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
33846
+ this.updateAgeOnGet = !!updateAgeOnGet;
33847
+ this.updateAgeOnHas = !!updateAgeOnHas;
33848
+ this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
33849
+ this.ttlAutopurge = !!ttlAutopurge;
33850
+ this.ttl = ttl || 0;
33851
+ if (this.ttl) {
33852
+ if (!isPosInt(this.ttl)) {
33853
+ throw new TypeError("ttl must be a positive integer if specified");
33854
+ }
33855
+ __privateMethod(this, _initializeTTLTracking, initializeTTLTracking_fn).call(this);
33856
+ }
33857
+ if (__privateGet(this, _max) === 0 && this.ttl === 0 && __privateGet(this, _maxSize) === 0) {
33858
+ throw new TypeError("At least one of max, maxSize, or ttl is required");
33859
+ }
33860
+ if (!this.ttlAutopurge && !__privateGet(this, _max) && !__privateGet(this, _maxSize)) {
33861
+ const code = "LRU_CACHE_UNBOUNDED";
33862
+ if (shouldWarn(code)) {
33863
+ warned.add(code);
33864
+ const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
33865
+ emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
33866
+ }
33867
+ }
33868
+ }
33869
+ /**
33870
+ * Do not call this method unless you need to inspect the
33871
+ * inner workings of the cache. If anything returned by this
33872
+ * object is modified in any way, strange breakage may occur.
33873
+ *
33874
+ * These fields are private for a reason!
33875
+ *
33876
+ * @internal
33877
+ */
33878
+ static unsafeExposeInternals(c2) {
33879
+ return {
33880
+ // properties
33881
+ starts: __privateGet(c2, _starts),
33882
+ ttls: __privateGet(c2, _ttls),
33883
+ sizes: __privateGet(c2, _sizes),
33884
+ keyMap: __privateGet(c2, _keyMap),
33885
+ keyList: __privateGet(c2, _keyList),
33886
+ valList: __privateGet(c2, _valList),
33887
+ next: __privateGet(c2, _next),
33888
+ prev: __privateGet(c2, _prev),
33889
+ get head() {
33890
+ return __privateGet(c2, _head);
33891
+ },
33892
+ get tail() {
33893
+ return __privateGet(c2, _tail);
33894
+ },
33895
+ free: __privateGet(c2, _free),
33896
+ // methods
33897
+ isBackgroundFetch: (p) => {
33898
+ var _a3;
33899
+ return __privateMethod(_a3 = c2, _isBackgroundFetch, isBackgroundFetch_fn).call(_a3, p);
33900
+ },
33901
+ backgroundFetch: (k, index, options, context) => {
33902
+ var _a3;
33903
+ return __privateMethod(_a3 = c2, _backgroundFetch, backgroundFetch_fn).call(_a3, k, index, options, context);
33904
+ },
33905
+ moveToTail: (index) => {
33906
+ var _a3;
33907
+ return __privateMethod(_a3 = c2, _moveToTail, moveToTail_fn).call(_a3, index);
33908
+ },
33909
+ indexes: (options) => {
33910
+ var _a3;
33911
+ return __privateMethod(_a3 = c2, _indexes, indexes_fn).call(_a3, options);
33912
+ },
33913
+ rindexes: (options) => {
33914
+ var _a3;
33915
+ return __privateMethod(_a3 = c2, _rindexes, rindexes_fn).call(_a3, options);
33916
+ },
33917
+ isStale: (index) => {
33918
+ var _a3;
33919
+ return __privateGet(_a3 = c2, _isStale).call(_a3, index);
33920
+ }
33921
+ };
33922
+ }
33923
+ // Protected read-only members
33924
+ /**
33925
+ * {@link LRUCache.OptionsBase.max} (read-only)
33926
+ */
33927
+ get max() {
33928
+ return __privateGet(this, _max);
33929
+ }
33930
+ /**
33931
+ * {@link LRUCache.OptionsBase.maxSize} (read-only)
33932
+ */
33933
+ get maxSize() {
33934
+ return __privateGet(this, _maxSize);
33935
+ }
33936
+ /**
33937
+ * The total computed size of items in the cache (read-only)
33938
+ */
33939
+ get calculatedSize() {
33940
+ return __privateGet(this, _calculatedSize);
33941
+ }
33942
+ /**
33943
+ * The number of items stored in the cache (read-only)
33944
+ */
33945
+ get size() {
33946
+ return __privateGet(this, _size);
33947
+ }
33948
+ /**
33949
+ * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
33950
+ */
33951
+ get fetchMethod() {
33952
+ return __privateGet(this, _fetchMethod);
33953
+ }
33954
+ /**
33955
+ * {@link LRUCache.OptionsBase.dispose} (read-only)
33956
+ */
33957
+ get dispose() {
33958
+ return __privateGet(this, _dispose);
33959
+ }
33960
+ /**
33961
+ * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
33962
+ */
33963
+ get disposeAfter() {
33964
+ return __privateGet(this, _disposeAfter);
33965
+ }
33966
+ /**
33967
+ * Return the remaining TTL time for a given entry key
33968
+ */
33969
+ getRemainingTTL(key) {
33970
+ return __privateGet(this, _keyMap).has(key) ? Infinity : 0;
33971
+ }
33972
+ /**
33973
+ * Return a generator yielding `[key, value]` pairs,
33974
+ * in order from most recently used to least recently used.
33975
+ */
33976
+ *entries() {
33977
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
33978
+ if (__privateGet(this, _valList)[i2] !== void 0 && __privateGet(this, _keyList)[i2] !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
33979
+ yield [__privateGet(this, _keyList)[i2], __privateGet(this, _valList)[i2]];
33980
+ }
33981
+ }
33982
+ }
33983
+ /**
33984
+ * Inverse order version of {@link LRUCache.entries}
33985
+ *
33986
+ * Return a generator yielding `[key, value]` pairs,
33987
+ * in order from least recently used to most recently used.
33988
+ */
33989
+ *rentries() {
33990
+ for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
33991
+ if (__privateGet(this, _valList)[i2] !== void 0 && __privateGet(this, _keyList)[i2] !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
33992
+ yield [__privateGet(this, _keyList)[i2], __privateGet(this, _valList)[i2]];
33993
+ }
33994
+ }
33995
+ }
33996
+ /**
33997
+ * Return a generator yielding the keys in the cache,
33998
+ * in order from most recently used to least recently used.
33999
+ */
34000
+ *keys() {
34001
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
34002
+ const k = __privateGet(this, _keyList)[i2];
34003
+ if (k !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
34004
+ yield k;
34005
+ }
34006
+ }
34007
+ }
34008
+ /**
34009
+ * Inverse order version of {@link LRUCache.keys}
34010
+ *
34011
+ * Return a generator yielding the keys in the cache,
34012
+ * in order from least recently used to most recently used.
34013
+ */
34014
+ *rkeys() {
34015
+ for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
34016
+ const k = __privateGet(this, _keyList)[i2];
34017
+ if (k !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
34018
+ yield k;
34019
+ }
34020
+ }
34021
+ }
34022
+ /**
34023
+ * Return a generator yielding the values in the cache,
34024
+ * in order from most recently used to least recently used.
34025
+ */
34026
+ *values() {
34027
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
34028
+ const v = __privateGet(this, _valList)[i2];
34029
+ if (v !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
34030
+ yield __privateGet(this, _valList)[i2];
34031
+ }
34032
+ }
34033
+ }
34034
+ /**
34035
+ * Inverse order version of {@link LRUCache.values}
34036
+ *
34037
+ * Return a generator yielding the values in the cache,
34038
+ * in order from least recently used to most recently used.
34039
+ */
34040
+ *rvalues() {
34041
+ for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
34042
+ const v = __privateGet(this, _valList)[i2];
34043
+ if (v !== void 0 && !__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, __privateGet(this, _valList)[i2])) {
34044
+ yield __privateGet(this, _valList)[i2];
34045
+ }
34046
+ }
34047
+ }
34048
+ /**
34049
+ * Iterating over the cache itself yields the same results as
34050
+ * {@link LRUCache.entries}
34051
+ */
34052
+ [Symbol.iterator]() {
34053
+ return this.entries();
34054
+ }
34055
+ /**
34056
+ * Find a value for which the supplied fn method returns a truthy value,
34057
+ * similar to Array.find(). fn is called as fn(value, key, cache).
34058
+ */
34059
+ find(fn, getOptions2 = {}) {
34060
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
34061
+ const v = __privateGet(this, _valList)[i2];
34062
+ const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34063
+ if (value === void 0)
34064
+ continue;
34065
+ if (fn(value, __privateGet(this, _keyList)[i2], this)) {
34066
+ return this.get(__privateGet(this, _keyList)[i2], getOptions2);
34067
+ }
34068
+ }
34069
+ }
34070
+ /**
34071
+ * Call the supplied function on each item in the cache, in order from
34072
+ * most recently used to least recently used. fn is called as
34073
+ * fn(value, key, cache). Does not update age or recenty of use.
34074
+ * Does not iterate over stale values.
34075
+ */
34076
+ forEach(fn, thisp = this) {
34077
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this)) {
34078
+ const v = __privateGet(this, _valList)[i2];
34079
+ const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34080
+ if (value === void 0)
34081
+ continue;
34082
+ fn.call(thisp, value, __privateGet(this, _keyList)[i2], this);
34083
+ }
34084
+ }
34085
+ /**
34086
+ * The same as {@link LRUCache.forEach} but items are iterated over in
34087
+ * reverse order. (ie, less recently used items are iterated over first.)
34088
+ */
34089
+ rforEach(fn, thisp = this) {
34090
+ for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this)) {
34091
+ const v = __privateGet(this, _valList)[i2];
34092
+ const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34093
+ if (value === void 0)
34094
+ continue;
34095
+ fn.call(thisp, value, __privateGet(this, _keyList)[i2], this);
34096
+ }
34097
+ }
34098
+ /**
34099
+ * Delete any stale entries. Returns true if anything was removed,
34100
+ * false otherwise.
34101
+ */
34102
+ purgeStale() {
34103
+ let deleted = false;
34104
+ for (const i2 of __privateMethod(this, _rindexes, rindexes_fn).call(this, { allowStale: true })) {
34105
+ if (__privateGet(this, _isStale).call(this, i2)) {
34106
+ this.delete(__privateGet(this, _keyList)[i2]);
34107
+ deleted = true;
34108
+ }
34109
+ }
34110
+ return deleted;
34111
+ }
34112
+ /**
34113
+ * Get the extended info about a given entry, to get its value, size, and
34114
+ * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
34115
+ * single key. Always returns stale values, if their info is found in the
34116
+ * cache, so be sure to check for expired TTLs if relevant.
34117
+ */
34118
+ info(key) {
34119
+ const i2 = __privateGet(this, _keyMap).get(key);
34120
+ if (i2 === void 0)
34121
+ return void 0;
34122
+ const v = __privateGet(this, _valList)[i2];
34123
+ const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34124
+ if (value === void 0)
34125
+ return void 0;
34126
+ const entry = { value };
34127
+ if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
34128
+ const ttl = __privateGet(this, _ttls)[i2];
34129
+ const start2 = __privateGet(this, _starts)[i2];
34130
+ if (ttl && start2) {
34131
+ const remain = ttl - (perf.now() - start2);
34132
+ entry.ttl = remain;
34133
+ entry.start = Date.now();
34134
+ }
34135
+ }
34136
+ if (__privateGet(this, _sizes)) {
34137
+ entry.size = __privateGet(this, _sizes)[i2];
34138
+ }
34139
+ return entry;
34140
+ }
34141
+ /**
34142
+ * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
34143
+ * passed to cache.load()
34144
+ */
34145
+ dump() {
34146
+ const arr = [];
34147
+ for (const i2 of __privateMethod(this, _indexes, indexes_fn).call(this, { allowStale: true })) {
34148
+ const key = __privateGet(this, _keyList)[i2];
34149
+ const v = __privateGet(this, _valList)[i2];
34150
+ const value = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34151
+ if (value === void 0 || key === void 0)
34152
+ continue;
34153
+ const entry = { value };
34154
+ if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
34155
+ entry.ttl = __privateGet(this, _ttls)[i2];
34156
+ const age = perf.now() - __privateGet(this, _starts)[i2];
34157
+ entry.start = Math.floor(Date.now() - age);
34158
+ }
34159
+ if (__privateGet(this, _sizes)) {
34160
+ entry.size = __privateGet(this, _sizes)[i2];
34161
+ }
34162
+ arr.unshift([key, entry]);
34163
+ }
34164
+ return arr;
34165
+ }
34166
+ /**
34167
+ * Reset the cache and load in the items in entries in the order listed.
34168
+ * Note that the shape of the resulting cache may be different if the
34169
+ * same options are not used in both caches.
34170
+ */
34171
+ load(arr) {
34172
+ this.clear();
34173
+ for (const [key, entry] of arr) {
34174
+ if (entry.start) {
34175
+ const age = Date.now() - entry.start;
34176
+ entry.start = perf.now() - age;
34177
+ }
34178
+ this.set(key, entry.value, entry);
34179
+ }
34180
+ }
34181
+ /**
34182
+ * Add a value to the cache.
34183
+ *
34184
+ * Note: if `undefined` is specified as a value, this is an alias for
34185
+ * {@link LRUCache#delete}
34186
+ */
34187
+ set(k, v, setOptions = {}) {
34188
+ var _a3, _b, _c, _d, _e;
34189
+ if (v === void 0) {
34190
+ this.delete(k);
34191
+ return this;
34192
+ }
34193
+ const { ttl = this.ttl, start: start2, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
34194
+ let { noUpdateTTL = this.noUpdateTTL } = setOptions;
34195
+ const size = __privateGet(this, _requireSize).call(this, k, v, setOptions.size || 0, sizeCalculation);
34196
+ if (this.maxEntrySize && size > this.maxEntrySize) {
34197
+ if (status) {
34198
+ status.set = "miss";
34199
+ status.maxEntrySizeExceeded = true;
34200
+ }
34201
+ this.delete(k);
34202
+ return this;
34203
+ }
34204
+ let index = __privateGet(this, _size) === 0 ? void 0 : __privateGet(this, _keyMap).get(k);
34205
+ if (index === void 0) {
34206
+ index = __privateGet(this, _size) === 0 ? __privateGet(this, _tail) : __privateGet(this, _free).length !== 0 ? __privateGet(this, _free).pop() : __privateGet(this, _size) === __privateGet(this, _max) ? __privateMethod(this, _evict, evict_fn).call(this, false) : __privateGet(this, _size);
34207
+ __privateGet(this, _keyList)[index] = k;
34208
+ __privateGet(this, _valList)[index] = v;
34209
+ __privateGet(this, _keyMap).set(k, index);
34210
+ __privateGet(this, _next)[__privateGet(this, _tail)] = index;
34211
+ __privateGet(this, _prev)[index] = __privateGet(this, _tail);
34212
+ __privateSet(this, _tail, index);
34213
+ __privateWrapper(this, _size)._++;
34214
+ __privateGet(this, _addItemSize).call(this, index, size, status);
34215
+ if (status)
34216
+ status.set = "add";
34217
+ noUpdateTTL = false;
34218
+ } else {
34219
+ __privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
34220
+ const oldVal = __privateGet(this, _valList)[index];
34221
+ if (v !== oldVal) {
34222
+ if (__privateGet(this, _hasFetchMethod) && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, oldVal)) {
34223
+ oldVal.__abortController.abort(new Error("replaced"));
34224
+ const { __staleWhileFetching: s } = oldVal;
34225
+ if (s !== void 0 && !noDisposeOnSet) {
34226
+ if (__privateGet(this, _hasDispose)) {
34227
+ (_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, s, k, "set");
34228
+ }
34229
+ if (__privateGet(this, _hasDisposeAfter)) {
34230
+ (_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([s, k, "set"]);
34231
+ }
34232
+ }
34233
+ } else if (!noDisposeOnSet) {
34234
+ if (__privateGet(this, _hasDispose)) {
34235
+ (_c = __privateGet(this, _dispose)) == null ? void 0 : _c.call(this, oldVal, k, "set");
34236
+ }
34237
+ if (__privateGet(this, _hasDisposeAfter)) {
34238
+ (_d = __privateGet(this, _disposed)) == null ? void 0 : _d.push([oldVal, k, "set"]);
34239
+ }
34240
+ }
34241
+ __privateGet(this, _removeItemSize).call(this, index);
34242
+ __privateGet(this, _addItemSize).call(this, index, size, status);
34243
+ __privateGet(this, _valList)[index] = v;
34244
+ if (status) {
34245
+ status.set = "replace";
34246
+ const oldValue = oldVal && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, oldVal) ? oldVal.__staleWhileFetching : oldVal;
34247
+ if (oldValue !== void 0)
34248
+ status.oldValue = oldValue;
34249
+ }
34250
+ } else if (status) {
34251
+ status.set = "update";
34252
+ }
34253
+ }
34254
+ if (ttl !== 0 && !__privateGet(this, _ttls)) {
34255
+ __privateMethod(this, _initializeTTLTracking, initializeTTLTracking_fn).call(this);
34256
+ }
34257
+ if (__privateGet(this, _ttls)) {
34258
+ if (!noUpdateTTL) {
34259
+ __privateGet(this, _setItemTTL).call(this, index, ttl, start2);
34260
+ }
34261
+ if (status)
34262
+ __privateGet(this, _statusTTL).call(this, status, index);
34263
+ }
34264
+ if (!noDisposeOnSet && __privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
34265
+ const dt = __privateGet(this, _disposed);
34266
+ let task;
34267
+ while (task = dt == null ? void 0 : dt.shift()) {
34268
+ (_e = __privateGet(this, _disposeAfter)) == null ? void 0 : _e.call(this, ...task);
34269
+ }
34270
+ }
34271
+ return this;
34272
+ }
34273
+ /**
34274
+ * Evict the least recently used item, returning its value or
34275
+ * `undefined` if cache is empty.
34276
+ */
34277
+ pop() {
34278
+ var _a3;
34279
+ try {
34280
+ while (__privateGet(this, _size)) {
34281
+ const val = __privateGet(this, _valList)[__privateGet(this, _head)];
34282
+ __privateMethod(this, _evict, evict_fn).call(this, true);
34283
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, val)) {
34284
+ if (val.__staleWhileFetching) {
34285
+ return val.__staleWhileFetching;
34286
+ }
34287
+ } else if (val !== void 0) {
34288
+ return val;
34289
+ }
34290
+ }
34291
+ } finally {
34292
+ if (__privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
34293
+ const dt = __privateGet(this, _disposed);
34294
+ let task;
34295
+ while (task = dt == null ? void 0 : dt.shift()) {
34296
+ (_a3 = __privateGet(this, _disposeAfter)) == null ? void 0 : _a3.call(this, ...task);
34297
+ }
34298
+ }
34299
+ }
34300
+ }
34301
+ /**
34302
+ * Check if a key is in the cache, without updating the recency of use.
34303
+ * Will return false if the item is stale, even though it is technically
34304
+ * in the cache.
34305
+ *
34306
+ * Will not update item age unless
34307
+ * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
34308
+ */
34309
+ has(k, hasOptions = {}) {
34310
+ const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
34311
+ const index = __privateGet(this, _keyMap).get(k);
34312
+ if (index !== void 0) {
34313
+ const v = __privateGet(this, _valList)[index];
34314
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) && v.__staleWhileFetching === void 0) {
34315
+ return false;
34316
+ }
34317
+ if (!__privateGet(this, _isStale).call(this, index)) {
34318
+ if (updateAgeOnHas) {
34319
+ __privateGet(this, _updateItemAge).call(this, index);
34320
+ }
34321
+ if (status) {
34322
+ status.has = "hit";
34323
+ __privateGet(this, _statusTTL).call(this, status, index);
34324
+ }
34325
+ return true;
34326
+ } else if (status) {
34327
+ status.has = "stale";
34328
+ __privateGet(this, _statusTTL).call(this, status, index);
34329
+ }
34330
+ } else if (status) {
34331
+ status.has = "miss";
34332
+ }
34333
+ return false;
34334
+ }
34335
+ /**
34336
+ * Like {@link LRUCache#get} but doesn't update recency or delete stale
34337
+ * items.
34338
+ *
34339
+ * Returns `undefined` if the item is stale, unless
34340
+ * {@link LRUCache.OptionsBase.allowStale} is set.
34341
+ */
34342
+ peek(k, peekOptions = {}) {
34343
+ const { allowStale = this.allowStale } = peekOptions;
34344
+ const index = __privateGet(this, _keyMap).get(k);
34345
+ if (index === void 0 || !allowStale && __privateGet(this, _isStale).call(this, index)) {
34346
+ return;
34347
+ }
34348
+ const v = __privateGet(this, _valList)[index];
34349
+ return __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v) ? v.__staleWhileFetching : v;
34350
+ }
34351
+ fetch(_0) {
34352
+ return __async(this, arguments, function* (k, fetchOptions = {}) {
34353
+ const {
34354
+ // get options
34355
+ allowStale = this.allowStale,
34356
+ updateAgeOnGet = this.updateAgeOnGet,
34357
+ noDeleteOnStaleGet = this.noDeleteOnStaleGet,
34358
+ // set options
34359
+ ttl = this.ttl,
34360
+ noDisposeOnSet = this.noDisposeOnSet,
34361
+ size = 0,
34362
+ sizeCalculation = this.sizeCalculation,
34363
+ noUpdateTTL = this.noUpdateTTL,
34364
+ // fetch exclusive options
34365
+ noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,
34366
+ allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
34367
+ ignoreFetchAbort = this.ignoreFetchAbort,
34368
+ allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
34369
+ context,
34370
+ forceRefresh = false,
34371
+ status,
34372
+ signal
34373
+ } = fetchOptions;
34374
+ if (!__privateGet(this, _hasFetchMethod)) {
34375
+ if (status)
34376
+ status.fetch = "get";
34377
+ return this.get(k, {
34378
+ allowStale,
34379
+ updateAgeOnGet,
34380
+ noDeleteOnStaleGet,
34381
+ status
34382
+ });
34383
+ }
34384
+ const options = {
34385
+ allowStale,
34386
+ updateAgeOnGet,
34387
+ noDeleteOnStaleGet,
34388
+ ttl,
34389
+ noDisposeOnSet,
34390
+ size,
34391
+ sizeCalculation,
34392
+ noUpdateTTL,
34393
+ noDeleteOnFetchRejection,
34394
+ allowStaleOnFetchRejection,
34395
+ allowStaleOnFetchAbort,
34396
+ ignoreFetchAbort,
34397
+ status,
34398
+ signal
34399
+ };
34400
+ let index = __privateGet(this, _keyMap).get(k);
34401
+ if (index === void 0) {
34402
+ if (status)
34403
+ status.fetch = "miss";
34404
+ const p = __privateMethod(this, _backgroundFetch, backgroundFetch_fn).call(this, k, index, options, context);
34405
+ return p.__returned = p;
34406
+ } else {
34407
+ const v = __privateGet(this, _valList)[index];
34408
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34409
+ const stale = allowStale && v.__staleWhileFetching !== void 0;
34410
+ if (status) {
34411
+ status.fetch = "inflight";
34412
+ if (stale)
34413
+ status.returnedStale = true;
34414
+ }
34415
+ return stale ? v.__staleWhileFetching : v.__returned = v;
34416
+ }
34417
+ const isStale = __privateGet(this, _isStale).call(this, index);
34418
+ if (!forceRefresh && !isStale) {
34419
+ if (status)
34420
+ status.fetch = "hit";
34421
+ __privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
34422
+ if (updateAgeOnGet) {
34423
+ __privateGet(this, _updateItemAge).call(this, index);
34424
+ }
34425
+ if (status)
34426
+ __privateGet(this, _statusTTL).call(this, status, index);
34427
+ return v;
34428
+ }
34429
+ const p = __privateMethod(this, _backgroundFetch, backgroundFetch_fn).call(this, k, index, options, context);
34430
+ const hasStale = p.__staleWhileFetching !== void 0;
34431
+ const staleVal = hasStale && allowStale;
34432
+ if (status) {
34433
+ status.fetch = isStale ? "stale" : "refresh";
34434
+ if (staleVal && isStale)
34435
+ status.returnedStale = true;
34436
+ }
34437
+ return staleVal ? p.__staleWhileFetching : p.__returned = p;
34438
+ }
34439
+ });
34440
+ }
34441
+ /**
34442
+ * Return a value from the cache. Will update the recency of the cache
34443
+ * entry found.
34444
+ *
34445
+ * If the key is not found, get() will return `undefined`.
34446
+ */
34447
+ get(k, getOptions2 = {}) {
34448
+ const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions2;
34449
+ const index = __privateGet(this, _keyMap).get(k);
34450
+ if (index !== void 0) {
34451
+ const value = __privateGet(this, _valList)[index];
34452
+ const fetching = __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, value);
34453
+ if (status)
34454
+ __privateGet(this, _statusTTL).call(this, status, index);
34455
+ if (__privateGet(this, _isStale).call(this, index)) {
34456
+ if (status)
34457
+ status.get = "stale";
34458
+ if (!fetching) {
34459
+ if (!noDeleteOnStaleGet) {
34460
+ this.delete(k);
34461
+ }
34462
+ if (status && allowStale)
34463
+ status.returnedStale = true;
34464
+ return allowStale ? value : void 0;
34465
+ } else {
34466
+ if (status && allowStale && value.__staleWhileFetching !== void 0) {
34467
+ status.returnedStale = true;
34468
+ }
34469
+ return allowStale ? value.__staleWhileFetching : void 0;
34470
+ }
34471
+ } else {
34472
+ if (status)
34473
+ status.get = "hit";
34474
+ if (fetching) {
34475
+ return value.__staleWhileFetching;
34476
+ }
34477
+ __privateMethod(this, _moveToTail, moveToTail_fn).call(this, index);
34478
+ if (updateAgeOnGet) {
34479
+ __privateGet(this, _updateItemAge).call(this, index);
34480
+ }
34481
+ return value;
34482
+ }
34483
+ } else if (status) {
34484
+ status.get = "miss";
34485
+ }
34486
+ }
34487
+ /**
34488
+ * Deletes a key out of the cache.
34489
+ * Returns true if the key was deleted, false otherwise.
34490
+ */
34491
+ delete(k) {
34492
+ var _a3, _b, _c, _d;
34493
+ let deleted = false;
34494
+ if (__privateGet(this, _size) !== 0) {
34495
+ const index = __privateGet(this, _keyMap).get(k);
34496
+ if (index !== void 0) {
34497
+ deleted = true;
34498
+ if (__privateGet(this, _size) === 1) {
34499
+ this.clear();
34500
+ } else {
34501
+ __privateGet(this, _removeItemSize).call(this, index);
34502
+ const v = __privateGet(this, _valList)[index];
34503
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34504
+ v.__abortController.abort(new Error("deleted"));
34505
+ } else if (__privateGet(this, _hasDispose) || __privateGet(this, _hasDisposeAfter)) {
34506
+ if (__privateGet(this, _hasDispose)) {
34507
+ (_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "delete");
34508
+ }
34509
+ if (__privateGet(this, _hasDisposeAfter)) {
34510
+ (_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "delete"]);
34511
+ }
34512
+ }
34513
+ __privateGet(this, _keyMap).delete(k);
34514
+ __privateGet(this, _keyList)[index] = void 0;
34515
+ __privateGet(this, _valList)[index] = void 0;
34516
+ if (index === __privateGet(this, _tail)) {
34517
+ __privateSet(this, _tail, __privateGet(this, _prev)[index]);
34518
+ } else if (index === __privateGet(this, _head)) {
34519
+ __privateSet(this, _head, __privateGet(this, _next)[index]);
34520
+ } else {
34521
+ const pi = __privateGet(this, _prev)[index];
34522
+ __privateGet(this, _next)[pi] = __privateGet(this, _next)[index];
34523
+ const ni = __privateGet(this, _next)[index];
34524
+ __privateGet(this, _prev)[ni] = __privateGet(this, _prev)[index];
34525
+ }
34526
+ __privateWrapper(this, _size)._--;
34527
+ __privateGet(this, _free).push(index);
34528
+ }
34529
+ }
34530
+ }
34531
+ if (__privateGet(this, _hasDisposeAfter) && ((_c = __privateGet(this, _disposed)) == null ? void 0 : _c.length)) {
34532
+ const dt = __privateGet(this, _disposed);
34533
+ let task;
34534
+ while (task = dt == null ? void 0 : dt.shift()) {
34535
+ (_d = __privateGet(this, _disposeAfter)) == null ? void 0 : _d.call(this, ...task);
34536
+ }
34537
+ }
34538
+ return deleted;
34539
+ }
34540
+ /**
34541
+ * Clear the cache entirely, throwing away all values.
34542
+ */
34543
+ clear() {
34544
+ var _a3, _b, _c;
34545
+ for (const index of __privateMethod(this, _rindexes, rindexes_fn).call(this, { allowStale: true })) {
34546
+ const v = __privateGet(this, _valList)[index];
34547
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34548
+ v.__abortController.abort(new Error("deleted"));
34549
+ } else {
34550
+ const k = __privateGet(this, _keyList)[index];
34551
+ if (__privateGet(this, _hasDispose)) {
34552
+ (_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "delete");
34553
+ }
34554
+ if (__privateGet(this, _hasDisposeAfter)) {
34555
+ (_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "delete"]);
34556
+ }
34557
+ }
34558
+ }
34559
+ __privateGet(this, _keyMap).clear();
34560
+ __privateGet(this, _valList).fill(void 0);
34561
+ __privateGet(this, _keyList).fill(void 0);
34562
+ if (__privateGet(this, _ttls) && __privateGet(this, _starts)) {
34563
+ __privateGet(this, _ttls).fill(0);
34564
+ __privateGet(this, _starts).fill(0);
34565
+ }
34566
+ if (__privateGet(this, _sizes)) {
34567
+ __privateGet(this, _sizes).fill(0);
34568
+ }
34569
+ __privateSet(this, _head, 0);
34570
+ __privateSet(this, _tail, 0);
34571
+ __privateGet(this, _free).length = 0;
34572
+ __privateSet(this, _calculatedSize, 0);
34573
+ __privateSet(this, _size, 0);
34574
+ if (__privateGet(this, _hasDisposeAfter) && __privateGet(this, _disposed)) {
34575
+ const dt = __privateGet(this, _disposed);
34576
+ let task;
34577
+ while (task = dt == null ? void 0 : dt.shift()) {
34578
+ (_c = __privateGet(this, _disposeAfter)) == null ? void 0 : _c.call(this, ...task);
34579
+ }
34580
+ }
34581
+ }
34582
+ };
34583
+ LRUCache = _LRUCache;
34584
+ _a2 = Symbol.toStringTag;
34585
+ _max = new WeakMap();
34586
+ _maxSize = new WeakMap();
34587
+ _dispose = new WeakMap();
34588
+ _disposeAfter = new WeakMap();
34589
+ _fetchMethod = new WeakMap();
34590
+ _size = new WeakMap();
34591
+ _calculatedSize = new WeakMap();
34592
+ _keyMap = new WeakMap();
34593
+ _keyList = new WeakMap();
34594
+ _valList = new WeakMap();
34595
+ _next = new WeakMap();
34596
+ _prev = new WeakMap();
34597
+ _head = new WeakMap();
34598
+ _tail = new WeakMap();
34599
+ _free = new WeakMap();
34600
+ _disposed = new WeakMap();
34601
+ _sizes = new WeakMap();
34602
+ _starts = new WeakMap();
34603
+ _ttls = new WeakMap();
34604
+ _hasDispose = new WeakMap();
34605
+ _hasFetchMethod = new WeakMap();
34606
+ _hasDisposeAfter = new WeakMap();
34607
+ _initializeTTLTracking = new WeakSet();
34608
+ initializeTTLTracking_fn = function() {
34609
+ const ttls = new ZeroArray(__privateGet(this, _max));
34610
+ const starts = new ZeroArray(__privateGet(this, _max));
34611
+ __privateSet(this, _ttls, ttls);
34612
+ __privateSet(this, _starts, starts);
34613
+ __privateSet(this, _setItemTTL, (index, ttl, start2 = perf.now()) => {
34614
+ starts[index] = ttl !== 0 ? start2 : 0;
34615
+ ttls[index] = ttl;
34616
+ if (ttl !== 0 && this.ttlAutopurge) {
34617
+ const t2 = setTimeout(() => {
34618
+ if (__privateGet(this, _isStale).call(this, index)) {
34619
+ this.delete(__privateGet(this, _keyList)[index]);
34620
+ }
34621
+ }, ttl + 1);
34622
+ if (t2.unref) {
34623
+ t2.unref();
34624
+ }
34625
+ }
34626
+ });
34627
+ __privateSet(this, _updateItemAge, (index) => {
34628
+ starts[index] = ttls[index] !== 0 ? perf.now() : 0;
34629
+ });
34630
+ __privateSet(this, _statusTTL, (status, index) => {
34631
+ if (ttls[index]) {
34632
+ const ttl = ttls[index];
34633
+ const start2 = starts[index];
34634
+ if (!ttl || !start2)
34635
+ return;
34636
+ status.ttl = ttl;
34637
+ status.start = start2;
34638
+ status.now = cachedNow || getNow();
34639
+ const age = status.now - start2;
34640
+ status.remainingTTL = ttl - age;
34641
+ }
34642
+ });
34643
+ let cachedNow = 0;
34644
+ const getNow = () => {
34645
+ const n2 = perf.now();
34646
+ if (this.ttlResolution > 0) {
34647
+ cachedNow = n2;
34648
+ const t2 = setTimeout(() => cachedNow = 0, this.ttlResolution);
34649
+ if (t2.unref) {
34650
+ t2.unref();
34651
+ }
34652
+ }
34653
+ return n2;
34654
+ };
34655
+ this.getRemainingTTL = (key) => {
34656
+ const index = __privateGet(this, _keyMap).get(key);
34657
+ if (index === void 0) {
34658
+ return 0;
34659
+ }
34660
+ const ttl = ttls[index];
34661
+ const start2 = starts[index];
34662
+ if (!ttl || !start2) {
34663
+ return Infinity;
34664
+ }
34665
+ const age = (cachedNow || getNow()) - start2;
34666
+ return ttl - age;
34667
+ };
34668
+ __privateSet(this, _isStale, (index) => {
34669
+ const s = starts[index];
34670
+ const t2 = ttls[index];
34671
+ return !!t2 && !!s && (cachedNow || getNow()) - s > t2;
34672
+ });
34673
+ };
34674
+ _updateItemAge = new WeakMap();
34675
+ _statusTTL = new WeakMap();
34676
+ _setItemTTL = new WeakMap();
34677
+ _isStale = new WeakMap();
34678
+ _initializeSizeTracking = new WeakSet();
34679
+ initializeSizeTracking_fn = function() {
34680
+ const sizes = new ZeroArray(__privateGet(this, _max));
34681
+ __privateSet(this, _calculatedSize, 0);
34682
+ __privateSet(this, _sizes, sizes);
34683
+ __privateSet(this, _removeItemSize, (index) => {
34684
+ __privateSet(this, _calculatedSize, __privateGet(this, _calculatedSize) - sizes[index]);
34685
+ sizes[index] = 0;
34686
+ });
34687
+ __privateSet(this, _requireSize, (k, v, size, sizeCalculation) => {
34688
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34689
+ return 0;
34690
+ }
34691
+ if (!isPosInt(size)) {
34692
+ if (sizeCalculation) {
34693
+ if (typeof sizeCalculation !== "function") {
34694
+ throw new TypeError("sizeCalculation must be a function");
34695
+ }
34696
+ size = sizeCalculation(v, k);
34697
+ if (!isPosInt(size)) {
34698
+ throw new TypeError("sizeCalculation return invalid (expect positive integer)");
34699
+ }
34700
+ } else {
34701
+ throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
34702
+ }
34703
+ }
34704
+ return size;
34705
+ });
34706
+ __privateSet(this, _addItemSize, (index, size, status) => {
34707
+ sizes[index] = size;
34708
+ if (__privateGet(this, _maxSize)) {
34709
+ const maxSize = __privateGet(this, _maxSize) - sizes[index];
34710
+ while (__privateGet(this, _calculatedSize) > maxSize) {
34711
+ __privateMethod(this, _evict, evict_fn).call(this, true);
34712
+ }
34713
+ }
34714
+ __privateSet(this, _calculatedSize, __privateGet(this, _calculatedSize) + sizes[index]);
34715
+ if (status) {
34716
+ status.entrySize = size;
34717
+ status.totalCalculatedSize = __privateGet(this, _calculatedSize);
34718
+ }
34719
+ });
34720
+ };
34721
+ _removeItemSize = new WeakMap();
34722
+ _addItemSize = new WeakMap();
34723
+ _requireSize = new WeakMap();
34724
+ _indexes = new WeakSet();
34725
+ indexes_fn = function* ({ allowStale = this.allowStale } = {}) {
34726
+ if (__privateGet(this, _size)) {
34727
+ for (let i2 = __privateGet(this, _tail); true; ) {
34728
+ if (!__privateMethod(this, _isValidIndex, isValidIndex_fn).call(this, i2)) {
34729
+ break;
34730
+ }
34731
+ if (allowStale || !__privateGet(this, _isStale).call(this, i2)) {
34732
+ yield i2;
34733
+ }
34734
+ if (i2 === __privateGet(this, _head)) {
34735
+ break;
34736
+ } else {
34737
+ i2 = __privateGet(this, _prev)[i2];
34738
+ }
34739
+ }
34740
+ }
34741
+ };
34742
+ _rindexes = new WeakSet();
34743
+ rindexes_fn = function* ({ allowStale = this.allowStale } = {}) {
34744
+ if (__privateGet(this, _size)) {
34745
+ for (let i2 = __privateGet(this, _head); true; ) {
34746
+ if (!__privateMethod(this, _isValidIndex, isValidIndex_fn).call(this, i2)) {
34747
+ break;
34748
+ }
34749
+ if (allowStale || !__privateGet(this, _isStale).call(this, i2)) {
34750
+ yield i2;
34751
+ }
34752
+ if (i2 === __privateGet(this, _tail)) {
34753
+ break;
34754
+ } else {
34755
+ i2 = __privateGet(this, _next)[i2];
34756
+ }
34757
+ }
34758
+ }
34759
+ };
34760
+ _isValidIndex = new WeakSet();
34761
+ isValidIndex_fn = function(index) {
34762
+ return index !== void 0 && __privateGet(this, _keyMap).get(__privateGet(this, _keyList)[index]) === index;
34763
+ };
34764
+ _evict = new WeakSet();
34765
+ evict_fn = function(free) {
34766
+ var _a3, _b;
34767
+ const head = __privateGet(this, _head);
34768
+ const k = __privateGet(this, _keyList)[head];
34769
+ const v = __privateGet(this, _valList)[head];
34770
+ if (__privateGet(this, _hasFetchMethod) && __privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34771
+ v.__abortController.abort(new Error("evicted"));
34772
+ } else if (__privateGet(this, _hasDispose) || __privateGet(this, _hasDisposeAfter)) {
34773
+ if (__privateGet(this, _hasDispose)) {
34774
+ (_a3 = __privateGet(this, _dispose)) == null ? void 0 : _a3.call(this, v, k, "evict");
34775
+ }
34776
+ if (__privateGet(this, _hasDisposeAfter)) {
34777
+ (_b = __privateGet(this, _disposed)) == null ? void 0 : _b.push([v, k, "evict"]);
34778
+ }
34779
+ }
34780
+ __privateGet(this, _removeItemSize).call(this, head);
34781
+ if (free) {
34782
+ __privateGet(this, _keyList)[head] = void 0;
34783
+ __privateGet(this, _valList)[head] = void 0;
34784
+ __privateGet(this, _free).push(head);
34785
+ }
34786
+ if (__privateGet(this, _size) === 1) {
34787
+ __privateSet(this, _head, __privateSet(this, _tail, 0));
34788
+ __privateGet(this, _free).length = 0;
34789
+ } else {
34790
+ __privateSet(this, _head, __privateGet(this, _next)[head]);
34791
+ }
34792
+ __privateGet(this, _keyMap).delete(k);
34793
+ __privateWrapper(this, _size)._--;
34794
+ return head;
34795
+ };
34796
+ _backgroundFetch = new WeakSet();
34797
+ backgroundFetch_fn = function(k, index, options, context) {
34798
+ const v = index === void 0 ? void 0 : __privateGet(this, _valList)[index];
34799
+ if (__privateMethod(this, _isBackgroundFetch, isBackgroundFetch_fn).call(this, v)) {
34800
+ return v;
34801
+ }
34802
+ const ac = new AC();
34803
+ const { signal } = options;
34804
+ signal == null ? void 0 : signal.addEventListener("abort", () => ac.abort(signal.reason), {
34805
+ signal: ac.signal
34806
+ });
34807
+ const fetchOpts = {
34808
+ signal: ac.signal,
34809
+ options,
34810
+ context
34811
+ };
34812
+ const cb = (v2, updateCache = false) => {
34813
+ const { aborted } = ac.signal;
34814
+ const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
34815
+ if (options.status) {
34816
+ if (aborted && !updateCache) {
34817
+ options.status.fetchAborted = true;
34818
+ options.status.fetchError = ac.signal.reason;
34819
+ if (ignoreAbort)
34820
+ options.status.fetchAbortIgnored = true;
34821
+ } else {
34822
+ options.status.fetchResolved = true;
34823
+ }
34824
+ }
34825
+ if (aborted && !ignoreAbort && !updateCache) {
34826
+ return fetchFail(ac.signal.reason);
34827
+ }
34828
+ const bf2 = p;
34829
+ if (__privateGet(this, _valList)[index] === p) {
34830
+ if (v2 === void 0) {
34831
+ if (bf2.__staleWhileFetching) {
34832
+ __privateGet(this, _valList)[index] = bf2.__staleWhileFetching;
34833
+ } else {
34834
+ this.delete(k);
34835
+ }
34836
+ } else {
34837
+ if (options.status)
34838
+ options.status.fetchUpdated = true;
34839
+ this.set(k, v2, fetchOpts.options);
34840
+ }
34841
+ }
34842
+ return v2;
34843
+ };
34844
+ const eb = (er) => {
34845
+ if (options.status) {
34846
+ options.status.fetchRejected = true;
34847
+ options.status.fetchError = er;
34848
+ }
34849
+ return fetchFail(er);
34850
+ };
34851
+ const fetchFail = (er) => {
34852
+ const { aborted } = ac.signal;
34853
+ const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
34854
+ const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
34855
+ const noDelete = allowStale || options.noDeleteOnFetchRejection;
34856
+ const bf2 = p;
34857
+ if (__privateGet(this, _valList)[index] === p) {
34858
+ const del = !noDelete || bf2.__staleWhileFetching === void 0;
34859
+ if (del) {
34860
+ this.delete(k);
34861
+ } else if (!allowStaleAborted) {
34862
+ __privateGet(this, _valList)[index] = bf2.__staleWhileFetching;
34863
+ }
34864
+ }
34865
+ if (allowStale) {
34866
+ if (options.status && bf2.__staleWhileFetching !== void 0) {
34867
+ options.status.returnedStale = true;
34868
+ }
34869
+ return bf2.__staleWhileFetching;
34870
+ } else if (bf2.__returned === bf2) {
34871
+ throw er;
34872
+ }
34873
+ };
34874
+ const pcall = (res, rej) => {
34875
+ var _a3;
34876
+ const fmp = (_a3 = __privateGet(this, _fetchMethod)) == null ? void 0 : _a3.call(this, k, v, fetchOpts);
34877
+ if (fmp && fmp instanceof Promise) {
34878
+ fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
34879
+ }
34880
+ ac.signal.addEventListener("abort", () => {
34881
+ if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
34882
+ res(void 0);
34883
+ if (options.allowStaleOnFetchAbort) {
34884
+ res = (v2) => cb(v2, true);
34885
+ }
34886
+ }
34887
+ });
34888
+ };
34889
+ if (options.status)
34890
+ options.status.fetchDispatched = true;
34891
+ const p = new Promise(pcall).then(cb, eb);
34892
+ const bf = Object.assign(p, {
34893
+ __abortController: ac,
34894
+ __staleWhileFetching: v,
34895
+ __returned: void 0
34896
+ });
34897
+ if (index === void 0) {
34898
+ this.set(k, bf, __spreadProps(__spreadValues({}, fetchOpts.options), { status: void 0 }));
34899
+ index = __privateGet(this, _keyMap).get(k);
34900
+ } else {
34901
+ __privateGet(this, _valList)[index] = bf;
34902
+ }
34903
+ return bf;
34904
+ };
34905
+ _isBackgroundFetch = new WeakSet();
34906
+ isBackgroundFetch_fn = function(p) {
34907
+ if (!__privateGet(this, _hasFetchMethod))
34908
+ return false;
34909
+ const b = p;
34910
+ return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
34911
+ };
34912
+ _connect = new WeakSet();
34913
+ connect_fn = function(p, n2) {
34914
+ __privateGet(this, _prev)[n2] = p;
34915
+ __privateGet(this, _next)[p] = n2;
34916
+ };
34917
+ _moveToTail = new WeakSet();
34918
+ moveToTail_fn = function(index) {
34919
+ if (index !== __privateGet(this, _tail)) {
34920
+ if (index === __privateGet(this, _head)) {
34921
+ __privateSet(this, _head, __privateGet(this, _next)[index]);
34922
+ } else {
34923
+ __privateMethod(this, _connect, connect_fn).call(this, __privateGet(this, _prev)[index], __privateGet(this, _next)[index]);
34924
+ }
34925
+ __privateMethod(this, _connect, connect_fn).call(this, __privateGet(this, _tail), index);
34926
+ __privateSet(this, _tail, index);
34927
+ }
34928
+ };
34929
+ }
34930
+ });
34931
+
33514
34932
  // ../../node_modules/@measured/dnd/node_modules/@babel/runtime/helpers/esm/extends.js
33515
34933
  function _extends2() {
33516
34934
  _extends2 = Object.assign ? Object.assign.bind() : function(target) {
@@ -33576,7 +34994,7 @@ function bindEvent(win, binding, options) {
33576
34994
  }
33577
34995
  function bindEvents(el, bindings, sharedOptions) {
33578
34996
  const unbindings = bindings.flatMap((binding) => {
33579
- const iframes = querySelectorAll(window.document, "iframe");
34997
+ const iframes = querySelectorAll(window.document, "[data-rfd-iframe]");
33580
34998
  const windows = [el, ...iframes.map((iframe) => iframe.contentWindow)];
33581
34999
  return windows.map((win) => {
33582
35000
  if (!win)
@@ -33786,6 +35204,26 @@ function getFurthestAway({
33786
35204
  }).sort((a2, b) => b.distance - a2.distance);
33787
35205
  return sorted[0] ? sorted[0].id : null;
33788
35206
  }
35207
+ function normalizeFamilies(pageBorderBox, candidates) {
35208
+ const families = candidates.reduce((acc, candidate) => {
35209
+ var _a3;
35210
+ const familyName = ((_a3 = candidate.parents[0]) == null ? void 0 : _a3.id) || candidate.descriptor.id;
35211
+ const family = acc[familyName] || [];
35212
+ const generation = candidate.parents.length;
35213
+ family[generation] = [...family[generation] || [], candidate];
35214
+ return __spreadProps(__spreadValues({}, acc), {
35215
+ [familyName]: family
35216
+ });
35217
+ }, {});
35218
+ return Object.keys(families).map((familyName) => {
35219
+ const family = families[familyName].flat();
35220
+ const reversedFamily = [...family].reverse();
35221
+ const chosenMember = reversedFamily.find((member) => {
35222
+ return pageBorderBox.center.x < member.page.borderBox.right && pageBorderBox.center.x > member.page.borderBox.left && pageBorderBox.center.y > member.page.borderBox.top && pageBorderBox.center.y < member.page.borderBox.bottom;
35223
+ });
35224
+ return chosenMember || family[0];
35225
+ });
35226
+ }
33789
35227
  function getDroppableOver({
33790
35228
  pageBorderBox,
33791
35229
  draggable: draggable2,
@@ -33826,10 +35264,14 @@ function getDroppableOver({
33826
35264
  if (candidates.length === 1) {
33827
35265
  return candidates[0].descriptor.id;
33828
35266
  }
35267
+ const normalizedCandidates = normalizeFamilies(pageBorderBox, candidates);
35268
+ if (normalizedCandidates.length === 1) {
35269
+ return normalizedCandidates[0].descriptor.id;
35270
+ }
33829
35271
  return getFurthestAway({
33830
35272
  pageBorderBox,
33831
35273
  draggable: draggable2,
33832
- candidates
35274
+ candidates: normalizedCandidates
33833
35275
  });
33834
35276
  }
33835
35277
  function getIsDisplaced({
@@ -34046,8 +35488,16 @@ function shouldPublishUpdate(registry, dragging, entry) {
34046
35488
  return true;
34047
35489
  }
34048
35490
  function querySelectorAllIframe(selector) {
34049
- const iframes = querySelectorAll(document, "iframe");
34050
- const iframePossible = iframes.reduce((acc, iframe) => [...acc, ...querySelectorAll(iframe.contentWindow.document, selector)], []);
35491
+ let iframes = iframeCache.get("iframes");
35492
+ if (!iframes) {
35493
+ iframes = querySelectorAll(document, "iframe");
35494
+ iframes = iframes.filter((iframe) => iframe.hasAttribute("data-rfd-iframe"));
35495
+ iframeCache.set("iframes", iframes);
35496
+ }
35497
+ const iframePossible = iframes.reduce((acc, iframe) => {
35498
+ var _a3;
35499
+ return [...acc, ...((_a3 = iframe.contentWindow) == null ? void 0 : _a3.document) ? querySelectorAll(iframe.contentWindow.document, selector) : []];
35500
+ }, []);
34051
35501
  return [...querySelectorAll(document, selector), ...iframePossible];
34052
35502
  }
34053
35503
  function useStyleMarshal(contextId, nonce) {
@@ -34069,7 +35519,10 @@ function useStyleMarshal(contextId, nonce) {
34069
35519
  useLayoutEffect2(() => {
34070
35520
  const alwaysSelector = `[${alwaysDataAttr}="${contextId}"]`;
34071
35521
  const dynamicSelector = `[${dynamicDataAttr}="${contextId}"]`;
34072
- const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).map((iframe) => getHead(iframe.contentWindow.document))];
35522
+ const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).filter((iframe) => {
35523
+ var _a3;
35524
+ return (_a3 = iframe.contentWindow) == null ? void 0 : _a3.document;
35525
+ }).map((iframe) => getHead(iframe.contentWindow.document))];
34073
35526
  heads.forEach((head) => {
34074
35527
  if (!head)
34075
35528
  return;
@@ -34122,6 +35575,10 @@ function isHtmlElement(el) {
34122
35575
  }
34123
35576
  function findDragHandle(contextId, draggableId) {
34124
35577
  const selector = `[${dragHandle.contextId}="${contextId}"]`;
35578
+ const cachedHandle = dragHandleCache.get(selector);
35579
+ if (cachedHandle) {
35580
+ return cachedHandle;
35581
+ }
34125
35582
  const possible = querySelectorAllIframe(selector);
34126
35583
  if (!possible.length) {
34127
35584
  process.env.NODE_ENV !== "production" ? warning2(`Unable to find any drag handles in the context "${contextId}" ${selector}`) : void 0;
@@ -34138,6 +35595,7 @@ function findDragHandle(contextId, draggableId) {
34138
35595
  process.env.NODE_ENV !== "production" ? warning2("drag handle needs to be a HTMLElement") : void 0;
34139
35596
  return null;
34140
35597
  }
35598
+ dragHandleCache.set(selector, handle);
34141
35599
  return handle;
34142
35600
  }
34143
35601
  function useFocusMarshal(contextId) {
@@ -34498,20 +35956,22 @@ function offsetPoint(x, y, win) {
34498
35956
  let offsetY = 0;
34499
35957
  if (win.parent !== win.self) {
34500
35958
  const iframe = win.frameElement;
34501
- const rect = iframe.getBoundingClientRect();
34502
- const transform = getTransform(iframe);
34503
- offsetX = rect.left;
34504
- offsetY = rect.top;
34505
- if (transform) {
34506
- const {
34507
- x: transformedX,
34508
- y: transformedY
34509
- } = applyTransformPoint(x, y, transform.matrix, transform.origin);
34510
- const point2 = {
34511
- x: transformedX + offsetX,
34512
- y: transformedY + offsetY
34513
- };
34514
- return point2;
35959
+ if (iframe) {
35960
+ const rect = iframe.getBoundingClientRect();
35961
+ const transform = getTransform(iframe);
35962
+ offsetX = rect.left;
35963
+ offsetY = rect.top;
35964
+ if (transform) {
35965
+ const {
35966
+ x: transformedX,
35967
+ y: transformedY
35968
+ } = applyTransformPoint(x, y, transform.matrix, transform.origin);
35969
+ const point2 = {
35970
+ x: transformedX + offsetX,
35971
+ y: transformedY + offsetY
35972
+ };
35973
+ return point2;
35974
+ }
34515
35975
  }
34516
35976
  }
34517
35977
  const point = {
@@ -35207,10 +36667,10 @@ function isActive({
35207
36667
  expected,
35208
36668
  phase,
35209
36669
  isLockActive,
35210
- shouldWarn
36670
+ shouldWarn: shouldWarn2
35211
36671
  }) {
35212
36672
  if (!isLockActive()) {
35213
- if (shouldWarn) {
36673
+ if (shouldWarn2) {
35214
36674
  process.env.NODE_ENV !== "production" ? warning2(`
35215
36675
  Cannot perform action.
35216
36676
  The sensor no longer has an action lock.
@@ -35224,7 +36684,7 @@ function isActive({
35224
36684
  return false;
35225
36685
  }
35226
36686
  if (expected !== phase) {
35227
- if (shouldWarn) {
36687
+ if (shouldWarn2) {
35228
36688
  process.env.NODE_ENV !== "production" ? warning2(`
35229
36689
  Cannot perform action.
35230
36690
  The actions you used belong to an outdated phase
@@ -35636,7 +37096,7 @@ function DragDropContext(props) {
35636
37096
  }, props.children));
35637
37097
  }
35638
37098
  function getDraggingStyle(dragging) {
35639
- var _a, _b, _c, _d, _e, _f;
37099
+ var _a3, _b, _c, _d, _e, _f;
35640
37100
  const dimension = dragging.dimension;
35641
37101
  const box = dimension.client;
35642
37102
  const {
@@ -35648,7 +37108,7 @@ function getDraggingStyle(dragging) {
35648
37108
  const shouldAnimate = getShouldDraggingAnimate(dragging);
35649
37109
  const isDropAnimating = Boolean(dropping);
35650
37110
  const untransformedOffset = {
35651
- x: offset3.x / (((_a = dimension == null ? void 0 : dimension.transform) == null ? void 0 : _a.matrix.scaleX) || 1),
37111
+ x: offset3.x / (((_a3 = dimension == null ? void 0 : dimension.transform) == null ? void 0 : _a3.matrix.scaleX) || 1),
35652
37112
  y: offset3.y / (((_b = dimension == null ? void 0 : dimension.transform) == null ? void 0 : _b.matrix.scaleY) || 1)
35653
37113
  };
35654
37114
  const transform = isDropAnimating ? transforms.drop(untransformedOffset, isCombining) : transforms.moveTo(untransformedOffset);
@@ -35668,14 +37128,14 @@ function getDraggingStyle(dragging) {
35668
37128
  return style2;
35669
37129
  }
35670
37130
  function getSecondaryStyle(secondary) {
35671
- var _a, _b;
37131
+ var _a3, _b;
35672
37132
  const {
35673
37133
  offset: offset3,
35674
37134
  sourceDroppable
35675
37135
  } = secondary;
35676
37136
  return {
35677
37137
  transform: transforms.moveTo({
35678
- x: offset3.x / (((_a = sourceDroppable == null ? void 0 : sourceDroppable.transform) == null ? void 0 : _a.matrix.scaleX) || 1),
37138
+ x: offset3.x / (((_a3 = sourceDroppable == null ? void 0 : sourceDroppable.transform) == null ? void 0 : _a3.matrix.scaleX) || 1),
35679
37139
  y: offset3.y / (((_b = sourceDroppable == null ? void 0 : sourceDroppable.transform) == null ? void 0 : _b.matrix.scaleY) || 1)
35680
37140
  }),
35681
37141
  transition: secondary.shouldAnimateDisplacement ? void 0 : "none"
@@ -35710,7 +37170,7 @@ function getIframeOffset(el) {
35710
37170
  return offset3;
35711
37171
  }
35712
37172
  function applyOffset(rect, offset3) {
35713
- var _a, _b;
37173
+ var _a3, _b;
35714
37174
  return __spreadProps(__spreadValues({}, rect), {
35715
37175
  top: (rect.top || 0) + offset3.top,
35716
37176
  left: (rect.left || 0) + offset3.left,
@@ -35719,7 +37179,7 @@ function applyOffset(rect, offset3) {
35719
37179
  x: (rect.x || 0) + offset3.left,
35720
37180
  y: (rect.y || 0) + offset3.top,
35721
37181
  center: {
35722
- x: (((_a = rect.center) == null ? void 0 : _a.x) || 0) + offset3.left,
37182
+ x: (((_a3 = rect.center) == null ? void 0 : _a3.x) || 0) + offset3.left,
35723
37183
  y: (((_b = rect.center) == null ? void 0 : _b.y) || 0) + offset3.top
35724
37184
  },
35725
37185
  width: rect.width || 0,
@@ -36184,7 +37644,7 @@ function getBody() {
36184
37644
  !document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
36185
37645
  return document.body;
36186
37646
  }
36187
- var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
37647
+ var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, iframeCache, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, dragHandleCache, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getParents, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
36188
37648
  var init_dnd_esm = __esm({
36189
37649
  "../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
36190
37650
  init_react_import();
@@ -36196,6 +37656,7 @@ var init_dnd_esm = __esm({
36196
37656
  init_css_box_model_esm();
36197
37657
  init_memoize_one_esm();
36198
37658
  init_raf_schd_esm();
37659
+ init_esm2();
36199
37660
  init_extends2();
36200
37661
  isProduction$1 = process.env.NODE_ENV === "production";
36201
37662
  spacesAndTabs = /[ \t]{2,}/g;
@@ -39553,6 +41014,10 @@ var init_dnd_esm = __esm({
39553
41014
  });
39554
41015
  return scroll2 && canScrollDroppable(droppable2, scroll2) ? scroll2 : null;
39555
41016
  };
41017
+ iframeCache = new LRUCache({
41018
+ max: 1,
41019
+ ttl: 1e3
41020
+ });
39556
41021
  createCol = (name) => `((?<${name}>-?((\\d|\\.)+))(,\\s)?)`;
39557
41022
  matrixPattern = new RegExp(`^matrix\\(${createCol("scaleX")}${createCol("skewY")}${createCol("skewX")}${createCol("scaleY")}${createCol("translateX")}${createCol("translateY")}\\)`);
39558
41023
  getMatrix = (transform) => {
@@ -39587,7 +41052,7 @@ var init_dnd_esm = __esm({
39587
41052
  }
39588
41053
  if (!el.parentElement) {
39589
41054
  const refWindow = el.ownerDocument.defaultView;
39590
- if (refWindow && refWindow.self !== refWindow.parent) {
41055
+ if (refWindow && refWindow.self !== refWindow.parent && refWindow.frameElement) {
39591
41056
  const iframe = refWindow.frameElement;
39592
41057
  return findNearestTransform(iframe);
39593
41058
  }
@@ -39709,7 +41174,7 @@ var init_dnd_esm = __esm({
39709
41174
  }) => {
39710
41175
  const el = querySelectorAllIframe(`[data-rfd-draggable-id="${state.critical.draggable.id}"]`)[0];
39711
41176
  const win = (el == null ? void 0 : el.ownerDocument.defaultView) || window;
39712
- const isInIframe = win !== window;
41177
+ const isInIframe = win !== window && win.frameElement;
39713
41178
  if (isInIframe) {
39714
41179
  const iframe = win.frameElement;
39715
41180
  const viewportBox = getBox(iframe);
@@ -40070,6 +41535,10 @@ var init_dnd_esm = __esm({
40070
41535
  }
40071
41536
  return window;
40072
41537
  };
41538
+ dragHandleCache = new LRUCache({
41539
+ max: 5e3,
41540
+ ttl: 1e3
41541
+ });
40073
41542
  StoreContext = import_react5.default.createContext(null);
40074
41543
  getBodyElement = () => {
40075
41544
  const body = document.body;
@@ -40495,7 +41964,7 @@ var init_dnd_esm = __esm({
40495
41964
  return false;
40496
41965
  };
40497
41966
  getClosestScrollable = (el) => {
40498
- var _a, _b;
41967
+ var _a3, _b;
40499
41968
  if (el == null) {
40500
41969
  return null;
40501
41970
  }
@@ -40503,7 +41972,7 @@ var init_dnd_esm = __esm({
40503
41972
  if (isBodyScrollable(el)) {
40504
41973
  return el;
40505
41974
  }
40506
- if ((_a = el.ownerDocument.defaultView) == null ? void 0 : _a.frameElement) {
41975
+ if ((_a3 = el.ownerDocument.defaultView) == null ? void 0 : _a3.frameElement) {
40507
41976
  return (_b = el.ownerDocument.defaultView) == null ? void 0 : _b.frameElement;
40508
41977
  }
40509
41978
  return null;
@@ -40544,7 +42013,8 @@ var init_dnd_esm = __esm({
40544
42013
  client,
40545
42014
  page,
40546
42015
  closest: closest2,
40547
- transform
42016
+ transform,
42017
+ parents
40548
42018
  }) => {
40549
42019
  const frame = (() => {
40550
42020
  if (!closest2) {
@@ -40593,7 +42063,8 @@ var init_dnd_esm = __esm({
40593
42063
  page,
40594
42064
  frame,
40595
42065
  subject,
40596
- transform
42066
+ transform,
42067
+ parents
40597
42068
  };
40598
42069
  return dimension;
40599
42070
  };
@@ -40630,6 +42101,27 @@ var init_dnd_esm = __esm({
40630
42101
  });
40631
42102
  return client;
40632
42103
  };
42104
+ getParents = (ref2) => {
42105
+ var _a3;
42106
+ const contextId = ref2.getAttribute(`${prefix2}-droppable-context-id`);
42107
+ const parentDescriptors = [];
42108
+ if (!contextId)
42109
+ return [];
42110
+ let currentEl = ref2;
42111
+ while (currentEl) {
42112
+ currentEl = (_a3 = currentEl.parentElement) == null ? void 0 : _a3.closest(`[${prefix2}-droppable-context-id="${contextId}"]`);
42113
+ const id = currentEl == null ? void 0 : currentEl.getAttribute(`${prefix2}-droppable-id`);
42114
+ if (id) {
42115
+ parentDescriptors.push({
42116
+ id,
42117
+ mode: "standard",
42118
+ type: "DEFAULT"
42119
+ });
42120
+ }
42121
+ }
42122
+ parentDescriptors.reverse();
42123
+ return parentDescriptors;
42124
+ };
40633
42125
  getDimension = ({
40634
42126
  ref: ref2,
40635
42127
  descriptor,
@@ -40665,6 +42157,7 @@ var init_dnd_esm = __esm({
40665
42157
  shouldClipSubject
40666
42158
  };
40667
42159
  })();
42160
+ const parents = getParents(ref2);
40668
42161
  const dimension = getDroppableDimension({
40669
42162
  descriptor,
40670
42163
  isEnabled: !isDropDisabled,
@@ -40674,7 +42167,8 @@ var init_dnd_esm = __esm({
40674
42167
  client,
40675
42168
  page,
40676
42169
  closest: closest2,
40677
- transform
42170
+ transform,
42171
+ parents
40678
42172
  });
40679
42173
  return dimension;
40680
42174
  };
@@ -41145,6 +42639,1291 @@ var init_dnd_esm = __esm({
41145
42639
  }
41146
42640
  });
41147
42641
 
42642
+ // ../../node_modules/ua-parser-js/src/ua-parser.js
42643
+ var require_ua_parser = __commonJS({
42644
+ "../../node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
42645
+ init_react_import();
42646
+ (function(window2, undefined2) {
42647
+ "use strict";
42648
+ var LIBVERSION = "1.0.37", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE2 = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 500;
42649
+ var AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SHARP = "Sharp", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook", CHROMIUM_OS = "Chromium OS", MAC_OS = "Mac OS";
42650
+ var extend = function(regexes2, extensions) {
42651
+ var mergedRegexes = {};
42652
+ for (var i2 in regexes2) {
42653
+ if (extensions[i2] && extensions[i2].length % 2 === 0) {
42654
+ mergedRegexes[i2] = extensions[i2].concat(regexes2[i2]);
42655
+ } else {
42656
+ mergedRegexes[i2] = regexes2[i2];
42657
+ }
42658
+ }
42659
+ return mergedRegexes;
42660
+ }, enumerize = function(arr) {
42661
+ var enums = {};
42662
+ for (var i2 = 0; i2 < arr.length; i2++) {
42663
+ enums[arr[i2].toUpperCase()] = arr[i2];
42664
+ }
42665
+ return enums;
42666
+ }, has = function(str1, str2) {
42667
+ return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
42668
+ }, lowerize = function(str) {
42669
+ return str.toLowerCase();
42670
+ }, majorize = function(version2) {
42671
+ return typeof version2 === STR_TYPE ? version2.replace(/[^\d\.]/g, EMPTY).split(".")[0] : undefined2;
42672
+ }, trim = function(str, len) {
42673
+ if (typeof str === STR_TYPE) {
42674
+ str = str.replace(/^\s\s*/, EMPTY);
42675
+ return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
42676
+ }
42677
+ };
42678
+ var rgxMapper = function(ua, arrays) {
42679
+ var i2 = 0, j, k, p, q, matches, match;
42680
+ while (i2 < arrays.length && !matches) {
42681
+ var regex = arrays[i2], props = arrays[i2 + 1];
42682
+ j = k = 0;
42683
+ while (j < regex.length && !matches) {
42684
+ if (!regex[j]) {
42685
+ break;
42686
+ }
42687
+ matches = regex[j++].exec(ua);
42688
+ if (!!matches) {
42689
+ for (p = 0; p < props.length; p++) {
42690
+ match = matches[++k];
42691
+ q = props[p];
42692
+ if (typeof q === OBJ_TYPE && q.length > 0) {
42693
+ if (q.length === 2) {
42694
+ if (typeof q[1] == FUNC_TYPE) {
42695
+ this[q[0]] = q[1].call(this, match);
42696
+ } else {
42697
+ this[q[0]] = q[1];
42698
+ }
42699
+ } else if (q.length === 3) {
42700
+ if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
42701
+ this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined2;
42702
+ } else {
42703
+ this[q[0]] = match ? match.replace(q[1], q[2]) : undefined2;
42704
+ }
42705
+ } else if (q.length === 4) {
42706
+ this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined2;
42707
+ }
42708
+ } else {
42709
+ this[q] = match ? match : undefined2;
42710
+ }
42711
+ }
42712
+ }
42713
+ }
42714
+ i2 += 2;
42715
+ }
42716
+ }, strMapper = function(str, map) {
42717
+ for (var i2 in map) {
42718
+ if (typeof map[i2] === OBJ_TYPE && map[i2].length > 0) {
42719
+ for (var j = 0; j < map[i2].length; j++) {
42720
+ if (has(map[i2][j], str)) {
42721
+ return i2 === UNKNOWN ? undefined2 : i2;
42722
+ }
42723
+ }
42724
+ } else if (has(map[i2], str)) {
42725
+ return i2 === UNKNOWN ? undefined2 : i2;
42726
+ }
42727
+ }
42728
+ return str;
42729
+ };
42730
+ var oldSafariMap = {
42731
+ "1.0": "/8",
42732
+ "1.2": "/1",
42733
+ "1.3": "/3",
42734
+ "2.0": "/412",
42735
+ "2.0.2": "/416",
42736
+ "2.0.3": "/417",
42737
+ "2.0.4": "/419",
42738
+ "?": "/"
42739
+ }, windowsVersionMap = {
42740
+ "ME": "4.90",
42741
+ "NT 3.11": "NT3.51",
42742
+ "NT 4.0": "NT4.0",
42743
+ "2000": "NT 5.0",
42744
+ "XP": ["NT 5.1", "NT 5.2"],
42745
+ "Vista": "NT 6.0",
42746
+ "7": "NT 6.1",
42747
+ "8": "NT 6.2",
42748
+ "8.1": "NT 6.3",
42749
+ "10": ["NT 6.4", "NT 10.0"],
42750
+ "RT": "ARM"
42751
+ };
42752
+ var regexes = {
42753
+ browser: [
42754
+ [
42755
+ /\b(?:crmo|crios)\/([\w\.]+)/i
42756
+ // Chrome for Android/iOS
42757
+ ],
42758
+ [VERSION, [NAME, "Chrome"]],
42759
+ [
42760
+ /edg(?:e|ios|a)?\/([\w\.]+)/i
42761
+ // Microsoft Edge
42762
+ ],
42763
+ [VERSION, [NAME, "Edge"]],
42764
+ [
42765
+ // Presto based
42766
+ /(opera mini)\/([-\w\.]+)/i,
42767
+ // Opera Mini
42768
+ /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
42769
+ // Opera Mobi/Tablet
42770
+ /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
42771
+ // Opera
42772
+ ],
42773
+ [NAME, VERSION],
42774
+ [
42775
+ /opios[\/ ]+([\w\.]+)/i
42776
+ // Opera mini on iphone >= 8.0
42777
+ ],
42778
+ [VERSION, [NAME, OPERA + " Mini"]],
42779
+ [
42780
+ /\bopr\/([\w\.]+)/i
42781
+ // Opera Webkit
42782
+ ],
42783
+ [VERSION, [NAME, OPERA]],
42784
+ [
42785
+ // Mixed
42786
+ /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
42787
+ // Baidu
42788
+ ],
42789
+ [VERSION, [NAME, "Baidu"]],
42790
+ [
42791
+ /(kindle)\/([\w\.]+)/i,
42792
+ // Kindle
42793
+ /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
42794
+ // Lunascape/Maxthon/Netfront/Jasmine/Blazer
42795
+ // Trident based
42796
+ /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
42797
+ // Avant/IEMobile/SlimBrowser
42798
+ /(?:ms|\()(ie) ([\w\.]+)/i,
42799
+ // Internet Explorer
42800
+ // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
42801
+ /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
42802
+ // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
42803
+ /(heytap|ovi)browser\/([\d\.]+)/i,
42804
+ // Heytap/Ovi
42805
+ /(weibo)__([\d\.]+)/i
42806
+ // Weibo
42807
+ ],
42808
+ [NAME, VERSION],
42809
+ [
42810
+ /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
42811
+ // UCBrowser
42812
+ ],
42813
+ [VERSION, [NAME, "UC" + BROWSER]],
42814
+ [
42815
+ /microm.+\bqbcore\/([\w\.]+)/i,
42816
+ // WeChat Desktop for Windows Built-in Browser
42817
+ /\bqbcore\/([\w\.]+).+microm/i,
42818
+ /micromessenger\/([\w\.]+)/i
42819
+ // WeChat
42820
+ ],
42821
+ [VERSION, [NAME, "WeChat"]],
42822
+ [
42823
+ /konqueror\/([\w\.]+)/i
42824
+ // Konqueror
42825
+ ],
42826
+ [VERSION, [NAME, "Konqueror"]],
42827
+ [
42828
+ /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
42829
+ // IE11
42830
+ ],
42831
+ [VERSION, [NAME, "IE"]],
42832
+ [
42833
+ /ya(?:search)?browser\/([\w\.]+)/i
42834
+ // Yandex
42835
+ ],
42836
+ [VERSION, [NAME, "Yandex"]],
42837
+ [
42838
+ /slbrowser\/([\w\.]+)/i
42839
+ // Smart Lenovo Browser
42840
+ ],
42841
+ [VERSION, [NAME, "Smart Lenovo " + BROWSER]],
42842
+ [
42843
+ /(avast|avg)\/([\w\.]+)/i
42844
+ // Avast/AVG Secure Browser
42845
+ ],
42846
+ [[NAME, /(.+)/, "$1 Secure " + BROWSER], VERSION],
42847
+ [
42848
+ /\bfocus\/([\w\.]+)/i
42849
+ // Firefox Focus
42850
+ ],
42851
+ [VERSION, [NAME, FIREFOX + " Focus"]],
42852
+ [
42853
+ /\bopt\/([\w\.]+)/i
42854
+ // Opera Touch
42855
+ ],
42856
+ [VERSION, [NAME, OPERA + " Touch"]],
42857
+ [
42858
+ /coc_coc\w+\/([\w\.]+)/i
42859
+ // Coc Coc Browser
42860
+ ],
42861
+ [VERSION, [NAME, "Coc Coc"]],
42862
+ [
42863
+ /dolfin\/([\w\.]+)/i
42864
+ // Dolphin
42865
+ ],
42866
+ [VERSION, [NAME, "Dolphin"]],
42867
+ [
42868
+ /coast\/([\w\.]+)/i
42869
+ // Opera Coast
42870
+ ],
42871
+ [VERSION, [NAME, OPERA + " Coast"]],
42872
+ [
42873
+ /miuibrowser\/([\w\.]+)/i
42874
+ // MIUI Browser
42875
+ ],
42876
+ [VERSION, [NAME, "MIUI " + BROWSER]],
42877
+ [
42878
+ /fxios\/([-\w\.]+)/i
42879
+ // Firefox for iOS
42880
+ ],
42881
+ [VERSION, [NAME, FIREFOX]],
42882
+ [
42883
+ /\bqihu|(qi?ho?o?|360)browser/i
42884
+ // 360
42885
+ ],
42886
+ [[NAME, "360 " + BROWSER]],
42887
+ [
42888
+ /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
42889
+ ],
42890
+ [[NAME, /(.+)/, "$1 " + BROWSER], VERSION],
42891
+ [
42892
+ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
42893
+ /samsungbrowser\/([\w\.]+)/i
42894
+ // Samsung Internet
42895
+ ],
42896
+ [VERSION, [NAME, SAMSUNG + " Internet"]],
42897
+ [
42898
+ /(comodo_dragon)\/([\w\.]+)/i
42899
+ // Comodo Dragon
42900
+ ],
42901
+ [[NAME, /_/g, " "], VERSION],
42902
+ [
42903
+ /metasr[\/ ]?([\d\.]+)/i
42904
+ // Sogou Explorer
42905
+ ],
42906
+ [VERSION, [NAME, "Sogou Explorer"]],
42907
+ [
42908
+ /(sogou)mo\w+\/([\d\.]+)/i
42909
+ // Sogou Mobile
42910
+ ],
42911
+ [[NAME, "Sogou Mobile"], VERSION],
42912
+ [
42913
+ /(electron)\/([\w\.]+) safari/i,
42914
+ // Electron-based App
42915
+ /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
42916
+ // Tesla
42917
+ /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
42918
+ // QQBrowser/2345 Browser
42919
+ ],
42920
+ [NAME, VERSION],
42921
+ [
42922
+ /(lbbrowser)/i,
42923
+ // LieBao Browser
42924
+ /\[(linkedin)app\]/i
42925
+ // LinkedIn App for iOS & Android
42926
+ ],
42927
+ [NAME],
42928
+ [
42929
+ // WebView
42930
+ /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
42931
+ // Facebook App for iOS & Android
42932
+ ],
42933
+ [[NAME, FACEBOOK], VERSION],
42934
+ [
42935
+ /(Klarna)\/([\w\.]+)/i,
42936
+ // Klarna Shopping Browser for iOS & Android
42937
+ /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
42938
+ // Kakao App
42939
+ /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
42940
+ // Naver InApp
42941
+ /safari (line)\/([\w\.]+)/i,
42942
+ // Line App for iOS
42943
+ /\b(line)\/([\w\.]+)\/iab/i,
42944
+ // Line App for Android
42945
+ /(alipay)client\/([\w\.]+)/i,
42946
+ // Alipay
42947
+ /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
42948
+ // Chromium/Instagram/Snapchat
42949
+ ],
42950
+ [NAME, VERSION],
42951
+ [
42952
+ /\bgsa\/([\w\.]+) .*safari\//i
42953
+ // Google Search Appliance on iOS
42954
+ ],
42955
+ [VERSION, [NAME, "GSA"]],
42956
+ [
42957
+ /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
42958
+ // TikTok
42959
+ ],
42960
+ [VERSION, [NAME, "TikTok"]],
42961
+ [
42962
+ /headlesschrome(?:\/([\w\.]+)| )/i
42963
+ // Chrome Headless
42964
+ ],
42965
+ [VERSION, [NAME, CHROME + " Headless"]],
42966
+ [
42967
+ / wv\).+(chrome)\/([\w\.]+)/i
42968
+ // Chrome WebView
42969
+ ],
42970
+ [[NAME, CHROME + " WebView"], VERSION],
42971
+ [
42972
+ /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
42973
+ // Android Browser
42974
+ ],
42975
+ [VERSION, [NAME, "Android " + BROWSER]],
42976
+ [
42977
+ /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
42978
+ // Chrome/OmniWeb/Arora/Tizen/Nokia
42979
+ ],
42980
+ [NAME, VERSION],
42981
+ [
42982
+ /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
42983
+ // Mobile Safari
42984
+ ],
42985
+ [VERSION, [NAME, "Mobile Safari"]],
42986
+ [
42987
+ /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
42988
+ // Safari & Safari Mobile
42989
+ ],
42990
+ [VERSION, NAME],
42991
+ [
42992
+ /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
42993
+ // Safari < 3.0
42994
+ ],
42995
+ [NAME, [VERSION, strMapper, oldSafariMap]],
42996
+ [
42997
+ /(webkit|khtml)\/([\w\.]+)/i
42998
+ ],
42999
+ [NAME, VERSION],
43000
+ [
43001
+ // Gecko based
43002
+ /(navigator|netscape\d?)\/([-\w\.]+)/i
43003
+ // Netscape
43004
+ ],
43005
+ [[NAME, "Netscape"], VERSION],
43006
+ [
43007
+ /mobile vr; rv:([\w\.]+)\).+firefox/i
43008
+ // Firefox Reality
43009
+ ],
43010
+ [VERSION, [NAME, FIREFOX + " Reality"]],
43011
+ [
43012
+ /ekiohf.+(flow)\/([\w\.]+)/i,
43013
+ // Flow
43014
+ /(swiftfox)/i,
43015
+ // Swiftfox
43016
+ /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
43017
+ // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
43018
+ /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
43019
+ // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
43020
+ /(firefox)\/([\w\.]+)/i,
43021
+ // Other Firefox-based
43022
+ /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
43023
+ // Mozilla
43024
+ // Other
43025
+ /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
43026
+ // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
43027
+ /(links) \(([\w\.]+)/i,
43028
+ // Links
43029
+ /panasonic;(viera)/i
43030
+ // Panasonic Viera
43031
+ ],
43032
+ [NAME, VERSION],
43033
+ [
43034
+ /(cobalt)\/([\w\.]+)/i
43035
+ // Cobalt
43036
+ ],
43037
+ [NAME, [VERSION, /master.|lts./, ""]]
43038
+ ],
43039
+ cpu: [
43040
+ [
43041
+ /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i
43042
+ // AMD64 (x64)
43043
+ ],
43044
+ [[ARCHITECTURE, "amd64"]],
43045
+ [
43046
+ /(ia32(?=;))/i
43047
+ // IA32 (quicktime)
43048
+ ],
43049
+ [[ARCHITECTURE, lowerize]],
43050
+ [
43051
+ /((?:i[346]|x)86)[;\)]/i
43052
+ // IA32 (x86)
43053
+ ],
43054
+ [[ARCHITECTURE, "ia32"]],
43055
+ [
43056
+ /\b(aarch64|arm(v?8e?l?|_?64))\b/i
43057
+ // ARM64
43058
+ ],
43059
+ [[ARCHITECTURE, "arm64"]],
43060
+ [
43061
+ /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
43062
+ // ARMHF
43063
+ ],
43064
+ [[ARCHITECTURE, "armhf"]],
43065
+ [
43066
+ // PocketPC mistakenly identified as PowerPC
43067
+ /windows (ce|mobile); ppc;/i
43068
+ ],
43069
+ [[ARCHITECTURE, "arm"]],
43070
+ [
43071
+ /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
43072
+ // PowerPC
43073
+ ],
43074
+ [[ARCHITECTURE, /ower/, EMPTY, lowerize]],
43075
+ [
43076
+ /(sun4\w)[;\)]/i
43077
+ // SPARC
43078
+ ],
43079
+ [[ARCHITECTURE, "sparc"]],
43080
+ [
43081
+ /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
43082
+ // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
43083
+ ],
43084
+ [[ARCHITECTURE, lowerize]]
43085
+ ],
43086
+ device: [
43087
+ [
43088
+ //////////////////////////
43089
+ // MOBILES & TABLETS
43090
+ /////////////////////////
43091
+ // Samsung
43092
+ /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
43093
+ ],
43094
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, TABLET]],
43095
+ [
43096
+ /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
43097
+ /samsung[- ]([-\w]+)/i,
43098
+ /sec-(sgh\w+)/i
43099
+ ],
43100
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, MOBILE]],
43101
+ [
43102
+ // Apple
43103
+ /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
43104
+ // iPod/iPhone
43105
+ ],
43106
+ [MODEL, [VENDOR, APPLE], [TYPE2, MOBILE]],
43107
+ [
43108
+ /\((ipad);[-\w\),; ]+apple/i,
43109
+ // iPad
43110
+ /applecoremedia\/[\w\.]+ \((ipad)/i,
43111
+ /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
43112
+ ],
43113
+ [MODEL, [VENDOR, APPLE], [TYPE2, TABLET]],
43114
+ [
43115
+ /(macintosh);/i
43116
+ ],
43117
+ [MODEL, [VENDOR, APPLE]],
43118
+ [
43119
+ // Sharp
43120
+ /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
43121
+ ],
43122
+ [MODEL, [VENDOR, SHARP], [TYPE2, MOBILE]],
43123
+ [
43124
+ // Huawei
43125
+ /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
43126
+ ],
43127
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, TABLET]],
43128
+ [
43129
+ /(?:huawei|honor)([-\w ]+)[;\)]/i,
43130
+ /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
43131
+ ],
43132
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, MOBILE]],
43133
+ [
43134
+ // Xiaomi
43135
+ /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
43136
+ // Xiaomi POCO
43137
+ /\b; (\w+) build\/hm\1/i,
43138
+ // Xiaomi Hongmi 'numeric' models
43139
+ /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
43140
+ // Xiaomi Hongmi
43141
+ /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
43142
+ // Xiaomi Redmi
43143
+ /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
43144
+ // Xiaomi Redmi 'numeric' models
43145
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
43146
+ // Xiaomi Mi
43147
+ ],
43148
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, MOBILE]],
43149
+ [
43150
+ /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
43151
+ // Redmi Pad
43152
+ /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
43153
+ // Mi Pad tablets
43154
+ ],
43155
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, TABLET]],
43156
+ [
43157
+ // OPPO
43158
+ /; (\w+) bui.+ oppo/i,
43159
+ /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
43160
+ ],
43161
+ [MODEL, [VENDOR, "OPPO"], [TYPE2, MOBILE]],
43162
+ [
43163
+ // Vivo
43164
+ /vivo (\w+)(?: bui|\))/i,
43165
+ /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
43166
+ ],
43167
+ [MODEL, [VENDOR, "Vivo"], [TYPE2, MOBILE]],
43168
+ [
43169
+ // Realme
43170
+ /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
43171
+ ],
43172
+ [MODEL, [VENDOR, "Realme"], [TYPE2, MOBILE]],
43173
+ [
43174
+ // Motorola
43175
+ /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
43176
+ /\bmot(?:orola)?[- ](\w*)/i,
43177
+ /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
43178
+ ],
43179
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, MOBILE]],
43180
+ [
43181
+ /\b(mz60\d|xoom[2 ]{0,2}) build\//i
43182
+ ],
43183
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, TABLET]],
43184
+ [
43185
+ // LG
43186
+ /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
43187
+ ],
43188
+ [MODEL, [VENDOR, LG], [TYPE2, TABLET]],
43189
+ [
43190
+ /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
43191
+ /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
43192
+ /\blg-?([\d\w]+) bui/i
43193
+ ],
43194
+ [MODEL, [VENDOR, LG], [TYPE2, MOBILE]],
43195
+ [
43196
+ // Lenovo
43197
+ /(ideatab[-\w ]+)/i,
43198
+ /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
43199
+ ],
43200
+ [MODEL, [VENDOR, "Lenovo"], [TYPE2, TABLET]],
43201
+ [
43202
+ // Nokia
43203
+ /(?:maemo|nokia).*(n900|lumia \d+)/i,
43204
+ /nokia[-_ ]?([-\w\.]*)/i
43205
+ ],
43206
+ [[MODEL, /_/g, " "], [VENDOR, "Nokia"], [TYPE2, MOBILE]],
43207
+ [
43208
+ // Google
43209
+ /(pixel c)\b/i
43210
+ // Google Pixel C
43211
+ ],
43212
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, TABLET]],
43213
+ [
43214
+ /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
43215
+ // Google Pixel
43216
+ ],
43217
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, MOBILE]],
43218
+ [
43219
+ // Sony
43220
+ /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
43221
+ ],
43222
+ [MODEL, [VENDOR, SONY], [TYPE2, MOBILE]],
43223
+ [
43224
+ /sony tablet [ps]/i,
43225
+ /\b(?:sony)?sgp\w+(?: bui|\))/i
43226
+ ],
43227
+ [[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE2, TABLET]],
43228
+ [
43229
+ // OnePlus
43230
+ / (kb2005|in20[12]5|be20[12][59])\b/i,
43231
+ /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
43232
+ ],
43233
+ [MODEL, [VENDOR, "OnePlus"], [TYPE2, MOBILE]],
43234
+ [
43235
+ // Amazon
43236
+ /(alexa)webm/i,
43237
+ /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
43238
+ // Kindle Fire without Silk / Echo Show
43239
+ /(kf[a-z]+)( bui|\)).+silk\//i
43240
+ // Kindle Fire HD
43241
+ ],
43242
+ [MODEL, [VENDOR, AMAZON], [TYPE2, TABLET]],
43243
+ [
43244
+ /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
43245
+ // Fire Phone
43246
+ ],
43247
+ [[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE2, MOBILE]],
43248
+ [
43249
+ // BlackBerry
43250
+ /(playbook);[-\w\),; ]+(rim)/i
43251
+ // BlackBerry PlayBook
43252
+ ],
43253
+ [MODEL, VENDOR, [TYPE2, TABLET]],
43254
+ [
43255
+ /\b((?:bb[a-f]|st[hv])100-\d)/i,
43256
+ /\(bb10; (\w+)/i
43257
+ // BlackBerry 10
43258
+ ],
43259
+ [MODEL, [VENDOR, BLACKBERRY], [TYPE2, MOBILE]],
43260
+ [
43261
+ // Asus
43262
+ /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
43263
+ ],
43264
+ [MODEL, [VENDOR, ASUS], [TYPE2, TABLET]],
43265
+ [
43266
+ / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
43267
+ ],
43268
+ [MODEL, [VENDOR, ASUS], [TYPE2, MOBILE]],
43269
+ [
43270
+ // HTC
43271
+ /(nexus 9)/i
43272
+ // HTC Nexus 9
43273
+ ],
43274
+ [MODEL, [VENDOR, "HTC"], [TYPE2, TABLET]],
43275
+ [
43276
+ /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
43277
+ // HTC
43278
+ // ZTE
43279
+ /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
43280
+ /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
43281
+ // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
43282
+ ],
43283
+ [VENDOR, [MODEL, /_/g, " "], [TYPE2, MOBILE]],
43284
+ [
43285
+ // Acer
43286
+ /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
43287
+ ],
43288
+ [MODEL, [VENDOR, "Acer"], [TYPE2, TABLET]],
43289
+ [
43290
+ // Meizu
43291
+ /droid.+; (m[1-5] note) bui/i,
43292
+ /\bmz-([-\w]{2,})/i
43293
+ ],
43294
+ [MODEL, [VENDOR, "Meizu"], [TYPE2, MOBILE]],
43295
+ [
43296
+ // Ulefone
43297
+ /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
43298
+ ],
43299
+ [MODEL, [VENDOR, "Ulefone"], [TYPE2, MOBILE]],
43300
+ [
43301
+ // MIXED
43302
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
43303
+ // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
43304
+ /(hp) ([\w ]+\w)/i,
43305
+ // HP iPAQ
43306
+ /(asus)-?(\w+)/i,
43307
+ // Asus
43308
+ /(microsoft); (lumia[\w ]+)/i,
43309
+ // Microsoft Lumia
43310
+ /(lenovo)[-_ ]?([-\w]+)/i,
43311
+ // Lenovo
43312
+ /(jolla)/i,
43313
+ // Jolla
43314
+ /(oppo) ?([\w ]+) bui/i
43315
+ // OPPO
43316
+ ],
43317
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43318
+ [
43319
+ /(kobo)\s(ereader|touch)/i,
43320
+ // Kobo
43321
+ /(archos) (gamepad2?)/i,
43322
+ // Archos
43323
+ /(hp).+(touchpad(?!.+tablet)|tablet)/i,
43324
+ // HP TouchPad
43325
+ /(kindle)\/([\w\.]+)/i,
43326
+ // Kindle
43327
+ /(nook)[\w ]+build\/(\w+)/i,
43328
+ // Nook
43329
+ /(dell) (strea[kpr\d ]*[\dko])/i,
43330
+ // Dell Streak
43331
+ /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
43332
+ // Le Pan Tablets
43333
+ /(trinity)[- ]*(t\d{3}) bui/i,
43334
+ // Trinity Tablets
43335
+ /(gigaset)[- ]+(q\w{1,9}) bui/i,
43336
+ // Gigaset Tablets
43337
+ /(vodafone) ([\w ]+)(?:\)| bui)/i
43338
+ // Vodafone
43339
+ ],
43340
+ [VENDOR, MODEL, [TYPE2, TABLET]],
43341
+ [
43342
+ /(surface duo)/i
43343
+ // Surface Duo
43344
+ ],
43345
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, TABLET]],
43346
+ [
43347
+ /droid [\d\.]+; (fp\du?)(?: b|\))/i
43348
+ // Fairphone
43349
+ ],
43350
+ [MODEL, [VENDOR, "Fairphone"], [TYPE2, MOBILE]],
43351
+ [
43352
+ /(u304aa)/i
43353
+ // AT&T
43354
+ ],
43355
+ [MODEL, [VENDOR, "AT&T"], [TYPE2, MOBILE]],
43356
+ [
43357
+ /\bsie-(\w*)/i
43358
+ // Siemens
43359
+ ],
43360
+ [MODEL, [VENDOR, "Siemens"], [TYPE2, MOBILE]],
43361
+ [
43362
+ /\b(rct\w+) b/i
43363
+ // RCA Tablets
43364
+ ],
43365
+ [MODEL, [VENDOR, "RCA"], [TYPE2, TABLET]],
43366
+ [
43367
+ /\b(venue[\d ]{2,7}) b/i
43368
+ // Dell Venue Tablets
43369
+ ],
43370
+ [MODEL, [VENDOR, "Dell"], [TYPE2, TABLET]],
43371
+ [
43372
+ /\b(q(?:mv|ta)\w+) b/i
43373
+ // Verizon Tablet
43374
+ ],
43375
+ [MODEL, [VENDOR, "Verizon"], [TYPE2, TABLET]],
43376
+ [
43377
+ /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
43378
+ // Barnes & Noble Tablet
43379
+ ],
43380
+ [MODEL, [VENDOR, "Barnes & Noble"], [TYPE2, TABLET]],
43381
+ [
43382
+ /\b(tm\d{3}\w+) b/i
43383
+ ],
43384
+ [MODEL, [VENDOR, "NuVision"], [TYPE2, TABLET]],
43385
+ [
43386
+ /\b(k88) b/i
43387
+ // ZTE K Series Tablet
43388
+ ],
43389
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, TABLET]],
43390
+ [
43391
+ /\b(nx\d{3}j) b/i
43392
+ // ZTE Nubia
43393
+ ],
43394
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, MOBILE]],
43395
+ [
43396
+ /\b(gen\d{3}) b.+49h/i
43397
+ // Swiss GEN Mobile
43398
+ ],
43399
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, MOBILE]],
43400
+ [
43401
+ /\b(zur\d{3}) b/i
43402
+ // Swiss ZUR Tablet
43403
+ ],
43404
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, TABLET]],
43405
+ [
43406
+ /\b((zeki)?tb.*\b) b/i
43407
+ // Zeki Tablets
43408
+ ],
43409
+ [MODEL, [VENDOR, "Zeki"], [TYPE2, TABLET]],
43410
+ [
43411
+ /\b([yr]\d{2}) b/i,
43412
+ /\b(dragon[- ]+touch |dt)(\w{5}) b/i
43413
+ // Dragon Touch Tablet
43414
+ ],
43415
+ [[VENDOR, "Dragon Touch"], MODEL, [TYPE2, TABLET]],
43416
+ [
43417
+ /\b(ns-?\w{0,9}) b/i
43418
+ // Insignia Tablets
43419
+ ],
43420
+ [MODEL, [VENDOR, "Insignia"], [TYPE2, TABLET]],
43421
+ [
43422
+ /\b((nxa|next)-?\w{0,9}) b/i
43423
+ // NextBook Tablets
43424
+ ],
43425
+ [MODEL, [VENDOR, "NextBook"], [TYPE2, TABLET]],
43426
+ [
43427
+ /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
43428
+ // Voice Xtreme Phones
43429
+ ],
43430
+ [[VENDOR, "Voice"], MODEL, [TYPE2, MOBILE]],
43431
+ [
43432
+ /\b(lvtel\-)?(v1[12]) b/i
43433
+ // LvTel Phones
43434
+ ],
43435
+ [[VENDOR, "LvTel"], MODEL, [TYPE2, MOBILE]],
43436
+ [
43437
+ /\b(ph-1) /i
43438
+ // Essential PH-1
43439
+ ],
43440
+ [MODEL, [VENDOR, "Essential"], [TYPE2, MOBILE]],
43441
+ [
43442
+ /\b(v(100md|700na|7011|917g).*\b) b/i
43443
+ // Envizen Tablets
43444
+ ],
43445
+ [MODEL, [VENDOR, "Envizen"], [TYPE2, TABLET]],
43446
+ [
43447
+ /\b(trio[-\w\. ]+) b/i
43448
+ // MachSpeed Tablets
43449
+ ],
43450
+ [MODEL, [VENDOR, "MachSpeed"], [TYPE2, TABLET]],
43451
+ [
43452
+ /\btu_(1491) b/i
43453
+ // Rotor Tablets
43454
+ ],
43455
+ [MODEL, [VENDOR, "Rotor"], [TYPE2, TABLET]],
43456
+ [
43457
+ /(shield[\w ]+) b/i
43458
+ // Nvidia Shield Tablets
43459
+ ],
43460
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, TABLET]],
43461
+ [
43462
+ /(sprint) (\w+)/i
43463
+ // Sprint Phones
43464
+ ],
43465
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43466
+ [
43467
+ /(kin\.[onetw]{3})/i
43468
+ // Microsoft Kin
43469
+ ],
43470
+ [[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE2, MOBILE]],
43471
+ [
43472
+ /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
43473
+ // Zebra
43474
+ ],
43475
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, TABLET]],
43476
+ [
43477
+ /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
43478
+ ],
43479
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, MOBILE]],
43480
+ [
43481
+ ///////////////////
43482
+ // SMARTTVS
43483
+ ///////////////////
43484
+ /smart-tv.+(samsung)/i
43485
+ // Samsung
43486
+ ],
43487
+ [VENDOR, [TYPE2, SMARTTV]],
43488
+ [
43489
+ /hbbtv.+maple;(\d+)/i
43490
+ ],
43491
+ [[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE2, SMARTTV]],
43492
+ [
43493
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
43494
+ // LG SmartTV
43495
+ ],
43496
+ [[VENDOR, LG], [TYPE2, SMARTTV]],
43497
+ [
43498
+ /(apple) ?tv/i
43499
+ // Apple TV
43500
+ ],
43501
+ [VENDOR, [MODEL, APPLE + " TV"], [TYPE2, SMARTTV]],
43502
+ [
43503
+ /crkey/i
43504
+ // Google Chromecast
43505
+ ],
43506
+ [[MODEL, CHROME + "cast"], [VENDOR, GOOGLE], [TYPE2, SMARTTV]],
43507
+ [
43508
+ /droid.+aft(\w+)( bui|\))/i
43509
+ // Fire TV
43510
+ ],
43511
+ [MODEL, [VENDOR, AMAZON], [TYPE2, SMARTTV]],
43512
+ [
43513
+ /\(dtv[\);].+(aquos)/i,
43514
+ /(aquos-tv[\w ]+)\)/i
43515
+ // Sharp
43516
+ ],
43517
+ [MODEL, [VENDOR, SHARP], [TYPE2, SMARTTV]],
43518
+ [
43519
+ /(bravia[\w ]+)( bui|\))/i
43520
+ // Sony
43521
+ ],
43522
+ [MODEL, [VENDOR, SONY], [TYPE2, SMARTTV]],
43523
+ [
43524
+ /(mitv-\w{5}) bui/i
43525
+ // Xiaomi
43526
+ ],
43527
+ [MODEL, [VENDOR, XIAOMI], [TYPE2, SMARTTV]],
43528
+ [
43529
+ /Hbbtv.*(technisat) (.*);/i
43530
+ // TechniSAT
43531
+ ],
43532
+ [VENDOR, MODEL, [TYPE2, SMARTTV]],
43533
+ [
43534
+ /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
43535
+ // Roku
43536
+ /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
43537
+ // HbbTV devices
43538
+ ],
43539
+ [[VENDOR, trim], [MODEL, trim], [TYPE2, SMARTTV]],
43540
+ [
43541
+ /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
43542
+ // SmartTV from Unidentified Vendors
43543
+ ],
43544
+ [[TYPE2, SMARTTV]],
43545
+ [
43546
+ ///////////////////
43547
+ // CONSOLES
43548
+ ///////////////////
43549
+ /(ouya)/i,
43550
+ // Ouya
43551
+ /(nintendo) ([wids3utch]+)/i
43552
+ // Nintendo
43553
+ ],
43554
+ [VENDOR, MODEL, [TYPE2, CONSOLE]],
43555
+ [
43556
+ /droid.+; (shield) bui/i
43557
+ // Nvidia
43558
+ ],
43559
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, CONSOLE]],
43560
+ [
43561
+ /(playstation [345portablevi]+)/i
43562
+ // Playstation
43563
+ ],
43564
+ [MODEL, [VENDOR, SONY], [TYPE2, CONSOLE]],
43565
+ [
43566
+ /\b(xbox(?: one)?(?!; xbox))[\); ]/i
43567
+ // Microsoft Xbox
43568
+ ],
43569
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, CONSOLE]],
43570
+ [
43571
+ ///////////////////
43572
+ // WEARABLES
43573
+ ///////////////////
43574
+ /((pebble))app/i
43575
+ // Pebble
43576
+ ],
43577
+ [VENDOR, MODEL, [TYPE2, WEARABLE]],
43578
+ [
43579
+ /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
43580
+ // Apple Watch
43581
+ ],
43582
+ [MODEL, [VENDOR, APPLE], [TYPE2, WEARABLE]],
43583
+ [
43584
+ /droid.+; (glass) \d/i
43585
+ // Google Glass
43586
+ ],
43587
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, WEARABLE]],
43588
+ [
43589
+ /droid.+; (wt63?0{2,3})\)/i
43590
+ ],
43591
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, WEARABLE]],
43592
+ [
43593
+ /(quest( 2| pro)?)/i
43594
+ // Oculus Quest
43595
+ ],
43596
+ [MODEL, [VENDOR, FACEBOOK], [TYPE2, WEARABLE]],
43597
+ [
43598
+ ///////////////////
43599
+ // EMBEDDED
43600
+ ///////////////////
43601
+ /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
43602
+ // Tesla
43603
+ ],
43604
+ [VENDOR, [TYPE2, EMBEDDED]],
43605
+ [
43606
+ /(aeobc)\b/i
43607
+ // Echo Dot
43608
+ ],
43609
+ [MODEL, [VENDOR, AMAZON], [TYPE2, EMBEDDED]],
43610
+ [
43611
+ ////////////////////
43612
+ // MIXED (GENERIC)
43613
+ ///////////////////
43614
+ /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
43615
+ // Android Phones from Unidentified Vendors
43616
+ ],
43617
+ [MODEL, [TYPE2, MOBILE]],
43618
+ [
43619
+ /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
43620
+ // Android Tablets from Unidentified Vendors
43621
+ ],
43622
+ [MODEL, [TYPE2, TABLET]],
43623
+ [
43624
+ /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
43625
+ // Unidentifiable Tablet
43626
+ ],
43627
+ [[TYPE2, TABLET]],
43628
+ [
43629
+ /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
43630
+ // Unidentifiable Mobile
43631
+ ],
43632
+ [[TYPE2, MOBILE]],
43633
+ [
43634
+ /(android[-\w\. ]{0,9});.+buil/i
43635
+ // Generic Android Device
43636
+ ],
43637
+ [MODEL, [VENDOR, "Generic"]]
43638
+ ],
43639
+ engine: [
43640
+ [
43641
+ /windows.+ edge\/([\w\.]+)/i
43642
+ // EdgeHTML
43643
+ ],
43644
+ [VERSION, [NAME, EDGE + "HTML"]],
43645
+ [
43646
+ /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
43647
+ // Blink
43648
+ ],
43649
+ [VERSION, [NAME, "Blink"]],
43650
+ [
43651
+ /(presto)\/([\w\.]+)/i,
43652
+ // Presto
43653
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
43654
+ // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
43655
+ /ekioh(flow)\/([\w\.]+)/i,
43656
+ // Flow
43657
+ /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
43658
+ // KHTML/Tasman/Links
43659
+ /(icab)[\/ ]([23]\.[\d\.]+)/i,
43660
+ // iCab
43661
+ /\b(libweb)/i
43662
+ ],
43663
+ [NAME, VERSION],
43664
+ [
43665
+ /rv\:([\w\.]{1,9})\b.+(gecko)/i
43666
+ // Gecko
43667
+ ],
43668
+ [VERSION, NAME]
43669
+ ],
43670
+ os: [
43671
+ [
43672
+ // Windows
43673
+ /microsoft (windows) (vista|xp)/i
43674
+ // Windows (iTunes)
43675
+ ],
43676
+ [NAME, VERSION],
43677
+ [
43678
+ /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
43679
+ // Windows Phone
43680
+ ],
43681
+ [NAME, [VERSION, strMapper, windowsVersionMap]],
43682
+ [
43683
+ /windows nt 6\.2; (arm)/i,
43684
+ // Windows RT
43685
+ /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
43686
+ /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
43687
+ ],
43688
+ [[VERSION, strMapper, windowsVersionMap], [NAME, "Windows"]],
43689
+ [
43690
+ // iOS/macOS
43691
+ /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
43692
+ // iOS
43693
+ /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
43694
+ /cfnetwork\/.+darwin/i
43695
+ ],
43696
+ [[VERSION, /_/g, "."], [NAME, "iOS"]],
43697
+ [
43698
+ /(mac os x) ?([\w\. ]*)/i,
43699
+ /(macintosh|mac_powerpc\b)(?!.+haiku)/i
43700
+ // Mac OS
43701
+ ],
43702
+ [[NAME, MAC_OS], [VERSION, /_/g, "."]],
43703
+ [
43704
+ // Mobile OSes
43705
+ /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
43706
+ // Android-x86/HarmonyOS
43707
+ ],
43708
+ [VERSION, NAME],
43709
+ [
43710
+ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
43711
+ /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
43712
+ /(blackberry)\w*\/([\w\.]*)/i,
43713
+ // Blackberry
43714
+ /(tizen|kaios)[\/ ]([\w\.]+)/i,
43715
+ // Tizen/KaiOS
43716
+ /\((series40);/i
43717
+ // Series 40
43718
+ ],
43719
+ [NAME, VERSION],
43720
+ [
43721
+ /\(bb(10);/i
43722
+ // BlackBerry 10
43723
+ ],
43724
+ [VERSION, [NAME, BLACKBERRY]],
43725
+ [
43726
+ /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
43727
+ // Symbian
43728
+ ],
43729
+ [VERSION, [NAME, "Symbian"]],
43730
+ [
43731
+ /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
43732
+ // Firefox OS
43733
+ ],
43734
+ [VERSION, [NAME, FIREFOX + " OS"]],
43735
+ [
43736
+ /web0s;.+rt(tv)/i,
43737
+ /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
43738
+ // WebOS
43739
+ ],
43740
+ [VERSION, [NAME, "webOS"]],
43741
+ [
43742
+ /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
43743
+ // watchOS
43744
+ ],
43745
+ [VERSION, [NAME, "watchOS"]],
43746
+ [
43747
+ // Google Chromecast
43748
+ /crkey\/([\d\.]+)/i
43749
+ // Google Chromecast
43750
+ ],
43751
+ [VERSION, [NAME, CHROME + "cast"]],
43752
+ [
43753
+ /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
43754
+ // Chromium OS
43755
+ ],
43756
+ [[NAME, CHROMIUM_OS], VERSION],
43757
+ [
43758
+ // Smart TVs
43759
+ /panasonic;(viera)/i,
43760
+ // Panasonic Viera
43761
+ /(netrange)mmh/i,
43762
+ // Netrange
43763
+ /(nettv)\/(\d+\.[\w\.]+)/i,
43764
+ // NetTV
43765
+ // Console
43766
+ /(nintendo|playstation) ([wids345portablevuch]+)/i,
43767
+ // Nintendo/Playstation
43768
+ /(xbox); +xbox ([^\);]+)/i,
43769
+ // Microsoft Xbox (360, One, X, S, Series X, Series S)
43770
+ // Other
43771
+ /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
43772
+ // Joli/Palm
43773
+ /(mint)[\/\(\) ]?(\w*)/i,
43774
+ // Mint
43775
+ /(mageia|vectorlinux)[; ]/i,
43776
+ // Mageia/VectorLinux
43777
+ /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
43778
+ // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
43779
+ /(hurd|linux) ?([\w\.]*)/i,
43780
+ // Hurd/Linux
43781
+ /(gnu) ?([\w\.]*)/i,
43782
+ // GNU
43783
+ /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
43784
+ // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
43785
+ /(haiku) (\w+)/i
43786
+ // Haiku
43787
+ ],
43788
+ [NAME, VERSION],
43789
+ [
43790
+ /(sunos) ?([\w\.\d]*)/i
43791
+ // Solaris
43792
+ ],
43793
+ [[NAME, "Solaris"], VERSION],
43794
+ [
43795
+ /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
43796
+ // Solaris
43797
+ /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
43798
+ // AIX
43799
+ /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
43800
+ // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
43801
+ /(unix) ?([\w\.]*)/i
43802
+ // UNIX
43803
+ ],
43804
+ [NAME, VERSION]
43805
+ ]
43806
+ };
43807
+ var UAParser2 = function(ua, extensions) {
43808
+ if (typeof ua === OBJ_TYPE) {
43809
+ extensions = ua;
43810
+ ua = undefined2;
43811
+ }
43812
+ if (!(this instanceof UAParser2)) {
43813
+ return new UAParser2(ua, extensions).getResult();
43814
+ }
43815
+ var _navigator = typeof window2 !== UNDEF_TYPE && window2.navigator ? window2.navigator : undefined2;
43816
+ var _ua = ua || (_navigator && _navigator.userAgent ? _navigator.userAgent : EMPTY);
43817
+ var _uach = _navigator && _navigator.userAgentData ? _navigator.userAgentData : undefined2;
43818
+ var _rgxmap = extensions ? extend(regexes, extensions) : regexes;
43819
+ var _isSelfNav = _navigator && _navigator.userAgent == _ua;
43820
+ this.getBrowser = function() {
43821
+ var _browser = {};
43822
+ _browser[NAME] = undefined2;
43823
+ _browser[VERSION] = undefined2;
43824
+ rgxMapper.call(_browser, _ua, _rgxmap.browser);
43825
+ _browser[MAJOR] = majorize(_browser[VERSION]);
43826
+ if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {
43827
+ _browser[NAME] = "Brave";
43828
+ }
43829
+ return _browser;
43830
+ };
43831
+ this.getCPU = function() {
43832
+ var _cpu = {};
43833
+ _cpu[ARCHITECTURE] = undefined2;
43834
+ rgxMapper.call(_cpu, _ua, _rgxmap.cpu);
43835
+ return _cpu;
43836
+ };
43837
+ this.getDevice = function() {
43838
+ var _device = {};
43839
+ _device[VENDOR] = undefined2;
43840
+ _device[MODEL] = undefined2;
43841
+ _device[TYPE2] = undefined2;
43842
+ rgxMapper.call(_device, _ua, _rgxmap.device);
43843
+ if (_isSelfNav && !_device[TYPE2] && _uach && _uach.mobile) {
43844
+ _device[TYPE2] = MOBILE;
43845
+ }
43846
+ if (_isSelfNav && _device[MODEL] == "Macintosh" && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {
43847
+ _device[MODEL] = "iPad";
43848
+ _device[TYPE2] = TABLET;
43849
+ }
43850
+ return _device;
43851
+ };
43852
+ this.getEngine = function() {
43853
+ var _engine = {};
43854
+ _engine[NAME] = undefined2;
43855
+ _engine[VERSION] = undefined2;
43856
+ rgxMapper.call(_engine, _ua, _rgxmap.engine);
43857
+ return _engine;
43858
+ };
43859
+ this.getOS = function() {
43860
+ var _os = {};
43861
+ _os[NAME] = undefined2;
43862
+ _os[VERSION] = undefined2;
43863
+ rgxMapper.call(_os, _ua, _rgxmap.os);
43864
+ if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != "Unknown") {
43865
+ _os[NAME] = _uach.platform.replace(/chrome os/i, CHROMIUM_OS).replace(/macos/i, MAC_OS);
43866
+ }
43867
+ return _os;
43868
+ };
43869
+ this.getResult = function() {
43870
+ return {
43871
+ ua: this.getUA(),
43872
+ browser: this.getBrowser(),
43873
+ engine: this.getEngine(),
43874
+ os: this.getOS(),
43875
+ device: this.getDevice(),
43876
+ cpu: this.getCPU()
43877
+ };
43878
+ };
43879
+ this.getUA = function() {
43880
+ return _ua;
43881
+ };
43882
+ this.setUA = function(ua2) {
43883
+ _ua = typeof ua2 === STR_TYPE && ua2.length > UA_MAX_LENGTH ? trim(ua2, UA_MAX_LENGTH) : ua2;
43884
+ return this;
43885
+ };
43886
+ this.setUA(_ua);
43887
+ return this;
43888
+ };
43889
+ UAParser2.VERSION = LIBVERSION;
43890
+ UAParser2.BROWSER = enumerize([NAME, VERSION, MAJOR]);
43891
+ UAParser2.CPU = enumerize([ARCHITECTURE]);
43892
+ UAParser2.DEVICE = enumerize([MODEL, VENDOR, TYPE2, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
43893
+ UAParser2.ENGINE = UAParser2.OS = enumerize([NAME, VERSION]);
43894
+ if (typeof exports !== UNDEF_TYPE) {
43895
+ if (typeof module2 !== UNDEF_TYPE && module2.exports) {
43896
+ exports = module2.exports = UAParser2;
43897
+ }
43898
+ exports.UAParser = UAParser2;
43899
+ } else {
43900
+ if (typeof define === FUNC_TYPE && define.amd) {
43901
+ define(function() {
43902
+ return UAParser2;
43903
+ });
43904
+ } else if (typeof window2 !== UNDEF_TYPE) {
43905
+ window2.UAParser = UAParser2;
43906
+ }
43907
+ }
43908
+ var $ = typeof window2 !== UNDEF_TYPE && (window2.jQuery || window2.Zepto);
43909
+ if ($ && !$.ua) {
43910
+ var parser = new UAParser2();
43911
+ $.ua = parser.getResult();
43912
+ $.ua.get = function() {
43913
+ return parser.getUA();
43914
+ };
43915
+ $.ua.set = function(ua) {
43916
+ parser.setUA(ua);
43917
+ var result = parser.getResult();
43918
+ for (var prop in result) {
43919
+ $.ua[prop] = result[prop];
43920
+ }
43921
+ };
43922
+ }
43923
+ })(typeof window === "object" ? window : exports);
43924
+ }
43925
+ });
43926
+
41148
43927
  // ../../node_modules/use-debounce/dist/index.module.js
41149
43928
  var index_module_exports = {};
41150
43929
  __export(index_module_exports, {
@@ -43089,6 +45868,26 @@ var require_dist = __commonJS({
43089
45868
  mod
43090
45869
  ));
43091
45870
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
45871
+ var __async2 = (__this, __arguments, generator) => {
45872
+ return new Promise((resolve, reject) => {
45873
+ var fulfilled = (value) => {
45874
+ try {
45875
+ step(generator.next(value));
45876
+ } catch (e2) {
45877
+ reject(e2);
45878
+ }
45879
+ };
45880
+ var rejected = (value) => {
45881
+ try {
45882
+ step(generator.throw(value));
45883
+ } catch (e2) {
45884
+ reject(e2);
45885
+ }
45886
+ };
45887
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
45888
+ step((generator = generator.apply(__this, __arguments)).next());
45889
+ });
45890
+ };
43092
45891
  var auto_frame_component_exports = {};
43093
45892
  __export2(auto_frame_component_exports, {
43094
45893
  default: () => AutoFrameComponent_default
@@ -43107,21 +45906,70 @@ var require_dist = __commonJS({
43107
45906
  });
43108
45907
  return collected;
43109
45908
  };
45909
+ var getStyleSheet = (el) => {
45910
+ return Array.from(document.styleSheets).find((ss) => {
45911
+ const ownerNode = ss.ownerNode;
45912
+ return ownerNode.href === el.href;
45913
+ });
45914
+ };
45915
+ var getStyles2 = (styleSheet) => {
45916
+ if (styleSheet) {
45917
+ try {
45918
+ return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
45919
+ } catch (e2) {
45920
+ console.warn(
45921
+ "Access to stylesheet %s is denied. Ignoring\u2026",
45922
+ styleSheet.href
45923
+ );
45924
+ }
45925
+ }
45926
+ return "";
45927
+ };
45928
+ var defer = (fn) => setTimeout(fn, 0);
43110
45929
  var CopyHostStyles = ({
43111
45930
  children,
43112
45931
  debug = false,
43113
45932
  onStylesLoaded = () => null
43114
45933
  }) => {
43115
45934
  const { document: doc, window: win } = (0, import_react_frame_component.useFrame)();
43116
- (0, import_react22.useLayoutEffect)(() => {
45935
+ (0, import_react22.useEffect)(() => {
43117
45936
  if (!win || !doc) {
43118
45937
  return () => {
43119
45938
  };
43120
45939
  }
43121
- const elements = [];
45940
+ let elements = [];
45941
+ const hashes = {};
43122
45942
  const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
45943
+ const mirrorEl = (el, onLoad = () => {
45944
+ }) => __async2(void 0, null, function* () {
45945
+ let mirror;
45946
+ if (el.nodeName === "LINK") {
45947
+ mirror = document.createElement("style");
45948
+ mirror.type = "text/css";
45949
+ let styleSheet = getStyleSheet(el);
45950
+ if (!styleSheet) {
45951
+ yield new Promise((resolve) => el.onload = resolve);
45952
+ styleSheet = getStyleSheet(el);
45953
+ }
45954
+ const styles = getStyles2(styleSheet);
45955
+ if (!styles) {
45956
+ if (debug) {
45957
+ console.warn(
45958
+ `Tried to load styles for link element, but couldn't find them. Skipping...`
45959
+ );
45960
+ }
45961
+ return;
45962
+ }
45963
+ mirror.innerHTML = styles;
45964
+ mirror.setAttribute("data-href", el.getAttribute("href"));
45965
+ } else {
45966
+ mirror = el.cloneNode(true);
45967
+ }
45968
+ mirror.onload = onLoad;
45969
+ return mirror;
45970
+ });
43123
45971
  const addEl = (el, onLoad = () => {
43124
- }) => {
45972
+ }) => __async2(void 0, null, function* () {
43125
45973
  const index = lookupEl(el);
43126
45974
  if (index > -1) {
43127
45975
  if (debug)
@@ -43132,11 +45980,13 @@ var require_dist = __commonJS({
43132
45980
  onLoad();
43133
45981
  return;
43134
45982
  }
43135
- const elHash = (0, import_object_hash.default)(el.outerHTML);
43136
- const existingHashes = collectStyles(doc).map(
43137
- (existingStyle) => (0, import_object_hash.default)(existingStyle.outerHTML)
43138
- );
43139
- if (existingHashes.indexOf(elHash) > -1) {
45983
+ const mirror = yield mirrorEl(el, onLoad);
45984
+ if (!mirror) {
45985
+ onLoad();
45986
+ return;
45987
+ }
45988
+ const elHash = (0, import_object_hash.default)(mirror.outerHTML);
45989
+ if (hashes[elHash]) {
43140
45990
  if (debug)
43141
45991
  console.log(
43142
45992
  `iframe already contains element that is being mirrored. Skipping...`
@@ -43144,14 +45994,15 @@ var require_dist = __commonJS({
43144
45994
  onLoad();
43145
45995
  return;
43146
45996
  }
43147
- const mirror = el.cloneNode(true);
45997
+ hashes[elHash] = true;
43148
45998
  mirror.onload = onLoad;
43149
45999
  doc.head.append(mirror);
43150
46000
  elements.push({ original: el, mirror });
43151
46001
  if (debug)
43152
46002
  console.log(`Added style node ${el.outerHTML}`);
43153
- };
46003
+ });
43154
46004
  const removeEl = (el) => {
46005
+ var _a3, _b;
43155
46006
  const index = lookupEl(el);
43156
46007
  if (index === -1) {
43157
46008
  if (debug)
@@ -43160,7 +46011,9 @@ var require_dist = __commonJS({
43160
46011
  );
43161
46012
  return;
43162
46013
  }
43163
- elements[index].mirror.remove();
46014
+ const elHash = (0, import_object_hash.default)(el.outerHTML);
46015
+ (_b = (_a3 = elements[index]) == null ? void 0 : _a3.mirror) == null ? void 0 : _b.remove();
46016
+ delete hashes[elHash];
43164
46017
  if (debug)
43165
46018
  console.log(`Removed style node ${el.outerHTML}`);
43166
46019
  };
@@ -43171,7 +46024,7 @@ var require_dist = __commonJS({
43171
46024
  if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
43172
46025
  const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
43173
46026
  if (el && el.matches(styleSelector)) {
43174
- addEl(el);
46027
+ defer(() => addEl(el));
43175
46028
  }
43176
46029
  }
43177
46030
  });
@@ -43179,7 +46032,7 @@ var require_dist = __commonJS({
43179
46032
  if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
43180
46033
  const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
43181
46034
  if (el && el.matches(styleSelector)) {
43182
- removeEl(el);
46035
+ defer(() => removeEl(el));
43183
46036
  }
43184
46037
  }
43185
46038
  });
@@ -43188,26 +46041,49 @@ var require_dist = __commonJS({
43188
46041
  });
43189
46042
  const parentDocument = win.parent.document;
43190
46043
  const collectedStyles = collectStyles(parentDocument);
43191
- let mountedCounter = 0;
43192
- collectedStyles.forEach((styleNode) => {
43193
- addEl(styleNode, () => {
43194
- mountedCounter += 1;
43195
- if (mountedCounter === collectedStyles.length) {
43196
- onStylesLoaded();
46044
+ const hrefs = [];
46045
+ Promise.all(
46046
+ collectedStyles.map((styleNode, i2) => __async2(void 0, null, function* () {
46047
+ if (styleNode.nodeName === "LINK") {
46048
+ const linkHref = styleNode.href;
46049
+ if (hrefs.indexOf(linkHref) > -1) {
46050
+ return;
46051
+ }
46052
+ hrefs.push(linkHref);
43197
46053
  }
46054
+ const mirror = yield mirrorEl(styleNode);
46055
+ if (!mirror)
46056
+ return;
46057
+ elements.push({ original: styleNode, mirror });
46058
+ return mirror;
46059
+ }))
46060
+ ).then((mirrorStyles) => {
46061
+ const filtered = mirrorStyles.filter(
46062
+ (el) => typeof el !== "undefined"
46063
+ );
46064
+ doc.head.innerHTML = "";
46065
+ doc.head.append(...filtered);
46066
+ observer.observe(parentDocument.head, { childList: true, subtree: true });
46067
+ filtered.forEach((el) => {
46068
+ const elHash = (0, import_object_hash.default)(el.outerHTML);
46069
+ hashes[elHash] = true;
43198
46070
  });
46071
+ onStylesLoaded();
43199
46072
  });
43200
- observer.observe(parentDocument.head, { childList: true, subtree: true });
43201
46073
  return () => {
43202
46074
  observer.disconnect();
43203
46075
  };
43204
46076
  }, []);
43205
46077
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
43206
46078
  };
43207
- var AutoFrameComponent_default = import_react22.default.forwardRef(function(_a, ref2) {
43208
- var _b = _a, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
43209
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
43210
- });
46079
+ var AutoFrameComponent = import_react22.default.forwardRef(
46080
+ function(_a3, ref2) {
46081
+ var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
46082
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
46083
+ }
46084
+ );
46085
+ AutoFrameComponent.displayName = "AutoFrameComponent";
46086
+ var AutoFrameComponent_default = AutoFrameComponent;
43211
46087
  }
43212
46088
  });
43213
46089
 
@@ -43746,7 +46622,7 @@ var require_dist2 = __commonJS({
43746
46622
  mod
43747
46623
  ));
43748
46624
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
43749
- var __async = (__this, __arguments, generator) => {
46625
+ var __async2 = (__this, __arguments, generator) => {
43750
46626
  return new Promise((resolve, reject) => {
43751
46627
  var fulfilled = (value) => {
43752
46628
  try {
@@ -66789,7 +69665,7 @@ var require_dist2 = __commonJS({
66789
69665
  break;
66790
69666
  }
66791
69667
  case "backwards": {
66792
- var _tail = null;
69668
+ var _tail2 = null;
66793
69669
  var row = workInProgress2.child;
66794
69670
  workInProgress2.child = null;
66795
69671
  while (row !== null) {
@@ -66799,15 +69675,15 @@ var require_dist2 = __commonJS({
66799
69675
  break;
66800
69676
  }
66801
69677
  var nextRow = row.sibling;
66802
- row.sibling = _tail;
66803
- _tail = row;
69678
+ row.sibling = _tail2;
69679
+ _tail2 = row;
66804
69680
  row = nextRow;
66805
69681
  }
66806
69682
  initSuspenseListRenderState(
66807
69683
  workInProgress2,
66808
69684
  true,
66809
69685
  // isBackwards
66810
- _tail,
69686
+ _tail2,
66811
69687
  null,
66812
69688
  // last
66813
69689
  tailMode
@@ -70453,10 +73329,10 @@ var require_dist2 = __commonJS({
70453
73329
  return;
70454
73330
  }
70455
73331
  } else {
70456
- var _next = unwindWork(current2, completedWork);
70457
- if (_next !== null) {
70458
- _next.flags &= HostEffectMask;
70459
- workInProgress = _next;
73332
+ var _next2 = unwindWork(current2, completedWork);
73333
+ if (_next2 !== null) {
73334
+ _next2.flags &= HostEffectMask;
73335
+ workInProgress = _next2;
70460
73336
  return;
70461
73337
  }
70462
73338
  if ((completedWork.mode & ProfileMode) !== NoMode) {
@@ -72937,10 +75813,10 @@ var require_dist2 = __commonJS({
72937
75813
  var getItem2 = (selector, data, dynamicProps = {}) => {
72938
75814
  if (!selector.zone || selector.zone === rootDroppableId2) {
72939
75815
  const item2 = data.content[selector.index];
72940
- return __spreadProps2(__spreadValues2({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
75816
+ return (item2 == null ? void 0 : item2.props) ? __spreadProps2(__spreadValues2({}, item2), { props: dynamicProps[item2.props.id] || item2.props }) : void 0;
72941
75817
  }
72942
75818
  const item = setupZone2(data, selector.zone).zones[selector.zone][selector.index];
72943
- return __spreadProps2(__spreadValues2({}, item), { props: dynamicProps[item.props.id] || item.props });
75819
+ return (item == null ? void 0 : item.props) ? __spreadProps2(__spreadValues2({}, item), { props: dynamicProps[item.props.id] || item.props }) : void 0;
72944
75820
  };
72945
75821
  init_react_import2();
72946
75822
  var defaultViewports2 = [
@@ -72948,6 +75824,7 @@ var require_dist2 = __commonJS({
72948
75824
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
72949
75825
  { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
72950
75826
  ];
75827
+ var import_ua_parser_js2 = require_ua_parser();
72951
75828
  var import_jsx_runtime22 = require("react/jsx-runtime");
72952
75829
  var defaultAppState2 = {
72953
75830
  data: { content: [], root: { props: { title: "" } } },
@@ -72987,7 +75864,8 @@ var require_dist2 = __commonJS({
72987
75864
  setZoomConfig: () => null,
72988
75865
  status: "LOADING",
72989
75866
  setStatus: () => null,
72990
- iframe: {}
75867
+ iframe: {},
75868
+ safariFallbackMode: false
72991
75869
  };
72992
75870
  var appContext2 = (0, import_react32.createContext)(defaultContext2);
72993
75871
  var AppProvider = ({
@@ -72999,10 +75877,34 @@ var require_dist2 = __commonJS({
72999
75877
  (0, import_react32.useEffect)(() => {
73000
75878
  setStatus("MOUNTED");
73001
75879
  }, []);
75880
+ const [safariFallbackMode, setSafariFallbackMode] = (0, import_react32.useState)(false);
75881
+ (0, import_react32.useEffect)(() => {
75882
+ var _a3, _b, _c;
75883
+ const ua = new import_ua_parser_js2.UAParser(navigator.userAgent);
75884
+ const { browser } = ua.getResult();
75885
+ if (browser.name === "Safari" && (((_a3 = browser.version) == null ? void 0 : _a3.indexOf("17.2.")) || ((_b = browser.version) == null ? void 0 : _b.indexOf("17.3.")) || ((_c = browser.version) == null ? void 0 : _c.indexOf("17.4.")))) {
75886
+ if (process.env.NODE_ENV !== "production" && value.iframe.enabled) {
75887
+ console.warn(
75888
+ `Detected Safari ${browser.version}, which contains a bug that prevents Puck DropZones from detecting a mouseover event within an iframe. This affects Safari versions 17.2, 17.3 and 17.4.
75889
+
75890
+ Running in compatibility mode, which may have some DropZone side-effects. Alternatively, consider disabling iframes: https://puckeditor.com/docs/integrating-puck/viewports#opting-out-of-iframes.
75891
+
75892
+ See https://github.com/measuredco/puck/issues/411 for more information. This message will not show in production.`
75893
+ );
75894
+ }
75895
+ setSafariFallbackMode(true);
75896
+ }
75897
+ }, []);
73002
75898
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
73003
75899
  appContext2.Provider,
73004
75900
  {
73005
- value: __spreadProps2(__spreadValues2({}, value), { zoomConfig, setZoomConfig, status, setStatus }),
75901
+ value: __spreadProps2(__spreadValues2({}, value), {
75902
+ zoomConfig,
75903
+ setZoomConfig,
75904
+ status,
75905
+ setStatus,
75906
+ safariFallbackMode
75907
+ }),
73006
75908
  children
73007
75909
  }
73008
75910
  );
@@ -73084,7 +75986,7 @@ var require_dist2 = __commonJS({
73084
75986
  const { status } = useAppContext2();
73085
75987
  const El = status !== "LOADING" ? import_dnd2.Draggable : DefaultDraggable;
73086
75988
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
73087
- var _a;
75989
+ var _a3;
73088
75990
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
73089
75991
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
73090
75992
  "div",
@@ -73093,7 +75995,7 @@ var require_dist2 = __commonJS({
73093
75995
  ref: provided.innerRef
73094
75996
  }, provided.draggableProps), provided.dragHandleProps), {
73095
75997
  style: __spreadProps2(__spreadValues2({}, provided.draggableProps.style), {
73096
- transform: snapshot.isDragging || !disableAnimations ? (_a = provided.draggableProps.style) == null ? void 0 : _a.transform : "translate(0px, 0px)"
75998
+ transform: snapshot.isDragging || !disableAnimations ? (_a3 = provided.draggableProps.style) == null ? void 0 : _a3.transform : "translate(0px, 0px)"
73097
75999
  }),
73098
76000
  children: children(provided, snapshot)
73099
76001
  })
@@ -73198,7 +76100,7 @@ var require_dist2 = __commonJS({
73198
76100
  var import_react72 = require("react");
73199
76101
  var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
73200
76102
  init_react_import2();
73201
- var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_1542z_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_1542z_11", "DraggableComponent-contents": "_DraggableComponent-contents_1542z_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_1542z_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_1542z_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_1542z_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_1542z_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_1542z_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_1542z_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_1542z_97", "DraggableComponent-actions": "_DraggableComponent-actions_1542z_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_1542z_127", "DraggableComponent-action": "_DraggableComponent-action_1542z_97" };
76103
+ var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_59z7f_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_59z7f_11", "DraggableComponent-contents": "_DraggableComponent-contents_59z7f_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_59z7f_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_59z7f_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_59z7f_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_59z7f_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_59z7f_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_59z7f_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_59z7f_97", "DraggableComponent-actions": "_DraggableComponent-actions_59z7f_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_59z7f_127", "DraggableComponent-action": "_DraggableComponent-action_59z7f_97" };
73202
76104
  init_react_import2();
73203
76105
  init_react_import2();
73204
76106
  var import_react52 = require("react");
@@ -73217,8 +76119,8 @@ var require_dist2 = __commonJS({
73217
76119
  var toKebabCase2 = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
73218
76120
  var createLucideIcon2 = (iconName, iconNode) => {
73219
76121
  const Component = (0, import_react52.forwardRef)(
73220
- (_a, ref2) => {
73221
- var _b = _a, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest2(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
76122
+ (_a3, ref2) => {
76123
+ var _b = _a3, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest2(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
73222
76124
  return (0, import_react52.createElement)(
73223
76125
  "svg",
73224
76126
  __spreadValues2(__spreadProps2(__spreadValues2({
@@ -73539,7 +76441,7 @@ var require_dist2 = __commonJS({
73539
76441
  );
73540
76442
  };
73541
76443
  init_react_import2();
73542
- var styles_module_default42 = { "DropZone": "_DropZone_w4btq_1", "DropZone-content": "_DropZone-content_w4btq_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_w4btq_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_w4btq_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_w4btq_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_w4btq_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_w4btq_27", "DropZone--isDisabled": "_DropZone--isDisabled_w4btq_28", "DropZone--isRootZone": "_DropZone--isRootZone_w4btq_29", "DropZone--hasChildren": "_DropZone--hasChildren_w4btq_30", "DropZone--isDestination": "_DropZone--isDestination_w4btq_40", "DropZone-item": "_DropZone-item_w4btq_52", "DropZone-hitbox": "_DropZone-hitbox_w4btq_56" };
76444
+ var styles_module_default42 = { "DropZone": "_DropZone_djoti_1", "DropZone-content": "_DropZone-content_djoti_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_djoti_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_djoti_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_djoti_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_djoti_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_djoti_27", "DropZone--isDisabled": "_DropZone--isDisabled_djoti_28", "DropZone--isRootZone": "_DropZone--isRootZone_djoti_29", "DropZone--hasChildren": "_DropZone--hasChildren_djoti_30", "DropZone--isDestination": "_DropZone--isDestination_djoti_40", "DropZone-item": "_DropZone-item_djoti_52", "DropZone-hitbox": "_DropZone-hitbox_djoti_56" };
73543
76445
  init_react_import2();
73544
76446
  var import_react82 = require("react");
73545
76447
  var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
@@ -73658,7 +76560,7 @@ var require_dist2 = __commonJS({
73658
76560
  var import_jsx_runtime9 = require("react/jsx-runtime");
73659
76561
  var getClassName5 = get_class_name_factory_default2("DropZone", styles_module_default42);
73660
76562
  function DropZoneEdit({ zone, allow, disallow, style: style2 }) {
73661
- var _a;
76563
+ var _a3;
73662
76564
  const appContext22 = useAppContext2();
73663
76565
  const ctx = (0, import_react92.useContext)(dropZoneContext2);
73664
76566
  const {
@@ -73702,7 +76604,7 @@ var require_dist2 = __commonJS({
73702
76604
  }
73703
76605
  const isRootZone = zoneCompound === rootDroppableId2 || zone === rootDroppableId2 || areaId === "root";
73704
76606
  const draggedSourceId = draggedItem && draggedItem.source.droppableId;
73705
- const draggedDestinationId = draggedItem && ((_a = draggedItem.destination) == null ? void 0 : _a.droppableId);
76607
+ const draggedDestinationId = draggedItem && ((_a3 = draggedItem.destination) == null ? void 0 : _a3.droppableId);
73706
76608
  const [zoneArea] = getZoneId2(zoneCompound);
73707
76609
  const [draggedSourceArea] = getZoneId2(draggedSourceId);
73708
76610
  const userWillDrag = zoneWillDrag === zone;
@@ -73724,7 +76626,11 @@ var require_dist2 = __commonJS({
73724
76626
  let isEnabled = userWillDrag;
73725
76627
  if (userIsDragging) {
73726
76628
  if (draggingNewComponent) {
73727
- isEnabled = hoveringOverArea;
76629
+ if (appContext22.safariFallbackMode) {
76630
+ isEnabled = true;
76631
+ } else {
76632
+ isEnabled = hoveringOverArea;
76633
+ }
73728
76634
  } else {
73729
76635
  isEnabled = draggingOverArea && hoveringOverZone;
73730
76636
  }
@@ -73785,9 +76691,9 @@ var require_dist2 = __commonJS({
73785
76691
  },
73786
76692
  children: [
73787
76693
  content.map((item, i2) => {
73788
- var _a2, _b, _c;
76694
+ var _a22, _b, _c;
73789
76695
  const componentId = item.props.id;
73790
- const defaultedProps = __spreadProps2(__spreadValues2(__spreadValues2({}, (_a2 = config.components[item.type]) == null ? void 0 : _a2.defaultProps), item.props), {
76696
+ const defaultedProps = __spreadProps2(__spreadValues2(__spreadValues2({}, (_a22 = config.components[item.type]) == null ? void 0 : _a22.defaultProps), item.props), {
73791
76697
  puck: { renderDropZone: DropZone },
73792
76698
  editMode: true
73793
76699
  });
@@ -74034,7 +76940,7 @@ var require_dist2 = __commonJS({
74034
76940
  const queryAttr = "data-rfd-drag-handle-draggable-id";
74035
76941
  const [placeholderStyle, setPlaceholderStyle] = (0, import_react112.useState)();
74036
76942
  const onDragStartOrUpdate = (draggedItem) => {
74037
- var _a;
76943
+ var _a3;
74038
76944
  const draggableId = draggedItem.draggableId;
74039
76945
  const destinationIndex = (draggedItem.destination || draggedItem.source).index;
74040
76946
  const droppableId = (draggedItem.destination || draggedItem.source).droppableId;
@@ -74052,7 +76958,7 @@ var require_dist2 = __commonJS({
74052
76958
  return;
74053
76959
  }
74054
76960
  let clientY = 0;
74055
- const isSameDroppable = draggedItem.source.droppableId === ((_a = draggedItem.destination) == null ? void 0 : _a.droppableId);
76961
+ const isSameDroppable = draggedItem.source.droppableId === ((_a3 = draggedItem.destination) == null ? void 0 : _a3.droppableId);
74056
76962
  if (destinationIndex > 0) {
74057
76963
  const end2 = destinationIndex > draggedItem.source.index && isSameDroppable ? destinationIndex + 1 : destinationIndex;
74058
76964
  const children = Array.from(targetListElement.children).filter(
@@ -74539,9 +77445,9 @@ var require_dist2 = __commonJS({
74539
77445
  var import_react132 = require("react");
74540
77446
  init_react_import2();
74541
77447
  var cache = { lastChange: {} };
74542
- var resolveAllComponentData = (content, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
77448
+ var resolveAllComponentData = (content, config, onResolveStart, onResolveEnd) => __async2(void 0, null, function* () {
74543
77449
  return yield Promise.all(
74544
- content.map((item) => __async(void 0, null, function* () {
77450
+ content.map((item) => __async2(void 0, null, function* () {
74545
77451
  return yield resolveComponentData(
74546
77452
  item,
74547
77453
  config,
@@ -74551,7 +77457,7 @@ var require_dist2 = __commonJS({
74551
77457
  }))
74552
77458
  );
74553
77459
  });
74554
- var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
77460
+ var resolveComponentData = (item, config, onResolveStart, onResolveEnd) => __async2(void 0, null, function* () {
74555
77461
  const configForItem = config.components[item.type];
74556
77462
  if (configForItem.resolveData) {
74557
77463
  let changed = Object.keys(item.props).reduce(
@@ -74610,9 +77516,9 @@ var require_dist2 = __commonJS({
74610
77516
  };
74611
77517
  init_react_import2();
74612
77518
  var cache2 = {};
74613
- var resolveRootData = (data, config) => __async(void 0, null, function* () {
74614
- var _a, _b;
74615
- if (((_a = config.root) == null ? void 0 : _a.resolveData) && data.root.props) {
77519
+ var resolveRootData = (data, config) => __async2(void 0, null, function* () {
77520
+ var _a3, _b;
77521
+ if (((_a3 = config.root) == null ? void 0 : _a3.resolveData) && data.root.props) {
74616
77522
  let changed = Object.keys(data.root.props).reduce(
74617
77523
  (acc, item) => __spreadProps2(__spreadValues2({}, acc), { [item]: true }),
74618
77524
  {}
@@ -74664,11 +77570,11 @@ var require_dist2 = __commonJS({
74664
77570
  },
74665
77571
  []
74666
77572
  );
74667
- const runResolvers = () => __async(void 0, null, function* () {
77573
+ const runResolvers = () => __async2(void 0, null, function* () {
74668
77574
  const newData = newAppState.data;
74669
77575
  const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) => {
74670
- var _a;
74671
- return !!((_a = config.components[item.type]) == null ? void 0 : _a.resolveData);
77576
+ var _a3;
77577
+ return !!((_a3 = config.components[item.type]) == null ? void 0 : _a3.resolveData);
74672
77578
  });
74673
77579
  const applyIfChange = (dynamicDataMap, dynamicRoot) => {
74674
77580
  const processed = applyDynamicProps(
@@ -74691,7 +77597,7 @@ var require_dist2 = __commonJS({
74691
77597
  };
74692
77598
  const promises = [];
74693
77599
  promises.push(
74694
- (() => __async(void 0, null, function* () {
77600
+ (() => __async2(void 0, null, function* () {
74695
77601
  setComponentLoading("puck-root", true, 50);
74696
77602
  const dynamicRoot = yield resolveRootData(newData, config);
74697
77603
  applyIfChange({}, dynamicRoot);
@@ -74700,7 +77606,7 @@ var require_dist2 = __commonJS({
74700
77606
  );
74701
77607
  flatContent.forEach((item) => {
74702
77608
  promises.push(
74703
- (() => __async(void 0, null, function* () {
77609
+ (() => __async2(void 0, null, function* () {
74704
77610
  const dynamicData = yield resolveComponentData(
74705
77611
  item,
74706
77612
  config,
@@ -74756,12 +77662,12 @@ var require_dist2 = __commonJS({
74756
77662
  {
74757
77663
  className: getClassName9({ menuOpen }),
74758
77664
  onClick: (event) => {
74759
- var _a;
77665
+ var _a3;
74760
77666
  const element = event.target;
74761
77667
  if (window.matchMedia("(min-width: 638px)").matches) {
74762
77668
  return;
74763
77669
  }
74764
- if (element.tagName === "A" && ((_a = element.getAttribute("href")) == null ? void 0 : _a.startsWith("#"))) {
77670
+ if (element.tagName === "A" && ((_a3 = element.getAttribute("href")) == null ? void 0 : _a3.startsWith("#"))) {
74765
77671
  setMenuOpen(false);
74766
77672
  }
74767
77673
  },
@@ -74870,11 +77776,11 @@ var require_dist2 = __commonJS({
74870
77776
  (value2) => {
74871
77777
  let highestIndex = getHighestIndex();
74872
77778
  const newItems = Array.from(value2 || []).map((item, idx) => {
74873
- var _a;
77779
+ var _a3;
74874
77780
  const arrayStateItem = arrayState.items[idx];
74875
77781
  const newItem = {
74876
77782
  _originalIndex: typeof (arrayStateItem == null ? void 0 : arrayStateItem._originalIndex) !== "undefined" ? arrayStateItem._originalIndex : highestIndex + 1,
74877
- _arrayId: ((_a = arrayState.items[idx]) == null ? void 0 : _a._arrayId) || `${id}-${highestIndex + 1}`
77783
+ _arrayId: ((_a3 = arrayState.items[idx]) == null ? void 0 : _a3._arrayId) || `${id}-${highestIndex + 1}`
74878
77784
  };
74879
77785
  if (newItem._originalIndex > highestIndex) {
74880
77786
  highestIndex = newItem._originalIndex;
@@ -74906,12 +77812,12 @@ var require_dist2 = __commonJS({
74906
77812
  DragDropContext2,
74907
77813
  {
74908
77814
  onDragEnd: (event) => {
74909
- var _a, _b;
77815
+ var _a3, _b;
74910
77816
  if (event.destination) {
74911
77817
  const newValue = reorder(
74912
77818
  value,
74913
77819
  event.source.index,
74914
- (_a = event.destination) == null ? void 0 : _a.index
77820
+ (_a3 = event.destination) == null ? void 0 : _a3.index
74915
77821
  );
74916
77822
  const newArrayStateItems = reorder(
74917
77823
  arrayState.items,
@@ -75198,7 +78104,7 @@ var require_dist2 = __commonJS({
75198
78104
  }, [mappedData]);
75199
78105
  const [searchQuery, setSearchQuery] = (0, import_react16.useState)(field.initialQuery || "");
75200
78106
  const search = (0, import_react16.useCallback)(
75201
- (query, filters2) => __async(void 0, null, function* () {
78107
+ (query, filters2) => __async2(void 0, null, function* () {
75202
78108
  setIsLoading(true);
75203
78109
  const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
75204
78110
  const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
@@ -75366,7 +78272,7 @@ var require_dist2 = __commonJS({
75366
78272
  label,
75367
78273
  id
75368
78274
  }) => {
75369
- var _a, _b, _c;
78275
+ var _a3, _b, _c;
75370
78276
  const validField = field;
75371
78277
  const deprecatedField = field;
75372
78278
  (0, import_react17.useEffect)(() => {
@@ -75391,10 +78297,10 @@ var require_dist2 = __commonJS({
75391
78297
  name,
75392
78298
  field: __spreadProps2(__spreadValues2({}, validField), {
75393
78299
  // DEPRECATED
75394
- placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
78300
+ placeholder: ((_a3 = deprecatedField.adaptor) == null ? void 0 : _a3.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
75395
78301
  mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
75396
78302
  mapRow: validField.mapRow,
75397
- fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(void 0, null, function* () {
78303
+ fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async2(void 0, null, function* () {
75398
78304
  return yield deprecatedField.adaptor.fetchList(
75399
78305
  deprecatedField.adaptorParams
75400
78306
  );
@@ -75450,7 +78356,7 @@ var require_dist2 = __commonJS({
75450
78356
  onChange(e2.currentTarget.value);
75451
78357
  },
75452
78358
  disabled: readOnly,
75453
- defaultChecked: value === option.value
78359
+ checked: value === option.value
75454
78360
  }
75455
78361
  ),
75456
78362
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName14("radioInner"), children: option.label || option.value })
@@ -75490,7 +78396,7 @@ var require_dist2 = __commonJS({
75490
78396
  disabled: readOnly,
75491
78397
  onChange: (e2) => {
75492
78398
  if (e2.currentTarget.value === "true" || e2.currentTarget.value === "false") {
75493
- onChange(Boolean(e2.currentTarget.value));
78399
+ onChange(JSON.parse(e2.currentTarget.value));
75494
78400
  return;
75495
78401
  }
75496
78402
  onChange(e2.currentTarget.value);
@@ -75644,9 +78550,9 @@ var require_dist2 = __commonJS({
75644
78550
  }
75645
78551
  );
75646
78552
  };
75647
- var InputOrGroup = (_a) => {
75648
- var _b = _a, { onChange } = _b, props = __objRest2(_b, ["onChange"]);
75649
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
78553
+ var InputOrGroup = (_a3) => {
78554
+ var _b = _a3, { onChange } = _b, props = __objRest2(_b, ["onChange"]);
78555
+ var _a22, _b2, _c, _d, _e, _f, _g, _h;
75650
78556
  const { overrides } = useAppContext2();
75651
78557
  const { name, field, value, readOnly } = props;
75652
78558
  const [localValue, setLocalValue] = (0, import_react18.useState)(value);
@@ -75689,7 +78595,7 @@ var require_dist2 = __commonJS({
75689
78595
  number: DefaultField
75690
78596
  };
75691
78597
  const render = __spreadProps2(__spreadValues2({}, overrides.fieldTypes), {
75692
- array: ((_a2 = overrides.fieldTypes) == null ? void 0 : _a2.array) || defaultFields.array,
78598
+ array: ((_a22 = overrides.fieldTypes) == null ? void 0 : _a22.array) || defaultFields.array,
75693
78599
  external: ((_b2 = overrides.fieldTypes) == null ? void 0 : _b2.external) || defaultFields.external,
75694
78600
  object: ((_c = overrides.fieldTypes) == null ? void 0 : _c.object) || defaultFields.object,
75695
78601
  select: ((_d = overrides.fieldTypes) == null ? void 0 : _d.select) || defaultFields.select,
@@ -75721,7 +78627,7 @@ var require_dist2 = __commonJS({
75721
78627
  ] });
75722
78628
  };
75723
78629
  var Fields = () => {
75724
- var _a, _b, _c, _d;
78630
+ var _a3, _b, _c, _d;
75725
78631
  const {
75726
78632
  selectedItem,
75727
78633
  state,
@@ -75733,7 +78639,7 @@ var require_dist2 = __commonJS({
75733
78639
  } = useAppContext2();
75734
78640
  const { data, ui } = state;
75735
78641
  const { itemSelector } = ui;
75736
- const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
78642
+ const rootFields = ((_a3 = config.root) == null ? void 0 : _a3.fields) || defaultPageFields;
75737
78643
  const fields = selectedItem ? ((_b = config.components[selectedItem.type]) == null ? void 0 : _b.fields) || {} : rootFields;
75738
78644
  const isLoading = selectedItem ? (_c = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _c.loading : (_d = componentState["puck-root"]) == null ? void 0 : _d.loading;
75739
78645
  const rootProps = data.root.props || data.root;
@@ -75748,7 +78654,7 @@ var require_dist2 = __commonJS({
75748
78654
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
75749
78655
  const field = fields[fieldName];
75750
78656
  const onChange = (value, updatedUi) => {
75751
- var _a2, _b2;
78657
+ var _a22, _b2;
75752
78658
  let currentProps;
75753
78659
  if (selectedItem) {
75754
78660
  currentProps = selectedItem.props;
@@ -75773,7 +78679,7 @@ var require_dist2 = __commonJS({
75773
78679
  ui: __spreadValues2(__spreadValues2({}, ui), updatedUi)
75774
78680
  }
75775
78681
  };
75776
- if ((_a2 = config.components[selectedItem.type]) == null ? void 0 : _a2.resolveData) {
78682
+ if ((_a22 = config.components[selectedItem.type]) == null ? void 0 : _a22.resolveData) {
75777
78683
  resolveData(setAction(state, setActionData));
75778
78684
  } else {
75779
78685
  dispatch(__spreadProps2(__spreadValues2({}, setActionData), {
@@ -75889,11 +78795,11 @@ var require_dist2 = __commonJS({
75889
78795
  }
75890
78796
  ),
75891
78797
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("content"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Drawer, { droppableId: `component-list${title ? `:${title}` : ""}`, children: children || Object.keys(config.components).map((componentKey, i2) => {
75892
- var _a;
78798
+ var _a3;
75893
78799
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
75894
78800
  ComponentListItem,
75895
78801
  {
75896
- label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
78802
+ label: (_a3 = config.components[componentKey]["label"]) != null ? _a3 : componentKey,
75897
78803
  name: componentKey,
75898
78804
  index: i2
75899
78805
  },
@@ -75907,7 +78813,7 @@ var require_dist2 = __commonJS({
75907
78813
  var useComponentList = (config, ui) => {
75908
78814
  const [componentList, setComponentList] = (0, import_react20.useState)();
75909
78815
  (0, import_react20.useEffect)(() => {
75910
- var _a, _b, _c;
78816
+ var _a3, _b, _c;
75911
78817
  if (Object.keys(ui.componentList).length > 0) {
75912
78818
  const matchedComponents = [];
75913
78819
  let _componentList;
@@ -75922,13 +78828,13 @@ var require_dist2 = __commonJS({
75922
78828
  id: categoryKey,
75923
78829
  title: category.title || categoryKey,
75924
78830
  children: category.components.map((componentName, i2) => {
75925
- var _a2;
78831
+ var _a22;
75926
78832
  matchedComponents.push(componentName);
75927
78833
  const componentConf = config.components[componentName] || {};
75928
78834
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
75929
78835
  ComponentList.Item,
75930
78836
  {
75931
- label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
78837
+ label: (_a22 = componentConf["label"]) != null ? _a22 : componentName,
75932
78838
  name: componentName,
75933
78839
  index: i2
75934
78840
  },
@@ -75943,7 +78849,7 @@ var require_dist2 = __commonJS({
75943
78849
  const remainingComponents = Object.keys(config.components).filter(
75944
78850
  (component) => matchedComponents.indexOf(component) === -1
75945
78851
  );
75946
- if (remainingComponents.length > 0 && !((_a = ui.componentList.other) == null ? void 0 : _a.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
78852
+ if (remainingComponents.length > 0 && !((_a3 = ui.componentList.other) == null ? void 0 : _a3.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
75947
78853
  _componentList.push(
75948
78854
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
75949
78855
  ComponentList,
@@ -75951,13 +78857,13 @@ var require_dist2 = __commonJS({
75951
78857
  id: "other",
75952
78858
  title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
75953
78859
  children: remainingComponents.map((componentName, i2) => {
75954
- var _a2;
78860
+ var _a22;
75955
78861
  const componentConf = config.components[componentName] || {};
75956
78862
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
75957
78863
  ComponentList.Item,
75958
78864
  {
75959
78865
  name: componentName,
75960
- label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
78866
+ label: (_a22 = componentConf["label"]) != null ? _a22 : componentName,
75961
78867
  index: i2
75962
78868
  },
75963
78869
  componentName
@@ -75985,15 +78891,15 @@ var require_dist2 = __commonJS({
75985
78891
  var import_react222 = require("react");
75986
78892
  var import_auto_frame_component = __toESM2(require_dist());
75987
78893
  init_react_import2();
75988
- var styles_module_default16 = { "PuckPreview": "_PuckPreview_1mia0_1", "PuckPreview-frame": "_PuckPreview-frame_1mia0_5" };
78894
+ var styles_module_default16 = { "PuckPreview": "_PuckPreview_rxwlr_1", "PuckPreview-frame": "_PuckPreview-frame_rxwlr_5" };
75989
78895
  var import_jsx_runtime29 = require("react/jsx-runtime");
75990
78896
  var getClassName21 = get_class_name_factory_default2("PuckPreview", styles_module_default16);
75991
78897
  var Preview = ({ id = "puck-preview" }) => {
75992
78898
  const { config, dispatch, state, setStatus, iframe } = useAppContext2();
75993
78899
  const Page = (0, import_react222.useCallback)(
75994
78900
  (pageProps) => {
75995
- var _a, _b;
75996
- return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps2(__spreadValues2({
78901
+ var _a3, _b;
78902
+ return ((_a3 = config.root) == null ? void 0 : _a3.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps2(__spreadValues2({
75997
78903
  id: "puck-root"
75998
78904
  }, pageProps), {
75999
78905
  editMode: true,
@@ -76059,9 +78965,9 @@ var require_dist2 = __commonJS({
76059
78965
  var import_react23 = require("react");
76060
78966
  init_react_import2();
76061
78967
  var isChildOfZone = (item, maybeChild, ctx) => {
76062
- var _a;
78968
+ var _a3;
76063
78969
  const { data, pathData = {} } = ctx || {};
76064
- return maybeChild && data ? !!((_a = pathData[maybeChild.props.id]) == null ? void 0 : _a.path.find((zoneCompound) => {
78970
+ return maybeChild && data ? !!((_a3 = pathData[maybeChild.props.id]) == null ? void 0 : _a3.path.find((zoneCompound) => {
76065
78971
  const [area] = getZoneId2(zoneCompound);
76066
78972
  return area === item.props.id;
76067
78973
  })) : false;
@@ -76089,7 +78995,7 @@ var require_dist2 = __commonJS({
76089
78995
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("ul", { className: getClassName222(), children: [
76090
78996
  zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassName222("helper"), children: "No items" }),
76091
78997
  zoneContent.map((item, i2) => {
76092
- var _a;
78998
+ var _a3;
76093
78999
  const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i2 && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId2 && !zone);
76094
79000
  const zonesForItem = findZonesForArea(data, item.props.id);
76095
79001
  const containsZone = Object.keys(zonesForItem).length > 0;
@@ -76155,7 +79061,7 @@ var require_dist2 = __commonJS({
76155
79061
  ),
76156
79062
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: getClassNameLayer("title"), children: [
76157
79063
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LayoutGrid, { size: "16" }) }),
76158
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("name"), children: (_a = config.components[item.type]["label"]) != null ? _a : item.type })
79064
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("name"), children: (_a3 = config.components[item.type]["label"]) != null ? _a3 : item.type })
76159
79065
  ] })
76160
79066
  ]
76161
79067
  }
@@ -76264,11 +79170,11 @@ var require_dist2 = __commonJS({
76264
79170
  historyStore
76265
79171
  }) {
76266
79172
  const back = () => {
76267
- var _a;
79173
+ var _a3;
76268
79174
  if (historyStore.hasPast) {
76269
79175
  dispatch({
76270
79176
  type: "set",
76271
- state: ((_a = historyStore.prevHistory) == null ? void 0 : _a.data) || initialAppState
79177
+ state: ((_a3 = historyStore.prevHistory) == null ? void 0 : _a3.data) || initialAppState
76272
79178
  });
76273
79179
  historyStore.back();
76274
79180
  }
@@ -76497,7 +79403,7 @@ var require_dist2 = __commonJS({
76497
79403
  onViewportChange,
76498
79404
  onZoom
76499
79405
  }) => {
76500
- var _a, _b;
79406
+ var _a3, _b;
76501
79407
  const { viewports } = useAppContext2();
76502
79408
  const defaultsContainAutoZoom = defaultZoomOptions.find(
76503
79409
  (option) => option.value === autoZoom
@@ -76531,7 +79437,7 @@ var require_dist2 = __commonJS({
76531
79437
  IconButton,
76532
79438
  {
76533
79439
  title: "Zoom viewport out",
76534
- disabled: zoom <= ((_a = zoomOptions[0]) == null ? void 0 : _a.value),
79440
+ disabled: zoom <= ((_a3 = zoomOptions[0]) == null ? void 0 : _a3.value),
76535
79441
  onClick: (e2) => {
76536
79442
  e2.stopPropagation();
76537
79443
  onZoom(
@@ -76713,7 +79619,7 @@ var require_dist2 = __commonJS({
76713
79619
  {
76714
79620
  className: getClassName24("root"),
76715
79621
  style: {
76716
- width: iframe.enabled ? ui.viewports.current.width : void 0,
79622
+ width: iframe.enabled ? ui.viewports.current.width : "100%",
76717
79623
  height: zoomConfig.rootHeight,
76718
79624
  transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
76719
79625
  transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
@@ -76747,13 +79653,13 @@ var require_dist2 = __commonJS({
76747
79653
  enabled: true
76748
79654
  }
76749
79655
  }) {
76750
- var _a;
79656
+ var _a3;
76751
79657
  const historyStore = useHistoryStore();
76752
79658
  const [reducer2] = (0, import_react28.useState)(
76753
79659
  () => createReducer({ config, record: historyStore.record })
76754
79660
  );
76755
79661
  const [initialAppState] = (0, import_react28.useState)(() => {
76756
- var _a2, _b, _c, _d;
79662
+ var _a22, _b, _c, _d;
76757
79663
  const initial = __spreadValues2(__spreadValues2({}, defaultAppState2.ui), initialUi);
76758
79664
  let clientUiState = {};
76759
79665
  if (typeof window !== "undefined") {
@@ -76773,7 +79679,7 @@ var require_dist2 = __commonJS({
76773
79679
  clientUiState = {
76774
79680
  viewports: __spreadProps2(__spreadValues2({}, initial.viewports), {
76775
79681
  current: __spreadProps2(__spreadValues2({}, initial.viewports.current), {
76776
- height: ((_b = (_a2 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a2.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
79682
+ height: ((_b = (_a22 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a22.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
76777
79683
  width: ((_d = (_c = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _c.current) == null ? void 0 : _d.width) || viewports[closestViewport].width
76778
79684
  })
76779
79685
  })
@@ -76886,8 +79792,8 @@ var require_dist2 = __commonJS({
76886
79792
  console.warn(
76887
79793
  "`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
76888
79794
  );
76889
- const RenderHeader = (_a2) => {
76890
- var _b = _a2, { actions } = _b, props = __objRest2(_b, ["actions"]);
79795
+ const RenderHeader = (_a22) => {
79796
+ var _b = _a22, { actions } = _b, props = __objRest2(_b, ["actions"]);
76891
79797
  const Comp = renderHeader;
76892
79798
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
76893
79799
  };
@@ -77106,7 +80012,7 @@ var require_dist2 = __commonJS({
77106
80012
  noPadding: true,
77107
80013
  noBorderTop: true,
77108
80014
  showBreadcrumbs: true,
77109
- title: selectedItem ? (_a = config.components[selectedItem.type]["label"]) != null ? _a : selectedItem.type : "Page",
80015
+ title: selectedItem ? (_a3 = config.components[selectedItem.type]["label"]) != null ? _a3 : selectedItem.type : "Page",
77110
80016
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Fields, {})
77111
80017
  }
77112
80018
  ) })
@@ -77138,10 +80044,10 @@ var require_dist2 = __commonJS({
77138
80044
  config,
77139
80045
  data
77140
80046
  }) {
77141
- var _a;
80047
+ var _a3;
77142
80048
  const rootProps = data.root.props || data.root;
77143
80049
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
77144
- if ((_a = config.root) == null ? void 0 : _a.render) {
80050
+ if ((_a3 = config.root) == null ? void 0 : _a3.render) {
77145
80051
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
77146
80052
  config.root.render,
77147
80053
  __spreadProps2(__spreadValues2({}, rootProps), {
@@ -77211,7 +80117,7 @@ var require_dist2 = __commonJS({
77211
80117
  }
77212
80118
  init_react_import2();
77213
80119
  function resolveAllData(data, config, onResolveStart, onResolveEnd) {
77214
- return __async(this, null, function* () {
80120
+ return __async2(this, null, function* () {
77215
80121
  const dynamicRoot = yield resolveRootData(data, config);
77216
80122
  const { zones = {} } = data;
77217
80123
  const zoneKeys = Object.keys(zones);
@@ -77409,8 +80315,8 @@ var defaultAttributes = {
77409
80315
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
77410
80316
  var createLucideIcon = (iconName, iconNode) => {
77411
80317
  const Component = (0, import_react8.forwardRef)(
77412
- (_a, ref2) => {
77413
- var _b = _a, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
80318
+ (_a3, ref2) => {
80319
+ var _b = _a3, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
77414
80320
  return (0, import_react8.createElement)(
77415
80321
  "svg",
77416
80322
  __spreadValues(__spreadProps(__spreadValues({
@@ -77470,10 +80376,10 @@ var setupZone = (data, zoneKey) => {
77470
80376
  var getItem = (selector, data, dynamicProps = {}) => {
77471
80377
  if (!selector.zone || selector.zone === rootDroppableId) {
77472
80378
  const item2 = data.content[selector.index];
77473
- return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
80379
+ return (item2 == null ? void 0 : item2.props) ? __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props }) : void 0;
77474
80380
  }
77475
80381
  const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
77476
- return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
80382
+ return (item == null ? void 0 : item.props) ? __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props }) : void 0;
77477
80383
  };
77478
80384
 
77479
80385
  // ../core/lib/get-zone-id.ts
@@ -77505,6 +80411,7 @@ var defaultViewports = [
77505
80411
  ];
77506
80412
 
77507
80413
  // ../core/components/Puck/context.tsx
80414
+ var import_ua_parser_js = __toESM(require_ua_parser());
77508
80415
  var import_jsx_runtime4 = require("react/jsx-runtime");
77509
80416
  var defaultAppState = {
77510
80417
  data: { content: [], root: { props: { title: "" } } },
@@ -77544,7 +80451,8 @@ var defaultContext = {
77544
80451
  setZoomConfig: () => null,
77545
80452
  status: "LOADING",
77546
80453
  setStatus: () => null,
77547
- iframe: {}
80454
+ iframe: {},
80455
+ safariFallbackMode: false
77548
80456
  };
77549
80457
  var appContext = (0, import_react10.createContext)(defaultContext);
77550
80458
  function useAppContext() {
@@ -77742,7 +80650,7 @@ var getOutline = ({
77742
80650
  return _outline;
77743
80651
  };
77744
80652
  function buildHierarchy(frame) {
77745
- var _a, _b;
80653
+ var _a3, _b;
77746
80654
  const headings = getOutline({ addDataAttr: true, frame });
77747
80655
  const root = { rank: 0, children: [], text: "" };
77748
80656
  let path = [root];
@@ -77766,7 +80674,7 @@ function buildHierarchy(frame) {
77766
80674
  children: [],
77767
80675
  text: ""
77768
80676
  };
77769
- (_a = path[path.length - 1].children) == null ? void 0 : _a.push(missingNode);
80677
+ (_a3 = path[path.length - 1].children) == null ? void 0 : _a3.push(missingNode);
77770
80678
  path.push(missingNode);
77771
80679
  }
77772
80680
  }