plutonium 0.50.0 → 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.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/skills/plutonium/SKILL.md +85 -102
  3. data/.claude/skills/plutonium-app/SKILL.md +572 -0
  4. data/.claude/skills/plutonium-auth/SKILL.md +163 -300
  5. data/.claude/skills/plutonium-behavior/SKILL.md +838 -0
  6. data/.claude/skills/plutonium-resource/SKILL.md +1176 -0
  7. data/.claude/skills/plutonium-tenancy/SKILL.md +655 -0
  8. data/.claude/skills/plutonium-testing/SKILL.md +6 -5
  9. data/.claude/skills/plutonium-ui/SKILL.md +900 -0
  10. data/CHANGELOG.md +27 -2
  11. data/Rakefile +2 -1
  12. data/app/assets/plutonium.css +1 -11
  13. data/app/assets/plutonium.js +1009 -1214
  14. data/app/assets/plutonium.js.map +3 -3
  15. data/app/assets/plutonium.min.js +52 -51
  16. data/app/assets/plutonium.min.js.map +3 -3
  17. data/docs/.vitepress/config.ts +37 -27
  18. data/docs/getting-started/index.md +22 -29
  19. data/docs/getting-started/installation.md +37 -80
  20. data/docs/getting-started/tutorial/index.md +4 -5
  21. data/docs/guides/adding-resources.md +66 -377
  22. data/docs/guides/authentication.md +94 -463
  23. data/docs/guides/authorization.md +124 -370
  24. data/docs/guides/creating-packages.md +94 -296
  25. data/docs/guides/custom-actions.md +121 -441
  26. data/docs/guides/index.md +22 -42
  27. data/docs/guides/multi-tenancy.md +116 -187
  28. data/docs/guides/nested-resources.md +103 -431
  29. data/docs/guides/search-filtering.md +123 -240
  30. data/docs/guides/testing.md +5 -4
  31. data/docs/guides/theming.md +157 -407
  32. data/docs/guides/troubleshooting.md +5 -3
  33. data/docs/guides/user-invites.md +106 -425
  34. data/docs/guides/user-profile.md +76 -243
  35. data/docs/index.md +1 -1
  36. data/docs/reference/app/generators.md +517 -0
  37. data/docs/reference/app/index.md +158 -0
  38. data/docs/reference/app/packages.md +146 -0
  39. data/docs/reference/app/portals.md +377 -0
  40. data/docs/reference/auth/accounts.md +230 -0
  41. data/docs/reference/auth/index.md +88 -0
  42. data/docs/reference/auth/profile.md +185 -0
  43. data/docs/reference/behavior/controllers.md +395 -0
  44. data/docs/reference/behavior/index.md +22 -0
  45. data/docs/reference/behavior/interactions.md +341 -0
  46. data/docs/reference/behavior/policies.md +417 -0
  47. data/docs/reference/index.md +56 -49
  48. data/docs/reference/resource/actions.md +423 -0
  49. data/docs/reference/resource/definition.md +508 -0
  50. data/docs/reference/resource/index.md +50 -0
  51. data/docs/reference/resource/model.md +348 -0
  52. data/docs/reference/resource/query.md +305 -0
  53. data/docs/reference/tenancy/entity-scoping.md +361 -0
  54. data/docs/reference/tenancy/index.md +36 -0
  55. data/docs/reference/tenancy/invites.md +393 -0
  56. data/docs/reference/tenancy/nested-resources.md +267 -0
  57. data/docs/reference/testing/index.md +287 -0
  58. data/docs/reference/ui/assets.md +400 -0
  59. data/docs/reference/ui/components.md +165 -0
  60. data/docs/reference/ui/displays.md +104 -0
  61. data/docs/reference/ui/forms.md +284 -0
  62. data/docs/reference/ui/index.md +30 -0
  63. data/docs/reference/ui/layouts.md +106 -0
  64. data/docs/reference/ui/pages.md +189 -0
  65. data/docs/reference/ui/tables.md +117 -0
  66. data/docs/superpowers/specs/2026-05-09-typeahead-endpoint-design.md +203 -0
  67. data/docs/superpowers/specs/2026-05-12-skill-compaction-design.md +99 -0
  68. data/docs/superpowers/specs/2026-05-13-docs-restructure-design.md +186 -0
  69. data/gemfiles/rails_7.gemfile.lock +1 -1
  70. data/gemfiles/rails_8.0.gemfile.lock +1 -1
  71. data/gemfiles/rails_8.1.gemfile.lock +1 -1
  72. data/lib/generators/pu/core/update/update_generator.rb +0 -20
  73. data/lib/generators/pu/invites/install_generator.rb +1 -0
  74. data/lib/plutonium/definition/base.rb +1 -1
  75. data/lib/plutonium/definition/{views.rb → index_views.rb} +21 -20
  76. data/lib/plutonium/helpers/turbo_helper.rb +11 -0
  77. data/lib/plutonium/helpers/turbo_stream_actions_helper.rb +14 -0
  78. data/lib/plutonium/resource/controller.rb +1 -0
  79. data/lib/plutonium/resource/controllers/crud_actions.rb +19 -1
  80. data/lib/plutonium/resource/controllers/typeahead.rb +180 -0
  81. data/lib/plutonium/resource/policy.rb +7 -0
  82. data/lib/plutonium/routing/mapper_extensions.rb +15 -0
  83. data/lib/plutonium/ui/component/methods.rb +4 -0
  84. data/lib/plutonium/ui/form/base.rb +6 -2
  85. data/lib/plutonium/ui/form/components/json.rb +58 -0
  86. data/lib/plutonium/ui/form/components/resource_select.rb +62 -8
  87. data/lib/plutonium/ui/form/components/secure_association.rb +98 -22
  88. data/lib/plutonium/ui/form/concerns/typeahead_attributes.rb +83 -0
  89. data/lib/plutonium/ui/form/resource.rb +0 -4
  90. data/lib/plutonium/ui/grid/resource.rb +1 -1
  91. data/lib/plutonium/ui/layout/base.rb +1 -0
  92. data/lib/plutonium/ui/page/base.rb +0 -7
  93. data/lib/plutonium/ui/page/index.rb +4 -4
  94. data/lib/plutonium/ui/table/resource.rb +1 -1
  95. data/lib/plutonium/version.rb +1 -1
  96. data/lib/plutonium.rb +8 -0
  97. data/lib/tasks/release.rake +15 -1
  98. data/package.json +10 -10
  99. data/src/css/slim_select.css +4 -0
  100. data/src/js/controllers/slim_select_controller.js +61 -0
  101. data/src/js/turbo/turbo_actions.js +33 -0
  102. data/yarn.lock +553 -543
  103. metadata +44 -33
  104. data/.claude/skills/plutonium-assets/SKILL.md +0 -512
  105. data/.claude/skills/plutonium-controller/SKILL.md +0 -396
  106. data/.claude/skills/plutonium-create-resource/SKILL.md +0 -303
  107. data/.claude/skills/plutonium-definition/SKILL.md +0 -1223
  108. data/.claude/skills/plutonium-entity-scoping/SKILL.md +0 -317
  109. data/.claude/skills/plutonium-forms/SKILL.md +0 -465
  110. data/.claude/skills/plutonium-installation/SKILL.md +0 -331
  111. data/.claude/skills/plutonium-interaction/SKILL.md +0 -413
  112. data/.claude/skills/plutonium-invites/SKILL.md +0 -408
  113. data/.claude/skills/plutonium-model/SKILL.md +0 -440
  114. data/.claude/skills/plutonium-nested-resources/SKILL.md +0 -360
  115. data/.claude/skills/plutonium-package/SKILL.md +0 -198
  116. data/.claude/skills/plutonium-policy/SKILL.md +0 -456
  117. data/.claude/skills/plutonium-portal/SKILL.md +0 -410
  118. data/.claude/skills/plutonium-views/SKILL.md +0 -651
  119. data/docs/reference/assets/index.md +0 -496
  120. data/docs/reference/controller/index.md +0 -412
  121. data/docs/reference/definition/actions.md +0 -462
  122. data/docs/reference/definition/fields.md +0 -383
  123. data/docs/reference/definition/index.md +0 -326
  124. data/docs/reference/definition/query.md +0 -351
  125. data/docs/reference/generators/index.md +0 -648
  126. data/docs/reference/interaction/index.md +0 -449
  127. data/docs/reference/model/features.md +0 -248
  128. data/docs/reference/model/index.md +0 -218
  129. data/docs/reference/policy/index.md +0 -456
  130. data/docs/reference/portal/index.md +0 -379
  131. data/docs/reference/views/forms.md +0 -411
  132. data/docs/reference/views/index.md +0 -544
@@ -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,12 +13226,9 @@
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);
@@ -13329,8 +13238,7 @@
13329
13238
  if (event) {
13330
13239
  const trigger = event.target.closest("a, form");
13331
13240
  const requested = trigger?.dataset?.turboFrame;
13332
- if (requested && requested !== this.frameTarget.id)
13333
- return;
13241
+ if (requested && requested !== this.frameTarget.id) return;
13334
13242
  }
13335
13243
  this.#loadingStarted();
13336
13244
  }
@@ -13374,17 +13282,14 @@
13374
13282
  this.srcHistory.push(src);
13375
13283
  }
13376
13284
  this.#updateNavigationButtonsDisplay();
13377
- if (this.hasMaximizeLinkTarget)
13378
- this.maximizeLinkTarget.href = src;
13285
+ if (this.hasMaximizeLinkTarget) this.maximizeLinkTarget.href = src;
13379
13286
  }
13380
13287
  #loadingStarted() {
13381
- if (this.hasRefreshButtonTarget)
13382
- this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
13288
+ if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
13383
13289
  this.frameTarget.classList.add("motion-safe:animate-pulse");
13384
13290
  }
13385
13291
  #loadingStopped() {
13386
- if (this.hasRefreshButtonTarget)
13387
- this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
13292
+ if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
13388
13293
  this.frameTarget.classList.remove("motion-safe:animate-pulse");
13389
13294
  }
13390
13295
  #updateNavigationButtonsDisplay() {
@@ -13404,21 +13309,18 @@
13404
13309
  connect() {
13405
13310
  this.applyMode(this.readMode());
13406
13311
  this.handleStorageChange = (e4) => {
13407
- if (e4.key === "theme")
13408
- this.applyMode(this.readMode());
13312
+ if (e4.key === "theme") this.applyMode(this.readMode());
13409
13313
  };
13410
13314
  window.addEventListener("storage", this.handleStorageChange);
13411
13315
  this.mq = window.matchMedia("(prefers-color-scheme: dark)");
13412
13316
  this.handleMqChange = () => {
13413
- if (this.readMode() === "auto")
13414
- this.applyMode("auto");
13317
+ if (this.readMode() === "auto") this.applyMode("auto");
13415
13318
  };
13416
13319
  this.mq.addEventListener("change", this.handleMqChange);
13417
13320
  }
13418
13321
  disconnect() {
13419
13322
  window.removeEventListener("storage", this.handleStorageChange);
13420
- if (this.mq)
13421
- this.mq.removeEventListener("change", this.handleMqChange);
13323
+ if (this.mq) this.mq.removeEventListener("change", this.handleMqChange);
13422
13324
  }
13423
13325
  toggleMode() {
13424
13326
  const current = this.readMode();
@@ -13440,8 +13342,7 @@
13440
13342
  return ORDER.includes(saved) ? saved : "auto";
13441
13343
  }
13442
13344
  effectiveMode(mode) {
13443
- if (mode === "light" || mode === "dark")
13444
- return mode;
13345
+ if (mode === "light" || mode === "dark") return mode;
13445
13346
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
13446
13347
  }
13447
13348
  toggleIcons(mode) {
@@ -13451,30 +13352,64 @@
13451
13352
  dark: this.element.querySelector(".color-mode-icon-dark")
13452
13353
  };
13453
13354
  for (const [key, el] of Object.entries(icons)) {
13454
- if (!el)
13455
- continue;
13355
+ if (!el) continue;
13456
13356
  el.classList.toggle("hidden", key !== mode);
13457
13357
  }
13458
13358
  }
13459
13359
  };
13460
13360
 
13461
13361
  // node_modules/dompurify/dist/purify.es.mjs
13462
- var {
13463
- entries,
13464
- setPrototypeOf,
13465
- isFrozen,
13466
- getPrototypeOf,
13467
- getOwnPropertyDescriptor
13468
- } = Object;
13469
- var {
13470
- freeze,
13471
- seal,
13472
- create
13473
- } = Object;
13474
- var {
13475
- apply,
13476
- construct
13477
- } = 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;
13478
13413
  if (!freeze) {
13479
13414
  freeze = function freeze2(x4) {
13480
13415
  return x4;
@@ -13506,13 +13441,19 @@
13506
13441
  var arrayPop = unapply(Array.prototype.pop);
13507
13442
  var arrayPush = unapply(Array.prototype.push);
13508
13443
  var arraySplice = unapply(Array.prototype.splice);
13444
+ var arrayIsArray = Array.isArray;
13509
13445
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
13510
13446
  var stringToString = unapply(String.prototype.toString);
13511
13447
  var stringMatch = unapply(String.prototype.match);
13512
13448
  var stringReplace = unapply(String.prototype.replace);
13513
13449
  var stringIndexOf = unapply(String.prototype.indexOf);
13514
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);
13515
13455
  var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
13456
+ var objectToString = unapply(Object.prototype.toString);
13516
13457
  var regExpTest = unapply(RegExp.prototype.test);
13517
13458
  var typeErrorCreate = unconstruct(TypeError);
13518
13459
  function unapply(func) {
@@ -13539,6 +13480,9 @@
13539
13480
  if (setPrototypeOf) {
13540
13481
  setPrototypeOf(set, null);
13541
13482
  }
13483
+ if (!arrayIsArray(array)) {
13484
+ return set;
13485
+ }
13542
13486
  let l4 = array.length;
13543
13487
  while (l4--) {
13544
13488
  let element = array[l4];
@@ -13566,10 +13510,13 @@
13566
13510
  }
13567
13511
  function clone(object) {
13568
13512
  const newObject = create(null);
13569
- 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];
13570
13517
  const isPropertyExist = objectHasOwnProperty(object, property);
13571
13518
  if (isPropertyExist) {
13572
- if (Array.isArray(value)) {
13519
+ if (arrayIsArray(value)) {
13573
13520
  newObject[property] = cleanArray(value);
13574
13521
  } else if (value && typeof value === "object" && value.constructor === Object) {
13575
13522
  newObject[property] = clone(value);
@@ -13580,6 +13527,44 @@
13580
13527
  }
13581
13528
  return newObject;
13582
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
+ }
13583
13568
  function lookupGetter(object, prop) {
13584
13569
  while (object !== null) {
13585
13570
  const desc = getOwnPropertyDescriptor(object, prop);
@@ -13598,6 +13583,14 @@
13598
13583
  }
13599
13584
  return fallbackValue;
13600
13585
  }
13586
+ function isRegex(value) {
13587
+ try {
13588
+ regExpTest(value, "");
13589
+ return true;
13590
+ } catch (_unused) {
13591
+ return false;
13592
+ }
13593
+ }
13601
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"]);
13602
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"]);
13603
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"]);
@@ -13605,13 +13598,13 @@
13605
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"]);
13606
13599
  var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
13607
13600
  var text = freeze(["#text"]);
13608
- 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"]);
13609
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"]);
13610
- 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"]);
13611
13604
  var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
13612
- var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
13613
- var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
13614
- 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);
13615
13608
  var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
13616
13609
  var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
13617
13610
  var IS_ALLOWED_URI = seal(
@@ -13625,35 +13618,13 @@
13625
13618
  );
13626
13619
  var DOCTYPE_NAME = seal(/^html$/i);
13627
13620
  var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
13628
- var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
13629
- __proto__: null,
13630
- ARIA_ATTR,
13631
- ATTR_WHITESPACE,
13632
- CUSTOM_ELEMENT,
13633
- DATA_ATTR,
13634
- DOCTYPE_NAME,
13635
- ERB_EXPR,
13636
- IS_ALLOWED_URI,
13637
- IS_SCRIPT_OR_DATA,
13638
- MUSTACHE_EXPR,
13639
- TMPLIT_EXPR
13640
- });
13641
13621
  var NODE_TYPE = {
13642
13622
  element: 1,
13643
- attribute: 2,
13644
13623
  text: 3,
13645
- cdataSection: 4,
13646
- entityReference: 5,
13647
- // Deprecated
13648
- entityNode: 6,
13649
13624
  // Deprecated
13650
13625
  progressingInstruction: 7,
13651
13626
  comment: 8,
13652
- document: 9,
13653
- documentType: 10,
13654
- documentFragment: 11,
13655
- notation: 12
13656
- // Deprecated
13627
+ document: 9
13657
13628
  };
13658
13629
  var getGlobal = function getGlobal2() {
13659
13630
  return typeof window === "undefined" ? null : window;
@@ -13698,28 +13669,16 @@
13698
13669
  function createDOMPurify() {
13699
13670
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
13700
13671
  const DOMPurify = (root) => createDOMPurify(root);
13701
- DOMPurify.version = "3.3.1";
13672
+ DOMPurify.version = "3.4.3";
13702
13673
  DOMPurify.removed = [];
13703
13674
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
13704
13675
  DOMPurify.isSupported = false;
13705
13676
  return DOMPurify;
13706
13677
  }
13707
- let {
13708
- document: document2
13709
- } = window2;
13678
+ let document2 = window2.document;
13710
13679
  const originalDocument = document2;
13711
13680
  const currentScript = originalDocument.currentScript;
13712
- const {
13713
- DocumentFragment,
13714
- HTMLTemplateElement: HTMLTemplateElement2,
13715
- Node: Node2,
13716
- Element: Element2,
13717
- NodeFilter,
13718
- NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
13719
- HTMLFormElement: HTMLFormElement2,
13720
- DOMParser: DOMParser2,
13721
- trustedTypes
13722
- } = 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;
13723
13682
  const ElementPrototype = Element2.prototype;
13724
13683
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
13725
13684
  const remove = lookupGetter(ElementPrototype, "remove");
@@ -13734,30 +13693,12 @@
13734
13693
  }
13735
13694
  let trustedTypesPolicy;
13736
13695
  let emptyHTML = "";
13737
- const {
13738
- implementation,
13739
- createNodeIterator,
13740
- createDocumentFragment: createDocumentFragment2,
13741
- getElementsByTagName
13742
- } = document2;
13743
- const {
13744
- importNode
13745
- } = originalDocument;
13696
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment2 = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
13697
+ const importNode = originalDocument.importNode;
13746
13698
  let hooks = _createHooksMap();
13747
13699
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode2 === "function" && implementation && implementation.createHTMLDocument !== void 0;
13748
- const {
13749
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
13750
- ERB_EXPR: ERB_EXPR2,
13751
- TMPLIT_EXPR: TMPLIT_EXPR2,
13752
- DATA_ATTR: DATA_ATTR2,
13753
- ARIA_ATTR: ARIA_ATTR2,
13754
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
13755
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
13756
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
13757
- } = EXPRESSIONS;
13758
- let {
13759
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
13760
- } = 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;
13761
13702
  let ALLOWED_TAGS = null;
13762
13703
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
13763
13704
  let ALLOWED_ATTR = null;
@@ -13853,15 +13794,15 @@
13853
13794
  PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
13854
13795
  SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
13855
13796
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
13856
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
13857
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
13858
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
13859
- 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;
13860
- 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;
13861
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
13862
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
13863
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
13864
- 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;
13865
13806
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
13866
13807
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
13867
13808
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
@@ -13877,19 +13818,20 @@
13877
13818
  SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
13878
13819
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
13879
13820
  IN_PLACE = cfg.IN_PLACE || false;
13880
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
13881
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
13882
- MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
13883
- HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
13884
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
13885
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
13886
- 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;
13887
13829
  }
13888
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
13889
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
13830
+ if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
13831
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
13890
13832
  }
13891
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
13892
- 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;
13893
13835
  }
13894
13836
  if (SAFE_FOR_TEMPLATES) {
13895
13837
  ALLOW_DATA_ATTR = false;
@@ -13899,7 +13841,7 @@
13899
13841
  }
13900
13842
  if (USE_PROFILES) {
13901
13843
  ALLOWED_TAGS = addToSet({}, text);
13902
- ALLOWED_ATTR = [];
13844
+ ALLOWED_ATTR = create(null);
13903
13845
  if (USE_PROFILES.html === true) {
13904
13846
  addToSet(ALLOWED_TAGS, html$1);
13905
13847
  addToSet(ALLOWED_ATTR, html);
@@ -13920,36 +13862,38 @@
13920
13862
  addToSet(ALLOWED_ATTR, xml);
13921
13863
  }
13922
13864
  }
13923
- if (cfg.ADD_TAGS) {
13865
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
13866
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
13867
+ if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
13924
13868
  if (typeof cfg.ADD_TAGS === "function") {
13925
13869
  EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
13926
- } else {
13870
+ } else if (arrayIsArray(cfg.ADD_TAGS)) {
13927
13871
  if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
13928
13872
  ALLOWED_TAGS = clone(ALLOWED_TAGS);
13929
13873
  }
13930
13874
  addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
13931
13875
  }
13932
13876
  }
13933
- if (cfg.ADD_ATTR) {
13877
+ if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
13934
13878
  if (typeof cfg.ADD_ATTR === "function") {
13935
13879
  EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
13936
- } else {
13880
+ } else if (arrayIsArray(cfg.ADD_ATTR)) {
13937
13881
  if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
13938
13882
  ALLOWED_ATTR = clone(ALLOWED_ATTR);
13939
13883
  }
13940
13884
  addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
13941
13885
  }
13942
13886
  }
13943
- if (cfg.ADD_URI_SAFE_ATTR) {
13887
+ if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
13944
13888
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
13945
13889
  }
13946
- if (cfg.FORBID_CONTENTS) {
13890
+ if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
13947
13891
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
13948
13892
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
13949
13893
  }
13950
13894
  addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
13951
13895
  }
13952
- if (cfg.ADD_FORBID_CONTENTS) {
13896
+ if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
13953
13897
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
13954
13898
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
13955
13899
  }
@@ -14142,6 +14086,10 @@
14142
14086
  _forceRemove(currentNode);
14143
14087
  return true;
14144
14088
  }
14089
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
14090
+ _forceRemove(currentNode);
14091
+ return true;
14092
+ }
14145
14093
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
14146
14094
  _forceRemove(currentNode);
14147
14095
  return true;
@@ -14150,7 +14098,7 @@
14150
14098
  _forceRemove(currentNode);
14151
14099
  return true;
14152
14100
  }
14153
- 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]) {
14154
14102
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
14155
14103
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
14156
14104
  return false;
@@ -14164,9 +14112,8 @@
14164
14112
  const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
14165
14113
  if (childNodes && parentNode) {
14166
14114
  const childCount = childNodes.length;
14167
- for (let i5 = childCount - 1; i5 >= 0; --i5) {
14168
- const childClone = cloneNode(childNodes[i5], true);
14169
- childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
14115
+ for (let i4 = childCount - 1; i4 >= 0; --i4) {
14116
+ const childClone = cloneNode(childNodes[i4], true);
14170
14117
  parentNode.insertBefore(childClone, getNextSibling(currentNode));
14171
14118
  }
14172
14119
  }
@@ -14184,7 +14131,7 @@
14184
14131
  }
14185
14132
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
14186
14133
  content = currentNode.textContent;
14187
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14134
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14188
14135
  content = stringReplace(content, expr, " ");
14189
14136
  });
14190
14137
  if (currentNode.textContent !== content) {
@@ -14198,16 +14145,16 @@
14198
14145
  return false;
14199
14146
  };
14200
14147
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
14148
+ if (FORBID_ATTR[lcName]) {
14149
+ return false;
14150
+ }
14201
14151
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
14202
14152
  return false;
14203
14153
  }
14204
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName))
14205
- ;
14206
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName))
14207
- ;
14208
- else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag))
14209
- ;
14210
- 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]) {
14211
14158
  if (
14212
14159
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
14213
14160
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
@@ -14215,33 +14162,26 @@
14215
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
14216
14163
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
14217
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))
14218
- )
14219
- ;
14165
+ ) ;
14220
14166
  else {
14221
14167
  return false;
14222
14168
  }
14223
- } else if (URI_SAFE_ATTRIBUTES[lcName])
14224
- ;
14225
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, "")))
14226
- ;
14227
- else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag])
14228
- ;
14229
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, "")))
14230
- ;
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, ""))) ;
14231
14173
  else if (value) {
14232
14174
  return false;
14233
- } else
14234
- ;
14175
+ } else ;
14235
14176
  return true;
14236
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"]);
14237
14179
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
14238
- return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
14180
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
14239
14181
  };
14240
14182
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
14241
14183
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
14242
- const {
14243
- attributes
14244
- } = currentNode;
14184
+ const attributes = currentNode.attributes;
14245
14185
  if (!attributes || _isClobbered(currentNode)) {
14246
14186
  return;
14247
14187
  }
@@ -14255,11 +14195,7 @@
14255
14195
  let l4 = attributes.length;
14256
14196
  while (l4--) {
14257
14197
  const attr = attributes[l4];
14258
- const {
14259
- name,
14260
- namespaceURI,
14261
- value: attrValue
14262
- } = attr;
14198
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
14263
14199
  const lcName = transformCaseFunc(name);
14264
14200
  const initValue = attrValue;
14265
14201
  let value = name === "value" ? initValue : stringTrim(initValue);
@@ -14269,11 +14205,11 @@
14269
14205
  hookEvent.forceKeepAttr = void 0;
14270
14206
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
14271
14207
  value = hookEvent.attrValue;
14272
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
14208
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
14273
14209
  _removeAttribute(name, currentNode);
14274
14210
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
14275
14211
  }
14276
- 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)) {
14277
14213
  _removeAttribute(name, currentNode);
14278
14214
  continue;
14279
14215
  }
@@ -14293,7 +14229,7 @@
14293
14229
  continue;
14294
14230
  }
14295
14231
  if (SAFE_FOR_TEMPLATES) {
14296
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14232
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14297
14233
  value = stringReplace(value, expr, " ");
14298
14234
  });
14299
14235
  }
@@ -14303,8 +14239,7 @@
14303
14239
  continue;
14304
14240
  }
14305
14241
  if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
14306
- if (namespaceURI)
14307
- ;
14242
+ if (namespaceURI) ;
14308
14243
  else {
14309
14244
  switch (trustedTypes.getAttributeType(lcTag, lcName)) {
14310
14245
  case "TrustedHTML": {
@@ -14337,7 +14272,7 @@
14337
14272
  }
14338
14273
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
14339
14274
  };
14340
- const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
14275
+ const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
14341
14276
  let shadowNode = null;
14342
14277
  const shadowIterator = _createNodeIterator(fragment);
14343
14278
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -14351,6 +14286,24 @@
14351
14286
  }
14352
14287
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
14353
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
+ };
14354
14307
  DOMPurify.sanitize = function(dirty) {
14355
14308
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
14356
14309
  let body = null;
@@ -14362,13 +14315,9 @@
14362
14315
  dirty = "<!-->";
14363
14316
  }
14364
14317
  if (typeof dirty !== "string" && !_isNode(dirty)) {
14365
- if (typeof dirty.toString === "function") {
14366
- dirty = dirty.toString();
14367
- if (typeof dirty !== "string") {
14368
- throw typeErrorCreate("dirty is not a string, aborting");
14369
- }
14370
- } else {
14371
- 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");
14372
14321
  }
14373
14322
  }
14374
14323
  if (!DOMPurify.isSupported) {
@@ -14382,12 +14331,14 @@
14382
14331
  IN_PLACE = false;
14383
14332
  }
14384
14333
  if (IN_PLACE) {
14385
- if (dirty.nodeName) {
14386
- const tagName = transformCaseFunc(dirty.nodeName);
14334
+ const nn2 = dirty.nodeName;
14335
+ if (typeof nn2 === "string") {
14336
+ const tagName = transformCaseFunc(nn2);
14387
14337
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
14388
14338
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
14389
14339
  }
14390
14340
  }
14341
+ _sanitizeAttachedShadowRoots2(dirty);
14391
14342
  } else if (dirty instanceof Node2) {
14392
14343
  body = _initDocument("<!---->");
14393
14344
  importedNode = body.ownerDocument.importNode(dirty, true);
@@ -14398,6 +14349,7 @@
14398
14349
  } else {
14399
14350
  body.appendChild(importedNode);
14400
14351
  }
14352
+ _sanitizeAttachedShadowRoots2(importedNode);
14401
14353
  } else {
14402
14354
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
14403
14355
  dirty.indexOf("<") === -1) {
@@ -14416,13 +14368,21 @@
14416
14368
  _sanitizeElements(currentNode);
14417
14369
  _sanitizeAttributes(currentNode);
14418
14370
  if (currentNode.content instanceof DocumentFragment) {
14419
- _sanitizeShadowDOM(currentNode.content);
14371
+ _sanitizeShadowDOM2(currentNode.content);
14420
14372
  }
14421
14373
  }
14422
14374
  if (IN_PLACE) {
14423
14375
  return dirty;
14424
14376
  }
14425
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
+ }
14426
14386
  if (RETURN_DOM_FRAGMENT) {
14427
14387
  returnNode = createDocumentFragment2.call(body.ownerDocument);
14428
14388
  while (body.firstChild) {
@@ -14441,7 +14401,7 @@
14441
14401
  serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
14442
14402
  }
14443
14403
  if (SAFE_FOR_TEMPLATES) {
14444
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14404
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14445
14405
  serializedHTML = stringReplace(serializedHTML, expr, " ");
14446
14406
  });
14447
14407
  }
@@ -14751,7 +14711,7 @@
14751
14711
  return " |";
14752
14712
  }
14753
14713
  }), cells = row.split(other.splitPipe);
14754
- let i5 = 0;
14714
+ let i4 = 0;
14755
14715
  if (!cells[0].trim()) {
14756
14716
  cells.shift();
14757
14717
  }
@@ -14766,8 +14726,8 @@
14766
14726
  cells.push("");
14767
14727
  }
14768
14728
  }
14769
- for (; i5 < cells.length; i5++) {
14770
- cells[i5] = cells[i5].trim().replace(other.slashPipe, "|");
14729
+ for (; i4 < cells.length; i4++) {
14730
+ cells[i4] = cells[i4].trim().replace(other.slashPipe, "|");
14771
14731
  }
14772
14732
  return cells;
14773
14733
  }
@@ -14792,15 +14752,15 @@
14792
14752
  return -1;
14793
14753
  }
14794
14754
  let level = 0;
14795
- for (let i5 = 0; i5 < str.length; i5++) {
14796
- if (str[i5] === "\\") {
14797
- i5++;
14798
- } 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]) {
14799
14759
  level++;
14800
- } else if (str[i5] === b3[1]) {
14760
+ } else if (str[i4] === b3[1]) {
14801
14761
  level--;
14802
14762
  if (level < 0) {
14803
- return i5;
14763
+ return i4;
14804
14764
  }
14805
14765
  }
14806
14766
  }
@@ -14932,18 +14892,18 @@
14932
14892
  while (lines.length > 0) {
14933
14893
  let inBlockquote = false;
14934
14894
  const currentLines = [];
14935
- let i5;
14936
- for (i5 = 0; i5 < lines.length; i5++) {
14937
- if (this.rules.other.blockquoteStart.test(lines[i5])) {
14938
- 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]);
14939
14899
  inBlockquote = true;
14940
14900
  } else if (!inBlockquote) {
14941
- currentLines.push(lines[i5]);
14901
+ currentLines.push(lines[i4]);
14942
14902
  } else {
14943
14903
  break;
14944
14904
  }
14945
14905
  }
14946
- lines = lines.slice(i5);
14906
+ lines = lines.slice(i4);
14947
14907
  const currentRaw = currentLines.join("\n");
14948
14908
  const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
14949
14909
  raw = raw ? `${raw}
@@ -15132,18 +15092,18 @@ ${currentText}` : currentText;
15132
15092
  return;
15133
15093
  }
15134
15094
  list2.raw = list2.raw.trimEnd();
15135
- for (let i5 = 0; i5 < list2.items.length; i5++) {
15095
+ for (let i4 = 0; i4 < list2.items.length; i4++) {
15136
15096
  this.lexer.state.top = false;
15137
- list2.items[i5].tokens = this.lexer.blockTokens(list2.items[i5].text, []);
15097
+ list2.items[i4].tokens = this.lexer.blockTokens(list2.items[i4].text, []);
15138
15098
  if (!list2.loose) {
15139
- const spacers = list2.items[i5].tokens.filter((t4) => t4.type === "space");
15099
+ const spacers = list2.items[i4].tokens.filter((t4) => t4.type === "space");
15140
15100
  const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t4) => this.rules.other.anyLine.test(t4.raw));
15141
15101
  list2.loose = hasMultipleLineBreaks;
15142
15102
  }
15143
15103
  }
15144
15104
  if (list2.loose) {
15145
- for (let i5 = 0; i5 < list2.items.length; i5++) {
15146
- list2.items[i5].loose = true;
15105
+ for (let i4 = 0; i4 < list2.items.length; i4++) {
15106
+ list2.items[i4].loose = true;
15147
15107
  }
15148
15108
  }
15149
15109
  return list2;
@@ -15209,21 +15169,21 @@ ${currentText}` : currentText;
15209
15169
  item.align.push(null);
15210
15170
  }
15211
15171
  }
15212
- for (let i5 = 0; i5 < headers.length; i5++) {
15172
+ for (let i4 = 0; i4 < headers.length; i4++) {
15213
15173
  item.header.push({
15214
- text: headers[i5],
15215
- tokens: this.lexer.inline(headers[i5]),
15174
+ text: headers[i4],
15175
+ tokens: this.lexer.inline(headers[i4]),
15216
15176
  header: true,
15217
- align: item.align[i5]
15177
+ align: item.align[i4]
15218
15178
  });
15219
15179
  }
15220
15180
  for (const row of rows) {
15221
- item.rows.push(splitCells(row, item.header.length).map((cell, i5) => {
15181
+ item.rows.push(splitCells(row, item.header.length).map((cell, i4) => {
15222
15182
  return {
15223
15183
  text: cell,
15224
15184
  tokens: this.lexer.inline(cell),
15225
15185
  header: false,
15226
- align: item.align[i5]
15186
+ align: item.align[i4]
15227
15187
  };
15228
15188
  }));
15229
15189
  }
@@ -15589,8 +15549,8 @@ ${currentText}` : currentText;
15589
15549
  lex(src) {
15590
15550
  src = src.replace(other.carriageReturn, "\n");
15591
15551
  this.blockTokens(src, this.tokens);
15592
- for (let i5 = 0; i5 < this.inlineQueue.length; i5++) {
15593
- const next = this.inlineQueue[i5];
15552
+ for (let i4 = 0; i4 < this.inlineQueue.length; i4++) {
15553
+ const next = this.inlineQueue[i4];
15594
15554
  this.inlineTokens(next.src, next.tokens);
15595
15555
  }
15596
15556
  this.inlineQueue = [];
@@ -16109,8 +16069,8 @@ ${text2}</tr>
16109
16069
  */
16110
16070
  parse(tokens, top2 = true) {
16111
16071
  let out = "";
16112
- for (let i5 = 0; i5 < tokens.length; i5++) {
16113
- const anyToken = tokens[i5];
16072
+ for (let i4 = 0; i4 < tokens.length; i4++) {
16073
+ const anyToken = tokens[i4];
16114
16074
  if (this.options.extensions?.renderers?.[anyToken.type]) {
16115
16075
  const genericToken = anyToken;
16116
16076
  const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
@@ -16160,8 +16120,8 @@ ${text2}</tr>
16160
16120
  case "text": {
16161
16121
  let textToken = token;
16162
16122
  let body = this.renderer.text(textToken);
16163
- while (i5 + 1 < tokens.length && tokens[i5 + 1].type === "text") {
16164
- textToken = tokens[++i5];
16123
+ while (i4 + 1 < tokens.length && tokens[i4 + 1].type === "text") {
16124
+ textToken = tokens[++i4];
16165
16125
  body += "\n" + this.renderer.text(textToken);
16166
16126
  }
16167
16127
  if (top2) {
@@ -16194,8 +16154,8 @@ ${text2}</tr>
16194
16154
  */
16195
16155
  parseInline(tokens, renderer = this.renderer) {
16196
16156
  let out = "";
16197
- for (let i5 = 0; i5 < tokens.length; i5++) {
16198
- const anyToken = tokens[i5];
16157
+ for (let i4 = 0; i4 < tokens.length; i4++) {
16158
+ const anyToken = tokens[i4];
16199
16159
  if (this.options.extensions?.renderers?.[anyToken.type]) {
16200
16160
  const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
16201
16161
  if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
@@ -16620,8 +16580,7 @@ ${text2}</tr>
16620
16580
  var easymde_controller_default = class extends Controller {
16621
16581
  static targets = ["textarea"];
16622
16582
  connect() {
16623
- if (this.easyMDE)
16624
- return;
16583
+ if (this.easyMDE) return;
16625
16584
  this.originalValue = this.element.value;
16626
16585
  this.easyMDE = new EasyMDE(this.#buildOptions());
16627
16586
  this.element.addEventListener("turbo:before-morph-element", (event) => {
@@ -16648,8 +16607,7 @@ ${text2}</tr>
16648
16607
  }
16649
16608
  }
16650
16609
  #handleMorph() {
16651
- if (!this.element.isConnected)
16652
- return;
16610
+ if (!this.element.isConnected) return;
16653
16611
  if (this.easyMDE) {
16654
16612
  this.easyMDE = null;
16655
16613
  }
@@ -16687,9 +16645,12 @@ ${text2}</tr>
16687
16645
 
16688
16646
  // src/js/controllers/slim_select_controller.js
16689
16647
  var slim_select_controller_default = class extends Controller {
16648
+ static values = {
16649
+ typeaheadUrl: String,
16650
+ typeaheadDebounceMs: { type: Number, default: 200 }
16651
+ };
16690
16652
  connect() {
16691
- if (this.slimSelect)
16692
- return;
16653
+ if (this.slimSelect) return;
16693
16654
  this.#setupSlimSelect();
16694
16655
  this.element.addEventListener("turbo:morph-element", (event) => {
16695
16656
  if (event.target === this.element && !this.morphing) {
@@ -16721,9 +16682,14 @@ ${text2}</tr>
16721
16682
  settings.contentPosition = "absolute";
16722
16683
  settings.openPosition = "auto";
16723
16684
  }
16685
+ const events = {};
16686
+ if (this.hasTypeaheadUrlValue && this.typeaheadUrlValue) {
16687
+ events.search = (search, currentData) => this.#typeaheadFetch(search, currentData);
16688
+ }
16724
16689
  this.slimSelect = new SlimSelect({
16725
16690
  select: this.element,
16726
- settings
16691
+ settings,
16692
+ events
16727
16693
  });
16728
16694
  this.handleDropdownPosition();
16729
16695
  this.boundHandleDropdownOpen = this.handleDropdownOpen.bind(this);
@@ -16811,9 +16777,44 @@ ${text2}</tr>
16811
16777
  disconnect() {
16812
16778
  this.#cleanupSlimSelect();
16813
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
+ }
16814
16816
  #handleMorph() {
16815
- if (!this.element.isConnected)
16816
- return;
16817
+ if (!this.element.isConnected) return;
16817
16818
  this.#cleanupSlimSelect();
16818
16819
  this.#setupSlimSelect();
16819
16820
  }
@@ -16859,8 +16860,7 @@ ${text2}</tr>
16859
16860
  // src/js/controllers/flatpickr_controller.js
16860
16861
  var flatpickr_controller_default = class extends Controller {
16861
16862
  connect() {
16862
- if (this.picker)
16863
- return;
16863
+ if (this.picker) return;
16864
16864
  this.modal = document.querySelector("[data-controller=remote-modal]");
16865
16865
  this.picker = new flatpickr(this.element, this.#buildOptions());
16866
16866
  this.element.addEventListener("turbo:morph-element", (event) => {
@@ -16880,8 +16880,7 @@ ${text2}</tr>
16880
16880
  }
16881
16881
  }
16882
16882
  #handleMorph() {
16883
- if (!this.element.isConnected)
16884
- return;
16883
+ if (!this.element.isConnected) return;
16885
16884
  if (this.picker) {
16886
16885
  this.picker.destroy();
16887
16886
  this.picker = null;
@@ -16928,8 +16927,7 @@ ${text2}</tr>
16928
16927
  this.inputTargetDisconnected();
16929
16928
  }
16930
16929
  inputTargetConnected() {
16931
- if (!this.hasInputTarget || this.iti)
16932
- return;
16930
+ if (!this.hasInputTarget || this.iti) return;
16933
16931
  this.iti = window.intlTelInput(this.inputTarget, this.#buildOptions());
16934
16932
  this.element.addEventListener("turbo:morph-element", (event) => {
16935
16933
  if (event.target === this.element && !this.morphing) {
@@ -16948,8 +16946,7 @@ ${text2}</tr>
16948
16946
  }
16949
16947
  }
16950
16948
  #handleMorph() {
16951
- if (!this.inputTarget || !this.inputTarget.isConnected)
16952
- return;
16949
+ if (!this.inputTarget || !this.inputTarget.isConnected) return;
16953
16950
  if (this.iti) {
16954
16951
  this.iti.destroy();
16955
16952
  this.iti = null;
@@ -17004,8 +17001,7 @@ ${text2}</tr>
17004
17001
  }
17005
17002
  _syncFromHash() {
17006
17003
  const id2 = this.#buttonIdFromHash();
17007
- if (id2)
17008
- this.#selectInternal(id2, { skipFocus: true, skipHashUpdate: true });
17004
+ if (id2) this.#selectInternal(id2, { skipFocus: true, skipHashUpdate: true });
17009
17005
  }
17010
17006
  select(event) {
17011
17007
  this.#selectInternal(event.currentTarget.id);
@@ -17037,8 +17033,7 @@ ${text2}</tr>
17037
17033
  selectedBtn.classList.add(...this.activeClasses);
17038
17034
  selectedTab.hidden = false;
17039
17035
  selectedTab.setAttribute("aria-hidden", "false");
17040
- if (!options2.skipHashUpdate)
17041
- this.#updateHash(id2);
17036
+ if (!options2.skipHashUpdate) this.#updateHash(id2);
17042
17037
  if (!options2.skipFocus && selectedBtn !== document.activeElement) {
17043
17038
  selectedBtn.focus();
17044
17039
  }
@@ -17047,8 +17042,7 @@ ${text2}</tr>
17047
17042
  // the identifier (e.g., #details, #orders).
17048
17043
  #buttonIdFromHash() {
17049
17044
  const hash3 = window.location.hash.replace(/^#/, "");
17050
- if (!hash3)
17051
- return null;
17045
+ if (!hash3) return null;
17052
17046
  const candidateId = `${hash3}-tab`;
17053
17047
  const exists = this.btnTargets.some((btn) => btn.id === candidateId);
17054
17048
  return exists ? candidateId : null;
@@ -17069,11 +17063,11 @@ ${text2}</tr>
17069
17063
  if (typeof chunk !== "string") {
17070
17064
  return newParts.push(chunk);
17071
17065
  }
17072
- return rx[Symbol.split](chunk).forEach((raw, i5, list2) => {
17066
+ return rx[Symbol.split](chunk).forEach((raw, i4, list2) => {
17073
17067
  if (raw !== "") {
17074
17068
  newParts.push(raw);
17075
17069
  }
17076
- if (i5 < list2.length - 1) {
17070
+ if (i4 < list2.length - 1) {
17077
17071
  newParts.push(replacement);
17078
17072
  }
17079
17073
  });
@@ -17306,24 +17300,20 @@ ${text2}</tr>
17306
17300
  var y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
17307
17301
  var d = Array.isArray;
17308
17302
  function w(n3, l4) {
17309
- for (var u5 in l4)
17310
- n3[u5] = l4[u5];
17303
+ for (var u5 in l4) n3[u5] = l4[u5];
17311
17304
  return n3;
17312
17305
  }
17313
17306
  function g(n3) {
17314
17307
  n3 && n3.parentNode && n3.parentNode.removeChild(n3);
17315
17308
  }
17316
17309
  function _(l4, u5, t4) {
17317
- var i5, o4, r4, e4 = {};
17318
- for (r4 in u5)
17319
- "key" == r4 ? i5 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : e4[r4] = u5[r4];
17320
- if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps)
17321
- for (r4 in l4.defaultProps)
17322
- void 0 === e4[r4] && (e4[r4] = l4.defaultProps[r4]);
17323
- return m(l4, e4, i5, o4, null);
17324
- }
17325
- function m(n3, t4, i5, o4, r4) {
17326
- 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 };
17327
17317
  return null == r4 && null != l.vnode && l.vnode(e4), e4;
17328
17318
  }
17329
17319
  function b() {
@@ -17336,21 +17326,17 @@ ${text2}</tr>
17336
17326
  this.props = n3, this.context = l4;
17337
17327
  }
17338
17328
  function S(n3, l4) {
17339
- if (null == l4)
17340
- return n3.__ ? S(n3.__, n3.__i + 1) : null;
17341
- for (var u5; l4 < n3.__k.length; l4++)
17342
- if (null != (u5 = n3.__k[l4]) && null != u5.__e)
17343
- 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;
17344
17331
  return "function" == typeof n3.type ? S(n3) : null;
17345
17332
  }
17346
17333
  function C(n3) {
17347
17334
  var l4, u5;
17348
17335
  if (null != (n3 = n3.__) && null != n3.__c) {
17349
- for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++)
17350
- if (null != (u5 = n3.__k[l4]) && null != u5.__e) {
17351
- n3.__e = n3.__c.base = u5.__e;
17352
- break;
17353
- }
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
+ }
17354
17340
  return C(n3);
17355
17341
  }
17356
17342
  }
@@ -17358,30 +17344,24 @@ ${text2}</tr>
17358
17344
  (!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || o != l.debounceRendering) && ((o = l.debounceRendering) || r)($);
17359
17345
  }
17360
17346
  function $() {
17361
- for (var n3, u5, t4, o4, r4, f5, c4, s4 = 1; i.length; )
17362
- 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)));
17363
17348
  $.__r = 0;
17364
17349
  }
17365
- 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) {
17366
17351
  var a4, h4, y4, d4, w4, g5, _4, m4 = t4 && t4.__k || v, b3 = l4.length;
17367
- for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++)
17368
- 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);
17369
17353
  return u5.__e = w4, f5;
17370
17354
  }
17371
- function P(n3, l4, u5, t4, i5) {
17355
+ function P(n3, l4, u5, t4, i4) {
17372
17356
  var o4, r4, e4, f5, c4, s4 = u5.length, a4 = s4, h4 = 0;
17373
- for (n3.__k = new Array(i5), o4 = 0; o4 < i5; o4++)
17374
- 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;
17375
- if (a4)
17376
- for (o4 = 0; o4 < s4; o4++)
17377
- 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));
17378
17359
  return t4;
17379
17360
  }
17380
17361
  function A(n3, l4, u5, t4) {
17381
- var i5, o4;
17362
+ var i4, o4;
17382
17363
  if ("function" == typeof n3.type) {
17383
- for (i5 = n3.__k, o4 = 0; i5 && o4 < i5.length; o4++)
17384
- 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));
17385
17365
  return l4;
17386
17366
  }
17387
17367
  n3.__e != l4 && (t4 && (l4 && n3.type && !l4.parentNode && (l4 = S(n3)), u5.insertBefore(n3.__e, l4 || null)), l4 = n3.__e);
@@ -17396,116 +17376,88 @@ ${text2}</tr>
17396
17376
  }) : l4.push(n3)), l4;
17397
17377
  }
17398
17378
  function L(n3, l4, u5, t4) {
17399
- var i5, o4, r4, e4 = n3.key, f5 = n3.type, c4 = l4[u5], s4 = null != c4 && 0 == (2 & c4.__u);
17400
- if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type)
17401
- 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;
17402
17381
  if (t4 > (s4 ? 1 : 0)) {
17403
- for (i5 = u5 - 1, o4 = u5 + 1; i5 >= 0 || o4 < l4.length; )
17404
- if (null != (c4 = l4[r4 = i5 >= 0 ? i5-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type)
17405
- 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;
17406
17383
  }
17407
17384
  return -1;
17408
17385
  }
17409
17386
  function T(n3, l4, u5) {
17410
17387
  "-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 || y.test(l4) ? u5 : u5 + "px";
17411
17388
  }
17412
- function j(n3, l4, u5, t4, i5) {
17389
+ function j(n3, l4, u5, t4, i4) {
17413
17390
  var o4, r4;
17414
- n:
17415
- if ("style" == l4)
17416
- if ("string" == typeof u5)
17417
- n3.style.cssText = u5;
17418
- else {
17419
- if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4)
17420
- for (l4 in t4)
17421
- u5 && l4 in u5 || T(n3.style, l4, "");
17422
- if (u5)
17423
- for (l4 in u5)
17424
- t4 && u5[l4] == t4[l4] || T(n3.style, l4, u5[l4]);
17425
- }
17426
- else if ("o" == l4[0] && "n" == l4[1])
17427
- 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);
17428
- else {
17429
- if ("http://www.w3.org/2000/svg" == i5)
17430
- l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
17431
- 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)
17432
- try {
17433
- n3[l4] = null == u5 ? "" : u5;
17434
- break n;
17435
- } catch (n4) {
17436
- }
17437
- "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) {
17438
17403
  }
17404
+ "function" == typeof u5 || (null == u5 || false === u5 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u5 ? "" : u5));
17405
+ }
17439
17406
  }
17440
17407
  function F(n3) {
17441
17408
  return function(u5) {
17442
17409
  if (this.l) {
17443
17410
  var t4 = this.l[u5.type + n3];
17444
- if (null == u5.t)
17445
- u5.t = c++;
17446
- else if (u5.t < t4.u)
17447
- return;
17411
+ if (null == u5.t) u5.t = c++;
17412
+ else if (u5.t < t4.u) return;
17448
17413
  return t4(l.event ? l.event(u5) : u5);
17449
17414
  }
17450
17415
  };
17451
17416
  }
17452
- 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) {
17453
17418
  var a4, h4, p4, v4, y4, _4, m4, b3, S3, C4, M3, $3, P5, A5, H4, L3, T5, j5 = u5.type;
17454
- if (void 0 !== u5.constructor)
17455
- return null;
17419
+ if (void 0 !== u5.constructor) return null;
17456
17420
  128 & t4.__u && (c4 = !!(32 & t4.__u), r4 = [f5 = u5.__e = t4.__e]), (a4 = l.__b) && a4(u5);
17457
- n:
17458
- if ("function" == typeof j5)
17459
- try {
17460
- 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)
17461
- S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
17462
- else {
17463
- 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)) {
17464
- 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) {
17465
- n4 && (n4.__ = u5);
17466
- }), $3 = 0; $3 < h4._sb.length; $3++)
17467
- h4.__h.push(h4._sb[$3]);
17468
- h4._sb = [], h4.__h.length && e4.push(h4);
17469
- break n;
17470
- }
17471
- null != h4.componentWillUpdate && h4.componentWillUpdate(b3, h4.__s, M3), S3 && null != h4.componentDidUpdate && h4.__h.push(function() {
17472
- h4.componentDidUpdate(v4, y4, _4);
17473
- });
17474
- }
17475
- if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P5 = l.__r, A5 = 0, S3) {
17476
- 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++)
17477
- h4.__h.push(h4._sb[H4]);
17478
- h4._sb = [];
17479
- } else
17480
- do {
17481
- h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
17482
- } while (h4.__d && ++A5 < 25);
17483
- 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);
17484
- } catch (n4) {
17485
- if (u5.__v = null, c4 || null != r4)
17486
- if (n4.then) {
17487
- for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; )
17488
- f5 = f5.nextSibling;
17489
- r4[r4.indexOf(f5)] = null, u5.__e = f5;
17490
- } else {
17491
- for (T5 = r4.length; T5--; )
17492
- g(r4[T5]);
17493
- z(u5);
17494
- }
17495
- else
17496
- u5.__e = t4.__e, u5.__k = t4.__k, n4.then || z(u5);
17497
- l.__e(n4, u5, t4);
17498
- }
17499
- else
17500
- 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);
17501
17454
  return (a4 = l.diffed) && a4(u5), 128 & u5.__u ? void 0 : f5;
17502
17455
  }
17503
17456
  function z(n3) {
17504
17457
  n3 && n3.__c && (n3.__c.__e = true), n3 && n3.__k && n3.__k.forEach(z);
17505
17458
  }
17506
17459
  function N(n3, u5, t4) {
17507
- for (var i5 = 0; i5 < t4.length; i5++)
17508
- B(t4[i5], t4[++i5], t4[++i5]);
17460
+ for (var i4 = 0; i4 < t4.length; i4++) B(t4[i4], t4[++i4], t4[++i4]);
17509
17461
  l.__c && l.__c(u5, n3), n3.some(function(u6) {
17510
17462
  try {
17511
17463
  n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
@@ -17519,43 +17471,30 @@ ${text2}</tr>
17519
17471
  function V(n3) {
17520
17472
  return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : d(n3) ? n3.map(V) : w({}, n3);
17521
17473
  }
17522
- function q(u5, t4, i5, o4, r4, e4, f5, c4, s4) {
17523
- 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;
17524
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) {
17525
- for (a4 = 0; a4 < e4.length; a4++)
17526
- if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x4 && (x4 ? w4.localName == x4 : 3 == w4.nodeType)) {
17527
- u5 = w4, e4[a4] = null;
17528
- break;
17529
- }
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
+ }
17530
17481
  }
17531
17482
  if (null == u5) {
17532
- if (null == x4)
17533
- return document.createTextNode(k4);
17483
+ if (null == x4) return document.createTextNode(k4);
17534
17484
  u5 = document.createElementNS(r4, x4, k4.is && k4), c4 && (l.__m && l.__m(t4, e4), c4 = false), e4 = null;
17535
17485
  }
17536
- if (null == x4)
17537
- b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
17486
+ if (null == x4) b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
17538
17487
  else {
17539
- if (e4 = e4 && n.call(u5.childNodes), !c4 && null != e4)
17540
- for (b3 = {}, a4 = 0; a4 < u5.attributes.length; a4++)
17541
- b3[(w4 = u5.attributes[a4]).name] = w4.value;
17542
- for (a4 in b3)
17543
- if (w4 = b3[a4], "children" == a4)
17544
- ;
17545
- else if ("dangerouslySetInnerHTML" == a4)
17546
- v4 = w4;
17547
- else if (!(a4 in k4)) {
17548
- if ("value" == a4 && "defaultValue" in k4 || "checked" == a4 && "defaultChecked" in k4)
17549
- continue;
17550
- j(u5, a4, null, w4, r4);
17551
- }
17552
- for (a4 in k4)
17553
- 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);
17554
- if (h4)
17555
- c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
17556
- 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)
17557
- for (a4 = e4.length; a4--; )
17558
- 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]);
17559
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));
17560
17499
  }
17561
17500
  return u5;
@@ -17563,52 +17502,44 @@ ${text2}</tr>
17563
17502
  function B(n3, u5, t4) {
17564
17503
  try {
17565
17504
  if ("function" == typeof n3) {
17566
- var i5 = "function" == typeof n3.__u;
17567
- i5 && n3.__u(), i5 && null == u5 || (n3.__u = n3(u5));
17568
- } else
17569
- 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;
17570
17508
  } catch (n4) {
17571
17509
  l.__e(n4, t4);
17572
17510
  }
17573
17511
  }
17574
17512
  function D(n3, u5, t4) {
17575
- var i5, o4;
17576
- if (l.unmount && l.unmount(n3), (i5 = n3.ref) && (i5.current && i5.current != n3.__e || B(i5, null, u5)), null != (i5 = n3.__c)) {
17577
- if (i5.componentWillUnmount)
17578
- try {
17579
- i5.componentWillUnmount();
17580
- } catch (n4) {
17581
- l.__e(n4, u5);
17582
- }
17583
- 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;
17584
17521
  }
17585
- if (i5 = n3.__k)
17586
- for (o4 = 0; o4 < i5.length; o4++)
17587
- 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);
17588
17523
  t4 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
17589
17524
  }
17590
17525
  function E(n3, l4, u5) {
17591
17526
  return this.constructor(n3, u5);
17592
17527
  }
17593
- function G(u5, t4, i5) {
17528
+ function G(u5, t4, i4) {
17594
17529
  var o4, r4, e4, f5;
17595
- 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);
17596
17531
  }
17597
17532
  function K(l4, u5, t4) {
17598
- var i5, o4, r4, e4, f5 = w({}, l4.props);
17599
- for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5)
17600
- "key" == r4 ? i5 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : f5[r4] = void 0 === u5[r4] && null != e4 ? e4[r4] : u5[r4];
17601
- 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);
17602
17536
  }
17603
17537
  n = v.slice, l = { __e: function(n3, l4, u5, t4) {
17604
- for (var i5, o4, r4; l4 = l4.__; )
17605
- if ((i5 = l4.__c) && !i5.__)
17606
- try {
17607
- 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)
17608
- return i5.__E = i5;
17609
- } catch (l5) {
17610
- n3 = l5;
17611
- }
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
+ }
17612
17543
  throw n3;
17613
17544
  } }, u = 0, t = function(n3) {
17614
17545
  return null != n3 && void 0 === n3.constructor;
@@ -17643,29 +17574,27 @@ ${text2}</tr>
17643
17574
  function d2(n3) {
17644
17575
  return o2 = 1, h2(D2, n3);
17645
17576
  }
17646
- function h2(n3, u5, i5) {
17577
+ function h2(n3, u5, i4) {
17647
17578
  var o4 = p2(t2++, 2);
17648
- 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) {
17649
17580
  var t4 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t4, n4);
17650
17581
  t4 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
17651
17582
  }], o4.__c = r2, !r2.__f)) {
17652
17583
  var f5 = function(n4, t4, r4) {
17653
- if (!o4.__c.__H)
17654
- return true;
17584
+ if (!o4.__c.__H) return true;
17655
17585
  var u6 = o4.__c.__H.__.filter(function(n5) {
17656
17586
  return !!n5.__c;
17657
17587
  });
17658
17588
  if (u6.every(function(n5) {
17659
17589
  return !n5.__N;
17660
- }))
17661
- return !c4 || c4.call(this, n4, t4, r4);
17662
- var i6 = o4.__c.props !== n4;
17590
+ })) return !c4 || c4.call(this, n4, t4, r4);
17591
+ var i5 = o4.__c.props !== n4;
17663
17592
  return u6.forEach(function(n5) {
17664
17593
  if (n5.__N) {
17665
17594
  var t5 = n5.__[0];
17666
- 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);
17667
17596
  }
17668
- }), c4 && c4.call(this, n4, t4, r4) || i6;
17597
+ }), c4 && c4.call(this, n4, t4, r4) || i5;
17669
17598
  };
17670
17599
  r2.__f = true;
17671
17600
  var c4 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
@@ -17680,8 +17609,8 @@ ${text2}</tr>
17680
17609
  return o4.__N || o4.__;
17681
17610
  }
17682
17611
  function y2(n3, u5) {
17683
- var i5 = p2(t2++, 3);
17684
- !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));
17685
17614
  }
17686
17615
  function A2(n3) {
17687
17616
  return o2 = 5, T2(function() {
@@ -17698,13 +17627,11 @@ ${text2}</tr>
17698
17627
  }, t4);
17699
17628
  }
17700
17629
  function j2() {
17701
- for (var n3; n3 = f2.shift(); )
17702
- if (n3.__P && n3.__H)
17703
- try {
17704
- n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
17705
- } catch (t4) {
17706
- n3.__H.__h = [], c2.__e(t4, n3.__v);
17707
- }
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
+ }
17708
17635
  }
17709
17636
  c2.__b = function(n3) {
17710
17637
  r2 = null, e2 && e2(n3);
@@ -17712,10 +17639,10 @@ ${text2}</tr>
17712
17639
  n3 && t4.__k && t4.__k.__m && (n3.__m = t4.__k.__m), s2 && s2(n3, t4);
17713
17640
  }, c2.__r = function(n3) {
17714
17641
  a2 && a2(n3), t2 = 0;
17715
- var i5 = (r2 = n3.__c).__H;
17716
- 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) {
17717
17644
  n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
17718
- })) : (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;
17719
17646
  }, c2.diffed = function(n3) {
17720
17647
  v2 && v2(n3);
17721
17648
  var t4 = n3.__c;
@@ -17771,17 +17698,12 @@ ${text2}</tr>
17771
17698
 
17772
17699
  // node_modules/preact/compat/dist/compat.module.js
17773
17700
  function g3(n3, t4) {
17774
- for (var e4 in t4)
17775
- n3[e4] = t4[e4];
17701
+ for (var e4 in t4) n3[e4] = t4[e4];
17776
17702
  return n3;
17777
17703
  }
17778
17704
  function E2(n3, t4) {
17779
- for (var e4 in n3)
17780
- if ("__source" !== e4 && !(e4 in t4))
17781
- return true;
17782
- for (var r4 in t4)
17783
- if ("__source" !== r4 && n3[r4] !== t4[r4])
17784
- 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;
17785
17707
  return false;
17786
17708
  }
17787
17709
  function N2(n3, t4) {
@@ -17794,13 +17716,11 @@ ${text2}</tr>
17794
17716
  l.__b = function(n3) {
17795
17717
  n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
17796
17718
  };
17797
- 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;
17798
17720
  var F3 = l.__e;
17799
17721
  l.__e = function(n3, t4, e4, r4) {
17800
17722
  if (n3.then) {
17801
- for (var u5, o4 = t4; o4 = o4.__; )
17802
- if ((u5 = o4.__c) && u5.__c)
17803
- 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);
17804
17724
  }
17805
17725
  F3(n3, t4, e4, r4);
17806
17726
  };
@@ -17833,10 +17753,10 @@ ${text2}</tr>
17833
17753
  }, (P3.prototype = new x()).__c = function(n3, t4) {
17834
17754
  var e4 = t4.__c, r4 = this;
17835
17755
  null == r4.o && (r4.o = []), r4.o.push(e4);
17836
- var u5 = j3(r4.__v), o4 = false, i5 = function() {
17756
+ var u5 = j3(r4.__v), o4 = false, i4 = function() {
17837
17757
  o4 || (o4 = true, e4.__R = null, u5 ? u5(l4) : l4());
17838
17758
  };
17839
- e4.__R = i5;
17759
+ e4.__R = i4;
17840
17760
  var l4 = function() {
17841
17761
  if (!--r4.__u) {
17842
17762
  if (r4.state.__a) {
@@ -17844,11 +17764,10 @@ ${text2}</tr>
17844
17764
  r4.__v.__k[0] = W(n4, n4.__c.__P, n4.__c.__O);
17845
17765
  }
17846
17766
  var t5;
17847
- for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); )
17848
- t5.forceUpdate();
17767
+ for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); ) t5.forceUpdate();
17849
17768
  }
17850
17769
  };
17851
- 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);
17852
17771
  }, P3.prototype.componentWillUnmount = function() {
17853
17772
  this.o = [];
17854
17773
  }, P3.prototype.render = function(n3, e4) {
@@ -17859,18 +17778,15 @@ ${text2}</tr>
17859
17778
  }
17860
17779
  this.__b = null;
17861
17780
  }
17862
- var i5 = e4.__a && _(k, null, n3.fallback);
17863
- 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];
17864
17783
  };
17865
17784
  var H2 = function(n3, t4, e4) {
17866
- if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size))
17867
- for (e4 = n3.i; e4; ) {
17868
- for (; e4.length > 3; )
17869
- e4.pop()();
17870
- if (e4[1] < e4[0])
17871
- break;
17872
- n3.i = e4 = e4[2];
17873
- }
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
+ }
17874
17790
  };
17875
17791
  (B3.prototype = new x()).__a = function(n3) {
17876
17792
  var t4 = this, e4 = j3(t4.__v), r4 = t4.l.get(n3);
@@ -17884,8 +17800,7 @@ ${text2}</tr>
17884
17800
  this.i = null, this.l = /* @__PURE__ */ new Map();
17885
17801
  var t4 = H(n3.children);
17886
17802
  n3.revealOrder && "b" === n3.revealOrder[0] && t4.reverse();
17887
- for (var e4 = t4.length; e4--; )
17888
- 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]);
17889
17804
  return n3.children;
17890
17805
  }, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
17891
17806
  var n3 = this;
@@ -17893,13 +17808,13 @@ ${text2}</tr>
17893
17808
  H2(n3, e4, t4);
17894
17809
  });
17895
17810
  };
17896
- 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;
17897
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]/;
17898
17813
  var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
17899
17814
  var K2 = /[A-Z0-9]/g;
17900
17815
  var Q2 = "undefined" != typeof document;
17901
17816
  var X = function(n3) {
17902
- 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);
17903
17818
  };
17904
17819
  function nn(n3, t4, e4) {
17905
17820
  return null == t4.__k && (t4.textContent = ""), G(n3, t4), "function" == typeof e4 && e4(), n3 ? n3.__c : null;
@@ -17929,13 +17844,13 @@ ${text2}</tr>
17929
17844
  } };
17930
17845
  var fn2 = l.vnode;
17931
17846
  l.vnode = function(n3) {
17932
- "string" == typeof n3.type && function(n4) {
17847
+ "string" == typeof n3.type && (function(n4) {
17933
17848
  var t4 = n4.props, e4 = n4.type, u5 = {}, o4 = -1 === e4.indexOf("-");
17934
- for (var i5 in t4) {
17935
- var l4 = t4[i5];
17936
- if (!("value" === i5 && "defaultValue" in t4 && null == l4 || Q2 && "children" === i5 && "noscript" === e4 || "class" === i5 || "className" === i5)) {
17937
- var c4 = i5.toLowerCase();
17938
- "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;
17939
17854
  }
17940
17855
  }
17941
17856
  "select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(t4.children).forEach(function(n5) {
@@ -17943,7 +17858,7 @@ ${text2}</tr>
17943
17858
  })), "select" == e4 && null != u5.defaultValue && (u5.value = H(t4.children).forEach(function(n5) {
17944
17859
  n5.props.selected = u5.multiple ? -1 != u5.defaultValue.indexOf(n5.props.value) : u5.defaultValue == n5.props.value;
17945
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;
17946
- }(n3), n3.$$typeof = q3, fn2 && fn2(n3);
17861
+ })(n3), n3.$$typeof = q3, fn2 && fn2(n3);
17947
17862
  };
17948
17863
  var an = l.__r;
17949
17864
  l.__r = function(n3) {
@@ -18277,8 +18192,8 @@ ${text2}</tr>
18277
18192
  var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
18278
18193
  var nanoid = (size = 21) => {
18279
18194
  let id2 = "";
18280
- let i5 = size | 0;
18281
- while (i5--) {
18195
+ let i4 = size | 0;
18196
+ while (i4--) {
18282
18197
  id2 += urlAlphabet[Math.random() * 64 | 0];
18283
18198
  }
18284
18199
  return id2;
@@ -19381,7 +19296,7 @@ ${text2}</tr>
19381
19296
  // - We must throttle at around >500ms to avoid performance lags.
19382
19297
  // [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
19383
19298
  #updateTotalProgressThrottled = (0, import_throttle.default)(() => this.#updateTotalProgress(), 500, { leading: true, trailing: true });
19384
- [Symbol.for("uppy test: updateTotalProgress")]() {
19299
+ [/* @__PURE__ */ Symbol.for("uppy test: updateTotalProgress")]() {
19385
19300
  return this.#updateTotalProgress();
19386
19301
  }
19387
19302
  #calculateTotalProgress() {
@@ -19632,7 +19547,7 @@ Uppy plugins must have unique \`id\` options.`;
19632
19547
  }
19633
19548
  return void 0;
19634
19549
  }
19635
- [Symbol.for("uppy test: getPlugins")](type) {
19550
+ [/* @__PURE__ */ Symbol.for("uppy test: getPlugins")](type) {
19636
19551
  return this.#plugins[type];
19637
19552
  }
19638
19553
  /**
@@ -19783,7 +19698,7 @@ Uppy plugins must have unique \`id\` options.`;
19783
19698
  });
19784
19699
  return uploadID;
19785
19700
  }
19786
- [Symbol.for("uppy test: createUpload")](...args) {
19701
+ [/* @__PURE__ */ Symbol.for("uppy test: createUpload")](...args) {
19787
19702
  return this.#createUpload(...args);
19788
19703
  }
19789
19704
  #getUpload(uploadID) {
@@ -19946,17 +19861,12 @@ Uppy plugins must have unique \`id\` options.`;
19946
19861
 
19947
19862
  // node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
19948
19863
  var f3 = 0;
19949
- var i3 = Array.isArray;
19950
- function u3(e4, t4, n3, o4, i5, u5) {
19864
+ function u3(e4, t4, n3, o4, i4, u5) {
19951
19865
  t4 || (t4 = {});
19952
19866
  var a4, c4, p4 = t4;
19953
- if ("ref" in p4)
19954
- for (c4 in p4 = {}, t4)
19955
- "ref" == c4 ? a4 = t4[c4] : p4[c4] = t4[c4];
19956
- 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 };
19957
- if ("function" == typeof e4 && (a4 = e4.defaultProps))
19958
- for (c4 in a4)
19959
- 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]);
19960
19870
  return l.vnode && l.vnode(l4), l4;
19961
19871
  }
19962
19872
 
@@ -20048,10 +19958,10 @@ Uppy plugins must have unique \`id\` options.`;
20048
19958
  }
20049
19959
  function getChildMapping(children) {
20050
19960
  const out = {};
20051
- for (let i5 = 0; i5 < children.length; i5++) {
20052
- if (children[i5] != null) {
20053
- const key = getKey(children[i5], i5.toString(36));
20054
- 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];
20055
19965
  }
20056
19966
  }
20057
19967
  return out;
@@ -20075,19 +19985,19 @@ Uppy plugins must have unique \`id\` options.`;
20075
19985
  const childMapping = {};
20076
19986
  for (const nextKey in next) {
20077
19987
  if (Object.hasOwn(nextKeysPending, nextKey)) {
20078
- for (let i5 = 0; i5 < nextKeysPending[nextKey].length; i5++) {
20079
- const pendingNextKey = nextKeysPending[nextKey][i5];
20080
- 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);
20081
19991
  }
20082
19992
  }
20083
19993
  childMapping[nextKey] = getValueForKey(nextKey);
20084
19994
  }
20085
- for (let i5 = 0; i5 < pendingKeys.length; i5++) {
20086
- childMapping[pendingKeys[i5]] = getValueForKey(pendingKeys[i5]);
19995
+ for (let i4 = 0; i4 < pendingKeys.length; i4++) {
19996
+ childMapping[pendingKeys[i4]] = getValueForKey(pendingKeys[i4]);
20087
19997
  }
20088
19998
  return childMapping;
20089
19999
  }
20090
- var identity2 = (i5) => i5;
20000
+ var identity2 = (i4) => i4;
20091
20001
  var TransitionGroup = class extends x {
20092
20002
  constructor(props, context) {
20093
20003
  super(props, context);
@@ -20582,7 +20492,7 @@ Uppy plugins must have unique \`id\` options.`;
20582
20492
  return true;
20583
20493
  }
20584
20494
  if (item.type === "folder" && item.status === "checked") {
20585
- 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);
20586
20496
  return !doesItHaveChildren;
20587
20497
  }
20588
20498
  return false;
@@ -20760,14 +20670,14 @@ Uppy plugins must have unique \`id\` options.`;
20760
20670
  const checkedFiles = partialTree.filter((item) => item.type === "file" && item.status === "checked");
20761
20671
  const companionFilesWithInjectedPaths = checkedFiles.map((file) => {
20762
20672
  const absFolders = getPath(partialTree, file.id, cache2);
20763
- const firstCheckedFolderIndex = absFolders.findIndex((i5) => i5.type === "folder" && i5.status === "checked");
20673
+ const firstCheckedFolderIndex = absFolders.findIndex((i4) => i4.type === "folder" && i4.status === "checked");
20764
20674
  const relFolders = absFolders.slice(firstCheckedFolderIndex);
20765
- const absDirPath = `/${absFolders.map((i5) => i5.data.name).join("/")}`;
20675
+ const absDirPath = `/${absFolders.map((i4) => i4.data.name).join("/")}`;
20766
20676
  const relDirPath = relFolders.length === 1 ? (
20767
20677
  // Must return `undefined` (which later turns into `null` in `.getTagFile()`)
20768
20678
  // (https://github.com/transloadit/uppy/pull/4537#issuecomment-1629136652)
20769
20679
  void 0
20770
- ) : relFolders.map((i5) => i5.data.name).join("/");
20680
+ ) : relFolders.map((i4) => i4.data.name).join("/");
20771
20681
  return {
20772
20682
  ...file.data,
20773
20683
  absDirPath,
@@ -21277,8 +21187,8 @@ Uppy plugins must have unique \`id\` options.`;
21277
21187
  items = items.concat(response.items);
21278
21188
  currentPath = response.nextPagePath;
21279
21189
  }
21280
- const newFolders = items.filter((i5) => i5.isFolder === true);
21281
- 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);
21282
21192
  const folders = newFolders.map((folder) => ({
21283
21193
  type: "folder",
21284
21194
  id: folder.requestPath,
@@ -21315,7 +21225,7 @@ Uppy plugins must have unique \`id\` options.`;
21315
21225
  queue.add(() => recursivelyFetch(queue, poorTree, poorFolder, apiList, validateSingleFile));
21316
21226
  });
21317
21227
  queue.on("completed", () => {
21318
- 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;
21319
21229
  reportProgress(nOfFilesChecked);
21320
21230
  });
21321
21231
  await queue.onIdle();
@@ -21325,8 +21235,8 @@ Uppy plugins must have unique \`id\` options.`;
21325
21235
 
21326
21236
  // node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterOpenFolder.js
21327
21237
  var afterOpenFolder = (oldPartialTree, discoveredItems, clickedFolder, currentPagePath, validateSingleFile) => {
21328
- const discoveredFolders = discoveredItems.filter((i5) => i5.isFolder === true);
21329
- 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);
21330
21240
  const isParentFolderChecked = clickedFolder.type === "folder" && clickedFolder.status === "checked";
21331
21241
  const folders = discoveredFolders.map((folder) => ({
21332
21242
  type: "folder",
@@ -21365,9 +21275,9 @@ Uppy plugins must have unique \`id\` options.`;
21365
21275
 
21366
21276
  // node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterScrollFolder.js
21367
21277
  var afterScrollFolder = (oldPartialTree, currentFolderId, items, nextPagePath, validateSingleFile) => {
21368
- const currentFolder = oldPartialTree.find((i5) => i5.id === currentFolderId);
21369
- const newFolders = items.filter((i5) => i5.isFolder === true);
21370
- 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);
21371
21281
  const scrolledFolder = { ...currentFolder, nextPagePath };
21372
21282
  const partialTreeWithUpdatedScrolledFolder = oldPartialTree.map((folder) => folder.id === scrolledFolder.id ? scrolledFolder : folder);
21373
21283
  const isParentFolderChecked = scrolledFolder.type === "folder" && scrolledFolder.status === "checked";
@@ -21642,7 +21552,7 @@ Uppy plugins must have unique \`id\` options.`;
21642
21552
  }
21643
21553
  async handleScroll(event) {
21644
21554
  const { partialTree, currentFolderId } = this.plugin.getPluginState();
21645
- const currentFolder = partialTree.find((i5) => i5.id === currentFolderId);
21555
+ const currentFolder = partialTree.find((i4) => i4.id === currentFolderId);
21646
21556
  if (shouldHandleScroll_default(event) && !this.isHandlingScroll && currentFolder.nextPagePath) {
21647
21557
  this.isHandlingScroll = true;
21648
21558
  await this.#withAbort(async (signal) => {
@@ -21816,7 +21726,7 @@ Uppy plugins must have unique \`id\` options.`;
21816
21726
  }
21817
21727
  async handleScroll(event) {
21818
21728
  const { partialTree, searchString } = this.plugin.getPluginState();
21819
- const root = partialTree.find((i5) => i5.type === "root");
21729
+ const root = partialTree.find((i4) => i4.type === "root");
21820
21730
  if (shouldHandleScroll_default(event) && !this.isHandlingScroll && root.nextPagePath) {
21821
21731
  this.isHandlingScroll = true;
21822
21732
  try {
@@ -21825,7 +21735,7 @@ Uppy plugins must have unique \`id\` options.`;
21825
21735
  ...root,
21826
21736
  nextPagePath: response.nextPageQuery
21827
21737
  };
21828
- const oldItems = partialTree.filter((i5) => i5.type !== "root");
21738
+ const oldItems = partialTree.filter((i4) => i4.type !== "root");
21829
21739
  const newPartialTree = [
21830
21740
  newRoot,
21831
21741
  ...oldItems,
@@ -22273,8 +22183,8 @@ Uppy plugins must have unique \`id\` options.`;
22273
22183
  }
22274
22184
  let state = StatusBarStates_default.STATE_WAITING;
22275
22185
  const fileIDs = Object.keys(files);
22276
- for (let i5 = 0; i5 < fileIDs.length; i5++) {
22277
- const { progress } = files[fileIDs[i5]];
22186
+ for (let i4 = 0; i4 < fileIDs.length; i4++) {
22187
+ const { progress } = files[fileIDs[i4]];
22278
22188
  if (progress.uploadStarted && !progress.uploadComplete) {
22279
22189
  return StatusBarStates_default.STATE_UPLOADING;
22280
22190
  }
@@ -22341,8 +22251,8 @@ Uppy plugins must have unique \`id\` options.`;
22341
22251
  return Math.round(filteredETA / 100) / 10;
22342
22252
  }
22343
22253
  startUpload = () => {
22344
- return this.uppy.upload().catch(() => {
22345
- });
22254
+ return this.uppy.upload().catch((() => {
22255
+ }));
22346
22256
  };
22347
22257
  render(state) {
22348
22258
  const { capabilities, files, allowNewUpload, totalProgress, error: error2, recoveredState } = state;
@@ -22442,8 +22352,8 @@ Uppy plugins must have unique \`id\` options.`;
22442
22352
  if (dataURIData?.[2] != null) {
22443
22353
  const binary = atob(decodeURIComponent(dataURIData[3]));
22444
22354
  const bytes = new Uint8Array(binary.length);
22445
- for (let i5 = 0; i5 < binary.length; i5++) {
22446
- bytes[i5] = binary.charCodeAt(i5);
22355
+ for (let i4 = 0; i4 < binary.length; i4++) {
22356
+ bytes[i4] = binary.charCodeAt(i4);
22447
22357
  }
22448
22358
  data = [bytes];
22449
22359
  } else if (dataURIData?.[3] != null) {
@@ -22474,7 +22384,7 @@ Uppy plugins must have unique \`id\` options.`;
22474
22384
  }
22475
22385
  var t3 = "undefined" != typeof self ? self : global;
22476
22386
  var s3 = "undefined" != typeof navigator;
22477
- var i4 = s3 && "undefined" == typeof HTMLImageElement;
22387
+ var i3 = s3 && "undefined" == typeof HTMLImageElement;
22478
22388
  var n2 = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node);
22479
22389
  var r3 = t3.Buffer;
22480
22390
  var a3 = !!r3;
@@ -22487,10 +22397,10 @@ Uppy plugins must have unique \`id\` options.`;
22487
22397
  throw delete t4.stack, t4;
22488
22398
  }
22489
22399
  function o3(e4) {
22490
- let t4 = function(e5) {
22400
+ let t4 = (function(e5) {
22491
22401
  let t5 = 0;
22492
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;
22493
- }(e4);
22403
+ })(e4);
22494
22404
  return e4.jfif.enabled && (t4 += 50), e4.xmp.enabled && (t4 += 2e4), e4.iptc.enabled && (t4 += 14e3), e4.icc.enabled && (t4 += 6e3), t4;
22495
22405
  }
22496
22406
  var u4 = (e4) => String.fromCharCode.apply(null, e4);
@@ -22499,22 +22409,20 @@ Uppy plugins must have unique \`id\` options.`;
22499
22409
  static from(e4, t4) {
22500
22410
  return e4 instanceof this && e4.le === t4 ? e4 : new _c(e4, void 0, void 0, t4);
22501
22411
  }
22502
- constructor(e4, t4 = 0, s4, i5) {
22503
- if ("boolean" == typeof i5 && (this.le = i5), Array.isArray(e4) && (e4 = new Uint8Array(e4)), 0 === e4)
22504
- 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;
22505
22414
  else if (e4 instanceof ArrayBuffer) {
22506
22415
  void 0 === s4 && (s4 = e4.byteLength - t4);
22507
- let i6 = new DataView(e4, t4, s4);
22508
- this._swapDataView(i6);
22416
+ let i5 = new DataView(e4, t4, s4);
22417
+ this._swapDataView(i5);
22509
22418
  } else if (e4 instanceof Uint8Array || e4 instanceof DataView || e4 instanceof _c) {
22510
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");
22511
- let i6 = new DataView(e4.buffer, t4, s4);
22512
- this._swapDataView(i6);
22420
+ let i5 = new DataView(e4.buffer, t4, s4);
22421
+ this._swapDataView(i5);
22513
22422
  } else if ("number" == typeof e4) {
22514
22423
  let t5 = new DataView(new ArrayBuffer(e4));
22515
22424
  this._swapDataView(t5);
22516
- } else
22517
- l3("Invalid input argument for BufferView: " + e4);
22425
+ } else l3("Invalid input argument for BufferView: " + e4);
22518
22426
  }
22519
22427
  _swapArrayBuffer(e4) {
22520
22428
  this._swapDataView(new DataView(e4));
@@ -22542,8 +22450,8 @@ Uppy plugins must have unique \`id\` options.`;
22542
22450
  }
22543
22451
  getString(e4 = 0, t4 = this.byteLength) {
22544
22452
  let s4 = this.getUint8Array(e4, t4);
22545
- return i5 = s4, d3 ? d3.decode(i5) : a3 ? Buffer.from(i5).toString("utf8") : decodeURIComponent(escape(u4(i5)));
22546
- var i5;
22453
+ return i4 = s4, d3 ? d3.decode(i4) : a3 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u4(i4)));
22454
+ var i4;
22547
22455
  }
22548
22456
  getLatin1String(e4 = 0, t4 = this.byteLength) {
22549
22457
  let s4 = this.getUint8Array(e4, t4);
@@ -22551,8 +22459,7 @@ Uppy plugins must have unique \`id\` options.`;
22551
22459
  }
22552
22460
  getUnicodeString(e4 = 0, t4 = this.byteLength) {
22553
22461
  const s4 = [];
22554
- for (let i5 = 0; i5 < t4 && e4 + i5 < this.byteLength; i5 += 2)
22555
- 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));
22556
22463
  return u4(s4);
22557
22464
  }
22558
22465
  getInt8(e4) {
@@ -22623,9 +22530,9 @@ Uppy plugins must have unique \`id\` options.`;
22623
22530
  super(), this.kind = e4;
22624
22531
  }
22625
22532
  get(e4, t4) {
22626
- 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) {
22627
22534
  l3(`Unknown ${e5} '${t5}'.`);
22628
- }(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);
22629
22536
  }
22630
22537
  keyList() {
22631
22538
  return Array.from(this.keys());
@@ -22636,24 +22543,24 @@ Uppy plugins must have unique \`id\` options.`;
22636
22543
  var b2 = new g4("file reader");
22637
22544
  var w3 = t3.fetch;
22638
22545
  function k3(e4, t4) {
22639
- 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");
22640
- 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;
22641
22548
  }
22642
- async function O2(e4, t4, s4, i5) {
22643
- 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) {
22644
22551
  let s5 = await t5(e5);
22645
22552
  return new c3(s5);
22646
- }(e4, i5) : void l3(`Parser ${s4} is not loaded`);
22553
+ })(e4, i4) : void l3(`Parser ${s4} is not loaded`);
22647
22554
  }
22648
22555
  async function v3(e4, t4, s4) {
22649
- let i5 = new (b2.get(s4))(e4, t4);
22650
- return await i5.read(), i5;
22651
- }
22652
- var S2 = (e4) => w3(e4).then((e5) => e5.arrayBuffer());
22653
- var A4 = (e4) => new Promise((t4, s4) => {
22654
- let i5 = new FileReader();
22655
- i5.onloadend = () => t4(i5.result || new ArrayBuffer()), i5.onerror = s4, i5.readAsArrayBuffer(e4);
22656
- });
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
+ }));
22657
22564
  var U2 = class extends Map {
22658
22565
  get tagKeys() {
22659
22566
  return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys;
@@ -22663,20 +22570,15 @@ Uppy plugins must have unique \`id\` options.`;
22663
22570
  }
22664
22571
  };
22665
22572
  function x3(e4, t4, s4) {
22666
- let i5 = new U2();
22667
- for (let [e5, t5] of s4)
22668
- i5.set(e5, t5);
22669
- if (Array.isArray(t4))
22670
- for (let s5 of t4)
22671
- e4.set(s5, i5);
22672
- else
22673
- e4.set(t4, i5);
22674
- 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;
22675
22578
  }
22676
22579
  function C3(e4, t4, s4) {
22677
- let i5, n3 = e4.get(t4);
22678
- for (i5 of s4)
22679
- n3.set(i5[0], i5[1]);
22580
+ let i4, n3 = e4.get(t4);
22581
+ for (i4 of s4) n3.set(i4[0], i4[1]);
22680
22582
  }
22681
22583
  var B4 = /* @__PURE__ */ new Map();
22682
22584
  var V3 = /* @__PURE__ */ new Map();
@@ -22698,32 +22600,25 @@ Uppy plugins must have unique \`id\` options.`;
22698
22600
  get needed() {
22699
22601
  return this.enabled || this.deps.size > 0;
22700
22602
  }
22701
- constructor(t4, s4, i5, n3) {
22702
- 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)
22703
- if (Array.isArray(i5))
22704
- this.parse = this.enabled = true, this.canBeFiltered && i5.length > 0 && this.translateTagSet(i5, this.pick);
22705
- else if ("object" == typeof i5) {
22706
- if (this.enabled = true, this.parse = false !== i5.parse, this.canBeFiltered) {
22707
- let { pick: e4, skip: t5 } = i5;
22708
- e4 && e4.length > 0 && this.translateTagSet(e4, this.pick), t5 && t5.length > 0 && this.translateTagSet(t5, this.skip);
22709
- }
22710
- this.applyInheritables(i5);
22711
- } else
22712
- 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}`);
22713
22612
  }
22714
22613
  applyInheritables(e4) {
22715
22614
  let t4, s4;
22716
- for (t4 of E3)
22717
- s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
22615
+ for (t4 of E3) s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
22718
22616
  }
22719
22617
  translateTagSet(e4, t4) {
22720
22618
  if (this.dict) {
22721
- let s4, i5, { tagKeys: n3, tagValues: r4 } = this.dict;
22722
- for (s4 of e4)
22723
- "string" == typeof s4 ? (i5 = r4.indexOf(s4), -1 === i5 && (i5 = n3.indexOf(Number(s4))), -1 !== i5 && t4.add(Number(n3[i5]))) : t4.add(s4);
22724
- } else
22725
- for (let s4 of e4)
22726
- 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);
22727
22622
  }
22728
22623
  finalizeFilters() {
22729
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);
@@ -22741,55 +22636,37 @@ Uppy plugins must have unique \`id\` options.`;
22741
22636
  }
22742
22637
  setupFromUndefined() {
22743
22638
  let e4;
22744
- for (e4 of L2)
22745
- this[e4] = N3[e4];
22746
- for (e4 of M2)
22747
- this[e4] = N3[e4];
22748
- for (e4 of j4)
22749
- this[e4] = N3[e4];
22750
- for (e4 of F4)
22751
- 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);
22752
22643
  }
22753
22644
  setupFromTrue() {
22754
22645
  let e4;
22755
- for (e4 of L2)
22756
- this[e4] = N3[e4];
22757
- for (e4 of M2)
22758
- this[e4] = N3[e4];
22759
- for (e4 of j4)
22760
- this[e4] = true;
22761
- for (e4 of F4)
22762
- 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);
22763
22650
  }
22764
22651
  setupFromArray(e4) {
22765
22652
  let t4;
22766
- for (t4 of L2)
22767
- this[t4] = N3[t4];
22768
- for (t4 of M2)
22769
- this[t4] = N3[t4];
22770
- for (t4 of j4)
22771
- this[t4] = N3[t4];
22772
- for (t4 of F4)
22773
- 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);
22774
22657
  this.setupGlobalFilters(e4, void 0, P4);
22775
22658
  }
22776
22659
  setupFromObject(e4) {
22777
22660
  let t4;
22778
- for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2))
22779
- this[t4] = W2(e4[t4], N3[t4]);
22780
- for (t4 of M2)
22781
- this[t4] = W2(e4[t4], N3[t4]);
22782
- for (t4 of j4)
22783
- this[t4] = W2(e4[t4], N3[t4]);
22784
- for (t4 of z3)
22785
- this[t4] = new D3(t4, N3[t4], e4[t4], this);
22786
- for (t4 of P4)
22787
- 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);
22788
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);
22789
22667
  }
22790
22668
  batchEnableWithBool(e4, t4) {
22791
- for (let s4 of e4)
22792
- this[s4].enabled = t4;
22669
+ for (let s4 of e4) this[s4].enabled = t4;
22793
22670
  }
22794
22671
  batchEnableWithUserValue(e4, t4) {
22795
22672
  for (let s4 of e4) {
@@ -22797,43 +22674,37 @@ Uppy plugins must have unique \`id\` options.`;
22797
22674
  this[s4].enabled = false !== e5 && void 0 !== e5;
22798
22675
  }
22799
22676
  }
22800
- setupGlobalFilters(e4, t4, s4, i5 = s4) {
22677
+ setupGlobalFilters(e4, t4, s4, i4 = s4) {
22801
22678
  if (e4 && e4.length) {
22802
- for (let e5 of i5)
22803
- this[e5].enabled = false;
22679
+ for (let e5 of i4) this[e5].enabled = false;
22804
22680
  let t5 = K3(e4, s4);
22805
- for (let [e5, s5] of t5)
22806
- 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;
22807
22682
  } else if (t4 && t4.length) {
22808
22683
  let e5 = K3(t4, s4);
22809
- for (let [t5, s5] of e5)
22810
- X2(this[t5].skip, s5);
22684
+ for (let [t5, s5] of e5) X2(this[t5].skip, s5);
22811
22685
  }
22812
22686
  }
22813
22687
  filterNestedSegmentTags() {
22814
- let { ifd0: e4, exif: t4, xmp: s4, iptc: i5, icc: n3 } = this;
22815
- 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);
22816
22690
  }
22817
22691
  traverseTiffDependencyTree() {
22818
- let { ifd0: e4, exif: t4, gps: s4, interop: i5 } = this;
22819
- 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;
22820
- for (let e5 of P4)
22821
- 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();
22822
22695
  }
22823
22696
  get onlyTiff() {
22824
- 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;
22825
22698
  }
22826
22699
  checkLoadedPlugins() {
22827
- for (let e4 of z3)
22828
- 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);
22829
22701
  }
22830
22702
  };
22831
22703
  function K3(e4, t4) {
22832
- let s4, i5, n3, r4, a4 = [];
22704
+ let s4, i4, n3, r4, a4 = [];
22833
22705
  for (n3 of t4) {
22834
- for (r4 of (s4 = B4.get(n3), i5 = [], s4))
22835
- (e4.includes(r4[0]) || e4.includes(r4[1])) && i5.push(r4[0]);
22836
- 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]);
22837
22708
  }
22838
22709
  return a4;
22839
22710
  }
@@ -22841,26 +22712,22 @@ Uppy plugins must have unique \`id\` options.`;
22841
22712
  return void 0 !== e4 ? e4 : void 0 !== t4 ? t4 : void 0;
22842
22713
  }
22843
22714
  function X2(e4, t4) {
22844
- for (let s4 of t4)
22845
- e4.add(s4);
22715
+ for (let s4 of t4) e4.add(s4);
22846
22716
  }
22847
22717
  e3(R, "default", N3);
22848
22718
  var H3 = class {
22849
22719
  constructor(t4) {
22850
- 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);
22851
22721
  }
22852
22722
  async read(e4) {
22853
- this.file = await function(e5, t4) {
22854
- 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");
22855
- }(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);
22856
22726
  }
22857
22727
  setup() {
22858
- if (this.fileParser)
22859
- return;
22728
+ if (this.fileParser) return;
22860
22729
  let { file: e4 } = this, t4 = e4.getUint16(0);
22861
- for (let [s4, i5] of m3)
22862
- if (i5.canHandle(e4, t4))
22863
- 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;
22864
22731
  this.file.close && this.file.close(), l3("Unknown file format");
22865
22732
  }
22866
22733
  async parse() {
@@ -22871,19 +22738,18 @@ Uppy plugins must have unique \`id\` options.`;
22871
22738
  async executeParsers() {
22872
22739
  let { output: e4 } = this;
22873
22740
  await this.fileParser.parse();
22874
- let t4 = Object.values(this.parsers).map(async (t5) => {
22741
+ let t4 = Object.values(this.parsers).map((async (t5) => {
22875
22742
  let s4 = await t5.parse();
22876
22743
  t5.assignToOutput(e4, s4);
22877
- });
22878
- 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);
22879
22746
  }
22880
22747
  async extractThumbnail() {
22881
22748
  this.setup();
22882
22749
  let { options: e4, file: t4 } = this, s4 = y3.get("tiff", e4);
22883
- var i5;
22884
- if (t4.tiff ? i5 = { start: 0, type: "tiff" } : t4.jpeg && (i5 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i5)
22885
- return;
22886
- 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();
22887
22753
  return t4.close && t4.close(), a4;
22888
22754
  }
22889
22755
  };
@@ -22894,8 +22760,8 @@ Uppy plugins must have unique \`id\` options.`;
22894
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 });
22895
22761
  var J3 = class {
22896
22762
  static findPosition(e4, t4) {
22897
- 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;
22898
- 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 };
22899
22765
  }
22900
22766
  static parse(e4, t4 = {}) {
22901
22767
  return new this(e4, new R({ [this.type]: t4 }), e4).parse();
@@ -22903,12 +22769,11 @@ Uppy plugins must have unique \`id\` options.`;
22903
22769
  normalizeInput(e4) {
22904
22770
  return e4 instanceof c3 ? e4 : new c3(e4);
22905
22771
  }
22906
- constructor(t4, s4 = {}, i5) {
22907
- e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", (e4) => {
22908
- if (!this.options.silentErrors)
22909
- 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;
22910
22775
  this.errors.push(e4.message);
22911
- }), 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;
22912
22777
  }
22913
22778
  translate() {
22914
22779
  this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type));
@@ -22917,9 +22782,8 @@ Uppy plugins must have unique \`id\` options.`;
22917
22782
  return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
22918
22783
  }
22919
22784
  translateBlock(e4, t4) {
22920
- 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 = {};
22921
- for (let [t5, r5] of e4)
22922
- 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;
22923
22787
  return l4;
22924
22788
  }
22925
22789
  translateValue(e4, t4) {
@@ -22929,12 +22793,11 @@ Uppy plugins must have unique \`id\` options.`;
22929
22793
  this.assignObjectToOutput(e4, this.constructor.type, t4);
22930
22794
  }
22931
22795
  assignObjectToOutput(e4, t4, s4) {
22932
- if (this.globalOptions.mergeOutput)
22933
- return Object.assign(e4, s4);
22796
+ if (this.globalOptions.mergeOutput) return Object.assign(e4, s4);
22934
22797
  e4[t4] ? Object.assign(e4[t4], s4) : e4[t4] = s4;
22935
22798
  }
22936
22799
  };
22937
- 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));
22938
22801
  function q4(e4) {
22939
22802
  return 192 === e4 || 194 === e4 || 196 === e4 || 219 === e4 || 221 === e4 || 218 === e4 || 254 === e4;
22940
22803
  }
@@ -22942,27 +22805,21 @@ Uppy plugins must have unique \`id\` options.`;
22942
22805
  return e4 >= 224 && e4 <= 239;
22943
22806
  }
22944
22807
  function Z(e4, t4, s4) {
22945
- for (let [i5, n3] of y3)
22946
- if (n3.canHandle(e4, t4, s4))
22947
- return i5;
22808
+ for (let [i4, n3] of y3) if (n3.canHandle(e4, t4, s4)) return i4;
22948
22809
  }
22949
22810
  var ee2 = class extends class {
22950
- constructor(t4, s4, i5) {
22951
- e3(this, "errors", []), e3(this, "ensureSegmentChunk", async (e4) => {
22811
+ constructor(t4, s4, i4) {
22812
+ e3(this, "errors", []), e3(this, "ensureSegmentChunk", (async (e4) => {
22952
22813
  let t5 = e4.start, s5 = e4.size || 65536;
22953
- if (this.file.chunked)
22954
- if (this.file.available(t5, s5))
22955
- e4.chunk = this.file.subarray(t5, s5);
22956
- else
22957
- try {
22958
- e4.chunk = await this.file.readChunk(t5, s5);
22959
- } catch (t6) {
22960
- l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
22961
- }
22962
- else
22963
- 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));
22964
22821
  return e4.chunk;
22965
- }), 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;
22966
22823
  }
22967
22824
  injectSegment(e4, t4) {
22968
22825
  this.options[e4].enabled && this.createParser(e4, t4);
@@ -22973,8 +22830,8 @@ Uppy plugins must have unique \`id\` options.`;
22973
22830
  }
22974
22831
  createParsers(e4) {
22975
22832
  for (let t4 of e4) {
22976
- let { type: e5, chunk: s4 } = t4, i5 = this.options[e5];
22977
- if (i5 && i5.enabled) {
22833
+ let { type: e5, chunk: s4 } = t4, i4 = this.options[e5];
22834
+ if (i4 && i4.enabled) {
22978
22835
  let t5 = this.parsers[e5];
22979
22836
  t5 && t5.append || t5 || this.createParser(e5, s4);
22980
22837
  }
@@ -22995,59 +22852,53 @@ Uppy plugins must have unique \`id\` options.`;
22995
22852
  await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
22996
22853
  }
22997
22854
  setupSegmentFinderArgs(e4) {
22998
- 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;
22999
22856
  }
23000
22857
  async findAppSegments(e4 = 0, t4) {
23001
22858
  this.setupSegmentFinderArgs(t4);
23002
- let { file: s4, findAll: i5, wanted: n3, remaining: r4 } = this;
23003
- 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) => {
23004
22861
  let t5 = y3.get(e5), s5 = this.options[e5];
23005
22862
  return t5.multiSegment && s5.multiSegment;
23006
- }), 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) {
23007
22864
  let t5 = false;
23008
22865
  for (; r4.size > 0 && !t5 && (s4.canReadNextChunk || this.unfinishedMultiSegment); ) {
23009
- let { nextChunkOffset: i6 } = s4, n4 = this.appSegments.some((e5) => !this.file.available(e5.offset || e5.start, e5.length || e5.size));
23010
- if (t5 = e4 > i6 && !n4 ? !await s4.readNextChunk(e4) : !await s4.readNextChunk(i6), void 0 === (e4 = this.findAppSegmentsInRange(e4, s4.byteLength)))
23011
- 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;
23012
22868
  }
23013
22869
  }
23014
22870
  }
23015
22871
  findAppSegmentsInRange(e4, t4) {
23016
22872
  t4 -= 2;
23017
- let s4, i5, n3, r4, a4, h4, { file: f5, findAll: l4, wanted: o4, remaining: u5, options: d4 } = this;
23018
- for (; e4 < t4; e4++)
23019
- if (255 === f5.getUint8(e4)) {
23020
- if (s4 = f5.getUint8(e4 + 1), Q3(s4)) {
23021
- 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)))
23022
- break;
23023
- d4.recordUnknownSegments && (a4 = J3.findPosition(f5, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i5 + 1;
23024
- } else if (q4(s4)) {
23025
- if (i5 = f5.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos)
23026
- return;
23027
- d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i5, marker: s4 }), e4 += i5 + 1;
23028
- }
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;
23029
22881
  }
22882
+ }
23030
22883
  return e4;
23031
22884
  }
23032
22885
  mergeMultiSegments() {
23033
- if (!this.appSegments.some((e5) => e5.multiSegment))
23034
- return;
23035
- let e4 = function(e5, t4) {
23036
- let s4, i5, n3, r4 = /* @__PURE__ */ new Map();
23037
- for (let a4 = 0; a4 < e5.length; a4++)
23038
- 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);
23039
22890
  return Array.from(r4);
23040
- }(this.appSegments, "type");
23041
- this.mergedAppSegments = e4.map(([e5, t4]) => {
22891
+ })(this.appSegments, "type");
22892
+ this.mergedAppSegments = e4.map((([e5, t4]) => {
23042
22893
  let s4 = y3.get(e5, this.options);
23043
22894
  if (s4.handleMultiSegments) {
23044
22895
  return { type: e5, chunk: s4.handleMultiSegments(t4) };
23045
22896
  }
23046
22897
  return t4[0];
23047
- });
22898
+ }));
23048
22899
  }
23049
22900
  getSegment(e4) {
23050
- return this.appSegments.find((t4) => t4.type === e4);
22901
+ return this.appSegments.find(((t4) => t4.type === e4));
23051
22902
  }
23052
22903
  async getOrFindSegment(e4) {
23053
22904
  let t4 = this.getSegment(e4);
@@ -23062,38 +22913,31 @@ Uppy plugins must have unique \`id\` options.`;
23062
22913
  18761 === e4 ? this.le = true : 19789 === e4 && (this.le = false), this.chunk.le = this.le, this.headerParsed = true;
23063
22914
  }
23064
22915
  parseTags(e4, t4, s4 = /* @__PURE__ */ new Map()) {
23065
- let { pick: i5, skip: n3 } = this.options[t4];
23066
- i5 = new Set(i5);
23067
- 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);
23068
22919
  e4 += 2;
23069
22920
  for (let f5 = 0; f5 < h4; f5++) {
23070
22921
  let h5 = this.chunk.getUint16(e4);
23071
22922
  if (r4) {
23072
- if (i5.has(h5) && (s4.set(h5, this.parseTag(e4, h5, t4)), i5.delete(h5), 0 === i5.size))
23073
- break;
23074
- } else
23075
- !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));
23076
22925
  e4 += 12;
23077
22926
  }
23078
22927
  return s4;
23079
22928
  }
23080
22929
  parseTag(e4, t4, s4) {
23081
- let { chunk: i5 } = this, n3 = i5.getUint16(e4 + 2), r4 = i5.getUint32(e4 + 4), a4 = te[n3];
23082
- 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)
23083
- return i5.getUint8Array(e4, r4);
23084
- if (2 === n3)
23085
- return "" === (h4 = function(e5) {
23086
- for (; e5.endsWith("\0"); )
23087
- e5 = e5.slice(0, -1);
23088
- return e5;
23089
- }(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;
23090
22936
  var h4;
23091
- if (7 === n3)
23092
- return i5.getUint8Array(e4, r4);
23093
- if (1 === r4)
23094
- return this.parseTagValue(n3, e4);
22937
+ if (7 === n3) return i4.getUint8Array(e4, r4);
22938
+ if (1 === r4) return this.parseTagValue(n3, e4);
23095
22939
  {
23096
- let t5 = new (function(e5) {
22940
+ let t5 = new ((function(e5) {
23097
22941
  switch (e5) {
23098
22942
  case 1:
23099
22943
  return Uint8Array;
@@ -23118,9 +22962,8 @@ Uppy plugins must have unique \`id\` options.`;
23118
22962
  default:
23119
22963
  return Array;
23120
22964
  }
23121
- }(n3))(r4), s5 = a4;
23122
- for (let i6 = 0; i6 < r4; i6++)
23123
- 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;
23124
22967
  return t5;
23125
22968
  }
23126
22969
  }
@@ -23182,8 +23025,7 @@ Uppy plugins must have unique \`id\` options.`;
23182
23025
  return this[t4] = s4, this.parseTags(e4, t4, s4), s4;
23183
23026
  }
23184
23027
  async parseIfd0Block() {
23185
- if (this.ifd0)
23186
- return;
23028
+ if (this.ifd0) return;
23187
23029
  let { file: e4 } = this;
23188
23030
  this.findIfd0Offset(), this.ifd0Offset < 8 && l3("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l3(`IFD0 offset points to outside of file.
23189
23031
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o3(this.options));
@@ -23191,10 +23033,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23191
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;
23192
23034
  }
23193
23035
  async parseExifBlock() {
23194
- if (this.exif)
23195
- return;
23196
- if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset)
23197
- return;
23036
+ if (this.exif) return;
23037
+ if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset) return;
23198
23038
  this.file.tiff && await this.file.ensureChunk(this.exifOffset, o3(this.options));
23199
23039
  let e4 = this.parseBlock(this.exifOffset, "exif");
23200
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;
@@ -23204,24 +23044,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23204
23044
  s4 && 1 === s4.length && e4.set(t4, s4[0]);
23205
23045
  }
23206
23046
  async parseGpsBlock() {
23207
- if (this.gps)
23208
- return;
23209
- if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset)
23210
- return;
23047
+ if (this.gps) return;
23048
+ if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset) return;
23211
23049
  let e4 = this.parseBlock(this.gpsOffset, "gps");
23212
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;
23213
23051
  }
23214
23052
  async parseInteropBlock() {
23215
- if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), void 0 !== this.interopOffset || this.exif || await this.parseExifBlock(), void 0 !== this.interopOffset))
23216
- 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");
23217
23054
  }
23218
23055
  async parseThumbnailBlock(e4 = false) {
23219
- if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e4))
23220
- 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;
23221
23057
  }
23222
23058
  async extractThumbnail() {
23223
- if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1)
23224
- return;
23059
+ if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1) return;
23225
23060
  let e4 = this.ifd1.get(513), t4 = this.ifd1.get(514);
23226
23061
  return this.chunk.getUint8Array(e4, t4);
23227
23062
  }
@@ -23232,28 +23067,21 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23232
23067
  return this.ifd1;
23233
23068
  }
23234
23069
  createOutput() {
23235
- let e4, t4, s4, i5 = {};
23236
- for (t4 of P4)
23237
- if (e4 = this[t4], !f4(e4))
23238
- if (s4 = this.canTranslate ? this.translateBlock(e4, t4) : Object.fromEntries(e4), this.options.mergeOutput) {
23239
- if ("ifd1" === t4)
23240
- continue;
23241
- Object.assign(i5, s4);
23242
- } else
23243
- i5[t4] = s4;
23244
- 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;
23245
23076
  }
23246
23077
  assignToOutput(e4, t4) {
23247
- if (this.globalOptions.mergeOutput)
23248
- Object.assign(e4, t4);
23249
- else
23250
- for (let [s4, i5] of Object.entries(t4))
23251
- 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);
23252
23080
  }
23253
23081
  };
23254
- function ne(e4, t4, s4, i5) {
23082
+ function ne(e4, t4, s4, i4) {
23255
23083
  var n3 = e4 + t4 / 60 + s4 / 3600;
23256
- return "S" !== i5 && "W" !== i5 || (n3 *= -1), n3;
23084
+ return "S" !== i4 && "W" !== i4 || (n3 *= -1), n3;
23257
23085
  }
23258
23086
  e3(ie, "type", "tiff"), e3(ie, "headerLength", 10), y3.set("tiff", ie);
23259
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 });
@@ -23265,8 +23093,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23265
23093
  let t4 = new H3(de);
23266
23094
  await t4.read(e4);
23267
23095
  let s4 = await t4.parse();
23268
- if (s4 && s4.ifd0)
23269
- return s4.ifd0[274];
23096
+ if (s4 && s4.ifd0) return s4.ifd0[274];
23270
23097
  }
23271
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 } });
23272
23099
  var ge = true;
@@ -23276,8 +23103,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23276
23103
  if (e4.includes("iPad") || e4.includes("iPhone")) {
23277
23104
  let t4 = e4.match(/OS (\d+)_(\d+)/);
23278
23105
  if (t4) {
23279
- let [, e5, s4] = t4, i5 = Number(e5) + 0.1 * Number(s4);
23280
- 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;
23281
23108
  }
23282
23109
  } else if (e4.includes("OS X 10")) {
23283
23110
  let [, t4] = e4.match(/OS X 10[_.](\d+)/);
@@ -23322,8 +23149,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23322
23149
  }
23323
23150
  set(e4, t4, s4 = false) {
23324
23151
  s4 && this._tryExtend(t4, e4.byteLength, e4);
23325
- let i5 = super.set(e4, t4);
23326
- return this.ranges.add(t4, i5.byteLength), i5;
23152
+ let i4 = super.set(e4, t4);
23153
+ return this.ranges.add(t4, i4.byteLength), i4;
23327
23154
  }
23328
23155
  async ensureChunk(e4, t4) {
23329
23156
  this.chunked && (this.ranges.available(e4, t4) || await this.readChunk(e4, t4));
@@ -23340,17 +23167,16 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23340
23167
  return this.list.length;
23341
23168
  }
23342
23169
  add(e4, t4, s4 = 0) {
23343
- 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)));
23344
23171
  if (n3.length > 0) {
23345
- 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;
23346
23173
  let s5 = n3.shift();
23347
- s5.offset = e4, s5.length = t4, s5.end = i5, this.list = this.list.filter((e5) => !n3.includes(e5));
23348
- } else
23349
- 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 });
23350
23176
  }
23351
23177
  available(e4, t4) {
23352
23178
  let s4 = e4 + t4;
23353
- return this.list.some((t5) => t5.offset <= e4 && s4 <= t5.end);
23179
+ return this.list.some(((t5) => t5.offset <= e4 && s4 <= t5.end));
23354
23180
  }
23355
23181
  };
23356
23182
  function ke(e4, t4, s4) {
@@ -23367,21 +23193,18 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23367
23193
  this.chunked = true, await this.readChunk(0, this.options.firstChunkSize);
23368
23194
  }
23369
23195
  async readNextChunk(e4 = this.nextChunkOffset) {
23370
- if (this.fullyRead)
23371
- return this.chunksRead++, false;
23196
+ if (this.fullyRead) return this.chunksRead++, false;
23372
23197
  let t4 = this.options.chunkSize, s4 = await this.readChunk(e4, t4);
23373
23198
  return !!s4 && s4.byteLength === t4;
23374
23199
  }
23375
23200
  async readChunk(e4, t4) {
23376
- if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4)))
23377
- return this._readChunk(e4, t4);
23201
+ if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4))) return this._readChunk(e4, t4);
23378
23202
  }
23379
23203
  safeWrapAddress(e4, t4) {
23380
23204
  return void 0 !== this.size && e4 + t4 > this.size ? Math.max(0, this.size - e4) : t4;
23381
23205
  }
23382
23206
  get nextChunkOffset() {
23383
- if (0 !== this.ranges.list.length)
23384
- return this.ranges.list[0].length;
23207
+ if (0 !== this.ranges.list.length) return this.ranges.list[0].length;
23385
23208
  }
23386
23209
  get canReadNextChunk() {
23387
23210
  return this.chunksRead < this.options.chunkLimit;
@@ -23405,7 +23228,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23405
23228
  return this.chunked = true, this.size = this.input.size, super.readChunked();
23406
23229
  }
23407
23230
  async _readChunk(e4, t4) {
23408
- 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);
23409
23232
  return this.set(n3, e4, true);
23410
23233
  }
23411
23234
  });
@@ -24068,7 +23891,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24068
23891
  browse: browseFiles
24069
23892
  }) });
24070
23893
  };
24071
- [Symbol.for("uppy test: disable unused locale key warning")]() {
23894
+ [/* @__PURE__ */ Symbol.for("uppy test: disable unused locale key warning")]() {
24072
23895
  this.props.i18nArray("dropPasteBoth");
24073
23896
  this.props.i18nArray("dropPasteFiles");
24074
23897
  this.props.i18nArray("dropPasteFolders");
@@ -24375,8 +24198,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24375
24198
  if (bKeys.length !== len) {
24376
24199
  return false;
24377
24200
  }
24378
- for (let i5 = 0; i5 < len; i5++) {
24379
- const key = aKeys[i5];
24201
+ for (let i4 = 0; i4 < len; i4++) {
24202
+ const key = aKeys[i4];
24380
24203
  if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
24381
24204
  return false;
24382
24205
  }
@@ -24769,8 +24592,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24769
24592
  }
24770
24593
  let state = uploadStates.STATE_WAITING;
24771
24594
  const fileIDs = Object.keys(files);
24772
- for (let i5 = 0; i5 < fileIDs.length; i5++) {
24773
- const { progress } = files[fileIDs[i5]];
24595
+ for (let i4 = 0; i4 < fileIDs.length; i4++) {
24596
+ const { progress } = files[fileIDs[i4]];
24774
24597
  if (progress.uploadStarted && !progress.uploadComplete) {
24775
24598
  return uploadStates.STATE_UPLOADING;
24776
24599
  }
@@ -26717,7 +26540,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26717
26540
  resume() {
26718
26541
  this.#paused = false;
26719
26542
  clearTimeout(this.#pauseTimer);
26720
- for (let i5 = 0; i5 < this.limit; i5++) {
26543
+ for (let i4 = 0; i4 < this.limit; i4++) {
26721
26544
  this.#queueNext();
26722
26545
  }
26723
26546
  }
@@ -26761,7 +26584,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26761
26584
  }
26762
26585
  this.#downLimit = this.limit;
26763
26586
  this.limit = Math.ceil((this.#upperLimit + this.#downLimit) / 2);
26764
- for (let i5 = this.#downLimit; i5 <= this.limit; i5++) {
26587
+ for (let i4 = this.#downLimit; i4 <= this.limit; i4++) {
26765
26588
  this.#queueNext();
26766
26589
  }
26767
26590
  if (this.#upperLimit - this.#downLimit > 3) {
@@ -26774,7 +26597,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26774
26597
  return this.#paused;
26775
26598
  }
26776
26599
  };
26777
- var internalRateLimitedQueue = Symbol("__queue");
26600
+ var internalRateLimitedQueue = /* @__PURE__ */ Symbol("__queue");
26778
26601
 
26779
26602
  // node_modules/@uppy/utils/lib/NetworkError.js
26780
26603
  var NetworkError = class extends Error {
@@ -26923,8 +26746,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26923
26746
 
26924
26747
  // node_modules/@uppy/xhr-upload/lib/index.js
26925
26748
  function _classPrivateFieldLooseBase(e4, t4) {
26926
- if (!{}.hasOwnProperty.call(e4, t4))
26927
- 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");
26928
26750
  return e4;
26929
26751
  }
26930
26752
  var id = 0;
@@ -26936,10 +26758,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26936
26758
  };
26937
26759
  function buildResponseError(xhr, err) {
26938
26760
  let error2 = err;
26939
- if (!error2)
26940
- error2 = new Error("Upload error");
26941
- if (typeof error2 === "string")
26942
- error2 = new Error(error2);
26761
+ if (!error2) error2 = new Error("Upload error");
26762
+ if (typeof error2 === "string") error2 = new Error(error2);
26943
26763
  if (!(error2 instanceof Error)) {
26944
26764
  error2 = Object.assign(new Error("Upload error"), {
26945
26765
  data: error2
@@ -27291,8 +27111,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27291
27111
  const getQueue = () => this.requests;
27292
27112
  const controller = new AbortController();
27293
27113
  const removedHandler = (removedFile) => {
27294
- if (removedFile.id === file.id)
27295
- controller.abort();
27114
+ if (removedFile.id === file.id) controller.abort();
27296
27115
  };
27297
27116
  this.uppy.on("file-removed", removedHandler);
27298
27117
  const uploadPromise = this.uppy.getRequestClientForFile(file).uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {
@@ -27336,17 +27155,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27336
27155
  function isPossiblyDangerous(name, value) {
27337
27156
  let val = value.replace(/\s+/g, "").toLowerCase();
27338
27157
  if (["src", "href", "xlink:href"].includes(name)) {
27339
- if (val.includes("javascript:") || val.includes("data:"))
27340
- return true;
27158
+ if (val.includes("javascript:") || val.includes("data:")) return true;
27341
27159
  }
27342
- if (name.startsWith("on"))
27343
- return true;
27160
+ if (name.startsWith("on")) return true;
27344
27161
  }
27345
27162
  function removePossiblyDangerousAttributes(elem) {
27346
27163
  let atts = elem.attributes;
27347
27164
  for (let { name, value } of atts) {
27348
- if (!isPossiblyDangerous(name, value))
27349
- continue;
27165
+ if (!isPossiblyDangerous(name, value)) continue;
27350
27166
  elem.removeAttribute(name);
27351
27167
  }
27352
27168
  }
@@ -27374,8 +27190,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27374
27190
  static outlets = ["attachment-preview", "attachment-preview-container"];
27375
27191
  //======= Lifecycle
27376
27192
  connect() {
27377
- if (this.uppy)
27378
- return;
27193
+ if (this.uppy) return;
27379
27194
  this.uploadedFiles = [];
27380
27195
  this.element.style["display"] = "none";
27381
27196
  this.configureUppy();
@@ -27395,8 +27210,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27395
27210
  this.#cleanupUppy();
27396
27211
  }
27397
27212
  #handleMorph() {
27398
- if (!this.element.isConnected)
27399
- return;
27213
+ if (!this.element.isConnected) return;
27400
27214
  this.#cleanupUppy();
27401
27215
  this.uploadedFiles = [];
27402
27216
  this.element.style["display"] = "none";
@@ -27450,14 +27264,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27450
27264
  let theme = document.documentElement.getAttribute("data-bs-theme") || "auto";
27451
27265
  this.#dashboard.setOptions({ theme });
27452
27266
  let file = null;
27453
- while (file = this.uploadedFiles.pop())
27454
- this.uppy.removeFile(file.id);
27267
+ while (file = this.uploadedFiles.pop()) this.uppy.removeFile(file.id);
27455
27268
  this.#dashboard.openModal();
27456
27269
  }
27457
27270
  #onUploadSuccess(file, response) {
27458
27271
  this.uploadedFiles.push(file);
27459
- if (!this.multiple)
27460
- this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
27272
+ if (!this.multiple) this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
27461
27273
  const uploadedFileData = response.body["data"];
27462
27274
  const uploadedFileUrl = response.body["url"];
27463
27275
  this.attachmentPreviewContainerOutlet.element.appendChild(
@@ -27465,8 +27277,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27465
27277
  );
27466
27278
  }
27467
27279
  #onAttachmentsChanged() {
27468
- if (!this.deleteAllTrigger)
27469
- return;
27280
+ if (!this.deleteAllTrigger) return;
27470
27281
  const len = this.attachmentPreviewOutlets.length;
27471
27282
  if (len > 1) {
27472
27283
  this.deleteAllTrigger.style["display"] = "initial";
@@ -27481,10 +27292,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27481
27292
  this.triggerContainer.className = "flex items-center gap-2";
27482
27293
  this.element.insertAdjacentElement("afterend", this.triggerContainer);
27483
27294
  this.#buildUploadTrigger();
27484
- if (this.uploadTrigger)
27485
- this.triggerContainer.append(this.uploadTrigger);
27486
- if (this.deleteAllTrigger)
27487
- this.triggerContainer.append(this.deleteAllTrigger);
27295
+ if (this.uploadTrigger) this.triggerContainer.append(this.uploadTrigger);
27296
+ if (this.deleteAllTrigger) this.triggerContainer.append(this.deleteAllTrigger);
27488
27297
  }
27489
27298
  #buildUploadTrigger() {
27490
27299
  const triggerPrompt = this.multiple ? "Choose files" : "Choose file";
@@ -27507,8 +27316,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27507
27316
  false
27508
27317
  );
27509
27318
  this.deleteAllTrigger.addEventListener("click", () => {
27510
- if (confirm("Are you sure?"))
27511
- this.attachmentPreviewContainerOutlet.clear();
27319
+ if (confirm("Are you sure?")) this.attachmentPreviewContainerOutlet.clear();
27512
27320
  });
27513
27321
  }
27514
27322
  #buildPreview(data, url) {
@@ -27632,8 +27440,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27632
27440
  color: "#838999",
27633
27441
  icon: iconFile2()
27634
27442
  };
27635
- if (!fileType)
27636
- return defaultChoice;
27443
+ if (!fileType) return defaultChoice;
27637
27444
  const fileTypeGeneral = fileType.split("/")[0];
27638
27445
  const fileTypeSpecific = fileType.split("/")[1];
27639
27446
  if (fileTypeGeneral === "text") {
@@ -27684,8 +27491,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27684
27491
  thumbnailUrl: String
27685
27492
  };
27686
27493
  connect() {
27687
- if (!this.hasThumbnailTarget)
27688
- return;
27494
+ if (!this.hasThumbnailTarget) return;
27689
27495
  if (this.thumbnailUrlValue) {
27690
27496
  this.useThumbnailPreview();
27691
27497
  } else {
@@ -27753,12 +27559,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27753
27559
  document.removeEventListener("turbo:render", this.afterRender);
27754
27560
  }
27755
27561
  beforeRender() {
27756
- if (this.hasScrollTarget)
27757
- savedScrollTop = this.scrollTarget.scrollTop;
27562
+ if (this.hasScrollTarget) savedScrollTop = this.scrollTarget.scrollTop;
27758
27563
  }
27759
27564
  afterRender() {
27760
- if (this.hasScrollTarget)
27761
- this.scrollTarget.scrollTop = savedScrollTop;
27565
+ if (this.hasScrollTarget) this.scrollTarget.scrollTop = savedScrollTop;
27762
27566
  }
27763
27567
  };
27764
27568
 
@@ -27799,8 +27603,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27799
27603
  this.restoreBodyState();
27800
27604
  }
27801
27605
  restoreBodyState() {
27802
- if (this.bodyStateRestored)
27803
- return;
27606
+ if (this.bodyStateRestored) return;
27804
27607
  this.bodyStateRestored = true;
27805
27608
  document.body.style.overflow = this.originalOverflow || "";
27806
27609
  window.scrollTo(0, this.originalScrollPosition);
@@ -27951,8 +27754,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27951
27754
  return /* @__PURE__ */ new Set();
27952
27755
  }
27953
27756
  let intersection = new Set(this.getAllowedActionsForCheckbox(checked[0]));
27954
- for (let i5 = 1; i5 < checked.length; i5++) {
27955
- const actions = this.getAllowedActionsForCheckbox(checked[i5]);
27757
+ for (let i4 = 1; i4 < checked.length; i4++) {
27758
+ const actions = this.getAllowedActionsForCheckbox(checked[i4]);
27956
27759
  intersection = new Set([...intersection].filter((a4) => actions.includes(a4)));
27957
27760
  }
27958
27761
  return intersection;
@@ -27997,8 +27800,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27997
27800
  this.panelTarget.setAttribute("data-open", "");
27998
27801
  this.panelTarget.setAttribute("aria-hidden", "false");
27999
27802
  }
28000
- if (this.hasBackdropTarget)
28001
- this.backdropTarget.setAttribute("data-open", "");
27803
+ if (this.hasBackdropTarget) this.backdropTarget.setAttribute("data-open", "");
28002
27804
  this._lockBodyScroll();
28003
27805
  document.addEventListener("keydown", this._onKeydown);
28004
27806
  }
@@ -28007,8 +27809,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28007
27809
  this.panelTarget.removeAttribute("data-open");
28008
27810
  this.panelTarget.setAttribute("aria-hidden", "true");
28009
27811
  }
28010
- if (this.hasBackdropTarget)
28011
- this.backdropTarget.removeAttribute("data-open");
27812
+ if (this.hasBackdropTarget) this.backdropTarget.removeAttribute("data-open");
28012
27813
  this._unlockBodyScroll();
28013
27814
  document.removeEventListener("keydown", this._onKeydown);
28014
27815
  }
@@ -28016,14 +27817,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28016
27817
  // and restore it on close. Avoids stomping a value another component
28017
27818
  // (e.g. an open dialog) may have set.
28018
27819
  _lockBodyScroll() {
28019
- if (this._previousBodyOverflow != null)
28020
- return;
27820
+ if (this._previousBodyOverflow != null) return;
28021
27821
  this._previousBodyOverflow = document.body.style.overflow;
28022
27822
  document.body.style.overflow = "hidden";
28023
27823
  }
28024
27824
  _unlockBodyScroll() {
28025
- if (this._previousBodyOverflow == null)
28026
- return;
27825
+ if (this._previousBodyOverflow == null) return;
28027
27826
  document.body.style.overflow = this._previousBodyOverflow;
28028
27827
  this._previousBodyOverflow = null;
28029
27828
  }
@@ -28036,27 +27835,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28036
27835
  } else if (input.tagName === "SELECT") {
28037
27836
  input.selectedIndex = 0;
28038
27837
  } else if (input.type === "hidden") {
28039
- if (input.dataset.controller === "flatpickr")
28040
- input.value = "";
27838
+ if (input.dataset.controller === "flatpickr") input.value = "";
28041
27839
  } else {
28042
27840
  input.value = "";
28043
27841
  }
28044
27842
  });
28045
27843
  this.element.querySelectorAll('[data-controller="flatpickr"]').forEach((input) => {
28046
27844
  const controller = this.application.getControllerForElementAndIdentifier(input, "flatpickr");
28047
- if (controller?.picker)
28048
- controller.picker.clear();
27845
+ if (controller?.picker) controller.picker.clear();
28049
27846
  });
28050
27847
  const form = this.element.querySelector("form");
28051
- if (form)
28052
- form.requestSubmit();
27848
+ if (form) form.requestSubmit();
28053
27849
  }
28054
27850
  get isOpen() {
28055
27851
  return this.hasPanelTarget && this.panelTarget.hasAttribute("data-open");
28056
27852
  }
28057
27853
  _onKeydown(event) {
28058
- if (event.key === "Escape")
28059
- this.close();
27854
+ if (event.key === "Escape") this.close();
28060
27855
  }
28061
27856
  };
28062
27857
 
@@ -28181,23 +27976,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28181
27976
  clearTimeout(this._closeTimer);
28182
27977
  this._closeTimer = null;
28183
27978
  }
28184
- if (this._open)
28185
- return;
28186
- if (!this._panel && !this.hasPanelTarget)
28187
- return;
27979
+ if (this._open) return;
27980
+ if (!this._panel && !this.hasPanelTarget) return;
28188
27981
  this._open = true;
28189
27982
  this.element.dataset.flyoutOpen = "true";
28190
27983
  this._portalPanel();
28191
27984
  this._position();
28192
27985
  }
28193
27986
  scheduleClose() {
28194
- if (this._closeTimer)
28195
- clearTimeout(this._closeTimer);
27987
+ if (this._closeTimer) clearTimeout(this._closeTimer);
28196
27988
  this._closeTimer = setTimeout(() => this.close(), this.closeDelayValue);
28197
27989
  }
28198
27990
  close() {
28199
- if (!this._open)
28200
- return;
27991
+ if (!this._open) return;
28201
27992
  this._open = false;
28202
27993
  delete this.element.dataset.flyoutOpen;
28203
27994
  this._returnPanel();
@@ -28207,15 +27998,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28207
27998
  this._open ? this.close() : this.open();
28208
27999
  }
28209
28000
  closeOnEsc(event) {
28210
- if (event.key === "Escape")
28211
- this.close();
28001
+ if (event.key === "Escape") this.close();
28212
28002
  }
28213
28003
  _portalPanel() {
28214
- if (this._panel)
28215
- return;
28004
+ if (this._panel) return;
28216
28005
  const panel = this.panelTarget;
28217
- if (!panel)
28218
- return;
28006
+ if (!panel) return;
28219
28007
  this._panel = panel;
28220
28008
  this._panelHome = panel.parentElement;
28221
28009
  panel.addEventListener("mouseenter", this._onPanelEnter);
@@ -28224,8 +28012,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28224
28012
  panel.style.display = "block";
28225
28013
  }
28226
28014
  _returnPanel() {
28227
- if (!this._panel)
28228
- return;
28015
+ if (!this._panel) return;
28229
28016
  const panel = this._panel;
28230
28017
  panel.removeEventListener("mouseenter", this._onPanelEnter);
28231
28018
  panel.removeEventListener("mouseleave", this._onPanelLeave);
@@ -28242,8 +28029,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28242
28029
  this._panelHome = null;
28243
28030
  }
28244
28031
  _position() {
28245
- if (!this._panel || !this.hasTriggerTarget)
28246
- return;
28032
+ if (!this._panel || !this.hasTriggerTarget) return;
28247
28033
  const panel = this._panel;
28248
28034
  const triggerRect = this.triggerTarget.getBoundingClientRect();
28249
28035
  panel.style.position = "fixed";
@@ -28263,12 +28049,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28263
28049
  // src/js/controllers/table_header_controller.js
28264
28050
  var table_header_controller_default = class extends Controller {
28265
28051
  headerClick(event) {
28266
- if (!event.shiftKey)
28267
- return;
28052
+ if (!event.shiftKey) return;
28268
28053
  const link2 = event.currentTarget;
28269
28054
  const multiHref = link2.dataset.tableHeaderMultiHref;
28270
- if (!multiHref)
28271
- return;
28055
+ if (!multiHref) return;
28272
28056
  event.preventDefault();
28273
28057
  Turbo.visit(multiHref);
28274
28058
  }
@@ -28288,8 +28072,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28288
28072
  if (isNowVisible) {
28289
28073
  document.addEventListener("click", this._onDocClick);
28290
28074
  this._onKey = (e4) => {
28291
- if (e4.key === "Escape")
28292
- this._close();
28075
+ if (e4.key === "Escape") this._close();
28293
28076
  };
28294
28077
  document.addEventListener("keydown", this._onKey);
28295
28078
  } else {
@@ -28298,8 +28081,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28298
28081
  }
28299
28082
  }
28300
28083
  _close() {
28301
- if (this.hasPanelTarget)
28302
- this.panelTarget.classList.add("hidden");
28084
+ if (this.hasPanelTarget) this.panelTarget.classList.add("hidden");
28303
28085
  this._unbind();
28304
28086
  }
28305
28087
  _unbind() {
@@ -28310,8 +28092,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28310
28092
  }
28311
28093
  }
28312
28094
  _onDocClick(event) {
28313
- if (!this.element.contains(event.target))
28314
- this._close();
28095
+ if (!this.element.contains(event.target)) this._close();
28315
28096
  }
28316
28097
  };
28317
28098
 
@@ -28339,8 +28120,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28339
28120
  static values = { cookieName: String, cookiePath: { type: String, default: "/" } };
28340
28121
  select(event) {
28341
28122
  const view = event.params.view;
28342
- if (!view || !this.cookieNameValue)
28343
- return;
28123
+ if (!view || !this.cookieNameValue) return;
28344
28124
  const maxAge = 60 * 60 * 24 * 365;
28345
28125
  const path = this.cookiePathValue || "/";
28346
28126
  document.cookie = `${this.cookieNameValue}=${encodeURIComponent(view)}; Path=${path}; Max-Age=${maxAge}; SameSite=Lax`;
@@ -28357,12 +28137,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28357
28137
  this._timer = null;
28358
28138
  }
28359
28139
  disconnect() {
28360
- if (this._timer)
28361
- clearTimeout(this._timer);
28140
+ if (this._timer) clearTimeout(this._timer);
28362
28141
  }
28363
28142
  submit() {
28364
- if (this._timer)
28365
- clearTimeout(this._timer);
28143
+ if (this._timer) clearTimeout(this._timer);
28366
28144
  this._timer = setTimeout(() => {
28367
28145
  this.element.closest("form")?.requestSubmit();
28368
28146
  }, this.delayValue);
@@ -28412,6 +28190,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28412
28190
  const url = this.getAttribute("url");
28413
28191
  Turbo.visit(url);
28414
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
+ };
28415
28210
 
28416
28211
  // src/js/plutonium.js
28417
28212
  var application = Application.start();
@@ -28447,7 +28242,7 @@ cropperjs/dist/cropper.js:
28447
28242
  *)
28448
28243
 
28449
28244
  dompurify/dist/purify.es.mjs:
28450
- (*! @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 *)
28451
28246
 
28452
28247
  @uppy/utils/lib/Translator.js:
28453
28248
  (**