plutonium 0.36.0 → 0.37.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.
@@ -37,27 +37,27 @@
37
37
  emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6]);
38
38
  }
39
39
  };
40
- emitter.on = function on2(event, fn3) {
40
+ emitter.on = function on(event, fn2) {
41
41
  if (!_fns[event]) {
42
42
  _fns[event] = [];
43
43
  }
44
- _fns[event].push(fn3);
44
+ _fns[event].push(fn2);
45
45
  };
46
- emitter.once = function once(event, fn3) {
46
+ emitter.once = function once(event, fn2) {
47
47
  function one() {
48
- fn3.apply(this, arguments);
48
+ fn2.apply(this, arguments);
49
49
  emitter.off(event, one);
50
50
  }
51
51
  this.on(event, one);
52
52
  };
53
- emitter.off = function off(event, fn3) {
53
+ emitter.off = function off(event, fn2) {
54
54
  var keep = [];
55
- if (event && fn3) {
55
+ if (event && fn2) {
56
56
  var fns = this._fns[event];
57
57
  var i4 = 0;
58
58
  var l4 = fns ? fns.length : 0;
59
59
  for (i4; i4 < l4; i4++) {
60
- if (fns[i4] !== fn3) {
60
+ if (fns[i4] !== fn2) {
61
61
  keep.push(fns[i4]);
62
62
  }
63
63
  }
@@ -580,16 +580,16 @@
580
580
  if (!new Events().__proto__)
581
581
  prefix = false;
582
582
  }
583
- function EE(fn3, context, once) {
584
- this.fn = fn3;
583
+ function EE(fn2, context, once) {
584
+ this.fn = fn2;
585
585
  this.context = context;
586
586
  this.once = once || false;
587
587
  }
588
- function addListener(emitter, event, fn3, context, once) {
589
- if (typeof fn3 !== "function") {
588
+ function addListener(emitter, event, fn2, context, once) {
589
+ if (typeof fn2 !== "function") {
590
590
  throw new TypeError("The listener must be a function");
591
591
  }
592
- var listener = new EE(fn3, context || emitter, once), evt = prefix ? prefix + event : event;
592
+ var listener = new EE(fn2, context || emitter, once), evt = prefix ? prefix + event : event;
593
593
  if (!emitter._events[evt])
594
594
  emitter._events[evt] = listener, emitter._eventsCount++;
595
595
  else if (!emitter._events[evt].fn)
@@ -667,7 +667,7 @@
667
667
  }
668
668
  listeners.fn.apply(listeners.context, args);
669
669
  } else {
670
- var length = listeners.length, j5;
670
+ var length = listeners.length, j4;
671
671
  for (i4 = 0; i4 < length; i4++) {
672
672
  if (listeners[i4].once)
673
673
  this.removeListener(event, listeners[i4].fn, void 0, true);
@@ -686,8 +686,8 @@
686
686
  break;
687
687
  default:
688
688
  if (!args)
689
- for (j5 = 1, args = new Array(len - 1); j5 < len; j5++) {
690
- args[j5 - 1] = arguments[j5];
689
+ for (j4 = 1, args = new Array(len - 1); j4 < len; j4++) {
690
+ args[j4 - 1] = arguments[j4];
691
691
  }
692
692
  listeners[i4].fn.apply(listeners[i4].context, args);
693
693
  }
@@ -695,28 +695,28 @@
695
695
  }
696
696
  return true;
697
697
  };
698
- EventEmitter2.prototype.on = function on2(event, fn3, context) {
699
- return addListener(this, event, fn3, context, false);
698
+ EventEmitter2.prototype.on = function on(event, fn2, context) {
699
+ return addListener(this, event, fn2, context, false);
700
700
  };
701
- EventEmitter2.prototype.once = function once(event, fn3, context) {
702
- return addListener(this, event, fn3, context, true);
701
+ EventEmitter2.prototype.once = function once(event, fn2, context) {
702
+ return addListener(this, event, fn2, context, true);
703
703
  };
704
- EventEmitter2.prototype.removeListener = function removeListener(event, fn3, context, once) {
704
+ EventEmitter2.prototype.removeListener = function removeListener(event, fn2, context, once) {
705
705
  var evt = prefix ? prefix + event : event;
706
706
  if (!this._events[evt])
707
707
  return this;
708
- if (!fn3) {
708
+ if (!fn2) {
709
709
  clearEvent(this, evt);
710
710
  return this;
711
711
  }
712
712
  var listeners = this._events[evt];
713
713
  if (listeners.fn) {
714
- if (listeners.fn === fn3 && (!once || listeners.once) && (!context || listeners.context === context)) {
714
+ if (listeners.fn === fn2 && (!once || listeners.once) && (!context || listeners.context === context)) {
715
715
  clearEvent(this, evt);
716
716
  }
717
717
  } else {
718
718
  for (var i4 = 0, events = [], length = listeners.length; i4 < length; i4++) {
719
- if (listeners[i4].fn !== fn3 || once && !listeners[i4].once || context && listeners[i4].context !== context) {
719
+ if (listeners[i4].fn !== fn2 || once && !listeners[i4].once || context && listeners[i4].context !== context) {
720
720
  events.push(listeners[i4]);
721
721
  }
722
722
  }
@@ -998,9 +998,9 @@
998
998
  zoom: null
999
999
  };
1000
1000
  var TEMPLATE = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';
1001
- var isNaN = Number.isNaN || WINDOW.isNaN;
1001
+ var isNaN2 = Number.isNaN || WINDOW.isNaN;
1002
1002
  function isNumber(value) {
1003
- return typeof value === "number" && !isNaN(value);
1003
+ return typeof value === "number" && !isNaN2(value);
1004
1004
  }
1005
1005
  var isPositiveNumber = function isPositiveNumber2(value) {
1006
1006
  return value > 0 && value < Infinity;
@@ -2683,15 +2683,15 @@
2683
2683
  * @param {number} [y=x] - The y-axis coordinate.
2684
2684
  * @returns {Cropper} this
2685
2685
  */
2686
- moveTo: function moveTo(x4) {
2687
- var y4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x4;
2686
+ moveTo: function moveTo(x3) {
2687
+ var y4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x3;
2688
2688
  var canvasData = this.canvasData;
2689
2689
  var changed = false;
2690
- x4 = Number(x4);
2690
+ x3 = Number(x3);
2691
2691
  y4 = Number(y4);
2692
2692
  if (this.ready && !this.disabled && this.options.movable) {
2693
- if (isNumber(x4)) {
2694
- canvasData.left = x4;
2693
+ if (isNumber(x3)) {
2694
+ canvasData.left = x3;
2695
2695
  changed = true;
2696
2696
  }
2697
2697
  if (isNumber(y4)) {
@@ -3840,7 +3840,7 @@
3840
3840
  }, "");
3841
3841
  }
3842
3842
  function uuid() {
3843
- return Array.from({ length: 36 }).map((_4, i4) => {
3843
+ return Array.from({ length: 36 }).map((_3, i4) => {
3844
3844
  if (i4 == 8 || i4 == 13 || i4 == 18 || i4 == 23) {
3845
3845
  return "-";
3846
3846
  } else if (i4 == 14) {
@@ -3968,10 +3968,10 @@
3968
3968
  function getLocationForLink(link2) {
3969
3969
  return expandURL(link2.getAttribute("href") || "");
3970
3970
  }
3971
- function debounce(fn3, delay) {
3971
+ function debounce(fn2, delay) {
3972
3972
  let timeoutId = null;
3973
3973
  return (...args) => {
3974
- const callback = () => fn3.apply(this, args);
3974
+ const callback = () => fn2.apply(this, args);
3975
3975
  clearTimeout(timeoutId);
3976
3976
  timeoutId = setTimeout(callback, delay);
3977
3977
  };
@@ -4746,8 +4746,8 @@
4746
4746
  }
4747
4747
  }
4748
4748
  }
4749
- scrollToPosition({ x: x4, y: y4 }) {
4750
- this.scrollRoot.scrollTo(x4, y4);
4749
+ scrollToPosition({ x: x3, y: y4 }) {
4750
+ this.scrollRoot.scrollTo(x3, y4);
4751
4751
  }
4752
4752
  scrollToTop() {
4753
4753
  this.scrollToPosition({ x: 0, y: 0 });
@@ -5144,10 +5144,9 @@
5144
5144
  return defaultValue;
5145
5145
  }
5146
5146
  }
5147
- var Idiomorph = function() {
5148
- const noOp = () => {
5149
- };
5150
- const defaults = {
5147
+ var Idiomorph = /* @__PURE__ */ function() {
5148
+ let EMPTY_SET = /* @__PURE__ */ new Set();
5149
+ let defaults = {
5151
5150
  morphStyle: "outerHTML",
5152
5151
  callbacks: {
5153
5152
  beforeNodeAdded: noOp,
@@ -5160,423 +5159,245 @@
5160
5159
  },
5161
5160
  head: {
5162
5161
  style: "merge",
5163
- shouldPreserve: (elt) => elt.getAttribute("im-preserve") === "true",
5164
- shouldReAppend: (elt) => elt.getAttribute("im-re-append") === "true",
5162
+ shouldPreserve: function(elt) {
5163
+ return elt.getAttribute("im-preserve") === "true";
5164
+ },
5165
+ shouldReAppend: function(elt) {
5166
+ return elt.getAttribute("im-re-append") === "true";
5167
+ },
5165
5168
  shouldRemove: noOp,
5166
5169
  afterHeadMorphed: noOp
5167
- },
5168
- restoreFocus: true
5170
+ }
5169
5171
  };
5170
5172
  function morph(oldNode, newContent, config2 = {}) {
5171
- oldNode = normalizeElement(oldNode);
5172
- const newNode = normalizeParent(newContent);
5173
- const ctx = createMorphContext(oldNode, newNode, config2);
5174
- const morphedNodes = saveAndRestoreFocus(ctx, () => {
5175
- return withHeadBlocking(
5176
- ctx,
5177
- oldNode,
5178
- newNode,
5179
- /** @param {MorphContext} ctx */
5180
- (ctx2) => {
5181
- if (ctx2.morphStyle === "innerHTML") {
5182
- morphChildren2(ctx2, oldNode, newNode);
5183
- return Array.from(oldNode.childNodes);
5184
- } else {
5185
- return morphOuterHTML(ctx2, oldNode, newNode);
5186
- }
5187
- }
5188
- );
5189
- });
5190
- ctx.pantry.remove();
5191
- return morphedNodes;
5192
- }
5193
- function morphOuterHTML(ctx, oldNode, newNode) {
5194
- const oldParent = normalizeParent(oldNode);
5195
- let childNodes = Array.from(oldParent.childNodes);
5196
- const index = childNodes.indexOf(oldNode);
5197
- const rightMargin = childNodes.length - (index + 1);
5198
- morphChildren2(
5199
- ctx,
5200
- oldParent,
5201
- newNode,
5202
- // these two optional params are the secret sauce
5203
- oldNode,
5204
- // start point for iteration
5205
- oldNode.nextSibling
5206
- // end point for iteration
5207
- );
5208
- childNodes = Array.from(oldParent.childNodes);
5209
- return childNodes.slice(index, childNodes.length - rightMargin);
5210
- }
5211
- function saveAndRestoreFocus(ctx, fn3) {
5212
- if (!ctx.config.restoreFocus)
5213
- return fn3();
5214
- let activeElement = (
5215
- /** @type {HTMLInputElement|HTMLTextAreaElement|null} */
5216
- document.activeElement
5217
- );
5218
- if (!(activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement)) {
5219
- return fn3();
5220
- }
5221
- const { id: activeElementId, selectionStart, selectionEnd } = activeElement;
5222
- const results = fn3();
5223
- if (activeElementId && activeElementId !== document.activeElement?.id) {
5224
- activeElement = ctx.target.querySelector(`#${activeElementId}`);
5225
- activeElement?.focus();
5226
- }
5227
- if (activeElement && !activeElement.selectionEnd && selectionEnd) {
5228
- activeElement.setSelectionRange(selectionStart, selectionEnd);
5229
- }
5230
- return results;
5231
- }
5232
- const morphChildren2 = /* @__PURE__ */ function() {
5233
- function morphChildren3(ctx, oldParent, newParent, insertionPoint = null, endPoint = null) {
5234
- if (oldParent instanceof HTMLTemplateElement && newParent instanceof HTMLTemplateElement) {
5235
- oldParent = oldParent.content;
5236
- newParent = newParent.content;
5237
- }
5238
- insertionPoint ||= oldParent.firstChild;
5239
- for (const newChild of newParent.childNodes) {
5240
- if (insertionPoint && insertionPoint != endPoint) {
5241
- const bestMatch = findBestMatch(
5242
- ctx,
5243
- newChild,
5244
- insertionPoint,
5245
- endPoint
5246
- );
5247
- if (bestMatch) {
5248
- if (bestMatch !== insertionPoint) {
5249
- removeNodesBetween(ctx, insertionPoint, bestMatch);
5250
- }
5251
- morphNode(bestMatch, newChild, ctx);
5252
- insertionPoint = bestMatch.nextSibling;
5253
- continue;
5254
- }
5255
- }
5256
- if (newChild instanceof Element && ctx.persistentIds.has(newChild.id)) {
5257
- const movedChild = moveBeforeById(
5258
- oldParent,
5259
- newChild.id,
5260
- insertionPoint,
5261
- ctx
5262
- );
5263
- morphNode(movedChild, newChild, ctx);
5264
- insertionPoint = movedChild.nextSibling;
5265
- continue;
5266
- }
5267
- const insertedNode = createNode(
5268
- oldParent,
5269
- newChild,
5270
- insertionPoint,
5271
- ctx
5272
- );
5273
- if (insertedNode) {
5274
- insertionPoint = insertedNode.nextSibling;
5275
- }
5276
- }
5277
- while (insertionPoint && insertionPoint != endPoint) {
5278
- const tempNode = insertionPoint;
5279
- insertionPoint = insertionPoint.nextSibling;
5280
- removeNode(ctx, tempNode);
5281
- }
5282
- }
5283
- function createNode(oldParent, newChild, insertionPoint, ctx) {
5284
- if (ctx.callbacks.beforeNodeAdded(newChild) === false)
5285
- return null;
5286
- if (ctx.idMap.has(newChild)) {
5287
- const newEmptyChild = document.createElement(
5288
- /** @type {Element} */
5289
- newChild.tagName
5290
- );
5291
- oldParent.insertBefore(newEmptyChild, insertionPoint);
5292
- morphNode(newEmptyChild, newChild, ctx);
5293
- ctx.callbacks.afterNodeAdded(newEmptyChild);
5294
- return newEmptyChild;
5295
- } else {
5296
- const newClonedChild = document.importNode(newChild, true);
5297
- oldParent.insertBefore(newClonedChild, insertionPoint);
5298
- ctx.callbacks.afterNodeAdded(newClonedChild);
5299
- return newClonedChild;
5300
- }
5301
- }
5302
- const findBestMatch = /* @__PURE__ */ function() {
5303
- function findBestMatch2(ctx, node, startPoint, endPoint) {
5304
- let softMatch = null;
5305
- let nextSibling = node.nextSibling;
5306
- let siblingSoftMatchCount = 0;
5307
- let cursor = startPoint;
5308
- while (cursor && cursor != endPoint) {
5309
- if (isSoftMatch(cursor, node)) {
5310
- if (isIdSetMatch(ctx, cursor, node)) {
5311
- return cursor;
5312
- }
5313
- if (softMatch === null) {
5314
- if (!ctx.idMap.has(cursor)) {
5315
- softMatch = cursor;
5316
- }
5317
- }
5318
- }
5319
- if (softMatch === null && nextSibling && isSoftMatch(cursor, nextSibling)) {
5320
- siblingSoftMatchCount++;
5321
- nextSibling = nextSibling.nextSibling;
5322
- if (siblingSoftMatchCount >= 2) {
5323
- softMatch = void 0;
5324
- }
5325
- }
5326
- if (cursor.contains(document.activeElement))
5327
- break;
5328
- cursor = cursor.nextSibling;
5329
- }
5330
- return softMatch || null;
5331
- }
5332
- function isIdSetMatch(ctx, oldNode, newNode) {
5333
- let oldSet = ctx.idMap.get(oldNode);
5334
- let newSet = ctx.idMap.get(newNode);
5335
- if (!newSet || !oldSet)
5336
- return false;
5337
- for (const id12 of oldSet) {
5338
- if (newSet.has(id12)) {
5339
- return true;
5340
- }
5341
- }
5342
- return false;
5343
- }
5344
- function isSoftMatch(oldNode, newNode) {
5345
- const oldElt = (
5346
- /** @type {Element} */
5347
- oldNode
5348
- );
5349
- const newElt = (
5350
- /** @type {Element} */
5351
- newNode
5352
- );
5353
- return oldElt.nodeType === newElt.nodeType && oldElt.tagName === newElt.tagName && // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
5354
- // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,
5355
- // its not persistent, and new nodes can't have any hidden state.
5356
- (!oldElt.id || oldElt.id === newElt.id);
5357
- }
5358
- return findBestMatch2;
5359
- }();
5360
- function removeNode(ctx, node) {
5361
- if (ctx.idMap.has(node)) {
5362
- moveBefore(ctx.pantry, node, null);
5363
- } else {
5364
- if (ctx.callbacks.beforeNodeRemoved(node) === false)
5365
- return;
5366
- node.parentNode?.removeChild(node);
5367
- ctx.callbacks.afterNodeRemoved(node);
5368
- }
5173
+ if (oldNode instanceof Document) {
5174
+ oldNode = oldNode.documentElement;
5369
5175
  }
5370
- function removeNodesBetween(ctx, startInclusive, endExclusive) {
5371
- let cursor = startInclusive;
5372
- while (cursor && cursor !== endExclusive) {
5373
- let tempNode = (
5374
- /** @type {Node} */
5375
- cursor
5376
- );
5377
- cursor = cursor.nextSibling;
5378
- removeNode(ctx, tempNode);
5379
- }
5380
- return cursor;
5176
+ if (typeof newContent === "string") {
5177
+ newContent = parseContent(newContent);
5381
5178
  }
5382
- function moveBeforeById(parentNode, id12, after, ctx) {
5383
- const target = (
5384
- /** @type {Element} - will always be found */
5385
- ctx.target.querySelector(`#${id12}`) || ctx.pantry.querySelector(`#${id12}`)
5386
- );
5387
- removeElementFromAncestorsIdMaps(target, ctx);
5388
- moveBefore(parentNode, target, after);
5389
- return target;
5390
- }
5391
- function removeElementFromAncestorsIdMaps(element, ctx) {
5392
- const id12 = element.id;
5393
- while (element = element.parentNode) {
5394
- let idSet = ctx.idMap.get(element);
5395
- if (idSet) {
5396
- idSet.delete(id12);
5397
- if (!idSet.size) {
5398
- ctx.idMap.delete(element);
5399
- }
5400
- }
5179
+ let normalizedContent = normalizeContent(newContent);
5180
+ let ctx = createMorphContext(oldNode, normalizedContent, config2);
5181
+ return morphNormalizedContent(oldNode, normalizedContent, ctx);
5182
+ }
5183
+ function morphNormalizedContent(oldNode, normalizedNewContent, ctx) {
5184
+ if (ctx.head.block) {
5185
+ let oldHead = oldNode.querySelector("head");
5186
+ let newHead = normalizedNewContent.querySelector("head");
5187
+ if (oldHead && newHead) {
5188
+ let promises = handleHeadElement(newHead, oldHead, ctx);
5189
+ Promise.all(promises).then(function() {
5190
+ morphNormalizedContent(oldNode, normalizedNewContent, Object.assign(ctx, {
5191
+ head: {
5192
+ block: false,
5193
+ ignore: true
5194
+ }
5195
+ }));
5196
+ });
5197
+ return;
5401
5198
  }
5402
5199
  }
5403
- function moveBefore(parentNode, element, after) {
5404
- if (parentNode.moveBefore) {
5405
- try {
5406
- parentNode.moveBefore(element, after);
5407
- } catch (e4) {
5408
- parentNode.insertBefore(element, after);
5409
- }
5200
+ if (ctx.morphStyle === "innerHTML") {
5201
+ morphChildren2(normalizedNewContent, oldNode, ctx);
5202
+ return oldNode.children;
5203
+ } else if (ctx.morphStyle === "outerHTML" || ctx.morphStyle == null) {
5204
+ let bestMatch = findBestNodeMatch(normalizedNewContent, oldNode, ctx);
5205
+ let previousSibling = bestMatch?.previousSibling;
5206
+ let nextSibling = bestMatch?.nextSibling;
5207
+ let morphedNode = morphOldNodeTo(oldNode, bestMatch, ctx);
5208
+ if (bestMatch) {
5209
+ return insertSiblings(previousSibling, morphedNode, nextSibling);
5410
5210
  } else {
5411
- parentNode.insertBefore(element, after);
5211
+ return [];
5412
5212
  }
5213
+ } else {
5214
+ throw "Do not understand how to morph style " + ctx.morphStyle;
5413
5215
  }
5414
- return morphChildren3;
5415
- }();
5416
- const morphNode = /* @__PURE__ */ function() {
5417
- function morphNode2(oldNode, newContent, ctx) {
5418
- if (ctx.ignoreActive && oldNode === document.activeElement) {
5419
- return null;
5420
- }
5421
- if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {
5216
+ }
5217
+ function ignoreValueOfActiveElement(possibleActiveElement, ctx) {
5218
+ return ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body;
5219
+ }
5220
+ function morphOldNodeTo(oldNode, newContent, ctx) {
5221
+ if (ctx.ignoreActive && oldNode === document.activeElement)
5222
+ ;
5223
+ else if (newContent == null) {
5224
+ if (ctx.callbacks.beforeNodeRemoved(oldNode) === false)
5225
+ return oldNode;
5226
+ oldNode.remove();
5227
+ ctx.callbacks.afterNodeRemoved(oldNode);
5228
+ return null;
5229
+ } else if (!isSoftMatch(oldNode, newContent)) {
5230
+ if (ctx.callbacks.beforeNodeRemoved(oldNode) === false)
5231
+ return oldNode;
5232
+ if (ctx.callbacks.beforeNodeAdded(newContent) === false)
5233
+ return oldNode;
5234
+ oldNode.parentElement.replaceChild(newContent, oldNode);
5235
+ ctx.callbacks.afterNodeAdded(newContent);
5236
+ ctx.callbacks.afterNodeRemoved(oldNode);
5237
+ return newContent;
5238
+ } else {
5239
+ if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false)
5422
5240
  return oldNode;
5423
- }
5424
5241
  if (oldNode instanceof HTMLHeadElement && ctx.head.ignore)
5425
5242
  ;
5426
5243
  else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== "morph") {
5427
- handleHeadElement(
5428
- oldNode,
5429
- /** @type {HTMLHeadElement} */
5430
- newContent,
5431
- ctx
5432
- );
5244
+ handleHeadElement(newContent, oldNode, ctx);
5433
5245
  } else {
5434
- morphAttributes(oldNode, newContent, ctx);
5246
+ syncNodeFrom(newContent, oldNode, ctx);
5435
5247
  if (!ignoreValueOfActiveElement(oldNode, ctx)) {
5436
- morphChildren2(ctx, oldNode, newContent);
5248
+ morphChildren2(newContent, oldNode, ctx);
5437
5249
  }
5438
5250
  }
5439
5251
  ctx.callbacks.afterNodeMorphed(oldNode, newContent);
5440
5252
  return oldNode;
5441
5253
  }
5442
- function morphAttributes(oldNode, newNode, ctx) {
5443
- let type = newNode.nodeType;
5444
- if (type === 1) {
5445
- const oldElt = (
5446
- /** @type {Element} */
5447
- oldNode
5448
- );
5449
- const newElt = (
5450
- /** @type {Element} */
5451
- newNode
5452
- );
5453
- const oldAttributes = oldElt.attributes;
5454
- const newAttributes = newElt.attributes;
5455
- for (const newAttribute of newAttributes) {
5456
- if (ignoreAttribute(newAttribute.name, oldElt, "update", ctx)) {
5457
- continue;
5458
- }
5459
- if (oldElt.getAttribute(newAttribute.name) !== newAttribute.value) {
5460
- oldElt.setAttribute(newAttribute.name, newAttribute.value);
5461
- }
5462
- }
5463
- for (let i4 = oldAttributes.length - 1; 0 <= i4; i4--) {
5464
- const oldAttribute = oldAttributes[i4];
5465
- if (!oldAttribute)
5466
- continue;
5467
- if (!newElt.hasAttribute(oldAttribute.name)) {
5468
- if (ignoreAttribute(oldAttribute.name, oldElt, "remove", ctx)) {
5469
- continue;
5470
- }
5471
- oldElt.removeAttribute(oldAttribute.name);
5472
- }
5473
- }
5474
- if (!ignoreValueOfActiveElement(oldElt, ctx)) {
5475
- syncInputValue(oldElt, newElt, ctx);
5476
- }
5254
+ }
5255
+ function morphChildren2(newParent, oldParent, ctx) {
5256
+ let nextNewChild = newParent.firstChild;
5257
+ let insertionPoint = oldParent.firstChild;
5258
+ let newChild;
5259
+ while (nextNewChild) {
5260
+ newChild = nextNewChild;
5261
+ nextNewChild = newChild.nextSibling;
5262
+ if (insertionPoint == null) {
5263
+ if (ctx.callbacks.beforeNodeAdded(newChild) === false)
5264
+ return;
5265
+ oldParent.appendChild(newChild);
5266
+ ctx.callbacks.afterNodeAdded(newChild);
5267
+ removeIdsFromConsideration(ctx, newChild);
5268
+ continue;
5477
5269
  }
5478
- if (type === 8 || type === 3) {
5479
- if (oldNode.nodeValue !== newNode.nodeValue) {
5480
- oldNode.nodeValue = newNode.nodeValue;
5481
- }
5270
+ if (isIdSetMatch(newChild, insertionPoint, ctx)) {
5271
+ morphOldNodeTo(insertionPoint, newChild, ctx);
5272
+ insertionPoint = insertionPoint.nextSibling;
5273
+ removeIdsFromConsideration(ctx, newChild);
5274
+ continue;
5275
+ }
5276
+ let idSetMatch = findIdSetMatch(newParent, oldParent, newChild, insertionPoint, ctx);
5277
+ if (idSetMatch) {
5278
+ insertionPoint = removeNodesBetween(insertionPoint, idSetMatch, ctx);
5279
+ morphOldNodeTo(idSetMatch, newChild, ctx);
5280
+ removeIdsFromConsideration(ctx, newChild);
5281
+ continue;
5282
+ }
5283
+ let softMatch = findSoftMatch(newParent, oldParent, newChild, insertionPoint, ctx);
5284
+ if (softMatch) {
5285
+ insertionPoint = removeNodesBetween(insertionPoint, softMatch, ctx);
5286
+ morphOldNodeTo(softMatch, newChild, ctx);
5287
+ removeIdsFromConsideration(ctx, newChild);
5288
+ continue;
5482
5289
  }
5290
+ if (ctx.callbacks.beforeNodeAdded(newChild) === false)
5291
+ return;
5292
+ oldParent.insertBefore(newChild, insertionPoint);
5293
+ ctx.callbacks.afterNodeAdded(newChild);
5294
+ removeIdsFromConsideration(ctx, newChild);
5483
5295
  }
5484
- function syncInputValue(oldElement, newElement, ctx) {
5485
- if (oldElement instanceof HTMLInputElement && newElement instanceof HTMLInputElement && newElement.type !== "file") {
5486
- let newValue = newElement.value;
5487
- let oldValue = oldElement.value;
5488
- syncBooleanAttribute(oldElement, newElement, "checked", ctx);
5489
- syncBooleanAttribute(oldElement, newElement, "disabled", ctx);
5490
- if (!newElement.hasAttribute("value")) {
5491
- if (!ignoreAttribute("value", oldElement, "remove", ctx)) {
5492
- oldElement.value = "";
5493
- oldElement.removeAttribute("value");
5494
- }
5495
- } else if (oldValue !== newValue) {
5496
- if (!ignoreAttribute("value", oldElement, "update", ctx)) {
5497
- oldElement.setAttribute("value", newValue);
5498
- oldElement.value = newValue;
5499
- }
5296
+ while (insertionPoint !== null) {
5297
+ let tempNode = insertionPoint;
5298
+ insertionPoint = insertionPoint.nextSibling;
5299
+ removeNode(tempNode, ctx);
5300
+ }
5301
+ }
5302
+ function ignoreAttribute(attr, to, updateType, ctx) {
5303
+ if (attr === "value" && ctx.ignoreActiveValue && to === document.activeElement) {
5304
+ return true;
5305
+ }
5306
+ return ctx.callbacks.beforeAttributeUpdated(attr, to, updateType) === false;
5307
+ }
5308
+ function syncNodeFrom(from, to, ctx) {
5309
+ let type = from.nodeType;
5310
+ if (type === 1) {
5311
+ const fromAttributes = from.attributes;
5312
+ const toAttributes = to.attributes;
5313
+ for (const fromAttribute of fromAttributes) {
5314
+ if (ignoreAttribute(fromAttribute.name, to, "update", ctx)) {
5315
+ continue;
5500
5316
  }
5501
- } else if (oldElement instanceof HTMLOptionElement && newElement instanceof HTMLOptionElement) {
5502
- syncBooleanAttribute(oldElement, newElement, "selected", ctx);
5503
- } else if (oldElement instanceof HTMLTextAreaElement && newElement instanceof HTMLTextAreaElement) {
5504
- let newValue = newElement.value;
5505
- let oldValue = oldElement.value;
5506
- if (ignoreAttribute("value", oldElement, "update", ctx)) {
5507
- return;
5317
+ if (to.getAttribute(fromAttribute.name) !== fromAttribute.value) {
5318
+ to.setAttribute(fromAttribute.name, fromAttribute.value);
5508
5319
  }
5509
- if (newValue !== oldValue) {
5510
- oldElement.value = newValue;
5320
+ }
5321
+ for (let i4 = toAttributes.length - 1; 0 <= i4; i4--) {
5322
+ const toAttribute = toAttributes[i4];
5323
+ if (ignoreAttribute(toAttribute.name, to, "remove", ctx)) {
5324
+ continue;
5511
5325
  }
5512
- if (oldElement.firstChild && oldElement.firstChild.nodeValue !== newValue) {
5513
- oldElement.firstChild.nodeValue = newValue;
5326
+ if (!from.hasAttribute(toAttribute.name)) {
5327
+ to.removeAttribute(toAttribute.name);
5514
5328
  }
5515
5329
  }
5516
5330
  }
5517
- function syncBooleanAttribute(oldElement, newElement, attributeName, ctx) {
5518
- const newLiveValue = newElement[attributeName], oldLiveValue = oldElement[attributeName];
5519
- if (newLiveValue !== oldLiveValue) {
5520
- const ignoreUpdate = ignoreAttribute(
5521
- attributeName,
5522
- oldElement,
5523
- "update",
5524
- ctx
5525
- );
5331
+ if (type === 8 || type === 3) {
5332
+ if (to.nodeValue !== from.nodeValue) {
5333
+ to.nodeValue = from.nodeValue;
5334
+ }
5335
+ }
5336
+ if (!ignoreValueOfActiveElement(to, ctx)) {
5337
+ syncInputValue(from, to, ctx);
5338
+ }
5339
+ }
5340
+ function syncBooleanAttribute(from, to, attributeName, ctx) {
5341
+ if (from[attributeName] !== to[attributeName]) {
5342
+ let ignoreUpdate = ignoreAttribute(attributeName, to, "update", ctx);
5343
+ if (!ignoreUpdate) {
5344
+ to[attributeName] = from[attributeName];
5345
+ }
5346
+ if (from[attributeName]) {
5526
5347
  if (!ignoreUpdate) {
5527
- oldElement[attributeName] = newElement[attributeName];
5348
+ to.setAttribute(attributeName, from[attributeName]);
5528
5349
  }
5529
- if (newLiveValue) {
5530
- if (!ignoreUpdate) {
5531
- oldElement.setAttribute(attributeName, "");
5532
- }
5533
- } else {
5534
- if (!ignoreAttribute(attributeName, oldElement, "remove", ctx)) {
5535
- oldElement.removeAttribute(attributeName);
5536
- }
5350
+ } else {
5351
+ if (!ignoreAttribute(attributeName, to, "remove", ctx)) {
5352
+ to.removeAttribute(attributeName);
5537
5353
  }
5538
5354
  }
5539
5355
  }
5540
- function ignoreAttribute(attr, element, updateType, ctx) {
5541
- if (attr === "value" && ctx.ignoreActiveValue && element === document.activeElement) {
5542
- return true;
5356
+ }
5357
+ function syncInputValue(from, to, ctx) {
5358
+ if (from instanceof HTMLInputElement && to instanceof HTMLInputElement && from.type !== "file") {
5359
+ let fromValue = from.value;
5360
+ let toValue = to.value;
5361
+ syncBooleanAttribute(from, to, "checked", ctx);
5362
+ syncBooleanAttribute(from, to, "disabled", ctx);
5363
+ if (!from.hasAttribute("value")) {
5364
+ if (!ignoreAttribute("value", to, "remove", ctx)) {
5365
+ to.value = "";
5366
+ to.removeAttribute("value");
5367
+ }
5368
+ } else if (fromValue !== toValue) {
5369
+ if (!ignoreAttribute("value", to, "update", ctx)) {
5370
+ to.setAttribute("value", fromValue);
5371
+ to.value = fromValue;
5372
+ }
5543
5373
  }
5544
- return ctx.callbacks.beforeAttributeUpdated(attr, element, updateType) === false;
5545
- }
5546
- function ignoreValueOfActiveElement(possibleActiveElement, ctx) {
5547
- return !!ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body;
5548
- }
5549
- return morphNode2;
5550
- }();
5551
- function withHeadBlocking(ctx, oldNode, newNode, callback) {
5552
- if (ctx.head.block) {
5553
- const oldHead = oldNode.querySelector("head");
5554
- const newHead = newNode.querySelector("head");
5555
- if (oldHead && newHead) {
5556
- const promises = handleHeadElement(oldHead, newHead, ctx);
5557
- return Promise.all(promises).then(() => {
5558
- const newCtx = Object.assign(ctx, {
5559
- head: {
5560
- block: false,
5561
- ignore: true
5562
- }
5563
- });
5564
- return callback(newCtx);
5565
- });
5374
+ } else if (from instanceof HTMLOptionElement) {
5375
+ syncBooleanAttribute(from, to, "selected", ctx);
5376
+ } else if (from instanceof HTMLTextAreaElement && to instanceof HTMLTextAreaElement) {
5377
+ let fromValue = from.value;
5378
+ let toValue = to.value;
5379
+ if (ignoreAttribute("value", to, "update", ctx)) {
5380
+ return;
5381
+ }
5382
+ if (fromValue !== toValue) {
5383
+ to.value = fromValue;
5384
+ }
5385
+ if (to.firstChild && to.firstChild.nodeValue !== fromValue) {
5386
+ to.firstChild.nodeValue = fromValue;
5566
5387
  }
5567
5388
  }
5568
- return callback(ctx);
5569
5389
  }
5570
- function handleHeadElement(oldHead, newHead, ctx) {
5390
+ function handleHeadElement(newHeadTag, currentHead, ctx) {
5571
5391
  let added = [];
5572
5392
  let removed = [];
5573
5393
  let preserved = [];
5574
5394
  let nodesToAppend = [];
5395
+ let headMergeStyle = ctx.head.style;
5575
5396
  let srcToNewHeadNodes = /* @__PURE__ */ new Map();
5576
- for (const newHeadChild of newHead.children) {
5397
+ for (const newHeadChild of newHeadTag.children) {
5577
5398
  srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild);
5578
5399
  }
5579
- for (const currentHeadElt of oldHead.children) {
5400
+ for (const currentHeadElt of currentHead.children) {
5580
5401
  let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML);
5581
5402
  let isReAppended = ctx.head.shouldReAppend(currentHeadElt);
5582
5403
  let isPreserved = ctx.head.shouldPreserve(currentHeadElt);
@@ -5588,7 +5409,7 @@
5588
5409
  preserved.push(currentHeadElt);
5589
5410
  }
5590
5411
  } else {
5591
- if (ctx.head.style === "append") {
5412
+ if (headMergeStyle === "append") {
5592
5413
  if (isReAppended) {
5593
5414
  removed.push(currentHeadElt);
5594
5415
  nodesToAppend.push(currentHeadElt);
@@ -5603,13 +5424,10 @@
5603
5424
  nodesToAppend.push(...srcToNewHeadNodes.values());
5604
5425
  let promises = [];
5605
5426
  for (const newNode of nodesToAppend) {
5606
- let newElt = (
5607
- /** @type {ChildNode} */
5608
- document.createRange().createContextualFragment(newNode.outerHTML).firstChild
5609
- );
5427
+ let newElt = document.createRange().createContextualFragment(newNode.outerHTML).firstChild;
5610
5428
  if (ctx.callbacks.beforeNodeAdded(newElt) !== false) {
5611
- if ("href" in newElt && newElt.href || "src" in newElt && newElt.src) {
5612
- let resolve;
5429
+ if (newElt.href || newElt.src) {
5430
+ let resolve = null;
5613
5431
  let promise = new Promise(function(_resolve) {
5614
5432
  resolve = _resolve;
5615
5433
  });
@@ -5618,217 +5436,256 @@
5618
5436
  });
5619
5437
  promises.push(promise);
5620
5438
  }
5621
- oldHead.appendChild(newElt);
5439
+ currentHead.appendChild(newElt);
5622
5440
  ctx.callbacks.afterNodeAdded(newElt);
5623
5441
  added.push(newElt);
5624
5442
  }
5625
5443
  }
5626
5444
  for (const removedElement of removed) {
5627
5445
  if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) {
5628
- oldHead.removeChild(removedElement);
5446
+ currentHead.removeChild(removedElement);
5629
5447
  ctx.callbacks.afterNodeRemoved(removedElement);
5630
5448
  }
5631
5449
  }
5632
- ctx.head.afterHeadMorphed(oldHead, {
5633
- added,
5634
- kept: preserved,
5635
- removed
5636
- });
5450
+ ctx.head.afterHeadMorphed(currentHead, { added, kept: preserved, removed });
5637
5451
  return promises;
5638
5452
  }
5639
- const createMorphContext = /* @__PURE__ */ function() {
5640
- function createMorphContext2(oldNode, newContent, config2) {
5641
- const { persistentIds, idMap } = createIdMaps(oldNode, newContent);
5642
- const mergedConfig = mergeDefaults(config2);
5643
- const morphStyle = mergedConfig.morphStyle || "outerHTML";
5644
- if (!["innerHTML", "outerHTML"].includes(morphStyle)) {
5645
- throw `Do not understand how to morph style ${morphStyle}`;
5646
- }
5647
- return {
5648
- target: oldNode,
5649
- newContent,
5650
- config: mergedConfig,
5651
- morphStyle,
5652
- ignoreActive: mergedConfig.ignoreActive,
5653
- ignoreActiveValue: mergedConfig.ignoreActiveValue,
5654
- restoreFocus: mergedConfig.restoreFocus,
5655
- idMap,
5656
- persistentIds,
5657
- pantry: createPantry(),
5658
- callbacks: mergedConfig.callbacks,
5659
- head: mergedConfig.head
5660
- };
5453
+ function noOp() {
5454
+ }
5455
+ function mergeDefaults(config2) {
5456
+ let finalConfig = {};
5457
+ Object.assign(finalConfig, defaults);
5458
+ Object.assign(finalConfig, config2);
5459
+ finalConfig.callbacks = {};
5460
+ Object.assign(finalConfig.callbacks, defaults.callbacks);
5461
+ Object.assign(finalConfig.callbacks, config2.callbacks);
5462
+ finalConfig.head = {};
5463
+ Object.assign(finalConfig.head, defaults.head);
5464
+ Object.assign(finalConfig.head, config2.head);
5465
+ return finalConfig;
5466
+ }
5467
+ function createMorphContext(oldNode, newContent, config2) {
5468
+ config2 = mergeDefaults(config2);
5469
+ return {
5470
+ target: oldNode,
5471
+ newContent,
5472
+ config: config2,
5473
+ morphStyle: config2.morphStyle,
5474
+ ignoreActive: config2.ignoreActive,
5475
+ ignoreActiveValue: config2.ignoreActiveValue,
5476
+ idMap: createIdMap(oldNode, newContent),
5477
+ deadIds: /* @__PURE__ */ new Set(),
5478
+ callbacks: config2.callbacks,
5479
+ head: config2.head
5480
+ };
5481
+ }
5482
+ function isIdSetMatch(node1, node2, ctx) {
5483
+ if (node1 == null || node2 == null) {
5484
+ return false;
5661
5485
  }
5662
- function mergeDefaults(config2) {
5663
- let finalConfig = Object.assign({}, defaults);
5664
- Object.assign(finalConfig, config2);
5665
- finalConfig.callbacks = Object.assign(
5666
- {},
5667
- defaults.callbacks,
5668
- config2.callbacks
5669
- );
5670
- finalConfig.head = Object.assign({}, defaults.head, config2.head);
5671
- return finalConfig;
5672
- }
5673
- function createPantry() {
5674
- const pantry = document.createElement("div");
5675
- pantry.hidden = true;
5676
- document.body.insertAdjacentElement("afterend", pantry);
5677
- return pantry;
5678
- }
5679
- function findIdElements(root) {
5680
- let elements = Array.from(root.querySelectorAll("[id]"));
5681
- if (root.id) {
5682
- elements.push(root);
5683
- }
5684
- return elements;
5685
- }
5686
- function populateIdMapWithTree(idMap, persistentIds, root, elements) {
5687
- for (const elt of elements) {
5688
- if (persistentIds.has(elt.id)) {
5689
- let current = elt;
5690
- while (current) {
5691
- let idSet = idMap.get(current);
5692
- if (idSet == null) {
5693
- idSet = /* @__PURE__ */ new Set();
5694
- idMap.set(current, idSet);
5695
- }
5696
- idSet.add(elt.id);
5697
- if (current === root)
5698
- break;
5699
- current = current.parentElement;
5700
- }
5701
- }
5486
+ if (node1.nodeType === node2.nodeType && node1.tagName === node2.tagName) {
5487
+ if (node1.id !== "" && node1.id === node2.id) {
5488
+ return true;
5489
+ } else {
5490
+ return getIdIntersectionCount(ctx, node1, node2) > 0;
5702
5491
  }
5703
5492
  }
5704
- function createIdMaps(oldContent, newContent) {
5705
- const oldIdElements = findIdElements(oldContent);
5706
- const newIdElements = findIdElements(newContent);
5707
- const persistentIds = createPersistentIds(oldIdElements, newIdElements);
5708
- let idMap = /* @__PURE__ */ new Map();
5709
- populateIdMapWithTree(idMap, persistentIds, oldContent, oldIdElements);
5710
- const newRoot = newContent.__idiomorphRoot || newContent;
5711
- populateIdMapWithTree(idMap, persistentIds, newRoot, newIdElements);
5712
- return { persistentIds, idMap };
5493
+ return false;
5494
+ }
5495
+ function isSoftMatch(node1, node2) {
5496
+ if (node1 == null || node2 == null) {
5497
+ return false;
5713
5498
  }
5714
- function createPersistentIds(oldIdElements, newIdElements) {
5715
- let duplicateIds = /* @__PURE__ */ new Set();
5716
- let oldIdTagNameMap = /* @__PURE__ */ new Map();
5717
- for (const { id: id12, tagName } of oldIdElements) {
5718
- if (oldIdTagNameMap.has(id12)) {
5719
- duplicateIds.add(id12);
5720
- } else {
5721
- oldIdTagNameMap.set(id12, tagName);
5499
+ return node1.nodeType === node2.nodeType && node1.tagName === node2.tagName;
5500
+ }
5501
+ function removeNodesBetween(startInclusive, endExclusive, ctx) {
5502
+ while (startInclusive !== endExclusive) {
5503
+ let tempNode = startInclusive;
5504
+ startInclusive = startInclusive.nextSibling;
5505
+ removeNode(tempNode, ctx);
5506
+ }
5507
+ removeIdsFromConsideration(ctx, endExclusive);
5508
+ return endExclusive.nextSibling;
5509
+ }
5510
+ function findIdSetMatch(newContent, oldParent, newChild, insertionPoint, ctx) {
5511
+ let newChildPotentialIdCount = getIdIntersectionCount(ctx, newChild, oldParent);
5512
+ let potentialMatch = null;
5513
+ if (newChildPotentialIdCount > 0) {
5514
+ let potentialMatch2 = insertionPoint;
5515
+ let otherMatchCount = 0;
5516
+ while (potentialMatch2 != null) {
5517
+ if (isIdSetMatch(newChild, potentialMatch2, ctx)) {
5518
+ return potentialMatch2;
5519
+ }
5520
+ otherMatchCount += getIdIntersectionCount(ctx, potentialMatch2, newContent);
5521
+ if (otherMatchCount > newChildPotentialIdCount) {
5522
+ return null;
5722
5523
  }
5524
+ potentialMatch2 = potentialMatch2.nextSibling;
5723
5525
  }
5724
- let persistentIds = /* @__PURE__ */ new Set();
5725
- for (const { id: id12, tagName } of newIdElements) {
5726
- if (persistentIds.has(id12)) {
5727
- duplicateIds.add(id12);
5728
- } else if (oldIdTagNameMap.get(id12) === tagName) {
5729
- persistentIds.add(id12);
5730
- }
5526
+ }
5527
+ return potentialMatch;
5528
+ }
5529
+ function findSoftMatch(newContent, oldParent, newChild, insertionPoint, ctx) {
5530
+ let potentialSoftMatch = insertionPoint;
5531
+ let nextSibling = newChild.nextSibling;
5532
+ let siblingSoftMatchCount = 0;
5533
+ while (potentialSoftMatch != null) {
5534
+ if (getIdIntersectionCount(ctx, potentialSoftMatch, newContent) > 0) {
5535
+ return null;
5731
5536
  }
5732
- for (const id12 of duplicateIds) {
5733
- persistentIds.delete(id12);
5537
+ if (isSoftMatch(newChild, potentialSoftMatch)) {
5538
+ return potentialSoftMatch;
5734
5539
  }
5735
- return persistentIds;
5736
- }
5737
- return createMorphContext2;
5738
- }();
5739
- const { normalizeElement, normalizeParent } = /* @__PURE__ */ function() {
5740
- const generatedByIdiomorph = /* @__PURE__ */ new WeakSet();
5741
- function normalizeElement2(content) {
5742
- if (content instanceof Document) {
5743
- return content.documentElement;
5744
- } else {
5745
- return content;
5540
+ if (isSoftMatch(nextSibling, potentialSoftMatch)) {
5541
+ siblingSoftMatchCount++;
5542
+ nextSibling = nextSibling.nextSibling;
5543
+ if (siblingSoftMatchCount >= 2) {
5544
+ return null;
5545
+ }
5746
5546
  }
5547
+ potentialSoftMatch = potentialSoftMatch.nextSibling;
5747
5548
  }
5748
- function normalizeParent2(newContent) {
5749
- if (newContent == null) {
5750
- return document.createElement("div");
5751
- } else if (typeof newContent === "string") {
5752
- return normalizeParent2(parseContent(newContent));
5753
- } else if (generatedByIdiomorph.has(
5754
- /** @type {Element} */
5755
- newContent
5756
- )) {
5757
- return (
5758
- /** @type {Element} */
5759
- newContent
5760
- );
5761
- } else if (newContent instanceof Node) {
5762
- if (newContent.parentNode) {
5763
- return createDuckTypedParent(newContent);
5764
- } else {
5765
- const dummyParent = document.createElement("div");
5766
- dummyParent.append(newContent);
5767
- return dummyParent;
5768
- }
5549
+ return potentialSoftMatch;
5550
+ }
5551
+ function parseContent(newContent) {
5552
+ let parser2 = new DOMParser();
5553
+ let contentWithSvgsRemoved = newContent.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim, "");
5554
+ if (contentWithSvgsRemoved.match(/<\/html>/) || contentWithSvgsRemoved.match(/<\/head>/) || contentWithSvgsRemoved.match(/<\/body>/)) {
5555
+ let content = parser2.parseFromString(newContent, "text/html");
5556
+ if (contentWithSvgsRemoved.match(/<\/html>/)) {
5557
+ content.generatedByIdiomorph = true;
5558
+ return content;
5769
5559
  } else {
5770
- const dummyParent = document.createElement("div");
5771
- for (const elt of [...newContent]) {
5772
- dummyParent.append(elt);
5560
+ let htmlElement = content.firstChild;
5561
+ if (htmlElement) {
5562
+ htmlElement.generatedByIdiomorph = true;
5563
+ return htmlElement;
5564
+ } else {
5565
+ return null;
5773
5566
  }
5774
- return dummyParent;
5775
5567
  }
5568
+ } else {
5569
+ let responseDoc = parser2.parseFromString("<body><template>" + newContent + "</template></body>", "text/html");
5570
+ let content = responseDoc.body.querySelector("template").content;
5571
+ content.generatedByIdiomorph = true;
5572
+ return content;
5573
+ }
5574
+ }
5575
+ function normalizeContent(newContent) {
5576
+ if (newContent == null) {
5577
+ const dummyParent = document.createElement("div");
5578
+ return dummyParent;
5579
+ } else if (newContent.generatedByIdiomorph) {
5580
+ return newContent;
5581
+ } else if (newContent instanceof Node) {
5582
+ const dummyParent = document.createElement("div");
5583
+ dummyParent.append(newContent);
5584
+ return dummyParent;
5585
+ } else {
5586
+ const dummyParent = document.createElement("div");
5587
+ for (const elt of [...newContent]) {
5588
+ dummyParent.append(elt);
5589
+ }
5590
+ return dummyParent;
5776
5591
  }
5777
- function createDuckTypedParent(newContent) {
5778
- return (
5779
- /** @type {Element} */
5780
- /** @type {unknown} */
5781
- {
5782
- childNodes: [newContent],
5783
- /** @ts-ignore - cover your eyes for a minute, tsc */
5784
- querySelectorAll: (s4) => {
5785
- const elements = newContent.querySelectorAll(s4);
5786
- return newContent.matches(s4) ? [newContent, ...elements] : elements;
5787
- },
5788
- /** @ts-ignore */
5789
- insertBefore: (n3, r4) => newContent.parentNode.insertBefore(n3, r4),
5790
- /** @ts-ignore */
5791
- moveBefore: (n3, r4) => newContent.parentNode.moveBefore(n3, r4),
5792
- // for later use with populateIdMapWithTree to halt upwards iteration
5793
- get __idiomorphRoot() {
5794
- return newContent;
5795
- }
5796
- }
5797
- );
5592
+ }
5593
+ function insertSiblings(previousSibling, morphedNode, nextSibling) {
5594
+ let stack = [];
5595
+ let added = [];
5596
+ while (previousSibling != null) {
5597
+ stack.push(previousSibling);
5598
+ previousSibling = previousSibling.previousSibling;
5798
5599
  }
5799
- function parseContent(newContent) {
5800
- let parser2 = new DOMParser();
5801
- let contentWithSvgsRemoved = newContent.replace(
5802
- /<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,
5803
- ""
5804
- );
5805
- if (contentWithSvgsRemoved.match(/<\/html>/) || contentWithSvgsRemoved.match(/<\/head>/) || contentWithSvgsRemoved.match(/<\/body>/)) {
5806
- let content = parser2.parseFromString(newContent, "text/html");
5807
- if (contentWithSvgsRemoved.match(/<\/html>/)) {
5808
- generatedByIdiomorph.add(content);
5809
- return content;
5810
- } else {
5811
- let htmlElement = content.firstChild;
5812
- if (htmlElement) {
5813
- generatedByIdiomorph.add(htmlElement);
5814
- }
5815
- return htmlElement;
5600
+ while (stack.length > 0) {
5601
+ let node = stack.pop();
5602
+ added.push(node);
5603
+ morphedNode.parentElement.insertBefore(node, morphedNode);
5604
+ }
5605
+ added.push(morphedNode);
5606
+ while (nextSibling != null) {
5607
+ stack.push(nextSibling);
5608
+ added.push(nextSibling);
5609
+ nextSibling = nextSibling.nextSibling;
5610
+ }
5611
+ while (stack.length > 0) {
5612
+ morphedNode.parentElement.insertBefore(stack.pop(), morphedNode.nextSibling);
5613
+ }
5614
+ return added;
5615
+ }
5616
+ function findBestNodeMatch(newContent, oldNode, ctx) {
5617
+ let currentElement;
5618
+ currentElement = newContent.firstChild;
5619
+ let bestElement = currentElement;
5620
+ let score = 0;
5621
+ while (currentElement) {
5622
+ let newScore = scoreElement(currentElement, oldNode, ctx);
5623
+ if (newScore > score) {
5624
+ bestElement = currentElement;
5625
+ score = newScore;
5626
+ }
5627
+ currentElement = currentElement.nextSibling;
5628
+ }
5629
+ return bestElement;
5630
+ }
5631
+ function scoreElement(node1, node2, ctx) {
5632
+ if (isSoftMatch(node1, node2)) {
5633
+ return 0.5 + getIdIntersectionCount(ctx, node1, node2);
5634
+ }
5635
+ return 0;
5636
+ }
5637
+ function removeNode(tempNode, ctx) {
5638
+ removeIdsFromConsideration(ctx, tempNode);
5639
+ if (ctx.callbacks.beforeNodeRemoved(tempNode) === false)
5640
+ return;
5641
+ tempNode.remove();
5642
+ ctx.callbacks.afterNodeRemoved(tempNode);
5643
+ }
5644
+ function isIdInConsideration(ctx, id12) {
5645
+ return !ctx.deadIds.has(id12);
5646
+ }
5647
+ function idIsWithinNode(ctx, id12, targetNode) {
5648
+ let idSet = ctx.idMap.get(targetNode) || EMPTY_SET;
5649
+ return idSet.has(id12);
5650
+ }
5651
+ function removeIdsFromConsideration(ctx, node) {
5652
+ let idSet = ctx.idMap.get(node) || EMPTY_SET;
5653
+ for (const id12 of idSet) {
5654
+ ctx.deadIds.add(id12);
5655
+ }
5656
+ }
5657
+ function getIdIntersectionCount(ctx, node1, node2) {
5658
+ let sourceSet = ctx.idMap.get(node1) || EMPTY_SET;
5659
+ let matchCount = 0;
5660
+ for (const id12 of sourceSet) {
5661
+ if (isIdInConsideration(ctx, id12) && idIsWithinNode(ctx, id12, node2)) {
5662
+ ++matchCount;
5663
+ }
5664
+ }
5665
+ return matchCount;
5666
+ }
5667
+ function populateIdMapForNode(node, idMap) {
5668
+ let nodeParent = node.parentElement;
5669
+ let idElements = node.querySelectorAll("[id]");
5670
+ for (const elt of idElements) {
5671
+ let current = elt;
5672
+ while (current !== nodeParent && current != null) {
5673
+ let idSet = idMap.get(current);
5674
+ if (idSet == null) {
5675
+ idSet = /* @__PURE__ */ new Set();
5676
+ idMap.set(current, idSet);
5816
5677
  }
5817
- } else {
5818
- let responseDoc = parser2.parseFromString(
5819
- "<body><template>" + newContent + "</template></body>",
5820
- "text/html"
5821
- );
5822
- let content = (
5823
- /** @type {HTMLTemplateElement} */
5824
- responseDoc.body.querySelector("template").content
5825
- );
5826
- generatedByIdiomorph.add(content);
5827
- return content;
5678
+ idSet.add(elt.id);
5679
+ current = current.parentElement;
5828
5680
  }
5829
5681
  }
5830
- return { normalizeElement: normalizeElement2, normalizeParent: normalizeParent2 };
5831
- }();
5682
+ }
5683
+ function createIdMap(oldContent, newContent) {
5684
+ let idMap = /* @__PURE__ */ new Map();
5685
+ populateIdMapForNode(oldContent, idMap);
5686
+ populateIdMapForNode(newContent, idMap);
5687
+ return idMap;
5688
+ }
5832
5689
  return {
5833
5690
  morph,
5834
5691
  defaults
@@ -5841,7 +5698,7 @@
5841
5698
  });
5842
5699
  }
5843
5700
  function morphChildren(currentElement, newElement) {
5844
- morphElements(currentElement, newElement.childNodes, {
5701
+ morphElements(currentElement, newElement.children, {
5845
5702
  morphStyle: "innerHTML"
5846
5703
  });
5847
5704
  }
@@ -6505,6 +6362,15 @@
6505
6362
  return { ...this.timingMetrics };
6506
6363
  }
6507
6364
  // Private
6365
+ getHistoryMethodForAction(action) {
6366
+ switch (action) {
6367
+ case "replace":
6368
+ return history.replaceState;
6369
+ case "advance":
6370
+ case "restore":
6371
+ return history.pushState;
6372
+ }
6373
+ }
6508
6374
  hasPreloadedResponse() {
6509
6375
  return typeof this.response == "object";
6510
6376
  }
@@ -6606,10 +6472,6 @@
6606
6472
  }
6607
6473
  visitRendered(_visit) {
6608
6474
  }
6609
- // Link prefetching
6610
- linkPrefetchingIsEnabledForLocation(location2) {
6611
- return true;
6612
- }
6613
6475
  // Form Submission Delegate
6614
6476
  formSubmissionStarted(_formSubmission) {
6615
6477
  this.progressBar.setValue(0);
@@ -7087,13 +6949,6 @@
7087
6949
  this.adapter.formSubmissionFinished(formSubmission);
7088
6950
  }
7089
6951
  }
7090
- // Link prefetching
7091
- linkPrefetchingIsEnabledForLocation(location2) {
7092
- if (typeof this.adapter.linkPrefetchingIsEnabledForLocation === "function") {
7093
- return this.adapter.linkPrefetchingIsEnabledForLocation(location2);
7094
- }
7095
- return true;
7096
- }
7097
6952
  // Visit delegate
7098
6953
  visitStarted(visit2) {
7099
6954
  this.delegate.visitStarted(visit2);
@@ -7709,7 +7564,7 @@
7709
7564
  const responseHTML = await fetchResponse.responseHTML;
7710
7565
  const snapshot = PageSnapshot.fromHTMLString(responseHTML);
7711
7566
  this.snapshotCache.put(fetchRequest.url, snapshot);
7712
- } catch (_4) {
7567
+ } catch (_3) {
7713
7568
  }
7714
7569
  }
7715
7570
  requestStarted(fetchRequest) {
@@ -7822,8 +7677,7 @@
7822
7677
  }
7823
7678
  refresh(url, requestId) {
7824
7679
  const isRecentRequest = requestId && this.recentRequests.has(requestId);
7825
- const isCurrentUrl = url === document.baseURI;
7826
- if (!isRecentRequest && !this.navigator.currentVisit && isCurrentUrl) {
7680
+ if (!isRecentRequest && !this.navigator.currentVisit) {
7827
7681
  this.visit(url, { action: "replace", shouldCacheSnapshot: false });
7828
7682
  }
7829
7683
  }
@@ -7915,7 +7769,7 @@
7915
7769
  }
7916
7770
  // Link hover observer delegate
7917
7771
  canPrefetchRequestToLocation(link2, location2) {
7918
- return this.elementIsNavigatable(link2) && locationIsVisitable(location2, this.snapshot.rootLocation) && this.navigator.linkPrefetchingIsEnabledForLocation(location2);
7772
+ return this.elementIsNavigatable(link2) && locationIsVisitable(location2, this.snapshot.rootLocation);
7919
7773
  }
7920
7774
  // Link click observer delegate
7921
7775
  willFollowLinkToLocation(link2, location2, event) {
@@ -8724,9 +8578,9 @@
8724
8578
  * Gets the list of duplicate children (i.e. those with the same ID)
8725
8579
  */
8726
8580
  get duplicateChildren() {
8727
- const existingChildren = this.targetElements.flatMap((e4) => [...e4.children]).filter((c4) => !!c4.getAttribute("id"));
8728
- const newChildrenIds = [...this.templateContent?.children || []].filter((c4) => !!c4.getAttribute("id")).map((c4) => c4.getAttribute("id"));
8729
- return existingChildren.filter((c4) => newChildrenIds.includes(c4.getAttribute("id")));
8581
+ const existingChildren = this.targetElements.flatMap((e4) => [...e4.children]).filter((c4) => !!c4.id);
8582
+ const newChildrenIds = [...this.templateContent?.children || []].filter((c4) => !!c4.id).map((c4) => c4.id);
8583
+ return existingChildren.filter((c4) => newChildrenIds.includes(c4.id));
8730
8584
  }
8731
8585
  /**
8732
8586
  * Gets the action function to be performed.
@@ -9076,7 +8930,7 @@
9076
8930
  }
9077
8931
  }
9078
8932
  function camelize(value) {
9079
- return value.replace(/(?:[_-])([a-z0-9])/g, (_4, char) => char.toUpperCase());
8933
+ return value.replace(/(?:[_-])([a-z0-9])/g, (_3, char) => char.toUpperCase());
9080
8934
  }
9081
8935
  function namespaceCamelize(value) {
9082
8936
  return camelize(value.replace(/--/g, "-").replace(/__/g, "_"));
@@ -9085,7 +8939,7 @@
9085
8939
  return value.charAt(0).toUpperCase() + value.slice(1);
9086
8940
  }
9087
8941
  function dasherize(value) {
9088
- return value.replace(/([A-Z])/g, (_4, char) => `-${char.toLowerCase()}`);
8942
+ return value.replace(/([A-Z])/g, (_3, char) => `-${char.toLowerCase()}`);
9089
8943
  }
9090
8944
  function tokenize(value) {
9091
8945
  return value.match(/[^\s]+/g) || [];
@@ -9774,7 +9628,7 @@
9774
9628
  }
9775
9629
  function zip(left2, right2) {
9776
9630
  const length = Math.max(left2.length, right2.length);
9777
- return Array.from({ length }, (_4, index) => [left2[index], right2[index]]);
9631
+ return Array.from({ length }, (_3, index) => [left2[index], right2[index]]);
9778
9632
  }
9779
9633
  function tokensAreEqual(left2, right2) {
9780
9634
  return left2 && right2 && left2.index == right2.index && left2.content == right2.content;
@@ -11722,7 +11576,7 @@
11722
11576
  }
11723
11577
  var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
11724
11578
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
11725
- var x4 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
11579
+ var x3 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
11726
11580
  var y4 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
11727
11581
  var width = clientRect.width / scaleX;
11728
11582
  var height = clientRect.height / scaleY;
@@ -11730,10 +11584,10 @@
11730
11584
  width,
11731
11585
  height,
11732
11586
  top: y4,
11733
- right: x4 + width,
11587
+ right: x3 + width,
11734
11588
  bottom: y4 + height,
11735
- left: x4,
11736
- x: x4,
11589
+ left: x3,
11590
+ x: x3,
11737
11591
  y: y4
11738
11592
  };
11739
11593
  }
@@ -11964,25 +11818,25 @@
11964
11818
  left: "auto"
11965
11819
  };
11966
11820
  function roundOffsetsByDPR(_ref, win) {
11967
- var x4 = _ref.x, y4 = _ref.y;
11821
+ var x3 = _ref.x, y4 = _ref.y;
11968
11822
  var dpr = win.devicePixelRatio || 1;
11969
11823
  return {
11970
- x: round(x4 * dpr) / dpr || 0,
11824
+ x: round(x3 * dpr) / dpr || 0,
11971
11825
  y: round(y4 * dpr) / dpr || 0
11972
11826
  };
11973
11827
  }
11974
11828
  function mapToStyles(_ref2) {
11975
11829
  var _Object$assign2;
11976
11830
  var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
11977
- var _offsets$x = offsets.x, x4 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y4 = _offsets$y === void 0 ? 0 : _offsets$y;
11831
+ var _offsets$x = offsets.x, x3 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y4 = _offsets$y === void 0 ? 0 : _offsets$y;
11978
11832
  var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
11979
- x: x4,
11833
+ x: x3,
11980
11834
  y: y4
11981
11835
  }) : {
11982
- x: x4,
11836
+ x: x3,
11983
11837
  y: y4
11984
11838
  };
11985
- x4 = _ref3.x;
11839
+ x3 = _ref3.x;
11986
11840
  y4 = _ref3.y;
11987
11841
  var hasX = offsets.hasOwnProperty("x");
11988
11842
  var hasY = offsets.hasOwnProperty("y");
@@ -12016,27 +11870,27 @@
12016
11870
  // $FlowFixMe[prop-missing]
12017
11871
  offsetParent[widthProp]
12018
11872
  );
12019
- x4 -= offsetX - popperRect.width;
12020
- x4 *= gpuAcceleration ? 1 : -1;
11873
+ x3 -= offsetX - popperRect.width;
11874
+ x3 *= gpuAcceleration ? 1 : -1;
12021
11875
  }
12022
11876
  }
12023
11877
  var commonStyles = Object.assign({
12024
11878
  position
12025
11879
  }, adaptive && unsetSides);
12026
11880
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
12027
- x: x4,
11881
+ x: x3,
12028
11882
  y: y4
12029
11883
  }, getWindow(popper2)) : {
12030
- x: x4,
11884
+ x: x3,
12031
11885
  y: y4
12032
11886
  };
12033
- x4 = _ref4.x;
11887
+ x3 = _ref4.x;
12034
11888
  y4 = _ref4.y;
12035
11889
  if (gpuAcceleration) {
12036
11890
  var _Object$assign;
12037
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x4 + "px, " + y4 + "px)" : "translate3d(" + x4 + "px, " + y4 + "px, 0)", _Object$assign));
11891
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x3 + "px, " + y4 + "px)" : "translate3d(" + x3 + "px, " + y4 + "px, 0)", _Object$assign));
12038
11892
  }
12039
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y4 + "px" : "", _Object$assign2[sideX] = hasX ? x4 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
11893
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y4 + "px" : "", _Object$assign2[sideX] = hasX ? x3 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
12040
11894
  }
12041
11895
  function computeStyles(_ref5) {
12042
11896
  var state = _ref5.state, options2 = _ref5.options;
@@ -12162,21 +12016,21 @@
12162
12016
  var visualViewport = win.visualViewport;
12163
12017
  var width = html3.clientWidth;
12164
12018
  var height = html3.clientHeight;
12165
- var x4 = 0;
12019
+ var x3 = 0;
12166
12020
  var y4 = 0;
12167
12021
  if (visualViewport) {
12168
12022
  width = visualViewport.width;
12169
12023
  height = visualViewport.height;
12170
12024
  var layoutViewport = isLayoutViewport();
12171
12025
  if (layoutViewport || !layoutViewport && strategy === "fixed") {
12172
- x4 = visualViewport.offsetLeft;
12026
+ x3 = visualViewport.offsetLeft;
12173
12027
  y4 = visualViewport.offsetTop;
12174
12028
  }
12175
12029
  }
12176
12030
  return {
12177
12031
  width,
12178
12032
  height,
12179
- x: x4 + getWindowScrollBarX(element),
12033
+ x: x3 + getWindowScrollBarX(element),
12180
12034
  y: y4
12181
12035
  };
12182
12036
  }
@@ -12189,15 +12043,15 @@
12189
12043
  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
12190
12044
  var width = max(html3.scrollWidth, html3.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
12191
12045
  var height = max(html3.scrollHeight, html3.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
12192
- var x4 = -winScroll.scrollLeft + getWindowScrollBarX(element);
12046
+ var x3 = -winScroll.scrollLeft + getWindowScrollBarX(element);
12193
12047
  var y4 = -winScroll.scrollTop;
12194
12048
  if (getComputedStyle2(body || html3).direction === "rtl") {
12195
- x4 += max(html3.clientWidth, body ? body.clientWidth : 0) - width;
12049
+ x3 += max(html3.clientWidth, body ? body.clientWidth : 0) - width;
12196
12050
  }
12197
12051
  return {
12198
12052
  width,
12199
12053
  height,
12200
- x: x4,
12054
+ x: x3,
12201
12055
  y: y4
12202
12056
  };
12203
12057
  }
@@ -12599,9 +12453,9 @@
12599
12453
  acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
12600
12454
  return acc;
12601
12455
  }, {});
12602
- var _data$state$placement = data[state.placement], x4 = _data$state$placement.x, y4 = _data$state$placement.y;
12456
+ var _data$state$placement = data[state.placement], x3 = _data$state$placement.x, y4 = _data$state$placement.y;
12603
12457
  if (state.modifiersData.popperOffsets != null) {
12604
- state.modifiersData.popperOffsets.x += x4;
12458
+ state.modifiersData.popperOffsets.x += x3;
12605
12459
  state.modifiersData.popperOffsets.y += y4;
12606
12460
  }
12607
12461
  state.modifiersData[name] = data;
@@ -12829,14 +12683,14 @@
12829
12683
  }
12830
12684
 
12831
12685
  // node_modules/@popperjs/core/lib/utils/debounce.js
12832
- function debounce2(fn3) {
12686
+ function debounce2(fn2) {
12833
12687
  var pending;
12834
12688
  return function() {
12835
12689
  if (!pending) {
12836
12690
  pending = new Promise(function(resolve) {
12837
12691
  Promise.resolve().then(function() {
12838
12692
  pending = void 0;
12839
- resolve(fn3());
12693
+ resolve(fn2());
12840
12694
  });
12841
12695
  });
12842
12696
  }
@@ -12941,9 +12795,9 @@
12941
12795
  index = -1;
12942
12796
  continue;
12943
12797
  }
12944
- var _state$orderedModifie = state.orderedModifiers[index], fn3 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
12945
- if (typeof fn3 === "function") {
12946
- state = fn3({
12798
+ var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
12799
+ if (typeof fn2 === "function") {
12800
+ state = fn2({
12947
12801
  state,
12948
12802
  options: _options,
12949
12803
  name,
@@ -12990,8 +12844,8 @@
12990
12844
  });
12991
12845
  }
12992
12846
  function cleanupModifierEffects() {
12993
- effectCleanupFns.forEach(function(fn3) {
12994
- return fn3();
12847
+ effectCleanupFns.forEach(function(fn2) {
12848
+ return fn2();
12995
12849
  });
12996
12850
  effectCleanupFns = [];
12997
12851
  }
@@ -13381,13 +13235,13 @@
13381
13235
  construct
13382
13236
  } = typeof Reflect !== "undefined" && Reflect;
13383
13237
  if (!freeze) {
13384
- freeze = function freeze2(x4) {
13385
- return x4;
13238
+ freeze = function freeze2(x3) {
13239
+ return x3;
13386
13240
  };
13387
13241
  }
13388
13242
  if (!seal) {
13389
- seal = function seal2(x4) {
13390
- return x4;
13243
+ seal = function seal2(x3) {
13244
+ return x3;
13391
13245
  };
13392
13246
  }
13393
13247
  if (!apply) {
@@ -13416,9 +13270,6 @@
13416
13270
  var typeErrorCreate = unconstruct(TypeError);
13417
13271
  function unapply(func) {
13418
13272
  return function(thisArg) {
13419
- if (thisArg instanceof RegExp) {
13420
- thisArg.lastIndex = 0;
13421
- }
13422
13273
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13423
13274
  args[_key - 1] = arguments[_key];
13424
13275
  }
@@ -13514,7 +13365,7 @@
13514
13365
  var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
13515
13366
  var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
13516
13367
  var IS_ALLOWED_URI = seal(
13517
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
13368
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
13518
13369
  // eslint-disable-line no-useless-escape
13519
13370
  );
13520
13371
  var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
@@ -13576,7 +13427,7 @@
13576
13427
  return scriptUrl;
13577
13428
  }
13578
13429
  });
13579
- } catch (_4) {
13430
+ } catch (_3) {
13580
13431
  console.warn("TrustedTypes policy " + policyName + " could not be created.");
13581
13432
  return null;
13582
13433
  }
@@ -13597,7 +13448,7 @@
13597
13448
  function createDOMPurify() {
13598
13449
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
13599
13450
  const DOMPurify = (root) => createDOMPurify(root);
13600
- DOMPurify.version = "3.2.6";
13451
+ DOMPurify.version = "3.2.4";
13601
13452
  DOMPurify.removed = [];
13602
13453
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
13603
13454
  DOMPurify.isSupported = false;
@@ -13744,8 +13595,8 @@
13744
13595
  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;
13745
13596
  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;
13746
13597
  FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
13747
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
13748
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
13598
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
13599
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
13749
13600
  USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
13750
13601
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
13751
13602
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
@@ -13911,7 +13762,7 @@
13911
13762
  });
13912
13763
  try {
13913
13764
  getParentNode2(node).removeChild(node);
13914
- } catch (_4) {
13765
+ } catch (_3) {
13915
13766
  remove(node);
13916
13767
  }
13917
13768
  };
@@ -13921,7 +13772,7 @@
13921
13772
  attribute: element.getAttributeNode(name),
13922
13773
  from: element
13923
13774
  });
13924
- } catch (_4) {
13775
+ } catch (_3) {
13925
13776
  arrayPush(DOMPurify.removed, {
13926
13777
  attribute: null,
13927
13778
  from: element
@@ -13932,12 +13783,12 @@
13932
13783
  if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
13933
13784
  try {
13934
13785
  _forceRemove(element);
13935
- } catch (_4) {
13786
+ } catch (_3) {
13936
13787
  }
13937
13788
  } else {
13938
13789
  try {
13939
13790
  element.setAttribute(name, "");
13940
- } catch (_4) {
13791
+ } catch (_3) {
13941
13792
  }
13942
13793
  }
13943
13794
  }
@@ -13958,14 +13809,14 @@
13958
13809
  if (NAMESPACE === HTML_NAMESPACE) {
13959
13810
  try {
13960
13811
  doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
13961
- } catch (_4) {
13812
+ } catch (_3) {
13962
13813
  }
13963
13814
  }
13964
13815
  if (!doc || !doc.documentElement) {
13965
13816
  doc = implementation.createDocument(NAMESPACE, "template", null);
13966
13817
  try {
13967
13818
  doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
13968
- } catch (_4) {
13819
+ } catch (_3) {
13969
13820
  }
13970
13821
  }
13971
13822
  const body = doc.body || doc.documentElement;
@@ -14009,7 +13860,7 @@
14009
13860
  tagName,
14010
13861
  allowedTags: ALLOWED_TAGS
14011
13862
  });
14012
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
13863
+ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
14013
13864
  _forceRemove(currentNode);
14014
13865
  return true;
14015
13866
  }
@@ -14130,8 +13981,7 @@
14130
13981
  value: attrValue
14131
13982
  } = attr;
14132
13983
  const lcName = transformCaseFunc(name);
14133
- const initValue = attrValue;
14134
- let value = name === "value" ? initValue : stringTrim(initValue);
13984
+ let value = name === "value" ? attrValue : stringTrim(attrValue);
14135
13985
  hookEvent.attrName = lcName;
14136
13986
  hookEvent.attrValue = value;
14137
13987
  hookEvent.keepAttr = true;
@@ -14149,8 +13999,8 @@
14149
13999
  if (hookEvent.forceKeepAttr) {
14150
14000
  continue;
14151
14001
  }
14002
+ _removeAttribute(name, currentNode);
14152
14003
  if (!hookEvent.keepAttr) {
14153
- _removeAttribute(name, currentNode);
14154
14004
  continue;
14155
14005
  }
14156
14006
  if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
@@ -14164,7 +14014,6 @@
14164
14014
  }
14165
14015
  const lcTag = transformCaseFunc(currentNode.nodeName);
14166
14016
  if (!_isValidAttribute(lcTag, lcName, value)) {
14167
- _removeAttribute(name, currentNode);
14168
14017
  continue;
14169
14018
  }
14170
14019
  if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
@@ -14183,21 +14032,18 @@
14183
14032
  }
14184
14033
  }
14185
14034
  }
14186
- if (value !== initValue) {
14187
- try {
14188
- if (namespaceURI) {
14189
- currentNode.setAttributeNS(namespaceURI, name, value);
14190
- } else {
14191
- currentNode.setAttribute(name, value);
14192
- }
14193
- if (_isClobbered(currentNode)) {
14194
- _forceRemove(currentNode);
14195
- } else {
14196
- arrayPop(DOMPurify.removed);
14197
- }
14198
- } catch (_4) {
14199
- _removeAttribute(name, currentNode);
14035
+ try {
14036
+ if (namespaceURI) {
14037
+ currentNode.setAttributeNS(namespaceURI, name, value);
14038
+ } else {
14039
+ currentNode.setAttribute(name, value);
14200
14040
  }
14041
+ if (_isClobbered(currentNode)) {
14042
+ _forceRemove(currentNode);
14043
+ } else {
14044
+ arrayPop(DOMPurify.removed);
14045
+ }
14046
+ } catch (_3) {
14201
14047
  }
14202
14048
  }
14203
14049
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
@@ -14461,10 +14307,7 @@
14461
14307
  var list = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bullet).getRegex();
14462
14308
  var _tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
14463
14309
  var _comment = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
14464
- var html2 = edit(
14465
- "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
14466
- "i"
14467
- ).replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
14310
+ var html2 = edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
14468
14311
  var paragraph = edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
14469
14312
  var blockquote = edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", paragraph).getRegex();
14470
14313
  var blockNormal = {
@@ -14482,9 +14325,7 @@
14482
14325
  table: noopTest,
14483
14326
  text: blockText
14484
14327
  };
14485
- var gfmTable = edit(
14486
- "^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
14487
- ).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
14328
+ var gfmTable = edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
14488
14329
  var blockGfm = {
14489
14330
  ...blockNormal,
14490
14331
  lheading: lheadingGfm,
@@ -14493,9 +14334,7 @@
14493
14334
  };
14494
14335
  var blockPedantic = {
14495
14336
  ...blockNormal,
14496
- html: edit(
14497
- `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
14498
- ).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
14337
+ html: edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
14499
14338
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
14500
14339
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
14501
14340
  fences: noopTest,
@@ -14503,7 +14342,7 @@
14503
14342
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
14504
14343
  paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lheading).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
14505
14344
  };
14506
- var escape2 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
14345
+ var escape$1 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
14507
14346
  var inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
14508
14347
  var br = /^( {2,}|\\)\n(?!\s*$)/;
14509
14348
  var inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
@@ -14521,18 +14360,13 @@
14521
14360
  var emStrongRDelimAstCore = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
14522
14361
  var emStrongRDelimAst = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
14523
14362
  var emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm).replace(/punct/g, _punctuationGfmStrongEm).getRegex();
14524
- var emStrongRDelimUnd = edit(
14525
- "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
14526
- "gu"
14527
- ).replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
14363
+ var emStrongRDelimUnd = edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
14528
14364
  var anyPunctuation = edit(/\\(punct)/, "gu").replace(/punct/g, _punctuation).getRegex();
14529
14365
  var autolink = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
14530
14366
  var _inlineComment = edit(_comment).replace("(?:-->|$)", "-->").getRegex();
14531
- var tag = edit(
14532
- "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
14533
- ).replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
14367
+ var tag = edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
14534
14368
  var _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
14535
- var link = edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
14369
+ var link = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
14536
14370
  var reflink = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", _inlineLabel).replace("ref", _blockLabel).getRegex();
14537
14371
  var nolink = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", _blockLabel).getRegex();
14538
14372
  var reflinkSearch = edit("reflink|nolink(?!\\()", "g").replace("reflink", reflink).replace("nolink", nolink).getRegex();
@@ -14548,7 +14382,7 @@
14548
14382
  emStrongLDelim,
14549
14383
  emStrongRDelimAst,
14550
14384
  emStrongRDelimUnd,
14551
- escape: escape2,
14385
+ escape: escape$1,
14552
14386
  link,
14553
14387
  nolink,
14554
14388
  punctuation,
@@ -14596,17 +14430,17 @@
14596
14430
  "'": "&#39;"
14597
14431
  };
14598
14432
  var getEscapeReplacement = (ch) => escapeReplacements[ch];
14599
- function escape22(html22, encode) {
14433
+ function escape2(html3, encode) {
14600
14434
  if (encode) {
14601
- if (other.escapeTest.test(html22)) {
14602
- return html22.replace(other.escapeReplace, getEscapeReplacement);
14435
+ if (other.escapeTest.test(html3)) {
14436
+ return html3.replace(other.escapeReplace, getEscapeReplacement);
14603
14437
  }
14604
14438
  } else {
14605
- if (other.escapeTestNoEncode.test(html22)) {
14606
- return html22.replace(other.escapeReplaceNoEncode, getEscapeReplacement);
14439
+ if (other.escapeTestNoEncode.test(html3)) {
14440
+ return html3.replace(other.escapeReplaceNoEncode, getEscapeReplacement);
14607
14441
  }
14608
14442
  }
14609
- return html22;
14443
+ return html3;
14610
14444
  }
14611
14445
  function cleanUrl(href) {
14612
14446
  try {
@@ -14656,9 +14490,7 @@
14656
14490
  let suffLen = 0;
14657
14491
  while (suffLen < l4) {
14658
14492
  const currChar = str.charAt(l4 - suffLen - 1);
14659
- if (currChar === c4 && !invert) {
14660
- suffLen++;
14661
- } else if (currChar !== c4 && invert) {
14493
+ if (currChar === c4 && true) {
14662
14494
  suffLen++;
14663
14495
  } else {
14664
14496
  break;
@@ -14683,26 +14515,32 @@
14683
14515
  }
14684
14516
  }
14685
14517
  }
14686
- if (level > 0) {
14687
- return -2;
14688
- }
14689
14518
  return -1;
14690
14519
  }
14691
14520
  function outputLink(cap, link2, raw, lexer2, rules) {
14692
14521
  const href = link2.href;
14693
14522
  const title = link2.title || null;
14694
14523
  const text2 = cap[1].replace(rules.other.outputLinkReplace, "$1");
14695
- lexer2.state.inLink = true;
14696
- const token = {
14697
- type: cap[0].charAt(0) === "!" ? "image" : "link",
14524
+ if (cap[0].charAt(0) !== "!") {
14525
+ lexer2.state.inLink = true;
14526
+ const token = {
14527
+ type: "link",
14528
+ raw,
14529
+ href,
14530
+ title,
14531
+ text: text2,
14532
+ tokens: lexer2.inlineTokens(text2)
14533
+ };
14534
+ lexer2.state.inLink = false;
14535
+ return token;
14536
+ }
14537
+ return {
14538
+ type: "image",
14698
14539
  raw,
14699
14540
  href,
14700
14541
  title,
14701
- text: text2,
14702
- tokens: lexer2.inlineTokens(text2)
14542
+ text: text2
14703
14543
  };
14704
- lexer2.state.inLink = false;
14705
- return token;
14706
14544
  }
14707
14545
  function indentCodeCompensation(raw, text2, rules) {
14708
14546
  const matchIndentToCode = raw.match(rules.other.indentCodeCompensation);
@@ -15184,9 +15022,6 @@ ${currentText}` : currentText;
15184
15022
  }
15185
15023
  } else {
15186
15024
  const lastParenIndex = findClosingBracket(cap[2], "()");
15187
- if (lastParenIndex === -2) {
15188
- return;
15189
- }
15190
15025
  if (lastParenIndex > -1) {
15191
15026
  const start3 = cap[0].indexOf("!") === 0 ? 5 : 4;
15192
15027
  const linkLen = start3 + cap[1].length + lastParenIndex;
@@ -15270,12 +15105,12 @@ ${currentText}` : currentText;
15270
15105
  const lastCharLength = [...match2[0]][0].length;
15271
15106
  const raw = src.slice(0, lLength + match2.index + lastCharLength + rLength);
15272
15107
  if (Math.min(lLength, rLength) % 2) {
15273
- const text22 = raw.slice(1, -1);
15108
+ const text3 = raw.slice(1, -1);
15274
15109
  return {
15275
15110
  type: "em",
15276
15111
  raw,
15277
- text: text22,
15278
- tokens: this.lexer.inlineTokens(text22)
15112
+ text: text3,
15113
+ tokens: this.lexer.inlineTokens(text3)
15279
15114
  };
15280
15115
  }
15281
15116
  const text2 = raw.slice(2, -2);
@@ -15640,12 +15475,12 @@ ${currentText}` : currentText;
15640
15475
  }
15641
15476
  }
15642
15477
  }
15643
- while ((match2 = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
15644
- maskedSrc = maskedSrc.slice(0, match2.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
15645
- }
15646
15478
  while ((match2 = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
15647
15479
  maskedSrc = maskedSrc.slice(0, match2.index) + "[" + "a".repeat(match2[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
15648
15480
  }
15481
+ while ((match2 = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
15482
+ maskedSrc = maskedSrc.slice(0, match2.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
15483
+ }
15649
15484
  let keepPrevChar = false;
15650
15485
  let prevChar = "";
15651
15486
  while (src) {
@@ -15777,9 +15612,9 @@ ${currentText}` : currentText;
15777
15612
  const langString = (lang || "").match(other.notSpaceStart)?.[0];
15778
15613
  const code = text2.replace(other.endingNewline, "") + "\n";
15779
15614
  if (!langString) {
15780
- return "<pre><code>" + (escaped ? code : escape22(code, true)) + "</code></pre>\n";
15615
+ return "<pre><code>" + (escaped ? code : escape2(code, true)) + "</code></pre>\n";
15781
15616
  }
15782
- return '<pre><code class="language-' + escape22(langString) + '">' + (escaped ? code : escape22(code, true)) + "</code></pre>\n";
15617
+ return '<pre><code class="language-' + escape2(langString) + '">' + (escaped ? code : escape2(code, true)) + "</code></pre>\n";
15783
15618
  }
15784
15619
  blockquote({ tokens }) {
15785
15620
  const body = this.parser.parse(tokens);
@@ -15801,8 +15636,8 @@ ${body}</blockquote>
15801
15636
  const ordered = token.ordered;
15802
15637
  const start3 = token.start;
15803
15638
  let body = "";
15804
- for (let j5 = 0; j5 < token.items.length; j5++) {
15805
- const item = token.items[j5];
15639
+ for (let j4 = 0; j4 < token.items.length; j4++) {
15640
+ const item = token.items[j4];
15806
15641
  body += this.listitem(item);
15807
15642
  }
15808
15643
  const type = ordered ? "ol" : "ul";
@@ -15817,7 +15652,7 @@ ${body}</blockquote>
15817
15652
  if (item.tokens[0]?.type === "paragraph") {
15818
15653
  item.tokens[0].text = checkbox + " " + item.tokens[0].text;
15819
15654
  if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
15820
- item.tokens[0].tokens[0].text = checkbox + " " + escape22(item.tokens[0].tokens[0].text);
15655
+ item.tokens[0].tokens[0].text = checkbox + " " + escape2(item.tokens[0].tokens[0].text);
15821
15656
  item.tokens[0].tokens[0].escaped = true;
15822
15657
  }
15823
15658
  } else {
@@ -15846,13 +15681,13 @@ ${body}</blockquote>
15846
15681
  table(token) {
15847
15682
  let header = "";
15848
15683
  let cell = "";
15849
- for (let j5 = 0; j5 < token.header.length; j5++) {
15850
- cell += this.tablecell(token.header[j5]);
15684
+ for (let j4 = 0; j4 < token.header.length; j4++) {
15685
+ cell += this.tablecell(token.header[j4]);
15851
15686
  }
15852
15687
  header += this.tablerow({ text: cell });
15853
15688
  let body = "";
15854
- for (let j5 = 0; j5 < token.rows.length; j5++) {
15855
- const row = token.rows[j5];
15689
+ for (let j4 = 0; j4 < token.rows.length; j4++) {
15690
+ const row = token.rows[j4];
15856
15691
  cell = "";
15857
15692
  for (let k4 = 0; k4 < row.length; k4++) {
15858
15693
  cell += this.tablecell(row[k4]);
@@ -15885,7 +15720,7 @@ ${text2}</tr>
15885
15720
  return `<em>${this.parser.parseInline(tokens)}</em>`;
15886
15721
  }
15887
15722
  codespan({ text: text2 }) {
15888
- return `<code>${escape22(text2, true)}</code>`;
15723
+ return `<code>${escape2(text2, true)}</code>`;
15889
15724
  }
15890
15725
  br(token) {
15891
15726
  return "<br>";
@@ -15902,29 +15737,26 @@ ${text2}</tr>
15902
15737
  href = cleanHref;
15903
15738
  let out = '<a href="' + href + '"';
15904
15739
  if (title) {
15905
- out += ' title="' + escape22(title) + '"';
15740
+ out += ' title="' + escape2(title) + '"';
15906
15741
  }
15907
15742
  out += ">" + text2 + "</a>";
15908
15743
  return out;
15909
15744
  }
15910
- image({ href, title, text: text2, tokens }) {
15911
- if (tokens) {
15912
- text2 = this.parser.parseInline(tokens, this.parser.textRenderer);
15913
- }
15745
+ image({ href, title, text: text2 }) {
15914
15746
  const cleanHref = cleanUrl(href);
15915
15747
  if (cleanHref === null) {
15916
- return escape22(text2);
15748
+ return escape2(text2);
15917
15749
  }
15918
15750
  href = cleanHref;
15919
15751
  let out = `<img src="${href}" alt="${text2}"`;
15920
15752
  if (title) {
15921
- out += ` title="${escape22(title)}"`;
15753
+ out += ` title="${escape2(title)}"`;
15922
15754
  }
15923
15755
  out += ">";
15924
15756
  return out;
15925
15757
  }
15926
15758
  text(token) {
15927
- return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : "escaped" in token && token.escaped ? token.text : escape22(token.text);
15759
+ return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : "escaped" in token && token.escaped ? token.text : escape2(token.text);
15928
15760
  }
15929
15761
  };
15930
15762
  var _TextRenderer = class {
@@ -16158,8 +15990,8 @@ ${text2}</tr>
16158
15990
  /**
16159
15991
  * Process HTML after marked is finished
16160
15992
  */
16161
- postprocess(html22) {
16162
- return html22;
15993
+ postprocess(html3) {
15994
+ return html3;
16163
15995
  }
16164
15996
  /**
16165
15997
  * Process all tokens before walk tokens
@@ -16395,7 +16227,7 @@ ${text2}</tr>
16395
16227
  return _Parser.parse(tokens, options2 ?? this.defaults);
16396
16228
  }
16397
16229
  parseMarkdown(blockType) {
16398
- const parse2 = (src, options2) => {
16230
+ const parse = (src, options2) => {
16399
16231
  const origOpt = { ...options2 };
16400
16232
  const opt = { ...this.defaults, ...origOpt };
16401
16233
  const throwError = this.onError(!!opt.silent, !!opt.async);
@@ -16415,7 +16247,7 @@ ${text2}</tr>
16415
16247
  const lexer2 = opt.hooks ? opt.hooks.provideLexer() : blockType ? _Lexer.lex : _Lexer.lexInline;
16416
16248
  const parser2 = opt.hooks ? opt.hooks.provideParser() : blockType ? _Parser.parse : _Parser.parseInline;
16417
16249
  if (opt.async) {
16418
- return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then((src2) => lexer2(src2, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser2(tokens, opt)).then((html22) => opt.hooks ? opt.hooks.postprocess(html22) : html22).catch(throwError);
16250
+ return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then((src2) => lexer2(src2, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser2(tokens, opt)).then((html3) => opt.hooks ? opt.hooks.postprocess(html3) : html3).catch(throwError);
16419
16251
  }
16420
16252
  try {
16421
16253
  if (opt.hooks) {
@@ -16428,22 +16260,22 @@ ${text2}</tr>
16428
16260
  if (opt.walkTokens) {
16429
16261
  this.walkTokens(tokens, opt.walkTokens);
16430
16262
  }
16431
- let html22 = parser2(tokens, opt);
16263
+ let html3 = parser2(tokens, opt);
16432
16264
  if (opt.hooks) {
16433
- html22 = opt.hooks.postprocess(html22);
16265
+ html3 = opt.hooks.postprocess(html3);
16434
16266
  }
16435
- return html22;
16267
+ return html3;
16436
16268
  } catch (e4) {
16437
16269
  return throwError(e4);
16438
16270
  }
16439
16271
  };
16440
- return parse2;
16272
+ return parse;
16441
16273
  }
16442
16274
  onError(silent, async) {
16443
16275
  return (e4) => {
16444
16276
  e4.message += "\nPlease report this to https://github.com/markedjs/marked.";
16445
16277
  if (silent) {
16446
- const msg = "<p>An error occurred:</p><pre>" + escape22(e4.message + "", true) + "</pre>";
16278
+ const msg = "<p>An error occurred:</p><pre>" + escape2(e4.message + "", true) + "</pre>";
16447
16279
  if (async) {
16448
16280
  return Promise.resolve(msg);
16449
16281
  }
@@ -16832,7 +16664,7 @@ ${text2}</tr>
16832
16664
  // src/js/controllers/select_navigator.js
16833
16665
  var select_navigator_default = class extends Controller {
16834
16666
  static targets = ["select"];
16835
- navigate(_4) {
16667
+ navigate(_3) {
16836
16668
  const url = this.selectTarget.value;
16837
16669
  const anchor = document.createElement("a");
16838
16670
  anchor.href = url;
@@ -17132,7 +16964,6 @@ ${text2}</tr>
17132
16964
  mov: "video/quicktime",
17133
16965
  dicom: "application/dicom",
17134
16966
  doc: "application/msword",
17135
- msg: "application/vnd.ms-outlook",
17136
16967
  docm: "application/vnd.ms-word.document.macroenabled.12",
17137
16968
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
17138
16969
  dot: "application/msword",
@@ -17523,7 +17354,7 @@ ${text2}</tr>
17523
17354
  return "__private_" + id3++ + "_" + e4;
17524
17355
  }
17525
17356
  var packageJson2 = {
17526
- "version": "4.4.7"
17357
+ "version": "4.4.2"
17527
17358
  };
17528
17359
  var defaultUploadState = {
17529
17360
  totalProgress: 0,
@@ -17545,8 +17376,6 @@ ${text2}</tr>
17545
17376
  var _transformFile = /* @__PURE__ */ _classPrivateFieldLooseKey3("transformFile");
17546
17377
  var _startIfAutoProceed = /* @__PURE__ */ _classPrivateFieldLooseKey3("startIfAutoProceed");
17547
17378
  var _checkAndUpdateFileState = /* @__PURE__ */ _classPrivateFieldLooseKey3("checkAndUpdateFileState");
17548
- var _getFilesToRetry = /* @__PURE__ */ _classPrivateFieldLooseKey3("getFilesToRetry");
17549
- var _doRetryAll = /* @__PURE__ */ _classPrivateFieldLooseKey3("doRetryAll");
17550
17379
  var _handleUploadProgress = /* @__PURE__ */ _classPrivateFieldLooseKey3("handleUploadProgress");
17551
17380
  var _updateTotalProgress = /* @__PURE__ */ _classPrivateFieldLooseKey3("updateTotalProgress");
17552
17381
  var _updateTotalProgressThrottled = /* @__PURE__ */ _classPrivateFieldLooseKey3("updateTotalProgressThrottled");
@@ -17584,12 +17413,6 @@ ${text2}</tr>
17584
17413
  Object.defineProperty(this, _updateTotalProgress, {
17585
17414
  value: _updateTotalProgress2
17586
17415
  });
17587
- Object.defineProperty(this, _doRetryAll, {
17588
- value: _doRetryAll2
17589
- });
17590
- Object.defineProperty(this, _getFilesToRetry, {
17591
- value: _getFilesToRetry2
17592
- });
17593
17416
  Object.defineProperty(this, _checkAndUpdateFileState, {
17594
17417
  value: _checkAndUpdateFileState2
17595
17418
  });
@@ -17888,23 +17711,23 @@ ${text2}</tr>
17888
17711
  files: {}
17889
17712
  });
17890
17713
  }
17891
- addPreProcessor(fn3) {
17892
- _classPrivateFieldLooseBase3(this, _preProcessors)[_preProcessors].add(fn3);
17714
+ addPreProcessor(fn2) {
17715
+ _classPrivateFieldLooseBase3(this, _preProcessors)[_preProcessors].add(fn2);
17893
17716
  }
17894
- removePreProcessor(fn3) {
17895
- return _classPrivateFieldLooseBase3(this, _preProcessors)[_preProcessors].delete(fn3);
17717
+ removePreProcessor(fn2) {
17718
+ return _classPrivateFieldLooseBase3(this, _preProcessors)[_preProcessors].delete(fn2);
17896
17719
  }
17897
- addPostProcessor(fn3) {
17898
- _classPrivateFieldLooseBase3(this, _postProcessors)[_postProcessors].add(fn3);
17720
+ addPostProcessor(fn2) {
17721
+ _classPrivateFieldLooseBase3(this, _postProcessors)[_postProcessors].add(fn2);
17899
17722
  }
17900
- removePostProcessor(fn3) {
17901
- return _classPrivateFieldLooseBase3(this, _postProcessors)[_postProcessors].delete(fn3);
17723
+ removePostProcessor(fn2) {
17724
+ return _classPrivateFieldLooseBase3(this, _postProcessors)[_postProcessors].delete(fn2);
17902
17725
  }
17903
- addUploader(fn3) {
17904
- _classPrivateFieldLooseBase3(this, _uploaders)[_uploaders].add(fn3);
17726
+ addUploader(fn2) {
17727
+ _classPrivateFieldLooseBase3(this, _uploaders)[_uploaders].add(fn2);
17905
17728
  }
17906
- removeUploader(fn3) {
17907
- return _classPrivateFieldLooseBase3(this, _uploaders)[_uploaders].delete(fn3);
17729
+ removeUploader(fn2) {
17730
+ return _classPrivateFieldLooseBase3(this, _uploaders)[_uploaders].delete(fn2);
17908
17731
  }
17909
17732
  setMeta(data) {
17910
17733
  const updatedMeta = {
@@ -18268,10 +18091,37 @@ ${text2}</tr>
18268
18091
  });
18269
18092
  this.emit("resume-all");
18270
18093
  }
18271
- async retryAll() {
18272
- const result = await _classPrivateFieldLooseBase3(this, _doRetryAll)[_doRetryAll]();
18273
- this.emit("complete", result);
18274
- return result;
18094
+ retryAll() {
18095
+ const updatedFiles = {
18096
+ ...this.getState().files
18097
+ };
18098
+ const filesToRetry = Object.keys(updatedFiles).filter((file) => {
18099
+ return updatedFiles[file].error;
18100
+ });
18101
+ filesToRetry.forEach((file) => {
18102
+ const updatedFile = {
18103
+ ...updatedFiles[file],
18104
+ isPaused: false,
18105
+ error: null
18106
+ };
18107
+ updatedFiles[file] = updatedFile;
18108
+ });
18109
+ this.setState({
18110
+ files: updatedFiles,
18111
+ error: null
18112
+ });
18113
+ this.emit("retry-all", Object.values(updatedFiles));
18114
+ if (filesToRetry.length === 0) {
18115
+ return Promise.resolve({
18116
+ successful: [],
18117
+ failed: []
18118
+ });
18119
+ }
18120
+ const uploadID = _classPrivateFieldLooseBase3(this, _createUpload)[_createUpload](filesToRetry, {
18121
+ forceAllowNewUpload: true
18122
+ // create new upload even if allowNewUpload: false
18123
+ });
18124
+ return _classPrivateFieldLooseBase3(this, _runUpload)[_runUpload](uploadID);
18275
18125
  }
18276
18126
  cancelAll() {
18277
18127
  this.emit("cancel-all");
@@ -18529,7 +18379,7 @@ Uppy plugins must have unique \`id\` options.`;
18529
18379
  /**
18530
18380
  * Start an upload for all the files that are not currently being uploaded.
18531
18381
  */
18532
- async upload() {
18382
+ upload() {
18533
18383
  var _classPrivateFieldLoo;
18534
18384
  if (!((_classPrivateFieldLoo = _classPrivateFieldLooseBase3(this, _plugins)[_plugins]["uploader"]) != null && _classPrivateFieldLoo.length)) {
18535
18385
  this.log("No uploader type plugins are used", "warning");
@@ -18537,19 +18387,6 @@ Uppy plugins must have unique \`id\` options.`;
18537
18387
  let {
18538
18388
  files
18539
18389
  } = this.getState();
18540
- const filesToRetry = _classPrivateFieldLooseBase3(this, _getFilesToRetry)[_getFilesToRetry]();
18541
- if (filesToRetry.length > 0) {
18542
- const retryResult = await _classPrivateFieldLooseBase3(this, _doRetryAll)[_doRetryAll]();
18543
- const hasNewFiles = this.getFiles().filter((file) => file.progress.uploadStarted == null).length > 0;
18544
- if (!hasNewFiles) {
18545
- this.emit("complete", retryResult);
18546
- return retryResult;
18547
- }
18548
- ;
18549
- ({
18550
- files
18551
- } = this.getState());
18552
- }
18553
18390
  const onBeforeUploadResult = this.opts.onBeforeUpload(files);
18554
18391
  if (onBeforeUploadResult === false) {
18555
18392
  return Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false"));
@@ -18569,7 +18406,7 @@ Uppy plugins must have unique \`id\` options.`;
18569
18406
  }
18570
18407
  }).catch((err) => {
18571
18408
  throw err;
18572
- }).then(async () => {
18409
+ }).then(() => {
18573
18410
  const {
18574
18411
  currentUploads
18575
18412
  } = this.getState();
@@ -18582,9 +18419,7 @@ Uppy plugins must have unique \`id\` options.`;
18582
18419
  }
18583
18420
  });
18584
18421
  const uploadID = _classPrivateFieldLooseBase3(this, _createUpload)[_createUpload](waitingFileIDs);
18585
- const result = await _classPrivateFieldLooseBase3(this, _runUpload)[_runUpload](uploadID);
18586
- this.emit("complete", result);
18587
- return result;
18422
+ return _classPrivateFieldLooseBase3(this, _runUpload)[_runUpload](uploadID);
18588
18423
  }).catch((err) => {
18589
18424
  this.emit("error", err);
18590
18425
  this.log(err, "error");
@@ -18636,11 +18471,6 @@ Uppy plugins must have unique \`id\` options.`;
18636
18471
  this.emit("restriction-failed", file, error2);
18637
18472
  return false;
18638
18473
  }
18639
- if (missingFields.length === 0 && file.missingRequiredMetaFields) {
18640
- this.setFileState(file.id, {
18641
- missingRequiredMetaFields: []
18642
- });
18643
- }
18644
18474
  return true;
18645
18475
  }
18646
18476
  function _checkRequiredMetaFields2(files) {
@@ -18779,43 +18609,6 @@ Uppy plugins must have unique \`id\` options.`;
18779
18609
  errors
18780
18610
  };
18781
18611
  }
18782
- function _getFilesToRetry2() {
18783
- const {
18784
- files
18785
- } = this.getState();
18786
- return Object.keys(files).filter((file) => {
18787
- return files[file].error;
18788
- });
18789
- }
18790
- async function _doRetryAll2() {
18791
- const filesToRetry = _classPrivateFieldLooseBase3(this, _getFilesToRetry)[_getFilesToRetry]();
18792
- const updatedFiles = {
18793
- ...this.getState().files
18794
- };
18795
- filesToRetry.forEach((fileID) => {
18796
- updatedFiles[fileID] = {
18797
- ...updatedFiles[fileID],
18798
- isPaused: false,
18799
- error: null
18800
- };
18801
- });
18802
- this.setState({
18803
- files: updatedFiles,
18804
- error: null
18805
- });
18806
- this.emit("retry-all", this.getFilesByIds(filesToRetry));
18807
- if (filesToRetry.length === 0) {
18808
- return {
18809
- successful: [],
18810
- failed: []
18811
- };
18812
- }
18813
- const uploadID = _classPrivateFieldLooseBase3(this, _createUpload)[_createUpload](filesToRetry, {
18814
- forceAllowNewUpload: true
18815
- // create new upload even if allowNewUpload: false
18816
- });
18817
- return _classPrivateFieldLooseBase3(this, _runUpload)[_runUpload](uploadID);
18818
- }
18819
18612
  function _updateTotalProgress2() {
18820
18613
  var _totalProgressPercent, _totalProgressPercent2;
18821
18614
  const totalProgress = _classPrivateFieldLooseBase3(this, _calculateTotalProgress)[_calculateTotalProgress]();
@@ -19093,7 +18886,7 @@ Uppy plugins must have unique \`id\` options.`;
19093
18886
  if (!currentUpload) {
19094
18887
  break;
19095
18888
  }
19096
- const fn3 = steps[step];
18889
+ const fn2 = steps[step];
19097
18890
  this.setState({
19098
18891
  currentUploads: {
19099
18892
  ...this.getState().currentUploads,
@@ -19106,7 +18899,7 @@ Uppy plugins must have unique \`id\` options.`;
19106
18899
  const {
19107
18900
  fileIDs
19108
18901
  } = currentUpload;
19109
- await fn3(fileIDs, uploadID);
18902
+ await fn2(fileIDs, uploadID);
19110
18903
  currentUpload = getCurrentUpload();
19111
18904
  }
19112
18905
  } catch (err) {
@@ -19133,15 +18926,11 @@ Uppy plugins must have unique \`id\` options.`;
19133
18926
  let result;
19134
18927
  if (currentUpload) {
19135
18928
  result = currentUpload.result;
18929
+ this.emit("complete", result);
19136
18930
  _classPrivateFieldLooseBase3(this, _removeUpload)[_removeUpload](uploadID);
19137
18931
  }
19138
18932
  if (result == null) {
19139
18933
  this.log(`Not setting result for an upload that has been removed: ${uploadID}`);
19140
- result = {
19141
- successful: [],
19142
- failed: [],
19143
- uploadID
19144
- };
19145
18934
  }
19146
18935
  return result;
19147
18936
  }
@@ -19151,8 +18940,8 @@ Uppy plugins must have unique \`id\` options.`;
19151
18940
  // node_modules/preact/dist/preact.module.js
19152
18941
  var n;
19153
18942
  var l;
19154
- var u;
19155
18943
  var t;
18944
+ var u;
19156
18945
  var i;
19157
18946
  var r;
19158
18947
  var o;
@@ -19165,26 +18954,26 @@ Uppy plugins must have unique \`id\` options.`;
19165
18954
  var p = {};
19166
18955
  var v = [];
19167
18956
  var y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
19168
- var w = Array.isArray;
19169
- function d(n3, l4) {
19170
- for (var u4 in l4)
19171
- n3[u4] = l4[u4];
18957
+ var d = Array.isArray;
18958
+ function w(n3, l4) {
18959
+ for (var t4 in l4)
18960
+ n3[t4] = l4[t4];
19172
18961
  return n3;
19173
18962
  }
19174
18963
  function g(n3) {
19175
18964
  n3 && n3.parentNode && n3.parentNode.removeChild(n3);
19176
18965
  }
19177
- function _(l4, u4, t4) {
18966
+ function _(l4, t4, u4) {
19178
18967
  var i4, r4, o4, e4 = {};
19179
- for (o4 in u4)
19180
- "key" == o4 ? i4 = u4[o4] : "ref" == o4 ? r4 = u4[o4] : e4[o4] = u4[o4];
19181
- if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps)
18968
+ for (o4 in t4)
18969
+ "key" == o4 ? i4 = t4[o4] : "ref" == o4 ? r4 = t4[o4] : e4[o4] = t4[o4];
18970
+ if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : u4), "function" == typeof l4 && null != l4.defaultProps)
19182
18971
  for (o4 in l4.defaultProps)
19183
18972
  void 0 === e4[o4] && (e4[o4] = l4.defaultProps[o4]);
19184
18973
  return m(l4, e4, i4, r4, null);
19185
18974
  }
19186
- function m(n3, t4, i4, r4, o4) {
19187
- var e4 = { type: n3, props: t4, key: i4, ref: r4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o4 ? ++u : o4, __i: -1, __u: 0 };
18975
+ function m(n3, u4, i4, r4, o4) {
18976
+ var e4 = { type: n3, props: u4, key: i4, ref: r4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o4 ? ++t : o4, __i: -1, __u: 0 };
19188
18977
  return null == o4 && null != l.vnode && l.vnode(e4), e4;
19189
18978
  }
19190
18979
  function b() {
@@ -19199,627 +18988,292 @@ Uppy plugins must have unique \`id\` options.`;
19199
18988
  function S(n3, l4) {
19200
18989
  if (null == l4)
19201
18990
  return n3.__ ? S(n3.__, n3.__i + 1) : null;
19202
- for (var u4; l4 < n3.__k.length; l4++)
19203
- if (null != (u4 = n3.__k[l4]) && null != u4.__e)
19204
- return u4.__e;
18991
+ for (var t4; l4 < n3.__k.length; l4++)
18992
+ if (null != (t4 = n3.__k[l4]) && null != t4.__e)
18993
+ return t4.__e;
19205
18994
  return "function" == typeof n3.type ? S(n3) : null;
19206
18995
  }
19207
18996
  function C(n3) {
19208
- var l4, u4;
18997
+ var l4, t4;
19209
18998
  if (null != (n3 = n3.__) && null != n3.__c) {
19210
18999
  for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++)
19211
- if (null != (u4 = n3.__k[l4]) && null != u4.__e) {
19212
- n3.__e = n3.__c.base = u4.__e;
19000
+ if (null != (t4 = n3.__k[l4]) && null != t4.__e) {
19001
+ n3.__e = n3.__c.base = t4.__e;
19213
19002
  break;
19214
19003
  }
19215
19004
  return C(n3);
19216
19005
  }
19217
19006
  }
19218
19007
  function M(n3) {
19219
- (!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || r != l.debounceRendering) && ((r = l.debounceRendering) || o)($);
19008
+ (!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || r !== l.debounceRendering) && ((r = l.debounceRendering) || o)($);
19220
19009
  }
19221
19010
  function $() {
19222
- for (var n3, u4, t4, r4, o4, f4, c4, s4 = 1; i.length; )
19223
- i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t4 = void 0, o4 = (r4 = (u4 = n3).__v).__e, f4 = [], c4 = [], u4.__P && ((t4 = d({}, r4)).__v = r4.__v + 1, l.vnode && l.vnode(t4), O(u4.__P, t4, r4, u4.__n, u4.__P.namespaceURI, 32 & r4.__u ? [o4] : null, f4, null == o4 ? S(r4) : o4, !!(32 & r4.__u), c4), t4.__v = r4.__v, t4.__.__k[t4.__i] = t4, z(f4, t4, c4), t4.__e != o4 && C(t4)));
19011
+ for (var n3, t4, u4, r4, o4, f4, c4, s4 = 1; i.length; )
19012
+ i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (u4 = void 0, o4 = (r4 = (t4 = n3).__v).__e, f4 = [], c4 = [], t4.__P && ((u4 = w({}, r4)).__v = r4.__v + 1, l.vnode && l.vnode(u4), O(t4.__P, u4, r4, t4.__n, t4.__P.namespaceURI, 32 & r4.__u ? [o4] : null, f4, null == o4 ? S(r4) : o4, !!(32 & r4.__u), c4), u4.__v = r4.__v, u4.__.__k[u4.__i] = u4, z(f4, u4, c4), u4.__e != o4 && C(u4)));
19224
19013
  $.__r = 0;
19225
19014
  }
19226
- function I(n3, l4, u4, t4, i4, r4, o4, e4, f4, c4, s4) {
19227
- var a4, h4, y4, w4, d4, g5, _4 = t4 && t4.__k || v, m4 = l4.length;
19228
- for (f4 = P(u4, l4, _4, f4, m4), a4 = 0; a4 < m4; a4++)
19229
- null != (y4 = u4.__k[a4]) && (h4 = -1 == y4.__i ? p : _4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i4, r4, o4, e4, f4, c4, s4), w4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && q(h4.ref, null, y4), s4.push(y4.ref, y4.__c || w4, y4)), null == d4 && null != w4 && (d4 = w4), 4 & y4.__u || h4.__k === y4.__k ? f4 = A(y4, f4, n3) : "function" == typeof y4.type && void 0 !== g5 ? f4 = g5 : w4 && (f4 = w4.nextSibling), y4.__u &= -7);
19230
- return u4.__e = d4, f4;
19015
+ function I(n3, l4, t4, u4, i4, r4, o4, e4, f4, c4, s4) {
19016
+ var a4, h4, y4, d4, w4, g3, _3 = u4 && u4.__k || v, m4 = l4.length;
19017
+ for (f4 = P(t4, l4, _3, f4, m4), a4 = 0; a4 < m4; a4++)
19018
+ null != (y4 = t4.__k[a4]) && (h4 = -1 === y4.__i ? p : _3[y4.__i] || p, y4.__i = a4, g3 = O(n3, y4, h4, i4, r4, o4, e4, f4, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && q(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), 4 & y4.__u || h4.__k === y4.__k ? f4 = A(y4, f4, n3) : "function" == typeof y4.type && void 0 !== g3 ? f4 = g3 : d4 && (f4 = d4.nextSibling), y4.__u &= -7);
19019
+ return t4.__e = w4, f4;
19231
19020
  }
19232
- function P(n3, l4, u4, t4, i4) {
19233
- var r4, o4, e4, f4, c4, s4 = u4.length, a4 = s4, h4 = 0;
19021
+ function P(n3, l4, t4, u4, i4) {
19022
+ var r4, o4, e4, f4, c4, s4 = t4.length, a4 = s4, h4 = 0;
19234
19023
  for (n3.__k = new Array(i4), r4 = 0; r4 < i4; r4++)
19235
- null != (o4 = l4[r4]) && "boolean" != typeof o4 && "function" != typeof o4 ? (f4 = r4 + h4, (o4 = n3.__k[r4] = "string" == typeof o4 || "number" == typeof o4 || "bigint" == typeof o4 || o4.constructor == String ? m(null, o4, null, null, null) : w(o4) ? m(k, { children: o4 }, null, null, null) : null == o4.constructor && o4.__b > 0 ? m(o4.type, o4.props, o4.key, o4.ref ? o4.ref : null, o4.__v) : o4).__ = n3, o4.__b = n3.__b + 1, e4 = null, -1 != (c4 = o4.__i = L(o4, u4, f4, a4)) && (a4--, (e4 = u4[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i4 > s4 ? h4-- : i4 < s4 && h4++), "function" != typeof o4.type && (o4.__u |= 4)) : c4 != f4 && (c4 == f4 - 1 ? h4-- : c4 == f4 + 1 ? h4++ : (c4 > f4 ? h4-- : h4++, o4.__u |= 4))) : n3.__k[r4] = null;
19024
+ null != (o4 = l4[r4]) && "boolean" != typeof o4 && "function" != typeof o4 ? (f4 = r4 + h4, (o4 = n3.__k[r4] = "string" == typeof o4 || "number" == typeof o4 || "bigint" == typeof o4 || o4.constructor == String ? m(null, o4, null, null, null) : d(o4) ? m(k, { children: o4 }, null, null, null) : void 0 === o4.constructor && o4.__b > 0 ? m(o4.type, o4.props, o4.key, o4.ref ? o4.ref : null, o4.__v) : o4).__ = n3, o4.__b = n3.__b + 1, e4 = null, -1 !== (c4 = o4.__i = L(o4, t4, f4, a4)) && (a4--, (e4 = t4[c4]) && (e4.__u |= 2)), null == e4 || null === e4.__v ? (-1 == c4 && (i4 > s4 ? h4-- : i4 < s4 && h4++), "function" != typeof o4.type && (o4.__u |= 4)) : c4 != f4 && (c4 == f4 - 1 ? h4-- : c4 == f4 + 1 ? h4++ : (c4 > f4 ? h4-- : h4++, o4.__u |= 4))) : n3.__k[r4] = null;
19236
19025
  if (a4)
19237
19026
  for (r4 = 0; r4 < s4; r4++)
19238
- null != (e4 = u4[r4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), B(e4, e4));
19239
- return t4;
19027
+ null != (e4 = t4[r4]) && 0 == (2 & e4.__u) && (e4.__e == u4 && (u4 = S(e4)), B(e4, e4));
19028
+ return u4;
19240
19029
  }
19241
- function A(n3, l4, u4) {
19242
- var t4, i4;
19030
+ function A(n3, l4, t4) {
19031
+ var u4, i4;
19243
19032
  if ("function" == typeof n3.type) {
19244
- for (t4 = n3.__k, i4 = 0; t4 && i4 < t4.length; i4++)
19245
- t4[i4] && (t4[i4].__ = n3, l4 = A(t4[i4], l4, u4));
19033
+ for (u4 = n3.__k, i4 = 0; u4 && i4 < u4.length; i4++)
19034
+ u4[i4] && (u4[i4].__ = n3, l4 = A(u4[i4], l4, t4));
19246
19035
  return l4;
19247
19036
  }
19248
- n3.__e != l4 && (l4 && n3.type && !u4.contains(l4) && (l4 = S(n3)), u4.insertBefore(n3.__e, l4 || null), l4 = n3.__e);
19037
+ n3.__e != l4 && (l4 && n3.type && !t4.contains(l4) && (l4 = S(n3)), t4.insertBefore(n3.__e, l4 || null), l4 = n3.__e);
19249
19038
  do {
19250
19039
  l4 = l4 && l4.nextSibling;
19251
19040
  } while (null != l4 && 8 == l4.nodeType);
19252
19041
  return l4;
19253
19042
  }
19254
19043
  function H(n3, l4) {
19255
- return l4 = l4 || [], null == n3 || "boolean" == typeof n3 || (w(n3) ? n3.some(function(n4) {
19044
+ return l4 = l4 || [], null == n3 || "boolean" == typeof n3 || (d(n3) ? n3.some(function(n4) {
19256
19045
  H(n4, l4);
19257
19046
  }) : l4.push(n3)), l4;
19258
19047
  }
19259
- function L(n3, l4, u4, t4) {
19260
- var i4, r4, o4 = n3.key, e4 = n3.type, f4 = l4[u4];
19261
- if (null === f4 && null == n3.key || f4 && o4 == f4.key && e4 == f4.type && 0 == (2 & f4.__u))
19262
- return u4;
19263
- if (t4 > (null != f4 && 0 == (2 & f4.__u) ? 1 : 0))
19264
- for (i4 = u4 - 1, r4 = u4 + 1; i4 >= 0 || r4 < l4.length; ) {
19048
+ function L(n3, l4, t4, u4) {
19049
+ var i4, r4, o4 = n3.key, e4 = n3.type, f4 = l4[t4];
19050
+ if (null === f4 && null == n3.key || f4 && o4 == f4.key && e4 === f4.type && 0 == (2 & f4.__u))
19051
+ return t4;
19052
+ if (u4 > (null != f4 && 0 == (2 & f4.__u) ? 1 : 0))
19053
+ for (i4 = t4 - 1, r4 = t4 + 1; i4 >= 0 || r4 < l4.length; ) {
19265
19054
  if (i4 >= 0) {
19266
- if ((f4 = l4[i4]) && 0 == (2 & f4.__u) && o4 == f4.key && e4 == f4.type)
19055
+ if ((f4 = l4[i4]) && 0 == (2 & f4.__u) && o4 == f4.key && e4 === f4.type)
19267
19056
  return i4;
19268
19057
  i4--;
19269
19058
  }
19270
19059
  if (r4 < l4.length) {
19271
- if ((f4 = l4[r4]) && 0 == (2 & f4.__u) && o4 == f4.key && e4 == f4.type)
19060
+ if ((f4 = l4[r4]) && 0 == (2 & f4.__u) && o4 == f4.key && e4 === f4.type)
19272
19061
  return r4;
19273
19062
  r4++;
19274
19063
  }
19275
19064
  }
19276
19065
  return -1;
19277
19066
  }
19278
- function T(n3, l4, u4) {
19279
- "-" == l4[0] ? n3.setProperty(l4, null == u4 ? "" : u4) : n3[l4] = null == u4 ? "" : "number" != typeof u4 || y.test(l4) ? u4 : u4 + "px";
19067
+ function T(n3, l4, t4) {
19068
+ "-" == l4[0] ? n3.setProperty(l4, null == t4 ? "" : t4) : n3[l4] = null == t4 ? "" : "number" != typeof t4 || y.test(l4) ? t4 : t4 + "px";
19280
19069
  }
19281
- function j(n3, l4, u4, t4, i4) {
19282
- var r4, o4;
19070
+ function j(n3, l4, t4, u4, i4) {
19071
+ var r4;
19283
19072
  n:
19284
19073
  if ("style" == l4)
19285
- if ("string" == typeof u4)
19286
- n3.style.cssText = u4;
19074
+ if ("string" == typeof t4)
19075
+ n3.style.cssText = t4;
19287
19076
  else {
19288
- if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4)
19289
- for (l4 in t4)
19290
- u4 && l4 in u4 || T(n3.style, l4, "");
19291
- if (u4)
19077
+ if ("string" == typeof u4 && (n3.style.cssText = u4 = ""), u4)
19292
19078
  for (l4 in u4)
19293
- t4 && u4[l4] == t4[l4] || T(n3.style, l4, u4[l4]);
19079
+ t4 && l4 in t4 || T(n3.style, l4, "");
19080
+ if (t4)
19081
+ for (l4 in t4)
19082
+ u4 && t4[l4] === u4[l4] || T(n3.style, l4, t4[l4]);
19294
19083
  }
19295
19084
  else if ("o" == l4[0] && "n" == l4[1])
19296
- r4 = l4 != (l4 = l4.replace(f, "$1")), o4 = l4.toLowerCase(), l4 = o4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? o4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + r4] = u4, u4 ? t4 ? u4.u = t4.u : (u4.u = c, n3.addEventListener(l4, r4 ? a : s, r4)) : n3.removeEventListener(l4, r4 ? a : s, r4);
19085
+ r4 = l4 != (l4 = l4.replace(f, "$1")), l4 = l4.toLowerCase() in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? l4.toLowerCase().slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + r4] = t4, t4 ? u4 ? t4.t = u4.t : (t4.t = c, n3.addEventListener(l4, r4 ? a : s, r4)) : n3.removeEventListener(l4, r4 ? a : s, r4);
19297
19086
  else {
19298
19087
  if ("http://www.w3.org/2000/svg" == i4)
19299
19088
  l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
19300
19089
  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)
19301
19090
  try {
19302
- n3[l4] = null == u4 ? "" : u4;
19091
+ n3[l4] = null == t4 ? "" : t4;
19303
19092
  break n;
19304
19093
  } catch (n4) {
19305
19094
  }
19306
- "function" == typeof u4 || (null == u4 || false === u4 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u4 ? "" : u4));
19095
+ "function" == typeof t4 || (null == t4 || false === t4 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == t4 ? "" : t4));
19307
19096
  }
19308
19097
  }
19309
19098
  function F(n3) {
19310
- return function(u4) {
19099
+ return function(t4) {
19311
19100
  if (this.l) {
19312
- var t4 = this.l[u4.type + n3];
19313
- if (null == u4.t)
19314
- u4.t = c++;
19315
- else if (u4.t < t4.u)
19101
+ var u4 = this.l[t4.type + n3];
19102
+ if (null == t4.u)
19103
+ t4.u = c++;
19104
+ else if (t4.u < u4.t)
19316
19105
  return;
19317
- return t4(l.event ? l.event(u4) : u4);
19106
+ return u4(l.event ? l.event(t4) : t4);
19318
19107
  }
19319
19108
  };
19320
19109
  }
19321
- function O(n3, u4, t4, i4, r4, o4, e4, f4, c4, s4) {
19322
- var a4, h4, p4, v4, y4, _4, m4, b3, S3, C4, M3, $3, P5, A5, H4, L3, T5, j5 = u4.type;
19323
- if (null != u4.constructor)
19110
+ function O(n3, t4, u4, i4, r4, o4, e4, f4, c4, s4) {
19111
+ var a4, h4, p4, v4, y4, _3, m4, b3, S3, C4, M3, $3, P3, A4, H3, L3, T4, j4 = t4.type;
19112
+ if (void 0 !== t4.constructor)
19324
19113
  return null;
19325
- 128 & t4.__u && (c4 = !!(32 & t4.__u), o4 = [f4 = u4.__e = t4.__e]), (a4 = l.__b) && a4(u4);
19114
+ 128 & u4.__u && (c4 = !!(32 & u4.__u), o4 = [f4 = t4.__e = u4.__e]), (a4 = l.__b) && a4(t4);
19326
19115
  n:
19327
- if ("function" == typeof j5)
19116
+ if ("function" == typeof j4)
19328
19117
  try {
19329
- if (b3 = u4.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 = u4.__c = t4.__c).__ = h4.__E : (S3 ? u4.__c = h4 = new j5(b3, M3) : (u4.__c = h4 = new x(b3, M3), h4.constructor = j5, h4.render = D), C4 && C4.sub(h4), h4.props = b3, h4.state || (h4.state = {}), h4.context = M3, 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 = d({}, h4.__s)), d(h4.__s, j5.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = u4, p4)
19330
- S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
19118
+ if (b3 = t4.props, S3 = "prototype" in j4 && j4.prototype.render, C4 = (a4 = j4.contextType) && i4[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i4, u4.__c ? m4 = (h4 = t4.__c = u4.__c).__ = h4.__E : (S3 ? t4.__c = h4 = new j4(b3, M3) : (t4.__c = h4 = new x(b3, M3), h4.constructor = j4, h4.render = D), C4 && C4.sub(h4), h4.props = b3, h4.state || (h4.state = {}), h4.context = M3, h4.__n = i4, p4 = h4.__d = true, h4.__h = [], h4._sb = []), S3 && null == h4.__s && (h4.__s = h4.state), S3 && null != j4.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = w({}, h4.__s)), w(h4.__s, j4.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = t4, p4)
19119
+ S3 && null == j4.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
19331
19120
  else {
19332
- if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3) || u4.__v == t4.__v) {
19333
- for (u4.__v != t4.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), u4.__e = t4.__e, u4.__k = t4.__k, u4.__k.some(function(n4) {
19334
- n4 && (n4.__ = u4);
19121
+ if (S3 && null == j4.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), !h4.__e && (null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3) || t4.__v == u4.__v)) {
19122
+ for (t4.__v != u4.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), t4.__e = u4.__e, t4.__k = u4.__k, t4.__k.some(function(n4) {
19123
+ n4 && (n4.__ = t4);
19335
19124
  }), $3 = 0; $3 < h4._sb.length; $3++)
19336
19125
  h4.__h.push(h4._sb[$3]);
19337
19126
  h4._sb = [], h4.__h.length && e4.push(h4);
19338
19127
  break n;
19339
19128
  }
19340
19129
  null != h4.componentWillUpdate && h4.componentWillUpdate(b3, h4.__s, M3), S3 && null != h4.componentDidUpdate && h4.__h.push(function() {
19341
- h4.componentDidUpdate(v4, y4, _4);
19130
+ h4.componentDidUpdate(v4, y4, _3);
19342
19131
  });
19343
19132
  }
19344
- if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P5 = l.__r, A5 = 0, S3) {
19345
- for (h4.state = h4.__s, h4.__d = false, P5 && P5(u4), a4 = h4.render(h4.props, h4.state, h4.context), H4 = 0; H4 < h4._sb.length; H4++)
19346
- h4.__h.push(h4._sb[H4]);
19133
+ if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P3 = l.__r, A4 = 0, S3) {
19134
+ for (h4.state = h4.__s, h4.__d = false, P3 && P3(t4), a4 = h4.render(h4.props, h4.state, h4.context), H3 = 0; H3 < h4._sb.length; H3++)
19135
+ h4.__h.push(h4._sb[H3]);
19347
19136
  h4._sb = [];
19348
19137
  } else
19349
19138
  do {
19350
- h4.__d = false, P5 && P5(u4), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
19351
- } while (h4.__d && ++A5 < 25);
19352
- h4.state = h4.__s, null != h4.getChildContext && (i4 = d(d({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = N(a4.props.children)), f4 = I(n3, w(L3) ? L3 : [L3], u4, t4, i4, r4, o4, e4, f4, c4, s4), h4.base = u4.__e, u4.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
19139
+ h4.__d = false, P3 && P3(t4), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
19140
+ } while (h4.__d && ++A4 < 25);
19141
+ h4.state = h4.__s, null != h4.getChildContext && (i4 = w(w({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_3 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = N(a4.props.children)), f4 = I(n3, d(L3) ? L3 : [L3], t4, u4, i4, r4, o4, e4, f4, c4, s4), h4.base = t4.__e, t4.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
19353
19142
  } catch (n4) {
19354
- if (u4.__v = null, c4 || null != o4)
19143
+ if (t4.__v = null, c4 || null != o4)
19355
19144
  if (n4.then) {
19356
- for (u4.__u |= c4 ? 160 : 128; f4 && 8 == f4.nodeType && f4.nextSibling; )
19145
+ for (t4.__u |= c4 ? 160 : 128; f4 && 8 == f4.nodeType && f4.nextSibling; )
19357
19146
  f4 = f4.nextSibling;
19358
- o4[o4.indexOf(f4)] = null, u4.__e = f4;
19147
+ o4[o4.indexOf(f4)] = null, t4.__e = f4;
19359
19148
  } else
19360
- for (T5 = o4.length; T5--; )
19361
- g(o4[T5]);
19149
+ for (T4 = o4.length; T4--; )
19150
+ g(o4[T4]);
19362
19151
  else
19363
- u4.__e = t4.__e, u4.__k = t4.__k;
19364
- l.__e(n4, u4, t4);
19152
+ t4.__e = u4.__e, t4.__k = u4.__k;
19153
+ l.__e(n4, t4, u4);
19365
19154
  }
19366
19155
  else
19367
- null == o4 && u4.__v == t4.__v ? (u4.__k = t4.__k, u4.__e = t4.__e) : f4 = u4.__e = V(t4.__e, u4, t4, i4, r4, o4, e4, c4, s4);
19368
- return (a4 = l.diffed) && a4(u4), 128 & u4.__u ? void 0 : f4;
19156
+ null == o4 && t4.__v == u4.__v ? (t4.__k = u4.__k, t4.__e = u4.__e) : f4 = t4.__e = V(u4.__e, t4, u4, i4, r4, o4, e4, c4, s4);
19157
+ return (a4 = l.diffed) && a4(t4), 128 & t4.__u ? void 0 : f4;
19369
19158
  }
19370
- function z(n3, u4, t4) {
19371
- for (var i4 = 0; i4 < t4.length; i4++)
19372
- q(t4[i4], t4[++i4], t4[++i4]);
19373
- l.__c && l.__c(u4, n3), n3.some(function(u5) {
19159
+ function z(n3, t4, u4) {
19160
+ for (var i4 = 0; i4 < u4.length; i4++)
19161
+ q(u4[i4], u4[++i4], u4[++i4]);
19162
+ l.__c && l.__c(t4, n3), n3.some(function(t5) {
19374
19163
  try {
19375
- n3 = u5.__h, u5.__h = [], n3.some(function(n4) {
19376
- n4.call(u5);
19164
+ n3 = t5.__h, t5.__h = [], n3.some(function(n4) {
19165
+ n4.call(t5);
19377
19166
  });
19378
19167
  } catch (n4) {
19379
- l.__e(n4, u5.__v);
19168
+ l.__e(n4, t5.__v);
19380
19169
  }
19381
19170
  });
19382
19171
  }
19383
19172
  function N(n3) {
19384
- return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : w(n3) ? n3.map(N) : d({}, n3);
19173
+ return "object" != typeof n3 || null == n3 ? n3 : d(n3) ? n3.map(N) : w({}, n3);
19385
19174
  }
19386
- function V(u4, t4, i4, r4, o4, e4, f4, c4, s4) {
19387
- var a4, h4, v4, y4, d4, _4, m4, b3 = i4.props, k4 = t4.props, x4 = t4.type;
19388
- if ("svg" == x4 ? o4 = "http://www.w3.org/2000/svg" : "math" == x4 ? o4 = "http://www.w3.org/1998/Math/MathML" : o4 || (o4 = "http://www.w3.org/1999/xhtml"), null != e4) {
19175
+ function V(t4, u4, i4, r4, o4, e4, f4, c4, s4) {
19176
+ var a4, h4, v4, y4, w4, _3, m4, b3 = i4.props, k4 = u4.props, x3 = u4.type;
19177
+ if ("svg" == x3 ? o4 = "http://www.w3.org/2000/svg" : "math" == x3 ? o4 = "http://www.w3.org/1998/Math/MathML" : o4 || (o4 = "http://www.w3.org/1999/xhtml"), null != e4) {
19389
19178
  for (a4 = 0; a4 < e4.length; a4++)
19390
- if ((d4 = e4[a4]) && "setAttribute" in d4 == !!x4 && (x4 ? d4.localName == x4 : 3 == d4.nodeType)) {
19391
- u4 = d4, e4[a4] = null;
19179
+ if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x3 && (x3 ? w4.localName == x3 : 3 == w4.nodeType)) {
19180
+ t4 = w4, e4[a4] = null;
19392
19181
  break;
19393
19182
  }
19394
19183
  }
19395
- if (null == u4) {
19396
- if (null == x4)
19184
+ if (null == t4) {
19185
+ if (null == x3)
19397
19186
  return document.createTextNode(k4);
19398
- u4 = document.createElementNS(o4, x4, k4.is && k4), c4 && (l.__m && l.__m(t4, e4), c4 = false), e4 = null;
19187
+ t4 = document.createElementNS(o4, x3, k4.is && k4), c4 && (l.__m && l.__m(u4, e4), c4 = false), e4 = null;
19399
19188
  }
19400
- if (null == x4)
19401
- b3 === k4 || c4 && u4.data == k4 || (u4.data = k4);
19189
+ if (null === x3)
19190
+ b3 === k4 || c4 && t4.data === k4 || (t4.data = k4);
19402
19191
  else {
19403
- if (e4 = e4 && n.call(u4.childNodes), b3 = i4.props || p, !c4 && null != e4)
19404
- for (b3 = {}, a4 = 0; a4 < u4.attributes.length; a4++)
19405
- b3[(d4 = u4.attributes[a4]).name] = d4.value;
19192
+ if (e4 = e4 && n.call(t4.childNodes), b3 = i4.props || p, !c4 && null != e4)
19193
+ for (b3 = {}, a4 = 0; a4 < t4.attributes.length; a4++)
19194
+ b3[(w4 = t4.attributes[a4]).name] = w4.value;
19406
19195
  for (a4 in b3)
19407
- if (d4 = b3[a4], "children" == a4)
19196
+ if (w4 = b3[a4], "children" == a4)
19408
19197
  ;
19409
19198
  else if ("dangerouslySetInnerHTML" == a4)
19410
- v4 = d4;
19199
+ v4 = w4;
19411
19200
  else if (!(a4 in k4)) {
19412
19201
  if ("value" == a4 && "defaultValue" in k4 || "checked" == a4 && "defaultChecked" in k4)
19413
19202
  continue;
19414
- j(u4, a4, null, d4, o4);
19203
+ j(t4, a4, null, w4, o4);
19415
19204
  }
19416
19205
  for (a4 in k4)
19417
- d4 = k4[a4], "children" == a4 ? y4 = d4 : "dangerouslySetInnerHTML" == a4 ? h4 = d4 : "value" == a4 ? _4 = d4 : "checked" == a4 ? m4 = d4 : c4 && "function" != typeof d4 || b3[a4] === d4 || j(u4, a4, d4, b3[a4], o4);
19206
+ w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _3 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(t4, a4, w4, b3[a4], o4);
19418
19207
  if (h4)
19419
- c4 || v4 && (h4.__html == v4.__html || h4.__html == u4.innerHTML) || (u4.innerHTML = h4.__html), t4.__k = [];
19420
- else if (v4 && (u4.innerHTML = ""), I("template" == t4.type ? u4.content : u4, w(y4) ? y4 : [y4], t4, i4, r4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : o4, e4, f4, e4 ? e4[0] : i4.__k && S(i4, 0), c4, s4), null != e4)
19208
+ c4 || v4 && (h4.__html === v4.__html || h4.__html === t4.innerHTML) || (t4.innerHTML = h4.__html), u4.__k = [];
19209
+ else if (v4 && (t4.innerHTML = ""), I("template" === u4.type ? t4.content : t4, d(y4) ? y4 : [y4], u4, i4, r4, "foreignObject" == x3 ? "http://www.w3.org/1999/xhtml" : o4, e4, f4, e4 ? e4[0] : i4.__k && S(i4, 0), c4, s4), null != e4)
19421
19210
  for (a4 = e4.length; a4--; )
19422
19211
  g(e4[a4]);
19423
- c4 || (a4 = "value", "progress" == x4 && null == _4 ? u4.removeAttribute("value") : null != _4 && (_4 !== u4[a4] || "progress" == x4 && !_4 || "option" == x4 && _4 != b3[a4]) && j(u4, a4, _4, b3[a4], o4), a4 = "checked", null != m4 && m4 != u4[a4] && j(u4, a4, m4, b3[a4], o4));
19212
+ c4 || (a4 = "value", "progress" == x3 && null == _3 ? t4.removeAttribute("value") : void 0 !== _3 && (_3 !== t4[a4] || "progress" == x3 && !_3 || "option" == x3 && _3 !== b3[a4]) && j(t4, a4, _3, b3[a4], o4), a4 = "checked", void 0 !== m4 && m4 !== t4[a4] && j(t4, a4, m4, b3[a4], o4));
19424
19213
  }
19425
- return u4;
19214
+ return t4;
19426
19215
  }
19427
- function q(n3, u4, t4) {
19216
+ function q(n3, t4, u4) {
19428
19217
  try {
19429
19218
  if ("function" == typeof n3) {
19430
19219
  var i4 = "function" == typeof n3.__u;
19431
- i4 && n3.__u(), i4 && null == u4 || (n3.__u = n3(u4));
19220
+ i4 && n3.__u(), i4 && null == t4 || (n3.__u = n3(t4));
19432
19221
  } else
19433
- n3.current = u4;
19222
+ n3.current = t4;
19434
19223
  } catch (n4) {
19435
- l.__e(n4, t4);
19224
+ l.__e(n4, u4);
19436
19225
  }
19437
19226
  }
19438
- function B(n3, u4, t4) {
19227
+ function B(n3, t4, u4) {
19439
19228
  var i4, r4;
19440
- if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current != n3.__e || q(i4, null, u4)), null != (i4 = n3.__c)) {
19229
+ if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current !== n3.__e || q(i4, null, t4)), null != (i4 = n3.__c)) {
19441
19230
  if (i4.componentWillUnmount)
19442
19231
  try {
19443
19232
  i4.componentWillUnmount();
19444
19233
  } catch (n4) {
19445
- l.__e(n4, u4);
19234
+ l.__e(n4, t4);
19446
19235
  }
19447
19236
  i4.base = i4.__P = null;
19448
19237
  }
19449
19238
  if (i4 = n3.__k)
19450
19239
  for (r4 = 0; r4 < i4.length; r4++)
19451
- i4[r4] && B(i4[r4], u4, t4 || "function" != typeof n3.type);
19452
- t4 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
19240
+ i4[r4] && B(i4[r4], t4, u4 || "function" != typeof n3.type);
19241
+ u4 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
19453
19242
  }
19454
- function D(n3, l4, u4) {
19455
- return this.constructor(n3, u4);
19243
+ function D(n3, l4, t4) {
19244
+ return this.constructor(n3, t4);
19456
19245
  }
19457
- function E(u4, t4, i4) {
19246
+ function E(t4, u4, i4) {
19458
19247
  var r4, o4, e4, f4;
19459
- t4 == document && (t4 = document.documentElement), l.__ && l.__(u4, t4), o4 = (r4 = "function" == typeof i4) ? null : i4 && i4.__k || t4.__k, e4 = [], f4 = [], O(t4, u4 = (!r4 && i4 || t4).__k = _(k, null, [u4]), o4 || p, p, t4.namespaceURI, !r4 && i4 ? [i4] : o4 ? null : t4.firstChild ? n.call(t4.childNodes) : null, e4, !r4 && i4 ? i4 : o4 ? o4.__e : t4.firstChild, r4, f4), z(e4, u4, f4);
19248
+ u4 == document && (u4 = document.documentElement), l.__ && l.__(t4, u4), o4 = (r4 = "function" == typeof i4) ? null : i4 && i4.__k || u4.__k, e4 = [], f4 = [], O(u4, t4 = (!r4 && i4 || u4).__k = _(k, null, [t4]), o4 || p, p, u4.namespaceURI, !r4 && i4 ? [i4] : o4 ? null : u4.firstChild ? n.call(u4.childNodes) : null, e4, !r4 && i4 ? i4 : o4 ? o4.__e : u4.firstChild, r4, f4), z(e4, t4, f4);
19460
19249
  }
19461
- function J(l4, u4, t4) {
19462
- var i4, r4, o4, e4, f4 = d({}, l4.props);
19463
- for (o4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u4)
19464
- "key" == o4 ? i4 = u4[o4] : "ref" == o4 ? r4 = u4[o4] : f4[o4] = void 0 === u4[o4] && null != e4 ? e4[o4] : u4[o4];
19465
- return arguments.length > 2 && (f4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), m(l4.type, f4, i4 || l4.key, r4 || l4.ref, null);
19250
+ function J(l4, t4, u4) {
19251
+ var i4, r4, o4, e4, f4 = w({}, l4.props);
19252
+ for (o4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), t4)
19253
+ "key" == o4 ? i4 = t4[o4] : "ref" == o4 ? r4 = t4[o4] : f4[o4] = void 0 === t4[o4] && void 0 !== e4 ? e4[o4] : t4[o4];
19254
+ return arguments.length > 2 && (f4.children = arguments.length > 3 ? n.call(arguments, 2) : u4), m(l4.type, f4, i4 || l4.key, r4 || l4.ref, null);
19466
19255
  }
19467
- n = v.slice, l = { __e: function(n3, l4, u4, t4) {
19256
+ n = v.slice, l = { __e: function(n3, l4, t4, u4) {
19468
19257
  for (var i4, r4, o4; l4 = l4.__; )
19469
19258
  if ((i4 = l4.__c) && !i4.__)
19470
19259
  try {
19471
- if ((r4 = i4.constructor) && null != r4.getDerivedStateFromError && (i4.setState(r4.getDerivedStateFromError(n3)), o4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, t4 || {}), o4 = i4.__d), o4)
19260
+ if ((r4 = i4.constructor) && null != r4.getDerivedStateFromError && (i4.setState(r4.getDerivedStateFromError(n3)), o4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, u4 || {}), o4 = i4.__d), o4)
19472
19261
  return i4.__E = i4;
19473
19262
  } catch (l5) {
19474
19263
  n3 = l5;
19475
19264
  }
19476
19265
  throw n3;
19477
- } }, u = 0, t = function(n3) {
19266
+ } }, t = 0, u = function(n3) {
19478
19267
  return null != n3 && null == n3.constructor;
19479
19268
  }, x.prototype.setState = function(n3, l4) {
19480
- var u4;
19481
- u4 = null != this.__s && this.__s != this.state ? this.__s : this.__s = d({}, this.state), "function" == typeof n3 && (n3 = n3(d({}, u4), this.props)), n3 && d(u4, n3), null != n3 && this.__v && (l4 && this._sb.push(l4), M(this));
19269
+ var t4;
19270
+ t4 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = w({}, this.state), "function" == typeof n3 && (n3 = n3(w({}, t4), this.props)), n3 && w(t4, n3), null != n3 && this.__v && (l4 && this._sb.push(l4), M(this));
19482
19271
  }, x.prototype.forceUpdate = function(n3) {
19483
19272
  this.__v && (this.__e = true, n3 && this.__h.push(n3), M(this));
19484
19273
  }, x.prototype.render = k, i = [], o = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e = function(n3, l4) {
19485
19274
  return n3.__v.__b - l4.__v.__b;
19486
19275
  }, $.__r = 0, f = /(PointerCapture)$|Capture$/i, c = 0, s = F(false), a = F(true), h = 0;
19487
19276
 
19488
- // node_modules/preact/hooks/dist/hooks.module.js
19489
- var t2;
19490
- var r2;
19491
- var u2;
19492
- var i2;
19493
- var o2 = 0;
19494
- var f2 = [];
19495
- var c2 = l;
19496
- var e2 = c2.__b;
19497
- var a2 = c2.__r;
19498
- var v2 = c2.diffed;
19499
- var l2 = c2.__c;
19500
- var m2 = c2.unmount;
19501
- var s2 = c2.__;
19502
- function p2(n3, t4) {
19503
- c2.__h && c2.__h(r2, n3, o2 || t4), o2 = 0;
19504
- var u4 = r2.__H || (r2.__H = { __: [], __h: [] });
19505
- return n3 >= u4.__.length && u4.__.push({}), u4.__[n3];
19506
- }
19507
- function d2(n3) {
19508
- return o2 = 1, h2(D2, n3);
19509
- }
19510
- function h2(n3, u4, i4) {
19511
- var o4 = p2(t2++, 2);
19512
- if (o4.t = n3, !o4.__c && (o4.__ = [i4 ? i4(u4) : D2(void 0, u4), function(n4) {
19513
- var t4 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t4, n4);
19514
- t4 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
19515
- }], o4.__c = r2, !r2.__f)) {
19516
- var f4 = function(n4, t4, r4) {
19517
- if (!o4.__c.__H)
19518
- return true;
19519
- var u5 = o4.__c.__H.__.filter(function(n5) {
19520
- return !!n5.__c;
19521
- });
19522
- if (u5.every(function(n5) {
19523
- return !n5.__N;
19524
- }))
19525
- return !c4 || c4.call(this, n4, t4, r4);
19526
- var i5 = o4.__c.props !== n4;
19527
- return u5.forEach(function(n5) {
19528
- if (n5.__N) {
19529
- var t5 = n5.__[0];
19530
- n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (i5 = true);
19531
- }
19532
- }), c4 && c4.call(this, n4, t4, r4) || i5;
19533
- };
19534
- r2.__f = true;
19535
- var c4 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
19536
- r2.componentWillUpdate = function(n4, t4, r4) {
19537
- if (this.__e) {
19538
- var u5 = c4;
19539
- c4 = void 0, f4(n4, t4, r4), c4 = u5;
19540
- }
19541
- e4 && e4.call(this, n4, t4, r4);
19542
- }, r2.shouldComponentUpdate = f4;
19543
- }
19544
- return o4.__N || o4.__;
19545
- }
19546
- function y2(n3, u4) {
19547
- var i4 = p2(t2++, 3);
19548
- !c2.__s && C2(i4.__H, u4) && (i4.__ = n3, i4.u = u4, r2.__H.__h.push(i4));
19549
- }
19550
- function A2(n3) {
19551
- return o2 = 5, T2(function() {
19552
- return { current: n3 };
19553
- }, []);
19554
- }
19555
- function T2(n3, r4) {
19556
- var u4 = p2(t2++, 7);
19557
- return C2(u4.__H, r4) && (u4.__ = n3(), u4.__H = r4, u4.__h = n3), u4.__;
19558
- }
19559
- function q2(n3, t4) {
19560
- return o2 = 8, T2(function() {
19561
- return n3;
19562
- }, t4);
19563
- }
19564
- function j2() {
19565
- for (var n3; n3 = f2.shift(); )
19566
- if (n3.__P && n3.__H)
19567
- try {
19568
- n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
19569
- } catch (t4) {
19570
- n3.__H.__h = [], c2.__e(t4, n3.__v);
19571
- }
19572
- }
19573
- c2.__b = function(n3) {
19574
- r2 = null, e2 && e2(n3);
19575
- }, c2.__ = function(n3, t4) {
19576
- n3 && t4.__k && t4.__k.__m && (n3.__m = t4.__k.__m), s2 && s2(n3, t4);
19577
- }, c2.__r = function(n3) {
19578
- a2 && a2(n3), t2 = 0;
19579
- var i4 = (r2 = n3.__c).__H;
19580
- i4 && (u2 === r2 ? (i4.__h = [], r2.__h = [], i4.__.forEach(function(n4) {
19581
- n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
19582
- })) : (i4.__h.forEach(z2), i4.__h.forEach(B2), i4.__h = [], t2 = 0)), u2 = r2;
19583
- }, c2.diffed = function(n3) {
19584
- v2 && v2(n3);
19585
- var t4 = n3.__c;
19586
- t4 && t4.__H && (t4.__H.__h.length && (1 !== f2.push(t4) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t4.__H.__.forEach(function(n4) {
19587
- n4.u && (n4.__H = n4.u), n4.u = void 0;
19588
- })), u2 = r2 = null;
19589
- }, c2.__c = function(n3, t4) {
19590
- t4.some(function(n4) {
19591
- try {
19592
- n4.__h.forEach(z2), n4.__h = n4.__h.filter(function(n5) {
19593
- return !n5.__ || B2(n5);
19594
- });
19595
- } catch (r4) {
19596
- t4.some(function(n5) {
19597
- n5.__h && (n5.__h = []);
19598
- }), t4 = [], c2.__e(r4, n4.__v);
19599
- }
19600
- }), l2 && l2(n3, t4);
19601
- }, c2.unmount = function(n3) {
19602
- m2 && m2(n3);
19603
- var t4, r4 = n3.__c;
19604
- r4 && r4.__H && (r4.__H.__.forEach(function(n4) {
19605
- try {
19606
- z2(n4);
19607
- } catch (n5) {
19608
- t4 = n5;
19609
- }
19610
- }), r4.__H = void 0, t4 && c2.__e(t4, r4.__v));
19611
- };
19612
- var k2 = "function" == typeof requestAnimationFrame;
19613
- function w2(n3) {
19614
- var t4, r4 = function() {
19615
- clearTimeout(u4), k2 && cancelAnimationFrame(t4), setTimeout(n3);
19616
- }, u4 = setTimeout(r4, 35);
19617
- k2 && (t4 = requestAnimationFrame(r4));
19618
- }
19619
- function z2(n3) {
19620
- var t4 = r2, u4 = n3.__c;
19621
- "function" == typeof u4 && (n3.__c = void 0, u4()), r2 = t4;
19622
- }
19623
- function B2(n3) {
19624
- var t4 = r2;
19625
- n3.__c = n3.__(), r2 = t4;
19626
- }
19627
- function C2(n3, t4) {
19628
- return !n3 || n3.length !== t4.length || t4.some(function(t5, r4) {
19629
- return t5 !== n3[r4];
19630
- });
19631
- }
19632
- function D2(n3, t4) {
19633
- return "function" == typeof t4 ? t4(n3) : t4;
19634
- }
19635
-
19636
- // node_modules/preact/compat/dist/compat.module.js
19637
- function g3(n3, t4) {
19638
- for (var e4 in t4)
19639
- n3[e4] = t4[e4];
19640
- return n3;
19641
- }
19642
- function E2(n3, t4) {
19643
- for (var e4 in n3)
19644
- if ("__source" !== e4 && !(e4 in t4))
19645
- return true;
19646
- for (var r4 in t4)
19647
- if ("__source" !== r4 && n3[r4] !== t4[r4])
19648
- return true;
19649
- return false;
19650
- }
19651
- function N2(n3, t4) {
19652
- this.props = n3, this.context = t4;
19653
- }
19654
- (N2.prototype = new x()).isPureReactComponent = true, N2.prototype.shouldComponentUpdate = function(n3, t4) {
19655
- return E2(this.props, n3) || E2(this.state, t4);
19656
- };
19657
- var T3 = l.__b;
19658
- l.__b = function(n3) {
19659
- n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
19660
- };
19661
- var A3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
19662
- var F3 = l.__e;
19663
- l.__e = function(n3, t4, e4, r4) {
19664
- if (n3.then) {
19665
- for (var u4, o4 = t4; o4 = o4.__; )
19666
- if ((u4 = o4.__c) && u4.__c)
19667
- return null == t4.__e && (t4.__e = e4.__e, t4.__k = e4.__k), u4.__c(n3, t4);
19668
- }
19669
- F3(n3, t4, e4, r4);
19670
- };
19671
- var U = l.unmount;
19672
- function V2(n3, t4, e4) {
19673
- return n3 && (n3.__c && n3.__c.__H && (n3.__c.__H.__.forEach(function(n4) {
19674
- "function" == typeof n4.__c && n4.__c();
19675
- }), n3.__c.__H = null), null != (n3 = g3({}, n3)).__c && (n3.__c.__P === e4 && (n3.__c.__P = t4), n3.__c.__e = true, n3.__c = null), n3.__k = n3.__k && n3.__k.map(function(n4) {
19676
- return V2(n4, t4, e4);
19677
- })), n3;
19678
- }
19679
- function W(n3, t4, e4) {
19680
- return n3 && e4 && (n3.__v = null, n3.__k = n3.__k && n3.__k.map(function(n4) {
19681
- return W(n4, t4, e4);
19682
- }), n3.__c && n3.__c.__P === t4 && (n3.__e && e4.appendChild(n3.__e), n3.__c.__e = true, n3.__c.__P = e4)), n3;
19683
- }
19684
- function P3() {
19685
- this.__u = 0, this.o = null, this.__b = null;
19686
- }
19687
- function j3(n3) {
19688
- var t4 = n3.__.__c;
19689
- return t4 && t4.__a && t4.__a(n3);
19690
- }
19691
- function B3() {
19692
- this.i = null, this.l = null;
19693
- }
19694
- l.unmount = function(n3) {
19695
- var t4 = n3.__c;
19696
- t4 && t4.__R && t4.__R(), t4 && 32 & n3.__u && (n3.type = null), U && U(n3);
19697
- }, (P3.prototype = new x()).__c = function(n3, t4) {
19698
- var e4 = t4.__c, r4 = this;
19699
- null == r4.o && (r4.o = []), r4.o.push(e4);
19700
- var u4 = j3(r4.__v), o4 = false, i4 = function() {
19701
- o4 || (o4 = true, e4.__R = null, u4 ? u4(l4) : l4());
19702
- };
19703
- e4.__R = i4;
19704
- var l4 = function() {
19705
- if (!--r4.__u) {
19706
- if (r4.state.__a) {
19707
- var n4 = r4.state.__a;
19708
- r4.__v.__k[0] = W(n4, n4.__c.__P, n4.__c.__O);
19709
- }
19710
- var t5;
19711
- for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); )
19712
- t5.forceUpdate();
19713
- }
19714
- };
19715
- r4.__u++ || 32 & t4.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(i4, i4);
19716
- }, P3.prototype.componentWillUnmount = function() {
19717
- this.o = [];
19718
- }, P3.prototype.render = function(n3, e4) {
19719
- if (this.__b) {
19720
- if (this.__v.__k) {
19721
- var r4 = document.createElement("div"), o4 = this.__v.__k[0].__c;
19722
- this.__v.__k[0] = V2(this.__b, r4, o4.__O = o4.__P);
19723
- }
19724
- this.__b = null;
19725
- }
19726
- var i4 = e4.__a && _(k, null, n3.fallback);
19727
- return i4 && (i4.__u &= -33), [_(k, null, e4.__a ? null : n3.children), i4];
19728
- };
19729
- var H2 = function(n3, t4, e4) {
19730
- if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size))
19731
- for (e4 = n3.i; e4; ) {
19732
- for (; e4.length > 3; )
19733
- e4.pop()();
19734
- if (e4[1] < e4[0])
19735
- break;
19736
- n3.i = e4 = e4[2];
19737
- }
19738
- };
19739
- (B3.prototype = new x()).__a = function(n3) {
19740
- var t4 = this, e4 = j3(t4.__v), r4 = t4.l.get(n3);
19741
- return r4[0]++, function(u4) {
19742
- var o4 = function() {
19743
- t4.props.revealOrder ? (r4.push(u4), H2(t4, n3, r4)) : u4();
19744
- };
19745
- e4 ? e4(o4) : o4();
19746
- };
19747
- }, B3.prototype.render = function(n3) {
19748
- this.i = null, this.l = /* @__PURE__ */ new Map();
19749
- var t4 = H(n3.children);
19750
- n3.revealOrder && "b" === n3.revealOrder[0] && t4.reverse();
19751
- for (var e4 = t4.length; e4--; )
19752
- this.l.set(t4[e4], this.i = [1, 0, this.i]);
19753
- return n3.children;
19754
- }, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
19755
- var n3 = this;
19756
- this.l.forEach(function(t4, e4) {
19757
- H2(n3, e4, t4);
19758
- });
19759
- };
19760
- var q3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
19761
- 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]/;
19762
- var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
19763
- var K2 = /[A-Z0-9]/g;
19764
- var Q = "undefined" != typeof document;
19765
- var X = function(n3) {
19766
- return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
19767
- };
19768
- function nn(n3, t4, e4) {
19769
- return null == t4.__k && (t4.textContent = ""), E(n3, t4), "function" == typeof e4 && e4(), n3 ? n3.__c : null;
19770
- }
19771
- x.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t4) {
19772
- Object.defineProperty(x.prototype, t4, { configurable: true, get: function() {
19773
- return this["UNSAFE_" + t4];
19774
- }, set: function(n3) {
19775
- Object.defineProperty(this, t4, { configurable: true, writable: true, value: n3 });
19776
- } });
19777
- });
19778
- var en = l.event;
19779
- function rn() {
19780
- }
19781
- function un() {
19782
- return this.cancelBubble;
19783
- }
19784
- function on() {
19785
- return this.defaultPrevented;
19786
- }
19787
- l.event = function(n3) {
19788
- return en && (n3 = en(n3)), n3.persist = rn, n3.isPropagationStopped = un, n3.isDefaultPrevented = on, n3.nativeEvent = n3;
19789
- };
19790
- var ln;
19791
- var cn = { enumerable: false, configurable: true, get: function() {
19792
- return this.class;
19793
- } };
19794
- var fn2 = l.vnode;
19795
- l.vnode = function(n3) {
19796
- "string" == typeof n3.type && function(n4) {
19797
- var t4 = n4.props, e4 = n4.type, u4 = {}, o4 = -1 === e4.indexOf("-");
19798
- for (var i4 in t4) {
19799
- var l4 = t4[i4];
19800
- if (!("value" === i4 && "defaultValue" in t4 && null == l4 || Q && "children" === i4 && "noscript" === e4 || "class" === i4 || "className" === i4)) {
19801
- var c4 = i4.toLowerCase();
19802
- "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 && u4[i4 = c4] && (i4 = "oninputCapture"), u4[i4] = l4;
19803
- }
19804
- }
19805
- "select" == e4 && u4.multiple && Array.isArray(u4.value) && (u4.value = H(t4.children).forEach(function(n5) {
19806
- n5.props.selected = -1 != u4.value.indexOf(n5.props.value);
19807
- })), "select" == e4 && null != u4.defaultValue && (u4.value = H(t4.children).forEach(function(n5) {
19808
- n5.props.selected = u4.multiple ? -1 != u4.defaultValue.indexOf(n5.props.value) : u4.defaultValue == n5.props.value;
19809
- })), t4.class && !t4.className ? (u4.class = t4.class, Object.defineProperty(u4, "className", cn)) : (t4.className && !t4.class || t4.class && t4.className) && (u4.class = u4.className = t4.className), n4.props = u4;
19810
- }(n3), n3.$$typeof = q3, fn2 && fn2(n3);
19811
- };
19812
- var an = l.__r;
19813
- l.__r = function(n3) {
19814
- an && an(n3), ln = n3.__c;
19815
- };
19816
- var sn = l.diffed;
19817
- l.diffed = function(n3) {
19818
- sn && sn(n3);
19819
- var t4 = n3.props, e4 = n3.__e;
19820
- null != e4 && "textarea" === n3.type && "value" in t4 && t4.value !== e4.value && (e4.value = null == t4.value ? "" : t4.value), ln = null;
19821
- };
19822
-
19823
19277
  // node_modules/@uppy/utils/lib/isDOMElement.js
19824
19278
  function isDOMElement(obj) {
19825
19279
  if (typeof obj !== "object" || obj === null)
@@ -19926,7 +19380,7 @@ Uppy plugins must have unique \`id\` options.`;
19926
19380
  function _classPrivateFieldLooseKey4(e4) {
19927
19381
  return "__private_" + id4++ + "_" + e4;
19928
19382
  }
19929
- function debounce3(fn3) {
19383
+ function debounce3(fn2) {
19930
19384
  let calling = null;
19931
19385
  let latestArgs;
19932
19386
  return function() {
@@ -19937,7 +19391,7 @@ Uppy plugins must have unique \`id\` options.`;
19937
19391
  if (!calling) {
19938
19392
  calling = Promise.resolve().then(() => {
19939
19393
  calling = null;
19940
- return fn3(...latestArgs);
19394
+ return fn2(...latestArgs);
19941
19395
  });
19942
19396
  }
19943
19397
  return calling;
@@ -19989,14 +19443,14 @@ Uppy plugins must have unique \`id\` options.`;
19989
19443
  _classPrivateFieldLooseBase4(this, _updateUI)[_updateUI] = debounce3((state) => {
19990
19444
  if (!this.uppy.getPlugin(this.id))
19991
19445
  return;
19992
- nn(this.render(state, uppyRootElement), uppyRootElement);
19446
+ E(this.render(state, uppyRootElement), uppyRootElement);
19993
19447
  this.afterUpdate();
19994
19448
  });
19995
19449
  this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);
19996
19450
  if (this.opts.replaceTargetContent) {
19997
19451
  targetElement.innerHTML = "";
19998
19452
  }
19999
- nn(this.render(this.uppy.getState(), uppyRootElement), uppyRootElement);
19453
+ E(this.render(this.uppy.getState(), uppyRootElement), uppyRootElement);
20000
19454
  this.el = uppyRootElement;
20001
19455
  targetElement.appendChild(uppyRootElement);
20002
19456
  uppyRootElement.dir = this.opts.direction || getTextDirection_default(uppyRootElement) || "ltr";
@@ -20738,7 +20192,7 @@ Uppy plugins must have unique \`id\` options.`;
20738
20192
  return "__private_" + id5++ + "_" + e4;
20739
20193
  }
20740
20194
  var packageJson3 = {
20741
- "version": "4.1.3"
20195
+ "version": "4.1.2"
20742
20196
  };
20743
20197
  var speedFilterHalfLife = 2e3;
20744
20198
  var ETAFilterHalfLife = 2e3;
@@ -21319,33 +20773,33 @@ Uppy plugins must have unique \`id\` options.`;
21319
20773
  }
21320
20774
 
21321
20775
  // node_modules/exifr/dist/mini.esm.mjs
21322
- function e3(e4, t4, s4) {
20776
+ function e2(e4, t4, s4) {
21323
20777
  return t4 in e4 ? Object.defineProperty(e4, t4, { value: s4, enumerable: true, configurable: true, writable: true }) : e4[t4] = s4, e4;
21324
20778
  }
21325
- var t3 = "undefined" != typeof self ? self : global;
21326
- var s3 = "undefined" != typeof navigator;
21327
- var i3 = s3 && "undefined" == typeof HTMLImageElement;
20779
+ var t2 = "undefined" != typeof self ? self : global;
20780
+ var s2 = "undefined" != typeof navigator;
20781
+ var i2 = s2 && "undefined" == typeof HTMLImageElement;
21328
20782
  var n2 = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node);
21329
- var r3 = t3.Buffer;
21330
- var a3 = !!r3;
21331
- var h3 = (e4) => void 0 !== e4;
21332
- function f3(e4) {
21333
- return void 0 === e4 || (e4 instanceof Map ? 0 === e4.size : 0 === Object.values(e4).filter(h3).length);
20783
+ var r2 = t2.Buffer;
20784
+ var a2 = !!r2;
20785
+ var h2 = (e4) => void 0 !== e4;
20786
+ function f2(e4) {
20787
+ return void 0 === e4 || (e4 instanceof Map ? 0 === e4.size : 0 === Object.values(e4).filter(h2).length);
21334
20788
  }
21335
- function l3(e4) {
20789
+ function l2(e4) {
21336
20790
  let t4 = new Error(e4);
21337
20791
  throw delete t4.stack, t4;
21338
20792
  }
21339
- function o3(e4) {
20793
+ function o2(e4) {
21340
20794
  let t4 = function(e5) {
21341
20795
  let t5 = 0;
21342
20796
  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;
21343
20797
  }(e4);
21344
20798
  return e4.jfif.enabled && (t4 += 50), e4.xmp.enabled && (t4 += 2e4), e4.iptc.enabled && (t4 += 14e3), e4.icc.enabled && (t4 += 6e3), t4;
21345
20799
  }
21346
- var u3 = (e4) => String.fromCharCode.apply(null, e4);
21347
- var d3 = "undefined" != typeof TextDecoder ? new TextDecoder("utf-8") : void 0;
21348
- var c3 = class _c {
20800
+ var u2 = (e4) => String.fromCharCode.apply(null, e4);
20801
+ var d2 = "undefined" != typeof TextDecoder ? new TextDecoder("utf-8") : void 0;
20802
+ var c2 = class _c {
21349
20803
  static from(e4, t4) {
21350
20804
  return e4 instanceof this && e4.le === t4 ? e4 : new _c(e4, void 0, void 0, t4);
21351
20805
  }
@@ -21357,14 +20811,14 @@ Uppy plugins must have unique \`id\` options.`;
21357
20811
  let i5 = new DataView(e4, t4, s4);
21358
20812
  this._swapDataView(i5);
21359
20813
  } else if (e4 instanceof Uint8Array || e4 instanceof DataView || e4 instanceof _c) {
21360
- void 0 === s4 && (s4 = e4.byteLength - t4), (t4 += e4.byteOffset) + s4 > e4.byteOffset + e4.byteLength && l3("Creating view outside of available memory in ArrayBuffer");
20814
+ void 0 === s4 && (s4 = e4.byteLength - t4), (t4 += e4.byteOffset) + s4 > e4.byteOffset + e4.byteLength && l2("Creating view outside of available memory in ArrayBuffer");
21361
20815
  let i5 = new DataView(e4.buffer, t4, s4);
21362
20816
  this._swapDataView(i5);
21363
20817
  } else if ("number" == typeof e4) {
21364
20818
  let t5 = new DataView(new ArrayBuffer(e4));
21365
20819
  this._swapDataView(t5);
21366
20820
  } else
21367
- l3("Invalid input argument for BufferView: " + e4);
20821
+ l2("Invalid input argument for BufferView: " + e4);
21368
20822
  }
21369
20823
  _swapArrayBuffer(e4) {
21370
20824
  this._swapDataView(new DataView(e4));
@@ -21379,7 +20833,7 @@ Uppy plugins must have unique \`id\` options.`;
21379
20833
  return this.byteLength - e4;
21380
20834
  }
21381
20835
  set(e4, t4, s4 = _c) {
21382
- return e4 instanceof DataView || e4 instanceof _c ? e4 = new Uint8Array(e4.buffer, e4.byteOffset, e4.byteLength) : e4 instanceof ArrayBuffer && (e4 = new Uint8Array(e4)), e4 instanceof Uint8Array || l3("BufferView.set(): Invalid data argument."), this.toUint8().set(e4, t4), new s4(this, t4, e4.byteLength);
20836
+ return e4 instanceof DataView || e4 instanceof _c ? e4 = new Uint8Array(e4.buffer, e4.byteOffset, e4.byteLength) : e4 instanceof ArrayBuffer && (e4 = new Uint8Array(e4)), e4 instanceof Uint8Array || l2("BufferView.set(): Invalid data argument."), this.toUint8().set(e4, t4), new s4(this, t4, e4.byteLength);
21383
20837
  }
21384
20838
  subarray(e4, t4) {
21385
20839
  return t4 = t4 || this._lengthToEnd(e4), new _c(this, e4, t4);
@@ -21392,18 +20846,18 @@ Uppy plugins must have unique \`id\` options.`;
21392
20846
  }
21393
20847
  getString(e4 = 0, t4 = this.byteLength) {
21394
20848
  let s4 = this.getUint8Array(e4, t4);
21395
- return i4 = s4, d3 ? d3.decode(i4) : a3 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u3(i4)));
20849
+ return i4 = s4, d2 ? d2.decode(i4) : a2 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u2(i4)));
21396
20850
  var i4;
21397
20851
  }
21398
20852
  getLatin1String(e4 = 0, t4 = this.byteLength) {
21399
20853
  let s4 = this.getUint8Array(e4, t4);
21400
- return u3(s4);
20854
+ return u2(s4);
21401
20855
  }
21402
20856
  getUnicodeString(e4 = 0, t4 = this.byteLength) {
21403
20857
  const s4 = [];
21404
20858
  for (let i4 = 0; i4 < t4 && e4 + i4 < this.byteLength; i4 += 2)
21405
20859
  s4.push(this.getUint16(e4 + i4));
21406
- return u3(s4);
20860
+ return u2(s4);
21407
20861
  }
21408
20862
  getInt8(e4) {
21409
20863
  return this.dataView.getInt8(e4);
@@ -21465,46 +20919,46 @@ Uppy plugins must have unique \`id\` options.`;
21465
20919
  ensureChunk() {
21466
20920
  }
21467
20921
  };
21468
- function p3(e4, t4) {
21469
- l3(`${e4} '${t4}' was not loaded, try using full build of exifr.`);
20922
+ function p2(e4, t4) {
20923
+ l2(`${e4} '${t4}' was not loaded, try using full build of exifr.`);
21470
20924
  }
21471
- var g4 = class extends Map {
20925
+ var g2 = class extends Map {
21472
20926
  constructor(e4) {
21473
20927
  super(), this.kind = e4;
21474
20928
  }
21475
20929
  get(e4, t4) {
21476
- return this.has(e4) || p3(this.kind, e4), t4 && (e4 in t4 || function(e5, t5) {
21477
- l3(`Unknown ${e5} '${t5}'.`);
21478
- }(this.kind, e4), t4[e4].enabled || p3(this.kind, e4)), super.get(e4);
20930
+ return this.has(e4) || p2(this.kind, e4), t4 && (e4 in t4 || function(e5, t5) {
20931
+ l2(`Unknown ${e5} '${t5}'.`);
20932
+ }(this.kind, e4), t4[e4].enabled || p2(this.kind, e4)), super.get(e4);
21479
20933
  }
21480
20934
  keyList() {
21481
20935
  return Array.from(this.keys());
21482
20936
  }
21483
20937
  };
21484
- var m3 = new g4("file parser");
21485
- var y3 = new g4("segment parser");
21486
- var b2 = new g4("file reader");
21487
- var w3 = t3.fetch;
21488
- function k3(e4, t4) {
21489
- 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");
20938
+ var m2 = new g2("file parser");
20939
+ var y2 = new g2("segment parser");
20940
+ var b2 = new g2("file reader");
20941
+ var w2 = t2.fetch;
20942
+ function k2(e4, t4) {
20943
+ return (i4 = e4).startsWith("data:") || i4.length > 1e4 ? v2(e4, t4, "base64") : n2 && e4.includes("://") ? O2(e4, t4, "url", S2) : n2 ? v2(e4, t4, "fs") : s2 ? O2(e4, t4, "url", S2) : void l2("Invalid input argument");
21490
20944
  var i4;
21491
20945
  }
21492
20946
  async function O2(e4, t4, s4, i4) {
21493
- return b2.has(s4) ? v3(e4, t4, s4) : i4 ? async function(e5, t5) {
20947
+ return b2.has(s4) ? v2(e4, t4, s4) : i4 ? async function(e5, t5) {
21494
20948
  let s5 = await t5(e5);
21495
- return new c3(s5);
21496
- }(e4, i4) : void l3(`Parser ${s4} is not loaded`);
20949
+ return new c2(s5);
20950
+ }(e4, i4) : void l2(`Parser ${s4} is not loaded`);
21497
20951
  }
21498
- async function v3(e4, t4, s4) {
20952
+ async function v2(e4, t4, s4) {
21499
20953
  let i4 = new (b2.get(s4))(e4, t4);
21500
20954
  return await i4.read(), i4;
21501
20955
  }
21502
- var S2 = (e4) => w3(e4).then((e5) => e5.arrayBuffer());
21503
- var A4 = (e4) => new Promise((t4, s4) => {
20956
+ var S2 = (e4) => w2(e4).then((e5) => e5.arrayBuffer());
20957
+ var A2 = (e4) => new Promise((t4, s4) => {
21504
20958
  let i4 = new FileReader();
21505
20959
  i4.onloadend = () => t4(i4.result || new ArrayBuffer()), i4.onerror = s4, i4.readAsArrayBuffer(e4);
21506
20960
  });
21507
- var U2 = class extends Map {
20961
+ var U = class extends Map {
21508
20962
  get tagKeys() {
21509
20963
  return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys;
21510
20964
  }
@@ -21512,8 +20966,8 @@ Uppy plugins must have unique \`id\` options.`;
21512
20966
  return this.allValues || (this.allValues = Array.from(this.values())), this.allValues;
21513
20967
  }
21514
20968
  };
21515
- function x3(e4, t4, s4) {
21516
- let i4 = new U2();
20969
+ function x2(e4, t4, s4) {
20970
+ let i4 = new U();
21517
20971
  for (let [e5, t5] of s4)
21518
20972
  i4.set(e5, t5);
21519
20973
  if (Array.isArray(t4))
@@ -21523,33 +20977,33 @@ Uppy plugins must have unique \`id\` options.`;
21523
20977
  e4.set(t4, i4);
21524
20978
  return i4;
21525
20979
  }
21526
- function C3(e4, t4, s4) {
20980
+ function C2(e4, t4, s4) {
21527
20981
  let i4, n3 = e4.get(t4);
21528
20982
  for (i4 of s4)
21529
20983
  n3.set(i4[0], i4[1]);
21530
20984
  }
21531
- var B4 = /* @__PURE__ */ new Map();
21532
- var V3 = /* @__PURE__ */ new Map();
20985
+ var B2 = /* @__PURE__ */ new Map();
20986
+ var V2 = /* @__PURE__ */ new Map();
21533
20987
  var I2 = /* @__PURE__ */ new Map();
21534
20988
  var L2 = ["chunked", "firstChunkSize", "firstChunkSizeNode", "firstChunkSizeBrowser", "chunkSize", "chunkLimit"];
21535
- var T4 = ["jfif", "xmp", "icc", "iptc", "ihdr"];
21536
- var z3 = ["tiff", ...T4];
21537
- var P4 = ["ifd0", "ifd1", "exif", "gps", "interop"];
21538
- var F4 = [...z3, ...P4];
21539
- var j4 = ["makerNote", "userComment"];
21540
- var E3 = ["translateKeys", "translateValues", "reviveValues", "multiSegment"];
21541
- var M2 = [...E3, "sanitize", "mergeOutput", "silentErrors"];
21542
- var _3 = class {
20989
+ var T2 = ["jfif", "xmp", "icc", "iptc", "ihdr"];
20990
+ var z2 = ["tiff", ...T2];
20991
+ var P2 = ["ifd0", "ifd1", "exif", "gps", "interop"];
20992
+ var F2 = [...z2, ...P2];
20993
+ var j2 = ["makerNote", "userComment"];
20994
+ var E2 = ["translateKeys", "translateValues", "reviveValues", "multiSegment"];
20995
+ var M2 = [...E2, "sanitize", "mergeOutput", "silentErrors"];
20996
+ var _2 = class {
21543
20997
  get translate() {
21544
20998
  return this.translateKeys || this.translateValues || this.reviveValues;
21545
20999
  }
21546
21000
  };
21547
- var D3 = class extends _3 {
21001
+ var D2 = class extends _2 {
21548
21002
  get needed() {
21549
21003
  return this.enabled || this.deps.size > 0;
21550
21004
  }
21551
21005
  constructor(t4, s4, i4, n3) {
21552
- 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)
21006
+ if (super(), e2(this, "enabled", false), e2(this, "skip", /* @__PURE__ */ new Set()), e2(this, "pick", /* @__PURE__ */ new Set()), e2(this, "deps", /* @__PURE__ */ new Set()), e2(this, "translateKeys", false), e2(this, "translateValues", false), e2(this, "reviveValues", false), this.key = t4, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P2.includes(t4), this.canBeFiltered && (this.dict = B2.get(t4)), void 0 !== i4)
21553
21007
  if (Array.isArray(i4))
21554
21008
  this.parse = this.enabled = true, this.canBeFiltered && i4.length > 0 && this.translateTagSet(i4, this.pick);
21555
21009
  else if ("object" == typeof i4) {
@@ -21559,11 +21013,11 @@ Uppy plugins must have unique \`id\` options.`;
21559
21013
  }
21560
21014
  this.applyInheritables(i4);
21561
21015
  } else
21562
- true === i4 || false === i4 ? this.parse = this.enabled = i4 : l3(`Invalid options argument: ${i4}`);
21016
+ true === i4 || false === i4 ? this.parse = this.enabled = i4 : l2(`Invalid options argument: ${i4}`);
21563
21017
  }
21564
21018
  applyInheritables(e4) {
21565
21019
  let t4, s4;
21566
- for (t4 of E3)
21020
+ for (t4 of E2)
21567
21021
  s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
21568
21022
  }
21569
21023
  translateTagSet(e4, t4) {
@@ -21576,66 +21030,66 @@ Uppy plugins must have unique \`id\` options.`;
21576
21030
  t4.add(s4);
21577
21031
  }
21578
21032
  finalizeFilters() {
21579
- !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);
21033
+ !this.enabled && this.deps.size > 0 ? (this.enabled = true, X(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && X(this.pick, this.deps);
21580
21034
  }
21581
21035
  };
21582
- var N3 = { jfif: false, tiff: true, xmp: false, icc: false, iptc: false, ifd0: true, ifd1: false, exif: true, gps: true, interop: false, ihdr: void 0, makerNote: false, userComment: false, multiSegment: false, skip: [], pick: [], translateKeys: true, translateValues: true, reviveValues: true, sanitize: true, mergeOutput: true, silentErrors: true, chunked: true, firstChunkSize: void 0, firstChunkSizeNode: 512, firstChunkSizeBrowser: 65536, chunkSize: 65536, chunkLimit: 5 };
21036
+ var N2 = { jfif: false, tiff: true, xmp: false, icc: false, iptc: false, ifd0: true, ifd1: false, exif: true, gps: true, interop: false, ihdr: void 0, makerNote: false, userComment: false, multiSegment: false, skip: [], pick: [], translateKeys: true, translateValues: true, reviveValues: true, sanitize: true, mergeOutput: true, silentErrors: true, chunked: true, firstChunkSize: void 0, firstChunkSizeNode: 512, firstChunkSizeBrowser: 65536, chunkSize: 65536, chunkLimit: 5 };
21583
21037
  var $2 = /* @__PURE__ */ new Map();
21584
- var R = class extends _3 {
21038
+ var R = class extends _2 {
21585
21039
  static useCached(e4) {
21586
21040
  let t4 = $2.get(e4);
21587
21041
  return void 0 !== t4 || (t4 = new this(e4), $2.set(e4, t4)), t4;
21588
21042
  }
21589
21043
  constructor(e4) {
21590
- super(), true === e4 ? this.setupFromTrue() : void 0 === e4 ? this.setupFromUndefined() : Array.isArray(e4) ? this.setupFromArray(e4) : "object" == typeof e4 ? this.setupFromObject(e4) : l3(`Invalid options argument ${e4}`), void 0 === this.firstChunkSize && (this.firstChunkSize = s3 ? this.firstChunkSizeBrowser : this.firstChunkSizeNode), this.mergeOutput && (this.ifd1.enabled = false), this.filterNestedSegmentTags(), this.traverseTiffDependencyTree(), this.checkLoadedPlugins();
21044
+ super(), true === e4 ? this.setupFromTrue() : void 0 === e4 ? this.setupFromUndefined() : Array.isArray(e4) ? this.setupFromArray(e4) : "object" == typeof e4 ? this.setupFromObject(e4) : l2(`Invalid options argument ${e4}`), void 0 === this.firstChunkSize && (this.firstChunkSize = s2 ? this.firstChunkSizeBrowser : this.firstChunkSizeNode), this.mergeOutput && (this.ifd1.enabled = false), this.filterNestedSegmentTags(), this.traverseTiffDependencyTree(), this.checkLoadedPlugins();
21591
21045
  }
21592
21046
  setupFromUndefined() {
21593
21047
  let e4;
21594
21048
  for (e4 of L2)
21595
- this[e4] = N3[e4];
21049
+ this[e4] = N2[e4];
21596
21050
  for (e4 of M2)
21597
- this[e4] = N3[e4];
21598
- for (e4 of j4)
21599
- this[e4] = N3[e4];
21600
- for (e4 of F4)
21601
- this[e4] = new D3(e4, N3[e4], void 0, this);
21051
+ this[e4] = N2[e4];
21052
+ for (e4 of j2)
21053
+ this[e4] = N2[e4];
21054
+ for (e4 of F2)
21055
+ this[e4] = new D2(e4, N2[e4], void 0, this);
21602
21056
  }
21603
21057
  setupFromTrue() {
21604
21058
  let e4;
21605
21059
  for (e4 of L2)
21606
- this[e4] = N3[e4];
21060
+ this[e4] = N2[e4];
21607
21061
  for (e4 of M2)
21608
- this[e4] = N3[e4];
21609
- for (e4 of j4)
21062
+ this[e4] = N2[e4];
21063
+ for (e4 of j2)
21610
21064
  this[e4] = true;
21611
- for (e4 of F4)
21612
- this[e4] = new D3(e4, true, void 0, this);
21065
+ for (e4 of F2)
21066
+ this[e4] = new D2(e4, true, void 0, this);
21613
21067
  }
21614
21068
  setupFromArray(e4) {
21615
21069
  let t4;
21616
21070
  for (t4 of L2)
21617
- this[t4] = N3[t4];
21071
+ this[t4] = N2[t4];
21618
21072
  for (t4 of M2)
21619
- this[t4] = N3[t4];
21620
- for (t4 of j4)
21621
- this[t4] = N3[t4];
21622
- for (t4 of F4)
21623
- this[t4] = new D3(t4, false, void 0, this);
21624
- this.setupGlobalFilters(e4, void 0, P4);
21073
+ this[t4] = N2[t4];
21074
+ for (t4 of j2)
21075
+ this[t4] = N2[t4];
21076
+ for (t4 of F2)
21077
+ this[t4] = new D2(t4, false, void 0, this);
21078
+ this.setupGlobalFilters(e4, void 0, P2);
21625
21079
  }
21626
21080
  setupFromObject(e4) {
21627
21081
  let t4;
21628
- for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2))
21629
- this[t4] = W2(e4[t4], N3[t4]);
21082
+ for (t4 of (P2.ifd0 = P2.ifd0 || P2.image, P2.ifd1 = P2.ifd1 || P2.thumbnail, Object.assign(this, e4), L2))
21083
+ this[t4] = W(e4[t4], N2[t4]);
21630
21084
  for (t4 of M2)
21631
- this[t4] = W2(e4[t4], N3[t4]);
21632
- for (t4 of j4)
21633
- this[t4] = W2(e4[t4], N3[t4]);
21634
- for (t4 of z3)
21635
- this[t4] = new D3(t4, N3[t4], e4[t4], this);
21636
- for (t4 of P4)
21637
- this[t4] = new D3(t4, N3[t4], e4[t4], this.tiff);
21638
- 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);
21085
+ this[t4] = W(e4[t4], N2[t4]);
21086
+ for (t4 of j2)
21087
+ this[t4] = W(e4[t4], N2[t4]);
21088
+ for (t4 of z2)
21089
+ this[t4] = new D2(t4, N2[t4], e4[t4], this);
21090
+ for (t4 of P2)
21091
+ this[t4] = new D2(t4, N2[t4], e4[t4], this.tiff);
21092
+ this.setupGlobalFilters(e4.pick, e4.skip, P2, F2), true === e4.tiff ? this.batchEnableWithBool(P2, true) : false === e4.tiff ? this.batchEnableWithUserValue(P2, e4) : Array.isArray(e4.tiff) ? this.setupGlobalFilters(e4.tiff, void 0, P2) : "object" == typeof e4.tiff && this.setupGlobalFilters(e4.tiff.pick, e4.tiff.skip, P2);
21639
21093
  }
21640
21094
  batchEnableWithBool(e4, t4) {
21641
21095
  for (let s4 of e4)
@@ -21651,13 +21105,13 @@ Uppy plugins must have unique \`id\` options.`;
21651
21105
  if (e4 && e4.length) {
21652
21106
  for (let e5 of i4)
21653
21107
  this[e5].enabled = false;
21654
- let t5 = K3(e4, s4);
21108
+ let t5 = K(e4, s4);
21655
21109
  for (let [e5, s5] of t5)
21656
- X2(this[e5].pick, s5), this[e5].enabled = true;
21110
+ X(this[e5].pick, s5), this[e5].enabled = true;
21657
21111
  } else if (t4 && t4.length) {
21658
- let e5 = K3(t4, s4);
21112
+ let e5 = K(t4, s4);
21659
21113
  for (let [t5, s5] of e5)
21660
- X2(this[t5].skip, s5);
21114
+ X(this[t5].skip, s5);
21661
21115
  }
21662
21116
  }
21663
21117
  filterNestedSegmentTags() {
@@ -21666,56 +21120,56 @@ Uppy plugins must have unique \`id\` options.`;
21666
21120
  }
21667
21121
  traverseTiffDependencyTree() {
21668
21122
  let { ifd0: e4, exif: t4, gps: s4, interop: i4 } = this;
21669
- 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;
21670
- for (let e5 of P4)
21123
+ 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 = P2.some((e5) => true === this[e5].enabled) || this.makerNote || this.userComment;
21124
+ for (let e5 of P2)
21671
21125
  this[e5].finalizeFilters();
21672
21126
  }
21673
21127
  get onlyTiff() {
21674
- return !T4.map((e4) => this[e4].enabled).some((e4) => true === e4) && this.tiff.enabled;
21128
+ return !T2.map((e4) => this[e4].enabled).some((e4) => true === e4) && this.tiff.enabled;
21675
21129
  }
21676
21130
  checkLoadedPlugins() {
21677
- for (let e4 of z3)
21678
- this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
21131
+ for (let e4 of z2)
21132
+ this[e4].enabled && !y2.has(e4) && p2("segment parser", e4);
21679
21133
  }
21680
21134
  };
21681
- function K3(e4, t4) {
21135
+ function K(e4, t4) {
21682
21136
  let s4, i4, n3, r4, a4 = [];
21683
21137
  for (n3 of t4) {
21684
- for (r4 of (s4 = B4.get(n3), i4 = [], s4))
21138
+ for (r4 of (s4 = B2.get(n3), i4 = [], s4))
21685
21139
  (e4.includes(r4[0]) || e4.includes(r4[1])) && i4.push(r4[0]);
21686
21140
  i4.length && a4.push([n3, i4]);
21687
21141
  }
21688
21142
  return a4;
21689
21143
  }
21690
- function W2(e4, t4) {
21144
+ function W(e4, t4) {
21691
21145
  return void 0 !== e4 ? e4 : void 0 !== t4 ? t4 : void 0;
21692
21146
  }
21693
- function X2(e4, t4) {
21147
+ function X(e4, t4) {
21694
21148
  for (let s4 of t4)
21695
21149
  e4.add(s4);
21696
21150
  }
21697
- e3(R, "default", N3);
21698
- var H3 = class {
21151
+ e2(R, "default", N2);
21152
+ var H2 = class {
21699
21153
  constructor(t4) {
21700
- e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", (e4) => this.errors.push(e4)), this.options = R.useCached(t4);
21154
+ e2(this, "parsers", {}), e2(this, "output", {}), e2(this, "errors", []), e2(this, "pushToErrors", (e4) => this.errors.push(e4)), this.options = R.useCached(t4);
21701
21155
  }
21702
21156
  async read(e4) {
21703
21157
  this.file = await function(e5, t4) {
21704
- 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");
21158
+ return "string" == typeof e5 ? k2(e5, t4) : s2 && !i2 && e5 instanceof HTMLImageElement ? k2(e5.src, t4) : e5 instanceof Uint8Array || e5 instanceof ArrayBuffer || e5 instanceof DataView ? new c2(e5) : s2 && e5 instanceof Blob ? O2(e5, t4, "blob", A2) : void l2("Invalid input argument");
21705
21159
  }(e4, this.options);
21706
21160
  }
21707
21161
  setup() {
21708
21162
  if (this.fileParser)
21709
21163
  return;
21710
21164
  let { file: e4 } = this, t4 = e4.getUint16(0);
21711
- for (let [s4, i4] of m3)
21165
+ for (let [s4, i4] of m2)
21712
21166
  if (i4.canHandle(e4, t4))
21713
21167
  return this.fileParser = new i4(this.options, this.file, this.parsers), e4[s4] = true;
21714
- this.file.close && this.file.close(), l3("Unknown file format");
21168
+ this.file.close && this.file.close(), l2("Unknown file format");
21715
21169
  }
21716
21170
  async parse() {
21717
21171
  let { output: e4, errors: t4 } = this;
21718
- return this.setup(), this.options.silentErrors ? (await this.executeParsers().catch(this.pushToErrors), t4.push(...this.fileParser.errors)) : await this.executeParsers(), this.file.close && this.file.close(), this.options.silentErrors && t4.length > 0 && (e4.errors = t4), f3(s4 = e4) ? void 0 : s4;
21172
+ return this.setup(), this.options.silentErrors ? (await this.executeParsers().catch(this.pushToErrors), t4.push(...this.fileParser.errors)) : await this.executeParsers(), this.file.close && this.file.close(), this.options.silentErrors && t4.length > 0 && (e4.errors = t4), f2(s4 = e4) ? void 0 : s4;
21719
21173
  var s4;
21720
21174
  }
21721
21175
  async executeParsers() {
@@ -21729,7 +21183,7 @@ Uppy plugins must have unique \`id\` options.`;
21729
21183
  }
21730
21184
  async extractThumbnail() {
21731
21185
  this.setup();
21732
- let { options: e4, file: t4 } = this, s4 = y3.get("tiff", e4);
21186
+ let { options: e4, file: t4 } = this, s4 = y2.get("tiff", e4);
21733
21187
  var i4;
21734
21188
  if (t4.tiff ? i4 = { start: 0, type: "tiff" } : t4.jpeg && (i4 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i4)
21735
21189
  return;
@@ -21738,11 +21192,11 @@ Uppy plugins must have unique \`id\` options.`;
21738
21192
  }
21739
21193
  };
21740
21194
  async function Y(e4, t4) {
21741
- let s4 = new H3(t4);
21195
+ let s4 = new H2(t4);
21742
21196
  return await s4.read(e4), s4.parse();
21743
21197
  }
21744
- 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 });
21745
- var J3 = class {
21198
+ var G = Object.freeze({ __proto__: null, parse: Y, Exifr: H2, fileParsers: m2, segmentParsers: y2, fileReaders: b2, tagKeys: B2, tagValues: V2, tagRevivers: I2, createDictionary: x2, extendDictionary: C2, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A2, chunkedProps: L2, otherSegments: T2, segments: z2, tiffBlocks: P2, segmentsAndBlocks: F2, tiffExtractables: j2, inheritables: E2, allFormatters: M2, Options: R });
21199
+ var J2 = class {
21746
21200
  static findPosition(e4, t4) {
21747
21201
  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;
21748
21202
  return { offset: t4, length: s4, headerLength: i4, start: n3, size: r4, end: n3 + r4 };
@@ -21751,10 +21205,10 @@ Uppy plugins must have unique \`id\` options.`;
21751
21205
  return new this(e4, new R({ [this.type]: t4 }), e4).parse();
21752
21206
  }
21753
21207
  normalizeInput(e4) {
21754
- return e4 instanceof c3 ? e4 : new c3(e4);
21208
+ return e4 instanceof c2 ? e4 : new c2(e4);
21755
21209
  }
21756
21210
  constructor(t4, s4 = {}, i4) {
21757
- e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", (e4) => {
21211
+ e2(this, "errors", []), e2(this, "raw", /* @__PURE__ */ new Map()), e2(this, "handleError", (e4) => {
21758
21212
  if (!this.options.silentErrors)
21759
21213
  throw e4;
21760
21214
  this.errors.push(e4.message);
@@ -21767,7 +21221,7 @@ Uppy plugins must have unique \`id\` options.`;
21767
21221
  return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
21768
21222
  }
21769
21223
  translateBlock(e4, t4) {
21770
- 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, f4 = r4.translateKeys && !!n3, l4 = {};
21224
+ let s4 = I2.get(t4), i4 = V2.get(t4), n3 = B2.get(t4), r4 = this.options[t4], a4 = r4.reviveValues && !!s4, h4 = r4.translateValues && !!i4, f4 = r4.translateKeys && !!n3, l4 = {};
21771
21225
  for (let [t5, r5] of e4)
21772
21226
  a4 && s4.has(t5) ? r5 = s4.get(t5)(r5) : h4 && i4.has(t5) && (r5 = this.translateValue(r5, i4.get(t5))), f4 && n3.has(t5) && (t5 = n3.get(t5) || t5), l4[t5] = r5;
21773
21227
  return l4;
@@ -21784,21 +21238,21 @@ Uppy plugins must have unique \`id\` options.`;
21784
21238
  e4[t4] ? Object.assign(e4[t4], s4) : e4[t4] = s4;
21785
21239
  }
21786
21240
  };
21787
- e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", () => false);
21788
- function q4(e4) {
21241
+ e2(J2, "headerLength", 4), e2(J2, "type", void 0), e2(J2, "multiSegment", false), e2(J2, "canHandle", () => false);
21242
+ function q2(e4) {
21789
21243
  return 192 === e4 || 194 === e4 || 196 === e4 || 219 === e4 || 221 === e4 || 218 === e4 || 254 === e4;
21790
21244
  }
21791
- function Q2(e4) {
21245
+ function Q(e4) {
21792
21246
  return e4 >= 224 && e4 <= 239;
21793
21247
  }
21794
21248
  function Z(e4, t4, s4) {
21795
- for (let [i4, n3] of y3)
21249
+ for (let [i4, n3] of y2)
21796
21250
  if (n3.canHandle(e4, t4, s4))
21797
21251
  return i4;
21798
21252
  }
21799
21253
  var ee2 = class extends class {
21800
21254
  constructor(t4, s4, i4) {
21801
- e3(this, "errors", []), e3(this, "ensureSegmentChunk", async (e4) => {
21255
+ e2(this, "errors", []), e2(this, "ensureSegmentChunk", async (e4) => {
21802
21256
  let t5 = e4.start, s5 = e4.size || 65536;
21803
21257
  if (this.file.chunked)
21804
21258
  if (this.file.available(t5, s5))
@@ -21807,10 +21261,10 @@ Uppy plugins must have unique \`id\` options.`;
21807
21261
  try {
21808
21262
  e4.chunk = await this.file.readChunk(t5, s5);
21809
21263
  } catch (t6) {
21810
- l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
21264
+ l2(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
21811
21265
  }
21812
21266
  else
21813
- 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));
21267
+ this.file.byteLength > t5 + s5 ? e4.chunk = this.file.subarray(t5, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t5) : l2("Segment unreachable: " + JSON.stringify(e4));
21814
21268
  return e4.chunk;
21815
21269
  }), this.extendOptions && this.extendOptions(t4), this.options = t4, this.file = s4, this.parsers = i4;
21816
21270
  }
@@ -21818,7 +21272,7 @@ Uppy plugins must have unique \`id\` options.`;
21818
21272
  this.options[e4].enabled && this.createParser(e4, t4);
21819
21273
  }
21820
21274
  createParser(e4, t4) {
21821
- let s4 = new (y3.get(e4))(t4, this.options, this.file);
21275
+ let s4 = new (y2.get(e4))(t4, this.options, this.file);
21822
21276
  return this.parsers[e4] = s4;
21823
21277
  }
21824
21278
  createParsers(e4) {
@@ -21836,7 +21290,7 @@ Uppy plugins must have unique \`id\` options.`;
21836
21290
  }
21837
21291
  } {
21838
21292
  constructor(...t4) {
21839
- super(...t4), e3(this, "appSegments", []), e3(this, "jpegSegments", []), e3(this, "unknownSegments", []);
21293
+ super(...t4), e2(this, "appSegments", []), e2(this, "jpegSegments", []), e2(this, "unknownSegments", []);
21840
21294
  }
21841
21295
  static canHandle(e4, t4) {
21842
21296
  return 65496 === t4;
@@ -21845,13 +21299,13 @@ Uppy plugins must have unique \`id\` options.`;
21845
21299
  await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
21846
21300
  }
21847
21301
  setupSegmentFinderArgs(e4) {
21848
- 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;
21302
+ true === e4 ? (this.findAll = true, this.wanted = new Set(y2.keyList())) : (e4 = void 0 === e4 ? y2.keyList().filter((e5) => this.options[e5].enabled) : e4.filter((e5) => this.options[e5].enabled && y2.has(e5)), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
21849
21303
  }
21850
21304
  async findAppSegments(e4 = 0, t4) {
21851
21305
  this.setupSegmentFinderArgs(t4);
21852
21306
  let { file: s4, findAll: i4, wanted: n3, remaining: r4 } = this;
21853
21307
  if (!i4 && this.file.chunked && (i4 = Array.from(n3).some((e5) => {
21854
- let t5 = y3.get(e5), s5 = this.options[e5];
21308
+ let t5 = y2.get(e5), s5 = this.options[e5];
21855
21309
  return t5.multiSegment && s5.multiSegment;
21856
21310
  }), i4 && await this.file.readWhole()), e4 = this.findAppSegmentsInRange(e4, s4.byteLength), !this.options.onlyTiff && s4.chunked) {
21857
21311
  let t5 = false;
@@ -21867,11 +21321,11 @@ Uppy plugins must have unique \`id\` options.`;
21867
21321
  let s4, i4, n3, r4, a4, h4, { file: f4, findAll: l4, wanted: o4, remaining: u4, options: d4 } = this;
21868
21322
  for (; e4 < t4; e4++)
21869
21323
  if (255 === f4.getUint8(e4)) {
21870
- if (s4 = f4.getUint8(e4 + 1), Q2(s4)) {
21871
- if (i4 = f4.getUint16(e4 + 2), n3 = Z(f4, e4, i4), n3 && o4.has(n3) && (r4 = y3.get(n3), a4 = r4.findPosition(f4, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u4.delete(n3)) : u4.delete(n3), 0 === u4.size)))
21324
+ if (s4 = f4.getUint8(e4 + 1), Q(s4)) {
21325
+ if (i4 = f4.getUint16(e4 + 2), n3 = Z(f4, e4, i4), n3 && o4.has(n3) && (r4 = y2.get(n3), a4 = r4.findPosition(f4, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u4.delete(n3)) : u4.delete(n3), 0 === u4.size)))
21872
21326
  break;
21873
- d4.recordUnknownSegments && (a4 = J3.findPosition(f4, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i4 + 1;
21874
- } else if (q4(s4)) {
21327
+ d4.recordUnknownSegments && (a4 = J2.findPosition(f4, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i4 + 1;
21328
+ } else if (q2(s4)) {
21875
21329
  if (i4 = f4.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos)
21876
21330
  return;
21877
21331
  d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i4, marker: s4 }), e4 += i4 + 1;
@@ -21889,7 +21343,7 @@ Uppy plugins must have unique \`id\` options.`;
21889
21343
  return Array.from(r4);
21890
21344
  }(this.appSegments, "type");
21891
21345
  this.mergedAppSegments = e4.map(([e5, t4]) => {
21892
- let s4 = y3.get(e5, this.options);
21346
+ let s4 = y2.get(e5, this.options);
21893
21347
  if (s4.handleMultiSegments) {
21894
21348
  return { type: e5, chunk: s4.handleMultiSegments(t4) };
21895
21349
  }
@@ -21904,9 +21358,9 @@ Uppy plugins must have unique \`id\` options.`;
21904
21358
  return void 0 === t4 && (await this.findAppSegments(0, [e4]), t4 = this.getSegment(e4)), t4;
21905
21359
  }
21906
21360
  };
21907
- e3(ee2, "type", "jpeg"), m3.set("jpeg", ee2);
21361
+ e2(ee2, "type", "jpeg"), m2.set("jpeg", ee2);
21908
21362
  var te = [void 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4];
21909
- var se = class extends J3 {
21363
+ var se = class extends J2 {
21910
21364
  parseHeader() {
21911
21365
  var e4 = this.chunk.getUint16();
21912
21366
  18761 === e4 ? this.le = true : 19789 === e4 && (this.le = false), this.chunk.le = this.le, this.headerParsed = true;
@@ -21929,7 +21383,7 @@ Uppy plugins must have unique \`id\` options.`;
21929
21383
  }
21930
21384
  parseTag(e4, t4, s4) {
21931
21385
  let { chunk: i4 } = this, n3 = i4.getUint16(e4 + 2), r4 = i4.getUint32(e4 + 4), a4 = te[n3];
21932
- 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)
21386
+ if (a4 * r4 <= 4 ? e4 += 8 : e4 = i4.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l2(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4}`), e4 > i4.byteLength && l2(`Invalid TIFF value offset. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4} is outside of chunk size ${i4.byteLength}`), 1 === n3)
21933
21387
  return i4.getUint8Array(e4, r4);
21934
21388
  if (2 === n3)
21935
21389
  return "" === (h4 = function(e5) {
@@ -22000,7 +21454,7 @@ Uppy plugins must have unique \`id\` options.`;
22000
21454
  case 13:
22001
21455
  return s4.getUint32(t4);
22002
21456
  default:
22003
- l3(`Invalid tiff type ${e4}`);
21457
+ l2(`Invalid tiff type ${e4}`);
22004
21458
  }
22005
21459
  }
22006
21460
  };
@@ -22035,8 +21489,8 @@ Uppy plugins must have unique \`id\` options.`;
22035
21489
  if (this.ifd0)
22036
21490
  return;
22037
21491
  let { file: e4 } = this;
22038
- this.findIfd0Offset(), this.ifd0Offset < 8 && l3("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l3(`IFD0 offset points to outside of file.
22039
- this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o3(this.options));
21492
+ this.findIfd0Offset(), this.ifd0Offset < 8 && l2("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l2(`IFD0 offset points to outside of file.
21493
+ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o2(this.options));
22040
21494
  let t4 = this.parseBlock(this.ifd0Offset, "ifd0");
22041
21495
  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;
22042
21496
  }
@@ -22045,7 +21499,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22045
21499
  return;
22046
21500
  if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset)
22047
21501
  return;
22048
- this.file.tiff && await this.file.ensureChunk(this.exifOffset, o3(this.options));
21502
+ this.file.tiff && await this.file.ensureChunk(this.exifOffset, o2(this.options));
22049
21503
  let e4 = this.parseBlock(this.exifOffset, "exif");
22050
21504
  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;
22051
21505
  }
@@ -22083,8 +21537,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22083
21537
  }
22084
21538
  createOutput() {
22085
21539
  let e4, t4, s4, i4 = {};
22086
- for (t4 of P4)
22087
- if (e4 = this[t4], !f3(e4))
21540
+ for (t4 of P2)
21541
+ if (e4 = this[t4], !f2(e4))
22088
21542
  if (s4 = this.canTranslate ? this.translateBlock(e4, t4) : Object.fromEntries(e4), this.options.mergeOutput) {
22089
21543
  if ("ifd1" === t4)
22090
21544
  continue;
@@ -22105,14 +21559,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22105
21559
  var n3 = e4 + t4 / 60 + s4 / 3600;
22106
21560
  return "S" !== i4 && "W" !== i4 || (n3 *= -1), n3;
22107
21561
  }
22108
- e3(ie, "type", "tiff"), e3(ie, "headerLength", 10), y3.set("tiff", ie);
22109
- 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 });
21562
+ e2(ie, "type", "tiff"), e2(ie, "headerLength", 10), y2.set("tiff", ie);
21563
+ var re = Object.freeze({ __proto__: null, default: G, Exifr: H2, fileParsers: m2, segmentParsers: y2, fileReaders: b2, tagKeys: B2, tagValues: V2, tagRevivers: I2, createDictionary: x2, extendDictionary: C2, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A2, chunkedProps: L2, otherSegments: T2, segments: z2, tiffBlocks: P2, segmentsAndBlocks: F2, tiffExtractables: j2, inheritables: E2, allFormatters: M2, Options: R, parse: Y });
22110
21564
  var ae = { ifd0: false, ifd1: false, exif: false, gps: false, interop: false, sanitize: false, reviveValues: true, translateKeys: false, translateValues: false, mergeOutput: false };
22111
21565
  var he = Object.assign({}, ae, { firstChunkSize: 4e4, gps: [1, 2, 3, 4] });
22112
21566
  var le = Object.assign({}, ae, { tiff: false, ifd1: true, mergeOutput: false });
22113
21567
  var de = Object.assign({}, ae, { firstChunkSize: 4e4, ifd0: [274] });
22114
21568
  async function ce(e4) {
22115
- let t4 = new H3(de);
21569
+ let t4 = new H2(de);
22116
21570
  await t4.read(e4);
22117
21571
  let s4 = await t4.parse();
22118
21572
  if (s4 && s4.ifd0)
@@ -22145,9 +21599,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22145
21599
  let t4 = await ce(e4);
22146
21600
  return Object.assign({ canvas: ge, css: me }, pe[t4]);
22147
21601
  }
22148
- var be = class extends c3 {
21602
+ var be = class extends c2 {
22149
21603
  constructor(...t4) {
22150
- super(...t4), e3(this, "ranges", new we()), 0 !== this.byteLength && this.ranges.add(0, this.byteLength);
21604
+ super(...t4), e2(this, "ranges", new we()), 0 !== this.byteLength && this.ranges.add(0, this.byteLength);
22151
21605
  }
22152
21606
  _tryExtend(e4, t4, s4) {
22153
21607
  if (0 === e4 && 0 === this.byteLength && s4) {
@@ -22163,7 +21617,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22163
21617
  }
22164
21618
  _extend(e4) {
22165
21619
  let t4;
22166
- t4 = a3 ? r3.allocUnsafe(e4) : new Uint8Array(e4);
21620
+ t4 = a2 ? r2.allocUnsafe(e4) : new Uint8Array(e4);
22167
21621
  let s4 = new DataView(t4.buffer, t4.byteOffset, t4.byteLength);
22168
21622
  return t4.set(new Uint8Array(this.buffer, this.byteOffset, this.byteLength), 0), { uintView: t4, dataView: s4 };
22169
21623
  }
@@ -22184,7 +21638,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22184
21638
  };
22185
21639
  var we = class {
22186
21640
  constructor() {
22187
- e3(this, "list", []);
21641
+ e2(this, "list", []);
22188
21642
  }
22189
21643
  get length() {
22190
21644
  return this.list.length;
@@ -22208,7 +21662,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22208
21662
  }
22209
21663
  var Oe = class extends be {
22210
21664
  constructor(t4, s4) {
22211
- super(0), e3(this, "chunksRead", 0), this.input = t4, this.options = s4;
21665
+ super(0), e2(this, "chunksRead", 0), this.input = t4, this.options = s4;
22212
21666
  }
22213
21667
  async readWhole() {
22214
21668
  this.chunked = false, await this.readChunk(this.nextChunkOffset);
@@ -22248,14 +21702,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22248
21702
  b2.set("blob", class extends Oe {
22249
21703
  async readWhole() {
22250
21704
  this.chunked = false;
22251
- let e4 = await A4(this.input);
21705
+ let e4 = await A2(this.input);
22252
21706
  this._swapArrayBuffer(e4);
22253
21707
  }
22254
21708
  readChunked() {
22255
21709
  return this.chunked = true, this.size = this.input.size, super.readChunked();
22256
21710
  }
22257
21711
  async _readChunk(e4, t4) {
22258
- let s4 = t4 ? e4 + t4 : void 0, i4 = this.input.slice(e4, s4), n3 = await A4(i4);
21712
+ let s4 = t4 ? e4 + t4 : void 0, i4 = this.input.slice(e4, s4), n3 = await A2(i4);
22259
21713
  return this.set(n3, e4, true);
22260
21714
  }
22261
21715
  });
@@ -22490,15 +21944,15 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22490
21944
  }
22491
21945
  let sW = targetWidth * 2 ** (steps - 1);
22492
21946
  let sH = targetHeight * 2 ** (steps - 1);
22493
- const x4 = 2;
21947
+ const x3 = 2;
22494
21948
  while (steps--) {
22495
21949
  const canvas = document.createElement("canvas");
22496
21950
  canvas.width = sW;
22497
21951
  canvas.height = sH;
22498
21952
  canvas.getContext("2d").drawImage(img, 0, 0, sW, sH);
22499
21953
  img = canvas;
22500
- sW = Math.round(sW / x4);
22501
- sH = Math.round(sH / x4);
21954
+ sW = Math.round(sW / x3);
21955
+ sH = Math.round(sH / x3);
22502
21956
  }
22503
21957
  return img;
22504
21958
  }
@@ -22674,9 +22128,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22674
22128
  }
22675
22129
  async function* getFilesFromDataTransfer(dataTransfer, logDropError) {
22676
22130
  const fileSystemHandles = await Promise.all(Array.from(dataTransfer.items, async (item) => {
22131
+ var _fileSystemHandle;
22677
22132
  let fileSystemHandle;
22678
22133
  const getAsEntry = () => typeof item.getAsEntry === "function" ? item.getAsEntry() : item.webkitGetAsEntry();
22679
- fileSystemHandle != null ? fileSystemHandle : fileSystemHandle = getAsFileSystemHandleFromEntry(getAsEntry(), logDropError);
22134
+ (_fileSystemHandle = fileSystemHandle) != null ? _fileSystemHandle : fileSystemHandle = getAsFileSystemHandleFromEntry(getAsEntry(), logDropError);
22680
22135
  return {
22681
22136
  fileSystemHandle,
22682
22137
  lastResortFile: item.getAsFile()
@@ -22735,6 +22190,154 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22735
22190
  };
22736
22191
  }
22737
22192
 
22193
+ // node_modules/preact/hooks/dist/hooks.module.js
22194
+ var t3;
22195
+ var r3;
22196
+ var u3;
22197
+ var i3;
22198
+ var o3 = 0;
22199
+ var f3 = [];
22200
+ var c3 = l;
22201
+ var e3 = c3.__b;
22202
+ var a3 = c3.__r;
22203
+ var v3 = c3.diffed;
22204
+ var l3 = c3.__c;
22205
+ var m3 = c3.unmount;
22206
+ var s3 = c3.__;
22207
+ function p3(n3, t4) {
22208
+ c3.__h && c3.__h(r3, n3, o3 || t4), o3 = 0;
22209
+ var u4 = r3.__H || (r3.__H = { __: [], __h: [] });
22210
+ return n3 >= u4.__.length && u4.__.push({}), u4.__[n3];
22211
+ }
22212
+ function d3(n3) {
22213
+ return o3 = 1, h3(D3, n3);
22214
+ }
22215
+ function h3(n3, u4, i4) {
22216
+ var o4 = p3(t3++, 2);
22217
+ if (o4.t = n3, !o4.__c && (o4.__ = [i4 ? i4(u4) : D3(void 0, u4), function(n4) {
22218
+ var t4 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t4, n4);
22219
+ t4 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
22220
+ }], o4.__c = r3, !r3.__f)) {
22221
+ var f4 = function(n4, t4, r4) {
22222
+ if (!o4.__c.__H)
22223
+ return true;
22224
+ var u5 = o4.__c.__H.__.filter(function(n5) {
22225
+ return !!n5.__c;
22226
+ });
22227
+ if (u5.every(function(n5) {
22228
+ return !n5.__N;
22229
+ }))
22230
+ return !c4 || c4.call(this, n4, t4, r4);
22231
+ var i5 = o4.__c.props !== n4;
22232
+ return u5.forEach(function(n5) {
22233
+ if (n5.__N) {
22234
+ var t5 = n5.__[0];
22235
+ n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (i5 = true);
22236
+ }
22237
+ }), c4 && c4.call(this, n4, t4, r4) || i5;
22238
+ };
22239
+ r3.__f = true;
22240
+ var c4 = r3.shouldComponentUpdate, e4 = r3.componentWillUpdate;
22241
+ r3.componentWillUpdate = function(n4, t4, r4) {
22242
+ if (this.__e) {
22243
+ var u5 = c4;
22244
+ c4 = void 0, f4(n4, t4, r4), c4 = u5;
22245
+ }
22246
+ e4 && e4.call(this, n4, t4, r4);
22247
+ }, r3.shouldComponentUpdate = f4;
22248
+ }
22249
+ return o4.__N || o4.__;
22250
+ }
22251
+ function y3(n3, u4) {
22252
+ var i4 = p3(t3++, 3);
22253
+ !c3.__s && C3(i4.__H, u4) && (i4.__ = n3, i4.u = u4, r3.__H.__h.push(i4));
22254
+ }
22255
+ function A3(n3) {
22256
+ return o3 = 5, T3(function() {
22257
+ return { current: n3 };
22258
+ }, []);
22259
+ }
22260
+ function T3(n3, r4) {
22261
+ var u4 = p3(t3++, 7);
22262
+ return C3(u4.__H, r4) && (u4.__ = n3(), u4.__H = r4, u4.__h = n3), u4.__;
22263
+ }
22264
+ function q3(n3, t4) {
22265
+ return o3 = 8, T3(function() {
22266
+ return n3;
22267
+ }, t4);
22268
+ }
22269
+ function j3() {
22270
+ for (var n3; n3 = f3.shift(); )
22271
+ if (n3.__P && n3.__H)
22272
+ try {
22273
+ n3.__H.__h.forEach(z3), n3.__H.__h.forEach(B3), n3.__H.__h = [];
22274
+ } catch (t4) {
22275
+ n3.__H.__h = [], c3.__e(t4, n3.__v);
22276
+ }
22277
+ }
22278
+ c3.__b = function(n3) {
22279
+ r3 = null, e3 && e3(n3);
22280
+ }, c3.__ = function(n3, t4) {
22281
+ n3 && t4.__k && t4.__k.__m && (n3.__m = t4.__k.__m), s3 && s3(n3, t4);
22282
+ }, c3.__r = function(n3) {
22283
+ a3 && a3(n3), t3 = 0;
22284
+ var i4 = (r3 = n3.__c).__H;
22285
+ i4 && (u3 === r3 ? (i4.__h = [], r3.__h = [], i4.__.forEach(function(n4) {
22286
+ n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
22287
+ })) : (i4.__h.forEach(z3), i4.__h.forEach(B3), i4.__h = [], t3 = 0)), u3 = r3;
22288
+ }, c3.diffed = function(n3) {
22289
+ v3 && v3(n3);
22290
+ var t4 = n3.__c;
22291
+ t4 && t4.__H && (t4.__H.__h.length && (1 !== f3.push(t4) && i3 === c3.requestAnimationFrame || ((i3 = c3.requestAnimationFrame) || w3)(j3)), t4.__H.__.forEach(function(n4) {
22292
+ n4.u && (n4.__H = n4.u), n4.u = void 0;
22293
+ })), u3 = r3 = null;
22294
+ }, c3.__c = function(n3, t4) {
22295
+ t4.some(function(n4) {
22296
+ try {
22297
+ n4.__h.forEach(z3), n4.__h = n4.__h.filter(function(n5) {
22298
+ return !n5.__ || B3(n5);
22299
+ });
22300
+ } catch (r4) {
22301
+ t4.some(function(n5) {
22302
+ n5.__h && (n5.__h = []);
22303
+ }), t4 = [], c3.__e(r4, n4.__v);
22304
+ }
22305
+ }), l3 && l3(n3, t4);
22306
+ }, c3.unmount = function(n3) {
22307
+ m3 && m3(n3);
22308
+ var t4, r4 = n3.__c;
22309
+ r4 && r4.__H && (r4.__H.__.forEach(function(n4) {
22310
+ try {
22311
+ z3(n4);
22312
+ } catch (n5) {
22313
+ t4 = n5;
22314
+ }
22315
+ }), r4.__H = void 0, t4 && c3.__e(t4, r4.__v));
22316
+ };
22317
+ var k3 = "function" == typeof requestAnimationFrame;
22318
+ function w3(n3) {
22319
+ var t4, r4 = function() {
22320
+ clearTimeout(u4), k3 && cancelAnimationFrame(t4), setTimeout(n3);
22321
+ }, u4 = setTimeout(r4, 100);
22322
+ k3 && (t4 = requestAnimationFrame(r4));
22323
+ }
22324
+ function z3(n3) {
22325
+ var t4 = r3, u4 = n3.__c;
22326
+ "function" == typeof u4 && (n3.__c = void 0, u4()), r3 = t4;
22327
+ }
22328
+ function B3(n3) {
22329
+ var t4 = r3;
22330
+ n3.__c = n3.__(), r3 = t4;
22331
+ }
22332
+ function C3(n3, t4) {
22333
+ return !n3 || n3.length !== t4.length || t4.some(function(t5, r4) {
22334
+ return t5 !== n3[r4];
22335
+ });
22336
+ }
22337
+ function D3(n3, t4) {
22338
+ return "function" == typeof t4 ? t4(n3) : t4;
22339
+ }
22340
+
22738
22341
  // node_modules/@uppy/provider-views/lib/ProviderView/AuthView.js
22739
22342
  function GoogleIcon() {
22740
22343
  return _("svg", {
@@ -22777,7 +22380,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
22777
22380
  onAuth
22778
22381
  } = _ref;
22779
22382
  const isGoogleDrive = pluginName === "Google Drive";
22780
- const onSubmit = q2((e4) => {
22383
+ const onSubmit = q3((e4) => {
22781
22384
  e4.preventDefault();
22782
22385
  onAuth();
22783
22386
  }, [onAuth]);
@@ -23245,8 +22848,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
23245
22848
  virtualList,
23246
22849
  utmSource
23247
22850
  } = props;
23248
- const [isShiftKeyPressed, setIsShiftKeyPressed] = d2(false);
23249
- y2(() => {
22851
+ const [isShiftKeyPressed, setIsShiftKeyPressed] = d3(false);
22852
+ y3(() => {
23250
22853
  const handleKeyUp = (e4) => {
23251
22854
  if (e4.key === "Shift")
23252
22855
  setIsShiftKeyPressed(false);
@@ -24051,17 +23654,17 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24051
23654
  const onInput = (e4) => {
24052
23655
  setSearchString(e4.target.value);
24053
23656
  };
24054
- const submit = q2((ev) => {
23657
+ const submit = q3((ev) => {
24055
23658
  ev.preventDefault();
24056
23659
  submitSearchString();
24057
23660
  }, [submitSearchString]);
24058
- const [form] = d2(() => {
23661
+ const [form] = d3(() => {
24059
23662
  const formEl = document.createElement("form");
24060
23663
  formEl.setAttribute("tabindex", "-1");
24061
23664
  formEl.id = nanoid();
24062
23665
  return formEl;
24063
23666
  });
24064
- y2(() => {
23667
+ y3(() => {
24065
23668
  document.body.appendChild(form);
24066
23669
  form.addEventListener("submit", submit);
24067
23670
  return () => {
@@ -24140,10 +23743,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24140
23743
  partialTree,
24141
23744
  validateAggregateRestrictions
24142
23745
  } = _ref;
24143
- const aggregateRestrictionError = T2(() => {
23746
+ const aggregateRestrictionError = T3(() => {
24144
23747
  return validateAggregateRestrictions(partialTree);
24145
23748
  }, [partialTree, validateAggregateRestrictions]);
24146
- const nOfSelectedFiles = T2(() => {
23749
+ const nOfSelectedFiles = T3(() => {
24147
23750
  return getNumberOfSelectedFiles_default(partialTree);
24148
23751
  }, [partialTree]);
24149
23752
  if (nOfSelectedFiles === 0) {
@@ -24294,7 +23897,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24294
23897
  return "__private_" + id6++ + "_" + e4;
24295
23898
  }
24296
23899
  var packageJson6 = {
24297
- "version": "4.4.5"
23900
+ "version": "4.4.2"
24298
23901
  };
24299
23902
  function defaultPickerIcon() {
24300
23903
  return _("svg", {
@@ -24353,19 +23956,6 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24353
23956
  });
24354
23957
  return filtered;
24355
23958
  };
24356
- this.getBreadcrumbs = () => {
24357
- const {
24358
- partialTree,
24359
- currentFolderId
24360
- } = this.plugin.getPluginState();
24361
- return getBreadcrumbs_default(partialTree, currentFolderId);
24362
- };
24363
- this.getSelectedAmount = () => {
24364
- const {
24365
- partialTree
24366
- } = this.plugin.getPluginState();
24367
- return getNumberOfSelectedFiles_default(partialTree);
24368
- };
24369
23959
  this.validateAggregateRestrictions = (partialTree) => {
24370
23960
  const checkedFiles = partialTree.filter((item) => item.type === "file" && item.status === "checked");
24371
23961
  const uppyFiles = checkedFiles.map((file) => file.data);
@@ -24599,10 +24189,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24599
24189
  }
24600
24190
  const {
24601
24191
  partialTree,
24192
+ currentFolderId,
24602
24193
  username,
24603
24194
  searchString
24604
24195
  } = this.plugin.getPluginState();
24605
- const breadcrumbs = this.getBreadcrumbs();
24196
+ const breadcrumbs = getBreadcrumbs_default(partialTree, currentFolderId);
24606
24197
  return _("div", {
24607
24198
  className: (0, import_classnames6.default)("uppy-ProviderBrowser", `uppy-ProviderBrowser-viewType--${opts.viewType}`)
24608
24199
  }, _(Header, {
@@ -24671,7 +24262,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
24671
24262
  // node_modules/@uppy/provider-views/lib/SearchProviderView/SearchProviderView.js
24672
24263
  var import_classnames7 = __toESM(require_classnames(), 1);
24673
24264
  var packageJson7 = {
24674
- "version": "4.4.5"
24265
+ "version": "4.4.2"
24675
24266
  };
24676
24267
  var defaultState = {
24677
24268
  loading: false,
@@ -25985,7 +25576,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
25985
25576
  // Mobile
25986
25577
  71
25987
25578
  ) : 200;
25988
- const rows = T2(() => {
25579
+ const rows = T3(() => {
25989
25580
  const sortByGhostComesFirst = (file1, file2) => Number(files[file2].isGhost) - Number(files[file1].isGhost);
25990
25581
  const fileIds = Object.keys(files);
25991
25582
  if (recoveredState)
@@ -26413,7 +26004,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26413
26004
  state,
26414
26005
  uppy
26415
26006
  } = _ref;
26416
- const ref = A2(null);
26007
+ const ref = A3(null);
26417
26008
  return _("div", {
26418
26009
  className: (0, import_classnames10.default)("uppy-DashboardContent-panel", className),
26419
26010
  role: "tabpanel",
@@ -26674,8 +26265,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26674
26265
  var _file$meta$field$id;
26675
26266
  storedMetaData[field.id] = (_file$meta$field$id = file.meta[field.id]) != null ? _file$meta$field$id : "";
26676
26267
  });
26677
- const [formState, setFormState] = d2(storedMetaData);
26678
- const handleSave = q2((ev) => {
26268
+ const [formState, setFormState] = d3(storedMetaData);
26269
+ const handleSave = q3((ev) => {
26679
26270
  ev.preventDefault();
26680
26271
  saveFileCard(formState, fileCardFor);
26681
26272
  }, [saveFileCard, formState, fileCardFor]);
@@ -26688,13 +26279,13 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26688
26279
  const handleCancel = () => {
26689
26280
  toggleFileCard(false);
26690
26281
  };
26691
- const [form] = d2(() => {
26282
+ const [form] = d3(() => {
26692
26283
  const formEl = document.createElement("form");
26693
26284
  formEl.setAttribute("tabindex", "-1");
26694
26285
  formEl.id = nanoid();
26695
26286
  return formEl;
26696
26287
  });
26697
- y2(() => {
26288
+ y3(() => {
26698
26289
  document.body.appendChild(form);
26699
26290
  form.addEventListener("submit", handleSave);
26700
26291
  return () => {
@@ -26771,11 +26362,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26771
26362
  let {
26772
26363
  children
26773
26364
  } = _ref;
26774
- const [cachedChildren, setCachedChildren] = d2(null);
26775
- const [className, setClassName] = d2("");
26776
- const enterTimeoutRef = A2();
26777
- const leaveTimeoutRef = A2();
26778
- const animationFrameRef = A2();
26365
+ const [cachedChildren, setCachedChildren] = d3(null);
26366
+ const [className, setClassName] = d3("");
26367
+ const enterTimeoutRef = A3();
26368
+ const leaveTimeoutRef = A3();
26369
+ const animationFrameRef = A3();
26779
26370
  const handleEnterTransition = () => {
26780
26371
  setClassName(`${transitionName}-enter`);
26781
26372
  cancelAnimationFrame(animationFrameRef.current);
@@ -26801,7 +26392,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26801
26392
  }, duration);
26802
26393
  });
26803
26394
  };
26804
- y2(() => {
26395
+ y3(() => {
26805
26396
  const child = H(children)[0];
26806
26397
  if (cachedChildren === child)
26807
26398
  return;
@@ -26812,7 +26403,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
26812
26403
  }
26813
26404
  setCachedChildren(child);
26814
26405
  }, [children, cachedChildren]);
26815
- y2(() => {
26406
+ y3(() => {
26816
26407
  return () => {
26817
26408
  clearTimeout(enterTimeoutRef.current);
26818
26409
  clearTimeout(leaveTimeoutRef.current);
@@ -27114,7 +26705,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27114
26705
  return "__private_" + id7++ + "_" + e4;
27115
26706
  }
27116
26707
  var packageJson8 = {
27117
- "version": "4.3.4"
26708
+ "version": "4.3.2"
27118
26709
  };
27119
26710
  var memoize = memoizeOne.default || memoizeOne;
27120
26711
  var TAB_KEY = 9;
@@ -28642,7 +28233,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28642
28233
 
28643
28234
  // node_modules/@uppy/image-editor/lib/ImageEditor.js
28644
28235
  var packageJson9 = {
28645
- "version": "3.3.3"
28236
+ "version": "3.3.1"
28646
28237
  };
28647
28238
  var defaultCropperOptions = {
28648
28239
  viewMode: 0,
@@ -28812,13 +28403,13 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28812
28403
  });
28813
28404
  _classPrivateFieldLooseBase8(this, _uppy)[_uppy] = uppy;
28814
28405
  }
28815
- on(event, fn3) {
28816
- _classPrivateFieldLooseBase8(this, _events)[_events].push([event, fn3]);
28817
- return _classPrivateFieldLooseBase8(this, _uppy)[_uppy].on(event, fn3);
28406
+ on(event, fn2) {
28407
+ _classPrivateFieldLooseBase8(this, _events)[_events].push([event, fn2]);
28408
+ return _classPrivateFieldLooseBase8(this, _uppy)[_uppy].on(event, fn2);
28818
28409
  }
28819
28410
  remove() {
28820
- for (const [event, fn3] of _classPrivateFieldLooseBase8(this, _events)[_events].splice(0)) {
28821
- _classPrivateFieldLooseBase8(this, _uppy)[_uppy].off(event, fn3);
28411
+ for (const [event, fn2] of _classPrivateFieldLooseBase8(this, _events)[_events].splice(0)) {
28412
+ _classPrivateFieldLooseBase8(this, _uppy)[_uppy].off(event, fn2);
28822
28413
  }
28823
28414
  }
28824
28415
  onFilePause(fileID, cb) {
@@ -28996,20 +28587,20 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28996
28587
  this.limit = limit;
28997
28588
  }
28998
28589
  }
28999
- run(fn3, queueOptions) {
28590
+ run(fn2, queueOptions) {
29000
28591
  if (!_classPrivateFieldLooseBase9(this, _paused)[_paused] && _classPrivateFieldLooseBase9(this, _activeRequests)[_activeRequests] < this.limit) {
29001
- return _classPrivateFieldLooseBase9(this, _call)[_call](fn3);
28592
+ return _classPrivateFieldLooseBase9(this, _call)[_call](fn2);
29002
28593
  }
29003
- return _classPrivateFieldLooseBase9(this, _queue)[_queue](fn3, queueOptions);
28594
+ return _classPrivateFieldLooseBase9(this, _queue)[_queue](fn2, queueOptions);
29004
28595
  }
29005
- wrapSyncFunction(fn3, queueOptions) {
28596
+ wrapSyncFunction(fn2, queueOptions) {
29006
28597
  var _this = this;
29007
28598
  return function() {
29008
28599
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29009
28600
  args[_key] = arguments[_key];
29010
28601
  }
29011
28602
  const queuedRequest = _this.run(() => {
29012
- fn3(...args);
28603
+ fn2(...args);
29013
28604
  queueMicrotask(() => queuedRequest.done());
29014
28605
  return () => {
29015
28606
  };
@@ -29022,7 +28613,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
29022
28613
  };
29023
28614
  };
29024
28615
  }
29025
- wrapPromiseFunction(fn3, queueOptions) {
28616
+ wrapPromiseFunction(fn2, queueOptions) {
29026
28617
  var _this2 = this;
29027
28618
  return function() {
29028
28619
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
@@ -29034,7 +28625,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
29034
28625
  let cancelError;
29035
28626
  let innerPromise;
29036
28627
  try {
29037
- innerPromise = Promise.resolve(fn3(...args));
28628
+ innerPromise = Promise.resolve(fn2(...args));
29038
28629
  } catch (err) {
29039
28630
  innerPromise = Promise.reject(err);
29040
28631
  }
@@ -29111,12 +28702,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
29111
28702
  return _classPrivateFieldLooseBase9(this, _paused)[_paused];
29112
28703
  }
29113
28704
  };
29114
- function _call2(fn3) {
28705
+ function _call2(fn2) {
29115
28706
  _classPrivateFieldLooseBase9(this, _activeRequests)[_activeRequests] += 1;
29116
28707
  let done = false;
29117
28708
  let cancelActive;
29118
28709
  try {
29119
- cancelActive = fn3();
28710
+ cancelActive = fn2();
29120
28711
  } catch (err) {
29121
28712
  _classPrivateFieldLooseBase9(this, _activeRequests)[_activeRequests] -= 1;
29122
28713
  throw err;
@@ -29157,9 +28748,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
29157
28748
  next.abort = handler.abort;
29158
28749
  next.done = handler.done;
29159
28750
  }
29160
- function _queue2(fn3, options2) {
28751
+ function _queue2(fn2, options2) {
29161
28752
  const handler = {
29162
- fn: fn3,
28753
+ fn: fn2,
29163
28754
  priority: (options2 == null ? void 0 : options2.priority) || 0,
29164
28755
  abort: () => {
29165
28756
  _classPrivateFieldLooseBase9(this, _dequeue)[_dequeue](handler);
@@ -30427,6 +30018,50 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
30427
30018
  }
30428
30019
  };
30429
30020
 
30021
+ // src/js/controllers/textarea_autogrow_controller.js
30022
+ var textarea_autogrow_controller_default = class extends Controller {
30023
+ static values = {
30024
+ maxHeight: { type: Number, default: 0 }
30025
+ // 0 means use CSS max-height or 50vh
30026
+ };
30027
+ connect() {
30028
+ this.resize();
30029
+ this.element.addEventListener("input", this.resize);
30030
+ window.addEventListener("resize", this.resize);
30031
+ }
30032
+ disconnect() {
30033
+ this.element.removeEventListener("input", this.resize);
30034
+ window.removeEventListener("resize", this.resize);
30035
+ }
30036
+ resize = () => {
30037
+ const element = this.element;
30038
+ const maxHeight = this.#getMaxHeight();
30039
+ element.style.height = "auto";
30040
+ element.style.overflow = "hidden";
30041
+ const scrollHeight = element.scrollHeight;
30042
+ if (maxHeight > 0 && scrollHeight > maxHeight) {
30043
+ element.style.height = `${maxHeight}px`;
30044
+ element.style.overflow = "auto";
30045
+ } else {
30046
+ element.style.height = `${scrollHeight}px`;
30047
+ }
30048
+ };
30049
+ #getMaxHeight() {
30050
+ if (this.maxHeightValue > 0) {
30051
+ return this.maxHeightValue;
30052
+ }
30053
+ const computedStyle = window.getComputedStyle(this.element);
30054
+ const cssMaxHeight = computedStyle.maxHeight;
30055
+ if (cssMaxHeight && cssMaxHeight !== "none") {
30056
+ const parsed = parseFloat(cssMaxHeight);
30057
+ if (!isNaN(parsed) && parsed > 0) {
30058
+ return parsed;
30059
+ }
30060
+ }
30061
+ return 300;
30062
+ }
30063
+ };
30064
+
30430
30065
  // src/js/controllers/register_controllers.js
30431
30066
  function register_controllers_default(application2) {
30432
30067
  application2.register("password-visibility", password_visibility_controller_default);
@@ -30452,6 +30087,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
30452
30087
  application2.register("key-value-store", key_value_store_controller_default);
30453
30088
  application2.register("bulk-actions", bulk_actions_controller_default);
30454
30089
  application2.register("filter-panel", filter_panel_controller_default);
30090
+ application2.register("textarea-autogrow", textarea_autogrow_controller_default);
30455
30091
  }
30456
30092
 
30457
30093
  // src/js/turbo/turbo_actions.js
@@ -30490,12 +30126,12 @@ cropperjs/dist/cropper.js:
30490
30126
 
30491
30127
  @hotwired/turbo/dist/turbo.es2017-esm.js:
30492
30128
  (*!
30493
- Turbo 8.0.13
30494
- Copyright © 2025 37signals LLC
30129
+ Turbo 8.0.12
30130
+ Copyright © 2024 37signals LLC
30495
30131
  *)
30496
30132
 
30497
30133
  dompurify/dist/purify.es.mjs:
30498
- (*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE *)
30134
+ (*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE *)
30499
30135
 
30500
30136
  @uppy/utils/lib/Translator.js:
30501
30137
  (**