bard-attachment_field 0.5.7 → 0.6.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.
@@ -1935,9 +1935,9 @@ var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
1935
1935
  if (p3.indexOf(_polyfillHostNoCombinator) > -1) {
1936
1936
  scopedP = applySimpleSelectorScope(p3, scopeSelector2, hostSelector);
1937
1937
  } else {
1938
- const t = p3.replace(_polyfillHostRe, "");
1939
- if (t.length > 0) {
1940
- scopedP = injectScopingSelector(t, className);
1938
+ const t2 = p3.replace(_polyfillHostRe, "");
1939
+ if (t2.length > 0) {
1940
+ scopedP = injectScopingSelector(t2, className);
1941
1941
  }
1942
1942
  }
1943
1943
  return scopedP;
@@ -4112,347 +4112,347 @@ var n = function() {
4112
4112
  // dist/components/attachment-file2.js
4113
4113
  var a2 = { exports: {} };
4114
4114
  a2.exports = (function() {
4115
- var t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
4116
- function e3(t2, e4) {
4117
- var i3 = t2[0], s2 = t2[1], r5 = t2[2], n4 = t2[3];
4118
- s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[0] - 680876936 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[1] - 389564586 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[2] + 606105819 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[3] - 1044525330 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[4] - 176418897 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[5] + 1200080426 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[6] - 1473231341 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[7] - 45705983 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[8] + 1770035416 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[9] - 1958414417 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[10] - 42063 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[11] - 1990404162 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[12] + 1804603682 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[13] - 40341101 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[14] - 1502002290 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[15] + 1236535329 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[1] - 165796510 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[6] - 1069501632 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[11] + 643717713 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[0] - 373897302 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[5] - 701558691 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[10] + 38016083 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[15] - 660478335 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[4] - 405537848 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[9] + 568446438 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[14] - 1019803690 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[3] - 187363961 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[8] + 1163531501 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[13] - 1444681467 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[2] - 51403784 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[7] + 1735328473 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[12] - 1926607734 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[5] - 378558 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[8] - 2022574463 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[11] + 1839030562 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[14] - 35309556 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[1] - 1530992060 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[4] + 1272893353 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[7] - 155497632 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[10] - 1094730640 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[13] + 681279174 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[0] - 358537222 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[3] - 722521979 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[6] + 76029189 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[9] - 640364487 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[12] - 421815835 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[15] + 530742520 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[2] - 995338651 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[0] - 198630844 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[7] + 1126891415 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[14] - 1416354905 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[5] - 57434055 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[12] + 1700485571 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[3] - 1894986606 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[10] - 1051523 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[1] - 2054922799 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[8] + 1873313359 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[15] - 30611744 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[6] - 1560198380 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[13] + 1309151649 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[4] - 145523070 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[11] - 1120210379 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[2] + 718787259 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[9] - 343485551 | 0) << 21 | s2 >>> 11) + r5 | 0, t2[0] = i3 + t2[0] | 0, t2[1] = s2 + t2[1] | 0, t2[2] = r5 + t2[2] | 0, t2[3] = n4 + t2[3] | 0;
4115
+ var t2 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
4116
+ function e3(t3, e4) {
4117
+ var i3 = t3[0], s2 = t3[1], r5 = t3[2], n4 = t3[3];
4118
+ s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[0] - 680876936 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[1] - 389564586 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[2] + 606105819 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[3] - 1044525330 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[4] - 176418897 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[5] + 1200080426 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[6] - 1473231341 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[7] - 45705983 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[8] + 1770035416 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[9] - 1958414417 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[10] - 42063 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[11] - 1990404162 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & r5 | ~s2 & n4) + e4[12] + 1804603682 | 0) << 7 | i3 >>> 25) + s2 | 0) & s2 | ~i3 & r5) + e4[13] - 40341101 | 0) << 12 | n4 >>> 20) + i3 | 0) & i3 | ~n4 & s2) + e4[14] - 1502002290 | 0) << 17 | r5 >>> 15) + n4 | 0) & n4 | ~r5 & i3) + e4[15] + 1236535329 | 0) << 22 | s2 >>> 10) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[1] - 165796510 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[6] - 1069501632 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[11] + 643717713 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[0] - 373897302 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[5] - 701558691 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[10] + 38016083 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[15] - 660478335 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[4] - 405537848 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[9] + 568446438 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[14] - 1019803690 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[3] - 187363961 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[8] + 1163531501 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 & n4 | r5 & ~n4) + e4[13] - 1444681467 | 0) << 5 | i3 >>> 27) + s2 | 0) & r5 | s2 & ~r5) + e4[2] - 51403784 | 0) << 9 | n4 >>> 23) + i3 | 0) & s2 | i3 & ~s2) + e4[7] + 1735328473 | 0) << 14 | r5 >>> 18) + n4 | 0) & i3 | n4 & ~i3) + e4[12] - 1926607734 | 0) << 20 | s2 >>> 12) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[5] - 378558 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[8] - 2022574463 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[11] + 1839030562 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[14] - 35309556 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[1] - 1530992060 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[4] + 1272893353 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[7] - 155497632 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[10] - 1094730640 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[13] + 681279174 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[0] - 358537222 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[3] - 722521979 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[6] + 76029189 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((r5 = ((r5 += ((n4 = ((n4 += ((i3 = ((i3 += (s2 ^ r5 ^ n4) + e4[9] - 640364487 | 0) << 4 | i3 >>> 28) + s2 | 0) ^ s2 ^ r5) + e4[12] - 421815835 | 0) << 11 | n4 >>> 21) + i3 | 0) ^ i3 ^ s2) + e4[15] + 530742520 | 0) << 16 | r5 >>> 16) + n4 | 0) ^ n4 ^ i3) + e4[2] - 995338651 | 0) << 23 | s2 >>> 9) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[0] - 198630844 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[7] + 1126891415 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[14] - 1416354905 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[5] - 57434055 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[12] + 1700485571 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[3] - 1894986606 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[10] - 1051523 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[1] - 2054922799 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[8] + 1873313359 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[15] - 30611744 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[6] - 1560198380 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[13] + 1309151649 | 0) << 21 | s2 >>> 11) + r5 | 0, s2 = ((s2 += ((n4 = ((n4 += (s2 ^ ((i3 = ((i3 += (r5 ^ (s2 | ~n4)) + e4[4] - 145523070 | 0) << 6 | i3 >>> 26) + s2 | 0) | ~r5)) + e4[11] - 1120210379 | 0) << 10 | n4 >>> 22) + i3 | 0) ^ ((r5 = ((r5 += (i3 ^ (n4 | ~s2)) + e4[2] + 718787259 | 0) << 15 | r5 >>> 17) + n4 | 0) | ~i3)) + e4[9] - 343485551 | 0) << 21 | s2 >>> 11) + r5 | 0, t3[0] = i3 + t3[0] | 0, t3[1] = s2 + t3[1] | 0, t3[2] = r5 + t3[2] | 0, t3[3] = n4 + t3[3] | 0;
4119
4119
  }
4120
- function i2(t2) {
4120
+ function i2(t3) {
4121
4121
  var e4, i3 = [];
4122
- for (e4 = 0; e4 < 64; e4 += 4) i3[e4 >> 2] = t2.charCodeAt(e4) + (t2.charCodeAt(e4 + 1) << 8) + (t2.charCodeAt(e4 + 2) << 16) + (t2.charCodeAt(e4 + 3) << 24);
4122
+ for (e4 = 0; e4 < 64; e4 += 4) i3[e4 >> 2] = t3.charCodeAt(e4) + (t3.charCodeAt(e4 + 1) << 8) + (t3.charCodeAt(e4 + 2) << 16) + (t3.charCodeAt(e4 + 3) << 24);
4123
4123
  return i3;
4124
4124
  }
4125
- function s(t2) {
4125
+ function s(t3) {
4126
4126
  var e4, i3 = [];
4127
- for (e4 = 0; e4 < 64; e4 += 4) i3[e4 >> 2] = t2[e4] + (t2[e4 + 1] << 8) + (t2[e4 + 2] << 16) + (t2[e4 + 3] << 24);
4127
+ for (e4 = 0; e4 < 64; e4 += 4) i3[e4 >> 2] = t3[e4] + (t3[e4 + 1] << 8) + (t3[e4 + 2] << 16) + (t3[e4 + 3] << 24);
4128
4128
  return i3;
4129
4129
  }
4130
- function r4(t2) {
4131
- var s2, r5, n4, o4, a4, h4, c6 = t2.length, l3 = [1732584193, -271733879, -1732584194, 271733878];
4132
- for (s2 = 64; s2 <= c6; s2 += 64) e3(l3, i2(t2.substring(s2 - 64, s2)));
4133
- for (r5 = (t2 = t2.substring(s2 - 64)).length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], s2 = 0; s2 < r5; s2 += 1) n4[s2 >> 2] |= t2.charCodeAt(s2) << (s2 % 4 << 3);
4130
+ function r4(t3) {
4131
+ var s2, r5, n4, o4, a4, h4, c6 = t3.length, l3 = [1732584193, -271733879, -1732584194, 271733878];
4132
+ for (s2 = 64; s2 <= c6; s2 += 64) e3(l3, i2(t3.substring(s2 - 64, s2)));
4133
+ for (r5 = (t3 = t3.substring(s2 - 64)).length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], s2 = 0; s2 < r5; s2 += 1) n4[s2 >> 2] |= t3.charCodeAt(s2) << (s2 % 4 << 3);
4134
4134
  if (n4[s2 >> 2] |= 128 << (s2 % 4 << 3), s2 > 55) for (e3(l3, n4), s2 = 0; s2 < 16; s2 += 1) n4[s2] = 0;
4135
4135
  return o4 = (o4 = 8 * c6).toString(16).match(/(.*?)(.{0,8})$/), a4 = parseInt(o4[2], 16), h4 = parseInt(o4[1], 16) || 0, n4[14] = a4, n4[15] = h4, e3(l3, n4), l3;
4136
4136
  }
4137
4137
  function n3(e4) {
4138
4138
  var i3, s2 = "";
4139
- for (i3 = 0; i3 < 4; i3 += 1) s2 += t[e4 >> 8 * i3 + 4 & 15] + t[e4 >> 8 * i3 & 15];
4139
+ for (i3 = 0; i3 < 4; i3 += 1) s2 += t2[e4 >> 8 * i3 + 4 & 15] + t2[e4 >> 8 * i3 & 15];
4140
4140
  return s2;
4141
4141
  }
4142
- function o3(t2) {
4142
+ function o3(t3) {
4143
4143
  var e4;
4144
- for (e4 = 0; e4 < t2.length; e4 += 1) t2[e4] = n3(t2[e4]);
4145
- return t2.join("");
4144
+ for (e4 = 0; e4 < t3.length; e4 += 1) t3[e4] = n3(t3[e4]);
4145
+ return t3.join("");
4146
4146
  }
4147
- function a3(t2) {
4148
- return /[\u0080-\uFFFF]/.test(t2) && (t2 = unescape(encodeURIComponent(t2))), t2;
4147
+ function a3(t3) {
4148
+ return /[\u0080-\uFFFF]/.test(t3) && (t3 = unescape(encodeURIComponent(t3))), t3;
4149
4149
  }
4150
- function h3(t2) {
4151
- var e4, i3 = [], s2 = t2.length;
4152
- for (e4 = 0; e4 < s2 - 1; e4 += 2) i3.push(parseInt(t2.substr(e4, 2), 16));
4150
+ function h3(t3) {
4151
+ var e4, i3 = [], s2 = t3.length;
4152
+ for (e4 = 0; e4 < s2 - 1; e4 += 2) i3.push(parseInt(t3.substr(e4, 2), 16));
4153
4153
  return String.fromCharCode.apply(String, i3);
4154
4154
  }
4155
4155
  function c5() {
4156
4156
  this.reset();
4157
4157
  }
4158
4158
  return o3(r4("hello")), "undefined" == typeof ArrayBuffer || ArrayBuffer.prototype.slice || (function() {
4159
- function t2(t3, e4) {
4160
- return (t3 = 0 | t3 || 0) < 0 ? Math.max(t3 + e4, 0) : Math.min(t3, e4);
4159
+ function t3(t4, e4) {
4160
+ return (t4 = 0 | t4 || 0) < 0 ? Math.max(t4 + e4, 0) : Math.min(t4, e4);
4161
4161
  }
4162
4162
  ArrayBuffer.prototype.slice = function(e4, i3) {
4163
- var s2, r5, n4, o4, a4 = this.byteLength, h4 = t2(e4, a4), c6 = a4;
4164
- return void 0 !== i3 && (c6 = t2(i3, a4)), h4 > c6 ? new ArrayBuffer(0) : (s2 = c6 - h4, r5 = new ArrayBuffer(s2), n4 = new Uint8Array(r5), o4 = new Uint8Array(this, h4, s2), n4.set(o4), r5);
4163
+ var s2, r5, n4, o4, a4 = this.byteLength, h4 = t3(e4, a4), c6 = a4;
4164
+ return void 0 !== i3 && (c6 = t3(i3, a4)), h4 > c6 ? new ArrayBuffer(0) : (s2 = c6 - h4, r5 = new ArrayBuffer(s2), n4 = new Uint8Array(r5), o4 = new Uint8Array(this, h4, s2), n4.set(o4), r5);
4165
4165
  };
4166
- })(), c5.prototype.append = function(t2) {
4167
- return this.appendBinary(a3(t2)), this;
4168
- }, c5.prototype.appendBinary = function(t2) {
4169
- this._buff += t2, this._length += t2.length;
4166
+ })(), c5.prototype.append = function(t3) {
4167
+ return this.appendBinary(a3(t3)), this;
4168
+ }, c5.prototype.appendBinary = function(t3) {
4169
+ this._buff += t3, this._length += t3.length;
4170
4170
  var s2, r5 = this._buff.length;
4171
4171
  for (s2 = 64; s2 <= r5; s2 += 64) e3(this._hash, i2(this._buff.substring(s2 - 64, s2)));
4172
4172
  return this._buff = this._buff.substring(s2 - 64), this;
4173
- }, c5.prototype.end = function(t2) {
4173
+ }, c5.prototype.end = function(t3) {
4174
4174
  var e4, i3, s2 = this._buff, r5 = s2.length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
4175
4175
  for (e4 = 0; e4 < r5; e4 += 1) n4[e4 >> 2] |= s2.charCodeAt(e4) << (e4 % 4 << 3);
4176
- return this._finish(n4, r5), i3 = o3(this._hash), t2 && (i3 = h3(i3)), this.reset(), i3;
4176
+ return this._finish(n4, r5), i3 = o3(this._hash), t3 && (i3 = h3(i3)), this.reset(), i3;
4177
4177
  }, c5.prototype.reset = function() {
4178
4178
  return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
4179
4179
  }, c5.prototype.getState = function() {
4180
4180
  return { buff: this._buff, length: this._length, hash: this._hash.slice() };
4181
- }, c5.prototype.setState = function(t2) {
4182
- return this._buff = t2.buff, this._length = t2.length, this._hash = t2.hash, this;
4181
+ }, c5.prototype.setState = function(t3) {
4182
+ return this._buff = t3.buff, this._length = t3.length, this._hash = t3.hash, this;
4183
4183
  }, c5.prototype.destroy = function() {
4184
4184
  delete this._hash, delete this._buff, delete this._length;
4185
- }, c5.prototype._finish = function(t2, i3) {
4185
+ }, c5.prototype._finish = function(t3, i3) {
4186
4186
  var s2, r5, n4, o4 = i3;
4187
- if (t2[o4 >> 2] |= 128 << (o4 % 4 << 3), o4 > 55) for (e3(this._hash, t2), o4 = 0; o4 < 16; o4 += 1) t2[o4] = 0;
4188
- s2 = (s2 = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), r5 = parseInt(s2[2], 16), n4 = parseInt(s2[1], 16) || 0, t2[14] = r5, t2[15] = n4, e3(this._hash, t2);
4189
- }, c5.hash = function(t2, e4) {
4190
- return c5.hashBinary(a3(t2), e4);
4191
- }, c5.hashBinary = function(t2, e4) {
4192
- var i3 = o3(r4(t2));
4187
+ if (t3[o4 >> 2] |= 128 << (o4 % 4 << 3), o4 > 55) for (e3(this._hash, t3), o4 = 0; o4 < 16; o4 += 1) t3[o4] = 0;
4188
+ s2 = (s2 = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), r5 = parseInt(s2[2], 16), n4 = parseInt(s2[1], 16) || 0, t3[14] = r5, t3[15] = n4, e3(this._hash, t3);
4189
+ }, c5.hash = function(t3, e4) {
4190
+ return c5.hashBinary(a3(t3), e4);
4191
+ }, c5.hashBinary = function(t3, e4) {
4192
+ var i3 = o3(r4(t3));
4193
4193
  return e4 ? h3(i3) : i3;
4194
4194
  }, (c5.ArrayBuffer = function() {
4195
4195
  this.reset();
4196
- }).prototype.append = function(t2) {
4197
- var i3, r5, n4, o4, a4 = (r5 = this._buff.buffer, n4 = t2, (o4 = new Uint8Array(r5.byteLength + n4.byteLength)).set(new Uint8Array(r5)), o4.set(new Uint8Array(n4), r5.byteLength), o4), h4 = a4.length;
4198
- for (this._length += t2.byteLength, i3 = 64; i3 <= h4; i3 += 64) e3(this._hash, s(a4.subarray(i3 - 64, i3)));
4196
+ }).prototype.append = function(t3) {
4197
+ var i3, r5, n4, o4, a4 = (r5 = this._buff.buffer, n4 = t3, (o4 = new Uint8Array(r5.byteLength + n4.byteLength)).set(new Uint8Array(r5)), o4.set(new Uint8Array(n4), r5.byteLength), o4), h4 = a4.length;
4198
+ for (this._length += t3.byteLength, i3 = 64; i3 <= h4; i3 += 64) e3(this._hash, s(a4.subarray(i3 - 64, i3)));
4199
4199
  return this._buff = i3 - 64 < h4 ? new Uint8Array(a4.buffer.slice(i3 - 64)) : new Uint8Array(0), this;
4200
- }, c5.ArrayBuffer.prototype.end = function(t2) {
4200
+ }, c5.ArrayBuffer.prototype.end = function(t3) {
4201
4201
  var e4, i3, s2 = this._buff, r5 = s2.length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
4202
4202
  for (e4 = 0; e4 < r5; e4 += 1) n4[e4 >> 2] |= s2[e4] << (e4 % 4 << 3);
4203
- return this._finish(n4, r5), i3 = o3(this._hash), t2 && (i3 = h3(i3)), this.reset(), i3;
4203
+ return this._finish(n4, r5), i3 = o3(this._hash), t3 && (i3 = h3(i3)), this.reset(), i3;
4204
4204
  }, c5.ArrayBuffer.prototype.reset = function() {
4205
4205
  return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
4206
4206
  }, c5.ArrayBuffer.prototype.getState = function() {
4207
- var t2 = c5.prototype.getState.call(this);
4208
- return t2.buff = String.fromCharCode.apply(null, new Uint8Array(t2.buff)), t2;
4209
- }, c5.ArrayBuffer.prototype.setState = function(t2) {
4210
- return t2.buff = (function(t3, e4) {
4211
- var i3, s2 = t3.length, r5 = new ArrayBuffer(s2), n4 = new Uint8Array(r5);
4212
- for (i3 = 0; i3 < s2; i3 += 1) n4[i3] = t3.charCodeAt(i3);
4207
+ var t3 = c5.prototype.getState.call(this);
4208
+ return t3.buff = String.fromCharCode.apply(null, new Uint8Array(t3.buff)), t3;
4209
+ }, c5.ArrayBuffer.prototype.setState = function(t3) {
4210
+ return t3.buff = (function(t4, e4) {
4211
+ var i3, s2 = t4.length, r5 = new ArrayBuffer(s2), n4 = new Uint8Array(r5);
4212
+ for (i3 = 0; i3 < s2; i3 += 1) n4[i3] = t4.charCodeAt(i3);
4213
4213
  return e4 ? n4 : r5;
4214
- })(t2.buff, true), c5.prototype.setState.call(this, t2);
4215
- }, c5.ArrayBuffer.prototype.destroy = c5.prototype.destroy, c5.ArrayBuffer.prototype._finish = c5.prototype._finish, c5.ArrayBuffer.hash = function(t2, i3) {
4216
- var r5 = o3((function(t3) {
4217
- var i4, r6, n4, o4, a4, h4, c6 = t3.length, l3 = [1732584193, -271733879, -1732584194, 271733878];
4218
- for (i4 = 64; i4 <= c6; i4 += 64) e3(l3, s(t3.subarray(i4 - 64, i4)));
4219
- for (r6 = (t3 = i4 - 64 < c6 ? t3.subarray(i4 - 64) : new Uint8Array(0)).length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], i4 = 0; i4 < r6; i4 += 1) n4[i4 >> 2] |= t3[i4] << (i4 % 4 << 3);
4214
+ })(t3.buff, true), c5.prototype.setState.call(this, t3);
4215
+ }, c5.ArrayBuffer.prototype.destroy = c5.prototype.destroy, c5.ArrayBuffer.prototype._finish = c5.prototype._finish, c5.ArrayBuffer.hash = function(t3, i3) {
4216
+ var r5 = o3((function(t4) {
4217
+ var i4, r6, n4, o4, a4, h4, c6 = t4.length, l3 = [1732584193, -271733879, -1732584194, 271733878];
4218
+ for (i4 = 64; i4 <= c6; i4 += 64) e3(l3, s(t4.subarray(i4 - 64, i4)));
4219
+ for (r6 = (t4 = i4 - 64 < c6 ? t4.subarray(i4 - 64) : new Uint8Array(0)).length, n4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], i4 = 0; i4 < r6; i4 += 1) n4[i4 >> 2] |= t4[i4] << (i4 % 4 << 3);
4220
4220
  if (n4[i4 >> 2] |= 128 << (i4 % 4 << 3), i4 > 55) for (e3(l3, n4), i4 = 0; i4 < 16; i4 += 1) n4[i4] = 0;
4221
4221
  return o4 = (o4 = 8 * c6).toString(16).match(/(.*?)(.{0,8})$/), a4 = parseInt(o4[2], 16), h4 = parseInt(o4[1], 16) || 0, n4[14] = a4, n4[15] = h4, e3(l3, n4), l3;
4222
- })(new Uint8Array(t2)));
4222
+ })(new Uint8Array(t3)));
4223
4223
  return i3 ? h3(r5) : r5;
4224
4224
  }, c5;
4225
4225
  })();
4226
4226
  var h2 = a2.exports;
4227
4227
  var c2 = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
4228
4228
  var l = class _l {
4229
- static create(t, e3) {
4230
- new _l(t).create(e3);
4229
+ static create(t2, e3) {
4230
+ new _l(t2).create(e3);
4231
4231
  }
4232
- constructor(t) {
4233
- this.file = t, this.chunkSize = 2097152, this.chunkCount = Math.ceil(this.file.size / this.chunkSize), this.chunkIndex = 0;
4232
+ constructor(t2) {
4233
+ this.file = t2, this.chunkSize = 2097152, this.chunkCount = Math.ceil(this.file.size / this.chunkSize), this.chunkIndex = 0;
4234
4234
  }
4235
- create(t) {
4236
- this.callback = t, this.md5Buffer = new h2.ArrayBuffer(), this.fileReader = new FileReader(), this.fileReader.addEventListener("load", ((t2) => this.fileReaderDidLoad(t2))), this.fileReader.addEventListener("error", ((t2) => this.fileReaderDidError(t2))), this.readNextChunk();
4235
+ create(t2) {
4236
+ this.callback = t2, this.md5Buffer = new h2.ArrayBuffer(), this.fileReader = new FileReader(), this.fileReader.addEventListener("load", ((t3) => this.fileReaderDidLoad(t3))), this.fileReader.addEventListener("error", ((t3) => this.fileReaderDidError(t3))), this.readNextChunk();
4237
4237
  }
4238
- fileReaderDidLoad(t) {
4239
- if (this.md5Buffer.append(t.target.result), !this.readNextChunk()) {
4240
- const t2 = this.md5Buffer.end(true), e3 = btoa(t2);
4238
+ fileReaderDidLoad(t2) {
4239
+ if (this.md5Buffer.append(t2.target.result), !this.readNextChunk()) {
4240
+ const t3 = this.md5Buffer.end(true), e3 = btoa(t3);
4241
4241
  this.callback(null, e3);
4242
4242
  }
4243
4243
  }
4244
- fileReaderDidError(t) {
4244
+ fileReaderDidError(t2) {
4245
4245
  this.callback(`Error reading ${this.file.name}`);
4246
4246
  }
4247
4247
  readNextChunk() {
4248
4248
  if (this.chunkIndex < this.chunkCount || 0 == this.chunkIndex && 0 == this.chunkCount) {
4249
- const t = this.chunkIndex * this.chunkSize, e3 = Math.min(t + this.chunkSize, this.file.size), i2 = c2.call(this.file, t, e3);
4249
+ const t2 = this.chunkIndex * this.chunkSize, e3 = Math.min(t2 + this.chunkSize, this.file.size), i2 = c2.call(this.file, t2, e3);
4250
4250
  return this.fileReader.readAsArrayBuffer(i2), this.chunkIndex++, true;
4251
4251
  }
4252
4252
  return false;
4253
4253
  }
4254
4254
  };
4255
- function d(t, e3) {
4256
- return "string" == typeof t && (e3 = t, t = document), t.querySelector(e3);
4255
+ function d(t2, e3) {
4256
+ return "string" == typeof t2 && (e3 = t2, t2 = document), t2.querySelector(e3);
4257
4257
  }
4258
- function u(t, e3, i2 = {}) {
4259
- const { disabled: s } = t, { bubbles: r4, cancelable: n3, detail: o3 } = i2, a3 = document.createEvent("Event");
4258
+ function u(t2, e3, i2 = {}) {
4259
+ const { disabled: s } = t2, { bubbles: r4, cancelable: n3, detail: o3 } = i2, a3 = document.createEvent("Event");
4260
4260
  a3.initEvent(e3, r4 || true, n3 || true), a3.detail = o3 || {};
4261
4261
  try {
4262
- t.disabled = false, t.dispatchEvent(a3);
4262
+ t2.disabled = false, t2.dispatchEvent(a3);
4263
4263
  } finally {
4264
- t.disabled = s;
4264
+ t2.disabled = s;
4265
4265
  }
4266
4266
  return a3;
4267
4267
  }
4268
- function p(t) {
4269
- return Array.isArray(t) ? t : Array.from ? Array.from(t) : [].slice.call(t);
4268
+ function p(t2) {
4269
+ return Array.isArray(t2) ? t2 : Array.from ? Array.from(t2) : [].slice.call(t2);
4270
4270
  }
4271
4271
  var f = class {
4272
- constructor(t, e3, i2, s = {}) {
4273
- this.file = t, this.attributes = { filename: t.name, content_type: t.type || "application/octet-stream", byte_size: t.size, checksum: e3 }, this.xhr = new XMLHttpRequest(), this.xhr.open("POST", i2, true), this.xhr.responseType = "json", this.xhr.setRequestHeader("Content-Type", "application/json"), this.xhr.setRequestHeader("Accept", "application/json"), this.xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Object.keys(s).forEach(((t2) => {
4274
- this.xhr.setRequestHeader(t2, s[t2]);
4272
+ constructor(t2, e3, i2, s = {}) {
4273
+ this.file = t2, this.attributes = { filename: t2.name, content_type: t2.type || "application/octet-stream", byte_size: t2.size, checksum: e3 }, this.xhr = new XMLHttpRequest(), this.xhr.open("POST", i2, true), this.xhr.responseType = "json", this.xhr.setRequestHeader("Content-Type", "application/json"), this.xhr.setRequestHeader("Accept", "application/json"), this.xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Object.keys(s).forEach(((t3) => {
4274
+ this.xhr.setRequestHeader(t3, s[t3]);
4275
4275
  }));
4276
4276
  const r4 = (function() {
4277
- const t2 = d(document.head, 'meta[name="csrf-token"]');
4278
- if (t2) return t2.getAttribute("content");
4277
+ const t3 = d(document.head, 'meta[name="csrf-token"]');
4278
+ if (t3) return t3.getAttribute("content");
4279
4279
  })();
4280
- null != r4 && this.xhr.setRequestHeader("X-CSRF-Token", r4), this.xhr.addEventListener("load", ((t2) => this.requestDidLoad(t2))), this.xhr.addEventListener("error", ((t2) => this.requestDidError(t2)));
4280
+ null != r4 && this.xhr.setRequestHeader("X-CSRF-Token", r4), this.xhr.addEventListener("load", ((t3) => this.requestDidLoad(t3))), this.xhr.addEventListener("error", ((t3) => this.requestDidError(t3)));
4281
4281
  }
4282
4282
  get status() {
4283
4283
  return this.xhr.status;
4284
4284
  }
4285
4285
  get response() {
4286
- const { responseType: t, response: e3 } = this.xhr;
4287
- return "json" == t ? e3 : JSON.parse(e3);
4286
+ const { responseType: t2, response: e3 } = this.xhr;
4287
+ return "json" == t2 ? e3 : JSON.parse(e3);
4288
4288
  }
4289
- create(t) {
4290
- this.callback = t, this.xhr.send(JSON.stringify({ blob: this.attributes }));
4289
+ create(t2) {
4290
+ this.callback = t2, this.xhr.send(JSON.stringify({ blob: this.attributes }));
4291
4291
  }
4292
- requestDidLoad(t) {
4292
+ requestDidLoad(t2) {
4293
4293
  if (this.status >= 200 && this.status < 300) {
4294
- const { response: t2 } = this, { direct_upload: e3 } = t2;
4295
- delete t2.direct_upload, this.attributes = t2, this.directUploadData = e3, this.callback(null, this.toJSON());
4296
- } else this.requestDidError(t);
4294
+ const { response: t3 } = this, { direct_upload: e3 } = t3;
4295
+ delete t3.direct_upload, this.attributes = t3, this.directUploadData = e3, this.callback(null, this.toJSON());
4296
+ } else this.requestDidError(t2);
4297
4297
  }
4298
- requestDidError(t) {
4298
+ requestDidError(t2) {
4299
4299
  this.callback(`Error creating Blob for "${this.file.name}". Status: ${this.status}`);
4300
4300
  }
4301
4301
  toJSON() {
4302
- const t = {};
4303
- for (const e3 in this.attributes) t[e3] = this.attributes[e3];
4304
- return t;
4302
+ const t2 = {};
4303
+ for (const e3 in this.attributes) t2[e3] = this.attributes[e3];
4304
+ return t2;
4305
4305
  }
4306
4306
  };
4307
4307
  var m = class {
4308
- constructor(t) {
4309
- this.blob = t, this.file = t.file;
4310
- const { url: e3, headers: i2 } = t.directUploadData;
4308
+ constructor(t2) {
4309
+ this.blob = t2, this.file = t2.file;
4310
+ const { url: e3, headers: i2 } = t2.directUploadData;
4311
4311
  this.xhr = new XMLHttpRequest(), this.xhr.open("PUT", e3, true), this.xhr.responseType = "text";
4312
- for (const t2 in i2) this.xhr.setRequestHeader(t2, i2[t2]);
4313
- this.xhr.addEventListener("load", ((t2) => this.requestDidLoad(t2))), this.xhr.addEventListener("error", ((t2) => this.requestDidError(t2)));
4312
+ for (const t3 in i2) this.xhr.setRequestHeader(t3, i2[t3]);
4313
+ this.xhr.addEventListener("load", ((t3) => this.requestDidLoad(t3))), this.xhr.addEventListener("error", ((t3) => this.requestDidError(t3)));
4314
4314
  }
4315
- create(t) {
4316
- this.callback = t, this.xhr.send(this.file.slice());
4315
+ create(t2) {
4316
+ this.callback = t2, this.xhr.send(this.file.slice());
4317
4317
  }
4318
- requestDidLoad(t) {
4318
+ requestDidLoad(t2) {
4319
4319
  const { status: e3, response: i2 } = this.xhr;
4320
- e3 >= 200 && e3 < 300 ? this.callback(null, i2) : this.requestDidError(t);
4320
+ e3 >= 200 && e3 < 300 ? this.callback(null, i2) : this.requestDidError(t2);
4321
4321
  }
4322
- requestDidError(t) {
4322
+ requestDidError(t2) {
4323
4323
  this.callback(`Error storing "${this.file.name}". Status: ${this.xhr.status}`);
4324
4324
  }
4325
4325
  };
4326
4326
  var g = 0;
4327
4327
  var b = class {
4328
- constructor(t, e3, i2, s = {}) {
4329
- this.id = ++g, this.file = t, this.url = e3, this.delegate = i2, this.customHeaders = s;
4328
+ constructor(t2, e3, i2, s = {}) {
4329
+ this.id = ++g, this.file = t2, this.url = e3, this.delegate = i2, this.customHeaders = s;
4330
4330
  }
4331
- create(t) {
4331
+ create(t2) {
4332
4332
  l.create(this.file, ((e3, i2) => {
4333
- if (e3) return void t(e3);
4333
+ if (e3) return void t2(e3);
4334
4334
  const s = new f(this.file, i2, this.url, this.customHeaders);
4335
- v(this.delegate, "directUploadWillCreateBlobWithXHR", s.xhr), s.create(((e4) => {
4336
- if (e4) t(e4);
4335
+ w(this.delegate, "directUploadWillCreateBlobWithXHR", s.xhr), s.create(((e4) => {
4336
+ if (e4) t2(e4);
4337
4337
  else {
4338
4338
  const e5 = new m(s);
4339
- v(this.delegate, "directUploadWillStoreFileWithXHR", e5.xhr), e5.create(((e6) => {
4340
- e6 ? t(e6) : t(null, s.toJSON());
4339
+ w(this.delegate, "directUploadWillStoreFileWithXHR", e5.xhr), e5.create(((e6) => {
4340
+ e6 ? t2(e6) : t2(null, s.toJSON());
4341
4341
  }));
4342
4342
  }
4343
4343
  }));
4344
4344
  }));
4345
4345
  }
4346
4346
  };
4347
- function v(t, e3, ...i2) {
4348
- if (t && "function" == typeof t[e3]) return t[e3](...i2);
4347
+ function w(t2, e3, ...i2) {
4348
+ if (t2 && "function" == typeof t2[e3]) return t2[e3](...i2);
4349
4349
  }
4350
- var w = class {
4351
- constructor(t, e3) {
4352
- this.input = t, this.file = e3, this.directUpload = new b(this.file, this.url, this), this.dispatch("initialize");
4350
+ var v = class {
4351
+ constructor(t2, e3) {
4352
+ this.input = t2, this.file = e3, this.directUpload = new b(this.file, this.url, this), this.dispatch("initialize");
4353
4353
  }
4354
- start(t) {
4354
+ start(t2) {
4355
4355
  const e3 = document.createElement("input");
4356
4356
  e3.type = "hidden", e3.name = this.input.name, this.input.insertAdjacentElement("beforebegin", e3), this.dispatch("start"), this.directUpload.create(((i2, s) => {
4357
- i2 ? (e3.parentNode.removeChild(e3), this.dispatchError(i2)) : e3.value = s.signed_id, this.dispatch("end"), t(i2);
4357
+ i2 ? (e3.parentNode.removeChild(e3), this.dispatchError(i2)) : e3.value = s.signed_id, this.dispatch("end"), t2(i2);
4358
4358
  }));
4359
4359
  }
4360
- uploadRequestDidProgress(t) {
4361
- const e3 = t.loaded / t.total * 90;
4360
+ uploadRequestDidProgress(t2) {
4361
+ const e3 = t2.loaded / t2.total * 90;
4362
4362
  e3 && this.dispatch("progress", { progress: e3 });
4363
4363
  }
4364
4364
  get url() {
4365
4365
  return this.input.getAttribute("data-direct-upload-url");
4366
4366
  }
4367
- dispatch(t, e3 = {}) {
4368
- return e3.file = this.file, e3.id = this.directUpload.id, u(this.input, `direct-upload:${t}`, { detail: e3 });
4367
+ dispatch(t2, e3 = {}) {
4368
+ return e3.file = this.file, e3.id = this.directUpload.id, u(this.input, `direct-upload:${t2}`, { detail: e3 });
4369
4369
  }
4370
- dispatchError(t) {
4371
- this.dispatch("error", { error: t }).defaultPrevented || alert(t);
4370
+ dispatchError(t2) {
4371
+ this.dispatch("error", { error: t2 }).defaultPrevented || alert(t2);
4372
4372
  }
4373
- directUploadWillCreateBlobWithXHR(t) {
4374
- this.dispatch("before-blob-request", { xhr: t });
4373
+ directUploadWillCreateBlobWithXHR(t2) {
4374
+ this.dispatch("before-blob-request", { xhr: t2 });
4375
4375
  }
4376
- directUploadWillStoreFileWithXHR(t) {
4377
- this.dispatch("before-storage-request", { xhr: t }), t.upload.addEventListener("progress", ((t2) => this.uploadRequestDidProgress(t2))), t.upload.addEventListener("loadend", (() => {
4378
- this.simulateResponseProgress(t);
4376
+ directUploadWillStoreFileWithXHR(t2) {
4377
+ this.dispatch("before-storage-request", { xhr: t2 }), t2.upload.addEventListener("progress", ((t3) => this.uploadRequestDidProgress(t3))), t2.upload.addEventListener("loadend", (() => {
4378
+ this.simulateResponseProgress(t2);
4379
4379
  }));
4380
4380
  }
4381
- simulateResponseProgress(t) {
4381
+ simulateResponseProgress(t2) {
4382
4382
  let e3 = 90;
4383
4383
  const i2 = Date.now(), s = () => {
4384
4384
  const r4 = Date.now() - i2, n3 = this.estimateResponseTime(), o3 = Math.min(r4 / n3, 1);
4385
- e3 = 90 + 9 * o3, this.dispatch("progress", { progress: e3 }), t.readyState !== XMLHttpRequest.DONE && e3 < 99 && requestAnimationFrame(s);
4385
+ e3 = 90 + 9 * o3, this.dispatch("progress", { progress: e3 }), t2.readyState !== XMLHttpRequest.DONE && e3 < 99 && requestAnimationFrame(s);
4386
4386
  };
4387
- t.addEventListener("loadend", (() => {
4387
+ t2.addEventListener("loadend", (() => {
4388
4388
  this.dispatch("progress", { progress: 100 });
4389
4389
  })), requestAnimationFrame(s);
4390
4390
  }
4391
4391
  estimateResponseTime() {
4392
- const t = this.file.size, e3 = 1048576;
4393
- return t < e3 ? 1e3 : t < 10 * e3 ? 2e3 : 3e3 + t / e3 * 50;
4392
+ const t2 = this.file.size, e3 = 1048576;
4393
+ return t2 < e3 ? 1e3 : t2 < 10 * e3 ? 2e3 : 3e3 + t2 / e3 * 50;
4394
4394
  }
4395
4395
  };
4396
4396
  var y = class {
4397
- constructor(t) {
4397
+ constructor(t2) {
4398
4398
  var e3, i2;
4399
- this.form = t, this.inputs = (e3 = t, i2 = "input[type=file][data-direct-upload-url]:not([disabled])", "string" == typeof e3 && (i2 = e3, e3 = document), p(e3.querySelectorAll(i2))).filter(((t2) => t2.files.length));
4399
+ this.form = t2, this.inputs = (e3 = t2, i2 = "input[type=file][data-direct-upload-url]:not([disabled])", "string" == typeof e3 && (i2 = e3, e3 = document), p(e3.querySelectorAll(i2))).filter(((t3) => t3.files.length));
4400
4400
  }
4401
- start(t) {
4401
+ start(t2) {
4402
4402
  const e3 = this.createDirectUploadControllers(), i2 = () => {
4403
4403
  const s = e3.shift();
4404
4404
  s ? s.start(((e4) => {
4405
- e4 ? (t(e4), this.dispatch("end")) : i2();
4406
- })) : (t(), this.dispatch("end"));
4405
+ e4 ? (t2(e4), this.dispatch("end")) : i2();
4406
+ })) : (t2(), this.dispatch("end"));
4407
4407
  };
4408
4408
  this.dispatch("start"), i2();
4409
4409
  }
4410
4410
  createDirectUploadControllers() {
4411
- const t = [];
4411
+ const t2 = [];
4412
4412
  return this.inputs.forEach(((e3) => {
4413
4413
  p(e3.files).forEach(((i2) => {
4414
- const s = new w(e3, i2);
4415
- t.push(s);
4414
+ const s = new v(e3, i2);
4415
+ t2.push(s);
4416
4416
  }));
4417
- })), t;
4417
+ })), t2;
4418
4418
  }
4419
- dispatch(t, e3 = {}) {
4420
- return u(this.form, `direct-uploads:${t}`, { detail: e3 });
4419
+ dispatch(t2, e3 = {}) {
4420
+ return u(this.form, `direct-uploads:${t2}`, { detail: e3 });
4421
4421
  }
4422
4422
  };
4423
4423
  var x = "data-direct-uploads-processing";
4424
4424
  var k = /* @__PURE__ */ new WeakMap();
4425
4425
  var R = false;
4426
- function M(t) {
4427
- const e3 = t.target.closest("button, input");
4426
+ function M(t2) {
4427
+ const e3 = t2.target.closest("button, input");
4428
4428
  e3 && "submit" === e3.type && e3.form && k.set(e3.form, e3);
4429
4429
  }
4430
- function j(t) {
4431
- $(t);
4430
+ function j(t2) {
4431
+ $(t2);
4432
4432
  }
4433
- function A(t) {
4434
- "FORM" == t.target.tagName && $(t);
4433
+ function A(t2) {
4434
+ "FORM" == t2.target.tagName && $(t2);
4435
4435
  }
4436
- function $(t) {
4437
- const e3 = t.target;
4438
- if (e3.hasAttribute(x)) return void t.preventDefault();
4436
+ function $(t2) {
4437
+ const e3 = t2.target;
4438
+ if (e3.hasAttribute(x)) return void t2.preventDefault();
4439
4439
  const i2 = new y(e3), { inputs: s } = i2;
4440
- s.length && (t.preventDefault(), e3.setAttribute(x, ""), s.forEach(E), i2.start(((t2) => {
4441
- e3.removeAttribute(x), t2 ? s.forEach(U) : (function(t3) {
4442
- let e4 = k.get(t3) || d(t3, "input[type=submit], button[type=submit]");
4440
+ s.length && (t2.preventDefault(), e3.setAttribute(x, ""), s.forEach(E), i2.start(((t3) => {
4441
+ e3.removeAttribute(x), t3 ? s.forEach(U) : (function(t4) {
4442
+ let e4 = k.get(t4) || d(t4, "input[type=submit], button[type=submit]");
4443
4443
  if (e4) {
4444
- const { disabled: t4 } = e4;
4445
- e4.disabled = false, e4.focus(), e4.click(), e4.disabled = t4;
4446
- } else e4 = document.createElement("input"), e4.type = "submit", e4.style.display = "none", t3.appendChild(e4), e4.click(), t3.removeChild(e4);
4447
- k.delete(t3);
4444
+ const { disabled: t5 } = e4;
4445
+ e4.disabled = false, e4.focus(), e4.click(), e4.disabled = t5;
4446
+ } else e4 = document.createElement("input"), e4.type = "submit", e4.style.display = "none", t4.appendChild(e4), e4.click(), t4.removeChild(e4);
4447
+ k.delete(t4);
4448
4448
  })(e3);
4449
4449
  })));
4450
4450
  }
4451
- function E(t) {
4452
- t.disabled = true;
4451
+ function E(t2) {
4452
+ t2.disabled = true;
4453
4453
  }
4454
- function U(t) {
4455
- t.disabled = false;
4454
+ function U(t2) {
4455
+ t2.disabled = false;
4456
4456
  }
4457
4457
  setTimeout((function() {
4458
4458
  window.ActiveStorage && (R || (R = true, document.addEventListener("click", M, true), document.addEventListener("submit", j, true), document.addEventListener("ajax:before", A)));
@@ -4466,55 +4466,55 @@ var C = class {
4466
4466
  callback = null;
4467
4467
  cancelled = false;
4468
4468
  completed = false;
4469
- constructor(t, e3) {
4470
- this.uploadedFile = t, this.file = e3, this.directUpload = new b(this.file, this.uploadedFile.url, this);
4469
+ constructor(t2, e3) {
4470
+ this.uploadedFile = t2, this.file = e3, this.directUpload = new b(this.file, this.uploadedFile.url, this);
4471
4471
  }
4472
4472
  cancel() {
4473
4473
  this.cancelled = true, this.abortXHR(this.recordXHR), this.abortXHR(this.uploadXHR), this.complete("aborted", {});
4474
4474
  }
4475
- abortXHR(t) {
4476
- t && t.abort();
4475
+ abortXHR(t2) {
4476
+ t2 && t2.abort();
4477
4477
  }
4478
- start(t) {
4479
- this.callback = t, this.dispatch("start"), this.directUpload.create(((t2, e3) => {
4480
- this.complete(t2, e3);
4478
+ start(t2) {
4479
+ this.callback = t2, this.dispatch("start"), this.directUpload.create(((t3, e3) => {
4480
+ this.complete(t3, e3);
4481
4481
  }));
4482
4482
  }
4483
- complete(t, e3) {
4484
- this.completed || (this.completed = true, t && this.dispatchError(t), this.dispatch("end"), this.callback(t));
4483
+ complete(t2, e3) {
4484
+ this.completed || (this.completed = true, t2 && this.dispatchError(t2), this.dispatch("end"), this.callback(t2));
4485
4485
  }
4486
- uploadRequestDidProgress(t) {
4487
- const e3 = t.loaded / t.total * 100;
4486
+ uploadRequestDidProgress(t2) {
4487
+ const e3 = t2.loaded / t2.total * 100;
4488
4488
  e3 && this.dispatch("progress", { progress: e3 });
4489
4489
  }
4490
- dispatch(t, e3 = {}) {
4491
- return (function(t2, e4, i2 = {}) {
4492
- const { disabled: s } = t2, { bubbles: r4, cancelable: n3, detail: o3 } = i2, a3 = document.createEvent("Event");
4490
+ dispatch(t2, e3 = {}) {
4491
+ return (function(t3, e4, i2 = {}) {
4492
+ const { disabled: s } = t3, { bubbles: r4, cancelable: n3, detail: o3 } = i2, a3 = document.createEvent("Event");
4493
4493
  a3.initEvent(e4, r4 || true, n3 || true), a3.detail = o3 || {};
4494
4494
  try {
4495
- t2.disabled = false, t2.dispatchEvent(a3);
4495
+ t3.disabled = false, t3.dispatchEvent(a3);
4496
4496
  } finally {
4497
- t2.disabled = s;
4497
+ t3.disabled = s;
4498
4498
  }
4499
4499
  return a3;
4500
- })(this.uploadedFile, `direct-upload:${t}`, { detail: { ...e3, file: this.file, id: this.directUpload.id } });
4500
+ })(this.uploadedFile, `direct-upload:${t2}`, { detail: { ...e3, file: this.file, id: this.directUpload.id } });
4501
4501
  }
4502
- dispatchError(t) {
4503
- this.dispatch("error", { error: t });
4502
+ dispatchError(t2) {
4503
+ this.dispatch("error", { error: t2 });
4504
4504
  }
4505
- directUploadWillCreateBlobWithXHR(t) {
4506
- this.recordXHR = t, this.cancelled ? t.send = () => {
4507
- } : this.dispatch("before-blob-request", { xhr: t });
4505
+ directUploadWillCreateBlobWithXHR(t2) {
4506
+ this.recordXHR = t2, this.cancelled ? t2.send = () => {
4507
+ } : this.dispatch("before-blob-request", { xhr: t2 });
4508
4508
  }
4509
- directUploadWillStoreFileWithXHR(t) {
4510
- this.uploadXHR = t, this.cancelled ? t.send = () => {
4511
- } : (this.uploadedFile.value = this.recordXHR.response.signed_id, this.dispatch("before-storage-request", { xhr: t }), t.upload.addEventListener("progress", ((t2) => this.uploadRequestDidProgress(t2))));
4509
+ directUploadWillStoreFileWithXHR(t2) {
4510
+ this.uploadXHR = t2, this.cancelled ? t2.send = () => {
4511
+ } : (this.uploadedFile.value = this.recordXHR.response.signed_id, this.dispatch("before-storage-request", { xhr: t2 }), t2.upload.addEventListener("progress", ((t3) => this.uploadRequestDidProgress(t3))));
4512
4512
  }
4513
4513
  };
4514
4514
  var q = class {
4515
4515
  uploadedFile;
4516
- constructor(t) {
4517
- this.uploadedFile = t;
4516
+ constructor(t2) {
4517
+ this.uploadedFile = t2;
4518
4518
  }
4519
4519
  get errors() {
4520
4520
  return this.#t || (this.#t = [], this.checkValidity() || this.#t.push(this.errorMessage)), this.#t;
@@ -4526,35 +4526,35 @@ var q = class {
4526
4526
  get errorMessage() {
4527
4527
  return [`Must be smaller than ${this.formatBytes(this.uploadedFile.max)},`, `and "${this.uploadedFile.filename}" is ${this.formatBytes(this.uploadedFile.size)}.`, "Please attach a smaller file."].join(" ");
4528
4528
  }
4529
- formatBytes(t, e3 = 2) {
4530
- if (0 === t) return "0 Bytes";
4531
- const i2 = e3 < 0 ? 0 : e3, s = Math.floor(Math.log(t) / Math.log(1024));
4532
- return parseFloat((t / Math.pow(1024, s)).toFixed(i2)) + ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][s];
4529
+ formatBytes(t2, e3 = 2) {
4530
+ if (0 === t2) return "0 Bytes";
4531
+ const i2 = e3 < 0 ? 0 : e3, s = Math.floor(Math.log(t2) / Math.log(1024));
4532
+ return parseFloat((t2 / Math.pow(1024, s)).toFixed(i2)) + ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][s];
4533
4533
  }
4534
4534
  };
4535
4535
  var B = class {
4536
4536
  uploadedFile;
4537
- constructor(t) {
4538
- this.uploadedFile = t;
4537
+ constructor(t2) {
4538
+ this.uploadedFile = t2;
4539
4539
  }
4540
4540
  get errors() {
4541
4541
  if (this.#t) return this.#t;
4542
4542
  this.#t = [];
4543
- const t = this.uploadedFile.accepts ? this.uploadedFile.accepts.split(/,\s*/) : [];
4544
- return t.length > 0 && !t.includes(this.uploadedFile.filetype) && this.#t.push(`Must be a ${this.joinWords(t)}.`), this.#t;
4543
+ const t2 = this.uploadedFile.accepts ? this.uploadedFile.accepts.split(/,\s*/) : [];
4544
+ return t2.length > 0 && !t2.includes(this.uploadedFile.filetype) && this.#t.push(`Must be a ${this.joinWords(t2)}.`), this.#t;
4545
4545
  }
4546
4546
  #t;
4547
- joinWords(t) {
4548
- return t.length >= 3 ? (t.slice(0, -1) + [`or ${t.at(-1)}`]).join(", ") : t.join(" or ");
4547
+ joinWords(t2) {
4548
+ return t2.length >= 3 ? (t2.slice(0, -1) + [`or ${t2.at(-1)}`]).join(", ") : t2.join(" or ");
4549
4549
  }
4550
4550
  };
4551
- var F = { image: ["ase", "art", "bmp", "blp", "cd5", "cit", "cpt", "cr2", "cut", "dds", "dib", "djvu", "egt", "exif", "gif", "gpl", "grf", "icns", "ico", "iff", "jng", "jpeg", "jpg", "jfif", "jp2", "jps", "lbm", "max", "miff", "mng", "msp", "nef", "nitf", "ota", "pbm", "pc1", "pc2", "pc3", "pcf", "pcx", "pdn", "pgm", "PI1", "PI2", "PI3", "pict", "pct", "pnm", "pns", "ppm", "psb", "psd", "pdd", "psp", "px", "pxm", "pxr", "qfx", "raw", "rle", "sct", "sgi", "rgb", "int", "bw", "tga", "tiff", "tif", "vtf", "xbm", "xcf", "xpm", "3dv", "amf", "ai", "awg", "cgm", "cdr", "cmx", "dxf", "e2d", "egt", "eps", "fs", "gbr", "odg", "svg", "stl", "vrml", "x3d", "sxd", "v2d", "vnd", "wmf", "emf", "art", "xar", "png", "webp", "jxr", "hdp", "wdp", "cur", "ecw", "iff", "lbm", "liff", "nrrd", "pam", "pcx", "pgf", "sgi", "rgb", "rgba", "bw", "int", "inta", "sid", "ras", "sun", "tga", "heic", "heif"], video: ["3g2", "3gp", "3gpp", "aaf", "asf", "avchd", "avi", "drc", "flv", "m2v", "m3u8", "m4p", "m4v", "mkv", "mng", "mov", "mp2", "mp4", "mpe", "mpeg", "mpg", "mpv", "mxf", "nsv", "ogg", "ogv", "qt", "rm", "rmvb", "roq", "svi", "vob", "webm", "wmv", "yuv"], pdf: ["pdf"], getFileType: function(t) {
4552
- const e3 = t.toString().split(".").at(-1).toLowerCase().trim();
4551
+ var F = { image: ["ase", "art", "bmp", "blp", "cd5", "cit", "cpt", "cr2", "cut", "dds", "dib", "djvu", "egt", "exif", "gif", "gpl", "grf", "icns", "ico", "iff", "jng", "jpeg", "jpg", "jfif", "jp2", "jps", "lbm", "max", "miff", "mng", "msp", "nef", "nitf", "ota", "pbm", "pc1", "pc2", "pc3", "pcf", "pcx", "pdn", "pgm", "PI1", "PI2", "PI3", "pict", "pct", "pnm", "pns", "ppm", "psb", "psd", "pdd", "psp", "px", "pxm", "pxr", "qfx", "raw", "rle", "sct", "sgi", "rgb", "int", "bw", "tga", "tiff", "tif", "vtf", "xbm", "xcf", "xpm", "3dv", "amf", "ai", "awg", "cgm", "cdr", "cmx", "dxf", "e2d", "egt", "eps", "fs", "gbr", "odg", "svg", "stl", "vrml", "x3d", "sxd", "v2d", "vnd", "wmf", "emf", "art", "xar", "png", "webp", "jxr", "hdp", "wdp", "cur", "ecw", "iff", "lbm", "liff", "nrrd", "pam", "pcx", "pgf", "sgi", "rgb", "rgba", "bw", "int", "inta", "sid", "ras", "sun", "tga", "heic", "heif"], video: ["3g2", "3gp", "3gpp", "aaf", "asf", "avchd", "avi", "drc", "flv", "m2v", "m3u8", "m4p", "m4v", "mkv", "mng", "mov", "mp2", "mp4", "mpe", "mpeg", "mpg", "mpv", "mxf", "nsv", "ogg", "ogv", "qt", "rm", "rmvb", "roq", "svi", "vob", "webm", "wmv", "yuv"], pdf: ["pdf"], getFileType: function(t2) {
4552
+ const e3 = t2.toString().split(".").at(-1).toLowerCase().trim();
4553
4553
  return this.video.includes(e3) ? "video" : this.image.includes(e3) ? "image" : this.pdf.includes(e3) ? "pdf" : "unknown";
4554
4554
  } };
4555
4555
  var S = class {
4556
- constructor(t) {
4557
- this.response = t;
4556
+ constructor(t2) {
4557
+ this.response = t2;
4558
4558
  }
4559
4559
  get statusCode() {
4560
4560
  return this.response.status;
@@ -4598,8 +4598,8 @@ var S = class {
4598
4598
  }
4599
4599
  };
4600
4600
  var T = class {
4601
- static register(t) {
4602
- this.interceptor = t;
4601
+ static register(t2) {
4602
+ this.interceptor = t2;
4603
4603
  }
4604
4604
  static get() {
4605
4605
  return this.interceptor;
@@ -4608,47 +4608,47 @@ var T = class {
4608
4608
  this.interceptor = void 0;
4609
4609
  }
4610
4610
  };
4611
- function W(t) {
4612
- const e3 = document.head.querySelector(`meta[name="${t}"]`);
4611
+ function W(t2) {
4612
+ const e3 = document.head.querySelector(`meta[name="${t2}"]`);
4613
4613
  return e3 && e3.content;
4614
4614
  }
4615
4615
  var X = class {
4616
- constructor(t, e3, i2 = {}) {
4617
- this.method = t, this.options = i2, this.originalUrl = e3.toString();
4616
+ constructor(t2, e3, i2 = {}) {
4617
+ this.method = t2, this.options = i2, this.originalUrl = e3.toString();
4618
4618
  }
4619
4619
  async perform() {
4620
4620
  try {
4621
- const t2 = T.get();
4622
- t2 && await t2(this);
4623
- } catch (t2) {
4624
- console.error(t2);
4621
+ const t3 = T.get();
4622
+ t3 && await t3(this);
4623
+ } catch (t3) {
4624
+ console.error(t3);
4625
4625
  }
4626
- const t = new S(await window.fetch(this.url, this.fetchOptions));
4627
- return t.unauthenticated && t.authenticationURL ? Promise.reject(window.location.href = t.authenticationURL) : (t.ok && t.isTurboStream && await t.renderTurboStream(), t);
4626
+ const t2 = new S(await window.fetch(this.url, this.fetchOptions));
4627
+ return t2.unauthenticated && t2.authenticationURL ? Promise.reject(window.location.href = t2.authenticationURL) : (t2.ok && t2.isTurboStream && await t2.renderTurboStream(), t2);
4628
4628
  }
4629
- addHeader(t, e3) {
4629
+ addHeader(t2, e3) {
4630
4630
  const i2 = this.additionalHeaders;
4631
- i2[t] = e3, this.options.headers = i2;
4631
+ i2[t2] = e3, this.options.headers = i2;
4632
4632
  }
4633
4633
  get fetchOptions() {
4634
4634
  return { method: this.method.toUpperCase(), headers: this.headers, body: this.formattedBody, signal: this.signal, credentials: "same-origin", redirect: this.redirect };
4635
4635
  }
4636
4636
  get headers() {
4637
- return (function(t) {
4637
+ return (function(t2) {
4638
4638
  const e3 = {};
4639
- for (const i2 in t) {
4640
- const s = t[i2];
4639
+ for (const i2 in t2) {
4640
+ const s = t2[i2];
4641
4641
  void 0 !== s && (e3[i2] = s);
4642
4642
  }
4643
4643
  return e3;
4644
4644
  })(Object.assign({ "X-Requested-With": "XMLHttpRequest", "X-CSRF-Token": this.csrfToken, "Content-Type": this.contentType, Accept: this.accept }, this.additionalHeaders));
4645
4645
  }
4646
4646
  get csrfToken() {
4647
- return (function(t) {
4648
- const e3 = document.cookie ? document.cookie.split("; ") : [], i2 = `${encodeURIComponent(t)}=`, s = e3.find(((t2) => t2.startsWith(i2)));
4647
+ return (function(t2) {
4648
+ const e3 = document.cookie ? document.cookie.split("; ") : [], i2 = `${encodeURIComponent(t2)}=`, s = e3.find(((t3) => t3.startsWith(i2)));
4649
4649
  if (s) {
4650
- const t2 = s.split("=").slice(1).join("=");
4651
- if (t2) return decodeURIComponent(t2);
4650
+ const t3 = s.split("=").slice(1).join("=");
4651
+ if (t3) return decodeURIComponent(t3);
4652
4652
  }
4653
4653
  })(W("csrf-param")) || W("csrf-token");
4654
4654
  }
@@ -4671,11 +4671,11 @@ var X = class {
4671
4671
  return this.options.body;
4672
4672
  }
4673
4673
  get query() {
4674
- const t = (this.originalUrl.split("?")[1] || "").split("#")[0], e3 = new URLSearchParams(t);
4674
+ const t2 = (this.originalUrl.split("?")[1] || "").split("#")[0], e3 = new URLSearchParams(t2);
4675
4675
  let i2 = this.options.query;
4676
4676
  var s;
4677
- i2 instanceof window.FormData ? (s = i2, i2 = [...s].reduce(((t2, [e4, i3]) => t2.concat("string" == typeof i3 ? [[e4, i3]] : [])), [])) : i2 = i2 instanceof window.URLSearchParams ? i2.entries() : Object.entries(i2 || {}), (function(t2, e4) {
4678
- for (const [i3, s2] of e4) s2 instanceof window.File || (t2.has(i3) ? (t2.delete(i3), t2.set(i3, s2)) : t2.append(i3, s2));
4677
+ i2 instanceof window.FormData ? (s = i2, i2 = [...s].reduce(((t3, [e4, i3]) => t3.concat("string" == typeof i3 ? [[e4, i3]] : [])), [])) : i2 = i2 instanceof window.URLSearchParams ? i2.entries() : Object.entries(i2 || {}), (function(t3, e4) {
4678
+ for (const [i3, s2] of e4) s2 instanceof window.File || (t3.has(i3) ? (t3.delete(i3), t3.set(i3, s2)) : t3.append(i3, s2));
4679
4679
  })(e3, i2);
4680
4680
  const r4 = e3.toString();
4681
4681
  return r4.length > 0 ? `?${r4}` : "";
@@ -4696,13 +4696,13 @@ var X = class {
4696
4696
  return this.options.headers || {};
4697
4697
  }
4698
4698
  get formattedBody() {
4699
- const t = "[object String]" === Object.prototype.toString.call(this.body);
4700
- return "application/json" !== this.headers["Content-Type"] || t ? this.body : JSON.stringify(this.body);
4699
+ const t2 = "[object String]" === Object.prototype.toString.call(this.body);
4700
+ return "application/json" !== this.headers["Content-Type"] || t2 ? this.body : JSON.stringify(this.body);
4701
4701
  }
4702
4702
  };
4703
4703
  var H2 = proxyCustomElement(class extends H {
4704
- constructor(t) {
4705
- super(), false !== t && this.__registerHost(), this.__attachShadow(), this.removeEvent = createEvent(this, "attachment-file:remove", 7), this.validationEvent = createEvent(this, "attachment-file:validation", 7), this.readyEvent = createEvent(this, "attachment-file:ready", 7);
4704
+ constructor(t2) {
4705
+ super(), false !== t2 && this.__registerHost(), this.__attachShadow(), this.removeEvent = createEvent(this, "attachment-file:remove", 7), this.validationEvent = createEvent(this, "attachment-file:validation", 7), this.readyEvent = createEvent(this, "attachment-file:ready", 7);
4706
4706
  }
4707
4707
  get el() {
4708
4708
  return this;
@@ -4714,6 +4714,8 @@ var H2 = proxyCustomElement(class extends H {
4714
4714
  value = "";
4715
4715
  filename;
4716
4716
  src;
4717
+ href;
4718
+ download;
4717
4719
  filetype;
4718
4720
  size;
4719
4721
  state = "complete";
@@ -4723,11 +4725,11 @@ var H2 = proxyCustomElement(class extends H {
4723
4725
  removeEvent;
4724
4726
  validationEvent;
4725
4727
  readyEvent;
4726
- removeClicked = (t) => {
4727
- t.stopPropagation(), t.preventDefault(), this.controller?.cancel(), this.removeEvent.emit(this);
4728
+ removeClicked = (t2) => {
4729
+ t2.stopPropagation(), t2.preventDefault(), this.controller?.cancel(), this.removeEvent.emit(this);
4728
4730
  };
4729
- retryClicked = (t) => {
4730
- t.stopPropagation(), t.preventDefault(), this.state = "pending", this.percent = 0, this.validationError = "", this.uploadError = "", this.controller = new C(this.el, this._file), this.controller.dispatch("initialize", { controller: this.controller });
4731
+ retryClicked = (t2) => {
4732
+ t2.stopPropagation(), t2.preventDefault(), this.state = "pending", this.percent = 0, this.validationError = "", this.uploadError = "", this.controller = new C(this.el, this._file), this.controller.dispatch("initialize", { controller: this.controller });
4731
4733
  };
4732
4734
  controller;
4733
4735
  _file;
@@ -4739,41 +4741,41 @@ var H2 = proxyCustomElement(class extends H {
4739
4741
  get file() {
4740
4742
  return this._file;
4741
4743
  }
4742
- set file(t) {
4743
- this.src = URL.createObjectURL(t), this.filename = t.name, this.size = t.size, this.state = "pending", this.percent = 0, this._file = t;
4744
+ set file(t2) {
4745
+ this.src = URL.createObjectURL(t2), this.filename = t2.name, this.size = t2.size, this.state = "pending", this.percent = 0, this._file = t2;
4744
4746
  }
4745
- set signedId(t) {
4746
- this.value !== t && ((t2, e3 = {}, i2 = {}) => ((t3, e4, i3, s) => new X("get", e4, { headers: { Accept: "application/json", ...s }, query: i3 }).perform().then(((t4) => t4.response.ok ? t4.json : t4)))(0, t2, e3, i2))(`/rails/active_storage/blobs/info/${t}`).then(((e3) => {
4747
- this.src = `/rails/active_storage/blobs/redirect/${t}/${e3.filename}`, this.filename = e3.filename, this.size = e3.byte_size, this.state = "complete", this.percent = 100, this.value = t, this.readyEvent.emit(this);
4747
+ set signedId(t2) {
4748
+ this.value !== t2 && ((t3, e3 = {}, i2 = {}) => ((t4, e4, i3, s) => new X("get", e4, { headers: { Accept: "application/json", ...s }, query: i3 }).perform().then(((t5) => t5.response.ok ? t5.json : t5)))(0, t3, e3, i2))(`/rails/active_storage/blobs/info/${t2}`).then(((e3) => {
4749
+ this.src = `/rails/active_storage/blobs/redirect/${t2}/${e3.filename}`, this.filename = e3.filename, this.size = e3.byte_size, this.state = "complete", this.percent = 100, this.value = t2, this.readyEvent.emit(this);
4748
4750
  }));
4749
4751
  }
4750
- setMissingFiletype(t, e3) {
4752
+ setMissingFiletype(t2, e3) {
4751
4753
  !this.filetype && this.filename && (this.filetype = F.getFileType(this.filename));
4752
4754
  }
4753
- start(t) {
4755
+ start(t2) {
4754
4756
  this.state = "pending", this.percent = 0;
4755
4757
  }
4756
- progress(t) {
4757
- const { progress: e3 } = t.detail;
4758
+ progress(t2) {
4759
+ const { progress: e3 } = t2.detail;
4758
4760
  this.percent = e3;
4759
4761
  }
4760
- error(t) {
4761
- t.preventDefault();
4762
- const { error: e3 } = t.detail;
4762
+ error(t2) {
4763
+ t2.preventDefault();
4764
+ const { error: e3 } = t2.detail;
4763
4765
  this.state = "error", this.uploadError = e3;
4764
4766
  }
4765
- end(t) {
4767
+ end(t2) {
4766
4768
  "error" !== this.state && (this.state = "complete", this.percent = 100);
4767
4769
  }
4768
4770
  render() {
4769
- return h(Host, { key: "1af2d43e01a8714c658ea70a9ca68cce57bbda12" }, h("slot", { key: "deadfff4a159e17d52ed8f66d5d18aecc71fb44d" }), h("figure", { key: "7319a724f2d51c396734dacd7528b1864fb8e980" }, h("div", { key: "ce0794f4062073a8fc28e4f2398a91d711f00521", class: "progress-details" }, h("progress-bar", { key: "7317e5149cbc15dd1bff84b9c8ea92d55a29fe3f", percent: this.percent, class: this.state, error: "error" === this.state }, h("a", { key: "638de84fd46da31a7ad9b652f0dd1d71fdb87edb", class: "download-link", href: this.src, download: this.filename, onClick: (t) => t.stopPropagation() }, this.filename)), h("span", { key: "fe8b77d5cd5b9014caa92abe34c515a5b16dbe86", class: "progress-icon" }), h("a", { key: "b8b2fde12f9ecf1df5a044a812be4b43ee24502c", class: "remove-media", onClick: this.removeClicked, href: "#" }, h("span", { key: "7ce869972ee400de34bd3462f0656263f0ddc013" }, "Remove media")), this.uploadError && this._file ? h("a", { class: "retry-media", onClick: this.retryClicked, href: "#" }, h("span", null, "Retry upload")) : ""), this.validationError || this.uploadError ? h("p", { class: "validation-error" }, this.validationError || this.uploadError) : "", this.preview ? h("attachment-preview", { src: this.src, filetype: this.filetype }) : ""));
4771
+ return h(Host, { key: "8468877f30120b32201867ab5466d4d0fed5e514" }, h("slot", { key: "f44af091a15ff9ae425a61b708c5ea64a19a5057" }), h("figure", { key: "c629a6dece58606c37979d8d21cfe37d2312511e" }, h("div", { key: "87b9629c3133c7050cf84ec6a8824a68dadb81d0", class: "progress-details" }, h("progress-bar", { key: "63238eeda3adb36ce17a355d4cb2db0dbf45f0df", percent: this.percent, class: this.state, error: "error" === this.state }, h("a", { key: "dacdd7679ee07177fc5a18dcca018dcb6b32406e", class: "download-link", href: this.href || this.src, download: this.download || this.filename, onClick: (t2) => t2.stopPropagation() }, this.filename)), h("span", { key: "5618922137596fc76b569ac876064a0444d8d73a", class: "progress-icon" }), h("a", { key: "6ac34bc373c61db029a1e0101ea2219846e960fd", class: "remove-media", onClick: this.removeClicked, href: "#" }, h("span", { key: "ef9f0d6e8ba6fab4d876cd788e75a34ada1fe572" }, "Remove media")), this.uploadError && this._file ? h("a", { class: "retry-media", onClick: this.retryClicked, href: "#" }, h("span", null, "Retry upload")) : ""), this.validationError || this.uploadError ? h("p", { class: "validation-error" }, this.validationError || this.uploadError) : "", this.preview ? h("attachment-preview", { src: this.src, filetype: this.filetype }) : ""));
4770
4772
  }
4771
4773
  componentDidLoad() {
4772
4774
  "pending" == this.state && this._file && (this.checkValidity() ? (this.controller = new C(this.el, this._file), this.controller.dispatch("initialize", { controller: this.controller })) : this.state = "error");
4773
4775
  }
4774
4776
  checkValidity() {
4775
- let t = [];
4776
- return t.push(...new B(this).errors), t.push(...new q(this).errors), this.validationError = t.join(" "), this.validationEvent.emit({ valid: 0 === t.length, error: this.validationError }), 0 === t.length;
4777
+ let t2 = [];
4778
+ return t2.push(...new B(this).errors), t2.push(...new q(this).errors), this.validationError = t2.join(" "), this.validationEvent.emit({ valid: 0 === t2.length, error: this.validationError }), 0 === t2.length;
4777
4779
  }
4778
4780
  static get watchers() {
4779
4781
  return { filename: [{ setMissingFiletype: 0 }] };
@@ -4781,7 +4783,7 @@ var H2 = proxyCustomElement(class extends H {
4781
4783
  static get style() {
4782
4784
  return `:host{display:block;width:100%;max-width:100%;font-size:13px}figure{margin:0}.progress-details{position:relative;display:flex;align-items:center}progress-bar{flex:1 0}progress-bar.pending{opacity:0.5}progress-bar.complete{opacity:0.8}progress-bar:not(.complete)+.progress-icon{display:none}progress-bar.complete+.progress-icon{content:url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"><g><path d="M6.3,9.1c0.2,0,0.5,0.1,0.7,0.4c0.5,0.5,1,1,1.4,1.4c0.3,0.3,0.3,0.3,0.6,0c1.4-1.3,2.7-2.6,4-3.9c0.3-0.3,0.6-0.4,1-0.4 c0.5,0.1,0.9,0.6,0.7,1.1c-0.1,0.2-0.2,0.4-0.3,0.6c-1.6,1.6-3.2,3.2-4.8,4.8c-0.5,0.5-1,0.5-1.6,0c-0.8-0.7-1.5-1.5-2.3-2.3 c-0.3-0.3-0.5-0.6-0.3-1.1C5.5,9.3,5.8,9.1,6.3,9.1z"/></g></svg>');filter:invert(100%)}.progress-icon{display:inline-block;flex:0 0 20px;width:28px;height:28px;background-size:contain;position:absolute;right:30px;z-index:1}progress-bar.error{background:var(--input-attachment-error-bg, rgba(74, 70, 70, 0.25));opacity:1}.progress-bar a{color:#fff}.download-link{padding-right:20px;color:#fff}.remove-media{display:inline-block;content:url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve"><g><path d="M0,19.9C0.2,8.5,9.2-0.1,20.1,0C31.8,0.1,40.2,9.5,40,20.4c-0.2,11-8.9,19.7-20.1,19.6C8,39.9,0,30.5,0,19.9z M20,3.7 c-9,0-16.3,7-16.3,16.2C3.7,29,10.9,36.3,20,36.3c9,0,16.3-7.1,16.4-16.3C36.3,11,29.2,3.8,20,3.7z"/><path d="M17.3,20c-0.2-0.2-0.3-0.4-0.5-0.6c-1-1-2-1.9-2.9-2.9c-0.5-0.5-0.8-1.1-0.7-1.9c0.1-0.7,0.5-1.2,1.2-1.4 c0.8-0.2,1.5,0,2.1,0.6c1,1,2,2,3,3.1c0.3,0.4,0.6,0.3,0.9,0c1-1,2-2,3-3c0.3-0.3,0.7-0.5,1.1-0.6c0.8-0.2,1.6,0.1,2,0.8 c0.4,0.8,0.3,1.7-0.4,2.4c-1,1-2,2-3,3c-0.2,0.2-0.3,0.4-0.5,0.6c1.2,1.2,2.3,2.3,3.4,3.4c0.6,0.6,0.9,1.3,0.6,2.2 c-0.4,1.1-1.7,1.6-2.6,1c-0.3-0.2-0.5-0.4-0.8-0.6c-1-1-1.9-1.9-2.9-2.9c-0.3-0.3-0.5-0.3-0.9,0c-1,1-2,2.1-3,3 c-0.4,0.4-1,0.6-1.5,0.8c-0.6,0.1-1.2-0.2-1.5-0.8c-0.4-0.6-0.5-1.3-0.1-1.9c0.2-0.3,0.4-0.5,0.6-0.7C15.1,22.3,16.2,21.2,17.3,20z "/></g></svg>');flex:0 0 25px;width:25px;height:20px;align-items:center;opacity:0.25}.remove-media:hover{opacity:1;filter:invert(50%)sepia(100%)saturate(10000%)}.remove-media span{display:inline-block;text-indent:-9999px;color:transparent}.retry-media{color:var(--input-attachment-error-color, #c00);font-size:12px;text-decoration:underline;cursor:pointer;padding-left:8px}.retry-media:hover{color:var(--input-attachment-error-color-hover, #900)}.validation-error{color:var(--input-attachment-error-color, #c00);font-size:12px;margin:4px 0 0 10px}`;
4783
4785
  }
4784
- }, [769, "attachment-file", { name: [1537], accepts: [1537], max: [1538], url: [1537], value: [1537], filename: [1537], src: [1537], filetype: [1537], size: [1538], state: [1537], percent: [1538], preview: [1540], validationMessage: [1, "validation-message"] }, [[0, "direct-upload:initialize", "start"], [0, "direct-upload:start", "start"], [0, "direct-upload:progress", "progress"], [0, "direct-upload:error", "error"], [0, "direct-upload:end", "end"]], { filename: [{ setMissingFiletype: 0 }] }]);
4786
+ }, [769, "attachment-file", { name: [1537], accepts: [1537], max: [1538], url: [1537], value: [1537], filename: [1537], src: [1537], href: [1537], download: [1537], filetype: [1537], size: [1538], state: [1537], percent: [1538], preview: [1540], validationMessage: [1, "validation-message"] }, [[0, "direct-upload:initialize", "start"], [0, "direct-upload:start", "start"], [0, "direct-upload:progress", "progress"], [0, "direct-upload:error", "error"], [0, "direct-upload:end", "end"]], { filename: [{ setMissingFiletype: 0 }] }]);
4785
4787
 
4786
4788
  // dist/components/attachment-file.js
4787
4789
  var o = H2;
@@ -4790,30 +4792,45 @@ var o = H2;
4790
4792
  var e = a;
4791
4793
 
4792
4794
  // dist/components/index2.js
4793
- var n2 = null;
4794
- function r(n3) {
4795
- const r4 = Number(n3);
4796
- if (Number.isNaN(r4)) throw new TypeError(`progress-bar: percent must be numeric, got ${JSON.stringify(n3)}`);
4797
- return Math.min(100, Math.max(0, r4));
4795
+ var r = null;
4796
+ function n2(r4) {
4797
+ const n3 = Number(r4);
4798
+ if (Number.isNaN(n3)) throw new TypeError(`progress-bar: percent must be numeric, got ${JSON.stringify(r4)}`);
4799
+ return Math.min(100, Math.max(0, n3));
4798
4800
  }
4799
- var e2 = class extends HTMLElement {
4801
+ function e2(r4) {
4802
+ const n3 = Number(r4);
4803
+ if (Number.isNaN(n3)) throw new TypeError(`progress-bar: rate must be numeric, got ${JSON.stringify(r4)}`);
4804
+ return n3;
4805
+ }
4806
+ var t = class extends HTMLElement {
4800
4807
  constructor() {
4801
- super(), this.attachShadow({ mode: "open" }), this._percent = null, this._renderedMode = null;
4808
+ super(), this.attachShadow({ mode: "open" }), this._percent = null, this._renderedMode = null, this._rateTimer = null;
4802
4809
  }
4803
4810
  connectedCallback() {
4804
- this.render(), this.setAttribute("role", "progressbar"), this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", "100"), this.updateBar();
4811
+ this.render(), this.setAttribute("role", "progressbar"), this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", "100"), this.updateBar(), this._syncTicker();
4812
+ }
4813
+ disconnectedCallback() {
4814
+ this._stopTicker();
4805
4815
  }
4806
4816
  get percent() {
4807
4817
  return this._percent;
4808
4818
  }
4809
- set percent(n3) {
4810
- null == n3 ? this.removeAttribute("percent") : this.setAttribute("percent", r(n3));
4819
+ set percent(r4) {
4820
+ null == r4 ? this.removeAttribute("percent") : this.setAttribute("percent", n2(r4));
4811
4821
  }
4812
4822
  get error() {
4813
4823
  return this.hasAttribute("error");
4814
4824
  }
4815
- set error(n3) {
4816
- this.toggleAttribute("error", Boolean(n3));
4825
+ set error(r4) {
4826
+ this.toggleAttribute("error", Boolean(r4));
4827
+ }
4828
+ get rate() {
4829
+ const r4 = this.getAttribute("rate");
4830
+ return null === r4 ? null : Number(r4);
4831
+ }
4832
+ set rate(r4) {
4833
+ null == r4 ? this.removeAttribute("rate") : this.setAttribute("rate", e2(r4));
4817
4834
  }
4818
4835
  get indeterminate() {
4819
4836
  return !this.hasAttribute("percent");
@@ -4821,28 +4838,39 @@ var e2 = class extends HTMLElement {
4821
4838
  get mode() {
4822
4839
  return "circular" === this.getAttribute("mode") ? "circular" : "linear";
4823
4840
  }
4824
- set mode(n3) {
4825
- this.setAttribute("mode", n3);
4841
+ set mode(r4) {
4842
+ this.setAttribute("mode", r4);
4826
4843
  }
4827
4844
  static get observedAttributes() {
4828
- return ["percent", "mode"];
4845
+ return ["percent", "mode", "rate"];
4829
4846
  }
4830
- attributeChangedCallback(n3, e3, t) {
4831
- "percent" === n3 && (this._percent = null === t ? null : r(t)), "mode" === n3 && this.render(), this.updateBar();
4847
+ attributeChangedCallback(r4, t2, i2) {
4848
+ "percent" === r4 && (this._percent = null === i2 ? null : n2(i2)), "rate" === r4 && null !== i2 && e2(i2), "mode" === r4 && this.render(), "percent" !== r4 && "rate" !== r4 || this._syncTicker(), this.updateBar();
4832
4849
  }
4833
4850
  updateBar() {
4834
4851
  if ("circular" === this.mode) {
4835
- const n3 = this.shadowRoot?.querySelector(".progress-ring");
4836
- n3 && (n3.style.strokeDashoffset = this.indeterminate ? "" : String(100 * (1 - this._percent / 100)));
4852
+ const r4 = this.shadowRoot?.querySelector(".progress-ring");
4853
+ r4 && (r4.style.strokeDashoffset = this.indeterminate ? "" : String(100 * (1 - this._percent / 100)));
4837
4854
  } else {
4838
- const n3 = this.shadowRoot?.querySelector(".bar");
4839
- n3 && (n3.style.width = this.indeterminate ? "" : `${this._percent}%`);
4855
+ const r4 = this.shadowRoot?.querySelector(".bar");
4856
+ r4 && (r4.style.width = this.indeterminate ? "" : `${this._percent}%`);
4840
4857
  }
4841
4858
  this.indeterminate ? this.removeAttribute("aria-valuenow") : this.setAttribute("aria-valuenow", String(this._percent));
4842
4859
  }
4860
+ _syncTicker() {
4861
+ const r4 = Number(this.getAttribute("rate")), n3 = this.isConnected && !this.indeterminate && Number.isFinite(r4) && 0 !== r4;
4862
+ n3 && null === this._rateTimer ? this._rateTimer = setInterval((() => this._tick()), 1e3 / 30) : n3 || this._stopTicker();
4863
+ }
4864
+ _stopTicker() {
4865
+ null !== this._rateTimer && (clearInterval(this._rateTimer), this._rateTimer = null);
4866
+ }
4867
+ _tick() {
4868
+ const r4 = Number(this.getAttribute("rate")), e3 = n2(this._percent + r4 / 30);
4869
+ e3 !== this._percent && (this.percent = e3), 0 !== e3 && 100 !== e3 || this.removeAttribute("rate");
4870
+ }
4843
4871
  render() {
4844
- const r4 = this.mode;
4845
- this._renderedMode !== r4 && (this._renderedMode = r4, this.shadowRoot.adoptedStyleSheets = [(n2 || (n2 = new CSSStyleSheet(), n2.replaceSync(`
4872
+ const n3 = this.mode;
4873
+ this._renderedMode !== n3 && (this._renderedMode = n3, this.shadowRoot.adoptedStyleSheets = [(r || (r = new CSSStyleSheet(), r.replaceSync(`
4846
4874
  :host {
4847
4875
  --progress-color: #2E7D32;
4848
4876
  --error-color: #7a242f;
@@ -4984,39 +5012,39 @@ var e2 = class extends HTMLElement {
4984
5012
  :host([error]) .progress-ring { display: none; }
4985
5013
  :host([error]) .ring { animation: none; }
4986
5014
  :host([error]) .error-mark { display: block; }
4987
- `)), n2)], this.shadowRoot.innerHTML = "circular" === r4 ? '\n <div class="circular">\n <svg class="ring" viewBox="0 0 100 100">\n <circle class="track" cx="50" cy="50" r="40"></circle>\n <circle class="progress-ring" cx="50" cy="50" r="40" pathLength="100"></circle>\n <path class="error-mark" d="M37 37 L63 63 M63 37 L37 63"></path>\n </svg>\n <span class="label"><slot></slot></span>\n </div>\n' : '\n <div class="bar"></div>\n <div class="text"><slot></slot></div>\n');
5015
+ `)), r)], this.shadowRoot.innerHTML = "circular" === n3 ? '\n <div class="circular">\n <svg class="ring" viewBox="0 0 100 100">\n <circle class="track" cx="50" cy="50" r="40"></circle>\n <circle class="progress-ring" cx="50" cy="50" r="40" pathLength="100"></circle>\n <path class="error-mark" d="M37 37 L63 63 M63 37 L37 63"></path>\n </svg>\n <span class="label"><slot></slot></span>\n </div>\n' : '\n <div class="bar"></div>\n <div class="text"><slot></slot></div>\n');
4988
5016
  }
4989
5017
  };
4990
- customElements.get("progress-bar") || customElements.define("progress-bar", e2);
5018
+ customElements.get("progress-bar") || customElements.define("progress-bar", t);
4991
5019
 
4992
5020
  // dist/components/input-attachment.js
4993
5021
  var o2 = class _o {
4994
- static instance(t, e3 = {}) {
4995
- return t.inputAttachmentFormController ||= new _o(t, e3);
5022
+ static instance(t2, e3 = {}) {
5023
+ return t2.inputAttachmentFormController ||= new _o(t2, e3);
4996
5024
  }
4997
5025
  dialog;
4998
5026
  element;
4999
5027
  controllers;
5000
5028
  submitted;
5001
5029
  processing;
5002
- constructor(t, { uploadDialog: e3 = true } = {}) {
5003
- this.element = t, this.controllers = [], this.submitted = false, this.processing = false, e3 && (this.dialog = document.createElement("upload-dialog"), this.dialog.id = "form-controller-dialog", this.element.appendChild(this.dialog)), this.element.addEventListener("submit", ((t2) => this.submit(t2))), window.addEventListener("beforeunload", ((t2) => this.beforeUnload(t2))), this.element.addEventListener("direct-upload:initialize", ((t2) => this.init(t2))), this.element.addEventListener("direct-upload:start", ((t2) => this.start(t2))), this.element.addEventListener("direct-upload:progress", ((t2) => this.progress(t2))), this.element.addEventListener("direct-upload:error", ((t2) => this.error(t2))), this.element.addEventListener("direct-upload:end", ((t2) => this.end(t2))), this.element.addEventListener("attachment-file:remove", ((t2) => this.removeUploadedFile(t2)));
5030
+ constructor(t2, { uploadDialog: e3 = true } = {}) {
5031
+ this.element = t2, this.controllers = [], this.submitted = false, this.processing = false, e3 && (this.dialog = document.createElement("upload-dialog"), this.dialog.id = "form-controller-dialog", this.element.appendChild(this.dialog)), this.element.addEventListener("submit", ((t3) => this.submit(t3))), window.addEventListener("beforeunload", ((t3) => this.beforeUnload(t3))), this.element.addEventListener("direct-upload:initialize", ((t3) => this.init(t3))), this.element.addEventListener("direct-upload:start", ((t3) => this.start(t3))), this.element.addEventListener("direct-upload:progress", ((t3) => this.progress(t3))), this.element.addEventListener("direct-upload:error", ((t3) => this.error(t3))), this.element.addEventListener("direct-upload:end", ((t3) => this.end(t3))), this.element.addEventListener("attachment-file:remove", ((t3) => this.removeUploadedFile(t3)));
5004
5032
  }
5005
- beforeUnload(t) {
5006
- if (this.processing) return t.preventDefault(), t.returnValue = "";
5033
+ beforeUnload(t2) {
5034
+ if (this.processing) return t2.preventDefault(), t2.returnValue = "";
5007
5035
  }
5008
- submit(t) {
5009
- (0 !== this.controllers.length || this.hasUploadErrors() || this.processing) && (t.preventDefault(), this.submitted = true, this.setInputAttachmentsDisabled(true), this.startNextController(), this.processing && this.dialog?.open());
5036
+ submit(t2) {
5037
+ (0 !== this.controllers.length || this.hasUploadErrors() || this.processing) && (t2.preventDefault(), this.submitted = true, this.setInputAttachmentsDisabled(true), this.startNextController(), this.processing && this.dialog?.open());
5010
5038
  }
5011
5039
  startNextController() {
5012
5040
  if (this.processing) return;
5013
- const t = this.controllers.shift();
5014
- t ? (this.processing = true, this.submitted ? this.setInputAttachmentsDisabled(true) : this.setControllerInputDisabled(t, true), t.start(((e3) => {
5015
- this.submitted ? e3 && this.setInputAttachmentsDisabled(false) : this.setControllerInputDisabled(t, false), this.processing = false, this.startNextController();
5041
+ const t2 = this.controllers.shift();
5042
+ t2 ? (this.processing = true, this.submitted ? this.setInputAttachmentsDisabled(true) : this.setControllerInputDisabled(t2, true), t2.start(((e3) => {
5043
+ this.submitted ? e3 && this.setInputAttachmentsDisabled(false) : this.setControllerInputDisabled(t2, false), this.processing = false, this.startNextController();
5016
5044
  }))) : this.submitForm();
5017
5045
  }
5018
5046
  hasUploadErrors() {
5019
- return Array.from(this.element.querySelectorAll("attachment-file")).some(((t) => "error" === t.state));
5047
+ return Array.from(this.element.querySelectorAll("attachment-file")).some(((t2) => "error" === t2.state));
5020
5048
  }
5021
5049
  submitForm() {
5022
5050
  if (this.submitted) {
@@ -5026,36 +5054,36 @@ var o2 = class _o {
5026
5054
  }));
5027
5055
  }
5028
5056
  }
5029
- setControllerInputDisabled(t, e3) {
5030
- const i2 = t.uploadedFile.closest("input-attachment");
5057
+ setControllerInputDisabled(t2, e3) {
5058
+ const i2 = t2.uploadedFile.closest("input-attachment");
5031
5059
  i2 && (i2.disabled = e3);
5032
5060
  }
5033
- setInputAttachmentsDisabled(t) {
5061
+ setInputAttachmentsDisabled(t2) {
5034
5062
  Array.from(this.element.querySelectorAll("input-attachment")).forEach(((e3) => {
5035
- e3.disabled = t;
5063
+ e3.disabled = t2;
5036
5064
  }));
5037
5065
  }
5038
- init(t) {
5039
- const { id: e3, file: i2, controller: s } = t.detail;
5066
+ init(t2) {
5067
+ const { id: e3, file: i2, controller: s } = t2.detail;
5040
5068
  this.dialog?.addUpload("direct-upload-" + e3, i2?.name || "Uploading..."), this.controllers.push(s), this.startNextController();
5041
5069
  }
5042
- start(t) {
5043
- this.dialog?.startUpload("direct-upload-" + t.detail.id);
5070
+ start(t2) {
5071
+ this.dialog?.startUpload("direct-upload-" + t2.detail.id);
5044
5072
  }
5045
- progress(t) {
5046
- const { id: e3, progress: i2 } = t.detail;
5073
+ progress(t2) {
5074
+ const { id: e3, progress: i2 } = t2.detail;
5047
5075
  this.dialog?.updateProgress("direct-upload-" + e3, i2);
5048
5076
  }
5049
- error(t) {
5050
- t.preventDefault();
5051
- const { id: e3, error: i2 } = t.detail;
5077
+ error(t2) {
5078
+ t2.preventDefault();
5079
+ const { id: e3, error: i2 } = t2.detail;
5052
5080
  this.dialog?.setError("direct-upload-" + e3, i2);
5053
5081
  }
5054
- end(t) {
5055
- this.dialog?.completeUpload("direct-upload-" + t.detail.id);
5082
+ end(t2) {
5083
+ this.dialog?.completeUpload("direct-upload-" + t2.detail.id);
5056
5084
  }
5057
- removeUploadedFile(t) {
5058
- const e3 = t.detail, i2 = e3.controller?.directUpload?.id;
5085
+ removeUploadedFile(t2) {
5086
+ const e3 = t2.detail, i2 = e3.controller?.directUpload?.id;
5059
5087
  i2 && this.dialog?.removeUpload("direct-upload-" + i2), this.setInputAttachmentsDisabled(false), requestAnimationFrame((() => this.submitForm()));
5060
5088
  }
5061
5089
  };
@@ -5074,20 +5102,20 @@ var d2 = class extends HTMLElement {
5074
5102
  this.removeEventListener("dragover", this.handleDragOver), this.removeEventListener("dragleave", this.handleDragLeave), this.removeEventListener("drop", this.handleDrop);
5075
5103
  }
5076
5104
  get fileTarget() {
5077
- const t = this.getAttribute("for");
5078
- return t ? document.querySelector("#" + t) : null;
5105
+ const t2 = this.getAttribute("for");
5106
+ return t2 ? document.querySelector("#" + t2) : null;
5079
5107
  }
5080
- handleDragOver(t) {
5081
- t.preventDefault(), this.classList.add("-dragover");
5108
+ handleDragOver(t2) {
5109
+ t2.preventDefault(), this.classList.add("-dragover");
5082
5110
  }
5083
5111
  handleDragLeave() {
5084
5112
  this.classList.remove("-dragover");
5085
5113
  }
5086
- handleDrop(t) {
5087
- t.preventDefault(), this.classList.remove("-dragover");
5114
+ handleDrop(t2) {
5115
+ t2.preventDefault(), this.classList.remove("-dragover");
5088
5116
  const e3 = this.fileTarget;
5089
- if (e3 && t.dataTransfer.files.length > 0) {
5090
- e3.files = t.dataTransfer.files;
5117
+ if (e3 && t2.dataTransfer.files.length > 0) {
5118
+ e3.files = t2.dataTransfer.files;
5091
5119
  const i2 = new Event("change", { bubbles: true });
5092
5120
  e3.dispatchEvent(i2);
5093
5121
  }
@@ -5114,13 +5142,13 @@ var c3 = proxyCustomElement(class extends H {
5114
5142
  internals;
5115
5143
  fileInput;
5116
5144
  _files = [];
5117
- constructor(t) {
5118
- super(), false !== t && this.__registerHost(), this.__attachShadow(), this.internals = this.el.attachInternals();
5145
+ constructor(t2) {
5146
+ super(), false !== t2 && this.__registerHost(), this.__attachShadow(), this.internals = this.el.attachInternals();
5119
5147
  }
5120
5148
  componentWillLoad() {
5121
5149
  this.form = this.internals.form, this.form && (this.form.addEventListener("reset", (() => this.reset())), o2.instance(this.form, { uploadDialog: this.uploadDialog }));
5122
- const t = Array.from(this.el.children).filter(((t2) => "ATTACHMENT-FILE" == t2.tagName));
5123
- t.length > 0 && (this.files = t), this.files.length > 0 && this.updateFormValue();
5150
+ const t2 = Array.from(this.el.children).filter(((t3) => "ATTACHMENT-FILE" == t3.tagName));
5151
+ t2.length > 0 && (this.files = t2), this.files.length > 0 && this.updateFormValue();
5124
5152
  }
5125
5153
  componentDidLoad() {
5126
5154
  this.fileInput?.addEventListener("change", this.handleFileInputChange);
@@ -5128,26 +5156,26 @@ var c3 = proxyCustomElement(class extends H {
5128
5156
  get files() {
5129
5157
  return this._files;
5130
5158
  }
5131
- set files(t) {
5132
- this._files = t, this.multiple || (this._files = this._files.slice(-1)), forceUpdate(this.el), this.fireChangeEvent();
5159
+ set files(t2) {
5160
+ this._files = t2, this.multiple || (this._files = this._files.slice(-1)), forceUpdate(this.el), this.fireChangeEvent();
5133
5161
  }
5134
5162
  get value() {
5135
- return JSON.stringify(this.files.map(((t) => ({ value: t.value, filename: t.filename, src: t.src, state: t.state, percent: t.percent, size: t.size, filetype: t.filetype }))));
5163
+ return JSON.stringify(this.files.map(((t2) => ({ value: t2.value, filename: t2.filename, src: t2.src, href: t2.href, download: t2.download, state: t2.state, percent: t2.percent, size: t2.size, filetype: t2.filetype }))));
5136
5164
  }
5137
- set value(t) {
5138
- const e3 = JSON.parse(t || "[]");
5139
- 0 !== e3.length ? (this.files = e3.map(((t2) => {
5165
+ set value(t2) {
5166
+ const e3 = JSON.parse(t2 || "[]");
5167
+ 0 !== e3.length ? (this.files = e3.map(((t3) => {
5140
5168
  const e4 = document.createElement("attachment-file");
5141
- return e4.name = this.name, e4.preview = this.preview, e4.value = t2.value, e4.filename = t2.filename, e4.src = t2.src, e4.state = t2.state || "complete", e4.percent = t2.percent || 100, e4.size = t2.size, e4.filetype = t2.filetype, e4;
5169
+ return e4.name = this.name, e4.preview = this.preview, e4.value = t3.value, e4.filename = t3.filename, e4.src = t3.src, e4.href = t3.href, e4.download = t3.download, e4.state = t3.state || "complete", e4.percent = t3.percent || 100, e4.size = t3.size, e4.filetype = t3.filetype, e4;
5142
5170
  })), requestAnimationFrame((() => this.componentDidRender()))) : this.files = [];
5143
5171
  }
5144
5172
  updateFormValue() {
5145
5173
  if (!this.name || !this.internals?.setFormValue) return;
5146
- const t = new FormData(), e3 = this.files.map(((t2) => t2.value)).filter(((t2) => t2 && "string" != typeof t2 ? (console.error("[input-attachment] Non-string value detected on attachment-file:", typeof t2, t2, Error().stack), false) : "string" == typeof t2 && t2.length > 0));
5147
- if (this.multiple ? (e3.forEach(((e4) => t.append(this.name, e4))), 0 === e3.length && t.append(this.name, "")) : t.set(this.name, e3[0] || ""), this.internals.setFormValue(t), this.required && 0 === this.files.length) this.internals.setValidity({ valueMissing: true }, "Please select a file.", this.fileInput);
5174
+ const t2 = new FormData(), e3 = this.files.map(((t3) => t3.value)).filter(((t3) => t3 && "string" != typeof t3 ? (console.error("[input-attachment] Non-string value detected on attachment-file:", typeof t3, t3, Error().stack), false) : "string" == typeof t3 && t3.length > 0));
5175
+ if (this.multiple ? (e3.forEach(((e4) => t2.append(this.name, e4))), 0 === e3.length && t2.append(this.name, "")) : t2.set(this.name, e3[0] || ""), this.internals.setFormValue(t2), this.required && 0 === this.files.length) this.internals.setValidity({ valueMissing: true }, "Please select a file.", this.fileInput);
5148
5176
  else {
5149
- const t2 = this.files.map(((t3) => t3.validationError)).filter(((t3) => t3 && t3.length > 0));
5150
- t2.length > 0 ? this.internals.setValidity({ customError: true }, t2[0], this.fileInput) : this.internals.setValidity({});
5177
+ const t3 = this.files.map(((t4) => t4.validationError)).filter(((t4) => t4 && t4.length > 0));
5178
+ t3.length > 0 ? this.internals.setValidity({ customError: true }, t3[0], this.fileInput) : this.internals.setValidity({});
5151
5179
  }
5152
5180
  }
5153
5181
  reset() {
@@ -5156,19 +5184,19 @@ var c3 = proxyCustomElement(class extends H {
5156
5184
  handleFileInputChange = () => {
5157
5185
  this.fileInput?.files?.length && (this.addFiles(this.fileInput.files), this.fileInput.value = null);
5158
5186
  };
5159
- handleDrop = (t) => {
5160
- t.preventDefault(), this.isDisabled || t.dataTransfer?.files?.length && this.addFiles(t.dataTransfer.files);
5187
+ handleDrop = (t2) => {
5188
+ t2.preventDefault(), this.isDisabled || t2.dataTransfer?.files?.length && this.addFiles(t2.dataTransfer.files);
5161
5189
  };
5162
- removeUploadedFile(t) {
5163
- !(function(t2, e3) {
5164
- const i2 = t2.findIndex(((t3) => t3 === e3));
5165
- -1 !== i2 && t2.splice(i2, 1);
5166
- })(this.files, t.detail), this.files = this.files;
5190
+ removeUploadedFile(t2) {
5191
+ !(function(t3, e3) {
5192
+ const i2 = t3.findIndex(((t4) => t4 === e3));
5193
+ -1 !== i2 && t3.splice(i2, 1);
5194
+ })(this.files, t2.detail), this.files = this.files;
5167
5195
  }
5168
- handleChildValidation(t) {
5196
+ handleChildValidation(t2) {
5169
5197
  this.updateFormValue();
5170
5198
  }
5171
- handleChildReady(t) {
5199
+ handleChildReady(t2) {
5172
5200
  this.updateFormValue();
5173
5201
  }
5174
5202
  fireChangeEvent() {
@@ -5180,38 +5208,38 @@ var c3 = proxyCustomElement(class extends H {
5180
5208
  return this.disabled || !!this.el.closest("fieldset[disabled]");
5181
5209
  }
5182
5210
  render() {
5183
- return h(Host, { key: "59748e20522a9e4ab161e9810b42bd19e9f53680" }, h("input", { key: "36d0bbf56a1eab608ae86f39641fbf44eeb999d8", ref: (t) => this.fileInput = t, type: "file", "aria-label": "Choose " + (this.multiple ? "files" : "file"), multiple: this.multiple, accept: this.accepts, required: this.required && 0 === this.files.length, disabled: this.isDisabled, onChange: () => this.handleFileInputChange() }), h("file-drop", { key: "00348d5fa7495a5f0a9d4868b99ac3f9708fb874", onClick: () => this.fileInput?.click(), onDrop: this.handleDrop }, h("p", { key: "aa0ee6f54ffb4d23c84376af60040c6df103e84f", part: "title" }, h("strong", { key: "708c2c367984ed4439c6666fba613b7b8bab06a4" }, "Choose ", this.multiple ? "files" : "file", " "), h("span", { key: "b82c6eab958d846af3ce11fca9cfaab9c6311074" }, "or drag ", this.multiple ? "them" : "it", " here.")), h("div", { key: "8e5e5c7b319c4fe88266f9e7a1aab5dbb7352c3b", class: "media-preview " + (this.multiple ? "-stacked" : "") }, h("slot", { key: "f0354fcd6c301e98a91422e2e65f0aff3e78ffde" }))));
5211
+ return h(Host, { key: "09588ce0af3411cc579d7d828c604fcc1fd44825" }, h("input", { key: "1311e26122c5778efc9eb1176c4a4986f1865d7d", ref: (t2) => this.fileInput = t2, type: "file", "aria-label": "Choose " + (this.multiple ? "files" : "file"), multiple: this.multiple, accept: this.accepts, required: this.required && 0 === this.files.length, disabled: this.isDisabled, onChange: () => this.handleFileInputChange() }), h("file-drop", { key: "7adac8601feb97f1123482bde83cf0bb7bd931b7", onClick: () => this.fileInput?.click(), onDrop: this.handleDrop }, h("p", { key: "38faec2ec357d905719948b3f0f46b23abde4c40", part: "title" }, h("strong", { key: "61bd69a635852191f31e4e986f13bbf63e57dfa3" }, "Choose ", this.multiple ? "files" : "file", " "), h("span", { key: "6ac8e031e03ed7d23c83edbacde03c441c4b4df7" }, "or drag ", this.multiple ? "them" : "it", " here.")), h("div", { key: "476bdeafcf7e6211a3feccdc0c275efaf1bff928", class: "media-preview " + (this.multiple ? "-stacked" : "") }, h("slot", { key: "f843426c3a3cef23ccf8d3f1f584075762ecc8b2" }))));
5184
5212
  }
5185
5213
  componentDidRender() {
5186
5214
  if (0 === this.files.length) {
5187
- const t2 = Array.from(this.el.children).filter(((t3) => "ATTACHMENT-FILE" == t3.tagName));
5188
- t2.length > 0 && (this._files = t2);
5215
+ const t3 = Array.from(this.el.children).filter(((t4) => "ATTACHMENT-FILE" == t4.tagName));
5216
+ t3.length > 0 && (this._files = t3);
5189
5217
  }
5190
- const t = document.createElement("div");
5191
- this.files.forEach(((e4) => t.appendChild(e4)));
5218
+ const t2 = document.createElement("div");
5219
+ this.files.forEach(((e4) => t2.appendChild(e4)));
5192
5220
  let e3 = false;
5193
- if (t.children.length !== this.el.children.length) e3 = true;
5194
- else for (let i2 = 0; i2 < t.children.length; i2++) if (t.children[i2] !== this.el.children[i2]) {
5221
+ if (t2.children.length !== this.el.children.length) e3 = true;
5222
+ else for (let i2 = 0; i2 < t2.children.length; i2++) if (t2.children[i2] !== this.el.children[i2]) {
5195
5223
  e3 = true;
5196
5224
  break;
5197
5225
  }
5198
5226
  if (e3) {
5199
5227
  for (; this.el.firstChild; ) this.el.removeChild(this.el.firstChild);
5200
- this.el.appendChild(t);
5228
+ this.el.appendChild(t2);
5201
5229
  }
5202
5230
  this.updateFormValue();
5203
5231
  }
5204
- addFiles(t) {
5205
- Array.from(t).forEach(((t2) => {
5232
+ addFiles(t2) {
5233
+ Array.from(t2).forEach(((t3) => {
5206
5234
  const e3 = document.createElement("attachment-file");
5207
- e3.name = this.name, e3.preview = this.preview, e3.setAttribute("url", this.directupload), e3.accepts = this.accepts, e3.max = this.max, e3.file = t2, this._files.push(e3);
5235
+ e3.name = this.name, e3.preview = this.preview, e3.setAttribute("url", this.directupload), e3.accepts = this.accepts, e3.max = this.max, e3.file = t3, this._files.push(e3);
5208
5236
  })), this.files = this._files, requestAnimationFrame((() => this.componentDidRender()));
5209
5237
  }
5210
5238
  checkValidity() {
5211
5239
  return !this.required || 0 !== this.files.length;
5212
5240
  }
5213
- setCustomValidity(t) {
5214
- this.internals.setValidity(t ? { customError: true } : {}, t, this.fileInput);
5241
+ setCustomValidity(t2) {
5242
+ this.internals.setValidity(t2 ? { customError: true } : {}, t2, this.fileInput);
5215
5243
  }
5216
5244
  reportValidity() {
5217
5245
  return this.internals.reportValidity();
@@ -5241,23 +5269,23 @@ var r2 = proxyCustomElement(class extends H {
5241
5269
  async close() {
5242
5270
  this.dialog.close();
5243
5271
  }
5244
- async addUpload(e3, t) {
5245
- this.uploads = [...this.uploads, { id: e3, filename: t, pending: true, percent: 0, complete: false, error: null }];
5272
+ async addUpload(e3, t2) {
5273
+ this.uploads = [...this.uploads, { id: e3, filename: t2, pending: true, percent: 0, complete: false, error: null }];
5246
5274
  }
5247
5275
  async startUpload(e3) {
5248
- this.uploads = this.uploads.map(((t) => t.id === e3 ? { ...t, pending: false } : t));
5276
+ this.uploads = this.uploads.map(((t2) => t2.id === e3 ? { ...t2, pending: false } : t2));
5249
5277
  }
5250
- async updateProgress(e3, t) {
5251
- this.uploads = this.uploads.map(((a3) => a3.id === e3 ? { ...a3, percent: t } : a3));
5278
+ async updateProgress(e3, t2) {
5279
+ this.uploads = this.uploads.map(((a3) => a3.id === e3 ? { ...a3, percent: t2 } : a3));
5252
5280
  }
5253
- async setError(e3, t) {
5254
- this.uploads = this.uploads.map(((a3) => a3.id === e3 ? { ...a3, error: t } : a3));
5281
+ async setError(e3, t2) {
5282
+ this.uploads = this.uploads.map(((a3) => a3.id === e3 ? { ...a3, error: t2 } : a3));
5255
5283
  }
5256
5284
  async completeUpload(e3) {
5257
- this.uploads = this.uploads.map(((t) => t.id === e3 ? { ...t, complete: true } : t));
5285
+ this.uploads = this.uploads.map(((t2) => t2.id === e3 ? { ...t2, complete: true } : t2));
5258
5286
  }
5259
5287
  async removeUpload(e3) {
5260
- this.uploads = this.uploads.filter(((t) => t.id !== e3));
5288
+ this.uploads = this.uploads.filter(((t2) => t2.id !== e3));
5261
5289
  }
5262
5290
  render() {
5263
5291
  return h(Host, { key: "76874b06863ae2cab526de1f0e491bb04300c6fc" }, h("dialog", { key: "55b715d6d5fc6ee0c6a16df16c6374ca6e285aee", ref: (e3) => this.dialog = e3 }, h("div", { key: "bab0ae4ed41bb5a909351866d92f0da330858691", class: "direct-upload-wrapper" }, h("div", { key: "23fe0a67bd942f5f4a53df1bd61bec8863104b2c", class: "direct-upload-content" }, h("h3", { key: "d2e349d855c046a541c9dc3ac837873bcd75da22" }, "Uploading your media"), this.uploads.map(((e3) => h("progress-bar", { key: e3.id, class: { "direct-upload--pending": e3.pending, "direct-upload--complete": e3.complete, "direct-upload--error": !!e3.error }, percent: e3.percent, title: e3.error || void 0 }, e3.filename)))))));