@radioactive-labs/plutonium 0.49.1 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -134,10 +134,10 @@
134
134
  "node_modules/lodash/_objectToString.js"(exports, module) {
135
135
  var objectProto = Object.prototype;
136
136
  var nativeObjectToString = objectProto.toString;
137
- function objectToString(value) {
137
+ function objectToString2(value) {
138
138
  return nativeObjectToString.call(value);
139
139
  }
140
- module.exports = objectToString;
140
+ module.exports = objectToString2;
141
141
  }
142
142
  });
143
143
 
@@ -146,7 +146,7 @@
146
146
  "node_modules/lodash/_baseGetTag.js"(exports, module) {
147
147
  var Symbol2 = require_Symbol();
148
148
  var getRawTag = require_getRawTag();
149
- var objectToString = require_objectToString();
149
+ var objectToString2 = require_objectToString();
150
150
  var nullTag = "[object Null]";
151
151
  var undefinedTag = "[object Undefined]";
152
152
  var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
@@ -154,7 +154,7 @@
154
154
  if (value == null) {
155
155
  return value === void 0 ? undefinedTag : nullTag;
156
156
  }
157
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
157
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString2(value);
158
158
  }
159
159
  module.exports = baseGetTag;
160
160
  }
@@ -364,11 +364,11 @@
364
364
  var keep = [];
365
365
  if (event && fn3) {
366
366
  var fns = this._fns[event];
367
- var i5 = 0;
367
+ var i4 = 0;
368
368
  var l4 = fns ? fns.length : 0;
369
- for (i5; i5 < l4; i5++) {
370
- if (fns[i5] !== fn3) {
371
- keep.push(fns[i5]);
369
+ for (i4; i4 < l4; i4++) {
370
+ if (fns[i4] !== fn3) {
371
+ keep.push(fns[i4]);
372
372
  }
373
373
  }
374
374
  }
@@ -379,10 +379,10 @@
379
379
  var idx = e4.indexOf(":");
380
380
  var args = idx === -1 ? [e4] : [e4.substring(0, idx), e4.substring(idx + 1)];
381
381
  var keys = Object.keys(_fns);
382
- var i5 = 0;
382
+ var i4 = 0;
383
383
  var l4 = keys.length;
384
- for (i5; i5 < l4; i5++) {
385
- var key = keys[i5];
384
+ for (i4; i4 < l4; i4++) {
385
+ var key = keys[i4];
386
386
  if (key === "*") {
387
387
  out = out.concat(_fns[key]);
388
388
  }
@@ -394,13 +394,12 @@
394
394
  return out;
395
395
  }
396
396
  function emitAll(e4, fns, args) {
397
- var i5 = 0;
397
+ var i4 = 0;
398
398
  var l4 = fns.length;
399
- for (i5; i5 < l4; i5++) {
400
- if (!fns[i5])
401
- break;
402
- fns[i5].event = e4;
403
- fns[i5].apply(fns[i5], args);
399
+ for (i4; i4 < l4; i4++) {
400
+ if (!fns[i4]) break;
401
+ fns[i4].event = e4;
402
+ fns[i4].apply(fns[i4], args);
404
403
  }
405
404
  }
406
405
  return emitter;
@@ -515,8 +514,8 @@
515
514
  var hasOwn = {}.hasOwnProperty;
516
515
  function classNames15() {
517
516
  var classes = "";
518
- for (var i5 = 0; i5 < arguments.length; i5++) {
519
- var arg = arguments[i5];
517
+ for (var i4 = 0; i4 < arguments.length; i4++) {
518
+ var arg = arguments[i4];
520
519
  if (arg) {
521
520
  classes = appendClass(classes, parseValue(arg));
522
521
  }
@@ -577,8 +576,7 @@
577
576
  }
578
577
  if (Object.create) {
579
578
  Events.prototype = /* @__PURE__ */ Object.create(null);
580
- if (!new Events().__proto__)
581
- prefix = false;
579
+ if (!new Events().__proto__) prefix = false;
582
580
  }
583
581
  function EE(fn3, context, once) {
584
582
  this.fn = fn3;
@@ -590,19 +588,14 @@
590
588
  throw new TypeError("The listener must be a function");
591
589
  }
592
590
  var listener = new EE(fn3, context || emitter, once), evt = prefix ? prefix + event : event;
593
- if (!emitter._events[evt])
594
- emitter._events[evt] = listener, emitter._eventsCount++;
595
- else if (!emitter._events[evt].fn)
596
- emitter._events[evt].push(listener);
597
- else
598
- emitter._events[evt] = [emitter._events[evt], listener];
591
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
592
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
593
+ else emitter._events[evt] = [emitter._events[evt], listener];
599
594
  return emitter;
600
595
  }
601
596
  function clearEvent(emitter, evt) {
602
- if (--emitter._eventsCount === 0)
603
- emitter._events = new Events();
604
- else
605
- delete emitter._events[evt];
597
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
598
+ else delete emitter._events[evt];
606
599
  }
607
600
  function EventEmitter2() {
608
601
  this._events = new Events();
@@ -610,11 +603,9 @@
610
603
  }
611
604
  EventEmitter2.prototype.eventNames = function eventNames() {
612
605
  var names = [], events, name;
613
- if (this._eventsCount === 0)
614
- return names;
606
+ if (this._eventsCount === 0) return names;
615
607
  for (name in events = this._events) {
616
- if (has.call(events, name))
617
- names.push(prefix ? name.slice(1) : name);
608
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
618
609
  }
619
610
  if (Object.getOwnPropertySymbols) {
620
611
  return names.concat(Object.getOwnPropertySymbols(events));
@@ -623,31 +614,25 @@
623
614
  };
624
615
  EventEmitter2.prototype.listeners = function listeners(event) {
625
616
  var evt = prefix ? prefix + event : event, handlers = this._events[evt];
626
- if (!handlers)
627
- return [];
628
- if (handlers.fn)
629
- return [handlers.fn];
630
- for (var i5 = 0, l4 = handlers.length, ee3 = new Array(l4); i5 < l4; i5++) {
631
- ee3[i5] = handlers[i5].fn;
617
+ if (!handlers) return [];
618
+ if (handlers.fn) return [handlers.fn];
619
+ for (var i4 = 0, l4 = handlers.length, ee3 = new Array(l4); i4 < l4; i4++) {
620
+ ee3[i4] = handlers[i4].fn;
632
621
  }
633
622
  return ee3;
634
623
  };
635
624
  EventEmitter2.prototype.listenerCount = function listenerCount(event) {
636
625
  var evt = prefix ? prefix + event : event, listeners = this._events[evt];
637
- if (!listeners)
638
- return 0;
639
- if (listeners.fn)
640
- return 1;
626
+ if (!listeners) return 0;
627
+ if (listeners.fn) return 1;
641
628
  return listeners.length;
642
629
  };
643
630
  EventEmitter2.prototype.emit = function emit(event, a1, a22, a32, a4, a5) {
644
631
  var evt = prefix ? prefix + event : event;
645
- if (!this._events[evt])
646
- return false;
647
- var listeners = this._events[evt], len = arguments.length, args, i5;
632
+ if (!this._events[evt]) return false;
633
+ var listeners = this._events[evt], len = arguments.length, args, i4;
648
634
  if (listeners.fn) {
649
- if (listeners.once)
650
- this.removeListener(event, listeners.fn, void 0, true);
635
+ if (listeners.once) this.removeListener(event, listeners.fn, void 0, true);
651
636
  switch (len) {
652
637
  case 1:
653
638
  return listeners.fn.call(listeners.context), true;
@@ -662,34 +647,32 @@
662
647
  case 6:
663
648
  return listeners.fn.call(listeners.context, a1, a22, a32, a4, a5), true;
664
649
  }
665
- for (i5 = 1, args = new Array(len - 1); i5 < len; i5++) {
666
- args[i5 - 1] = arguments[i5];
650
+ for (i4 = 1, args = new Array(len - 1); i4 < len; i4++) {
651
+ args[i4 - 1] = arguments[i4];
667
652
  }
668
653
  listeners.fn.apply(listeners.context, args);
669
654
  } else {
670
655
  var length = listeners.length, j5;
671
- for (i5 = 0; i5 < length; i5++) {
672
- if (listeners[i5].once)
673
- this.removeListener(event, listeners[i5].fn, void 0, true);
656
+ for (i4 = 0; i4 < length; i4++) {
657
+ if (listeners[i4].once) this.removeListener(event, listeners[i4].fn, void 0, true);
674
658
  switch (len) {
675
659
  case 1:
676
- listeners[i5].fn.call(listeners[i5].context);
660
+ listeners[i4].fn.call(listeners[i4].context);
677
661
  break;
678
662
  case 2:
679
- listeners[i5].fn.call(listeners[i5].context, a1);
663
+ listeners[i4].fn.call(listeners[i4].context, a1);
680
664
  break;
681
665
  case 3:
682
- listeners[i5].fn.call(listeners[i5].context, a1, a22);
666
+ listeners[i4].fn.call(listeners[i4].context, a1, a22);
683
667
  break;
684
668
  case 4:
685
- listeners[i5].fn.call(listeners[i5].context, a1, a22, a32);
669
+ listeners[i4].fn.call(listeners[i4].context, a1, a22, a32);
686
670
  break;
687
671
  default:
688
- if (!args)
689
- for (j5 = 1, args = new Array(len - 1); j5 < len; j5++) {
690
- args[j5 - 1] = arguments[j5];
691
- }
692
- listeners[i5].fn.apply(listeners[i5].context, args);
672
+ if (!args) for (j5 = 1, args = new Array(len - 1); j5 < len; j5++) {
673
+ args[j5 - 1] = arguments[j5];
674
+ }
675
+ listeners[i4].fn.apply(listeners[i4].context, args);
693
676
  }
694
677
  }
695
678
  }
@@ -703,8 +686,7 @@
703
686
  };
704
687
  EventEmitter2.prototype.removeListener = function removeListener(event, fn3, context, once) {
705
688
  var evt = prefix ? prefix + event : event;
706
- if (!this._events[evt])
707
- return this;
689
+ if (!this._events[evt]) return this;
708
690
  if (!fn3) {
709
691
  clearEvent(this, evt);
710
692
  return this;
@@ -715,15 +697,13 @@
715
697
  clearEvent(this, evt);
716
698
  }
717
699
  } else {
718
- for (var i5 = 0, events = [], length = listeners.length; i5 < length; i5++) {
719
- if (listeners[i5].fn !== fn3 || once && !listeners[i5].once || context && listeners[i5].context !== context) {
720
- events.push(listeners[i5]);
700
+ for (var i4 = 0, events = [], length = listeners.length; i4 < length; i4++) {
701
+ if (listeners[i4].fn !== fn3 || once && !listeners[i4].once || context && listeners[i4].context !== context) {
702
+ events.push(listeners[i4]);
721
703
  }
722
704
  }
723
- if (events.length)
724
- this._events[evt] = events.length === 1 ? events[0] : events;
725
- else
726
- clearEvent(this, evt);
705
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
706
+ else clearEvent(this, evt);
727
707
  }
728
708
  return this;
729
709
  };
@@ -731,8 +711,7 @@
731
711
  var evt;
732
712
  if (event) {
733
713
  evt = prefix ? prefix + event : event;
734
- if (this._events[evt])
735
- clearEvent(this, evt);
714
+ if (this._events[evt]) clearEvent(this, evt);
736
715
  } else {
737
716
  this._events = new Events();
738
717
  this._eventsCount = 0;
@@ -754,7 +733,7 @@
754
733
  "node_modules/cropperjs/dist/cropper.js"(exports, module) {
755
734
  (function(global2, factory) {
756
735
  typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.Cropper = factory());
757
- })(exports, function() {
736
+ })(exports, (function() {
758
737
  "use strict";
759
738
  function ownKeys(e4, r4) {
760
739
  var t4 = Object.keys(e4);
@@ -778,20 +757,18 @@
778
757
  return e4;
779
758
  }
780
759
  function _toPrimitive(t4, r4) {
781
- if ("object" != typeof t4 || !t4)
782
- return t4;
760
+ if ("object" != typeof t4 || !t4) return t4;
783
761
  var e4 = t4[Symbol.toPrimitive];
784
762
  if (void 0 !== e4) {
785
- var i5 = e4.call(t4, r4 || "default");
786
- if ("object" != typeof i5)
787
- return i5;
763
+ var i4 = e4.call(t4, r4 || "default");
764
+ if ("object" != typeof i4) return i4;
788
765
  throw new TypeError("@@toPrimitive must return a primitive value.");
789
766
  }
790
767
  return ("string" === r4 ? String : Number)(t4);
791
768
  }
792
769
  function _toPropertyKey(t4) {
793
- var i5 = _toPrimitive(t4, "string");
794
- return "symbol" == typeof i5 ? i5 : i5 + "";
770
+ var i4 = _toPrimitive(t4, "string");
771
+ return "symbol" == typeof i4 ? i4 : i4 + "";
795
772
  }
796
773
  function _typeof(o4) {
797
774
  "@babel/helpers - typeof";
@@ -807,20 +784,17 @@
807
784
  }
808
785
  }
809
786
  function _defineProperties(target, props) {
810
- for (var i5 = 0; i5 < props.length; i5++) {
811
- var descriptor = props[i5];
787
+ for (var i4 = 0; i4 < props.length; i4++) {
788
+ var descriptor = props[i4];
812
789
  descriptor.enumerable = descriptor.enumerable || false;
813
790
  descriptor.configurable = true;
814
- if ("value" in descriptor)
815
- descriptor.writable = true;
791
+ if ("value" in descriptor) descriptor.writable = true;
816
792
  Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
817
793
  }
818
794
  }
819
795
  function _createClass(Constructor, protoProps, staticProps) {
820
- if (protoProps)
821
- _defineProperties(Constructor.prototype, protoProps);
822
- if (staticProps)
823
- _defineProperties(Constructor, staticProps);
796
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
797
+ if (staticProps) _defineProperties(Constructor, staticProps);
824
798
  Object.defineProperty(Constructor, "prototype", {
825
799
  writable: false
826
800
  });
@@ -841,34 +815,25 @@
841
815
  return obj;
842
816
  }
843
817
  function _toConsumableArray(arr) {
844
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
818
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray2(arr) || _nonIterableSpread();
845
819
  }
846
820
  function _arrayWithoutHoles(arr) {
847
- if (Array.isArray(arr))
848
- return _arrayLikeToArray(arr);
821
+ if (Array.isArray(arr)) return _arrayLikeToArray2(arr);
849
822
  }
850
823
  function _iterableToArray(iter) {
851
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
852
- return Array.from(iter);
824
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
853
825
  }
854
- function _unsupportedIterableToArray(o4, minLen) {
855
- if (!o4)
856
- return;
857
- if (typeof o4 === "string")
858
- return _arrayLikeToArray(o4, minLen);
826
+ function _unsupportedIterableToArray2(o4, minLen) {
827
+ if (!o4) return;
828
+ if (typeof o4 === "string") return _arrayLikeToArray2(o4, minLen);
859
829
  var n3 = Object.prototype.toString.call(o4).slice(8, -1);
860
- if (n3 === "Object" && o4.constructor)
861
- n3 = o4.constructor.name;
862
- if (n3 === "Map" || n3 === "Set")
863
- return Array.from(o4);
864
- if (n3 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3))
865
- return _arrayLikeToArray(o4, minLen);
866
- }
867
- function _arrayLikeToArray(arr, len) {
868
- if (len == null || len > arr.length)
869
- len = arr.length;
870
- for (var i5 = 0, arr2 = new Array(len); i5 < len; i5++)
871
- arr2[i5] = arr[i5];
830
+ if (n3 === "Object" && o4.constructor) n3 = o4.constructor.name;
831
+ if (n3 === "Map" || n3 === "Set") return Array.from(o4);
832
+ if (n3 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3)) return _arrayLikeToArray2(o4, minLen);
833
+ }
834
+ function _arrayLikeToArray2(arr, len) {
835
+ if (len == null || len > arr.length) len = arr.length;
836
+ for (var i4 = 0, arr2 = new Array(len); i4 < len; i4++) arr2[i4] = arr[i4];
872
837
  return arr2;
873
838
  }
874
839
  function _nonIterableSpread() {
@@ -1173,7 +1138,7 @@
1173
1138
  }
1174
1139
  }
1175
1140
  var REGEXP_SPACES = /\s\s*/;
1176
- var onceSupported = function() {
1141
+ var onceSupported = (function() {
1177
1142
  var supported = false;
1178
1143
  if (IS_BROWSER) {
1179
1144
  var once = false;
@@ -1197,7 +1162,7 @@
1197
1162
  WINDOW.removeEventListener("test", listener, options2);
1198
1163
  }
1199
1164
  return supported;
1200
- }();
1165
+ })();
1201
1166
  function removeListener(element, type, listener) {
1202
1167
  var options2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1203
1168
  var handler = listener;
@@ -1275,8 +1240,8 @@
1275
1240
  var timestamp = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
1276
1241
  return url + (url.indexOf("?") === -1 ? "?" : "&") + timestamp;
1277
1242
  }
1278
- function getTransforms(_ref) {
1279
- var rotate = _ref.rotate, scaleX = _ref.scaleX, scaleY = _ref.scaleY, translateX = _ref.translateX, translateY = _ref.translateY;
1243
+ function getTransforms(_ref2) {
1244
+ var rotate = _ref2.rotate, scaleX = _ref2.scaleX, scaleY = _ref2.scaleY, translateX = _ref2.translateX, translateY = _ref2.translateY;
1280
1245
  var values = [];
1281
1246
  if (isNumber(translateX) && translateX !== 0) {
1282
1247
  values.push("translateX(".concat(translateX, "px)"));
@@ -1443,8 +1408,8 @@
1443
1408
  function getStringFromCharCode(dataView, start3, length) {
1444
1409
  var str = "";
1445
1410
  length += start3;
1446
- for (var i5 = start3; i5 < length; i5 += 1) {
1447
- str += fromCharCode(dataView.getUint8(i5));
1411
+ for (var i4 = start3; i4 < length; i4 += 1) {
1412
+ str += fromCharCode(dataView.getUint8(i4));
1448
1413
  }
1449
1414
  return str;
1450
1415
  }
@@ -1454,8 +1419,8 @@
1454
1419
  var binary = atob(base64);
1455
1420
  var arrayBuffer = new ArrayBuffer(binary.length);
1456
1421
  var uint8 = new Uint8Array(arrayBuffer);
1457
- forEach(uint8, function(value, i5) {
1458
- uint8[i5] = binary.charCodeAt(i5);
1422
+ forEach(uint8, function(value, i4) {
1423
+ uint8[i4] = binary.charCodeAt(i4);
1459
1424
  });
1460
1425
  return arrayBuffer;
1461
1426
  }
@@ -1506,9 +1471,9 @@
1506
1471
  if (ifdStart) {
1507
1472
  var _length = dataView.getUint16(ifdStart, littleEndian);
1508
1473
  var _offset;
1509
- var i5;
1510
- for (i5 = 0; i5 < _length; i5 += 1) {
1511
- _offset = ifdStart + i5 * 12 + 2;
1474
+ var i4;
1475
+ for (i4 = 0; i4 < _length; i4 += 1) {
1476
+ _offset = ifdStart + i4 * 12 + 2;
1512
1477
  if (dataView.getUint16(_offset, littleEndian) === 274) {
1513
1478
  _offset += 8;
1514
1479
  orientation = dataView.getUint16(_offset, littleEndian);
@@ -1527,26 +1492,33 @@
1527
1492
  var scaleX = 1;
1528
1493
  var scaleY = 1;
1529
1494
  switch (orientation) {
1495
+ // Flip horizontal
1530
1496
  case 2:
1531
1497
  scaleX = -1;
1532
1498
  break;
1499
+ // Rotate left 180°
1533
1500
  case 3:
1534
1501
  rotate = -180;
1535
1502
  break;
1503
+ // Flip vertical
1536
1504
  case 4:
1537
1505
  scaleY = -1;
1538
1506
  break;
1507
+ // Flip vertical and rotate right 90°
1539
1508
  case 5:
1540
1509
  rotate = 90;
1541
1510
  scaleY = -1;
1542
1511
  break;
1512
+ // Rotate right 90°
1543
1513
  case 6:
1544
1514
  rotate = 90;
1545
1515
  break;
1516
+ // Flip horizontal and rotate right 90°
1546
1517
  case 7:
1547
1518
  rotate = 90;
1548
1519
  scaleX = -1;
1549
1520
  break;
1521
+ // Rotate left 90°
1550
1522
  case 8:
1551
1523
  rotate = -90;
1552
1524
  break;
@@ -2061,11 +2033,11 @@
2061
2033
  }
2062
2034
  this.render();
2063
2035
  if (options2.restore) {
2064
- this.setCanvasData(forEach(canvasData, function(n3, i5) {
2065
- canvasData[i5] = n3 * ratio;
2036
+ this.setCanvasData(forEach(canvasData, function(n3, i4) {
2037
+ canvasData[i4] = n3 * ratio;
2066
2038
  }));
2067
- this.setCropBoxData(forEach(cropBoxData, function(n3, i5) {
2068
- cropBoxData[i5] = n3 * ratio;
2039
+ this.setCropBoxData(forEach(cropBoxData, function(n3, i4) {
2040
+ cropBoxData[i4] = n3 * ratio;
2069
2041
  }));
2070
2042
  }
2071
2043
  }
@@ -2241,10 +2213,12 @@
2241
2213
  }
2242
2214
  };
2243
2215
  switch (action) {
2216
+ // Move crop box
2244
2217
  case ACTION_ALL:
2245
2218
  left2 += range.x;
2246
2219
  top2 += range.y;
2247
2220
  break;
2221
+ // Resize crop box
2248
2222
  case ACTION_EAST:
2249
2223
  if (range.x >= 0 && (right2 >= maxWidth || aspectRatio && (top2 <= minTop || bottom2 >= maxHeight))) {
2250
2224
  renderable = false;
@@ -2507,14 +2481,17 @@
2507
2481
  top2 -= height;
2508
2482
  }
2509
2483
  break;
2484
+ // Move canvas
2510
2485
  case ACTION_MOVE:
2511
2486
  this.move(range.x, range.y);
2512
2487
  renderable = false;
2513
2488
  break;
2489
+ // Zoom canvas
2514
2490
  case ACTION_ZOOM:
2515
2491
  this.zoom(getMaxZoomRatio(pointers), event);
2516
2492
  renderable = false;
2517
2493
  break;
2494
+ // Create crop box
2518
2495
  case ACTION_CROP:
2519
2496
  if (!range.x || !range.y) {
2520
2497
  renderable = false;
@@ -2846,8 +2823,8 @@
2846
2823
  height: cropBoxData.height
2847
2824
  };
2848
2825
  var ratio = imageData.width / imageData.naturalWidth;
2849
- forEach(data, function(n3, i5) {
2850
- data[i5] = n3 / ratio;
2826
+ forEach(data, function(n3, i4) {
2827
+ data[i4] = n3 / ratio;
2851
2828
  });
2852
2829
  if (rounded) {
2853
2830
  var bottom2 = Math.round(data.y + data.height);
@@ -3172,7 +3149,7 @@
3172
3149
  }
3173
3150
  };
3174
3151
  var AnotherCropper = WINDOW.Cropper;
3175
- var Cropper2 = /* @__PURE__ */ function() {
3152
+ var Cropper2 = /* @__PURE__ */ (function() {
3176
3153
  function Cropper3(element) {
3177
3154
  var options2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3178
3155
  _classCallCheck(this, Cropper3);
@@ -3483,10 +3460,10 @@
3483
3460
  assign2(DEFAULTS, isPlainObject(options2) && options2);
3484
3461
  }
3485
3462
  }]);
3486
- }();
3463
+ })();
3487
3464
  assign2(Cropper2.prototype, render, preview, events, handlers, change, methods);
3488
3465
  return Cropper2;
3489
- });
3466
+ }));
3490
3467
  }
3491
3468
  });
3492
3469
 
@@ -3773,18 +3750,18 @@
3773
3750
  return lines.map((line) => line.slice(indent)).join("\n");
3774
3751
  }
3775
3752
  function interpolate(strings, values) {
3776
- return strings.reduce((result, string, i5) => {
3777
- const value = values[i5] == void 0 ? "" : values[i5];
3753
+ return strings.reduce((result, string, i4) => {
3754
+ const value = values[i4] == void 0 ? "" : values[i4];
3778
3755
  return result + string + value;
3779
3756
  }, "");
3780
3757
  }
3781
3758
  function uuid() {
3782
- return Array.from({ length: 36 }).map((_4, i5) => {
3783
- if (i5 == 8 || i5 == 13 || i5 == 18 || i5 == 23) {
3759
+ return Array.from({ length: 36 }).map((_4, i4) => {
3760
+ if (i4 == 8 || i4 == 13 || i4 == 18 || i4 == 23) {
3784
3761
  return "-";
3785
- } else if (i5 == 14) {
3762
+ } else if (i4 == 14) {
3786
3763
  return "4";
3787
- } else if (i5 == 19) {
3764
+ } else if (i4 == 19) {
3788
3765
  return (Math.floor(Math.random() * 4) + 8).toString(16);
3789
3766
  } else {
3790
3767
  return Math.floor(Math.random() * 16).toString(16);
@@ -3793,8 +3770,7 @@
3793
3770
  }
3794
3771
  function getAttribute(attributeName, ...elements) {
3795
3772
  for (const value of elements.map((element) => element?.getAttribute(attributeName))) {
3796
- if (typeof value == "string")
3797
- return value;
3773
+ if (typeof value == "string") return value;
3798
3774
  }
3799
3775
  return null;
3800
3776
  }
@@ -3893,8 +3869,7 @@
3893
3869
  return false;
3894
3870
  } else if (name) {
3895
3871
  for (const element of document.getElementsByName(name)) {
3896
- if (element instanceof HTMLIFrameElement)
3897
- return false;
3872
+ if (element instanceof HTMLIFrameElement) return false;
3898
3873
  }
3899
3874
  return true;
3900
3875
  } else {
@@ -3903,15 +3878,11 @@
3903
3878
  }
3904
3879
  function findLinkFromClickTarget(target) {
3905
3880
  const link2 = findClosestRecursively(target, "a[href], a[xlink\\:href]");
3906
- if (!link2)
3907
- return null;
3908
- if (link2.href.startsWith("#"))
3909
- return null;
3910
- if (link2.hasAttribute("download"))
3911
- return null;
3881
+ if (!link2) return null;
3882
+ if (link2.href.startsWith("#")) return null;
3883
+ if (link2.hasAttribute("download")) return null;
3912
3884
  const linkTarget = link2.getAttribute("target");
3913
- if (linkTarget && linkTarget !== "_self")
3914
- return null;
3885
+ if (linkTarget && linkTarget !== "_self") return null;
3915
3886
  return link2;
3916
3887
  }
3917
3888
  function debounce(fn3, delay) {
@@ -4237,8 +4208,7 @@
4237
4208
  target: this.target
4238
4209
  });
4239
4210
  this.url = event.detail.url;
4240
- if (event.defaultPrevented)
4241
- await requestInterception;
4211
+ if (event.defaultPrevented) await requestInterception;
4242
4212
  return event;
4243
4213
  }
4244
4214
  #willDelegateErrorHandling(error2) {
@@ -4266,10 +4236,8 @@
4266
4236
  function entriesExcludingFiles(requestBody) {
4267
4237
  const entries2 = [];
4268
4238
  for (const [name, value] of requestBody) {
4269
- if (value instanceof File)
4270
- continue;
4271
- else
4272
- entries2.push([name, value]);
4239
+ if (value instanceof File) continue;
4240
+ else entries2.push([name, value]);
4273
4241
  }
4274
4242
  return entries2;
4275
4243
  }
@@ -4366,8 +4334,7 @@
4366
4334
  touch(key) {
4367
4335
  key = this.#toCacheKey(key);
4368
4336
  const index = this.keys.indexOf(key);
4369
- if (index > -1)
4370
- this.keys.splice(index, 1);
4337
+ if (index > -1) this.keys.splice(index, 1);
4371
4338
  this.keys.unshift(key);
4372
4339
  this.trim();
4373
4340
  }
@@ -4401,8 +4368,7 @@
4401
4368
  }
4402
4369
  clear() {
4403
4370
  super.clear();
4404
- if (this.#prefetchTimeout)
4405
- clearTimeout(this.#prefetchTimeout);
4371
+ if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);
4406
4372
  }
4407
4373
  evict(key) {
4408
4374
  super.evict(key);
@@ -4505,8 +4471,7 @@
4505
4471
  }
4506
4472
  requestStarted(_request) {
4507
4473
  this.state = FormSubmissionState.waiting;
4508
- if (this.submitter)
4509
- config.forms.submitter.beforeSubmit(this.submitter);
4474
+ if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);
4510
4475
  this.setSubmitsWith();
4511
4476
  markAsBusy(this.formElement);
4512
4477
  dispatch("turbo:submit-start", {
@@ -4544,8 +4509,7 @@
4544
4509
  }
4545
4510
  requestFinished(_request) {
4546
4511
  this.state = FormSubmissionState.stopped;
4547
- if (this.submitter)
4548
- config.forms.submitter.afterSubmit(this.submitter);
4512
+ if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);
4549
4513
  this.resetSubmitterText();
4550
4514
  clearBusyState(this.formElement);
4551
4515
  dispatch("turbo:submit-end", {
@@ -4556,8 +4520,7 @@
4556
4520
  }
4557
4521
  // Private
4558
4522
  setSubmitsWith() {
4559
- if (!this.submitter || !this.submitsWith)
4560
- return;
4523
+ if (!this.submitter || !this.submitsWith) return;
4561
4524
  if (this.submitter.matches("button")) {
4562
4525
  this.originalSubmitText = this.submitter.innerHTML;
4563
4526
  this.submitter.innerHTML = this.submitsWith;
@@ -4568,8 +4531,7 @@
4568
4531
  }
4569
4532
  }
4570
4533
  resetSubmitterText() {
4571
- if (!this.submitter || !this.originalSubmitText)
4572
- return;
4534
+ if (!this.submitter || !this.originalSubmitText) return;
4573
4535
  if (this.submitter.matches("button")) {
4574
4536
  this.submitter.innerHTML = this.originalSubmitText;
4575
4537
  } else if (this.submitter.matches("input")) {
@@ -4776,8 +4738,7 @@
4776
4738
  const renderInterception = new Promise((resolve) => this.#resolveInterceptionPromise = resolve);
4777
4739
  const options2 = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod };
4778
4740
  const immediateRender = this.delegate.allowsImmediateRender(snapshot, options2);
4779
- if (!immediateRender)
4780
- await renderInterception;
4741
+ if (!immediateRender) await renderInterception;
4781
4742
  await this.renderSnapshot(renderer);
4782
4743
  this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);
4783
4744
  this.delegate.preloadOnLoadLinksForView(this.element);
@@ -4939,20 +4900,15 @@
4939
4900
  form.setAttribute("action", action.href);
4940
4901
  form.setAttribute("hidden", "");
4941
4902
  const method = link2.getAttribute("data-turbo-method");
4942
- if (method)
4943
- form.setAttribute("method", method);
4903
+ if (method) form.setAttribute("method", method);
4944
4904
  const turboFrame = link2.getAttribute("data-turbo-frame");
4945
- if (turboFrame)
4946
- form.setAttribute("data-turbo-frame", turboFrame);
4905
+ if (turboFrame) form.setAttribute("data-turbo-frame", turboFrame);
4947
4906
  const turboAction = getVisitAction(link2);
4948
- if (turboAction)
4949
- form.setAttribute("data-turbo-action", turboAction);
4907
+ if (turboAction) form.setAttribute("data-turbo-action", turboAction);
4950
4908
  const turboConfirm = link2.getAttribute("data-turbo-confirm");
4951
- if (turboConfirm)
4952
- form.setAttribute("data-turbo-confirm", turboConfirm);
4909
+ if (turboConfirm) form.setAttribute("data-turbo-confirm", turboConfirm);
4953
4910
  const turboStream = link2.hasAttribute("data-turbo-stream");
4954
- if (turboStream)
4955
- form.setAttribute("data-turbo-stream", "");
4911
+ if (turboStream) form.setAttribute("data-turbo-stream", "");
4956
4912
  this.delegate.submittedFormLinkToLocation(link2, location2, form);
4957
4913
  document.body.appendChild(form);
4958
4914
  form.addEventListener("turbo:submit-end", () => form.remove(), { once: true });
@@ -5055,8 +5011,7 @@
5055
5011
  }
5056
5012
  // Bardo delegate
5057
5013
  enteringBardo(currentPermanentElement) {
5058
- if (this.#activeElement)
5059
- return;
5014
+ if (this.#activeElement) return;
5060
5015
  if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {
5061
5016
  this.#activeElement = this.currentSnapshot.activeElement;
5062
5017
  }
@@ -5153,7 +5108,7 @@
5153
5108
  return defaultValue;
5154
5109
  }
5155
5110
  }
5156
- var Idiomorph = function() {
5111
+ var Idiomorph = (function() {
5157
5112
  const noOp = () => {
5158
5113
  };
5159
5114
  const defaults = {
@@ -5214,8 +5169,7 @@
5214
5169
  return Array.from(oldParent.childNodes);
5215
5170
  }
5216
5171
  function saveAndRestoreFocus(ctx, fn3) {
5217
- if (!ctx.config.restoreFocus)
5218
- return fn3();
5172
+ if (!ctx.config.restoreFocus) return fn3();
5219
5173
  let activeElement = (
5220
5174
  /** @type {HTMLInputElement|HTMLTextAreaElement|null} */
5221
5175
  document.activeElement
@@ -5234,7 +5188,7 @@
5234
5188
  }
5235
5189
  return results;
5236
5190
  }
5237
- const morphChildren2 = /* @__PURE__ */ function() {
5191
+ const morphChildren2 = /* @__PURE__ */ (function() {
5238
5192
  function morphChildren3(ctx, oldParent, newParent, insertionPoint = null, endPoint = null) {
5239
5193
  if (oldParent instanceof HTMLTemplateElement && newParent instanceof HTMLTemplateElement) {
5240
5194
  oldParent = oldParent.content;
@@ -5292,8 +5246,7 @@
5292
5246
  }
5293
5247
  }
5294
5248
  function createNode(oldParent, newChild, insertionPoint, ctx) {
5295
- if (ctx.callbacks.beforeNodeAdded(newChild) === false)
5296
- return null;
5249
+ if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;
5297
5250
  if (ctx.idMap.has(newChild)) {
5298
5251
  const newEmptyChild = document.createElement(
5299
5252
  /** @type {Element} */
@@ -5310,7 +5263,7 @@
5310
5263
  return newClonedChild;
5311
5264
  }
5312
5265
  }
5313
- const findBestMatch = /* @__PURE__ */ function() {
5266
+ const findBestMatch = /* @__PURE__ */ (function() {
5314
5267
  function findBestMatch2(ctx, node, startPoint, endPoint) {
5315
5268
  let softMatch = null;
5316
5269
  let nextSibling = node.nextSibling;
@@ -5334,8 +5287,7 @@
5334
5287
  softMatch = void 0;
5335
5288
  }
5336
5289
  }
5337
- if (ctx.activeElementAndParents.includes(cursor))
5338
- break;
5290
+ if (ctx.activeElementAndParents.includes(cursor)) break;
5339
5291
  cursor = cursor.nextSibling;
5340
5292
  }
5341
5293
  return softMatch || null;
@@ -5343,8 +5295,7 @@
5343
5295
  function isIdSetMatch(ctx, oldNode, newNode) {
5344
5296
  let oldSet = ctx.idMap.get(oldNode);
5345
5297
  let newSet = ctx.idMap.get(newNode);
5346
- if (!newSet || !oldSet)
5347
- return false;
5298
+ if (!newSet || !oldSet) return false;
5348
5299
  for (const id2 of oldSet) {
5349
5300
  if (newSet.has(id2)) {
5350
5301
  return true;
@@ -5368,13 +5319,12 @@
5368
5319
  (!oldElt.getAttribute?.("id") || oldElt.getAttribute?.("id") === newElt.getAttribute?.("id"));
5369
5320
  }
5370
5321
  return findBestMatch2;
5371
- }();
5322
+ })();
5372
5323
  function removeNode(ctx, node) {
5373
5324
  if (ctx.idMap.has(node)) {
5374
5325
  moveBefore(ctx.pantry, node, null);
5375
5326
  } else {
5376
- if (ctx.callbacks.beforeNodeRemoved(node) === false)
5377
- return;
5327
+ if (ctx.callbacks.beforeNodeRemoved(node) === false) return;
5378
5328
  node.parentNode?.removeChild(node);
5379
5329
  ctx.callbacks.afterNodeRemoved(node);
5380
5330
  }
@@ -5429,8 +5379,8 @@
5429
5379
  }
5430
5380
  }
5431
5381
  return morphChildren3;
5432
- }();
5433
- const morphNode = /* @__PURE__ */ function() {
5382
+ })();
5383
+ const morphNode = /* @__PURE__ */ (function() {
5434
5384
  function morphNode2(oldNode, newContent, ctx) {
5435
5385
  if (ctx.ignoreActive && oldNode === document.activeElement) {
5436
5386
  return null;
@@ -5438,8 +5388,7 @@
5438
5388
  if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {
5439
5389
  return oldNode;
5440
5390
  }
5441
- if (oldNode instanceof HTMLHeadElement && ctx.head.ignore)
5442
- ;
5391
+ if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ;
5443
5392
  else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== "morph") {
5444
5393
  handleHeadElement(
5445
5394
  oldNode,
@@ -5477,10 +5426,9 @@
5477
5426
  oldElt.setAttribute(newAttribute.name, newAttribute.value);
5478
5427
  }
5479
5428
  }
5480
- for (let i5 = oldAttributes.length - 1; 0 <= i5; i5--) {
5481
- const oldAttribute = oldAttributes[i5];
5482
- if (!oldAttribute)
5483
- continue;
5429
+ for (let i4 = oldAttributes.length - 1; 0 <= i4; i4--) {
5430
+ const oldAttribute = oldAttributes[i4];
5431
+ if (!oldAttribute) continue;
5484
5432
  if (!newElt.hasAttribute(oldAttribute.name)) {
5485
5433
  if (ignoreAttribute(oldAttribute.name, oldElt, "remove", ctx)) {
5486
5434
  continue;
@@ -5564,7 +5512,7 @@
5564
5512
  return !!ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body;
5565
5513
  }
5566
5514
  return morphNode2;
5567
- }();
5515
+ })();
5568
5516
  function withHeadBlocking(ctx, oldNode, newNode, callback) {
5569
5517
  if (ctx.head.block) {
5570
5518
  const oldHead = oldNode.querySelector("head");
@@ -5653,7 +5601,7 @@
5653
5601
  });
5654
5602
  return promises;
5655
5603
  }
5656
- const createMorphContext = /* @__PURE__ */ function() {
5604
+ const createMorphContext = /* @__PURE__ */ (function() {
5657
5605
  function createMorphContext2(oldNode, newContent, config2) {
5658
5606
  const { persistentIds, idMap } = createIdMaps(oldNode, newContent);
5659
5607
  const mergedConfig = mergeDefaults(config2);
@@ -5700,8 +5648,7 @@
5700
5648
  if (elt?.tagName !== "BODY" && oldNode.contains(elt)) {
5701
5649
  while (elt) {
5702
5650
  activeElementAndParents.push(elt);
5703
- if (elt === oldNode)
5704
- break;
5651
+ if (elt === oldNode) break;
5705
5652
  elt = elt.parentElement;
5706
5653
  }
5707
5654
  }
@@ -5729,8 +5676,7 @@
5729
5676
  idMap.set(current, idSet);
5730
5677
  }
5731
5678
  idSet.add(id2);
5732
- if (current === root)
5733
- break;
5679
+ if (current === root) break;
5734
5680
  current = current.parentElement;
5735
5681
  }
5736
5682
  }
@@ -5770,8 +5716,8 @@
5770
5716
  return persistentIds;
5771
5717
  }
5772
5718
  return createMorphContext2;
5773
- }();
5774
- const { normalizeElement, normalizeParent } = /* @__PURE__ */ function() {
5719
+ })();
5720
+ const { normalizeElement, normalizeParent } = /* @__PURE__ */ (function() {
5775
5721
  const generatedByIdiomorph = /* @__PURE__ */ new WeakSet();
5776
5722
  function normalizeElement2(content) {
5777
5723
  if (content instanceof Document) {
@@ -5839,11 +5785,10 @@
5839
5785
  return this.childNodes.reduce(
5840
5786
  (results, node) => {
5841
5787
  if (node instanceof Element) {
5842
- if (node.matches(selector))
5843
- results.push(node);
5788
+ if (node.matches(selector)) results.push(node);
5844
5789
  const nodeList = node.querySelectorAll(selector);
5845
- for (let i5 = 0; i5 < nodeList.length; i5++) {
5846
- results.push(nodeList[i5]);
5790
+ for (let i4 = 0; i4 < nodeList.length; i4++) {
5791
+ results.push(nodeList[i4]);
5847
5792
  }
5848
5793
  }
5849
5794
  return results;
@@ -5908,12 +5853,12 @@
5908
5853
  }
5909
5854
  }
5910
5855
  return { normalizeElement: normalizeElement2, normalizeParent: normalizeParent2 };
5911
- }();
5856
+ })();
5912
5857
  return {
5913
5858
  morph,
5914
5859
  defaults
5915
5860
  };
5916
- }();
5861
+ })();
5917
5862
  function morphElements(currentElement, newElement, { callbacks, ...options2 } = {}) {
5918
5863
  Idiomorph.morph(currentElement, newElement, {
5919
5864
  ...options2,
@@ -6208,10 +6153,8 @@
6208
6153
  const clonedSelectElements = clonedElement.querySelectorAll("select");
6209
6154
  for (const [index, source] of selectElements.entries()) {
6210
6155
  const clone2 = clonedSelectElements[index];
6211
- for (const option of clone2.selectedOptions)
6212
- option.selected = false;
6213
- for (const option of source.selectedOptions)
6214
- clone2.options[option.index].selected = true;
6156
+ for (const option of clone2.selectedOptions) option.selected = false;
6157
+ for (const option of source.selectedOptions) clone2.options[option.index].selected = true;
6215
6158
  }
6216
6159
  for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) {
6217
6160
  clonedPasswordInput.value = "";
@@ -6456,10 +6399,8 @@
6456
6399
  if (this.response) {
6457
6400
  const { statusCode, responseHTML } = this.response;
6458
6401
  this.render(async () => {
6459
- if (this.shouldCacheSnapshot)
6460
- this.cacheSnapshot();
6461
- if (this.view.renderPromise)
6462
- await this.view.renderPromise;
6402
+ if (this.shouldCacheSnapshot) this.cacheSnapshot();
6403
+ if (this.view.renderPromise) await this.view.renderPromise;
6463
6404
  if (isSuccessful(statusCode) && responseHTML != null) {
6464
6405
  const snapshot = PageSnapshot.fromHTMLString(responseHTML);
6465
6406
  await this.renderPageSnapshot(snapshot, false);
@@ -6498,8 +6439,7 @@
6498
6439
  if (this.isPageRefresh) {
6499
6440
  this.adapter.visitRendered(this);
6500
6441
  } else {
6501
- if (this.view.renderPromise)
6502
- await this.view.renderPromise;
6442
+ if (this.view.renderPromise) await this.view.renderPromise;
6503
6443
  await this.renderPageSnapshot(snapshot, isPreview);
6504
6444
  this.adapter.visitRendered(this);
6505
6445
  if (!isPreview) {
@@ -6861,8 +6801,7 @@
6861
6801
  this.update(history.replaceState, location2, restorationIdentifier);
6862
6802
  }
6863
6803
  update(method, location2, restorationIdentifier = uuid()) {
6864
- if (method === history.pushState)
6865
- ++this.currentIndex;
6804
+ if (method === history.pushState) ++this.currentIndex;
6866
6805
  const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } };
6867
6806
  method.call(history, state, "", location2.href);
6868
6807
  this.location = location2;
@@ -6917,8 +6856,7 @@
6917
6856
  this.eventTarget = eventTarget;
6918
6857
  }
6919
6858
  start() {
6920
- if (this.started)
6921
- return;
6859
+ if (this.started) return;
6922
6860
  if (this.eventTarget.readyState === "loading") {
6923
6861
  this.eventTarget.addEventListener("DOMContentLoaded", this.#enable, { once: true });
6924
6862
  } else {
@@ -6926,8 +6864,7 @@
6926
6864
  }
6927
6865
  }
6928
6866
  stop() {
6929
- if (!this.started)
6930
- return;
6867
+ if (!this.started) return;
6931
6868
  this.eventTarget.removeEventListener("mouseenter", this.#tryToPrefetchRequest, {
6932
6869
  capture: true,
6933
6870
  passive: true
@@ -6952,8 +6889,7 @@
6952
6889
  this.started = true;
6953
6890
  };
6954
6891
  #tryToPrefetchRequest = (event) => {
6955
- if (getMetaContent("turbo-prefetch") === "false")
6956
- return;
6892
+ if (getMetaContent("turbo-prefetch") === "false") return;
6957
6893
  const target = event.target;
6958
6894
  const isLink = target.matches && target.matches("a[href]:not([target^=_]):not([download])");
6959
6895
  if (isLink && this.#isPrefetchable(target)) {
@@ -6974,8 +6910,7 @@
6974
6910
  }
6975
6911
  };
6976
6912
  #cancelRequestIfObsolete = (event) => {
6977
- if (event.target === this.#prefetchedLink)
6978
- this.#cancelPrefetchRequest();
6913
+ if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();
6979
6914
  };
6980
6915
  #cancelPrefetchRequest = () => {
6981
6916
  prefetchCache.clear();
@@ -7017,18 +6952,12 @@
7017
6952
  }
7018
6953
  #isPrefetchable(link2) {
7019
6954
  const href = link2.getAttribute("href");
7020
- if (!href)
7021
- return false;
7022
- if (unfetchableLink(link2))
7023
- return false;
7024
- if (linkToTheSamePage(link2))
7025
- return false;
7026
- if (linkOptsOut(link2))
7027
- return false;
7028
- if (nonSafeLink(link2))
7029
- return false;
7030
- if (eventPrevented(link2))
7031
- return false;
6955
+ if (!href) return false;
6956
+ if (unfetchableLink(link2)) return false;
6957
+ if (linkToTheSamePage(link2)) return false;
6958
+ if (linkOptsOut(link2)) return false;
6959
+ if (nonSafeLink(link2)) return false;
6960
+ if (eventPrevented(link2)) return false;
7032
6961
  return true;
7033
6962
  }
7034
6963
  };
@@ -7039,25 +6968,18 @@
7039
6968
  return link2.pathname + link2.search === document.location.pathname + document.location.search || link2.href.startsWith("#");
7040
6969
  };
7041
6970
  var linkOptsOut = (link2) => {
7042
- if (link2.getAttribute("data-turbo-prefetch") === "false")
7043
- return true;
7044
- if (link2.getAttribute("data-turbo") === "false")
7045
- return true;
6971
+ if (link2.getAttribute("data-turbo-prefetch") === "false") return true;
6972
+ if (link2.getAttribute("data-turbo") === "false") return true;
7046
6973
  const turboPrefetchParent = findClosestRecursively(link2, "[data-turbo-prefetch]");
7047
- if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false")
7048
- return true;
6974
+ if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false") return true;
7049
6975
  return false;
7050
6976
  };
7051
6977
  var nonSafeLink = (link2) => {
7052
6978
  const turboMethod = link2.getAttribute("data-turbo-method");
7053
- if (turboMethod && turboMethod.toLowerCase() !== "get")
7054
- return true;
7055
- if (isUJS(link2))
7056
- return true;
7057
- if (link2.hasAttribute("data-turbo-confirm"))
7058
- return true;
7059
- if (link2.hasAttribute("data-turbo-stream"))
7060
- return true;
6979
+ if (turboMethod && turboMethod.toLowerCase() !== "get") return true;
6980
+ if (isUJS(link2)) return true;
6981
+ if (link2.hasAttribute("data-turbo-confirm")) return true;
6982
+ if (link2.hasAttribute("data-turbo-stream")) return true;
7061
6983
  return false;
7062
6984
  };
7063
6985
  var isUJS = (link2) => {
@@ -7348,8 +7270,7 @@
7348
7270
  function firstAutofocusableElementInStreams(nodeListOfStreamElements) {
7349
7271
  for (const streamElement of nodeListOfStreamElements) {
7350
7272
  const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);
7351
- if (elementWithAutofocus)
7352
- return elementWithAutofocus;
7273
+ if (elementWithAutofocus) return elementWithAutofocus;
7353
7274
  }
7354
7275
  return null;
7355
7276
  }
@@ -8274,8 +8195,7 @@
8274
8195
  }
8275
8196
  }
8276
8197
  sourceURLChanged() {
8277
- if (this.#isIgnoringChangesTo("src"))
8278
- return;
8198
+ if (this.#isIgnoringChangesTo("src")) return;
8279
8199
  if (!this.sourceURL) {
8280
8200
  this.#currentFetchRequest?.cancel();
8281
8201
  }
@@ -8341,8 +8261,7 @@
8341
8261
  }
8342
8262
  submittedFormLinkToLocation(link2, _location, form) {
8343
8263
  const frame = this.#findFrameElement(link2);
8344
- if (frame)
8345
- form.setAttribute("data-turbo-frame", frame.id);
8264
+ if (frame) form.setAttribute("data-turbo-frame", frame.id);
8346
8265
  }
8347
8266
  // Link interceptor delegate
8348
8267
  shouldInterceptLinkClick(element, _location, _event) {
@@ -8456,8 +8375,7 @@
8456
8375
  if (newFrameElement) {
8457
8376
  const snapshot = new Snapshot(newFrameElement);
8458
8377
  const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);
8459
- if (this.view.renderPromise)
8460
- await this.view.renderPromise;
8378
+ if (this.view.renderPromise) await this.view.renderPromise;
8461
8379
  this.changeHistory();
8462
8380
  await this.view.render(renderer);
8463
8381
  this.complete = true;
@@ -8507,8 +8425,7 @@
8507
8425
  restorationIdentifier: this.restorationIdentifier,
8508
8426
  snapshot: pageSnapshot
8509
8427
  };
8510
- if (this.action)
8511
- options2.action = this.action;
8428
+ if (this.action) options2.action = this.action;
8512
8429
  session.visit(frame.src, options2);
8513
8430
  }
8514
8431
  };
@@ -8922,10 +8839,8 @@
8922
8839
  }
8923
8840
  (() => {
8924
8841
  const scriptElement = document.currentScript;
8925
- if (!scriptElement)
8926
- return;
8927
- if (scriptElement.hasAttribute("data-turbo-suppress-warning"))
8928
- return;
8842
+ if (!scriptElement) return;
8843
+ if (scriptElement.hasAttribute("data-turbo-suppress-warning")) return;
8929
8844
  let element = scriptElement.parentElement;
8930
8845
  while (element) {
8931
8846
  if (element == document.body) {
@@ -11584,8 +11499,7 @@
11584
11499
  this.updateState();
11585
11500
  }
11586
11501
  updateState() {
11587
- if (!this.hasAddButtonTarget || this.limitValue == 0)
11588
- return;
11502
+ if (!this.hasAddButtonTarget || this.limitValue == 0) return;
11589
11503
  if (this.childCount >= this.limitValue)
11590
11504
  this.addButtonTarget.style.display = "none";
11591
11505
  else
@@ -11679,8 +11593,8 @@
11679
11593
  }
11680
11594
 
11681
11595
  // node_modules/@popperjs/core/lib/modifiers/applyStyles.js
11682
- function applyStyles(_ref) {
11683
- var state = _ref.state;
11596
+ function applyStyles(_ref2) {
11597
+ var state = _ref2.state;
11684
11598
  Object.keys(state.elements).forEach(function(name) {
11685
11599
  var style = state.styles[name] || {};
11686
11600
  var attributes = state.attributes[name] || {};
@@ -11787,7 +11701,7 @@
11787
11701
  scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
11788
11702
  scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
11789
11703
  }
11790
- var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
11704
+ var _ref2 = isElement(element) ? getWindow(element) : window, visualViewport = _ref2.visualViewport;
11791
11705
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
11792
11706
  var x4 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
11793
11707
  var y4 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
@@ -11963,9 +11877,9 @@
11963
11877
  })) : padding;
11964
11878
  return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
11965
11879
  };
11966
- function arrow(_ref) {
11880
+ function arrow(_ref2) {
11967
11881
  var _state$modifiersData$;
11968
- var state = _ref.state, name = _ref.name, options2 = _ref.options;
11882
+ var state = _ref2.state, name = _ref2.name, options2 = _ref2.options;
11969
11883
  var arrowElement = state.elements.arrow;
11970
11884
  var popperOffsets2 = state.modifiersData.popperOffsets;
11971
11885
  var basePlacement = getBasePlacement(state.placement);
@@ -12030,8 +11944,8 @@
12030
11944
  bottom: "auto",
12031
11945
  left: "auto"
12032
11946
  };
12033
- function roundOffsetsByDPR(_ref, win) {
12034
- var x4 = _ref.x, y4 = _ref.y;
11947
+ function roundOffsetsByDPR(_ref2, win) {
11948
+ var x4 = _ref2.x, y4 = _ref2.y;
12035
11949
  var dpr = win.devicePixelRatio || 1;
12036
11950
  return {
12037
11951
  x: round(x4 * dpr) / dpr || 0,
@@ -12148,8 +12062,8 @@
12148
12062
  var passive = {
12149
12063
  passive: true
12150
12064
  };
12151
- function effect3(_ref) {
12152
- var state = _ref.state, instance = _ref.instance, options2 = _ref.options;
12065
+ function effect3(_ref2) {
12066
+ var state = _ref2.state, instance = _ref2.instance, options2 = _ref2.options;
12153
12067
  var _options$scroll = options2.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options2.resize, resize = _options$resize === void 0 ? true : _options$resize;
12154
12068
  var window2 = getWindow(state.elements.popper);
12155
12069
  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
@@ -12360,8 +12274,8 @@
12360
12274
  }
12361
12275
 
12362
12276
  // node_modules/@popperjs/core/lib/utils/computeOffsets.js
12363
- function computeOffsets(_ref) {
12364
- var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement;
12277
+ function computeOffsets(_ref2) {
12278
+ var reference2 = _ref2.reference, element = _ref2.element, placement = _ref2.placement;
12365
12279
  var basePlacement = placement ? getBasePlacement(placement) : null;
12366
12280
  var variation = placement ? getVariation(placement) : null;
12367
12281
  var commonX = reference2.x + reference2.width / 2 - element.width / 2;
@@ -12490,8 +12404,8 @@
12490
12404
  var oppositePlacement = getOppositePlacement(placement);
12491
12405
  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
12492
12406
  }
12493
- function flip(_ref) {
12494
- var state = _ref.state, options2 = _ref.options, name = _ref.name;
12407
+ function flip(_ref2) {
12408
+ var state = _ref2.state, options2 = _ref2.options, name = _ref2.name;
12495
12409
  if (state.modifiersData[name]._skip) {
12496
12410
  return;
12497
12411
  }
@@ -12515,8 +12429,8 @@
12515
12429
  var checksMap = /* @__PURE__ */ new Map();
12516
12430
  var makeFallbackChecks = true;
12517
12431
  var firstFittingPlacement = placements2[0];
12518
- for (var i5 = 0; i5 < placements2.length; i5++) {
12519
- var placement = placements2[i5];
12432
+ for (var i4 = 0; i4 < placements2.length; i4++) {
12433
+ var placement = placements2[i4];
12520
12434
  var _basePlacement = getBasePlacement(placement);
12521
12435
  var isStartVariation = getVariation(placement) === start2;
12522
12436
  var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
@@ -12567,8 +12481,7 @@
12567
12481
  };
12568
12482
  for (var _i = numberOfChecks; _i > 0; _i--) {
12569
12483
  var _ret = _loop(_i);
12570
- if (_ret === "break")
12571
- break;
12484
+ if (_ret === "break") break;
12572
12485
  }
12573
12486
  }
12574
12487
  if (state.placement !== firstFittingPlacement) {
@@ -12608,8 +12521,8 @@
12608
12521
  return overflow[side] >= 0;
12609
12522
  });
12610
12523
  }
12611
- function hide(_ref) {
12612
- var state = _ref.state, name = _ref.name;
12524
+ function hide(_ref2) {
12525
+ var state = _ref2.state, name = _ref2.name;
12613
12526
  var referenceRect = state.rects.reference;
12614
12527
  var popperRect = state.rects.popper;
12615
12528
  var preventedOffsets = state.modifiersData.preventOverflow;
@@ -12646,9 +12559,9 @@
12646
12559
  function distanceAndSkiddingToXY(placement, rects, offset2) {
12647
12560
  var basePlacement = getBasePlacement(placement);
12648
12561
  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
12649
- var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
12562
+ var _ref2 = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
12650
12563
  placement
12651
- })) : offset2, skidding = _ref[0], distance = _ref[1];
12564
+ })) : offset2, skidding = _ref2[0], distance = _ref2[1];
12652
12565
  skidding = skidding || 0;
12653
12566
  distance = (distance || 0) * invertDistance;
12654
12567
  return [left, right].indexOf(basePlacement) >= 0 ? {
@@ -12682,8 +12595,8 @@
12682
12595
  };
12683
12596
 
12684
12597
  // node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
12685
- function popperOffsets(_ref) {
12686
- var state = _ref.state, name = _ref.name;
12598
+ function popperOffsets(_ref2) {
12599
+ var state = _ref2.state, name = _ref2.name;
12687
12600
  state.modifiersData[name] = computeOffsets({
12688
12601
  reference: state.rects.reference,
12689
12602
  element: state.rects.popper,
@@ -12705,8 +12618,8 @@
12705
12618
  }
12706
12619
 
12707
12620
  // node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
12708
- function preventOverflow(_ref) {
12709
- var state = _ref.state, options2 = _ref.options, name = _ref.name;
12621
+ function preventOverflow(_ref2) {
12622
+ var state = _ref2.state, options2 = _ref2.options, name = _ref2.name;
12710
12623
  var _options$mainAxis = options2.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options2.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options2.boundary, rootBoundary = options2.rootBoundary, altBoundary = options2.altBoundary, padding = options2.padding, _options$tether = options2.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options2.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
12711
12624
  var overflow = detectOverflow(state, {
12712
12625
  boundary,
@@ -13041,8 +12954,8 @@
13041
12954
  }
13042
12955
  });
13043
12956
  function runModifierEffects() {
13044
- state.orderedModifiers.forEach(function(_ref) {
13045
- var name = _ref.name, _ref$options = _ref.options, options3 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect;
12957
+ state.orderedModifiers.forEach(function(_ref2) {
12958
+ var name = _ref2.name, _ref$options = _ref2.options, options3 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref2.effect;
13046
12959
  if (typeof effect4 === "function") {
13047
12960
  var cleanupFn = effect4({
13048
12961
  state,
@@ -13276,8 +13189,7 @@
13276
13189
  }
13277
13190
  }
13278
13191
  disconnect() {
13279
- if (this.autoDismissTimeout)
13280
- clearTimeout(this.autoDismissTimeout);
13192
+ if (this.autoDismissTimeout) clearTimeout(this.autoDismissTimeout);
13281
13193
  this.autoDismissTimeout = null;
13282
13194
  }
13283
13195
  dismiss() {
@@ -13314,18 +13226,20 @@
13314
13226
  this.frameTarget.addEventListener("turbo:fetch-request-error", this.frameFailed);
13315
13227
  }
13316
13228
  disconnect() {
13317
- if (this.hasRefreshButtonTarget)
13318
- this.refreshButtonTarget.removeEventListener("click", this.refreshButtonClicked);
13319
- if (this.hasBackButtonTarget)
13320
- this.backButtonTarget.removeEventListener("click", this.backButtonClicked);
13321
- if (this.hasHomeButtonTarget)
13322
- this.homeButtonTarget.removeEventListener("click", this.homeButtonClicked);
13229
+ if (this.hasRefreshButtonTarget) this.refreshButtonTarget.removeEventListener("click", this.refreshButtonClicked);
13230
+ if (this.hasBackButtonTarget) this.backButtonTarget.removeEventListener("click", this.backButtonClicked);
13231
+ if (this.hasHomeButtonTarget) this.homeButtonTarget.removeEventListener("click", this.homeButtonClicked);
13323
13232
  this.frameTarget.removeEventListener("turbo:frame-load", this.frameLoaded);
13324
13233
  this.frameTarget.removeEventListener("turbo:click", this.frameLoading);
13325
13234
  this.frameTarget.removeEventListener("turbo:submit-start", this.frameLoading);
13326
13235
  this.frameTarget.removeEventListener("turbo:fetch-request-error", this.frameFailed);
13327
13236
  }
13328
13237
  frameLoading(event) {
13238
+ if (event) {
13239
+ const trigger = event.target.closest("a, form");
13240
+ const requested = trigger?.dataset?.turboFrame;
13241
+ if (requested && requested !== this.frameTarget.id) return;
13242
+ }
13329
13243
  this.#loadingStarted();
13330
13244
  }
13331
13245
  frameFailed(event) {
@@ -13347,29 +13261,35 @@
13347
13261
  }
13348
13262
  homeButtonClicked(event) {
13349
13263
  this.frameLoading(null);
13264
+ this.srcHistory = [this.originalFrameSrc];
13265
+ this.#updateNavigationButtonsDisplay();
13266
+ this._homeRequested = true;
13350
13267
  this.frameTarget.src = this.originalFrameSrc;
13268
+ this.frameTarget.reload();
13351
13269
  }
13352
13270
  get currentSrc() {
13353
13271
  return this.srcHistory[this.srcHistory.length - 1];
13354
13272
  }
13355
13273
  #notifySrcChanged(src) {
13356
- if (src == this.currentSrc) {
13357
- } else if (src == this.originalFrameSrc)
13274
+ if (this._homeRequested) {
13275
+ this._homeRequested = false;
13358
13276
  this.srcHistory = [src];
13359
- else
13277
+ this.originalFrameSrc = src;
13278
+ } else if (src == this.currentSrc) {
13279
+ } else if (src == this.originalFrameSrc) {
13280
+ this.srcHistory = [src];
13281
+ } else {
13360
13282
  this.srcHistory.push(src);
13283
+ }
13361
13284
  this.#updateNavigationButtonsDisplay();
13362
- if (this.hasMaximizeLinkTarget)
13363
- this.maximizeLinkTarget.href = src;
13285
+ if (this.hasMaximizeLinkTarget) this.maximizeLinkTarget.href = src;
13364
13286
  }
13365
13287
  #loadingStarted() {
13366
- if (this.hasRefreshButtonTarget)
13367
- this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
13288
+ if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
13368
13289
  this.frameTarget.classList.add("motion-safe:animate-pulse");
13369
13290
  }
13370
13291
  #loadingStopped() {
13371
- if (this.hasRefreshButtonTarget)
13372
- this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
13292
+ if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
13373
13293
  this.frameTarget.classList.remove("motion-safe:animate-pulse");
13374
13294
  }
13375
13295
  #updateNavigationButtonsDisplay() {
@@ -13389,21 +13309,18 @@
13389
13309
  connect() {
13390
13310
  this.applyMode(this.readMode());
13391
13311
  this.handleStorageChange = (e4) => {
13392
- if (e4.key === "theme")
13393
- this.applyMode(this.readMode());
13312
+ if (e4.key === "theme") this.applyMode(this.readMode());
13394
13313
  };
13395
13314
  window.addEventListener("storage", this.handleStorageChange);
13396
13315
  this.mq = window.matchMedia("(prefers-color-scheme: dark)");
13397
13316
  this.handleMqChange = () => {
13398
- if (this.readMode() === "auto")
13399
- this.applyMode("auto");
13317
+ if (this.readMode() === "auto") this.applyMode("auto");
13400
13318
  };
13401
13319
  this.mq.addEventListener("change", this.handleMqChange);
13402
13320
  }
13403
13321
  disconnect() {
13404
13322
  window.removeEventListener("storage", this.handleStorageChange);
13405
- if (this.mq)
13406
- this.mq.removeEventListener("change", this.handleMqChange);
13323
+ if (this.mq) this.mq.removeEventListener("change", this.handleMqChange);
13407
13324
  }
13408
13325
  toggleMode() {
13409
13326
  const current = this.readMode();
@@ -13425,8 +13342,7 @@
13425
13342
  return ORDER.includes(saved) ? saved : "auto";
13426
13343
  }
13427
13344
  effectiveMode(mode) {
13428
- if (mode === "light" || mode === "dark")
13429
- return mode;
13345
+ if (mode === "light" || mode === "dark") return mode;
13430
13346
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
13431
13347
  }
13432
13348
  toggleIcons(mode) {
@@ -13436,30 +13352,64 @@
13436
13352
  dark: this.element.querySelector(".color-mode-icon-dark")
13437
13353
  };
13438
13354
  for (const [key, el] of Object.entries(icons)) {
13439
- if (!el)
13440
- continue;
13355
+ if (!el) continue;
13441
13356
  el.classList.toggle("hidden", key !== mode);
13442
13357
  }
13443
13358
  }
13444
13359
  };
13445
13360
 
13446
13361
  // node_modules/dompurify/dist/purify.es.mjs
13447
- var {
13448
- entries,
13449
- setPrototypeOf,
13450
- isFrozen,
13451
- getPrototypeOf,
13452
- getOwnPropertyDescriptor
13453
- } = Object;
13454
- var {
13455
- freeze,
13456
- seal,
13457
- create
13458
- } = Object;
13459
- var {
13460
- apply,
13461
- construct
13462
- } = typeof Reflect !== "undefined" && Reflect;
13362
+ function _arrayLikeToArray(r4, a4) {
13363
+ (null == a4 || a4 > r4.length) && (a4 = r4.length);
13364
+ for (var e4 = 0, n3 = Array(a4); e4 < a4; e4++) n3[e4] = r4[e4];
13365
+ return n3;
13366
+ }
13367
+ function _arrayWithHoles(r4) {
13368
+ if (Array.isArray(r4)) return r4;
13369
+ }
13370
+ function _iterableToArrayLimit(r4, l4) {
13371
+ var t4 = null == r4 ? null : "undefined" != typeof Symbol && r4[Symbol.iterator] || r4["@@iterator"];
13372
+ if (null != t4) {
13373
+ var e4, n3, i4, u5, a4 = [], f5 = true, o4 = false;
13374
+ try {
13375
+ if (i4 = (t4 = t4.call(r4)).next, 0 === l4) ;
13376
+ else for (; !(f5 = (e4 = i4.call(t4)).done) && (a4.push(e4.value), a4.length !== l4); f5 = true) ;
13377
+ } catch (r5) {
13378
+ o4 = true, n3 = r5;
13379
+ } finally {
13380
+ try {
13381
+ if (!f5 && null != t4.return && (u5 = t4.return(), Object(u5) !== u5)) return;
13382
+ } finally {
13383
+ if (o4) throw n3;
13384
+ }
13385
+ }
13386
+ return a4;
13387
+ }
13388
+ }
13389
+ function _nonIterableRest() {
13390
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13391
+ }
13392
+ function _slicedToArray(r4, e4) {
13393
+ return _arrayWithHoles(r4) || _iterableToArrayLimit(r4, e4) || _unsupportedIterableToArray(r4, e4) || _nonIterableRest();
13394
+ }
13395
+ function _unsupportedIterableToArray(r4, a4) {
13396
+ if (r4) {
13397
+ if ("string" == typeof r4) return _arrayLikeToArray(r4, a4);
13398
+ var t4 = {}.toString.call(r4).slice(8, -1);
13399
+ return "Object" === t4 && r4.constructor && (t4 = r4.constructor.name), "Map" === t4 || "Set" === t4 ? Array.from(r4) : "Arguments" === t4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t4) ? _arrayLikeToArray(r4, a4) : void 0;
13400
+ }
13401
+ }
13402
+ var entries = Object.entries;
13403
+ var setPrototypeOf = Object.setPrototypeOf;
13404
+ var isFrozen = Object.isFrozen;
13405
+ var getPrototypeOf = Object.getPrototypeOf;
13406
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
13407
+ var freeze = Object.freeze;
13408
+ var seal = Object.seal;
13409
+ var create = Object.create;
13410
+ var _ref = typeof Reflect !== "undefined" && Reflect;
13411
+ var apply = _ref.apply;
13412
+ var construct = _ref.construct;
13463
13413
  if (!freeze) {
13464
13414
  freeze = function freeze2(x4) {
13465
13415
  return x4;
@@ -13491,13 +13441,19 @@
13491
13441
  var arrayPop = unapply(Array.prototype.pop);
13492
13442
  var arrayPush = unapply(Array.prototype.push);
13493
13443
  var arraySplice = unapply(Array.prototype.splice);
13444
+ var arrayIsArray = Array.isArray;
13494
13445
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
13495
13446
  var stringToString = unapply(String.prototype.toString);
13496
13447
  var stringMatch = unapply(String.prototype.match);
13497
13448
  var stringReplace = unapply(String.prototype.replace);
13498
13449
  var stringIndexOf = unapply(String.prototype.indexOf);
13499
13450
  var stringTrim = unapply(String.prototype.trim);
13451
+ var numberToString = unapply(Number.prototype.toString);
13452
+ var booleanToString = unapply(Boolean.prototype.toString);
13453
+ var bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
13454
+ var symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
13500
13455
  var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
13456
+ var objectToString = unapply(Object.prototype.toString);
13501
13457
  var regExpTest = unapply(RegExp.prototype.test);
13502
13458
  var typeErrorCreate = unconstruct(TypeError);
13503
13459
  function unapply(func) {
@@ -13524,6 +13480,9 @@
13524
13480
  if (setPrototypeOf) {
13525
13481
  setPrototypeOf(set, null);
13526
13482
  }
13483
+ if (!arrayIsArray(array)) {
13484
+ return set;
13485
+ }
13527
13486
  let l4 = array.length;
13528
13487
  while (l4--) {
13529
13488
  let element = array[l4];
@@ -13551,10 +13510,13 @@
13551
13510
  }
13552
13511
  function clone(object) {
13553
13512
  const newObject = create(null);
13554
- for (const [property, value] of entries(object)) {
13513
+ for (const _ref2 of entries(object)) {
13514
+ var _ref3 = _slicedToArray(_ref2, 2);
13515
+ const property = _ref3[0];
13516
+ const value = _ref3[1];
13555
13517
  const isPropertyExist = objectHasOwnProperty(object, property);
13556
13518
  if (isPropertyExist) {
13557
- if (Array.isArray(value)) {
13519
+ if (arrayIsArray(value)) {
13558
13520
  newObject[property] = cleanArray(value);
13559
13521
  } else if (value && typeof value === "object" && value.constructor === Object) {
13560
13522
  newObject[property] = clone(value);
@@ -13565,6 +13527,44 @@
13565
13527
  }
13566
13528
  return newObject;
13567
13529
  }
13530
+ function stringifyValue(value) {
13531
+ switch (typeof value) {
13532
+ case "string": {
13533
+ return value;
13534
+ }
13535
+ case "number": {
13536
+ return numberToString(value);
13537
+ }
13538
+ case "boolean": {
13539
+ return booleanToString(value);
13540
+ }
13541
+ case "bigint": {
13542
+ return bigintToString ? bigintToString(value) : "0";
13543
+ }
13544
+ case "symbol": {
13545
+ return symbolToString ? symbolToString(value) : "Symbol()";
13546
+ }
13547
+ case "undefined": {
13548
+ return objectToString(value);
13549
+ }
13550
+ case "function":
13551
+ case "object": {
13552
+ if (value === null) {
13553
+ return objectToString(value);
13554
+ }
13555
+ const valueAsRecord = value;
13556
+ const valueToString = lookupGetter(valueAsRecord, "toString");
13557
+ if (typeof valueToString === "function") {
13558
+ const stringified = valueToString(valueAsRecord);
13559
+ return typeof stringified === "string" ? stringified : objectToString(stringified);
13560
+ }
13561
+ return objectToString(value);
13562
+ }
13563
+ default: {
13564
+ return objectToString(value);
13565
+ }
13566
+ }
13567
+ }
13568
13568
  function lookupGetter(object, prop) {
13569
13569
  while (object !== null) {
13570
13570
  const desc = getOwnPropertyDescriptor(object, prop);
@@ -13583,6 +13583,14 @@
13583
13583
  }
13584
13584
  return fallbackValue;
13585
13585
  }
13586
+ function isRegex(value) {
13587
+ try {
13588
+ regExpTest(value, "");
13589
+ return true;
13590
+ } catch (_unused) {
13591
+ return false;
13592
+ }
13593
+ }
13586
13594
  var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
13587
13595
  var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
13588
13596
  var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
@@ -13590,13 +13598,13 @@
13590
13598
  var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
13591
13599
  var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
13592
13600
  var text = freeze(["#text"]);
13593
- var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
13601
+ var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
13594
13602
  var svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
13595
- var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
13603
+ var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
13596
13604
  var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
13597
- var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
13598
- var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
13599
- var TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
13605
+ var MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
13606
+ var ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
13607
+ var TMPLIT_EXPR = seal(/\${[\w\W]*/g);
13600
13608
  var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
13601
13609
  var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
13602
13610
  var IS_ALLOWED_URI = seal(
@@ -13610,35 +13618,13 @@
13610
13618
  );
13611
13619
  var DOCTYPE_NAME = seal(/^html$/i);
13612
13620
  var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
13613
- var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
13614
- __proto__: null,
13615
- ARIA_ATTR,
13616
- ATTR_WHITESPACE,
13617
- CUSTOM_ELEMENT,
13618
- DATA_ATTR,
13619
- DOCTYPE_NAME,
13620
- ERB_EXPR,
13621
- IS_ALLOWED_URI,
13622
- IS_SCRIPT_OR_DATA,
13623
- MUSTACHE_EXPR,
13624
- TMPLIT_EXPR
13625
- });
13626
13621
  var NODE_TYPE = {
13627
13622
  element: 1,
13628
- attribute: 2,
13629
13623
  text: 3,
13630
- cdataSection: 4,
13631
- entityReference: 5,
13632
- // Deprecated
13633
- entityNode: 6,
13634
13624
  // Deprecated
13635
13625
  progressingInstruction: 7,
13636
13626
  comment: 8,
13637
- document: 9,
13638
- documentType: 10,
13639
- documentFragment: 11,
13640
- notation: 12
13641
- // Deprecated
13627
+ document: 9
13642
13628
  };
13643
13629
  var getGlobal = function getGlobal2() {
13644
13630
  return typeof window === "undefined" ? null : window;
@@ -13683,28 +13669,16 @@
13683
13669
  function createDOMPurify() {
13684
13670
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
13685
13671
  const DOMPurify = (root) => createDOMPurify(root);
13686
- DOMPurify.version = "3.3.1";
13672
+ DOMPurify.version = "3.4.3";
13687
13673
  DOMPurify.removed = [];
13688
13674
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
13689
13675
  DOMPurify.isSupported = false;
13690
13676
  return DOMPurify;
13691
13677
  }
13692
- let {
13693
- document: document2
13694
- } = window2;
13678
+ let document2 = window2.document;
13695
13679
  const originalDocument = document2;
13696
13680
  const currentScript = originalDocument.currentScript;
13697
- const {
13698
- DocumentFragment,
13699
- HTMLTemplateElement: HTMLTemplateElement2,
13700
- Node: Node2,
13701
- Element: Element2,
13702
- NodeFilter,
13703
- NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
13704
- HTMLFormElement: HTMLFormElement2,
13705
- DOMParser: DOMParser2,
13706
- trustedTypes
13707
- } = window2;
13681
+ const DocumentFragment = window2.DocumentFragment, HTMLTemplateElement2 = window2.HTMLTemplateElement, Node2 = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement2 = window2.HTMLFormElement, DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes;
13708
13682
  const ElementPrototype = Element2.prototype;
13709
13683
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
13710
13684
  const remove = lookupGetter(ElementPrototype, "remove");
@@ -13719,30 +13693,12 @@
13719
13693
  }
13720
13694
  let trustedTypesPolicy;
13721
13695
  let emptyHTML = "";
13722
- const {
13723
- implementation,
13724
- createNodeIterator,
13725
- createDocumentFragment: createDocumentFragment2,
13726
- getElementsByTagName
13727
- } = document2;
13728
- const {
13729
- importNode
13730
- } = originalDocument;
13696
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment2 = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
13697
+ const importNode = originalDocument.importNode;
13731
13698
  let hooks = _createHooksMap();
13732
13699
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode2 === "function" && implementation && implementation.createHTMLDocument !== void 0;
13733
- const {
13734
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
13735
- ERB_EXPR: ERB_EXPR2,
13736
- TMPLIT_EXPR: TMPLIT_EXPR2,
13737
- DATA_ATTR: DATA_ATTR2,
13738
- ARIA_ATTR: ARIA_ATTR2,
13739
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
13740
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
13741
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
13742
- } = EXPRESSIONS;
13743
- let {
13744
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
13745
- } = EXPRESSIONS;
13700
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
13701
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
13746
13702
  let ALLOWED_TAGS = null;
13747
13703
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
13748
13704
  let ALLOWED_ATTR = null;
@@ -13838,15 +13794,15 @@
13838
13794
  PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
13839
13795
  SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
13840
13796
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
13841
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
13842
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
13843
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
13844
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
13845
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
13846
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
13847
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
13848
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
13849
- USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
13797
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
13798
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
13799
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
13800
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
13801
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
13802
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
13803
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
13804
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
13805
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
13850
13806
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
13851
13807
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
13852
13808
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
@@ -13862,19 +13818,20 @@
13862
13818
  SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
13863
13819
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
13864
13820
  IN_PLACE = cfg.IN_PLACE || false;
13865
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
13866
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
13867
- MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
13868
- HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
13869
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
13870
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
13871
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
13821
+ IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
13822
+ NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
13823
+ MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
13824
+ HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
13825
+ const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
13826
+ CUSTOM_ELEMENT_HANDLING = create(null);
13827
+ if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
13828
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
13872
13829
  }
13873
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
13874
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
13830
+ if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
13831
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
13875
13832
  }
13876
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
13877
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
13833
+ if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
13834
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
13878
13835
  }
13879
13836
  if (SAFE_FOR_TEMPLATES) {
13880
13837
  ALLOW_DATA_ATTR = false;
@@ -13884,7 +13841,7 @@
13884
13841
  }
13885
13842
  if (USE_PROFILES) {
13886
13843
  ALLOWED_TAGS = addToSet({}, text);
13887
- ALLOWED_ATTR = [];
13844
+ ALLOWED_ATTR = create(null);
13888
13845
  if (USE_PROFILES.html === true) {
13889
13846
  addToSet(ALLOWED_TAGS, html$1);
13890
13847
  addToSet(ALLOWED_ATTR, html);
@@ -13905,36 +13862,38 @@
13905
13862
  addToSet(ALLOWED_ATTR, xml);
13906
13863
  }
13907
13864
  }
13908
- if (cfg.ADD_TAGS) {
13865
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
13866
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
13867
+ if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
13909
13868
  if (typeof cfg.ADD_TAGS === "function") {
13910
13869
  EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
13911
- } else {
13870
+ } else if (arrayIsArray(cfg.ADD_TAGS)) {
13912
13871
  if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
13913
13872
  ALLOWED_TAGS = clone(ALLOWED_TAGS);
13914
13873
  }
13915
13874
  addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
13916
13875
  }
13917
13876
  }
13918
- if (cfg.ADD_ATTR) {
13877
+ if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
13919
13878
  if (typeof cfg.ADD_ATTR === "function") {
13920
13879
  EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
13921
- } else {
13880
+ } else if (arrayIsArray(cfg.ADD_ATTR)) {
13922
13881
  if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
13923
13882
  ALLOWED_ATTR = clone(ALLOWED_ATTR);
13924
13883
  }
13925
13884
  addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
13926
13885
  }
13927
13886
  }
13928
- if (cfg.ADD_URI_SAFE_ATTR) {
13887
+ if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
13929
13888
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
13930
13889
  }
13931
- if (cfg.FORBID_CONTENTS) {
13890
+ if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
13932
13891
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
13933
13892
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
13934
13893
  }
13935
13894
  addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
13936
13895
  }
13937
- if (cfg.ADD_FORBID_CONTENTS) {
13896
+ if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
13938
13897
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
13939
13898
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
13940
13899
  }
@@ -14127,6 +14086,10 @@
14127
14086
  _forceRemove(currentNode);
14128
14087
  return true;
14129
14088
  }
14089
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
14090
+ _forceRemove(currentNode);
14091
+ return true;
14092
+ }
14130
14093
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
14131
14094
  _forceRemove(currentNode);
14132
14095
  return true;
@@ -14135,7 +14098,7 @@
14135
14098
  _forceRemove(currentNode);
14136
14099
  return true;
14137
14100
  }
14138
- if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
14101
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
14139
14102
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
14140
14103
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
14141
14104
  return false;
@@ -14149,9 +14112,8 @@
14149
14112
  const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
14150
14113
  if (childNodes && parentNode) {
14151
14114
  const childCount = childNodes.length;
14152
- for (let i5 = childCount - 1; i5 >= 0; --i5) {
14153
- const childClone = cloneNode(childNodes[i5], true);
14154
- childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
14115
+ for (let i4 = childCount - 1; i4 >= 0; --i4) {
14116
+ const childClone = cloneNode(childNodes[i4], true);
14155
14117
  parentNode.insertBefore(childClone, getNextSibling(currentNode));
14156
14118
  }
14157
14119
  }
@@ -14169,7 +14131,7 @@
14169
14131
  }
14170
14132
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
14171
14133
  content = currentNode.textContent;
14172
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14134
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14173
14135
  content = stringReplace(content, expr, " ");
14174
14136
  });
14175
14137
  if (currentNode.textContent !== content) {
@@ -14183,16 +14145,16 @@
14183
14145
  return false;
14184
14146
  };
14185
14147
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
14148
+ if (FORBID_ATTR[lcName]) {
14149
+ return false;
14150
+ }
14186
14151
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
14187
14152
  return false;
14188
14153
  }
14189
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName))
14190
- ;
14191
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName))
14192
- ;
14193
- else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag))
14194
- ;
14195
- else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
14154
+ const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
14155
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
14156
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
14157
+ else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
14196
14158
  if (
14197
14159
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
14198
14160
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
@@ -14200,33 +14162,26 @@
14200
14162
  _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
14201
14163
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
14202
14164
  lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
14203
- )
14204
- ;
14165
+ ) ;
14205
14166
  else {
14206
14167
  return false;
14207
14168
  }
14208
- } else if (URI_SAFE_ATTRIBUTES[lcName])
14209
- ;
14210
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, "")))
14211
- ;
14212
- else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag])
14213
- ;
14214
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, "")))
14215
- ;
14169
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
14170
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
14171
+ else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
14172
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
14216
14173
  else if (value) {
14217
14174
  return false;
14218
- } else
14219
- ;
14175
+ } else ;
14220
14176
  return true;
14221
14177
  };
14178
+ const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
14222
14179
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
14223
- return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
14180
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
14224
14181
  };
14225
14182
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
14226
14183
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
14227
- const {
14228
- attributes
14229
- } = currentNode;
14184
+ const attributes = currentNode.attributes;
14230
14185
  if (!attributes || _isClobbered(currentNode)) {
14231
14186
  return;
14232
14187
  }
@@ -14240,11 +14195,7 @@
14240
14195
  let l4 = attributes.length;
14241
14196
  while (l4--) {
14242
14197
  const attr = attributes[l4];
14243
- const {
14244
- name,
14245
- namespaceURI,
14246
- value: attrValue
14247
- } = attr;
14198
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
14248
14199
  const lcName = transformCaseFunc(name);
14249
14200
  const initValue = attrValue;
14250
14201
  let value = name === "value" ? initValue : stringTrim(initValue);
@@ -14254,11 +14205,11 @@
14254
14205
  hookEvent.forceKeepAttr = void 0;
14255
14206
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
14256
14207
  value = hookEvent.attrValue;
14257
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
14208
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
14258
14209
  _removeAttribute(name, currentNode);
14259
14210
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
14260
14211
  }
14261
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
14212
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
14262
14213
  _removeAttribute(name, currentNode);
14263
14214
  continue;
14264
14215
  }
@@ -14278,7 +14229,7 @@
14278
14229
  continue;
14279
14230
  }
14280
14231
  if (SAFE_FOR_TEMPLATES) {
14281
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14232
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14282
14233
  value = stringReplace(value, expr, " ");
14283
14234
  });
14284
14235
  }
@@ -14288,8 +14239,7 @@
14288
14239
  continue;
14289
14240
  }
14290
14241
  if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
14291
- if (namespaceURI)
14292
- ;
14242
+ if (namespaceURI) ;
14293
14243
  else {
14294
14244
  switch (trustedTypes.getAttributeType(lcTag, lcName)) {
14295
14245
  case "TrustedHTML": {
@@ -14322,7 +14272,7 @@
14322
14272
  }
14323
14273
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
14324
14274
  };
14325
- const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
14275
+ const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
14326
14276
  let shadowNode = null;
14327
14277
  const shadowIterator = _createNodeIterator(fragment);
14328
14278
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -14336,6 +14286,24 @@
14336
14286
  }
14337
14287
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
14338
14288
  };
14289
+ const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root) {
14290
+ if (root.nodeType === NODE_TYPE.element && root.shadowRoot instanceof DocumentFragment) {
14291
+ const sr = root.shadowRoot;
14292
+ _sanitizeAttachedShadowRoots2(sr);
14293
+ _sanitizeShadowDOM2(sr);
14294
+ }
14295
+ const childNodes = root.childNodes;
14296
+ if (!childNodes) {
14297
+ return;
14298
+ }
14299
+ const snapshot = [];
14300
+ arrayForEach(childNodes, (child) => {
14301
+ arrayPush(snapshot, child);
14302
+ });
14303
+ for (const child of snapshot) {
14304
+ _sanitizeAttachedShadowRoots2(child);
14305
+ }
14306
+ };
14339
14307
  DOMPurify.sanitize = function(dirty) {
14340
14308
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
14341
14309
  let body = null;
@@ -14347,13 +14315,9 @@
14347
14315
  dirty = "<!-->";
14348
14316
  }
14349
14317
  if (typeof dirty !== "string" && !_isNode(dirty)) {
14350
- if (typeof dirty.toString === "function") {
14351
- dirty = dirty.toString();
14352
- if (typeof dirty !== "string") {
14353
- throw typeErrorCreate("dirty is not a string, aborting");
14354
- }
14355
- } else {
14356
- throw typeErrorCreate("toString is not a function");
14318
+ dirty = stringifyValue(dirty);
14319
+ if (typeof dirty !== "string") {
14320
+ throw typeErrorCreate("dirty is not a string, aborting");
14357
14321
  }
14358
14322
  }
14359
14323
  if (!DOMPurify.isSupported) {
@@ -14367,12 +14331,14 @@
14367
14331
  IN_PLACE = false;
14368
14332
  }
14369
14333
  if (IN_PLACE) {
14370
- if (dirty.nodeName) {
14371
- const tagName = transformCaseFunc(dirty.nodeName);
14334
+ const nn2 = dirty.nodeName;
14335
+ if (typeof nn2 === "string") {
14336
+ const tagName = transformCaseFunc(nn2);
14372
14337
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
14373
14338
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
14374
14339
  }
14375
14340
  }
14341
+ _sanitizeAttachedShadowRoots2(dirty);
14376
14342
  } else if (dirty instanceof Node2) {
14377
14343
  body = _initDocument("<!---->");
14378
14344
  importedNode = body.ownerDocument.importNode(dirty, true);
@@ -14383,6 +14349,7 @@
14383
14349
  } else {
14384
14350
  body.appendChild(importedNode);
14385
14351
  }
14352
+ _sanitizeAttachedShadowRoots2(importedNode);
14386
14353
  } else {
14387
14354
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
14388
14355
  dirty.indexOf("<") === -1) {
@@ -14401,13 +14368,21 @@
14401
14368
  _sanitizeElements(currentNode);
14402
14369
  _sanitizeAttributes(currentNode);
14403
14370
  if (currentNode.content instanceof DocumentFragment) {
14404
- _sanitizeShadowDOM(currentNode.content);
14371
+ _sanitizeShadowDOM2(currentNode.content);
14405
14372
  }
14406
14373
  }
14407
14374
  if (IN_PLACE) {
14408
14375
  return dirty;
14409
14376
  }
14410
14377
  if (RETURN_DOM) {
14378
+ if (SAFE_FOR_TEMPLATES) {
14379
+ body.normalize();
14380
+ let html3 = body.innerHTML;
14381
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14382
+ html3 = stringReplace(html3, expr, " ");
14383
+ });
14384
+ body.innerHTML = html3;
14385
+ }
14411
14386
  if (RETURN_DOM_FRAGMENT) {
14412
14387
  returnNode = createDocumentFragment2.call(body.ownerDocument);
14413
14388
  while (body.firstChild) {
@@ -14426,7 +14401,7 @@
14426
14401
  serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
14427
14402
  }
14428
14403
  if (SAFE_FOR_TEMPLATES) {
14429
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14404
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14430
14405
  serializedHTML = stringReplace(serializedHTML, expr, " ");
14431
14406
  });
14432
14407
  }
@@ -14736,7 +14711,7 @@
14736
14711
  return " |";
14737
14712
  }
14738
14713
  }), cells = row.split(other.splitPipe);
14739
- let i5 = 0;
14714
+ let i4 = 0;
14740
14715
  if (!cells[0].trim()) {
14741
14716
  cells.shift();
14742
14717
  }
@@ -14751,8 +14726,8 @@
14751
14726
  cells.push("");
14752
14727
  }
14753
14728
  }
14754
- for (; i5 < cells.length; i5++) {
14755
- cells[i5] = cells[i5].trim().replace(other.slashPipe, "|");
14729
+ for (; i4 < cells.length; i4++) {
14730
+ cells[i4] = cells[i4].trim().replace(other.slashPipe, "|");
14756
14731
  }
14757
14732
  return cells;
14758
14733
  }
@@ -14777,15 +14752,15 @@
14777
14752
  return -1;
14778
14753
  }
14779
14754
  let level = 0;
14780
- for (let i5 = 0; i5 < str.length; i5++) {
14781
- if (str[i5] === "\\") {
14782
- i5++;
14783
- } else if (str[i5] === b3[0]) {
14755
+ for (let i4 = 0; i4 < str.length; i4++) {
14756
+ if (str[i4] === "\\") {
14757
+ i4++;
14758
+ } else if (str[i4] === b3[0]) {
14784
14759
  level++;
14785
- } else if (str[i5] === b3[1]) {
14760
+ } else if (str[i4] === b3[1]) {
14786
14761
  level--;
14787
14762
  if (level < 0) {
14788
- return i5;
14763
+ return i4;
14789
14764
  }
14790
14765
  }
14791
14766
  }
@@ -14917,18 +14892,18 @@
14917
14892
  while (lines.length > 0) {
14918
14893
  let inBlockquote = false;
14919
14894
  const currentLines = [];
14920
- let i5;
14921
- for (i5 = 0; i5 < lines.length; i5++) {
14922
- if (this.rules.other.blockquoteStart.test(lines[i5])) {
14923
- currentLines.push(lines[i5]);
14895
+ let i4;
14896
+ for (i4 = 0; i4 < lines.length; i4++) {
14897
+ if (this.rules.other.blockquoteStart.test(lines[i4])) {
14898
+ currentLines.push(lines[i4]);
14924
14899
  inBlockquote = true;
14925
14900
  } else if (!inBlockquote) {
14926
- currentLines.push(lines[i5]);
14901
+ currentLines.push(lines[i4]);
14927
14902
  } else {
14928
14903
  break;
14929
14904
  }
14930
14905
  }
14931
- lines = lines.slice(i5);
14906
+ lines = lines.slice(i4);
14932
14907
  const currentRaw = currentLines.join("\n");
14933
14908
  const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
14934
14909
  raw = raw ? `${raw}
@@ -15117,18 +15092,18 @@ ${currentText}` : currentText;
15117
15092
  return;
15118
15093
  }
15119
15094
  list2.raw = list2.raw.trimEnd();
15120
- for (let i5 = 0; i5 < list2.items.length; i5++) {
15095
+ for (let i4 = 0; i4 < list2.items.length; i4++) {
15121
15096
  this.lexer.state.top = false;
15122
- list2.items[i5].tokens = this.lexer.blockTokens(list2.items[i5].text, []);
15097
+ list2.items[i4].tokens = this.lexer.blockTokens(list2.items[i4].text, []);
15123
15098
  if (!list2.loose) {
15124
- const spacers = list2.items[i5].tokens.filter((t4) => t4.type === "space");
15099
+ const spacers = list2.items[i4].tokens.filter((t4) => t4.type === "space");
15125
15100
  const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t4) => this.rules.other.anyLine.test(t4.raw));
15126
15101
  list2.loose = hasMultipleLineBreaks;
15127
15102
  }
15128
15103
  }
15129
15104
  if (list2.loose) {
15130
- for (let i5 = 0; i5 < list2.items.length; i5++) {
15131
- list2.items[i5].loose = true;
15105
+ for (let i4 = 0; i4 < list2.items.length; i4++) {
15106
+ list2.items[i4].loose = true;
15132
15107
  }
15133
15108
  }
15134
15109
  return list2;
@@ -15194,21 +15169,21 @@ ${currentText}` : currentText;
15194
15169
  item.align.push(null);
15195
15170
  }
15196
15171
  }
15197
- for (let i5 = 0; i5 < headers.length; i5++) {
15172
+ for (let i4 = 0; i4 < headers.length; i4++) {
15198
15173
  item.header.push({
15199
- text: headers[i5],
15200
- tokens: this.lexer.inline(headers[i5]),
15174
+ text: headers[i4],
15175
+ tokens: this.lexer.inline(headers[i4]),
15201
15176
  header: true,
15202
- align: item.align[i5]
15177
+ align: item.align[i4]
15203
15178
  });
15204
15179
  }
15205
15180
  for (const row of rows) {
15206
- item.rows.push(splitCells(row, item.header.length).map((cell, i5) => {
15181
+ item.rows.push(splitCells(row, item.header.length).map((cell, i4) => {
15207
15182
  return {
15208
15183
  text: cell,
15209
15184
  tokens: this.lexer.inline(cell),
15210
15185
  header: false,
15211
- align: item.align[i5]
15186
+ align: item.align[i4]
15212
15187
  };
15213
15188
  }));
15214
15189
  }
@@ -15574,8 +15549,8 @@ ${currentText}` : currentText;
15574
15549
  lex(src) {
15575
15550
  src = src.replace(other.carriageReturn, "\n");
15576
15551
  this.blockTokens(src, this.tokens);
15577
- for (let i5 = 0; i5 < this.inlineQueue.length; i5++) {
15578
- const next = this.inlineQueue[i5];
15552
+ for (let i4 = 0; i4 < this.inlineQueue.length; i4++) {
15553
+ const next = this.inlineQueue[i4];
15579
15554
  this.inlineTokens(next.src, next.tokens);
15580
15555
  }
15581
15556
  this.inlineQueue = [];
@@ -16094,8 +16069,8 @@ ${text2}</tr>
16094
16069
  */
16095
16070
  parse(tokens, top2 = true) {
16096
16071
  let out = "";
16097
- for (let i5 = 0; i5 < tokens.length; i5++) {
16098
- const anyToken = tokens[i5];
16072
+ for (let i4 = 0; i4 < tokens.length; i4++) {
16073
+ const anyToken = tokens[i4];
16099
16074
  if (this.options.extensions?.renderers?.[anyToken.type]) {
16100
16075
  const genericToken = anyToken;
16101
16076
  const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
@@ -16145,8 +16120,8 @@ ${text2}</tr>
16145
16120
  case "text": {
16146
16121
  let textToken = token;
16147
16122
  let body = this.renderer.text(textToken);
16148
- while (i5 + 1 < tokens.length && tokens[i5 + 1].type === "text") {
16149
- textToken = tokens[++i5];
16123
+ while (i4 + 1 < tokens.length && tokens[i4 + 1].type === "text") {
16124
+ textToken = tokens[++i4];
16150
16125
  body += "\n" + this.renderer.text(textToken);
16151
16126
  }
16152
16127
  if (top2) {
@@ -16179,8 +16154,8 @@ ${text2}</tr>
16179
16154
  */
16180
16155
  parseInline(tokens, renderer = this.renderer) {
16181
16156
  let out = "";
16182
- for (let i5 = 0; i5 < tokens.length; i5++) {
16183
- const anyToken = tokens[i5];
16157
+ for (let i4 = 0; i4 < tokens.length; i4++) {
16158
+ const anyToken = tokens[i4];
16184
16159
  if (this.options.extensions?.renderers?.[anyToken.type]) {
16185
16160
  const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
16186
16161
  if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
@@ -16605,8 +16580,7 @@ ${text2}</tr>
16605
16580
  var easymde_controller_default = class extends Controller {
16606
16581
  static targets = ["textarea"];
16607
16582
  connect() {
16608
- if (this.easyMDE)
16609
- return;
16583
+ if (this.easyMDE) return;
16610
16584
  this.originalValue = this.element.value;
16611
16585
  this.easyMDE = new EasyMDE(this.#buildOptions());
16612
16586
  this.element.addEventListener("turbo:before-morph-element", (event) => {
@@ -16633,8 +16607,7 @@ ${text2}</tr>
16633
16607
  }
16634
16608
  }
16635
16609
  #handleMorph() {
16636
- if (!this.element.isConnected)
16637
- return;
16610
+ if (!this.element.isConnected) return;
16638
16611
  if (this.easyMDE) {
16639
16612
  this.easyMDE = null;
16640
16613
  }
@@ -16672,9 +16645,12 @@ ${text2}</tr>
16672
16645
 
16673
16646
  // src/js/controllers/slim_select_controller.js
16674
16647
  var slim_select_controller_default = class extends Controller {
16648
+ static values = {
16649
+ typeaheadUrl: String,
16650
+ typeaheadDebounceMs: { type: Number, default: 200 }
16651
+ };
16675
16652
  connect() {
16676
- if (this.slimSelect)
16677
- return;
16653
+ if (this.slimSelect) return;
16678
16654
  this.#setupSlimSelect();
16679
16655
  this.element.addEventListener("turbo:morph-element", (event) => {
16680
16656
  if (event.target === this.element && !this.morphing) {
@@ -16706,9 +16682,14 @@ ${text2}</tr>
16706
16682
  settings.contentPosition = "absolute";
16707
16683
  settings.openPosition = "auto";
16708
16684
  }
16685
+ const events = {};
16686
+ if (this.hasTypeaheadUrlValue && this.typeaheadUrlValue) {
16687
+ events.search = (search, currentData) => this.#typeaheadFetch(search, currentData);
16688
+ }
16709
16689
  this.slimSelect = new SlimSelect({
16710
16690
  select: this.element,
16711
- settings
16691
+ settings,
16692
+ events
16712
16693
  });
16713
16694
  this.handleDropdownPosition();
16714
16695
  this.boundHandleDropdownOpen = this.handleDropdownOpen.bind(this);
@@ -16796,9 +16777,44 @@ ${text2}</tr>
16796
16777
  disconnect() {
16797
16778
  this.#cleanupSlimSelect();
16798
16779
  }
16780
+ // Server-driven search. SlimSelect calls events.search on each
16781
+ // keystroke; we debounce so that rapid typing produces a single
16782
+ // request, and abort any in-flight fetch when a newer one starts.
16783
+ // Returns a Promise resolving to either a DataArray (rendered as
16784
+ // options) or a string (rendered as the no-results label).
16785
+ #typeaheadFetch(search, _currentData) {
16786
+ if (this._typeaheadDebounce) clearTimeout(this._typeaheadDebounce);
16787
+ if (this._typeaheadAbort) this._typeaheadAbort.abort();
16788
+ return new Promise((resolve) => {
16789
+ this._typeaheadDebounce = setTimeout(() => {
16790
+ this._typeaheadAbort = new AbortController();
16791
+ this.#performTypeaheadFetch(search, this._typeaheadAbort.signal).then(resolve);
16792
+ }, this.typeaheadDebounceMsValue);
16793
+ });
16794
+ }
16795
+ async #performTypeaheadFetch(search, signal) {
16796
+ const url = new URL(this.typeaheadUrlValue, window.location.origin);
16797
+ url.searchParams.set("q", search || "");
16798
+ try {
16799
+ const res = await fetch(url.toString(), {
16800
+ headers: { Accept: "application/json" },
16801
+ signal
16802
+ });
16803
+ if (!res.ok) return "Search failed";
16804
+ const json = await res.json();
16805
+ const results = Array.isArray(json.results) ? json.results : [];
16806
+ return results.map((row) => ({
16807
+ value: String(row.value ?? ""),
16808
+ text: String(row.label ?? "")
16809
+ }));
16810
+ } catch (e4) {
16811
+ if (e4.name === "AbortError") return [];
16812
+ console.warn("[slim-select] typeahead error", e4);
16813
+ return "Search failed";
16814
+ }
16815
+ }
16799
16816
  #handleMorph() {
16800
- if (!this.element.isConnected)
16801
- return;
16817
+ if (!this.element.isConnected) return;
16802
16818
  this.#cleanupSlimSelect();
16803
16819
  this.#setupSlimSelect();
16804
16820
  }
@@ -16844,8 +16860,7 @@ ${text2}</tr>
16844
16860
  // src/js/controllers/flatpickr_controller.js
16845
16861
  var flatpickr_controller_default = class extends Controller {
16846
16862
  connect() {
16847
- if (this.picker)
16848
- return;
16863
+ if (this.picker) return;
16849
16864
  this.modal = document.querySelector("[data-controller=remote-modal]");
16850
16865
  this.picker = new flatpickr(this.element, this.#buildOptions());
16851
16866
  this.element.addEventListener("turbo:morph-element", (event) => {
@@ -16865,8 +16880,7 @@ ${text2}</tr>
16865
16880
  }
16866
16881
  }
16867
16882
  #handleMorph() {
16868
- if (!this.element.isConnected)
16869
- return;
16883
+ if (!this.element.isConnected) return;
16870
16884
  if (this.picker) {
16871
16885
  this.picker.destroy();
16872
16886
  this.picker = null;
@@ -16913,8 +16927,7 @@ ${text2}</tr>
16913
16927
  this.inputTargetDisconnected();
16914
16928
  }
16915
16929
  inputTargetConnected() {
16916
- if (!this.hasInputTarget || this.iti)
16917
- return;
16930
+ if (!this.hasInputTarget || this.iti) return;
16918
16931
  this.iti = window.intlTelInput(this.inputTarget, this.#buildOptions());
16919
16932
  this.element.addEventListener("turbo:morph-element", (event) => {
16920
16933
  if (event.target === this.element && !this.morphing) {
@@ -16933,8 +16946,7 @@ ${text2}</tr>
16933
16946
  }
16934
16947
  }
16935
16948
  #handleMorph() {
16936
- if (!this.inputTarget || !this.inputTarget.isConnected)
16937
- return;
16949
+ if (!this.inputTarget || !this.inputTarget.isConnected) return;
16938
16950
  if (this.iti) {
16939
16951
  this.iti.destroy();
16940
16952
  this.iti = null;
@@ -16974,12 +16986,27 @@ ${text2}</tr>
16974
16986
  connect() {
16975
16987
  this.activeClasses = this.hasActiveClassesValue ? this.activeClassesValue.split(" ") : [];
16976
16988
  this.inActiveClasses = this.hasInActiveClassesValue ? this.inActiveClassesValue.split(" ") : [];
16977
- this.#selectInternal(this.defaultTabValue || this.btnTargets[0].id);
16989
+ const fromHash = this.#buttonIdFromHash();
16990
+ const initialId = fromHash || this.defaultTabValue || this.btnTargets[0]?.id;
16991
+ this.#selectInternal(initialId, { skipFocus: true, skipHashUpdate: true });
16992
+ this._syncFromHash = this._syncFromHash.bind(this);
16993
+ window.addEventListener("hashchange", this._syncFromHash);
16994
+ document.addEventListener("turbo:load", this._syncFromHash);
16995
+ }
16996
+ disconnect() {
16997
+ if (this._syncFromHash) {
16998
+ window.removeEventListener("hashchange", this._syncFromHash);
16999
+ document.removeEventListener("turbo:load", this._syncFromHash);
17000
+ }
17001
+ }
17002
+ _syncFromHash() {
17003
+ const id2 = this.#buttonIdFromHash();
17004
+ if (id2) this.#selectInternal(id2, { skipFocus: true, skipHashUpdate: true });
16978
17005
  }
16979
17006
  select(event) {
16980
17007
  this.#selectInternal(event.currentTarget.id);
16981
17008
  }
16982
- #selectInternal(id2) {
17009
+ #selectInternal(id2, options2 = {}) {
16983
17010
  const selectedBtn = this.btnTargets.find((element) => element.id === id2);
16984
17011
  if (!selectedBtn) {
16985
17012
  console.error(`Tab Button with id "${id2}" not found`);
@@ -17006,10 +17033,27 @@ ${text2}</tr>
17006
17033
  selectedBtn.classList.add(...this.activeClasses);
17007
17034
  selectedTab.hidden = false;
17008
17035
  selectedTab.setAttribute("aria-hidden", "false");
17009
- if (selectedBtn !== document.activeElement) {
17036
+ if (!options2.skipHashUpdate) this.#updateHash(id2);
17037
+ if (!options2.skipFocus && selectedBtn !== document.activeElement) {
17010
17038
  selectedBtn.focus();
17011
17039
  }
17012
17040
  }
17041
+ // Button ids follow `${identifier}-tab`. The URL hash carries just
17042
+ // the identifier (e.g., #details, #orders).
17043
+ #buttonIdFromHash() {
17044
+ const hash3 = window.location.hash.replace(/^#/, "");
17045
+ if (!hash3) return null;
17046
+ const candidateId = `${hash3}-tab`;
17047
+ const exists = this.btnTargets.some((btn) => btn.id === candidateId);
17048
+ return exists ? candidateId : null;
17049
+ }
17050
+ #updateHash(buttonId) {
17051
+ const identifier = buttonId.replace(/-tab$/, "");
17052
+ const newHash = `#${identifier}`;
17053
+ if (window.location.hash !== newHash) {
17054
+ history.replaceState(null, "", newHash);
17055
+ }
17056
+ }
17013
17057
  };
17014
17058
 
17015
17059
  // node_modules/@uppy/utils/lib/Translator.js
@@ -17019,11 +17063,11 @@ ${text2}</tr>
17019
17063
  if (typeof chunk !== "string") {
17020
17064
  return newParts.push(chunk);
17021
17065
  }
17022
- return rx[Symbol.split](chunk).forEach((raw, i5, list2) => {
17066
+ return rx[Symbol.split](chunk).forEach((raw, i4, list2) => {
17023
17067
  if (raw !== "") {
17024
17068
  newParts.push(raw);
17025
17069
  }
17026
- if (i5 < list2.length - 1) {
17070
+ if (i4 < list2.length - 1) {
17027
17071
  newParts.push(replacement);
17028
17072
  }
17029
17073
  });
@@ -17256,24 +17300,20 @@ ${text2}</tr>
17256
17300
  var y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
17257
17301
  var d = Array.isArray;
17258
17302
  function w(n3, l4) {
17259
- for (var u5 in l4)
17260
- n3[u5] = l4[u5];
17303
+ for (var u5 in l4) n3[u5] = l4[u5];
17261
17304
  return n3;
17262
17305
  }
17263
17306
  function g(n3) {
17264
17307
  n3 && n3.parentNode && n3.parentNode.removeChild(n3);
17265
17308
  }
17266
17309
  function _(l4, u5, t4) {
17267
- var i5, o4, r4, e4 = {};
17268
- for (r4 in u5)
17269
- "key" == r4 ? i5 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : e4[r4] = u5[r4];
17270
- if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps)
17271
- for (r4 in l4.defaultProps)
17272
- void 0 === e4[r4] && (e4[r4] = l4.defaultProps[r4]);
17273
- return m(l4, e4, i5, o4, null);
17274
- }
17275
- function m(n3, t4, i5, o4, r4) {
17276
- var e4 = { type: n3, props: t4, key: i5, ref: o4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 };
17310
+ var i4, o4, r4, e4 = {};
17311
+ for (r4 in u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : e4[r4] = u5[r4];
17312
+ if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps) for (r4 in l4.defaultProps) void 0 === e4[r4] && (e4[r4] = l4.defaultProps[r4]);
17313
+ return m(l4, e4, i4, o4, null);
17314
+ }
17315
+ function m(n3, t4, i4, o4, r4) {
17316
+ var e4 = { type: n3, props: t4, key: i4, ref: o4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 };
17277
17317
  return null == r4 && null != l.vnode && l.vnode(e4), e4;
17278
17318
  }
17279
17319
  function b() {
@@ -17286,21 +17326,17 @@ ${text2}</tr>
17286
17326
  this.props = n3, this.context = l4;
17287
17327
  }
17288
17328
  function S(n3, l4) {
17289
- if (null == l4)
17290
- return n3.__ ? S(n3.__, n3.__i + 1) : null;
17291
- for (var u5; l4 < n3.__k.length; l4++)
17292
- if (null != (u5 = n3.__k[l4]) && null != u5.__e)
17293
- return u5.__e;
17329
+ if (null == l4) return n3.__ ? S(n3.__, n3.__i + 1) : null;
17330
+ for (var u5; l4 < n3.__k.length; l4++) if (null != (u5 = n3.__k[l4]) && null != u5.__e) return u5.__e;
17294
17331
  return "function" == typeof n3.type ? S(n3) : null;
17295
17332
  }
17296
17333
  function C(n3) {
17297
17334
  var l4, u5;
17298
17335
  if (null != (n3 = n3.__) && null != n3.__c) {
17299
- for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++)
17300
- if (null != (u5 = n3.__k[l4]) && null != u5.__e) {
17301
- n3.__e = n3.__c.base = u5.__e;
17302
- break;
17303
- }
17336
+ for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++) if (null != (u5 = n3.__k[l4]) && null != u5.__e) {
17337
+ n3.__e = n3.__c.base = u5.__e;
17338
+ break;
17339
+ }
17304
17340
  return C(n3);
17305
17341
  }
17306
17342
  }
@@ -17308,30 +17344,24 @@ ${text2}</tr>
17308
17344
  (!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || o != l.debounceRendering) && ((o = l.debounceRendering) || r)($);
17309
17345
  }
17310
17346
  function $() {
17311
- for (var n3, u5, t4, o4, r4, f5, c4, s4 = 1; i.length; )
17312
- i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t4 = void 0, o4 = void 0, r4 = (o4 = (u5 = n3).__v).__e, f5 = [], c4 = [], u5.__P && ((t4 = w({}, o4)).__v = o4.__v + 1, l.vnode && l.vnode(t4), O(u5.__P, t4, o4, u5.__n, u5.__P.namespaceURI, 32 & o4.__u ? [r4] : null, f5, null == r4 ? S(o4) : r4, !!(32 & o4.__u), c4), t4.__v = o4.__v, t4.__.__k[t4.__i] = t4, N(f5, t4, c4), o4.__e = o4.__ = null, t4.__e != r4 && C(t4)));
17347
+ for (var n3, u5, t4, o4, r4, f5, c4, s4 = 1; i.length; ) i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t4 = void 0, o4 = void 0, r4 = (o4 = (u5 = n3).__v).__e, f5 = [], c4 = [], u5.__P && ((t4 = w({}, o4)).__v = o4.__v + 1, l.vnode && l.vnode(t4), O(u5.__P, t4, o4, u5.__n, u5.__P.namespaceURI, 32 & o4.__u ? [r4] : null, f5, null == r4 ? S(o4) : r4, !!(32 & o4.__u), c4), t4.__v = o4.__v, t4.__.__k[t4.__i] = t4, N(f5, t4, c4), o4.__e = o4.__ = null, t4.__e != r4 && C(t4)));
17313
17348
  $.__r = 0;
17314
17349
  }
17315
- function I(n3, l4, u5, t4, i5, o4, r4, e4, f5, c4, s4) {
17350
+ function I(n3, l4, u5, t4, i4, o4, r4, e4, f5, c4, s4) {
17316
17351
  var a4, h4, y4, d4, w4, g5, _4, m4 = t4 && t4.__k || v, b3 = l4.length;
17317
- for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++)
17318
- null != (y4 = u5.__k[a4]) && (h4 = -1 == y4.__i ? p : m4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i5, o4, r4, e4, f5, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && B(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), (_4 = !!(4 & y4.__u)) || h4.__k === y4.__k ? f5 = A(y4, f5, n3, _4) : "function" == typeof y4.type && void 0 !== g5 ? f5 = g5 : d4 && (f5 = d4.nextSibling), y4.__u &= -7);
17352
+ for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++) null != (y4 = u5.__k[a4]) && (h4 = -1 == y4.__i ? p : m4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i4, o4, r4, e4, f5, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && B(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), (_4 = !!(4 & y4.__u)) || h4.__k === y4.__k ? f5 = A(y4, f5, n3, _4) : "function" == typeof y4.type && void 0 !== g5 ? f5 = g5 : d4 && (f5 = d4.nextSibling), y4.__u &= -7);
17319
17353
  return u5.__e = w4, f5;
17320
17354
  }
17321
- function P(n3, l4, u5, t4, i5) {
17355
+ function P(n3, l4, u5, t4, i4) {
17322
17356
  var o4, r4, e4, f5, c4, s4 = u5.length, a4 = s4, h4 = 0;
17323
- for (n3.__k = new Array(i5), o4 = 0; o4 < i5; o4++)
17324
- null != (r4 = l4[o4]) && "boolean" != typeof r4 && "function" != typeof r4 ? ("string" == typeof r4 || "number" == typeof r4 || "bigint" == typeof r4 || r4.constructor == String ? r4 = n3.__k[o4] = m(null, r4, null, null, null) : d(r4) ? r4 = n3.__k[o4] = m(k, { children: r4 }, null, null, null) : void 0 === r4.constructor && r4.__b > 0 ? r4 = n3.__k[o4] = m(r4.type, r4.props, r4.key, r4.ref ? r4.ref : null, r4.__v) : n3.__k[o4] = r4, f5 = o4 + h4, r4.__ = n3, r4.__b = n3.__b + 1, e4 = null, -1 != (c4 = r4.__i = L(r4, u5, f5, a4)) && (a4--, (e4 = u5[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i5 > s4 ? h4-- : i5 < s4 && h4++), "function" != typeof r4.type && (r4.__u |= 4)) : c4 != f5 && (c4 == f5 - 1 ? h4-- : c4 == f5 + 1 ? h4++ : (c4 > f5 ? h4-- : h4++, r4.__u |= 4))) : n3.__k[o4] = null;
17325
- if (a4)
17326
- for (o4 = 0; o4 < s4; o4++)
17327
- null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), D(e4, e4));
17357
+ for (n3.__k = new Array(i4), o4 = 0; o4 < i4; o4++) null != (r4 = l4[o4]) && "boolean" != typeof r4 && "function" != typeof r4 ? ("string" == typeof r4 || "number" == typeof r4 || "bigint" == typeof r4 || r4.constructor == String ? r4 = n3.__k[o4] = m(null, r4, null, null, null) : d(r4) ? r4 = n3.__k[o4] = m(k, { children: r4 }, null, null, null) : void 0 === r4.constructor && r4.__b > 0 ? r4 = n3.__k[o4] = m(r4.type, r4.props, r4.key, r4.ref ? r4.ref : null, r4.__v) : n3.__k[o4] = r4, f5 = o4 + h4, r4.__ = n3, r4.__b = n3.__b + 1, e4 = null, -1 != (c4 = r4.__i = L(r4, u5, f5, a4)) && (a4--, (e4 = u5[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i4 > s4 ? h4-- : i4 < s4 && h4++), "function" != typeof r4.type && (r4.__u |= 4)) : c4 != f5 && (c4 == f5 - 1 ? h4-- : c4 == f5 + 1 ? h4++ : (c4 > f5 ? h4-- : h4++, r4.__u |= 4))) : n3.__k[o4] = null;
17358
+ if (a4) for (o4 = 0; o4 < s4; o4++) null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), D(e4, e4));
17328
17359
  return t4;
17329
17360
  }
17330
17361
  function A(n3, l4, u5, t4) {
17331
- var i5, o4;
17362
+ var i4, o4;
17332
17363
  if ("function" == typeof n3.type) {
17333
- for (i5 = n3.__k, o4 = 0; i5 && o4 < i5.length; o4++)
17334
- i5[o4] && (i5[o4].__ = n3, l4 = A(i5[o4], l4, u5, t4));
17364
+ for (i4 = n3.__k, o4 = 0; i4 && o4 < i4.length; o4++) i4[o4] && (i4[o4].__ = n3, l4 = A(i4[o4], l4, u5, t4));
17335
17365
  return l4;
17336
17366
  }
17337
17367
  n3.__e != l4 && (t4 && (l4 && n3.type && !l4.parentNode && (l4 = S(n3)), u5.insertBefore(n3.__e, l4 || null)), l4 = n3.__e);
@@ -17346,116 +17376,88 @@ ${text2}</tr>
17346
17376
  }) : l4.push(n3)), l4;
17347
17377
  }
17348
17378
  function L(n3, l4, u5, t4) {
17349
- var i5, o4, r4, e4 = n3.key, f5 = n3.type, c4 = l4[u5], s4 = null != c4 && 0 == (2 & c4.__u);
17350
- if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type)
17351
- return u5;
17379
+ var i4, o4, r4, e4 = n3.key, f5 = n3.type, c4 = l4[u5], s4 = null != c4 && 0 == (2 & c4.__u);
17380
+ if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type) return u5;
17352
17381
  if (t4 > (s4 ? 1 : 0)) {
17353
- for (i5 = u5 - 1, o4 = u5 + 1; i5 >= 0 || o4 < l4.length; )
17354
- if (null != (c4 = l4[r4 = i5 >= 0 ? i5-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type)
17355
- return r4;
17382
+ for (i4 = u5 - 1, o4 = u5 + 1; i4 >= 0 || o4 < l4.length; ) if (null != (c4 = l4[r4 = i4 >= 0 ? i4-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type) return r4;
17356
17383
  }
17357
17384
  return -1;
17358
17385
  }
17359
17386
  function T(n3, l4, u5) {
17360
17387
  "-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 || y.test(l4) ? u5 : u5 + "px";
17361
17388
  }
17362
- function j(n3, l4, u5, t4, i5) {
17389
+ function j(n3, l4, u5, t4, i4) {
17363
17390
  var o4, r4;
17364
- n:
17365
- if ("style" == l4)
17366
- if ("string" == typeof u5)
17367
- n3.style.cssText = u5;
17368
- else {
17369
- if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4)
17370
- for (l4 in t4)
17371
- u5 && l4 in u5 || T(n3.style, l4, "");
17372
- if (u5)
17373
- for (l4 in u5)
17374
- t4 && u5[l4] == t4[l4] || T(n3.style, l4, u5[l4]);
17375
- }
17376
- else if ("o" == l4[0] && "n" == l4[1])
17377
- o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ? t4 ? u5.u = t4.u : (u5.u = c, n3.addEventListener(l4, o4 ? a : s, o4)) : n3.removeEventListener(l4, o4 ? a : s, o4);
17378
- else {
17379
- if ("http://www.w3.org/2000/svg" == i5)
17380
- l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
17381
- else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3)
17382
- try {
17383
- n3[l4] = null == u5 ? "" : u5;
17384
- break n;
17385
- } catch (n4) {
17386
- }
17387
- "function" == typeof u5 || (null == u5 || false === u5 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u5 ? "" : u5));
17391
+ n: if ("style" == l4) if ("string" == typeof u5) n3.style.cssText = u5;
17392
+ else {
17393
+ if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4) for (l4 in t4) u5 && l4 in u5 || T(n3.style, l4, "");
17394
+ if (u5) for (l4 in u5) t4 && u5[l4] == t4[l4] || T(n3.style, l4, u5[l4]);
17395
+ }
17396
+ else if ("o" == l4[0] && "n" == l4[1]) o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ? t4 ? u5.u = t4.u : (u5.u = c, n3.addEventListener(l4, o4 ? a : s, o4)) : n3.removeEventListener(l4, o4 ? a : s, o4);
17397
+ else {
17398
+ if ("http://www.w3.org/2000/svg" == i4) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
17399
+ else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3) try {
17400
+ n3[l4] = null == u5 ? "" : u5;
17401
+ break n;
17402
+ } catch (n4) {
17388
17403
  }
17404
+ "function" == typeof u5 || (null == u5 || false === u5 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u5 ? "" : u5));
17405
+ }
17389
17406
  }
17390
17407
  function F(n3) {
17391
17408
  return function(u5) {
17392
17409
  if (this.l) {
17393
17410
  var t4 = this.l[u5.type + n3];
17394
- if (null == u5.t)
17395
- u5.t = c++;
17396
- else if (u5.t < t4.u)
17397
- return;
17411
+ if (null == u5.t) u5.t = c++;
17412
+ else if (u5.t < t4.u) return;
17398
17413
  return t4(l.event ? l.event(u5) : u5);
17399
17414
  }
17400
17415
  };
17401
17416
  }
17402
- function O(n3, u5, t4, i5, o4, r4, e4, f5, c4, s4) {
17417
+ function O(n3, u5, t4, i4, o4, r4, e4, f5, c4, s4) {
17403
17418
  var a4, h4, p4, v4, y4, _4, m4, b3, S3, C4, M3, $3, P5, A5, H4, L3, T5, j5 = u5.type;
17404
- if (void 0 !== u5.constructor)
17405
- return null;
17419
+ if (void 0 !== u5.constructor) return null;
17406
17420
  128 & t4.__u && (c4 = !!(32 & t4.__u), r4 = [f5 = u5.__e = t4.__e]), (a4 = l.__b) && a4(u5);
17407
- n:
17408
- if ("function" == typeof j5)
17409
- try {
17410
- if (b3 = u5.props, S3 = "prototype" in j5 && j5.prototype.render, C4 = (a4 = j5.contextType) && i5[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i5, t4.__c ? m4 = (h4 = u5.__c = t4.__c).__ = h4.__E : (S3 ? u5.__c = h4 = new j5(b3, M3) : (u5.__c = h4 = new x(b3, M3), h4.constructor = j5, h4.render = E), C4 && C4.sub(h4), h4.state || (h4.state = {}), h4.__n = i5, p4 = h4.__d = true, h4.__h = [], h4._sb = []), S3 && null == h4.__s && (h4.__s = h4.state), S3 && null != j5.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = w({}, h4.__s)), w(h4.__s, j5.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = u5, p4)
17411
- S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
17412
- else {
17413
- if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), u5.__v == t4.__v || !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3)) {
17414
- for (u5.__v != t4.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), u5.__e = t4.__e, u5.__k = t4.__k, u5.__k.some(function(n4) {
17415
- n4 && (n4.__ = u5);
17416
- }), $3 = 0; $3 < h4._sb.length; $3++)
17417
- h4.__h.push(h4._sb[$3]);
17418
- h4._sb = [], h4.__h.length && e4.push(h4);
17419
- break n;
17420
- }
17421
- null != h4.componentWillUpdate && h4.componentWillUpdate(b3, h4.__s, M3), S3 && null != h4.componentDidUpdate && h4.__h.push(function() {
17422
- h4.componentDidUpdate(v4, y4, _4);
17423
- });
17424
- }
17425
- if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P5 = l.__r, A5 = 0, S3) {
17426
- for (h4.state = h4.__s, h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), H4 = 0; H4 < h4._sb.length; H4++)
17427
- h4.__h.push(h4._sb[H4]);
17428
- h4._sb = [];
17429
- } else
17430
- do {
17431
- h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
17432
- } while (h4.__d && ++A5 < 25);
17433
- h4.state = h4.__s, null != h4.getChildContext && (i5 = w(w({}, i5), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = V(a4.props.children)), f5 = I(n3, d(L3) ? L3 : [L3], u5, t4, i5, o4, r4, e4, f5, c4, s4), h4.base = u5.__e, u5.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
17434
- } catch (n4) {
17435
- if (u5.__v = null, c4 || null != r4)
17436
- if (n4.then) {
17437
- for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; )
17438
- f5 = f5.nextSibling;
17439
- r4[r4.indexOf(f5)] = null, u5.__e = f5;
17440
- } else {
17441
- for (T5 = r4.length; T5--; )
17442
- g(r4[T5]);
17443
- z(u5);
17444
- }
17445
- else
17446
- u5.__e = t4.__e, u5.__k = t4.__k, n4.then || z(u5);
17447
- l.__e(n4, u5, t4);
17448
- }
17449
- else
17450
- null == r4 && u5.__v == t4.__v ? (u5.__k = t4.__k, u5.__e = t4.__e) : f5 = u5.__e = q(t4.__e, u5, t4, i5, o4, r4, e4, c4, s4);
17421
+ n: if ("function" == typeof j5) try {
17422
+ if (b3 = u5.props, S3 = "prototype" in j5 && j5.prototype.render, C4 = (a4 = j5.contextType) && i4[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i4, t4.__c ? m4 = (h4 = u5.__c = t4.__c).__ = h4.__E : (S3 ? u5.__c = h4 = new j5(b3, M3) : (u5.__c = h4 = new x(b3, M3), h4.constructor = j5, h4.render = E), C4 && C4.sub(h4), h4.state || (h4.state = {}), h4.__n = i4, p4 = h4.__d = true, h4.__h = [], h4._sb = []), S3 && null == h4.__s && (h4.__s = h4.state), S3 && null != j5.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = w({}, h4.__s)), w(h4.__s, j5.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = u5, p4) S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
17423
+ else {
17424
+ if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), u5.__v == t4.__v || !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3)) {
17425
+ for (u5.__v != t4.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), u5.__e = t4.__e, u5.__k = t4.__k, u5.__k.some(function(n4) {
17426
+ n4 && (n4.__ = u5);
17427
+ }), $3 = 0; $3 < h4._sb.length; $3++) h4.__h.push(h4._sb[$3]);
17428
+ h4._sb = [], h4.__h.length && e4.push(h4);
17429
+ break n;
17430
+ }
17431
+ null != h4.componentWillUpdate && h4.componentWillUpdate(b3, h4.__s, M3), S3 && null != h4.componentDidUpdate && h4.__h.push(function() {
17432
+ h4.componentDidUpdate(v4, y4, _4);
17433
+ });
17434
+ }
17435
+ if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P5 = l.__r, A5 = 0, S3) {
17436
+ for (h4.state = h4.__s, h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), H4 = 0; H4 < h4._sb.length; H4++) h4.__h.push(h4._sb[H4]);
17437
+ h4._sb = [];
17438
+ } else do {
17439
+ h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
17440
+ } while (h4.__d && ++A5 < 25);
17441
+ h4.state = h4.__s, null != h4.getChildContext && (i4 = w(w({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = V(a4.props.children)), f5 = I(n3, d(L3) ? L3 : [L3], u5, t4, i4, o4, r4, e4, f5, c4, s4), h4.base = u5.__e, u5.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
17442
+ } catch (n4) {
17443
+ if (u5.__v = null, c4 || null != r4) if (n4.then) {
17444
+ for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
17445
+ r4[r4.indexOf(f5)] = null, u5.__e = f5;
17446
+ } else {
17447
+ for (T5 = r4.length; T5--; ) g(r4[T5]);
17448
+ z(u5);
17449
+ }
17450
+ else u5.__e = t4.__e, u5.__k = t4.__k, n4.then || z(u5);
17451
+ l.__e(n4, u5, t4);
17452
+ }
17453
+ else null == r4 && u5.__v == t4.__v ? (u5.__k = t4.__k, u5.__e = t4.__e) : f5 = u5.__e = q(t4.__e, u5, t4, i4, o4, r4, e4, c4, s4);
17451
17454
  return (a4 = l.diffed) && a4(u5), 128 & u5.__u ? void 0 : f5;
17452
17455
  }
17453
17456
  function z(n3) {
17454
17457
  n3 && n3.__c && (n3.__c.__e = true), n3 && n3.__k && n3.__k.forEach(z);
17455
17458
  }
17456
17459
  function N(n3, u5, t4) {
17457
- for (var i5 = 0; i5 < t4.length; i5++)
17458
- B(t4[i5], t4[++i5], t4[++i5]);
17460
+ for (var i4 = 0; i4 < t4.length; i4++) B(t4[i4], t4[++i4], t4[++i4]);
17459
17461
  l.__c && l.__c(u5, n3), n3.some(function(u6) {
17460
17462
  try {
17461
17463
  n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
@@ -17469,43 +17471,30 @@ ${text2}</tr>
17469
17471
  function V(n3) {
17470
17472
  return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : d(n3) ? n3.map(V) : w({}, n3);
17471
17473
  }
17472
- function q(u5, t4, i5, o4, r4, e4, f5, c4, s4) {
17473
- var a4, h4, v4, y4, w4, _4, m4, b3 = i5.props || p, k4 = t4.props, x4 = t4.type;
17474
+ function q(u5, t4, i4, o4, r4, e4, f5, c4, s4) {
17475
+ var a4, h4, v4, y4, w4, _4, m4, b3 = i4.props || p, k4 = t4.props, x4 = t4.type;
17474
17476
  if ("svg" == x4 ? r4 = "http://www.w3.org/2000/svg" : "math" == x4 ? r4 = "http://www.w3.org/1998/Math/MathML" : r4 || (r4 = "http://www.w3.org/1999/xhtml"), null != e4) {
17475
- for (a4 = 0; a4 < e4.length; a4++)
17476
- if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x4 && (x4 ? w4.localName == x4 : 3 == w4.nodeType)) {
17477
- u5 = w4, e4[a4] = null;
17478
- break;
17479
- }
17477
+ for (a4 = 0; a4 < e4.length; a4++) if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x4 && (x4 ? w4.localName == x4 : 3 == w4.nodeType)) {
17478
+ u5 = w4, e4[a4] = null;
17479
+ break;
17480
+ }
17480
17481
  }
17481
17482
  if (null == u5) {
17482
- if (null == x4)
17483
- return document.createTextNode(k4);
17483
+ if (null == x4) return document.createTextNode(k4);
17484
17484
  u5 = document.createElementNS(r4, x4, k4.is && k4), c4 && (l.__m && l.__m(t4, e4), c4 = false), e4 = null;
17485
17485
  }
17486
- if (null == x4)
17487
- b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
17486
+ if (null == x4) b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
17488
17487
  else {
17489
- if (e4 = e4 && n.call(u5.childNodes), !c4 && null != e4)
17490
- for (b3 = {}, a4 = 0; a4 < u5.attributes.length; a4++)
17491
- b3[(w4 = u5.attributes[a4]).name] = w4.value;
17492
- for (a4 in b3)
17493
- if (w4 = b3[a4], "children" == a4)
17494
- ;
17495
- else if ("dangerouslySetInnerHTML" == a4)
17496
- v4 = w4;
17497
- else if (!(a4 in k4)) {
17498
- if ("value" == a4 && "defaultValue" in k4 || "checked" == a4 && "defaultChecked" in k4)
17499
- continue;
17500
- j(u5, a4, null, w4, r4);
17501
- }
17502
- for (a4 in k4)
17503
- w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _4 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(u5, a4, w4, b3[a4], r4);
17504
- if (h4)
17505
- c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
17506
- else if (v4 && (u5.innerHTML = ""), I("template" == t4.type ? u5.content : u5, d(y4) ? y4 : [y4], t4, i5, o4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : r4, e4, f5, e4 ? e4[0] : i5.__k && S(i5, 0), c4, s4), null != e4)
17507
- for (a4 = e4.length; a4--; )
17508
- g(e4[a4]);
17488
+ if (e4 = e4 && n.call(u5.childNodes), !c4 && null != e4) for (b3 = {}, a4 = 0; a4 < u5.attributes.length; a4++) b3[(w4 = u5.attributes[a4]).name] = w4.value;
17489
+ for (a4 in b3) if (w4 = b3[a4], "children" == a4) ;
17490
+ else if ("dangerouslySetInnerHTML" == a4) v4 = w4;
17491
+ else if (!(a4 in k4)) {
17492
+ if ("value" == a4 && "defaultValue" in k4 || "checked" == a4 && "defaultChecked" in k4) continue;
17493
+ j(u5, a4, null, w4, r4);
17494
+ }
17495
+ for (a4 in k4) w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _4 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(u5, a4, w4, b3[a4], r4);
17496
+ if (h4) c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
17497
+ else if (v4 && (u5.innerHTML = ""), I("template" == t4.type ? u5.content : u5, d(y4) ? y4 : [y4], t4, i4, o4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : r4, e4, f5, e4 ? e4[0] : i4.__k && S(i4, 0), c4, s4), null != e4) for (a4 = e4.length; a4--; ) g(e4[a4]);
17509
17498
  c4 || (a4 = "value", "progress" == x4 && null == _4 ? u5.removeAttribute("value") : null != _4 && (_4 !== u5[a4] || "progress" == x4 && !_4 || "option" == x4 && _4 != b3[a4]) && j(u5, a4, _4, b3[a4], r4), a4 = "checked", null != m4 && m4 != u5[a4] && j(u5, a4, m4, b3[a4], r4));
17510
17499
  }
17511
17500
  return u5;
@@ -17513,52 +17502,44 @@ ${text2}</tr>
17513
17502
  function B(n3, u5, t4) {
17514
17503
  try {
17515
17504
  if ("function" == typeof n3) {
17516
- var i5 = "function" == typeof n3.__u;
17517
- i5 && n3.__u(), i5 && null == u5 || (n3.__u = n3(u5));
17518
- } else
17519
- n3.current = u5;
17505
+ var i4 = "function" == typeof n3.__u;
17506
+ i4 && n3.__u(), i4 && null == u5 || (n3.__u = n3(u5));
17507
+ } else n3.current = u5;
17520
17508
  } catch (n4) {
17521
17509
  l.__e(n4, t4);
17522
17510
  }
17523
17511
  }
17524
17512
  function D(n3, u5, t4) {
17525
- var i5, o4;
17526
- if (l.unmount && l.unmount(n3), (i5 = n3.ref) && (i5.current && i5.current != n3.__e || B(i5, null, u5)), null != (i5 = n3.__c)) {
17527
- if (i5.componentWillUnmount)
17528
- try {
17529
- i5.componentWillUnmount();
17530
- } catch (n4) {
17531
- l.__e(n4, u5);
17532
- }
17533
- i5.base = i5.__P = null;
17513
+ var i4, o4;
17514
+ if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current != n3.__e || B(i4, null, u5)), null != (i4 = n3.__c)) {
17515
+ if (i4.componentWillUnmount) try {
17516
+ i4.componentWillUnmount();
17517
+ } catch (n4) {
17518
+ l.__e(n4, u5);
17519
+ }
17520
+ i4.base = i4.__P = null;
17534
17521
  }
17535
- if (i5 = n3.__k)
17536
- for (o4 = 0; o4 < i5.length; o4++)
17537
- i5[o4] && D(i5[o4], u5, t4 || "function" != typeof n3.type);
17522
+ if (i4 = n3.__k) for (o4 = 0; o4 < i4.length; o4++) i4[o4] && D(i4[o4], u5, t4 || "function" != typeof n3.type);
17538
17523
  t4 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
17539
17524
  }
17540
17525
  function E(n3, l4, u5) {
17541
17526
  return this.constructor(n3, u5);
17542
17527
  }
17543
- function G(u5, t4, i5) {
17528
+ function G(u5, t4, i4) {
17544
17529
  var o4, r4, e4, f5;
17545
- t4 == document && (t4 = document.documentElement), l.__ && l.__(u5, t4), r4 = (o4 = "function" == typeof i5) ? null : i5 && i5.__k || t4.__k, e4 = [], f5 = [], O(t4, u5 = (!o4 && i5 || t4).__k = _(k, null, [u5]), r4 || p, p, t4.namespaceURI, !o4 && i5 ? [i5] : r4 ? null : t4.firstChild ? n.call(t4.childNodes) : null, e4, !o4 && i5 ? i5 : r4 ? r4.__e : t4.firstChild, o4, f5), N(e4, u5, f5);
17530
+ t4 == document && (t4 = document.documentElement), l.__ && l.__(u5, t4), r4 = (o4 = "function" == typeof i4) ? null : i4 && i4.__k || t4.__k, e4 = [], f5 = [], O(t4, u5 = (!o4 && i4 || t4).__k = _(k, null, [u5]), r4 || p, p, t4.namespaceURI, !o4 && i4 ? [i4] : r4 ? null : t4.firstChild ? n.call(t4.childNodes) : null, e4, !o4 && i4 ? i4 : r4 ? r4.__e : t4.firstChild, o4, f5), N(e4, u5, f5);
17546
17531
  }
17547
17532
  function K(l4, u5, t4) {
17548
- var i5, o4, r4, e4, f5 = w({}, l4.props);
17549
- for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5)
17550
- "key" == r4 ? i5 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : f5[r4] = void 0 === u5[r4] && null != e4 ? e4[r4] : u5[r4];
17551
- return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t4), m(l4.type, f5, i5 || l4.key, o4 || l4.ref, null);
17533
+ var i4, o4, r4, e4, f5 = w({}, l4.props);
17534
+ for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : f5[r4] = void 0 === u5[r4] && null != e4 ? e4[r4] : u5[r4];
17535
+ return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t4), m(l4.type, f5, i4 || l4.key, o4 || l4.ref, null);
17552
17536
  }
17553
17537
  n = v.slice, l = { __e: function(n3, l4, u5, t4) {
17554
- for (var i5, o4, r4; l4 = l4.__; )
17555
- if ((i5 = l4.__c) && !i5.__)
17556
- try {
17557
- if ((o4 = i5.constructor) && null != o4.getDerivedStateFromError && (i5.setState(o4.getDerivedStateFromError(n3)), r4 = i5.__d), null != i5.componentDidCatch && (i5.componentDidCatch(n3, t4 || {}), r4 = i5.__d), r4)
17558
- return i5.__E = i5;
17559
- } catch (l5) {
17560
- n3 = l5;
17561
- }
17538
+ for (var i4, o4, r4; l4 = l4.__; ) if ((i4 = l4.__c) && !i4.__) try {
17539
+ if ((o4 = i4.constructor) && null != o4.getDerivedStateFromError && (i4.setState(o4.getDerivedStateFromError(n3)), r4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, t4 || {}), r4 = i4.__d), r4) return i4.__E = i4;
17540
+ } catch (l5) {
17541
+ n3 = l5;
17542
+ }
17562
17543
  throw n3;
17563
17544
  } }, u = 0, t = function(n3) {
17564
17545
  return null != n3 && void 0 === n3.constructor;
@@ -17593,29 +17574,27 @@ ${text2}</tr>
17593
17574
  function d2(n3) {
17594
17575
  return o2 = 1, h2(D2, n3);
17595
17576
  }
17596
- function h2(n3, u5, i5) {
17577
+ function h2(n3, u5, i4) {
17597
17578
  var o4 = p2(t2++, 2);
17598
- if (o4.t = n3, !o4.__c && (o4.__ = [i5 ? i5(u5) : D2(void 0, u5), function(n4) {
17579
+ if (o4.t = n3, !o4.__c && (o4.__ = [i4 ? i4(u5) : D2(void 0, u5), function(n4) {
17599
17580
  var t4 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t4, n4);
17600
17581
  t4 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
17601
17582
  }], o4.__c = r2, !r2.__f)) {
17602
17583
  var f5 = function(n4, t4, r4) {
17603
- if (!o4.__c.__H)
17604
- return true;
17584
+ if (!o4.__c.__H) return true;
17605
17585
  var u6 = o4.__c.__H.__.filter(function(n5) {
17606
17586
  return !!n5.__c;
17607
17587
  });
17608
17588
  if (u6.every(function(n5) {
17609
17589
  return !n5.__N;
17610
- }))
17611
- return !c4 || c4.call(this, n4, t4, r4);
17612
- var i6 = o4.__c.props !== n4;
17590
+ })) return !c4 || c4.call(this, n4, t4, r4);
17591
+ var i5 = o4.__c.props !== n4;
17613
17592
  return u6.forEach(function(n5) {
17614
17593
  if (n5.__N) {
17615
17594
  var t5 = n5.__[0];
17616
- n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (i6 = true);
17595
+ n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (i5 = true);
17617
17596
  }
17618
- }), c4 && c4.call(this, n4, t4, r4) || i6;
17597
+ }), c4 && c4.call(this, n4, t4, r4) || i5;
17619
17598
  };
17620
17599
  r2.__f = true;
17621
17600
  var c4 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
@@ -17630,8 +17609,8 @@ ${text2}</tr>
17630
17609
  return o4.__N || o4.__;
17631
17610
  }
17632
17611
  function y2(n3, u5) {
17633
- var i5 = p2(t2++, 3);
17634
- !c2.__s && C2(i5.__H, u5) && (i5.__ = n3, i5.u = u5, r2.__H.__h.push(i5));
17612
+ var i4 = p2(t2++, 3);
17613
+ !c2.__s && C2(i4.__H, u5) && (i4.__ = n3, i4.u = u5, r2.__H.__h.push(i4));
17635
17614
  }
17636
17615
  function A2(n3) {
17637
17616
  return o2 = 5, T2(function() {
@@ -17648,13 +17627,11 @@ ${text2}</tr>
17648
17627
  }, t4);
17649
17628
  }
17650
17629
  function j2() {
17651
- for (var n3; n3 = f2.shift(); )
17652
- if (n3.__P && n3.__H)
17653
- try {
17654
- n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
17655
- } catch (t4) {
17656
- n3.__H.__h = [], c2.__e(t4, n3.__v);
17657
- }
17630
+ for (var n3; n3 = f2.shift(); ) if (n3.__P && n3.__H) try {
17631
+ n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
17632
+ } catch (t4) {
17633
+ n3.__H.__h = [], c2.__e(t4, n3.__v);
17634
+ }
17658
17635
  }
17659
17636
  c2.__b = function(n3) {
17660
17637
  r2 = null, e2 && e2(n3);
@@ -17662,10 +17639,10 @@ ${text2}</tr>
17662
17639
  n3 && t4.__k && t4.__k.__m && (n3.__m = t4.__k.__m), s2 && s2(n3, t4);
17663
17640
  }, c2.__r = function(n3) {
17664
17641
  a2 && a2(n3), t2 = 0;
17665
- var i5 = (r2 = n3.__c).__H;
17666
- i5 && (u2 === r2 ? (i5.__h = [], r2.__h = [], i5.__.forEach(function(n4) {
17642
+ var i4 = (r2 = n3.__c).__H;
17643
+ i4 && (u2 === r2 ? (i4.__h = [], r2.__h = [], i4.__.forEach(function(n4) {
17667
17644
  n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
17668
- })) : (i5.__h.forEach(z2), i5.__h.forEach(B2), i5.__h = [], t2 = 0)), u2 = r2;
17645
+ })) : (i4.__h.forEach(z2), i4.__h.forEach(B2), i4.__h = [], t2 = 0)), u2 = r2;
17669
17646
  }, c2.diffed = function(n3) {
17670
17647
  v2 && v2(n3);
17671
17648
  var t4 = n3.__c;
@@ -17721,17 +17698,12 @@ ${text2}</tr>
17721
17698
 
17722
17699
  // node_modules/preact/compat/dist/compat.module.js
17723
17700
  function g3(n3, t4) {
17724
- for (var e4 in t4)
17725
- n3[e4] = t4[e4];
17701
+ for (var e4 in t4) n3[e4] = t4[e4];
17726
17702
  return n3;
17727
17703
  }
17728
17704
  function E2(n3, t4) {
17729
- for (var e4 in n3)
17730
- if ("__source" !== e4 && !(e4 in t4))
17731
- return true;
17732
- for (var r4 in t4)
17733
- if ("__source" !== r4 && n3[r4] !== t4[r4])
17734
- return true;
17705
+ for (var e4 in n3) if ("__source" !== e4 && !(e4 in t4)) return true;
17706
+ for (var r4 in t4) if ("__source" !== r4 && n3[r4] !== t4[r4]) return true;
17735
17707
  return false;
17736
17708
  }
17737
17709
  function N2(n3, t4) {
@@ -17744,13 +17716,11 @@ ${text2}</tr>
17744
17716
  l.__b = function(n3) {
17745
17717
  n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
17746
17718
  };
17747
- var A3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
17719
+ var A3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
17748
17720
  var F3 = l.__e;
17749
17721
  l.__e = function(n3, t4, e4, r4) {
17750
17722
  if (n3.then) {
17751
- for (var u5, o4 = t4; o4 = o4.__; )
17752
- if ((u5 = o4.__c) && u5.__c)
17753
- return null == t4.__e && (t4.__e = e4.__e, t4.__k = e4.__k), u5.__c(n3, t4);
17723
+ for (var u5, o4 = t4; o4 = o4.__; ) if ((u5 = o4.__c) && u5.__c) return null == t4.__e && (t4.__e = e4.__e, t4.__k = e4.__k), u5.__c(n3, t4);
17754
17724
  }
17755
17725
  F3(n3, t4, e4, r4);
17756
17726
  };
@@ -17783,10 +17753,10 @@ ${text2}</tr>
17783
17753
  }, (P3.prototype = new x()).__c = function(n3, t4) {
17784
17754
  var e4 = t4.__c, r4 = this;
17785
17755
  null == r4.o && (r4.o = []), r4.o.push(e4);
17786
- var u5 = j3(r4.__v), o4 = false, i5 = function() {
17756
+ var u5 = j3(r4.__v), o4 = false, i4 = function() {
17787
17757
  o4 || (o4 = true, e4.__R = null, u5 ? u5(l4) : l4());
17788
17758
  };
17789
- e4.__R = i5;
17759
+ e4.__R = i4;
17790
17760
  var l4 = function() {
17791
17761
  if (!--r4.__u) {
17792
17762
  if (r4.state.__a) {
@@ -17794,11 +17764,10 @@ ${text2}</tr>
17794
17764
  r4.__v.__k[0] = W(n4, n4.__c.__P, n4.__c.__O);
17795
17765
  }
17796
17766
  var t5;
17797
- for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); )
17798
- t5.forceUpdate();
17767
+ for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); ) t5.forceUpdate();
17799
17768
  }
17800
17769
  };
17801
- r4.__u++ || 32 & t4.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(i5, i5);
17770
+ r4.__u++ || 32 & t4.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(i4, i4);
17802
17771
  }, P3.prototype.componentWillUnmount = function() {
17803
17772
  this.o = [];
17804
17773
  }, P3.prototype.render = function(n3, e4) {
@@ -17809,18 +17778,15 @@ ${text2}</tr>
17809
17778
  }
17810
17779
  this.__b = null;
17811
17780
  }
17812
- var i5 = e4.__a && _(k, null, n3.fallback);
17813
- return i5 && (i5.__u &= -33), [_(k, null, e4.__a ? null : n3.children), i5];
17781
+ var i4 = e4.__a && _(k, null, n3.fallback);
17782
+ return i4 && (i4.__u &= -33), [_(k, null, e4.__a ? null : n3.children), i4];
17814
17783
  };
17815
17784
  var H2 = function(n3, t4, e4) {
17816
- if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size))
17817
- for (e4 = n3.i; e4; ) {
17818
- for (; e4.length > 3; )
17819
- e4.pop()();
17820
- if (e4[1] < e4[0])
17821
- break;
17822
- n3.i = e4 = e4[2];
17823
- }
17785
+ if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size)) for (e4 = n3.i; e4; ) {
17786
+ for (; e4.length > 3; ) e4.pop()();
17787
+ if (e4[1] < e4[0]) break;
17788
+ n3.i = e4 = e4[2];
17789
+ }
17824
17790
  };
17825
17791
  (B3.prototype = new x()).__a = function(n3) {
17826
17792
  var t4 = this, e4 = j3(t4.__v), r4 = t4.l.get(n3);
@@ -17834,8 +17800,7 @@ ${text2}</tr>
17834
17800
  this.i = null, this.l = /* @__PURE__ */ new Map();
17835
17801
  var t4 = H(n3.children);
17836
17802
  n3.revealOrder && "b" === n3.revealOrder[0] && t4.reverse();
17837
- for (var e4 = t4.length; e4--; )
17838
- this.l.set(t4[e4], this.i = [1, 0, this.i]);
17803
+ for (var e4 = t4.length; e4--; ) this.l.set(t4[e4], this.i = [1, 0, this.i]);
17839
17804
  return n3.children;
17840
17805
  }, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
17841
17806
  var n3 = this;
@@ -17843,13 +17808,13 @@ ${text2}</tr>
17843
17808
  H2(n3, e4, t4);
17844
17809
  });
17845
17810
  };
17846
- var q3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
17811
+ var q3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103;
17847
17812
  var G2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
17848
17813
  var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
17849
17814
  var K2 = /[A-Z0-9]/g;
17850
17815
  var Q2 = "undefined" != typeof document;
17851
17816
  var X = function(n3) {
17852
- return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
17817
+ return ("undefined" != typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
17853
17818
  };
17854
17819
  function nn(n3, t4, e4) {
17855
17820
  return null == t4.__k && (t4.textContent = ""), G(n3, t4), "function" == typeof e4 && e4(), n3 ? n3.__c : null;
@@ -17879,13 +17844,13 @@ ${text2}</tr>
17879
17844
  } };
17880
17845
  var fn2 = l.vnode;
17881
17846
  l.vnode = function(n3) {
17882
- "string" == typeof n3.type && function(n4) {
17847
+ "string" == typeof n3.type && (function(n4) {
17883
17848
  var t4 = n4.props, e4 = n4.type, u5 = {}, o4 = -1 === e4.indexOf("-");
17884
- for (var i5 in t4) {
17885
- var l4 = t4[i5];
17886
- if (!("value" === i5 && "defaultValue" in t4 && null == l4 || Q2 && "children" === i5 && "noscript" === e4 || "class" === i5 || "className" === i5)) {
17887
- var c4 = i5.toLowerCase();
17888
- "defaultValue" === i5 && "value" in t4 && null == t4.value ? i5 = "value" : "download" === i5 && true === l4 ? l4 = "" : "translate" === c4 && "no" === l4 ? l4 = false : "o" === c4[0] && "n" === c4[1] ? "ondoubleclick" === c4 ? i5 = "ondblclick" : "onchange" !== c4 || "input" !== e4 && "textarea" !== e4 || X(t4.type) ? "onfocus" === c4 ? i5 = "onfocusin" : "onblur" === c4 ? i5 = "onfocusout" : J2.test(i5) && (i5 = c4) : c4 = i5 = "oninput" : o4 && G2.test(i5) ? i5 = i5.replace(K2, "-$&").toLowerCase() : null === l4 && (l4 = void 0), "oninput" === c4 && u5[i5 = c4] && (i5 = "oninputCapture"), u5[i5] = l4;
17849
+ for (var i4 in t4) {
17850
+ var l4 = t4[i4];
17851
+ if (!("value" === i4 && "defaultValue" in t4 && null == l4 || Q2 && "children" === i4 && "noscript" === e4 || "class" === i4 || "className" === i4)) {
17852
+ var c4 = i4.toLowerCase();
17853
+ "defaultValue" === i4 && "value" in t4 && null == t4.value ? i4 = "value" : "download" === i4 && true === l4 ? l4 = "" : "translate" === c4 && "no" === l4 ? l4 = false : "o" === c4[0] && "n" === c4[1] ? "ondoubleclick" === c4 ? i4 = "ondblclick" : "onchange" !== c4 || "input" !== e4 && "textarea" !== e4 || X(t4.type) ? "onfocus" === c4 ? i4 = "onfocusin" : "onblur" === c4 ? i4 = "onfocusout" : J2.test(i4) && (i4 = c4) : c4 = i4 = "oninput" : o4 && G2.test(i4) ? i4 = i4.replace(K2, "-$&").toLowerCase() : null === l4 && (l4 = void 0), "oninput" === c4 && u5[i4 = c4] && (i4 = "oninputCapture"), u5[i4] = l4;
17889
17854
  }
17890
17855
  }
17891
17856
  "select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(t4.children).forEach(function(n5) {
@@ -17893,7 +17858,7 @@ ${text2}</tr>
17893
17858
  })), "select" == e4 && null != u5.defaultValue && (u5.value = H(t4.children).forEach(function(n5) {
17894
17859
  n5.props.selected = u5.multiple ? -1 != u5.defaultValue.indexOf(n5.props.value) : u5.defaultValue == n5.props.value;
17895
17860
  })), t4.class && !t4.className ? (u5.class = t4.class, Object.defineProperty(u5, "className", cn)) : (t4.className && !t4.class || t4.class && t4.className) && (u5.class = u5.className = t4.className), n4.props = u5;
17896
- }(n3), n3.$$typeof = q3, fn2 && fn2(n3);
17861
+ })(n3), n3.$$typeof = q3, fn2 && fn2(n3);
17897
17862
  };
17898
17863
  var an = l.__r;
17899
17864
  l.__r = function(n3) {
@@ -18227,8 +18192,8 @@ ${text2}</tr>
18227
18192
  var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
18228
18193
  var nanoid = (size = 21) => {
18229
18194
  let id2 = "";
18230
- let i5 = size | 0;
18231
- while (i5--) {
18195
+ let i4 = size | 0;
18196
+ while (i4--) {
18232
18197
  id2 += urlAlphabet[Math.random() * 64 | 0];
18233
18198
  }
18234
18199
  return id2;
@@ -19331,7 +19296,7 @@ ${text2}</tr>
19331
19296
  // - We must throttle at around >500ms to avoid performance lags.
19332
19297
  // [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
19333
19298
  #updateTotalProgressThrottled = (0, import_throttle.default)(() => this.#updateTotalProgress(), 500, { leading: true, trailing: true });
19334
- [Symbol.for("uppy test: updateTotalProgress")]() {
19299
+ [/* @__PURE__ */ Symbol.for("uppy test: updateTotalProgress")]() {
19335
19300
  return this.#updateTotalProgress();
19336
19301
  }
19337
19302
  #calculateTotalProgress() {
@@ -19582,7 +19547,7 @@ Uppy plugins must have unique \`id\` options.`;
19582
19547
  }
19583
19548
  return void 0;
19584
19549
  }
19585
- [Symbol.for("uppy test: getPlugins")](type) {
19550
+ [/* @__PURE__ */ Symbol.for("uppy test: getPlugins")](type) {
19586
19551
  return this.#plugins[type];
19587
19552
  }
19588
19553
  /**
@@ -19733,7 +19698,7 @@ Uppy plugins must have unique \`id\` options.`;
19733
19698
  });
19734
19699
  return uploadID;
19735
19700
  }
19736
- [Symbol.for("uppy test: createUpload")](...args) {
19701
+ [/* @__PURE__ */ Symbol.for("uppy test: createUpload")](...args) {
19737
19702
  return this.#createUpload(...args);
19738
19703
  }
19739
19704
  #getUpload(uploadID) {
@@ -19896,17 +19861,12 @@ Uppy plugins must have unique \`id\` options.`;
19896
19861
 
19897
19862
  // node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
19898
19863
  var f3 = 0;
19899
- var i3 = Array.isArray;
19900
- function u3(e4, t4, n3, o4, i5, u5) {
19864
+ function u3(e4, t4, n3, o4, i4, u5) {
19901
19865
  t4 || (t4 = {});
19902
19866
  var a4, c4, p4 = t4;
19903
- if ("ref" in p4)
19904
- for (c4 in p4 = {}, t4)
19905
- "ref" == c4 ? a4 = t4[c4] : p4[c4] = t4[c4];
19906
- var l4 = { type: e4, props: p4, key: n3, ref: a4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f3, __i: -1, __u: 0, __source: i5, __self: u5 };
19907
- if ("function" == typeof e4 && (a4 = e4.defaultProps))
19908
- for (c4 in a4)
19909
- void 0 === p4[c4] && (p4[c4] = a4[c4]);
19867
+ if ("ref" in p4) for (c4 in p4 = {}, t4) "ref" == c4 ? a4 = t4[c4] : p4[c4] = t4[c4];
19868
+ var l4 = { type: e4, props: p4, key: n3, ref: a4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f3, __i: -1, __u: 0, __source: i4, __self: u5 };
19869
+ if ("function" == typeof e4 && (a4 = e4.defaultProps)) for (c4 in a4) void 0 === p4[c4] && (p4[c4] = a4[c4]);
19910
19870
  return l.vnode && l.vnode(l4), l4;
19911
19871
  }
19912
19872
 
@@ -19998,10 +19958,10 @@ Uppy plugins must have unique \`id\` options.`;
19998
19958
  }
19999
19959
  function getChildMapping(children) {
20000
19960
  const out = {};
20001
- for (let i5 = 0; i5 < children.length; i5++) {
20002
- if (children[i5] != null) {
20003
- const key = getKey(children[i5], i5.toString(36));
20004
- out[key] = children[i5];
19961
+ for (let i4 = 0; i4 < children.length; i4++) {
19962
+ if (children[i4] != null) {
19963
+ const key = getKey(children[i4], i4.toString(36));
19964
+ out[key] = children[i4];
20005
19965
  }
20006
19966
  }
20007
19967
  return out;
@@ -20025,19 +19985,19 @@ Uppy plugins must have unique \`id\` options.`;
20025
19985
  const childMapping = {};
20026
19986
  for (const nextKey in next) {
20027
19987
  if (Object.hasOwn(nextKeysPending, nextKey)) {
20028
- for (let i5 = 0; i5 < nextKeysPending[nextKey].length; i5++) {
20029
- const pendingNextKey = nextKeysPending[nextKey][i5];
20030
- childMapping[nextKeysPending[nextKey][i5]] = getValueForKey(pendingNextKey);
19988
+ for (let i4 = 0; i4 < nextKeysPending[nextKey].length; i4++) {
19989
+ const pendingNextKey = nextKeysPending[nextKey][i4];
19990
+ childMapping[nextKeysPending[nextKey][i4]] = getValueForKey(pendingNextKey);
20031
19991
  }
20032
19992
  }
20033
19993
  childMapping[nextKey] = getValueForKey(nextKey);
20034
19994
  }
20035
- for (let i5 = 0; i5 < pendingKeys.length; i5++) {
20036
- childMapping[pendingKeys[i5]] = getValueForKey(pendingKeys[i5]);
19995
+ for (let i4 = 0; i4 < pendingKeys.length; i4++) {
19996
+ childMapping[pendingKeys[i4]] = getValueForKey(pendingKeys[i4]);
20037
19997
  }
20038
19998
  return childMapping;
20039
19999
  }
20040
- var identity2 = (i5) => i5;
20000
+ var identity2 = (i4) => i4;
20041
20001
  var TransitionGroup = class extends x {
20042
20002
  constructor(props, context) {
20043
20003
  super(props, context);
@@ -20532,7 +20492,7 @@ Uppy plugins must have unique \`id\` options.`;
20532
20492
  return true;
20533
20493
  }
20534
20494
  if (item.type === "folder" && item.status === "checked") {
20535
- const doesItHaveChildren = partialTree.some((i5) => i5.type !== "root" && i5.parentId === item.id);
20495
+ const doesItHaveChildren = partialTree.some((i4) => i4.type !== "root" && i4.parentId === item.id);
20536
20496
  return !doesItHaveChildren;
20537
20497
  }
20538
20498
  return false;
@@ -20710,14 +20670,14 @@ Uppy plugins must have unique \`id\` options.`;
20710
20670
  const checkedFiles = partialTree.filter((item) => item.type === "file" && item.status === "checked");
20711
20671
  const companionFilesWithInjectedPaths = checkedFiles.map((file) => {
20712
20672
  const absFolders = getPath(partialTree, file.id, cache2);
20713
- const firstCheckedFolderIndex = absFolders.findIndex((i5) => i5.type === "folder" && i5.status === "checked");
20673
+ const firstCheckedFolderIndex = absFolders.findIndex((i4) => i4.type === "folder" && i4.status === "checked");
20714
20674
  const relFolders = absFolders.slice(firstCheckedFolderIndex);
20715
- const absDirPath = `/${absFolders.map((i5) => i5.data.name).join("/")}`;
20675
+ const absDirPath = `/${absFolders.map((i4) => i4.data.name).join("/")}`;
20716
20676
  const relDirPath = relFolders.length === 1 ? (
20717
20677
  // Must return `undefined` (which later turns into `null` in `.getTagFile()`)
20718
20678
  // (https://github.com/transloadit/uppy/pull/4537#issuecomment-1629136652)
20719
20679
  void 0
20720
- ) : relFolders.map((i5) => i5.data.name).join("/");
20680
+ ) : relFolders.map((i4) => i4.data.name).join("/");
20721
20681
  return {
20722
20682
  ...file.data,
20723
20683
  absDirPath,
@@ -21227,8 +21187,8 @@ Uppy plugins must have unique \`id\` options.`;
21227
21187
  items = items.concat(response.items);
21228
21188
  currentPath = response.nextPagePath;
21229
21189
  }
21230
- const newFolders = items.filter((i5) => i5.isFolder === true);
21231
- const newFiles = items.filter((i5) => i5.isFolder === false);
21190
+ const newFolders = items.filter((i4) => i4.isFolder === true);
21191
+ const newFiles = items.filter((i4) => i4.isFolder === false);
21232
21192
  const folders = newFolders.map((folder) => ({
21233
21193
  type: "folder",
21234
21194
  id: folder.requestPath,
@@ -21265,7 +21225,7 @@ Uppy plugins must have unique \`id\` options.`;
21265
21225
  queue.add(() => recursivelyFetch(queue, poorTree, poorFolder, apiList, validateSingleFile));
21266
21226
  });
21267
21227
  queue.on("completed", () => {
21268
- const nOfFilesChecked = poorTree.filter((i5) => i5.type === "file" && i5.status === "checked").length;
21228
+ const nOfFilesChecked = poorTree.filter((i4) => i4.type === "file" && i4.status === "checked").length;
21269
21229
  reportProgress(nOfFilesChecked);
21270
21230
  });
21271
21231
  await queue.onIdle();
@@ -21275,8 +21235,8 @@ Uppy plugins must have unique \`id\` options.`;
21275
21235
 
21276
21236
  // node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterOpenFolder.js
21277
21237
  var afterOpenFolder = (oldPartialTree, discoveredItems, clickedFolder, currentPagePath, validateSingleFile) => {
21278
- const discoveredFolders = discoveredItems.filter((i5) => i5.isFolder === true);
21279
- const discoveredFiles = discoveredItems.filter((i5) => i5.isFolder === false);
21238
+ const discoveredFolders = discoveredItems.filter((i4) => i4.isFolder === true);
21239
+ const discoveredFiles = discoveredItems.filter((i4) => i4.isFolder === false);
21280
21240
  const isParentFolderChecked = clickedFolder.type === "folder" && clickedFolder.status === "checked";
21281
21241
  const folders = discoveredFolders.map((folder) => ({
21282
21242
  type: "folder",
@@ -21315,9 +21275,9 @@ Uppy plugins must have unique \`id\` options.`;
21315
21275
 
21316
21276
  // node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterScrollFolder.js
21317
21277
  var afterScrollFolder = (oldPartialTree, currentFolderId, items, nextPagePath, validateSingleFile) => {
21318
- const currentFolder = oldPartialTree.find((i5) => i5.id === currentFolderId);
21319
- const newFolders = items.filter((i5) => i5.isFolder === true);
21320
- const newFiles = items.filter((i5) => i5.isFolder === false);
21278
+ const currentFolder = oldPartialTree.find((i4) => i4.id === currentFolderId);
21279
+ const newFolders = items.filter((i4) => i4.isFolder === true);
21280
+ const newFiles = items.filter((i4) => i4.isFolder === false);
21321
21281
  const scrolledFolder = { ...currentFolder, nextPagePath };
21322
21282
  const partialTreeWithUpdatedScrolledFolder = oldPartialTree.map((folder) => folder.id === scrolledFolder.id ? scrolledFolder : folder);
21323
21283
  const isParentFolderChecked = scrolledFolder.type === "folder" && scrolledFolder.status === "checked";
@@ -21592,7 +21552,7 @@ Uppy plugins must have unique \`id\` options.`;
21592
21552
  }
21593
21553
  async handleScroll(event) {
21594
21554
  const { partialTree, currentFolderId } = this.plugin.getPluginState();
21595
- const currentFolder = partialTree.find((i5) => i5.id === currentFolderId);
21555
+ const currentFolder = partialTree.find((i4) => i4.id === currentFolderId);
21596
21556
  if (shouldHandleScroll_default(event) && !this.isHandlingScroll && currentFolder.nextPagePath) {
21597
21557
  this.isHandlingScroll = true;
21598
21558
  await this.#withAbort(async (signal) => {
@@ -21766,7 +21726,7 @@ Uppy plugins must have unique \`id\` options.`;
21766
21726
  }
21767
21727
  async handleScroll(event) {
21768
21728
  const { partialTree, searchString } = this.plugin.getPluginState();
21769
- const root = partialTree.find((i5) => i5.type === "root");
21729
+ const root = partialTree.find((i4) => i4.type === "root");
21770
21730
  if (shouldHandleScroll_default(event) && !this.isHandlingScroll && root.nextPagePath) {
21771
21731
  this.isHandlingScroll = true;
21772
21732
  try {
@@ -21775,7 +21735,7 @@ Uppy plugins must have unique \`id\` options.`;
21775
21735
  ...root,
21776
21736
  nextPagePath: response.nextPageQuery
21777
21737
  };
21778
- const oldItems = partialTree.filter((i5) => i5.type !== "root");
21738
+ const oldItems = partialTree.filter((i4) => i4.type !== "root");
21779
21739
  const newPartialTree = [
21780
21740
  newRoot,
21781
21741
  ...oldItems,
@@ -22223,8 +22183,8 @@ Uppy plugins must have unique \`id\` options.`;
22223
22183
  }
22224
22184
  let state = StatusBarStates_default.STATE_WAITING;
22225
22185
  const fileIDs = Object.keys(files);
22226
- for (let i5 = 0; i5 < fileIDs.length; i5++) {
22227
- const { progress } = files[fileIDs[i5]];
22186
+ for (let i4 = 0; i4 < fileIDs.length; i4++) {
22187
+ const { progress } = files[fileIDs[i4]];
22228
22188
  if (progress.uploadStarted && !progress.uploadComplete) {
22229
22189
  return StatusBarStates_default.STATE_UPLOADING;
22230
22190
  }
@@ -22291,8 +22251,8 @@ Uppy plugins must have unique \`id\` options.`;
22291
22251
  return Math.round(filteredETA / 100) / 10;
22292
22252
  }
22293
22253
  startUpload = () => {
22294
- return this.uppy.upload().catch(() => {
22295
- });
22254
+ return this.uppy.upload().catch((() => {
22255
+ }));
22296
22256
  };
22297
22257
  render(state) {
22298
22258
  const { capabilities, files, allowNewUpload, totalProgress, error: error2, recoveredState } = state;
@@ -22392,8 +22352,8 @@ Uppy plugins must have unique \`id\` options.`;
22392
22352
  if (dataURIData?.[2] != null) {
22393
22353
  const binary = atob(decodeURIComponent(dataURIData[3]));
22394
22354
  const bytes = new Uint8Array(binary.length);
22395
- for (let i5 = 0; i5 < binary.length; i5++) {
22396
- bytes[i5] = binary.charCodeAt(i5);
22355
+ for (let i4 = 0; i4 < binary.length; i4++) {
22356
+ bytes[i4] = binary.charCodeAt(i4);
22397
22357
  }
22398
22358
  data = [bytes];
22399
22359
  } else if (dataURIData?.[3] != null) {
@@ -22424,7 +22384,7 @@ Uppy plugins must have unique \`id\` options.`;
22424
22384
  }
22425
22385
  var t3 = "undefined" != typeof self ? self : global;
22426
22386
  var s3 = "undefined" != typeof navigator;
22427
- var i4 = s3 && "undefined" == typeof HTMLImageElement;
22387
+ var i3 = s3 && "undefined" == typeof HTMLImageElement;
22428
22388
  var n2 = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node);
22429
22389
  var r3 = t3.Buffer;
22430
22390
  var a3 = !!r3;
@@ -22437,10 +22397,10 @@ Uppy plugins must have unique \`id\` options.`;
22437
22397
  throw delete t4.stack, t4;
22438
22398
  }
22439
22399
  function o3(e4) {
22440
- let t4 = function(e5) {
22400
+ let t4 = (function(e5) {
22441
22401
  let t5 = 0;
22442
22402
  return e5.ifd0.enabled && (t5 += 1024), e5.exif.enabled && (t5 += 2048), e5.makerNote && (t5 += 2048), e5.userComment && (t5 += 1024), e5.gps.enabled && (t5 += 512), e5.interop.enabled && (t5 += 100), e5.ifd1.enabled && (t5 += 1024), t5 + 2048;
22443
- }(e4);
22403
+ })(e4);
22444
22404
  return e4.jfif.enabled && (t4 += 50), e4.xmp.enabled && (t4 += 2e4), e4.iptc.enabled && (t4 += 14e3), e4.icc.enabled && (t4 += 6e3), t4;
22445
22405
  }
22446
22406
  var u4 = (e4) => String.fromCharCode.apply(null, e4);
@@ -22449,22 +22409,20 @@ Uppy plugins must have unique \`id\` options.`;
22449
22409
  static from(e4, t4) {
22450
22410
  return e4 instanceof this && e4.le === t4 ? e4 : new _c(e4, void 0, void 0, t4);
22451
22411
  }
22452
- constructor(e4, t4 = 0, s4, i5) {
22453
- if ("boolean" == typeof i5 && (this.le = i5), Array.isArray(e4) && (e4 = new Uint8Array(e4)), 0 === e4)
22454
- this.byteOffset = 0, this.byteLength = 0;
22412
+ constructor(e4, t4 = 0, s4, i4) {
22413
+ if ("boolean" == typeof i4 && (this.le = i4), Array.isArray(e4) && (e4 = new Uint8Array(e4)), 0 === e4) this.byteOffset = 0, this.byteLength = 0;
22455
22414
  else if (e4 instanceof ArrayBuffer) {
22456
22415
  void 0 === s4 && (s4 = e4.byteLength - t4);
22457
- let i6 = new DataView(e4, t4, s4);
22458
- this._swapDataView(i6);
22416
+ let i5 = new DataView(e4, t4, s4);
22417
+ this._swapDataView(i5);
22459
22418
  } else if (e4 instanceof Uint8Array || e4 instanceof DataView || e4 instanceof _c) {
22460
22419
  void 0 === s4 && (s4 = e4.byteLength - t4), (t4 += e4.byteOffset) + s4 > e4.byteOffset + e4.byteLength && l3("Creating view outside of available memory in ArrayBuffer");
22461
- let i6 = new DataView(e4.buffer, t4, s4);
22462
- this._swapDataView(i6);
22420
+ let i5 = new DataView(e4.buffer, t4, s4);
22421
+ this._swapDataView(i5);
22463
22422
  } else if ("number" == typeof e4) {
22464
22423
  let t5 = new DataView(new ArrayBuffer(e4));
22465
22424
  this._swapDataView(t5);
22466
- } else
22467
- l3("Invalid input argument for BufferView: " + e4);
22425
+ } else l3("Invalid input argument for BufferView: " + e4);
22468
22426
  }
22469
22427
  _swapArrayBuffer(e4) {
22470
22428
  this._swapDataView(new DataView(e4));
@@ -22492,8 +22450,8 @@ Uppy plugins must have unique \`id\` options.`;
22492
22450
  }
22493
22451
  getString(e4 = 0, t4 = this.byteLength) {
22494
22452
  let s4 = this.getUint8Array(e4, t4);
22495
- return i5 = s4, d3 ? d3.decode(i5) : a3 ? Buffer.from(i5).toString("utf8") : decodeURIComponent(escape(u4(i5)));
22496
- var i5;
22453
+ return i4 = s4, d3 ? d3.decode(i4) : a3 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u4(i4)));
22454
+ var i4;
22497
22455
  }
22498
22456
  getLatin1String(e4 = 0, t4 = this.byteLength) {
22499
22457
  let s4 = this.getUint8Array(e4, t4);
@@ -22501,8 +22459,7 @@ Uppy plugins must have unique \`id\` options.`;
22501
22459
  }
22502
22460
  getUnicodeString(e4 = 0, t4 = this.byteLength) {
22503
22461
  const s4 = [];
22504
- for (let i5 = 0; i5 < t4 && e4 + i5 < this.byteLength; i5 += 2)
22505
- s4.push(this.getUint16(e4 + i5));
22462
+ for (let i4 = 0; i4 < t4 && e4 + i4 < this.byteLength; i4 += 2) s4.push(this.getUint16(e4 + i4));
22506
22463
  return u4(s4);
22507
22464
  }
22508
22465
  getInt8(e4) {
@@ -22573,9 +22530,9 @@ Uppy plugins must have unique \`id\` options.`;
22573
22530
  super(), this.kind = e4;
22574
22531
  }
22575
22532
  get(e4, t4) {
22576
- return this.has(e4) || p3(this.kind, e4), t4 && (e4 in t4 || function(e5, t5) {
22533
+ return this.has(e4) || p3(this.kind, e4), t4 && (e4 in t4 || (function(e5, t5) {
22577
22534
  l3(`Unknown ${e5} '${t5}'.`);
22578
- }(this.kind, e4), t4[e4].enabled || p3(this.kind, e4)), super.get(e4);
22535
+ })(this.kind, e4), t4[e4].enabled || p3(this.kind, e4)), super.get(e4);
22579
22536
  }
22580
22537
  keyList() {
22581
22538
  return Array.from(this.keys());
@@ -22586,24 +22543,24 @@ Uppy plugins must have unique \`id\` options.`;
22586
22543
  var b2 = new g4("file reader");
22587
22544
  var w3 = t3.fetch;
22588
22545
  function k3(e4, t4) {
22589
- return (i5 = e4).startsWith("data:") || i5.length > 1e4 ? v3(e4, t4, "base64") : n2 && e4.includes("://") ? O2(e4, t4, "url", S2) : n2 ? v3(e4, t4, "fs") : s3 ? O2(e4, t4, "url", S2) : void l3("Invalid input argument");
22590
- var i5;
22546
+ return (i4 = e4).startsWith("data:") || i4.length > 1e4 ? v3(e4, t4, "base64") : n2 && e4.includes("://") ? O2(e4, t4, "url", S2) : n2 ? v3(e4, t4, "fs") : s3 ? O2(e4, t4, "url", S2) : void l3("Invalid input argument");
22547
+ var i4;
22591
22548
  }
22592
- async function O2(e4, t4, s4, i5) {
22593
- return b2.has(s4) ? v3(e4, t4, s4) : i5 ? async function(e5, t5) {
22549
+ async function O2(e4, t4, s4, i4) {
22550
+ return b2.has(s4) ? v3(e4, t4, s4) : i4 ? (async function(e5, t5) {
22594
22551
  let s5 = await t5(e5);
22595
22552
  return new c3(s5);
22596
- }(e4, i5) : void l3(`Parser ${s4} is not loaded`);
22553
+ })(e4, i4) : void l3(`Parser ${s4} is not loaded`);
22597
22554
  }
22598
22555
  async function v3(e4, t4, s4) {
22599
- let i5 = new (b2.get(s4))(e4, t4);
22600
- return await i5.read(), i5;
22601
- }
22602
- var S2 = (e4) => w3(e4).then((e5) => e5.arrayBuffer());
22603
- var A4 = (e4) => new Promise((t4, s4) => {
22604
- let i5 = new FileReader();
22605
- i5.onloadend = () => t4(i5.result || new ArrayBuffer()), i5.onerror = s4, i5.readAsArrayBuffer(e4);
22606
- });
22556
+ let i4 = new (b2.get(s4))(e4, t4);
22557
+ return await i4.read(), i4;
22558
+ }
22559
+ var S2 = (e4) => w3(e4).then(((e5) => e5.arrayBuffer()));
22560
+ var A4 = (e4) => new Promise(((t4, s4) => {
22561
+ let i4 = new FileReader();
22562
+ i4.onloadend = () => t4(i4.result || new ArrayBuffer()), i4.onerror = s4, i4.readAsArrayBuffer(e4);
22563
+ }));
22607
22564
  var U2 = class extends Map {
22608
22565
  get tagKeys() {
22609
22566
  return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys;
@@ -22613,20 +22570,15 @@ Uppy plugins must have unique \`id\` options.`;
22613
22570
  }
22614
22571
  };
22615
22572
  function x3(e4, t4, s4) {
22616
- let i5 = new U2();
22617
- for (let [e5, t5] of s4)
22618
- i5.set(e5, t5);
22619
- if (Array.isArray(t4))
22620
- for (let s5 of t4)
22621
- e4.set(s5, i5);
22622
- else
22623
- e4.set(t4, i5);
22624
- return i5;
22573
+ let i4 = new U2();
22574
+ for (let [e5, t5] of s4) i4.set(e5, t5);
22575
+ if (Array.isArray(t4)) for (let s5 of t4) e4.set(s5, i4);
22576
+ else e4.set(t4, i4);
22577
+ return i4;
22625
22578
  }
22626
22579
  function C3(e4, t4, s4) {
22627
- let i5, n3 = e4.get(t4);
22628
- for (i5 of s4)
22629
- n3.set(i5[0], i5[1]);
22580
+ let i4, n3 = e4.get(t4);
22581
+ for (i4 of s4) n3.set(i4[0], i4[1]);
22630
22582
  }
22631
22583
  var B4 = /* @__PURE__ */ new Map();
22632
22584
  var V3 = /* @__PURE__ */ new Map();
@@ -22648,32 +22600,25 @@ Uppy plugins must have unique \`id\` options.`;
22648
22600
  get needed() {
22649
22601
  return this.enabled || this.deps.size > 0;
22650
22602
  }
22651
- constructor(t4, s4, i5, n3) {
22652
- if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key = t4, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P4.includes(t4), this.canBeFiltered && (this.dict = B4.get(t4)), void 0 !== i5)
22653
- if (Array.isArray(i5))
22654
- this.parse = this.enabled = true, this.canBeFiltered && i5.length > 0 && this.translateTagSet(i5, this.pick);
22655
- else if ("object" == typeof i5) {
22656
- if (this.enabled = true, this.parse = false !== i5.parse, this.canBeFiltered) {
22657
- let { pick: e4, skip: t5 } = i5;
22658
- e4 && e4.length > 0 && this.translateTagSet(e4, this.pick), t5 && t5.length > 0 && this.translateTagSet(t5, this.skip);
22659
- }
22660
- this.applyInheritables(i5);
22661
- } else
22662
- true === i5 || false === i5 ? this.parse = this.enabled = i5 : l3(`Invalid options argument: ${i5}`);
22603
+ constructor(t4, s4, i4, n3) {
22604
+ if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key = t4, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P4.includes(t4), this.canBeFiltered && (this.dict = B4.get(t4)), void 0 !== i4) if (Array.isArray(i4)) this.parse = this.enabled = true, this.canBeFiltered && i4.length > 0 && this.translateTagSet(i4, this.pick);
22605
+ else if ("object" == typeof i4) {
22606
+ if (this.enabled = true, this.parse = false !== i4.parse, this.canBeFiltered) {
22607
+ let { pick: e4, skip: t5 } = i4;
22608
+ e4 && e4.length > 0 && this.translateTagSet(e4, this.pick), t5 && t5.length > 0 && this.translateTagSet(t5, this.skip);
22609
+ }
22610
+ this.applyInheritables(i4);
22611
+ } else true === i4 || false === i4 ? this.parse = this.enabled = i4 : l3(`Invalid options argument: ${i4}`);
22663
22612
  }
22664
22613
  applyInheritables(e4) {
22665
22614
  let t4, s4;
22666
- for (t4 of E3)
22667
- s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
22615
+ for (t4 of E3) s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
22668
22616
  }
22669
22617
  translateTagSet(e4, t4) {
22670
22618
  if (this.dict) {
22671
- let s4, i5, { tagKeys: n3, tagValues: r4 } = this.dict;
22672
- for (s4 of e4)
22673
- "string" == typeof s4 ? (i5 = r4.indexOf(s4), -1 === i5 && (i5 = n3.indexOf(Number(s4))), -1 !== i5 && t4.add(Number(n3[i5]))) : t4.add(s4);
22674
- } else
22675
- for (let s4 of e4)
22676
- t4.add(s4);
22619
+ let s4, i4, { tagKeys: n3, tagValues: r4 } = this.dict;
22620
+ for (s4 of e4) "string" == typeof s4 ? (i4 = r4.indexOf(s4), -1 === i4 && (i4 = n3.indexOf(Number(s4))), -1 !== i4 && t4.add(Number(n3[i4]))) : t4.add(s4);
22621
+ } else for (let s4 of e4) t4.add(s4);
22677
22622
  }
22678
22623
  finalizeFilters() {
22679
22624
  !this.enabled && this.deps.size > 0 ? (this.enabled = true, X2(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && X2(this.pick, this.deps);
@@ -22691,55 +22636,37 @@ Uppy plugins must have unique \`id\` options.`;
22691
22636
  }
22692
22637
  setupFromUndefined() {
22693
22638
  let e4;
22694
- for (e4 of L2)
22695
- this[e4] = N3[e4];
22696
- for (e4 of M2)
22697
- this[e4] = N3[e4];
22698
- for (e4 of j4)
22699
- this[e4] = N3[e4];
22700
- for (e4 of F4)
22701
- this[e4] = new D3(e4, N3[e4], void 0, this);
22639
+ for (e4 of L2) this[e4] = N3[e4];
22640
+ for (e4 of M2) this[e4] = N3[e4];
22641
+ for (e4 of j4) this[e4] = N3[e4];
22642
+ for (e4 of F4) this[e4] = new D3(e4, N3[e4], void 0, this);
22702
22643
  }
22703
22644
  setupFromTrue() {
22704
22645
  let e4;
22705
- for (e4 of L2)
22706
- this[e4] = N3[e4];
22707
- for (e4 of M2)
22708
- this[e4] = N3[e4];
22709
- for (e4 of j4)
22710
- this[e4] = true;
22711
- for (e4 of F4)
22712
- this[e4] = new D3(e4, true, void 0, this);
22646
+ for (e4 of L2) this[e4] = N3[e4];
22647
+ for (e4 of M2) this[e4] = N3[e4];
22648
+ for (e4 of j4) this[e4] = true;
22649
+ for (e4 of F4) this[e4] = new D3(e4, true, void 0, this);
22713
22650
  }
22714
22651
  setupFromArray(e4) {
22715
22652
  let t4;
22716
- for (t4 of L2)
22717
- this[t4] = N3[t4];
22718
- for (t4 of M2)
22719
- this[t4] = N3[t4];
22720
- for (t4 of j4)
22721
- this[t4] = N3[t4];
22722
- for (t4 of F4)
22723
- this[t4] = new D3(t4, false, void 0, this);
22653
+ for (t4 of L2) this[t4] = N3[t4];
22654
+ for (t4 of M2) this[t4] = N3[t4];
22655
+ for (t4 of j4) this[t4] = N3[t4];
22656
+ for (t4 of F4) this[t4] = new D3(t4, false, void 0, this);
22724
22657
  this.setupGlobalFilters(e4, void 0, P4);
22725
22658
  }
22726
22659
  setupFromObject(e4) {
22727
22660
  let t4;
22728
- for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2))
22729
- this[t4] = W2(e4[t4], N3[t4]);
22730
- for (t4 of M2)
22731
- this[t4] = W2(e4[t4], N3[t4]);
22732
- for (t4 of j4)
22733
- this[t4] = W2(e4[t4], N3[t4]);
22734
- for (t4 of z3)
22735
- this[t4] = new D3(t4, N3[t4], e4[t4], this);
22736
- for (t4 of P4)
22737
- this[t4] = new D3(t4, N3[t4], e4[t4], this.tiff);
22661
+ for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2)) this[t4] = W2(e4[t4], N3[t4]);
22662
+ for (t4 of M2) this[t4] = W2(e4[t4], N3[t4]);
22663
+ for (t4 of j4) this[t4] = W2(e4[t4], N3[t4]);
22664
+ for (t4 of z3) this[t4] = new D3(t4, N3[t4], e4[t4], this);
22665
+ for (t4 of P4) this[t4] = new D3(t4, N3[t4], e4[t4], this.tiff);
22738
22666
  this.setupGlobalFilters(e4.pick, e4.skip, P4, F4), true === e4.tiff ? this.batchEnableWithBool(P4, true) : false === e4.tiff ? this.batchEnableWithUserValue(P4, e4) : Array.isArray(e4.tiff) ? this.setupGlobalFilters(e4.tiff, void 0, P4) : "object" == typeof e4.tiff && this.setupGlobalFilters(e4.tiff.pick, e4.tiff.skip, P4);
22739
22667
  }
22740
22668
  batchEnableWithBool(e4, t4) {
22741
- for (let s4 of e4)
22742
- this[s4].enabled = t4;
22669
+ for (let s4 of e4) this[s4].enabled = t4;
22743
22670
  }
22744
22671
  batchEnableWithUserValue(e4, t4) {
22745
22672
  for (let s4 of e4) {
@@ -22747,43 +22674,37 @@ Uppy plugins must have unique \`id\` options.`;
22747
22674
  this[s4].enabled = false !== e5 && void 0 !== e5;
22748
22675
  }
22749
22676
  }
22750
- setupGlobalFilters(e4, t4, s4, i5 = s4) {
22677
+ setupGlobalFilters(e4, t4, s4, i4 = s4) {
22751
22678
  if (e4 && e4.length) {
22752
- for (let e5 of i5)
22753
- this[e5].enabled = false;
22679
+ for (let e5 of i4) this[e5].enabled = false;
22754
22680
  let t5 = K3(e4, s4);
22755
- for (let [e5, s5] of t5)
22756
- X2(this[e5].pick, s5), this[e5].enabled = true;
22681
+ for (let [e5, s5] of t5) X2(this[e5].pick, s5), this[e5].enabled = true;
22757
22682
  } else if (t4 && t4.length) {
22758
22683
  let e5 = K3(t4, s4);
22759
- for (let [t5, s5] of e5)
22760
- X2(this[t5].skip, s5);
22684
+ for (let [t5, s5] of e5) X2(this[t5].skip, s5);
22761
22685
  }
22762
22686
  }
22763
22687
  filterNestedSegmentTags() {
22764
- let { ifd0: e4, exif: t4, xmp: s4, iptc: i5, icc: n3 } = this;
22765
- this.makerNote ? t4.deps.add(37500) : t4.skip.add(37500), this.userComment ? t4.deps.add(37510) : t4.skip.add(37510), s4.enabled || e4.skip.add(700), i5.enabled || e4.skip.add(33723), n3.enabled || e4.skip.add(34675);
22688
+ let { ifd0: e4, exif: t4, xmp: s4, iptc: i4, icc: n3 } = this;
22689
+ this.makerNote ? t4.deps.add(37500) : t4.skip.add(37500), this.userComment ? t4.deps.add(37510) : t4.skip.add(37510), s4.enabled || e4.skip.add(700), i4.enabled || e4.skip.add(33723), n3.enabled || e4.skip.add(34675);
22766
22690
  }
22767
22691
  traverseTiffDependencyTree() {
22768
- let { ifd0: e4, exif: t4, gps: s4, interop: i5 } = this;
22769
- i5.needed && (t4.deps.add(40965), e4.deps.add(40965)), t4.needed && e4.deps.add(34665), s4.needed && e4.deps.add(34853), this.tiff.enabled = P4.some((e5) => true === this[e5].enabled) || this.makerNote || this.userComment;
22770
- for (let e5 of P4)
22771
- this[e5].finalizeFilters();
22692
+ let { ifd0: e4, exif: t4, gps: s4, interop: i4 } = this;
22693
+ i4.needed && (t4.deps.add(40965), e4.deps.add(40965)), t4.needed && e4.deps.add(34665), s4.needed && e4.deps.add(34853), this.tiff.enabled = P4.some(((e5) => true === this[e5].enabled)) || this.makerNote || this.userComment;
22694
+ for (let e5 of P4) this[e5].finalizeFilters();
22772
22695
  }
22773
22696
  get onlyTiff() {
22774
- return !T4.map((e4) => this[e4].enabled).some((e4) => true === e4) && this.tiff.enabled;
22697
+ return !T4.map(((e4) => this[e4].enabled)).some(((e4) => true === e4)) && this.tiff.enabled;
22775
22698
  }
22776
22699
  checkLoadedPlugins() {
22777
- for (let e4 of z3)
22778
- this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
22700
+ for (let e4 of z3) this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
22779
22701
  }
22780
22702
  };
22781
22703
  function K3(e4, t4) {
22782
- let s4, i5, n3, r4, a4 = [];
22704
+ let s4, i4, n3, r4, a4 = [];
22783
22705
  for (n3 of t4) {
22784
- for (r4 of (s4 = B4.get(n3), i5 = [], s4))
22785
- (e4.includes(r4[0]) || e4.includes(r4[1])) && i5.push(r4[0]);
22786
- i5.length && a4.push([n3, i5]);
22706
+ for (r4 of (s4 = B4.get(n3), i4 = [], s4)) (e4.includes(r4[0]) || e4.includes(r4[1])) && i4.push(r4[0]);
22707
+ i4.length && a4.push([n3, i4]);
22787
22708
  }
22788
22709
  return a4;
22789
22710
  }
@@ -22791,26 +22712,22 @@ Uppy plugins must have unique \`id\` options.`;
22791
22712
  return void 0 !== e4 ? e4 : void 0 !== t4 ? t4 : void 0;
22792
22713
  }
22793
22714
  function X2(e4, t4) {
22794
- for (let s4 of t4)
22795
- e4.add(s4);
22715
+ for (let s4 of t4) e4.add(s4);
22796
22716
  }
22797
22717
  e3(R, "default", N3);
22798
22718
  var H3 = class {
22799
22719
  constructor(t4) {
22800
- e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", (e4) => this.errors.push(e4)), this.options = R.useCached(t4);
22720
+ e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", ((e4) => this.errors.push(e4))), this.options = R.useCached(t4);
22801
22721
  }
22802
22722
  async read(e4) {
22803
- this.file = await function(e5, t4) {
22804
- return "string" == typeof e5 ? k3(e5, t4) : s3 && !i4 && e5 instanceof HTMLImageElement ? k3(e5.src, t4) : e5 instanceof Uint8Array || e5 instanceof ArrayBuffer || e5 instanceof DataView ? new c3(e5) : s3 && e5 instanceof Blob ? O2(e5, t4, "blob", A4) : void l3("Invalid input argument");
22805
- }(e4, this.options);
22723
+ this.file = await (function(e5, t4) {
22724
+ return "string" == typeof e5 ? k3(e5, t4) : s3 && !i3 && e5 instanceof HTMLImageElement ? k3(e5.src, t4) : e5 instanceof Uint8Array || e5 instanceof ArrayBuffer || e5 instanceof DataView ? new c3(e5) : s3 && e5 instanceof Blob ? O2(e5, t4, "blob", A4) : void l3("Invalid input argument");
22725
+ })(e4, this.options);
22806
22726
  }
22807
22727
  setup() {
22808
- if (this.fileParser)
22809
- return;
22728
+ if (this.fileParser) return;
22810
22729
  let { file: e4 } = this, t4 = e4.getUint16(0);
22811
- for (let [s4, i5] of m3)
22812
- if (i5.canHandle(e4, t4))
22813
- return this.fileParser = new i5(this.options, this.file, this.parsers), e4[s4] = true;
22730
+ for (let [s4, i4] of m3) if (i4.canHandle(e4, t4)) return this.fileParser = new i4(this.options, this.file, this.parsers), e4[s4] = true;
22814
22731
  this.file.close && this.file.close(), l3("Unknown file format");
22815
22732
  }
22816
22733
  async parse() {
@@ -22821,19 +22738,18 @@ Uppy plugins must have unique \`id\` options.`;
22821
22738
  async executeParsers() {
22822
22739
  let { output: e4 } = this;
22823
22740
  await this.fileParser.parse();
22824
- let t4 = Object.values(this.parsers).map(async (t5) => {
22741
+ let t4 = Object.values(this.parsers).map((async (t5) => {
22825
22742
  let s4 = await t5.parse();
22826
22743
  t5.assignToOutput(e4, s4);
22827
- });
22828
- this.options.silentErrors && (t4 = t4.map((e5) => e5.catch(this.pushToErrors))), await Promise.all(t4);
22744
+ }));
22745
+ this.options.silentErrors && (t4 = t4.map(((e5) => e5.catch(this.pushToErrors)))), await Promise.all(t4);
22829
22746
  }
22830
22747
  async extractThumbnail() {
22831
22748
  this.setup();
22832
22749
  let { options: e4, file: t4 } = this, s4 = y3.get("tiff", e4);
22833
- var i5;
22834
- if (t4.tiff ? i5 = { start: 0, type: "tiff" } : t4.jpeg && (i5 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i5)
22835
- return;
22836
- let n3 = await this.fileParser.ensureSegmentChunk(i5), r4 = this.parsers.tiff = new s4(n3, e4, t4), a4 = await r4.extractThumbnail();
22750
+ var i4;
22751
+ if (t4.tiff ? i4 = { start: 0, type: "tiff" } : t4.jpeg && (i4 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i4) return;
22752
+ let n3 = await this.fileParser.ensureSegmentChunk(i4), r4 = this.parsers.tiff = new s4(n3, e4, t4), a4 = await r4.extractThumbnail();
22837
22753
  return t4.close && t4.close(), a4;
22838
22754
  }
22839
22755
  };
@@ -22844,8 +22760,8 @@ Uppy plugins must have unique \`id\` options.`;
22844
22760
  var G3 = Object.freeze({ __proto__: null, parse: Y, Exifr: H3, fileParsers: m3, segmentParsers: y3, fileReaders: b2, tagKeys: B4, tagValues: V3, tagRevivers: I2, createDictionary: x3, extendDictionary: C3, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A4, chunkedProps: L2, otherSegments: T4, segments: z3, tiffBlocks: P4, segmentsAndBlocks: F4, tiffExtractables: j4, inheritables: E3, allFormatters: M2, Options: R });
22845
22761
  var J3 = class {
22846
22762
  static findPosition(e4, t4) {
22847
- let s4 = e4.getUint16(t4 + 2) + 2, i5 = "function" == typeof this.headerLength ? this.headerLength(e4, t4, s4) : this.headerLength, n3 = t4 + i5, r4 = s4 - i5;
22848
- return { offset: t4, length: s4, headerLength: i5, start: n3, size: r4, end: n3 + r4 };
22763
+ let s4 = e4.getUint16(t4 + 2) + 2, i4 = "function" == typeof this.headerLength ? this.headerLength(e4, t4, s4) : this.headerLength, n3 = t4 + i4, r4 = s4 - i4;
22764
+ return { offset: t4, length: s4, headerLength: i4, start: n3, size: r4, end: n3 + r4 };
22849
22765
  }
22850
22766
  static parse(e4, t4 = {}) {
22851
22767
  return new this(e4, new R({ [this.type]: t4 }), e4).parse();
@@ -22853,12 +22769,11 @@ Uppy plugins must have unique \`id\` options.`;
22853
22769
  normalizeInput(e4) {
22854
22770
  return e4 instanceof c3 ? e4 : new c3(e4);
22855
22771
  }
22856
- constructor(t4, s4 = {}, i5) {
22857
- e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", (e4) => {
22858
- if (!this.options.silentErrors)
22859
- throw e4;
22772
+ constructor(t4, s4 = {}, i4) {
22773
+ e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", ((e4) => {
22774
+ if (!this.options.silentErrors) throw e4;
22860
22775
  this.errors.push(e4.message);
22861
- }), this.chunk = this.normalizeInput(t4), this.file = i5, this.type = this.constructor.type, this.globalOptions = this.options = s4, this.localOptions = s4[this.type], this.canTranslate = this.localOptions && this.localOptions.translate;
22776
+ })), this.chunk = this.normalizeInput(t4), this.file = i4, this.type = this.constructor.type, this.globalOptions = this.options = s4, this.localOptions = s4[this.type], this.canTranslate = this.localOptions && this.localOptions.translate;
22862
22777
  }
22863
22778
  translate() {
22864
22779
  this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type));
@@ -22867,9 +22782,8 @@ Uppy plugins must have unique \`id\` options.`;
22867
22782
  return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
22868
22783
  }
22869
22784
  translateBlock(e4, t4) {
22870
- let s4 = I2.get(t4), i5 = V3.get(t4), n3 = B4.get(t4), r4 = this.options[t4], a4 = r4.reviveValues && !!s4, h4 = r4.translateValues && !!i5, f5 = r4.translateKeys && !!n3, l4 = {};
22871
- for (let [t5, r5] of e4)
22872
- a4 && s4.has(t5) ? r5 = s4.get(t5)(r5) : h4 && i5.has(t5) && (r5 = this.translateValue(r5, i5.get(t5))), f5 && n3.has(t5) && (t5 = n3.get(t5) || t5), l4[t5] = r5;
22785
+ let s4 = I2.get(t4), i4 = V3.get(t4), n3 = B4.get(t4), r4 = this.options[t4], a4 = r4.reviveValues && !!s4, h4 = r4.translateValues && !!i4, f5 = r4.translateKeys && !!n3, l4 = {};
22786
+ for (let [t5, r5] of e4) a4 && s4.has(t5) ? r5 = s4.get(t5)(r5) : h4 && i4.has(t5) && (r5 = this.translateValue(r5, i4.get(t5))), f5 && n3.has(t5) && (t5 = n3.get(t5) || t5), l4[t5] = r5;
22873
22787
  return l4;
22874
22788
  }
22875
22789
  translateValue(e4, t4) {
@@ -22879,12 +22793,11 @@ Uppy plugins must have unique \`id\` options.`;
22879
22793
  this.assignObjectToOutput(e4, this.constructor.type, t4);
22880
22794
  }
22881
22795
  assignObjectToOutput(e4, t4, s4) {
22882
- if (this.globalOptions.mergeOutput)
22883
- return Object.assign(e4, s4);
22796
+ if (this.globalOptions.mergeOutput) return Object.assign(e4, s4);
22884
22797
  e4[t4] ? Object.assign(e4[t4], s4) : e4[t4] = s4;
22885
22798
  }
22886
22799
  };
22887
- e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", () => false);
22800
+ e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", (() => false));
22888
22801
  function q4(e4) {
22889
22802
  return 192 === e4 || 194 === e4 || 196 === e4 || 219 === e4 || 221 === e4 || 218 === e4 || 254 === e4;
22890
22803
  }
@@ -22892,27 +22805,21 @@ Uppy plugins must have unique \`id\` options.`;
22892
22805
  return e4 >= 224 && e4 <= 239;
22893
22806
  }
22894
22807
  function Z(e4, t4, s4) {
22895
- for (let [i5, n3] of y3)
22896
- if (n3.canHandle(e4, t4, s4))
22897
- return i5;
22808
+ for (let [i4, n3] of y3) if (n3.canHandle(e4, t4, s4)) return i4;
22898
22809
  }
22899
22810
  var ee2 = class extends class {
22900
- constructor(t4, s4, i5) {
22901
- e3(this, "errors", []), e3(this, "ensureSegmentChunk", async (e4) => {
22811
+ constructor(t4, s4, i4) {
22812
+ e3(this, "errors", []), e3(this, "ensureSegmentChunk", (async (e4) => {
22902
22813
  let t5 = e4.start, s5 = e4.size || 65536;
22903
- if (this.file.chunked)
22904
- if (this.file.available(t5, s5))
22905
- e4.chunk = this.file.subarray(t5, s5);
22906
- else
22907
- try {
22908
- e4.chunk = await this.file.readChunk(t5, s5);
22909
- } catch (t6) {
22910
- l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
22911
- }
22912
- else
22913
- this.file.byteLength > t5 + s5 ? e4.chunk = this.file.subarray(t5, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t5) : l3("Segment unreachable: " + JSON.stringify(e4));
22814
+ if (this.file.chunked) if (this.file.available(t5, s5)) e4.chunk = this.file.subarray(t5, s5);
22815
+ else try {
22816
+ e4.chunk = await this.file.readChunk(t5, s5);
22817
+ } catch (t6) {
22818
+ l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
22819
+ }
22820
+ else this.file.byteLength > t5 + s5 ? e4.chunk = this.file.subarray(t5, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t5) : l3("Segment unreachable: " + JSON.stringify(e4));
22914
22821
  return e4.chunk;
22915
- }), this.extendOptions && this.extendOptions(t4), this.options = t4, this.file = s4, this.parsers = i5;
22822
+ })), this.extendOptions && this.extendOptions(t4), this.options = t4, this.file = s4, this.parsers = i4;
22916
22823
  }
22917
22824
  injectSegment(e4, t4) {
22918
22825
  this.options[e4].enabled && this.createParser(e4, t4);
@@ -22923,8 +22830,8 @@ Uppy plugins must have unique \`id\` options.`;
22923
22830
  }
22924
22831
  createParsers(e4) {
22925
22832
  for (let t4 of e4) {
22926
- let { type: e5, chunk: s4 } = t4, i5 = this.options[e5];
22927
- if (i5 && i5.enabled) {
22833
+ let { type: e5, chunk: s4 } = t4, i4 = this.options[e5];
22834
+ if (i4 && i4.enabled) {
22928
22835
  let t5 = this.parsers[e5];
22929
22836
  t5 && t5.append || t5 || this.createParser(e5, s4);
22930
22837
  }
@@ -22945,59 +22852,53 @@ Uppy plugins must have unique \`id\` options.`;
22945
22852
  await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
22946
22853
  }
22947
22854
  setupSegmentFinderArgs(e4) {
22948
- true === e4 ? (this.findAll = true, this.wanted = new Set(y3.keyList())) : (e4 = void 0 === e4 ? y3.keyList().filter((e5) => this.options[e5].enabled) : e4.filter((e5) => this.options[e5].enabled && y3.has(e5)), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
22855
+ true === e4 ? (this.findAll = true, this.wanted = new Set(y3.keyList())) : (e4 = void 0 === e4 ? y3.keyList().filter(((e5) => this.options[e5].enabled)) : e4.filter(((e5) => this.options[e5].enabled && y3.has(e5))), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
22949
22856
  }
22950
22857
  async findAppSegments(e4 = 0, t4) {
22951
22858
  this.setupSegmentFinderArgs(t4);
22952
- let { file: s4, findAll: i5, wanted: n3, remaining: r4 } = this;
22953
- if (!i5 && this.file.chunked && (i5 = Array.from(n3).some((e5) => {
22859
+ let { file: s4, findAll: i4, wanted: n3, remaining: r4 } = this;
22860
+ if (!i4 && this.file.chunked && (i4 = Array.from(n3).some(((e5) => {
22954
22861
  let t5 = y3.get(e5), s5 = this.options[e5];
22955
22862
  return t5.multiSegment && s5.multiSegment;
22956
- }), i5 && await this.file.readWhole()), e4 = this.findAppSegmentsInRange(e4, s4.byteLength), !this.options.onlyTiff && s4.chunked) {
22863
+ })), i4 && await this.file.readWhole()), e4 = this.findAppSegmentsInRange(e4, s4.byteLength), !this.options.onlyTiff && s4.chunked) {
22957
22864
  let t5 = false;
22958
22865
  for (; r4.size > 0 && !t5 && (s4.canReadNextChunk || this.unfinishedMultiSegment); ) {
22959
- let { nextChunkOffset: i6 } = s4, n4 = this.appSegments.some((e5) => !this.file.available(e5.offset || e5.start, e5.length || e5.size));
22960
- if (t5 = e4 > i6 && !n4 ? !await s4.readNextChunk(e4) : !await s4.readNextChunk(i6), void 0 === (e4 = this.findAppSegmentsInRange(e4, s4.byteLength)))
22961
- return;
22866
+ let { nextChunkOffset: i5 } = s4, n4 = this.appSegments.some(((e5) => !this.file.available(e5.offset || e5.start, e5.length || e5.size)));
22867
+ if (t5 = e4 > i5 && !n4 ? !await s4.readNextChunk(e4) : !await s4.readNextChunk(i5), void 0 === (e4 = this.findAppSegmentsInRange(e4, s4.byteLength))) return;
22962
22868
  }
22963
22869
  }
22964
22870
  }
22965
22871
  findAppSegmentsInRange(e4, t4) {
22966
22872
  t4 -= 2;
22967
- let s4, i5, n3, r4, a4, h4, { file: f5, findAll: l4, wanted: o4, remaining: u5, options: d4 } = this;
22968
- for (; e4 < t4; e4++)
22969
- if (255 === f5.getUint8(e4)) {
22970
- if (s4 = f5.getUint8(e4 + 1), Q3(s4)) {
22971
- if (i5 = f5.getUint16(e4 + 2), n3 = Z(f5, e4, i5), n3 && o4.has(n3) && (r4 = y3.get(n3), a4 = r4.findPosition(f5, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u5.delete(n3)) : u5.delete(n3), 0 === u5.size)))
22972
- break;
22973
- d4.recordUnknownSegments && (a4 = J3.findPosition(f5, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i5 + 1;
22974
- } else if (q4(s4)) {
22975
- if (i5 = f5.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos)
22976
- return;
22977
- d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i5, marker: s4 }), e4 += i5 + 1;
22978
- }
22873
+ let s4, i4, n3, r4, a4, h4, { file: f5, findAll: l4, wanted: o4, remaining: u5, options: d4 } = this;
22874
+ for (; e4 < t4; e4++) if (255 === f5.getUint8(e4)) {
22875
+ if (s4 = f5.getUint8(e4 + 1), Q3(s4)) {
22876
+ if (i4 = f5.getUint16(e4 + 2), n3 = Z(f5, e4, i4), n3 && o4.has(n3) && (r4 = y3.get(n3), a4 = r4.findPosition(f5, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u5.delete(n3)) : u5.delete(n3), 0 === u5.size))) break;
22877
+ d4.recordUnknownSegments && (a4 = J3.findPosition(f5, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i4 + 1;
22878
+ } else if (q4(s4)) {
22879
+ if (i4 = f5.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos) return;
22880
+ d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i4, marker: s4 }), e4 += i4 + 1;
22979
22881
  }
22882
+ }
22980
22883
  return e4;
22981
22884
  }
22982
22885
  mergeMultiSegments() {
22983
- if (!this.appSegments.some((e5) => e5.multiSegment))
22984
- return;
22985
- let e4 = function(e5, t4) {
22986
- let s4, i5, n3, r4 = /* @__PURE__ */ new Map();
22987
- for (let a4 = 0; a4 < e5.length; a4++)
22988
- s4 = e5[a4], i5 = s4[t4], r4.has(i5) ? n3 = r4.get(i5) : r4.set(i5, n3 = []), n3.push(s4);
22886
+ if (!this.appSegments.some(((e5) => e5.multiSegment))) return;
22887
+ let e4 = (function(e5, t4) {
22888
+ let s4, i4, n3, r4 = /* @__PURE__ */ new Map();
22889
+ for (let a4 = 0; a4 < e5.length; a4++) s4 = e5[a4], i4 = s4[t4], r4.has(i4) ? n3 = r4.get(i4) : r4.set(i4, n3 = []), n3.push(s4);
22989
22890
  return Array.from(r4);
22990
- }(this.appSegments, "type");
22991
- this.mergedAppSegments = e4.map(([e5, t4]) => {
22891
+ })(this.appSegments, "type");
22892
+ this.mergedAppSegments = e4.map((([e5, t4]) => {
22992
22893
  let s4 = y3.get(e5, this.options);
22993
22894
  if (s4.handleMultiSegments) {
22994
22895
  return { type: e5, chunk: s4.handleMultiSegments(t4) };
22995
22896
  }
22996
22897
  return t4[0];
22997
- });
22898
+ }));
22998
22899
  }
22999
22900
  getSegment(e4) {
23000
- return this.appSegments.find((t4) => t4.type === e4);
22901
+ return this.appSegments.find(((t4) => t4.type === e4));
23001
22902
  }
23002
22903
  async getOrFindSegment(e4) {
23003
22904
  let t4 = this.getSegment(e4);
@@ -23012,38 +22913,31 @@ Uppy plugins must have unique \`id\` options.`;
23012
22913
  18761 === e4 ? this.le = true : 19789 === e4 && (this.le = false), this.chunk.le = this.le, this.headerParsed = true;
23013
22914
  }
23014
22915
  parseTags(e4, t4, s4 = /* @__PURE__ */ new Map()) {
23015
- let { pick: i5, skip: n3 } = this.options[t4];
23016
- i5 = new Set(i5);
23017
- let r4 = i5.size > 0, a4 = 0 === n3.size, h4 = this.chunk.getUint16(e4);
22916
+ let { pick: i4, skip: n3 } = this.options[t4];
22917
+ i4 = new Set(i4);
22918
+ let r4 = i4.size > 0, a4 = 0 === n3.size, h4 = this.chunk.getUint16(e4);
23018
22919
  e4 += 2;
23019
22920
  for (let f5 = 0; f5 < h4; f5++) {
23020
22921
  let h5 = this.chunk.getUint16(e4);
23021
22922
  if (r4) {
23022
- if (i5.has(h5) && (s4.set(h5, this.parseTag(e4, h5, t4)), i5.delete(h5), 0 === i5.size))
23023
- break;
23024
- } else
23025
- !a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5, t4));
22923
+ if (i4.has(h5) && (s4.set(h5, this.parseTag(e4, h5, t4)), i4.delete(h5), 0 === i4.size)) break;
22924
+ } else !a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5, t4));
23026
22925
  e4 += 12;
23027
22926
  }
23028
22927
  return s4;
23029
22928
  }
23030
22929
  parseTag(e4, t4, s4) {
23031
- let { chunk: i5 } = this, n3 = i5.getUint16(e4 + 2), r4 = i5.getUint32(e4 + 4), a4 = te[n3];
23032
- if (a4 * r4 <= 4 ? e4 += 8 : e4 = i5.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l3(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4}`), e4 > i5.byteLength && l3(`Invalid TIFF value offset. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4} is outside of chunk size ${i5.byteLength}`), 1 === n3)
23033
- return i5.getUint8Array(e4, r4);
23034
- if (2 === n3)
23035
- return "" === (h4 = function(e5) {
23036
- for (; e5.endsWith("\0"); )
23037
- e5 = e5.slice(0, -1);
23038
- return e5;
23039
- }(h4 = i5.getString(e4, r4)).trim()) ? void 0 : h4;
22930
+ let { chunk: i4 } = this, n3 = i4.getUint16(e4 + 2), r4 = i4.getUint32(e4 + 4), a4 = te[n3];
22931
+ if (a4 * r4 <= 4 ? e4 += 8 : e4 = i4.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l3(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4}`), e4 > i4.byteLength && l3(`Invalid TIFF value offset. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4} is outside of chunk size ${i4.byteLength}`), 1 === n3) return i4.getUint8Array(e4, r4);
22932
+ if (2 === n3) return "" === (h4 = (function(e5) {
22933
+ for (; e5.endsWith("\0"); ) e5 = e5.slice(0, -1);
22934
+ return e5;
22935
+ })(h4 = i4.getString(e4, r4)).trim()) ? void 0 : h4;
23040
22936
  var h4;
23041
- if (7 === n3)
23042
- return i5.getUint8Array(e4, r4);
23043
- if (1 === r4)
23044
- return this.parseTagValue(n3, e4);
22937
+ if (7 === n3) return i4.getUint8Array(e4, r4);
22938
+ if (1 === r4) return this.parseTagValue(n3, e4);
23045
22939
  {
23046
- let t5 = new (function(e5) {
22940
+ let t5 = new ((function(e5) {
23047
22941
  switch (e5) {
23048
22942
  case 1:
23049
22943
  return Uint8Array;
@@ -23068,9 +22962,8 @@ Uppy plugins must have unique \`id\` options.`;
23068
22962
  default:
23069
22963
  return Array;
23070
22964
  }
23071
- }(n3))(r4), s5 = a4;
23072
- for (let i6 = 0; i6 < r4; i6++)
23073
- t5[i6] = this.parseTagValue(n3, e4), e4 += s5;
22965
+ })(n3))(r4), s5 = a4;
22966
+ for (let i5 = 0; i5 < r4; i5++) t5[i5] = this.parseTagValue(n3, e4), e4 += s5;
23074
22967
  return t5;
23075
22968
  }
23076
22969
  }
@@ -23132,8 +23025,7 @@ Uppy plugins must have unique \`id\` options.`;
23132
23025
  return this[t4] = s4, this.parseTags(e4, t4, s4), s4;
23133
23026
  }
23134
23027
  async parseIfd0Block() {
23135
- if (this.ifd0)
23136
- return;
23028
+ if (this.ifd0) return;
23137
23029
  let { file: e4 } = this;
23138
23030
  this.findIfd0Offset(), this.ifd0Offset < 8 && l3("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l3(`IFD0 offset points to outside of file.
23139
23031
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o3(this.options));
@@ -23141,10 +23033,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23141
23033
  return 0 !== t4.size ? (this.exifOffset = t4.get(34665), this.interopOffset = t4.get(40965), this.gpsOffset = t4.get(34853), this.xmp = t4.get(700), this.iptc = t4.get(33723), this.icc = t4.get(34675), this.options.sanitize && (t4.delete(34665), t4.delete(40965), t4.delete(34853), t4.delete(700), t4.delete(33723), t4.delete(34675)), t4) : void 0;
23142
23034
  }
23143
23035
  async parseExifBlock() {
23144
- if (this.exif)
23145
- return;
23146
- if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset)
23147
- return;
23036
+ if (this.exif) return;
23037
+ if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset) return;
23148
23038
  this.file.tiff && await this.file.ensureChunk(this.exifOffset, o3(this.options));
23149
23039
  let e4 = this.parseBlock(this.exifOffset, "exif");
23150
23040
  return this.interopOffset || (this.interopOffset = e4.get(40965)), this.makerNote = e4.get(37500), this.userComment = e4.get(37510), this.options.sanitize && (e4.delete(40965), e4.delete(37500), e4.delete(37510)), this.unpack(e4, 41728), this.unpack(e4, 41729), e4;
@@ -23154,24 +23044,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23154
23044
  s4 && 1 === s4.length && e4.set(t4, s4[0]);
23155
23045
  }
23156
23046
  async parseGpsBlock() {
23157
- if (this.gps)
23158
- return;
23159
- if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset)
23160
- return;
23047
+ if (this.gps) return;
23048
+ if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset) return;
23161
23049
  let e4 = this.parseBlock(this.gpsOffset, "gps");
23162
23050
  return e4 && e4.has(2) && e4.has(4) && (e4.set("latitude", ne(...e4.get(2), e4.get(1))), e4.set("longitude", ne(...e4.get(4), e4.get(3)))), e4;
23163
23051
  }
23164
23052
  async parseInteropBlock() {
23165
- if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), void 0 !== this.interopOffset || this.exif || await this.parseExifBlock(), void 0 !== this.interopOffset))
23166
- return this.parseBlock(this.interopOffset, "interop");
23053
+ if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), void 0 !== this.interopOffset || this.exif || await this.parseExifBlock(), void 0 !== this.interopOffset)) return this.parseBlock(this.interopOffset, "interop");
23167
23054
  }
23168
23055
  async parseThumbnailBlock(e4 = false) {
23169
- if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e4))
23170
- return this.findIfd1Offset(), this.ifd1Offset > 0 && (this.parseBlock(this.ifd1Offset, "ifd1"), this.ifd1Parsed = true), this.ifd1;
23056
+ if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e4)) return this.findIfd1Offset(), this.ifd1Offset > 0 && (this.parseBlock(this.ifd1Offset, "ifd1"), this.ifd1Parsed = true), this.ifd1;
23171
23057
  }
23172
23058
  async extractThumbnail() {
23173
- if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1)
23174
- return;
23059
+ if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1) return;
23175
23060
  let e4 = this.ifd1.get(513), t4 = this.ifd1.get(514);
23176
23061
  return this.chunk.getUint8Array(e4, t4);
23177
23062
  }
@@ -23182,28 +23067,21 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23182
23067
  return this.ifd1;
23183
23068
  }
23184
23069
  createOutput() {
23185
- let e4, t4, s4, i5 = {};
23186
- for (t4 of P4)
23187
- if (e4 = this[t4], !f4(e4))
23188
- if (s4 = this.canTranslate ? this.translateBlock(e4, t4) : Object.fromEntries(e4), this.options.mergeOutput) {
23189
- if ("ifd1" === t4)
23190
- continue;
23191
- Object.assign(i5, s4);
23192
- } else
23193
- i5[t4] = s4;
23194
- return this.makerNote && (i5.makerNote = this.makerNote), this.userComment && (i5.userComment = this.userComment), i5;
23070
+ let e4, t4, s4, i4 = {};
23071
+ for (t4 of P4) if (e4 = this[t4], !f4(e4)) if (s4 = this.canTranslate ? this.translateBlock(e4, t4) : Object.fromEntries(e4), this.options.mergeOutput) {
23072
+ if ("ifd1" === t4) continue;
23073
+ Object.assign(i4, s4);
23074
+ } else i4[t4] = s4;
23075
+ return this.makerNote && (i4.makerNote = this.makerNote), this.userComment && (i4.userComment = this.userComment), i4;
23195
23076
  }
23196
23077
  assignToOutput(e4, t4) {
23197
- if (this.globalOptions.mergeOutput)
23198
- Object.assign(e4, t4);
23199
- else
23200
- for (let [s4, i5] of Object.entries(t4))
23201
- this.assignObjectToOutput(e4, s4, i5);
23078
+ if (this.globalOptions.mergeOutput) Object.assign(e4, t4);
23079
+ else for (let [s4, i4] of Object.entries(t4)) this.assignObjectToOutput(e4, s4, i4);
23202
23080
  }
23203
23081
  };
23204
- function ne(e4, t4, s4, i5) {
23082
+ function ne(e4, t4, s4, i4) {
23205
23083
  var n3 = e4 + t4 / 60 + s4 / 3600;
23206
- return "S" !== i5 && "W" !== i5 || (n3 *= -1), n3;
23084
+ return "S" !== i4 && "W" !== i4 || (n3 *= -1), n3;
23207
23085
  }
23208
23086
  e3(ie, "type", "tiff"), e3(ie, "headerLength", 10), y3.set("tiff", ie);
23209
23087
  var re = Object.freeze({ __proto__: null, default: G3, Exifr: H3, fileParsers: m3, segmentParsers: y3, fileReaders: b2, tagKeys: B4, tagValues: V3, tagRevivers: I2, createDictionary: x3, extendDictionary: C3, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A4, chunkedProps: L2, otherSegments: T4, segments: z3, tiffBlocks: P4, segmentsAndBlocks: F4, tiffExtractables: j4, inheritables: E3, allFormatters: M2, Options: R, parse: Y });
@@ -23215,8 +23093,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23215
23093
  let t4 = new H3(de);
23216
23094
  await t4.read(e4);
23217
23095
  let s4 = await t4.parse();
23218
- if (s4 && s4.ifd0)
23219
- return s4.ifd0[274];
23096
+ if (s4 && s4.ifd0) return s4.ifd0[274];
23220
23097
  }
23221
23098
  var pe = Object.freeze({ 1: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 0, rad: 0 }, 2: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 0, rad: 0 }, 3: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 4: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 5: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 90, rad: 90 * Math.PI / 180 }, 6: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 90, rad: 90 * Math.PI / 180 }, 7: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 270, rad: 270 * Math.PI / 180 }, 8: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 270, rad: 270 * Math.PI / 180 } });
23222
23099
  var ge = true;
@@ -23226,8 +23103,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23226
23103
  if (e4.includes("iPad") || e4.includes("iPhone")) {
23227
23104
  let t4 = e4.match(/OS (\d+)_(\d+)/);
23228
23105
  if (t4) {
23229
- let [, e5, s4] = t4, i5 = Number(e5) + 0.1 * Number(s4);
23230
- ge = i5 < 13.4, me = false;
23106
+ let [, e5, s4] = t4, i4 = Number(e5) + 0.1 * Number(s4);
23107
+ ge = i4 < 13.4, me = false;
23231
23108
  }
23232
23109
  } else if (e4.includes("OS X 10")) {
23233
23110
  let [, t4] = e4.match(/OS X 10[_.](\d+)/);
@@ -23272,8 +23149,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23272
23149
  }
23273
23150
  set(e4, t4, s4 = false) {
23274
23151
  s4 && this._tryExtend(t4, e4.byteLength, e4);
23275
- let i5 = super.set(e4, t4);
23276
- return this.ranges.add(t4, i5.byteLength), i5;
23152
+ let i4 = super.set(e4, t4);
23153
+ return this.ranges.add(t4, i4.byteLength), i4;
23277
23154
  }
23278
23155
  async ensureChunk(e4, t4) {
23279
23156
  this.chunked && (this.ranges.available(e4, t4) || await this.readChunk(e4, t4));
@@ -23290,17 +23167,16 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23290
23167
  return this.list.length;
23291
23168
  }
23292
23169
  add(e4, t4, s4 = 0) {
23293
- let i5 = e4 + t4, n3 = this.list.filter((t5) => ke(e4, t5.offset, i5) || ke(e4, t5.end, i5));
23170
+ let i4 = e4 + t4, n3 = this.list.filter(((t5) => ke(e4, t5.offset, i4) || ke(e4, t5.end, i4)));
23294
23171
  if (n3.length > 0) {
23295
- e4 = Math.min(e4, ...n3.map((e5) => e5.offset)), i5 = Math.max(i5, ...n3.map((e5) => e5.end)), t4 = i5 - e4;
23172
+ e4 = Math.min(e4, ...n3.map(((e5) => e5.offset))), i4 = Math.max(i4, ...n3.map(((e5) => e5.end))), t4 = i4 - e4;
23296
23173
  let s5 = n3.shift();
23297
- s5.offset = e4, s5.length = t4, s5.end = i5, this.list = this.list.filter((e5) => !n3.includes(e5));
23298
- } else
23299
- this.list.push({ offset: e4, length: t4, end: i5 });
23174
+ s5.offset = e4, s5.length = t4, s5.end = i4, this.list = this.list.filter(((e5) => !n3.includes(e5)));
23175
+ } else this.list.push({ offset: e4, length: t4, end: i4 });
23300
23176
  }
23301
23177
  available(e4, t4) {
23302
23178
  let s4 = e4 + t4;
23303
- return this.list.some((t5) => t5.offset <= e4 && s4 <= t5.end);
23179
+ return this.list.some(((t5) => t5.offset <= e4 && s4 <= t5.end));
23304
23180
  }
23305
23181
  };
23306
23182
  function ke(e4, t4, s4) {
@@ -23317,21 +23193,18 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23317
23193
  this.chunked = true, await this.readChunk(0, this.options.firstChunkSize);
23318
23194
  }
23319
23195
  async readNextChunk(e4 = this.nextChunkOffset) {
23320
- if (this.fullyRead)
23321
- return this.chunksRead++, false;
23196
+ if (this.fullyRead) return this.chunksRead++, false;
23322
23197
  let t4 = this.options.chunkSize, s4 = await this.readChunk(e4, t4);
23323
23198
  return !!s4 && s4.byteLength === t4;
23324
23199
  }
23325
23200
  async readChunk(e4, t4) {
23326
- if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4)))
23327
- return this._readChunk(e4, t4);
23201
+ if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4))) return this._readChunk(e4, t4);
23328
23202
  }
23329
23203
  safeWrapAddress(e4, t4) {
23330
23204
  return void 0 !== this.size && e4 + t4 > this.size ? Math.max(0, this.size - e4) : t4;
23331
23205
  }
23332
23206
  get nextChunkOffset() {
23333
- if (0 !== this.ranges.list.length)
23334
- return this.ranges.list[0].length;
23207
+ if (0 !== this.ranges.list.length) return this.ranges.list[0].length;
23335
23208
  }
23336
23209
  get canReadNextChunk() {
23337
23210
  return this.chunksRead < this.options.chunkLimit;
@@ -23355,7 +23228,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23355
23228
  return this.chunked = true, this.size = this.input.size, super.readChunked();
23356
23229
  }
23357
23230
  async _readChunk(e4, t4) {
23358
- let s4 = t4 ? e4 + t4 : void 0, i5 = this.input.slice(e4, s4), n3 = await A4(i5);
23231
+ let s4 = t4 ? e4 + t4 : void 0, i4 = this.input.slice(e4, s4), n3 = await A4(i4);
23359
23232
  return this.set(n3, e4, true);
23360
23233
  }
23361
23234
  });
@@ -24018,7 +23891,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24018
23891
  browse: browseFiles
24019
23892
  }) });
24020
23893
  };
24021
- [Symbol.for("uppy test: disable unused locale key warning")]() {
23894
+ [/* @__PURE__ */ Symbol.for("uppy test: disable unused locale key warning")]() {
24022
23895
  this.props.i18nArray("dropPasteBoth");
24023
23896
  this.props.i18nArray("dropPasteFiles");
24024
23897
  this.props.i18nArray("dropPasteFolders");
@@ -24325,8 +24198,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24325
24198
  if (bKeys.length !== len) {
24326
24199
  return false;
24327
24200
  }
24328
- for (let i5 = 0; i5 < len; i5++) {
24329
- const key = aKeys[i5];
24201
+ for (let i4 = 0; i4 < len; i4++) {
24202
+ const key = aKeys[i4];
24330
24203
  if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
24331
24204
  return false;
24332
24205
  }
@@ -24719,8 +24592,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24719
24592
  }
24720
24593
  let state = uploadStates.STATE_WAITING;
24721
24594
  const fileIDs = Object.keys(files);
24722
- for (let i5 = 0; i5 < fileIDs.length; i5++) {
24723
- const { progress } = files[fileIDs[i5]];
24595
+ for (let i4 = 0; i4 < fileIDs.length; i4++) {
24596
+ const { progress } = files[fileIDs[i4]];
24724
24597
  if (progress.uploadStarted && !progress.uploadComplete) {
24725
24598
  return uploadStates.STATE_UPLOADING;
24726
24599
  }
@@ -26667,7 +26540,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26667
26540
  resume() {
26668
26541
  this.#paused = false;
26669
26542
  clearTimeout(this.#pauseTimer);
26670
- for (let i5 = 0; i5 < this.limit; i5++) {
26543
+ for (let i4 = 0; i4 < this.limit; i4++) {
26671
26544
  this.#queueNext();
26672
26545
  }
26673
26546
  }
@@ -26711,7 +26584,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26711
26584
  }
26712
26585
  this.#downLimit = this.limit;
26713
26586
  this.limit = Math.ceil((this.#upperLimit + this.#downLimit) / 2);
26714
- for (let i5 = this.#downLimit; i5 <= this.limit; i5++) {
26587
+ for (let i4 = this.#downLimit; i4 <= this.limit; i4++) {
26715
26588
  this.#queueNext();
26716
26589
  }
26717
26590
  if (this.#upperLimit - this.#downLimit > 3) {
@@ -26724,7 +26597,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26724
26597
  return this.#paused;
26725
26598
  }
26726
26599
  };
26727
- var internalRateLimitedQueue = Symbol("__queue");
26600
+ var internalRateLimitedQueue = /* @__PURE__ */ Symbol("__queue");
26728
26601
 
26729
26602
  // node_modules/@uppy/utils/lib/NetworkError.js
26730
26603
  var NetworkError = class extends Error {
@@ -26873,8 +26746,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26873
26746
 
26874
26747
  // node_modules/@uppy/xhr-upload/lib/index.js
26875
26748
  function _classPrivateFieldLooseBase(e4, t4) {
26876
- if (!{}.hasOwnProperty.call(e4, t4))
26877
- throw new TypeError("attempted to use private field on non-instance");
26749
+ if (!{}.hasOwnProperty.call(e4, t4)) throw new TypeError("attempted to use private field on non-instance");
26878
26750
  return e4;
26879
26751
  }
26880
26752
  var id = 0;
@@ -26886,10 +26758,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26886
26758
  };
26887
26759
  function buildResponseError(xhr, err) {
26888
26760
  let error2 = err;
26889
- if (!error2)
26890
- error2 = new Error("Upload error");
26891
- if (typeof error2 === "string")
26892
- error2 = new Error(error2);
26761
+ if (!error2) error2 = new Error("Upload error");
26762
+ if (typeof error2 === "string") error2 = new Error(error2);
26893
26763
  if (!(error2 instanceof Error)) {
26894
26764
  error2 = Object.assign(new Error("Upload error"), {
26895
26765
  data: error2
@@ -27241,8 +27111,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27241
27111
  const getQueue = () => this.requests;
27242
27112
  const controller = new AbortController();
27243
27113
  const removedHandler = (removedFile) => {
27244
- if (removedFile.id === file.id)
27245
- controller.abort();
27114
+ if (removedFile.id === file.id) controller.abort();
27246
27115
  };
27247
27116
  this.uppy.on("file-removed", removedHandler);
27248
27117
  const uploadPromise = this.uppy.getRequestClientForFile(file).uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {
@@ -27286,17 +27155,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27286
27155
  function isPossiblyDangerous(name, value) {
27287
27156
  let val = value.replace(/\s+/g, "").toLowerCase();
27288
27157
  if (["src", "href", "xlink:href"].includes(name)) {
27289
- if (val.includes("javascript:") || val.includes("data:"))
27290
- return true;
27158
+ if (val.includes("javascript:") || val.includes("data:")) return true;
27291
27159
  }
27292
- if (name.startsWith("on"))
27293
- return true;
27160
+ if (name.startsWith("on")) return true;
27294
27161
  }
27295
27162
  function removePossiblyDangerousAttributes(elem) {
27296
27163
  let atts = elem.attributes;
27297
27164
  for (let { name, value } of atts) {
27298
- if (!isPossiblyDangerous(name, value))
27299
- continue;
27165
+ if (!isPossiblyDangerous(name, value)) continue;
27300
27166
  elem.removeAttribute(name);
27301
27167
  }
27302
27168
  }
@@ -27324,8 +27190,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27324
27190
  static outlets = ["attachment-preview", "attachment-preview-container"];
27325
27191
  //======= Lifecycle
27326
27192
  connect() {
27327
- if (this.uppy)
27328
- return;
27193
+ if (this.uppy) return;
27329
27194
  this.uploadedFiles = [];
27330
27195
  this.element.style["display"] = "none";
27331
27196
  this.configureUppy();
@@ -27345,8 +27210,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27345
27210
  this.#cleanupUppy();
27346
27211
  }
27347
27212
  #handleMorph() {
27348
- if (!this.element.isConnected)
27349
- return;
27213
+ if (!this.element.isConnected) return;
27350
27214
  this.#cleanupUppy();
27351
27215
  this.uploadedFiles = [];
27352
27216
  this.element.style["display"] = "none";
@@ -27400,14 +27264,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27400
27264
  let theme = document.documentElement.getAttribute("data-bs-theme") || "auto";
27401
27265
  this.#dashboard.setOptions({ theme });
27402
27266
  let file = null;
27403
- while (file = this.uploadedFiles.pop())
27404
- this.uppy.removeFile(file.id);
27267
+ while (file = this.uploadedFiles.pop()) this.uppy.removeFile(file.id);
27405
27268
  this.#dashboard.openModal();
27406
27269
  }
27407
27270
  #onUploadSuccess(file, response) {
27408
27271
  this.uploadedFiles.push(file);
27409
- if (!this.multiple)
27410
- this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
27272
+ if (!this.multiple) this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
27411
27273
  const uploadedFileData = response.body["data"];
27412
27274
  const uploadedFileUrl = response.body["url"];
27413
27275
  this.attachmentPreviewContainerOutlet.element.appendChild(
@@ -27415,8 +27277,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27415
27277
  );
27416
27278
  }
27417
27279
  #onAttachmentsChanged() {
27418
- if (!this.deleteAllTrigger)
27419
- return;
27280
+ if (!this.deleteAllTrigger) return;
27420
27281
  const len = this.attachmentPreviewOutlets.length;
27421
27282
  if (len > 1) {
27422
27283
  this.deleteAllTrigger.style["display"] = "initial";
@@ -27431,10 +27292,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27431
27292
  this.triggerContainer.className = "flex items-center gap-2";
27432
27293
  this.element.insertAdjacentElement("afterend", this.triggerContainer);
27433
27294
  this.#buildUploadTrigger();
27434
- if (this.uploadTrigger)
27435
- this.triggerContainer.append(this.uploadTrigger);
27436
- if (this.deleteAllTrigger)
27437
- this.triggerContainer.append(this.deleteAllTrigger);
27295
+ if (this.uploadTrigger) this.triggerContainer.append(this.uploadTrigger);
27296
+ if (this.deleteAllTrigger) this.triggerContainer.append(this.deleteAllTrigger);
27438
27297
  }
27439
27298
  #buildUploadTrigger() {
27440
27299
  const triggerPrompt = this.multiple ? "Choose files" : "Choose file";
@@ -27457,8 +27316,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27457
27316
  false
27458
27317
  );
27459
27318
  this.deleteAllTrigger.addEventListener("click", () => {
27460
- if (confirm("Are you sure?"))
27461
- this.attachmentPreviewContainerOutlet.clear();
27319
+ if (confirm("Are you sure?")) this.attachmentPreviewContainerOutlet.clear();
27462
27320
  });
27463
27321
  }
27464
27322
  #buildPreview(data, url) {
@@ -27582,8 +27440,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27582
27440
  color: "#838999",
27583
27441
  icon: iconFile2()
27584
27442
  };
27585
- if (!fileType)
27586
- return defaultChoice;
27443
+ if (!fileType) return defaultChoice;
27587
27444
  const fileTypeGeneral = fileType.split("/")[0];
27588
27445
  const fileTypeSpecific = fileType.split("/")[1];
27589
27446
  if (fileTypeGeneral === "text") {
@@ -27634,8 +27491,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27634
27491
  thumbnailUrl: String
27635
27492
  };
27636
27493
  connect() {
27637
- if (!this.hasThumbnailTarget)
27638
- return;
27494
+ if (!this.hasThumbnailTarget) return;
27639
27495
  if (this.thumbnailUrlValue) {
27640
27496
  this.useThumbnailPreview();
27641
27497
  } else {
@@ -27703,12 +27559,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27703
27559
  document.removeEventListener("turbo:render", this.afterRender);
27704
27560
  }
27705
27561
  beforeRender() {
27706
- if (this.hasScrollTarget)
27707
- savedScrollTop = this.scrollTarget.scrollTop;
27562
+ if (this.hasScrollTarget) savedScrollTop = this.scrollTarget.scrollTop;
27708
27563
  }
27709
27564
  afterRender() {
27710
- if (this.hasScrollTarget)
27711
- this.scrollTarget.scrollTop = savedScrollTop;
27565
+ if (this.hasScrollTarget) this.scrollTarget.scrollTop = savedScrollTop;
27712
27566
  }
27713
27567
  };
27714
27568
 
@@ -27749,8 +27603,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27749
27603
  this.restoreBodyState();
27750
27604
  }
27751
27605
  restoreBodyState() {
27752
- if (this.bodyStateRestored)
27753
- return;
27606
+ if (this.bodyStateRestored) return;
27754
27607
  this.bodyStateRestored = true;
27755
27608
  document.body.style.overflow = this.originalOverflow || "";
27756
27609
  window.scrollTo(0, this.originalScrollPosition);
@@ -27854,18 +27707,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27854
27707
 
27855
27708
  // src/js/controllers/bulk_actions_controller.js
27856
27709
  var bulk_actions_controller_default = class extends Controller {
27857
- static targets = ["checkbox", "checkboxAll", "toolbar", "selectedCount", "actionButton", "selectionCell"];
27858
- static values = {
27859
- hasActions: { type: Boolean, default: false }
27860
- };
27861
- connect() {
27862
- if (this.hasActionsValue) {
27863
- this.enableSelection();
27864
- }
27865
- }
27866
- enableSelection() {
27867
- this.selectionCellTargets.forEach((el) => el.classList.remove("hidden"));
27868
- }
27710
+ static targets = ["checkbox", "checkboxAll", "toolbar", "selectedCount", "actionButton", "filterPills"];
27869
27711
  toggle() {
27870
27712
  this.updateUI();
27871
27713
  }
@@ -27884,6 +27726,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27884
27726
  if (this.hasToolbarTarget) {
27885
27727
  this.toolbarTarget.classList.toggle("hidden", checked.length === 0);
27886
27728
  }
27729
+ if (this.hasFilterPillsTarget) {
27730
+ this.filterPillsTarget.classList.toggle("hidden", checked.length > 0);
27731
+ }
27887
27732
  if (this.hasSelectedCountTarget) {
27888
27733
  this.selectedCountTarget.textContent = checked.length;
27889
27734
  }
@@ -27909,8 +27754,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27909
27754
  return /* @__PURE__ */ new Set();
27910
27755
  }
27911
27756
  let intersection = new Set(this.getAllowedActionsForCheckbox(checked[0]));
27912
- for (let i5 = 1; i5 < checked.length; i5++) {
27913
- const actions = this.getAllowedActionsForCheckbox(checked[i5]);
27757
+ for (let i4 = 1; i4 < checked.length; i4++) {
27758
+ const actions = this.getAllowedActionsForCheckbox(checked[i4]);
27914
27759
  intersection = new Set([...intersection].filter((a4) => actions.includes(a4)));
27915
27760
  }
27916
27761
  return intersection;
@@ -27919,6 +27764,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27919
27764
  const allowedActions = checkbox.dataset.allowedActions;
27920
27765
  return allowedActions ? allowedActions.split(",").filter((a4) => a4) : [];
27921
27766
  }
27767
+ clearSelection() {
27768
+ this.checkboxTargets.forEach((cb) => cb.checked = false);
27769
+ if (this.hasCheckboxAllTarget) {
27770
+ this.checkboxAllTarget.checked = false;
27771
+ this.checkboxAllTarget.indeterminate = false;
27772
+ }
27773
+ this.updateUI();
27774
+ }
27922
27775
  get checked() {
27923
27776
  return this.checkboxTargets.filter((cb) => cb.checked);
27924
27777
  }
@@ -27929,6 +27782,52 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27929
27782
 
27930
27783
  // src/js/controllers/filter_panel_controller.js
27931
27784
  var filter_panel_controller_default = class extends Controller {
27785
+ static targets = ["panel", "backdrop"];
27786
+ connect() {
27787
+ this._onKeydown = this._onKeydown.bind(this);
27788
+ }
27789
+ disconnect() {
27790
+ if (this.isOpen) {
27791
+ document.removeEventListener("keydown", this._onKeydown);
27792
+ this._unlockBodyScroll();
27793
+ }
27794
+ }
27795
+ toggle() {
27796
+ this.isOpen ? this.close() : this.open();
27797
+ }
27798
+ open() {
27799
+ if (this.hasPanelTarget) {
27800
+ this.panelTarget.setAttribute("data-open", "");
27801
+ this.panelTarget.setAttribute("aria-hidden", "false");
27802
+ }
27803
+ if (this.hasBackdropTarget) this.backdropTarget.setAttribute("data-open", "");
27804
+ this._lockBodyScroll();
27805
+ document.addEventListener("keydown", this._onKeydown);
27806
+ }
27807
+ close() {
27808
+ if (this.hasPanelTarget) {
27809
+ this.panelTarget.removeAttribute("data-open");
27810
+ this.panelTarget.setAttribute("aria-hidden", "true");
27811
+ }
27812
+ if (this.hasBackdropTarget) this.backdropTarget.removeAttribute("data-open");
27813
+ this._unlockBodyScroll();
27814
+ document.removeEventListener("keydown", this._onKeydown);
27815
+ }
27816
+ // Mirrors remote-modal's approach: stash the body's current overflow
27817
+ // and restore it on close. Avoids stomping a value another component
27818
+ // (e.g. an open dialog) may have set.
27819
+ _lockBodyScroll() {
27820
+ if (this._previousBodyOverflow != null) return;
27821
+ this._previousBodyOverflow = document.body.style.overflow;
27822
+ document.body.style.overflow = "hidden";
27823
+ }
27824
+ _unlockBodyScroll() {
27825
+ if (this._previousBodyOverflow == null) return;
27826
+ document.body.style.overflow = this._previousBodyOverflow;
27827
+ this._previousBodyOverflow = null;
27828
+ }
27829
+ // Reset every input under this controller's scope, then submit so the
27830
+ // table reflects the cleared filters immediately.
27932
27831
  clear() {
27933
27832
  this.element.querySelectorAll("input, select, textarea").forEach((input) => {
27934
27833
  if (input.type === "checkbox" || input.type === "radio") {
@@ -27936,23 +27835,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27936
27835
  } else if (input.tagName === "SELECT") {
27937
27836
  input.selectedIndex = 0;
27938
27837
  } else if (input.type === "hidden") {
27939
- if (input.dataset.controller === "flatpickr") {
27940
- input.value = "";
27941
- }
27838
+ if (input.dataset.controller === "flatpickr") input.value = "";
27942
27839
  } else {
27943
27840
  input.value = "";
27944
27841
  }
27945
27842
  });
27946
27843
  this.element.querySelectorAll('[data-controller="flatpickr"]').forEach((input) => {
27947
27844
  const controller = this.application.getControllerForElementAndIdentifier(input, "flatpickr");
27948
- if (controller?.picker) {
27949
- controller.picker.clear();
27950
- }
27845
+ if (controller?.picker) controller.picker.clear();
27951
27846
  });
27952
- const form = this.element.closest("form");
27953
- if (form) {
27954
- form.requestSubmit();
27955
- }
27847
+ const form = this.element.querySelector("form");
27848
+ if (form) form.requestSubmit();
27849
+ }
27850
+ get isOpen() {
27851
+ return this.hasPanelTarget && this.panelTarget.hasAttribute("data-open");
27852
+ }
27853
+ _onKeydown(event) {
27854
+ if (event.key === "Escape") this.close();
27956
27855
  }
27957
27856
  };
27958
27857
 
@@ -28033,6 +27932,221 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28033
27932
  }
28034
27933
  };
28035
27934
 
27935
+ // src/js/controllers/icon_rail_controller.js
27936
+ var icon_rail_controller_default = class extends Controller {
27937
+ static values = {
27938
+ storageKey: { type: String, default: "pu_rail_pinned" }
27939
+ };
27940
+ connect() {
27941
+ const pinned = localStorage.getItem(this.storageKeyValue) === "true";
27942
+ if (pinned) {
27943
+ document.body.classList.add("pu-rail-pinned");
27944
+ }
27945
+ }
27946
+ togglePin() {
27947
+ const pinned = document.body.classList.toggle("pu-rail-pinned");
27948
+ localStorage.setItem(this.storageKeyValue, pinned);
27949
+ }
27950
+ };
27951
+
27952
+ // src/js/controllers/icon_rail_flyout_controller.js
27953
+ var icon_rail_flyout_controller_default = class extends Controller {
27954
+ static targets = ["trigger", "panel"];
27955
+ static values = {
27956
+ closeDelay: { type: Number, default: 150 }
27957
+ };
27958
+ connect() {
27959
+ this._closeTimer = null;
27960
+ this._open = false;
27961
+ this._panel = null;
27962
+ this._panelHome = null;
27963
+ this._onPanelEnter = () => {
27964
+ if (this._closeTimer) {
27965
+ clearTimeout(this._closeTimer);
27966
+ this._closeTimer = null;
27967
+ }
27968
+ };
27969
+ this._onPanelLeave = () => this.scheduleClose();
27970
+ }
27971
+ disconnect() {
27972
+ this._returnPanel();
27973
+ }
27974
+ open() {
27975
+ if (this._closeTimer) {
27976
+ clearTimeout(this._closeTimer);
27977
+ this._closeTimer = null;
27978
+ }
27979
+ if (this._open) return;
27980
+ if (!this._panel && !this.hasPanelTarget) return;
27981
+ this._open = true;
27982
+ this.element.dataset.flyoutOpen = "true";
27983
+ this._portalPanel();
27984
+ this._position();
27985
+ }
27986
+ scheduleClose() {
27987
+ if (this._closeTimer) clearTimeout(this._closeTimer);
27988
+ this._closeTimer = setTimeout(() => this.close(), this.closeDelayValue);
27989
+ }
27990
+ close() {
27991
+ if (!this._open) return;
27992
+ this._open = false;
27993
+ delete this.element.dataset.flyoutOpen;
27994
+ this._returnPanel();
27995
+ }
27996
+ toggle(event) {
27997
+ event.preventDefault();
27998
+ this._open ? this.close() : this.open();
27999
+ }
28000
+ closeOnEsc(event) {
28001
+ if (event.key === "Escape") this.close();
28002
+ }
28003
+ _portalPanel() {
28004
+ if (this._panel) return;
28005
+ const panel = this.panelTarget;
28006
+ if (!panel) return;
28007
+ this._panel = panel;
28008
+ this._panelHome = panel.parentElement;
28009
+ panel.addEventListener("mouseenter", this._onPanelEnter);
28010
+ panel.addEventListener("mouseleave", this._onPanelLeave);
28011
+ document.body.appendChild(panel);
28012
+ panel.style.display = "block";
28013
+ }
28014
+ _returnPanel() {
28015
+ if (!this._panel) return;
28016
+ const panel = this._panel;
28017
+ panel.removeEventListener("mouseenter", this._onPanelEnter);
28018
+ panel.removeEventListener("mouseleave", this._onPanelLeave);
28019
+ panel.style.position = "";
28020
+ panel.style.left = "";
28021
+ panel.style.top = "";
28022
+ panel.style.display = "";
28023
+ if (this._panelHome && document.contains(this._panelHome)) {
28024
+ this._panelHome.appendChild(panel);
28025
+ } else {
28026
+ panel.remove();
28027
+ }
28028
+ this._panel = null;
28029
+ this._panelHome = null;
28030
+ }
28031
+ _position() {
28032
+ if (!this._panel || !this.hasTriggerTarget) return;
28033
+ const panel = this._panel;
28034
+ const triggerRect = this.triggerTarget.getBoundingClientRect();
28035
+ panel.style.position = "fixed";
28036
+ panel.style.left = `${triggerRect.right + 4}px`;
28037
+ panel.style.top = `${triggerRect.top}px`;
28038
+ requestAnimationFrame(() => {
28039
+ const panelRect = panel.getBoundingClientRect();
28040
+ const viewportH = window.innerHeight;
28041
+ if (panelRect.bottom > viewportH - 8) {
28042
+ const overflow = panelRect.bottom - (viewportH - 8);
28043
+ panel.style.top = `${parseFloat(panel.style.top) - overflow}px`;
28044
+ }
28045
+ });
28046
+ }
28047
+ };
28048
+
28049
+ // src/js/controllers/table_header_controller.js
28050
+ var table_header_controller_default = class extends Controller {
28051
+ headerClick(event) {
28052
+ if (!event.shiftKey) return;
28053
+ const link2 = event.currentTarget;
28054
+ const multiHref = link2.dataset.tableHeaderMultiHref;
28055
+ if (!multiHref) return;
28056
+ event.preventDefault();
28057
+ Turbo.visit(multiHref);
28058
+ }
28059
+ };
28060
+
28061
+ // src/js/controllers/table_column_menu_controller.js
28062
+ var table_column_menu_controller_default = class extends Controller {
28063
+ static targets = ["panel"];
28064
+ connect() {
28065
+ this._onDocClick = this._onDocClick.bind(this);
28066
+ }
28067
+ toggle(event) {
28068
+ event.preventDefault();
28069
+ event.stopPropagation();
28070
+ if (this.hasPanelTarget) {
28071
+ const isNowVisible = !this.panelTarget.classList.toggle("hidden");
28072
+ if (isNowVisible) {
28073
+ document.addEventListener("click", this._onDocClick);
28074
+ this._onKey = (e4) => {
28075
+ if (e4.key === "Escape") this._close();
28076
+ };
28077
+ document.addEventListener("keydown", this._onKey);
28078
+ } else {
28079
+ this._unbind();
28080
+ }
28081
+ }
28082
+ }
28083
+ _close() {
28084
+ if (this.hasPanelTarget) this.panelTarget.classList.add("hidden");
28085
+ this._unbind();
28086
+ }
28087
+ _unbind() {
28088
+ document.removeEventListener("click", this._onDocClick);
28089
+ if (this._onKey) {
28090
+ document.removeEventListener("keydown", this._onKey);
28091
+ this._onKey = null;
28092
+ }
28093
+ }
28094
+ _onDocClick(event) {
28095
+ if (!this.element.contains(event.target)) this._close();
28096
+ }
28097
+ };
28098
+
28099
+ // src/js/controllers/capture_url_controller.js
28100
+ var capture_url_controller_default = class extends Controller {
28101
+ connect() {
28102
+ if ("value" in this.element) {
28103
+ this.element.value = window.location.href;
28104
+ }
28105
+ }
28106
+ };
28107
+
28108
+ // src/js/controllers/row_click_controller.js
28109
+ var row_click_controller_default = class extends Controller {
28110
+ click(event) {
28111
+ if (event.target.closest("a, button, input, label, select, textarea, [data-row-click-ignore]")) {
28112
+ return;
28113
+ }
28114
+ this.element.querySelector('[data-row-click-target="show"]')?.click();
28115
+ }
28116
+ };
28117
+
28118
+ // src/js/controllers/view_switcher_controller.js
28119
+ var view_switcher_controller_default = class extends Controller {
28120
+ static values = { cookieName: String, cookiePath: { type: String, default: "/" } };
28121
+ select(event) {
28122
+ const view = event.params.view;
28123
+ if (!view || !this.cookieNameValue) return;
28124
+ const maxAge = 60 * 60 * 24 * 365;
28125
+ const path = this.cookiePathValue || "/";
28126
+ document.cookie = `${this.cookieNameValue}=${encodeURIComponent(view)}; Path=${path}; Max-Age=${maxAge}; SameSite=Lax`;
28127
+ const url = new URL(window.location.href);
28128
+ url.searchParams.delete("view");
28129
+ window.location.href = url.toString();
28130
+ }
28131
+ };
28132
+
28133
+ // src/js/controllers/autosubmit_controller.js
28134
+ var autosubmit_controller_default = class extends Controller {
28135
+ static values = { delay: { type: Number, default: 300 } };
28136
+ connect() {
28137
+ this._timer = null;
28138
+ }
28139
+ disconnect() {
28140
+ if (this._timer) clearTimeout(this._timer);
28141
+ }
28142
+ submit() {
28143
+ if (this._timer) clearTimeout(this._timer);
28144
+ this._timer = setTimeout(() => {
28145
+ this.element.closest("form")?.requestSubmit();
28146
+ }, this.delayValue);
28147
+ }
28148
+ };
28149
+
28036
28150
  // src/js/controllers/register_controllers.js
28037
28151
  function register_controllers_default(application2) {
28038
28152
  application2.register("password-visibility", password_visibility_controller_default);
@@ -28060,6 +28174,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28060
28174
  application2.register("filter-panel", filter_panel_controller_default);
28061
28175
  application2.register("textarea-autogrow", textarea_autogrow_controller_default);
28062
28176
  application2.register("clipboard", clipboard_controller_default);
28177
+ application2.register("icon-rail", icon_rail_controller_default);
28178
+ application2.register("icon-rail-flyout", icon_rail_flyout_controller_default);
28179
+ application2.register("table-header", table_header_controller_default);
28180
+ application2.register("table-column-menu", table_column_menu_controller_default);
28181
+ application2.register("capture-url", capture_url_controller_default);
28182
+ application2.register("row-click", row_click_controller_default);
28183
+ application2.register("view-switcher", view_switcher_controller_default);
28184
+ application2.register("autosubmit", autosubmit_controller_default);
28063
28185
  }
28064
28186
 
28065
28187
  // src/js/turbo/turbo_actions.js
@@ -28068,6 +28190,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28068
28190
  const url = this.getAttribute("url");
28069
28191
  Turbo.visit(url);
28070
28192
  };
28193
+ Turbo.StreamActions.close_frame = function() {
28194
+ const frameId = this.getAttribute("target");
28195
+ if (!frameId) return;
28196
+ const frame = document.getElementById(frameId);
28197
+ if (!frame) return;
28198
+ const dialog = frame.querySelector("dialog");
28199
+ if (dialog && typeof dialog.close === "function") dialog.close();
28200
+ frame.innerHTML = "";
28201
+ frame.removeAttribute("src");
28202
+ };
28203
+ Turbo.StreamActions.reload_frame = function() {
28204
+ const frameId = this.getAttribute("target");
28205
+ if (!frameId) return;
28206
+ const frame = document.getElementById(frameId);
28207
+ if (!frame || typeof frame.reload !== "function") return;
28208
+ frame.reload();
28209
+ };
28071
28210
 
28072
28211
  // src/js/plutonium.js
28073
28212
  var application = Application.start();
@@ -28103,7 +28242,7 @@ cropperjs/dist/cropper.js:
28103
28242
  *)
28104
28243
 
28105
28244
  dompurify/dist/purify.es.mjs:
28106
- (*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *)
28245
+ (*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE *)
28107
28246
 
28108
28247
  @uppy/utils/lib/Translator.js:
28109
28248
  (**