@unifold/connect-react 0.1.23 → 0.1.25

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.
package/dist/index.mjs CHANGED
@@ -28,69 +28,69 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var require_qr_code_styling = __commonJS({
29
29
  "../../node_modules/.pnpm/qr-code-styling@1.9.2/node_modules/qr-code-styling/lib/qr-code-styling.js"(exports, module) {
30
30
  "use strict";
31
- !(function(t5, e) {
32
- "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.QRCodeStyling = e() : t5.QRCodeStyling = e();
31
+ !(function(t6, e) {
32
+ "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.QRCodeStyling = e() : t6.QRCodeStyling = e();
33
33
  })(exports, (() => (() => {
34
- var t5 = { 873: (t6, e2) => {
34
+ var t6 = { 873: (t7, e2) => {
35
35
  var i2, r3, n = (function() {
36
- var t7 = function(t8, e4) {
37
- var i4 = t8, r5 = s[e4], n3 = null, o2 = 0, h2 = null, p2 = [], v2 = {}, m = function(t9, e5) {
38
- n3 = (function(t10) {
39
- for (var e6 = new Array(t10), i5 = 0; i5 < t10; i5 += 1) {
40
- e6[i5] = new Array(t10);
41
- for (var r6 = 0; r6 < t10; r6 += 1) e6[i5][r6] = null;
36
+ var t8 = function(t9, e4) {
37
+ var i4 = t9, r5 = s[e4], n3 = null, o2 = 0, h2 = null, p2 = [], v2 = {}, m = function(t10, e5) {
38
+ n3 = (function(t11) {
39
+ for (var e6 = new Array(t11), i5 = 0; i5 < t11; i5 += 1) {
40
+ e6[i5] = new Array(t11);
41
+ for (var r6 = 0; r6 < t11; r6 += 1) e6[i5][r6] = null;
42
42
  }
43
43
  return e6;
44
- })(o2 = 4 * i4 + 17), b(0, 0), b(o2 - 7, 0), b(0, o2 - 7), x(), y(), C(t9, e5), i4 >= 7 && S(t9), null == h2 && (h2 = M(i4, r5, p2)), A(h2, e5);
45
- }, b = function(t9, e5) {
46
- for (var i5 = -1; i5 <= 7; i5 += 1) if (!(t9 + i5 <= -1 || o2 <= t9 + i5)) for (var r6 = -1; r6 <= 7; r6 += 1) e5 + r6 <= -1 || o2 <= e5 + r6 || (n3[t9 + i5][e5 + r6] = 0 <= i5 && i5 <= 6 && (0 == r6 || 6 == r6) || 0 <= r6 && r6 <= 6 && (0 == i5 || 6 == i5) || 2 <= i5 && i5 <= 4 && 2 <= r6 && r6 <= 4);
44
+ })(o2 = 4 * i4 + 17), b(0, 0), b(o2 - 7, 0), b(0, o2 - 7), x(), y(), C(t10, e5), i4 >= 7 && S(t10), null == h2 && (h2 = M(i4, r5, p2)), A(h2, e5);
45
+ }, b = function(t10, e5) {
46
+ for (var i5 = -1; i5 <= 7; i5 += 1) if (!(t10 + i5 <= -1 || o2 <= t10 + i5)) for (var r6 = -1; r6 <= 7; r6 += 1) e5 + r6 <= -1 || o2 <= e5 + r6 || (n3[t10 + i5][e5 + r6] = 0 <= i5 && i5 <= 6 && (0 == r6 || 6 == r6) || 0 <= r6 && r6 <= 6 && (0 == i5 || 6 == i5) || 2 <= i5 && i5 <= 4 && 2 <= r6 && r6 <= 4);
47
47
  }, y = function() {
48
- for (var t9 = 8; t9 < o2 - 8; t9 += 1) null == n3[t9][6] && (n3[t9][6] = t9 % 2 == 0);
48
+ for (var t10 = 8; t10 < o2 - 8; t10 += 1) null == n3[t10][6] && (n3[t10][6] = t10 % 2 == 0);
49
49
  for (var e5 = 8; e5 < o2 - 8; e5 += 1) null == n3[6][e5] && (n3[6][e5] = e5 % 2 == 0);
50
50
  }, x = function() {
51
- for (var t9 = a.getPatternPosition(i4), e5 = 0; e5 < t9.length; e5 += 1) for (var r6 = 0; r6 < t9.length; r6 += 1) {
52
- var o3 = t9[e5], s2 = t9[r6];
51
+ for (var t10 = a.getPatternPosition(i4), e5 = 0; e5 < t10.length; e5 += 1) for (var r6 = 0; r6 < t10.length; r6 += 1) {
52
+ var o3 = t10[e5], s2 = t10[r6];
53
53
  if (null == n3[o3][s2]) for (var h3 = -2; h3 <= 2; h3 += 1) for (var d2 = -2; d2 <= 2; d2 += 1) n3[o3 + h3][s2 + d2] = -2 == h3 || 2 == h3 || -2 == d2 || 2 == d2 || 0 == h3 && 0 == d2;
54
54
  }
55
- }, S = function(t9) {
55
+ }, S = function(t10) {
56
56
  for (var e5 = a.getBCHTypeNumber(i4), r6 = 0; r6 < 18; r6 += 1) {
57
- var s2 = !t9 && 1 == (e5 >> r6 & 1);
57
+ var s2 = !t10 && 1 == (e5 >> r6 & 1);
58
58
  n3[Math.floor(r6 / 3)][r6 % 3 + o2 - 8 - 3] = s2;
59
59
  }
60
- for (r6 = 0; r6 < 18; r6 += 1) s2 = !t9 && 1 == (e5 >> r6 & 1), n3[r6 % 3 + o2 - 8 - 3][Math.floor(r6 / 3)] = s2;
61
- }, C = function(t9, e5) {
60
+ for (r6 = 0; r6 < 18; r6 += 1) s2 = !t10 && 1 == (e5 >> r6 & 1), n3[r6 % 3 + o2 - 8 - 3][Math.floor(r6 / 3)] = s2;
61
+ }, C = function(t10, e5) {
62
62
  for (var i5 = r5 << 3 | e5, s2 = a.getBCHTypeInfo(i5), h3 = 0; h3 < 15; h3 += 1) {
63
- var d2 = !t9 && 1 == (s2 >> h3 & 1);
63
+ var d2 = !t10 && 1 == (s2 >> h3 & 1);
64
64
  h3 < 6 ? n3[h3][8] = d2 : h3 < 8 ? n3[h3 + 1][8] = d2 : n3[o2 - 15 + h3][8] = d2;
65
65
  }
66
- for (h3 = 0; h3 < 15; h3 += 1) d2 = !t9 && 1 == (s2 >> h3 & 1), h3 < 8 ? n3[8][o2 - h3 - 1] = d2 : h3 < 9 ? n3[8][15 - h3 - 1 + 1] = d2 : n3[8][15 - h3 - 1] = d2;
67
- n3[o2 - 8][8] = !t9;
68
- }, A = function(t9, e5) {
66
+ for (h3 = 0; h3 < 15; h3 += 1) d2 = !t10 && 1 == (s2 >> h3 & 1), h3 < 8 ? n3[8][o2 - h3 - 1] = d2 : h3 < 9 ? n3[8][15 - h3 - 1 + 1] = d2 : n3[8][15 - h3 - 1] = d2;
67
+ n3[o2 - 8][8] = !t10;
68
+ }, A = function(t10, e5) {
69
69
  for (var i5 = -1, r6 = o2 - 1, s2 = 7, h3 = 0, d2 = a.getMaskFunction(e5), u2 = o2 - 1; u2 > 0; u2 -= 2) for (6 == u2 && (u2 -= 1); ; ) {
70
70
  for (var c2 = 0; c2 < 2; c2 += 1) if (null == n3[r6][u2 - c2]) {
71
71
  var l2 = false;
72
- h3 < t9.length && (l2 = 1 == (t9[h3] >>> s2 & 1)), d2(r6, u2 - c2) && (l2 = !l2), n3[r6][u2 - c2] = l2, -1 == (s2 -= 1) && (h3 += 1, s2 = 7);
72
+ h3 < t10.length && (l2 = 1 == (t10[h3] >>> s2 & 1)), d2(r6, u2 - c2) && (l2 = !l2), n3[r6][u2 - c2] = l2, -1 == (s2 -= 1) && (h3 += 1, s2 = 7);
73
73
  }
74
74
  if ((r6 += i5) < 0 || o2 <= r6) {
75
75
  r6 -= i5, i5 = -i5;
76
76
  break;
77
77
  }
78
78
  }
79
- }, M = function(t9, e5, i5) {
80
- for (var r6 = u.getRSBlocks(t9, e5), n4 = c(), o3 = 0; o3 < i5.length; o3 += 1) {
79
+ }, M = function(t10, e5, i5) {
80
+ for (var r6 = u.getRSBlocks(t10, e5), n4 = c(), o3 = 0; o3 < i5.length; o3 += 1) {
81
81
  var s2 = i5[o3];
82
- n4.put(s2.getMode(), 4), n4.put(s2.getLength(), a.getLengthInBits(s2.getMode(), t9)), s2.write(n4);
82
+ n4.put(s2.getMode(), 4), n4.put(s2.getLength(), a.getLengthInBits(s2.getMode(), t10)), s2.write(n4);
83
83
  }
84
84
  var h3 = 0;
85
85
  for (o3 = 0; o3 < r6.length; o3 += 1) h3 += r6[o3].dataCount;
86
86
  if (n4.getLengthInBits() > 8 * h3) throw "code length overflow. (" + n4.getLengthInBits() + ">" + 8 * h3 + ")";
87
87
  for (n4.getLengthInBits() + 4 <= 8 * h3 && n4.put(0, 4); n4.getLengthInBits() % 8 != 0; ) n4.putBit(false);
88
88
  for (; !(n4.getLengthInBits() >= 8 * h3 || (n4.put(236, 8), n4.getLengthInBits() >= 8 * h3)); ) n4.put(17, 8);
89
- return (function(t10, e6) {
89
+ return (function(t11, e6) {
90
90
  for (var i6 = 0, r7 = 0, n5 = 0, o4 = new Array(e6.length), s3 = new Array(e6.length), h4 = 0; h4 < e6.length; h4 += 1) {
91
91
  var u2 = e6[h4].dataCount, c2 = e6[h4].totalCount - u2;
92
92
  r7 = Math.max(r7, u2), n5 = Math.max(n5, c2), o4[h4] = new Array(u2);
93
- for (var l2 = 0; l2 < o4[h4].length; l2 += 1) o4[h4][l2] = 255 & t10.getBuffer()[l2 + i6];
93
+ for (var l2 = 0; l2 < o4[h4].length; l2 += 1) o4[h4][l2] = 255 & t11.getBuffer()[l2 + i6];
94
94
  i6 += u2;
95
95
  var g2 = a.getErrorCorrectPolynomial(c2), f2 = d(o4[h4], g2.getLength() - 1).mod(g2);
96
96
  for (s3[h4] = new Array(g2.getLength() - 1), l2 = 0; l2 < s3[h4].length; l2 += 1) {
@@ -106,85 +106,85 @@ var require_qr_code_styling = __commonJS({
106
106
  return v3;
107
107
  })(n4, r6);
108
108
  };
109
- v2.addData = function(t9, e5) {
109
+ v2.addData = function(t10, e5) {
110
110
  var i5 = null;
111
111
  switch (e5 = e5 || "Byte") {
112
112
  case "Numeric":
113
- i5 = l(t9);
113
+ i5 = l(t10);
114
114
  break;
115
115
  case "Alphanumeric":
116
- i5 = g(t9);
116
+ i5 = g(t10);
117
117
  break;
118
118
  case "Byte":
119
- i5 = f(t9);
119
+ i5 = f(t10);
120
120
  break;
121
121
  case "Kanji":
122
- i5 = w(t9);
122
+ i5 = w(t10);
123
123
  break;
124
124
  default:
125
125
  throw "mode:" + e5;
126
126
  }
127
127
  p2.push(i5), h2 = null;
128
- }, v2.isDark = function(t9, e5) {
129
- if (t9 < 0 || o2 <= t9 || e5 < 0 || o2 <= e5) throw t9 + "," + e5;
130
- return n3[t9][e5];
128
+ }, v2.isDark = function(t10, e5) {
129
+ if (t10 < 0 || o2 <= t10 || e5 < 0 || o2 <= e5) throw t10 + "," + e5;
130
+ return n3[t10][e5];
131
131
  }, v2.getModuleCount = function() {
132
132
  return o2;
133
133
  }, v2.make = function() {
134
134
  if (i4 < 1) {
135
- for (var t9 = 1; t9 < 40; t9++) {
136
- for (var e5 = u.getRSBlocks(t9, r5), n4 = c(), o3 = 0; o3 < p2.length; o3++) {
135
+ for (var t10 = 1; t10 < 40; t10++) {
136
+ for (var e5 = u.getRSBlocks(t10, r5), n4 = c(), o3 = 0; o3 < p2.length; o3++) {
137
137
  var s2 = p2[o3];
138
- n4.put(s2.getMode(), 4), n4.put(s2.getLength(), a.getLengthInBits(s2.getMode(), t9)), s2.write(n4);
138
+ n4.put(s2.getMode(), 4), n4.put(s2.getLength(), a.getLengthInBits(s2.getMode(), t10)), s2.write(n4);
139
139
  }
140
140
  var h3 = 0;
141
141
  for (o3 = 0; o3 < e5.length; o3++) h3 += e5[o3].dataCount;
142
142
  if (n4.getLengthInBits() <= 8 * h3) break;
143
143
  }
144
- i4 = t9;
144
+ i4 = t10;
145
145
  }
146
146
  m(false, (function() {
147
- for (var t10 = 0, e6 = 0, i5 = 0; i5 < 8; i5 += 1) {
147
+ for (var t11 = 0, e6 = 0, i5 = 0; i5 < 8; i5 += 1) {
148
148
  m(true, i5);
149
149
  var r6 = a.getLostPoint(v2);
150
- (0 == i5 || t10 > r6) && (t10 = r6, e6 = i5);
150
+ (0 == i5 || t11 > r6) && (t11 = r6, e6 = i5);
151
151
  }
152
152
  return e6;
153
153
  })());
154
- }, v2.createTableTag = function(t9, e5) {
155
- t9 = t9 || 2;
154
+ }, v2.createTableTag = function(t10, e5) {
155
+ t10 = t10 || 2;
156
156
  var i5 = "";
157
- i5 += '<table style="', i5 += " border-width: 0px; border-style: none;", i5 += " border-collapse: collapse;", i5 += " padding: 0px; margin: " + (e5 = void 0 === e5 ? 4 * t9 : e5) + "px;", i5 += '">', i5 += "<tbody>";
157
+ i5 += '<table style="', i5 += " border-width: 0px; border-style: none;", i5 += " border-collapse: collapse;", i5 += " padding: 0px; margin: " + (e5 = void 0 === e5 ? 4 * t10 : e5) + "px;", i5 += '">', i5 += "<tbody>";
158
158
  for (var r6 = 0; r6 < v2.getModuleCount(); r6 += 1) {
159
159
  i5 += "<tr>";
160
- for (var n4 = 0; n4 < v2.getModuleCount(); n4 += 1) i5 += '<td style="', i5 += " border-width: 0px; border-style: none;", i5 += " border-collapse: collapse;", i5 += " padding: 0px; margin: 0px;", i5 += " width: " + t9 + "px;", i5 += " height: " + t9 + "px;", i5 += " background-color: ", i5 += v2.isDark(r6, n4) ? "#000000" : "#ffffff", i5 += ";", i5 += '"/>';
160
+ for (var n4 = 0; n4 < v2.getModuleCount(); n4 += 1) i5 += '<td style="', i5 += " border-width: 0px; border-style: none;", i5 += " border-collapse: collapse;", i5 += " padding: 0px; margin: 0px;", i5 += " width: " + t10 + "px;", i5 += " height: " + t10 + "px;", i5 += " background-color: ", i5 += v2.isDark(r6, n4) ? "#000000" : "#ffffff", i5 += ";", i5 += '"/>';
161
161
  i5 += "</tr>";
162
162
  }
163
163
  return (i5 += "</tbody>") + "</table>";
164
- }, v2.createSvgTag = function(t9, e5, i5, r6) {
164
+ }, v2.createSvgTag = function(t10, e5, i5, r6) {
165
165
  var n4 = {};
166
- "object" == typeof arguments[0] && (t9 = (n4 = arguments[0]).cellSize, e5 = n4.margin, i5 = n4.alt, r6 = n4.title), t9 = t9 || 2, e5 = void 0 === e5 ? 4 * t9 : e5, (i5 = "string" == typeof i5 ? { text: i5 } : i5 || {}).text = i5.text || null, i5.id = i5.text ? i5.id || "qrcode-description" : null, (r6 = "string" == typeof r6 ? { text: r6 } : r6 || {}).text = r6.text || null, r6.id = r6.text ? r6.id || "qrcode-title" : null;
167
- var o3, s2, a2, h3, d2 = v2.getModuleCount() * t9 + 2 * e5, u2 = "";
168
- for (h3 = "l" + t9 + ",0 0," + t9 + " -" + t9 + ",0 0,-" + t9 + "z ", u2 += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', u2 += n4.scalable ? "" : ' width="' + d2 + 'px" height="' + d2 + 'px"', u2 += ' viewBox="0 0 ' + d2 + " " + d2 + '" ', u2 += ' preserveAspectRatio="xMinYMin meet"', u2 += r6.text || i5.text ? ' role="img" aria-labelledby="' + $([r6.id, i5.id].join(" ").trim()) + '"' : "", u2 += ">", u2 += r6.text ? '<title id="' + $(r6.id) + '">' + $(r6.text) + "</title>" : "", u2 += i5.text ? '<description id="' + $(i5.id) + '">' + $(i5.text) + "</description>" : "", u2 += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', u2 += '<path d="', s2 = 0; s2 < v2.getModuleCount(); s2 += 1) for (a2 = s2 * t9 + e5, o3 = 0; o3 < v2.getModuleCount(); o3 += 1) v2.isDark(s2, o3) && (u2 += "M" + (o3 * t9 + e5) + "," + a2 + h3);
166
+ "object" == typeof arguments[0] && (t10 = (n4 = arguments[0]).cellSize, e5 = n4.margin, i5 = n4.alt, r6 = n4.title), t10 = t10 || 2, e5 = void 0 === e5 ? 4 * t10 : e5, (i5 = "string" == typeof i5 ? { text: i5 } : i5 || {}).text = i5.text || null, i5.id = i5.text ? i5.id || "qrcode-description" : null, (r6 = "string" == typeof r6 ? { text: r6 } : r6 || {}).text = r6.text || null, r6.id = r6.text ? r6.id || "qrcode-title" : null;
167
+ var o3, s2, a2, h3, d2 = v2.getModuleCount() * t10 + 2 * e5, u2 = "";
168
+ for (h3 = "l" + t10 + ",0 0," + t10 + " -" + t10 + ",0 0,-" + t10 + "z ", u2 += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', u2 += n4.scalable ? "" : ' width="' + d2 + 'px" height="' + d2 + 'px"', u2 += ' viewBox="0 0 ' + d2 + " " + d2 + '" ', u2 += ' preserveAspectRatio="xMinYMin meet"', u2 += r6.text || i5.text ? ' role="img" aria-labelledby="' + $([r6.id, i5.id].join(" ").trim()) + '"' : "", u2 += ">", u2 += r6.text ? '<title id="' + $(r6.id) + '">' + $(r6.text) + "</title>" : "", u2 += i5.text ? '<description id="' + $(i5.id) + '">' + $(i5.text) + "</description>" : "", u2 += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', u2 += '<path d="', s2 = 0; s2 < v2.getModuleCount(); s2 += 1) for (a2 = s2 * t10 + e5, o3 = 0; o3 < v2.getModuleCount(); o3 += 1) v2.isDark(s2, o3) && (u2 += "M" + (o3 * t10 + e5) + "," + a2 + h3);
169
169
  return (u2 += '" stroke="transparent" fill="black"/>') + "</svg>";
170
- }, v2.createDataURL = function(t9, e5) {
171
- t9 = t9 || 2, e5 = void 0 === e5 ? 4 * t9 : e5;
172
- var i5 = v2.getModuleCount() * t9 + 2 * e5, r6 = e5, n4 = i5 - e5;
170
+ }, v2.createDataURL = function(t10, e5) {
171
+ t10 = t10 || 2, e5 = void 0 === e5 ? 4 * t10 : e5;
172
+ var i5 = v2.getModuleCount() * t10 + 2 * e5, r6 = e5, n4 = i5 - e5;
173
173
  return _(i5, i5, (function(e6, i6) {
174
174
  if (r6 <= e6 && e6 < n4 && r6 <= i6 && i6 < n4) {
175
- var o3 = Math.floor((e6 - r6) / t9), s2 = Math.floor((i6 - r6) / t9);
175
+ var o3 = Math.floor((e6 - r6) / t10), s2 = Math.floor((i6 - r6) / t10);
176
176
  return v2.isDark(s2, o3) ? 0 : 1;
177
177
  }
178
178
  return 1;
179
179
  }));
180
- }, v2.createImgTag = function(t9, e5, i5) {
181
- t9 = t9 || 2, e5 = void 0 === e5 ? 4 * t9 : e5;
182
- var r6 = v2.getModuleCount() * t9 + 2 * e5, n4 = "";
183
- return n4 += "<img", n4 += ' src="', n4 += v2.createDataURL(t9, e5), n4 += '"', n4 += ' width="', n4 += r6, n4 += '"', n4 += ' height="', n4 += r6, n4 += '"', i5 && (n4 += ' alt="', n4 += $(i5), n4 += '"'), n4 + "/>";
180
+ }, v2.createImgTag = function(t10, e5, i5) {
181
+ t10 = t10 || 2, e5 = void 0 === e5 ? 4 * t10 : e5;
182
+ var r6 = v2.getModuleCount() * t10 + 2 * e5, n4 = "";
183
+ return n4 += "<img", n4 += ' src="', n4 += v2.createDataURL(t10, e5), n4 += '"', n4 += ' width="', n4 += r6, n4 += '"', n4 += ' height="', n4 += r6, n4 += '"', i5 && (n4 += ' alt="', n4 += $(i5), n4 += '"'), n4 + "/>";
184
184
  };
185
- var $ = function(t9) {
186
- for (var e5 = "", i5 = 0; i5 < t9.length; i5 += 1) {
187
- var r6 = t9.charAt(i5);
185
+ var $ = function(t10) {
186
+ for (var e5 = "", i5 = 0; i5 < t10.length; i5 += 1) {
187
+ var r6 = t10.charAt(i5);
188
188
  switch (r6) {
189
189
  case "<":
190
190
  e5 += "&lt;";
@@ -204,40 +204,40 @@ var require_qr_code_styling = __commonJS({
204
204
  }
205
205
  return e5;
206
206
  };
207
- return v2.createASCII = function(t9, e5) {
208
- if ((t9 = t9 || 1) < 2) return (function(t10) {
209
- t10 = void 0 === t10 ? 2 : t10;
210
- var e6, i6, r7, n5, o4, s3 = 1 * v2.getModuleCount() + 2 * t10, a3 = t10, h4 = s3 - t10, d3 = { "\u2588\u2588": "\u2588", "\u2588 ": "\u2580", " \u2588": "\u2584", " ": " " }, u3 = { "\u2588\u2588": "\u2580", "\u2588 ": "\u2580", " \u2588": " ", " ": " " }, c3 = "";
207
+ return v2.createASCII = function(t10, e5) {
208
+ if ((t10 = t10 || 1) < 2) return (function(t11) {
209
+ t11 = void 0 === t11 ? 2 : t11;
210
+ var e6, i6, r7, n5, o4, s3 = 1 * v2.getModuleCount() + 2 * t11, a3 = t11, h4 = s3 - t11, d3 = { "\u2588\u2588": "\u2588", "\u2588 ": "\u2580", " \u2588": "\u2584", " ": " " }, u3 = { "\u2588\u2588": "\u2580", "\u2588 ": "\u2580", " \u2588": " ", " ": " " }, c3 = "";
211
211
  for (e6 = 0; e6 < s3; e6 += 2) {
212
- for (r7 = Math.floor((e6 - a3) / 1), n5 = Math.floor((e6 + 1 - a3) / 1), i6 = 0; i6 < s3; i6 += 1) o4 = "\u2588", a3 <= i6 && i6 < h4 && a3 <= e6 && e6 < h4 && v2.isDark(r7, Math.floor((i6 - a3) / 1)) && (o4 = " "), a3 <= i6 && i6 < h4 && a3 <= e6 + 1 && e6 + 1 < h4 && v2.isDark(n5, Math.floor((i6 - a3) / 1)) ? o4 += " " : o4 += "\u2588", c3 += t10 < 1 && e6 + 1 >= h4 ? u3[o4] : d3[o4];
212
+ for (r7 = Math.floor((e6 - a3) / 1), n5 = Math.floor((e6 + 1 - a3) / 1), i6 = 0; i6 < s3; i6 += 1) o4 = "\u2588", a3 <= i6 && i6 < h4 && a3 <= e6 && e6 < h4 && v2.isDark(r7, Math.floor((i6 - a3) / 1)) && (o4 = " "), a3 <= i6 && i6 < h4 && a3 <= e6 + 1 && e6 + 1 < h4 && v2.isDark(n5, Math.floor((i6 - a3) / 1)) ? o4 += " " : o4 += "\u2588", c3 += t11 < 1 && e6 + 1 >= h4 ? u3[o4] : d3[o4];
213
213
  c3 += "\n";
214
214
  }
215
- return s3 % 2 && t10 > 0 ? c3.substring(0, c3.length - s3 - 1) + Array(s3 + 1).join("\u2580") : c3.substring(0, c3.length - 1);
215
+ return s3 % 2 && t11 > 0 ? c3.substring(0, c3.length - s3 - 1) + Array(s3 + 1).join("\u2580") : c3.substring(0, c3.length - 1);
216
216
  })(e5);
217
- t9 -= 1, e5 = void 0 === e5 ? 2 * t9 : e5;
218
- var i5, r6, n4, o3, s2 = v2.getModuleCount() * t9 + 2 * e5, a2 = e5, h3 = s2 - e5, d2 = Array(t9 + 1).join("\u2588\u2588"), u2 = Array(t9 + 1).join(" "), c2 = "", l2 = "";
217
+ t10 -= 1, e5 = void 0 === e5 ? 2 * t10 : e5;
218
+ var i5, r6, n4, o3, s2 = v2.getModuleCount() * t10 + 2 * e5, a2 = e5, h3 = s2 - e5, d2 = Array(t10 + 1).join("\u2588\u2588"), u2 = Array(t10 + 1).join(" "), c2 = "", l2 = "";
219
219
  for (i5 = 0; i5 < s2; i5 += 1) {
220
- for (n4 = Math.floor((i5 - a2) / t9), l2 = "", r6 = 0; r6 < s2; r6 += 1) o3 = 1, a2 <= r6 && r6 < h3 && a2 <= i5 && i5 < h3 && v2.isDark(n4, Math.floor((r6 - a2) / t9)) && (o3 = 0), l2 += o3 ? d2 : u2;
221
- for (n4 = 0; n4 < t9; n4 += 1) c2 += l2 + "\n";
220
+ for (n4 = Math.floor((i5 - a2) / t10), l2 = "", r6 = 0; r6 < s2; r6 += 1) o3 = 1, a2 <= r6 && r6 < h3 && a2 <= i5 && i5 < h3 && v2.isDark(n4, Math.floor((r6 - a2) / t10)) && (o3 = 0), l2 += o3 ? d2 : u2;
221
+ for (n4 = 0; n4 < t10; n4 += 1) c2 += l2 + "\n";
222
222
  }
223
223
  return c2.substring(0, c2.length - 1);
224
- }, v2.renderTo2dContext = function(t9, e5) {
224
+ }, v2.renderTo2dContext = function(t10, e5) {
225
225
  e5 = e5 || 2;
226
- for (var i5 = v2.getModuleCount(), r6 = 0; r6 < i5; r6++) for (var n4 = 0; n4 < i5; n4++) t9.fillStyle = v2.isDark(r6, n4) ? "black" : "white", t9.fillRect(r6 * e5, n4 * e5, e5, e5);
226
+ for (var i5 = v2.getModuleCount(), r6 = 0; r6 < i5; r6++) for (var n4 = 0; n4 < i5; n4++) t10.fillStyle = v2.isDark(r6, n4) ? "black" : "white", t10.fillRect(r6 * e5, n4 * e5, e5, e5);
227
227
  }, v2;
228
228
  };
229
- t7.stringToBytes = (t7.stringToBytesFuncs = { default: function(t8) {
230
- for (var e4 = [], i4 = 0; i4 < t8.length; i4 += 1) {
231
- var r5 = t8.charCodeAt(i4);
229
+ t8.stringToBytes = (t8.stringToBytesFuncs = { default: function(t9) {
230
+ for (var e4 = [], i4 = 0; i4 < t9.length; i4 += 1) {
231
+ var r5 = t9.charCodeAt(i4);
232
232
  e4.push(255 & r5);
233
233
  }
234
234
  return e4;
235
- } }).default, t7.createStringToBytes = function(t8, e4) {
235
+ } }).default, t8.createStringToBytes = function(t9, e4) {
236
236
  var i4 = (function() {
237
- for (var i5 = v(t8), r6 = function() {
238
- var t9 = i5.read();
239
- if (-1 == t9) throw "eof";
240
- return t9;
237
+ for (var i5 = v(t9), r6 = function() {
238
+ var t10 = i5.read();
239
+ if (-1 == t10) throw "eof";
240
+ return t10;
241
241
  }, n3 = 0, o2 = {}; ; ) {
242
242
  var s2 = i5.read();
243
243
  if (-1 == s2) break;
@@ -247,71 +247,71 @@ var require_qr_code_styling = __commonJS({
247
247
  if (n3 != e4) throw n3 + " != " + e4;
248
248
  return o2;
249
249
  })(), r5 = "?".charCodeAt(0);
250
- return function(t9) {
251
- for (var e5 = [], n3 = 0; n3 < t9.length; n3 += 1) {
252
- var o2 = t9.charCodeAt(n3);
250
+ return function(t10) {
251
+ for (var e5 = [], n3 = 0; n3 < t10.length; n3 += 1) {
252
+ var o2 = t10.charCodeAt(n3);
253
253
  if (o2 < 128) e5.push(o2);
254
254
  else {
255
- var s2 = i4[t9.charAt(n3)];
255
+ var s2 = i4[t10.charAt(n3)];
256
256
  "number" == typeof s2 ? (255 & s2) == s2 ? e5.push(s2) : (e5.push(s2 >>> 8), e5.push(255 & s2)) : e5.push(r5);
257
257
  }
258
258
  }
259
259
  return e5;
260
260
  };
261
261
  };
262
- var e3, i3, r4, n2, o, s = { L: 1, M: 0, Q: 3, H: 2 }, a = (e3 = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], i3 = 1335, r4 = 7973, o = function(t8) {
263
- for (var e4 = 0; 0 != t8; ) e4 += 1, t8 >>>= 1;
262
+ var e3, i3, r4, n2, o, s = { L: 1, M: 0, Q: 3, H: 2 }, a = (e3 = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], i3 = 1335, r4 = 7973, o = function(t9) {
263
+ for (var e4 = 0; 0 != t9; ) e4 += 1, t9 >>>= 1;
264
264
  return e4;
265
- }, (n2 = {}).getBCHTypeInfo = function(t8) {
266
- for (var e4 = t8 << 10; o(e4) - o(i3) >= 0; ) e4 ^= i3 << o(e4) - o(i3);
267
- return 21522 ^ (t8 << 10 | e4);
268
- }, n2.getBCHTypeNumber = function(t8) {
269
- for (var e4 = t8 << 12; o(e4) - o(r4) >= 0; ) e4 ^= r4 << o(e4) - o(r4);
270
- return t8 << 12 | e4;
271
- }, n2.getPatternPosition = function(t8) {
272
- return e3[t8 - 1];
273
- }, n2.getMaskFunction = function(t8) {
274
- switch (t8) {
265
+ }, (n2 = {}).getBCHTypeInfo = function(t9) {
266
+ for (var e4 = t9 << 10; o(e4) - o(i3) >= 0; ) e4 ^= i3 << o(e4) - o(i3);
267
+ return 21522 ^ (t9 << 10 | e4);
268
+ }, n2.getBCHTypeNumber = function(t9) {
269
+ for (var e4 = t9 << 12; o(e4) - o(r4) >= 0; ) e4 ^= r4 << o(e4) - o(r4);
270
+ return t9 << 12 | e4;
271
+ }, n2.getPatternPosition = function(t9) {
272
+ return e3[t9 - 1];
273
+ }, n2.getMaskFunction = function(t9) {
274
+ switch (t9) {
275
275
  case 0:
276
- return function(t9, e4) {
277
- return (t9 + e4) % 2 == 0;
276
+ return function(t10, e4) {
277
+ return (t10 + e4) % 2 == 0;
278
278
  };
279
279
  case 1:
280
- return function(t9, e4) {
281
- return t9 % 2 == 0;
280
+ return function(t10, e4) {
281
+ return t10 % 2 == 0;
282
282
  };
283
283
  case 2:
284
- return function(t9, e4) {
284
+ return function(t10, e4) {
285
285
  return e4 % 3 == 0;
286
286
  };
287
287
  case 3:
288
- return function(t9, e4) {
289
- return (t9 + e4) % 3 == 0;
288
+ return function(t10, e4) {
289
+ return (t10 + e4) % 3 == 0;
290
290
  };
291
291
  case 4:
292
- return function(t9, e4) {
293
- return (Math.floor(t9 / 2) + Math.floor(e4 / 3)) % 2 == 0;
292
+ return function(t10, e4) {
293
+ return (Math.floor(t10 / 2) + Math.floor(e4 / 3)) % 2 == 0;
294
294
  };
295
295
  case 5:
296
- return function(t9, e4) {
297
- return t9 * e4 % 2 + t9 * e4 % 3 == 0;
296
+ return function(t10, e4) {
297
+ return t10 * e4 % 2 + t10 * e4 % 3 == 0;
298
298
  };
299
299
  case 6:
300
- return function(t9, e4) {
301
- return (t9 * e4 % 2 + t9 * e4 % 3) % 2 == 0;
300
+ return function(t10, e4) {
301
+ return (t10 * e4 % 2 + t10 * e4 % 3) % 2 == 0;
302
302
  };
303
303
  case 7:
304
- return function(t9, e4) {
305
- return (t9 * e4 % 3 + (t9 + e4) % 2) % 2 == 0;
304
+ return function(t10, e4) {
305
+ return (t10 * e4 % 3 + (t10 + e4) % 2) % 2 == 0;
306
306
  };
307
307
  default:
308
- throw "bad maskPattern:" + t8;
308
+ throw "bad maskPattern:" + t9;
309
309
  }
310
- }, n2.getErrorCorrectPolynomial = function(t8) {
311
- for (var e4 = d([1], 0), i4 = 0; i4 < t8; i4 += 1) e4 = e4.multiply(d([1, h.gexp(i4)], 0));
310
+ }, n2.getErrorCorrectPolynomial = function(t9) {
311
+ for (var e4 = d([1], 0), i4 = 0; i4 < t9; i4 += 1) e4 = e4.multiply(d([1, h.gexp(i4)], 0));
312
312
  return e4;
313
- }, n2.getLengthInBits = function(t8, e4) {
314
- if (1 <= e4 && e4 < 10) switch (t8) {
313
+ }, n2.getLengthInBits = function(t9, e4) {
314
+ if (1 <= e4 && e4 < 10) switch (t9) {
315
315
  case 1:
316
316
  return 10;
317
317
  case 2:
@@ -320,9 +320,9 @@ var require_qr_code_styling = __commonJS({
320
320
  case 8:
321
321
  return 8;
322
322
  default:
323
- throw "mode:" + t8;
323
+ throw "mode:" + t9;
324
324
  }
325
- else if (e4 < 27) switch (t8) {
325
+ else if (e4 < 27) switch (t9) {
326
326
  case 1:
327
327
  return 12;
328
328
  case 2:
@@ -332,11 +332,11 @@ var require_qr_code_styling = __commonJS({
332
332
  case 8:
333
333
  return 10;
334
334
  default:
335
- throw "mode:" + t8;
335
+ throw "mode:" + t9;
336
336
  }
337
337
  else {
338
338
  if (!(e4 < 41)) throw "type:" + e4;
339
- switch (t8) {
339
+ switch (t9) {
340
340
  case 1:
341
341
  return 14;
342
342
  case 2:
@@ -346,72 +346,72 @@ var require_qr_code_styling = __commonJS({
346
346
  case 8:
347
347
  return 12;
348
348
  default:
349
- throw "mode:" + t8;
349
+ throw "mode:" + t9;
350
350
  }
351
351
  }
352
- }, n2.getLostPoint = function(t8) {
353
- for (var e4 = t8.getModuleCount(), i4 = 0, r5 = 0; r5 < e4; r5 += 1) for (var n3 = 0; n3 < e4; n3 += 1) {
354
- for (var o2 = 0, s2 = t8.isDark(r5, n3), a2 = -1; a2 <= 1; a2 += 1) if (!(r5 + a2 < 0 || e4 <= r5 + a2)) for (var h2 = -1; h2 <= 1; h2 += 1) n3 + h2 < 0 || e4 <= n3 + h2 || 0 == a2 && 0 == h2 || s2 == t8.isDark(r5 + a2, n3 + h2) && (o2 += 1);
352
+ }, n2.getLostPoint = function(t9) {
353
+ for (var e4 = t9.getModuleCount(), i4 = 0, r5 = 0; r5 < e4; r5 += 1) for (var n3 = 0; n3 < e4; n3 += 1) {
354
+ for (var o2 = 0, s2 = t9.isDark(r5, n3), a2 = -1; a2 <= 1; a2 += 1) if (!(r5 + a2 < 0 || e4 <= r5 + a2)) for (var h2 = -1; h2 <= 1; h2 += 1) n3 + h2 < 0 || e4 <= n3 + h2 || 0 == a2 && 0 == h2 || s2 == t9.isDark(r5 + a2, n3 + h2) && (o2 += 1);
355
355
  o2 > 5 && (i4 += 3 + o2 - 5);
356
356
  }
357
357
  for (r5 = 0; r5 < e4 - 1; r5 += 1) for (n3 = 0; n3 < e4 - 1; n3 += 1) {
358
358
  var d2 = 0;
359
- t8.isDark(r5, n3) && (d2 += 1), t8.isDark(r5 + 1, n3) && (d2 += 1), t8.isDark(r5, n3 + 1) && (d2 += 1), t8.isDark(r5 + 1, n3 + 1) && (d2 += 1), 0 != d2 && 4 != d2 || (i4 += 3);
359
+ t9.isDark(r5, n3) && (d2 += 1), t9.isDark(r5 + 1, n3) && (d2 += 1), t9.isDark(r5, n3 + 1) && (d2 += 1), t9.isDark(r5 + 1, n3 + 1) && (d2 += 1), 0 != d2 && 4 != d2 || (i4 += 3);
360
360
  }
361
- for (r5 = 0; r5 < e4; r5 += 1) for (n3 = 0; n3 < e4 - 6; n3 += 1) t8.isDark(r5, n3) && !t8.isDark(r5, n3 + 1) && t8.isDark(r5, n3 + 2) && t8.isDark(r5, n3 + 3) && t8.isDark(r5, n3 + 4) && !t8.isDark(r5, n3 + 5) && t8.isDark(r5, n3 + 6) && (i4 += 40);
362
- for (n3 = 0; n3 < e4; n3 += 1) for (r5 = 0; r5 < e4 - 6; r5 += 1) t8.isDark(r5, n3) && !t8.isDark(r5 + 1, n3) && t8.isDark(r5 + 2, n3) && t8.isDark(r5 + 3, n3) && t8.isDark(r5 + 4, n3) && !t8.isDark(r5 + 5, n3) && t8.isDark(r5 + 6, n3) && (i4 += 40);
361
+ for (r5 = 0; r5 < e4; r5 += 1) for (n3 = 0; n3 < e4 - 6; n3 += 1) t9.isDark(r5, n3) && !t9.isDark(r5, n3 + 1) && t9.isDark(r5, n3 + 2) && t9.isDark(r5, n3 + 3) && t9.isDark(r5, n3 + 4) && !t9.isDark(r5, n3 + 5) && t9.isDark(r5, n3 + 6) && (i4 += 40);
362
+ for (n3 = 0; n3 < e4; n3 += 1) for (r5 = 0; r5 < e4 - 6; r5 += 1) t9.isDark(r5, n3) && !t9.isDark(r5 + 1, n3) && t9.isDark(r5 + 2, n3) && t9.isDark(r5 + 3, n3) && t9.isDark(r5 + 4, n3) && !t9.isDark(r5 + 5, n3) && t9.isDark(r5 + 6, n3) && (i4 += 40);
363
363
  var u2 = 0;
364
- for (n3 = 0; n3 < e4; n3 += 1) for (r5 = 0; r5 < e4; r5 += 1) t8.isDark(r5, n3) && (u2 += 1);
364
+ for (n3 = 0; n3 < e4; n3 += 1) for (r5 = 0; r5 < e4; r5 += 1) t9.isDark(r5, n3) && (u2 += 1);
365
365
  return i4 + Math.abs(100 * u2 / e4 / e4 - 50) / 5 * 10;
366
366
  }, n2), h = (function() {
367
- for (var t8 = new Array(256), e4 = new Array(256), i4 = 0; i4 < 8; i4 += 1) t8[i4] = 1 << i4;
368
- for (i4 = 8; i4 < 256; i4 += 1) t8[i4] = t8[i4 - 4] ^ t8[i4 - 5] ^ t8[i4 - 6] ^ t8[i4 - 8];
369
- for (i4 = 0; i4 < 255; i4 += 1) e4[t8[i4]] = i4;
370
- return { glog: function(t9) {
371
- if (t9 < 1) throw "glog(" + t9 + ")";
372
- return e4[t9];
367
+ for (var t9 = new Array(256), e4 = new Array(256), i4 = 0; i4 < 8; i4 += 1) t9[i4] = 1 << i4;
368
+ for (i4 = 8; i4 < 256; i4 += 1) t9[i4] = t9[i4 - 4] ^ t9[i4 - 5] ^ t9[i4 - 6] ^ t9[i4 - 8];
369
+ for (i4 = 0; i4 < 255; i4 += 1) e4[t9[i4]] = i4;
370
+ return { glog: function(t10) {
371
+ if (t10 < 1) throw "glog(" + t10 + ")";
372
+ return e4[t10];
373
373
  }, gexp: function(e5) {
374
374
  for (; e5 < 0; ) e5 += 255;
375
375
  for (; e5 >= 256; ) e5 -= 255;
376
- return t8[e5];
376
+ return t9[e5];
377
377
  } };
378
378
  })();
379
- function d(t8, e4) {
380
- if (void 0 === t8.length) throw t8.length + "/" + e4;
379
+ function d(t9, e4) {
380
+ if (void 0 === t9.length) throw t9.length + "/" + e4;
381
381
  var i4 = (function() {
382
- for (var i5 = 0; i5 < t8.length && 0 == t8[i5]; ) i5 += 1;
383
- for (var r6 = new Array(t8.length - i5 + e4), n3 = 0; n3 < t8.length - i5; n3 += 1) r6[n3] = t8[n3 + i5];
382
+ for (var i5 = 0; i5 < t9.length && 0 == t9[i5]; ) i5 += 1;
383
+ for (var r6 = new Array(t9.length - i5 + e4), n3 = 0; n3 < t9.length - i5; n3 += 1) r6[n3] = t9[n3 + i5];
384
384
  return r6;
385
- })(), r5 = { getAt: function(t9) {
386
- return i4[t9];
385
+ })(), r5 = { getAt: function(t10) {
386
+ return i4[t10];
387
387
  }, getLength: function() {
388
388
  return i4.length;
389
- }, multiply: function(t9) {
390
- for (var e5 = new Array(r5.getLength() + t9.getLength() - 1), i5 = 0; i5 < r5.getLength(); i5 += 1) for (var n3 = 0; n3 < t9.getLength(); n3 += 1) e5[i5 + n3] ^= h.gexp(h.glog(r5.getAt(i5)) + h.glog(t9.getAt(n3)));
389
+ }, multiply: function(t10) {
390
+ for (var e5 = new Array(r5.getLength() + t10.getLength() - 1), i5 = 0; i5 < r5.getLength(); i5 += 1) for (var n3 = 0; n3 < t10.getLength(); n3 += 1) e5[i5 + n3] ^= h.gexp(h.glog(r5.getAt(i5)) + h.glog(t10.getAt(n3)));
391
391
  return d(e5, 0);
392
- }, mod: function(t9) {
393
- if (r5.getLength() - t9.getLength() < 0) return r5;
394
- for (var e5 = h.glog(r5.getAt(0)) - h.glog(t9.getAt(0)), i5 = new Array(r5.getLength()), n3 = 0; n3 < r5.getLength(); n3 += 1) i5[n3] = r5.getAt(n3);
395
- for (n3 = 0; n3 < t9.getLength(); n3 += 1) i5[n3] ^= h.gexp(h.glog(t9.getAt(n3)) + e5);
396
- return d(i5, 0).mod(t9);
392
+ }, mod: function(t10) {
393
+ if (r5.getLength() - t10.getLength() < 0) return r5;
394
+ for (var e5 = h.glog(r5.getAt(0)) - h.glog(t10.getAt(0)), i5 = new Array(r5.getLength()), n3 = 0; n3 < r5.getLength(); n3 += 1) i5[n3] = r5.getAt(n3);
395
+ for (n3 = 0; n3 < t10.getLength(); n3 += 1) i5[n3] ^= h.gexp(h.glog(t10.getAt(n3)) + e5);
396
+ return d(i5, 0).mod(t10);
397
397
  } };
398
398
  return r5;
399
399
  }
400
400
  var u = /* @__PURE__ */ (function() {
401
- var t8 = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], e4 = function(t9, e5) {
401
+ var t9 = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], e4 = function(t10, e5) {
402
402
  var i5 = {};
403
- return i5.totalCount = t9, i5.dataCount = e5, i5;
403
+ return i5.totalCount = t10, i5.dataCount = e5, i5;
404
404
  }, i4 = { getRSBlocks: function(i5, r5) {
405
405
  var n3 = (function(e5, i6) {
406
406
  switch (i6) {
407
407
  case s.L:
408
- return t8[4 * (e5 - 1) + 0];
408
+ return t9[4 * (e5 - 1) + 0];
409
409
  case s.M:
410
- return t8[4 * (e5 - 1) + 1];
410
+ return t9[4 * (e5 - 1) + 1];
411
411
  case s.Q:
412
- return t8[4 * (e5 - 1) + 2];
412
+ return t9[4 * (e5 - 1) + 2];
413
413
  case s.H:
414
- return t8[4 * (e5 - 1) + 3];
414
+ return t9[4 * (e5 - 1) + 3];
415
415
  default:
416
416
  return;
417
417
  }
@@ -422,48 +422,48 @@ var require_qr_code_styling = __commonJS({
422
422
  } };
423
423
  return i4;
424
424
  })(), c = function() {
425
- var t8 = [], e4 = 0, i4 = { getBuffer: function() {
426
- return t8;
425
+ var t9 = [], e4 = 0, i4 = { getBuffer: function() {
426
+ return t9;
427
427
  }, getAt: function(e5) {
428
428
  var i5 = Math.floor(e5 / 8);
429
- return 1 == (t8[i5] >>> 7 - e5 % 8 & 1);
430
- }, put: function(t9, e5) {
431
- for (var r5 = 0; r5 < e5; r5 += 1) i4.putBit(1 == (t9 >>> e5 - r5 - 1 & 1));
429
+ return 1 == (t9[i5] >>> 7 - e5 % 8 & 1);
430
+ }, put: function(t10, e5) {
431
+ for (var r5 = 0; r5 < e5; r5 += 1) i4.putBit(1 == (t10 >>> e5 - r5 - 1 & 1));
432
432
  }, getLengthInBits: function() {
433
433
  return e4;
434
434
  }, putBit: function(i5) {
435
435
  var r5 = Math.floor(e4 / 8);
436
- t8.length <= r5 && t8.push(0), i5 && (t8[r5] |= 128 >>> e4 % 8), e4 += 1;
436
+ t9.length <= r5 && t9.push(0), i5 && (t9[r5] |= 128 >>> e4 % 8), e4 += 1;
437
437
  } };
438
438
  return i4;
439
- }, l = function(t8) {
440
- var e4 = t8, i4 = { getMode: function() {
439
+ }, l = function(t9) {
440
+ var e4 = t9, i4 = { getMode: function() {
441
441
  return 1;
442
- }, getLength: function(t9) {
442
+ }, getLength: function(t10) {
443
443
  return e4.length;
444
- }, write: function(t9) {
445
- for (var i5 = e4, n4 = 0; n4 + 2 < i5.length; ) t9.put(r5(i5.substring(n4, n4 + 3)), 10), n4 += 3;
446
- n4 < i5.length && (i5.length - n4 == 1 ? t9.put(r5(i5.substring(n4, n4 + 1)), 4) : i5.length - n4 == 2 && t9.put(r5(i5.substring(n4, n4 + 2)), 7));
447
- } }, r5 = function(t9) {
448
- for (var e5 = 0, i5 = 0; i5 < t9.length; i5 += 1) e5 = 10 * e5 + n3(t9.charAt(i5));
444
+ }, write: function(t10) {
445
+ for (var i5 = e4, n4 = 0; n4 + 2 < i5.length; ) t10.put(r5(i5.substring(n4, n4 + 3)), 10), n4 += 3;
446
+ n4 < i5.length && (i5.length - n4 == 1 ? t10.put(r5(i5.substring(n4, n4 + 1)), 4) : i5.length - n4 == 2 && t10.put(r5(i5.substring(n4, n4 + 2)), 7));
447
+ } }, r5 = function(t10) {
448
+ for (var e5 = 0, i5 = 0; i5 < t10.length; i5 += 1) e5 = 10 * e5 + n3(t10.charAt(i5));
449
449
  return e5;
450
- }, n3 = function(t9) {
451
- if ("0" <= t9 && t9 <= "9") return t9.charCodeAt(0) - "0".charCodeAt(0);
452
- throw "illegal char :" + t9;
450
+ }, n3 = function(t10) {
451
+ if ("0" <= t10 && t10 <= "9") return t10.charCodeAt(0) - "0".charCodeAt(0);
452
+ throw "illegal char :" + t10;
453
453
  };
454
454
  return i4;
455
- }, g = function(t8) {
456
- var e4 = t8, i4 = { getMode: function() {
455
+ }, g = function(t9) {
456
+ var e4 = t9, i4 = { getMode: function() {
457
457
  return 2;
458
- }, getLength: function(t9) {
458
+ }, getLength: function(t10) {
459
459
  return e4.length;
460
- }, write: function(t9) {
461
- for (var i5 = e4, n3 = 0; n3 + 1 < i5.length; ) t9.put(45 * r5(i5.charAt(n3)) + r5(i5.charAt(n3 + 1)), 11), n3 += 2;
462
- n3 < i5.length && t9.put(r5(i5.charAt(n3)), 6);
463
- } }, r5 = function(t9) {
464
- if ("0" <= t9 && t9 <= "9") return t9.charCodeAt(0) - "0".charCodeAt(0);
465
- if ("A" <= t9 && t9 <= "Z") return t9.charCodeAt(0) - "A".charCodeAt(0) + 10;
466
- switch (t9) {
460
+ }, write: function(t10) {
461
+ for (var i5 = e4, n3 = 0; n3 + 1 < i5.length; ) t10.put(45 * r5(i5.charAt(n3)) + r5(i5.charAt(n3 + 1)), 11), n3 += 2;
462
+ n3 < i5.length && t10.put(r5(i5.charAt(n3)), 6);
463
+ } }, r5 = function(t10) {
464
+ if ("0" <= t10 && t10 <= "9") return t10.charCodeAt(0) - "0".charCodeAt(0);
465
+ if ("A" <= t10 && t10 <= "Z") return t10.charCodeAt(0) - "A".charCodeAt(0) + 10;
466
+ switch (t10) {
467
467
  case " ":
468
468
  return 36;
469
469
  case "$":
@@ -483,31 +483,31 @@ var require_qr_code_styling = __commonJS({
483
483
  case ":":
484
484
  return 44;
485
485
  default:
486
- throw "illegal char :" + t9;
486
+ throw "illegal char :" + t10;
487
487
  }
488
488
  };
489
489
  return i4;
490
490
  }, f = function(e4) {
491
- var i4 = t7.stringToBytes(e4);
491
+ var i4 = t8.stringToBytes(e4);
492
492
  return { getMode: function() {
493
493
  return 4;
494
- }, getLength: function(t8) {
494
+ }, getLength: function(t9) {
495
495
  return i4.length;
496
- }, write: function(t8) {
497
- for (var e5 = 0; e5 < i4.length; e5 += 1) t8.put(i4[e5], 8);
496
+ }, write: function(t9) {
497
+ for (var e5 = 0; e5 < i4.length; e5 += 1) t9.put(i4[e5], 8);
498
498
  } };
499
499
  }, w = function(e4) {
500
- var i4 = t7.stringToBytesFuncs.SJIS;
500
+ var i4 = t8.stringToBytesFuncs.SJIS;
501
501
  if (!i4) throw "sjis not supported.";
502
502
  !(function() {
503
- var t8 = i4("\u53CB");
504
- if (2 != t8.length || 38726 != (t8[0] << 8 | t8[1])) throw "sjis not supported.";
503
+ var t9 = i4("\u53CB");
504
+ if (2 != t9.length || 38726 != (t9[0] << 8 | t9[1])) throw "sjis not supported.";
505
505
  })();
506
506
  var r5 = i4(e4), n3 = { getMode: function() {
507
507
  return 8;
508
- }, getLength: function(t8) {
508
+ }, getLength: function(t9) {
509
509
  return ~~(r5.length / 2);
510
- }, write: function(t8) {
510
+ }, write: function(t9) {
511
511
  for (var e5 = r5, i5 = 0; i5 + 1 < e5.length; ) {
512
512
  var n4 = (255 & e5[i5]) << 8 | 255 & e5[i5 + 1];
513
513
  if (33088 <= n4 && n4 <= 40956) n4 -= 33088;
@@ -515,69 +515,69 @@ var require_qr_code_styling = __commonJS({
515
515
  if (!(57408 <= n4 && n4 <= 60351)) throw "illegal char at " + (i5 + 1) + "/" + n4;
516
516
  n4 -= 49472;
517
517
  }
518
- n4 = 192 * (n4 >>> 8 & 255) + (255 & n4), t8.put(n4, 13), i5 += 2;
518
+ n4 = 192 * (n4 >>> 8 & 255) + (255 & n4), t9.put(n4, 13), i5 += 2;
519
519
  }
520
520
  if (i5 < e5.length) throw "illegal char at " + (i5 + 1);
521
521
  } };
522
522
  return n3;
523
523
  }, p = function() {
524
- var t8 = [], e4 = { writeByte: function(e5) {
525
- t8.push(255 & e5);
526
- }, writeShort: function(t9) {
527
- e4.writeByte(t9), e4.writeByte(t9 >>> 8);
528
- }, writeBytes: function(t9, i4, r5) {
529
- i4 = i4 || 0, r5 = r5 || t9.length;
530
- for (var n3 = 0; n3 < r5; n3 += 1) e4.writeByte(t9[n3 + i4]);
531
- }, writeString: function(t9) {
532
- for (var i4 = 0; i4 < t9.length; i4 += 1) e4.writeByte(t9.charCodeAt(i4));
524
+ var t9 = [], e4 = { writeByte: function(e5) {
525
+ t9.push(255 & e5);
526
+ }, writeShort: function(t10) {
527
+ e4.writeByte(t10), e4.writeByte(t10 >>> 8);
528
+ }, writeBytes: function(t10, i4, r5) {
529
+ i4 = i4 || 0, r5 = r5 || t10.length;
530
+ for (var n3 = 0; n3 < r5; n3 += 1) e4.writeByte(t10[n3 + i4]);
531
+ }, writeString: function(t10) {
532
+ for (var i4 = 0; i4 < t10.length; i4 += 1) e4.writeByte(t10.charCodeAt(i4));
533
533
  }, toByteArray: function() {
534
- return t8;
534
+ return t9;
535
535
  }, toString: function() {
536
536
  var e5 = "";
537
537
  e5 += "[";
538
- for (var i4 = 0; i4 < t8.length; i4 += 1) i4 > 0 && (e5 += ","), e5 += t8[i4];
538
+ for (var i4 = 0; i4 < t9.length; i4 += 1) i4 > 0 && (e5 += ","), e5 += t9[i4];
539
539
  return e5 + "]";
540
540
  } };
541
541
  return e4;
542
- }, v = function(t8) {
543
- var e4 = t8, i4 = 0, r5 = 0, n3 = 0, o2 = { read: function() {
542
+ }, v = function(t9) {
543
+ var e4 = t9, i4 = 0, r5 = 0, n3 = 0, o2 = { read: function() {
544
544
  for (; n3 < 8; ) {
545
545
  if (i4 >= e4.length) {
546
546
  if (0 == n3) return -1;
547
547
  throw "unexpected end of file./" + n3;
548
548
  }
549
- var t9 = e4.charAt(i4);
550
- if (i4 += 1, "=" == t9) return n3 = 0, -1;
551
- t9.match(/^\s$/) || (r5 = r5 << 6 | s2(t9.charCodeAt(0)), n3 += 6);
549
+ var t10 = e4.charAt(i4);
550
+ if (i4 += 1, "=" == t10) return n3 = 0, -1;
551
+ t10.match(/^\s$/) || (r5 = r5 << 6 | s2(t10.charCodeAt(0)), n3 += 6);
552
552
  }
553
553
  var o3 = r5 >>> n3 - 8 & 255;
554
554
  return n3 -= 8, o3;
555
- } }, s2 = function(t9) {
556
- if (65 <= t9 && t9 <= 90) return t9 - 65;
557
- if (97 <= t9 && t9 <= 122) return t9 - 97 + 26;
558
- if (48 <= t9 && t9 <= 57) return t9 - 48 + 52;
559
- if (43 == t9) return 62;
560
- if (47 == t9) return 63;
561
- throw "c:" + t9;
555
+ } }, s2 = function(t10) {
556
+ if (65 <= t10 && t10 <= 90) return t10 - 65;
557
+ if (97 <= t10 && t10 <= 122) return t10 - 97 + 26;
558
+ if (48 <= t10 && t10 <= 57) return t10 - 48 + 52;
559
+ if (43 == t10) return 62;
560
+ if (47 == t10) return 63;
561
+ throw "c:" + t10;
562
562
  };
563
563
  return o2;
564
- }, _ = function(t8, e4, i4) {
565
- for (var r5 = (function(t9, e5) {
566
- var i5 = t9, r6 = e5, n4 = new Array(t9 * e5), o3 = { setPixel: function(t10, e6, r7) {
567
- n4[e6 * i5 + t10] = r7;
568
- }, write: function(t10) {
569
- t10.writeString("GIF87a"), t10.writeShort(i5), t10.writeShort(r6), t10.writeByte(128), t10.writeByte(0), t10.writeByte(0), t10.writeByte(0), t10.writeByte(0), t10.writeByte(0), t10.writeByte(255), t10.writeByte(255), t10.writeByte(255), t10.writeString(","), t10.writeShort(0), t10.writeShort(0), t10.writeShort(i5), t10.writeShort(r6), t10.writeByte(0);
564
+ }, _ = function(t9, e4, i4) {
565
+ for (var r5 = (function(t10, e5) {
566
+ var i5 = t10, r6 = e5, n4 = new Array(t10 * e5), o3 = { setPixel: function(t11, e6, r7) {
567
+ n4[e6 * i5 + t11] = r7;
568
+ }, write: function(t11) {
569
+ t11.writeString("GIF87a"), t11.writeShort(i5), t11.writeShort(r6), t11.writeByte(128), t11.writeByte(0), t11.writeByte(0), t11.writeByte(0), t11.writeByte(0), t11.writeByte(0), t11.writeByte(255), t11.writeByte(255), t11.writeByte(255), t11.writeString(","), t11.writeShort(0), t11.writeShort(0), t11.writeShort(i5), t11.writeShort(r6), t11.writeByte(0);
570
570
  var e6 = s3(2);
571
- t10.writeByte(2);
572
- for (var n5 = 0; e6.length - n5 > 255; ) t10.writeByte(255), t10.writeBytes(e6, n5, 255), n5 += 255;
573
- t10.writeByte(e6.length - n5), t10.writeBytes(e6, n5, e6.length - n5), t10.writeByte(0), t10.writeString(";");
574
- } }, s3 = function(t10) {
575
- for (var e6 = 1 << t10, i6 = 1 + (1 << t10), r7 = t10 + 1, o4 = a3(), s4 = 0; s4 < e6; s4 += 1) o4.add(String.fromCharCode(s4));
571
+ t11.writeByte(2);
572
+ for (var n5 = 0; e6.length - n5 > 255; ) t11.writeByte(255), t11.writeBytes(e6, n5, 255), n5 += 255;
573
+ t11.writeByte(e6.length - n5), t11.writeBytes(e6, n5, e6.length - n5), t11.writeByte(0), t11.writeString(";");
574
+ } }, s3 = function(t11) {
575
+ for (var e6 = 1 << t11, i6 = 1 + (1 << t11), r7 = t11 + 1, o4 = a3(), s4 = 0; s4 < e6; s4 += 1) o4.add(String.fromCharCode(s4));
576
576
  o4.add(String.fromCharCode(e6)), o4.add(String.fromCharCode(i6));
577
- var h3, d3, u2, c2 = p(), l2 = (h3 = c2, d3 = 0, u2 = 0, { write: function(t11, e7) {
578
- if (t11 >>> e7 != 0) throw "length over";
579
- for (; d3 + e7 >= 8; ) h3.writeByte(255 & (t11 << d3 | u2)), e7 -= 8 - d3, t11 >>>= 8 - d3, u2 = 0, d3 = 0;
580
- u2 |= t11 << d3, d3 += e7;
577
+ var h3, d3, u2, c2 = p(), l2 = (h3 = c2, d3 = 0, u2 = 0, { write: function(t12, e7) {
578
+ if (t12 >>> e7 != 0) throw "length over";
579
+ for (; d3 + e7 >= 8; ) h3.writeByte(255 & (t12 << d3 | u2)), e7 -= 8 - d3, t12 >>>= 8 - d3, u2 = 0, d3 = 0;
580
+ u2 |= t12 << d3, d3 += e7;
581
581
  }, flush: function() {
582
582
  d3 > 0 && h3.writeByte(u2);
583
583
  } });
@@ -589,95 +589,95 @@ var require_qr_code_styling = __commonJS({
589
589
  }
590
590
  return l2.write(o4.indexOf(f2), r7), l2.write(i6, r7), l2.flush(), c2.toByteArray();
591
591
  }, a3 = function() {
592
- var t10 = {}, e6 = 0, i6 = { add: function(r7) {
592
+ var t11 = {}, e6 = 0, i6 = { add: function(r7) {
593
593
  if (i6.contains(r7)) throw "dup key:" + r7;
594
- t10[r7] = e6, e6 += 1;
594
+ t11[r7] = e6, e6 += 1;
595
595
  }, size: function() {
596
596
  return e6;
597
597
  }, indexOf: function(e7) {
598
- return t10[e7];
598
+ return t11[e7];
599
599
  }, contains: function(e7) {
600
- return void 0 !== t10[e7];
600
+ return void 0 !== t11[e7];
601
601
  } };
602
602
  return i6;
603
603
  };
604
604
  return o3;
605
- })(t8, e4), n3 = 0; n3 < e4; n3 += 1) for (var o2 = 0; o2 < t8; o2 += 1) r5.setPixel(o2, n3, i4(o2, n3));
605
+ })(t9, e4), n3 = 0; n3 < e4; n3 += 1) for (var o2 = 0; o2 < t9; o2 += 1) r5.setPixel(o2, n3, i4(o2, n3));
606
606
  var s2 = p();
607
607
  r5.write(s2);
608
608
  for (var a2 = (function() {
609
- var t9 = 0, e5 = 0, i5 = 0, r6 = "", n4 = {}, o3 = function(t10) {
610
- r6 += String.fromCharCode(s3(63 & t10));
611
- }, s3 = function(t10) {
612
- if (t10 < 0) ;
609
+ var t10 = 0, e5 = 0, i5 = 0, r6 = "", n4 = {}, o3 = function(t11) {
610
+ r6 += String.fromCharCode(s3(63 & t11));
611
+ }, s3 = function(t11) {
612
+ if (t11 < 0) ;
613
613
  else {
614
- if (t10 < 26) return 65 + t10;
615
- if (t10 < 52) return t10 - 26 + 97;
616
- if (t10 < 62) return t10 - 52 + 48;
617
- if (62 == t10) return 43;
618
- if (63 == t10) return 47;
614
+ if (t11 < 26) return 65 + t11;
615
+ if (t11 < 52) return t11 - 26 + 97;
616
+ if (t11 < 62) return t11 - 52 + 48;
617
+ if (62 == t11) return 43;
618
+ if (63 == t11) return 47;
619
619
  }
620
- throw "n:" + t10;
620
+ throw "n:" + t11;
621
621
  };
622
622
  return n4.writeByte = function(r7) {
623
- for (t9 = t9 << 8 | 255 & r7, e5 += 8, i5 += 1; e5 >= 6; ) o3(t9 >>> e5 - 6), e5 -= 6;
623
+ for (t10 = t10 << 8 | 255 & r7, e5 += 8, i5 += 1; e5 >= 6; ) o3(t10 >>> e5 - 6), e5 -= 6;
624
624
  }, n4.flush = function() {
625
- if (e5 > 0 && (o3(t9 << 6 - e5), t9 = 0, e5 = 0), i5 % 3 != 0) for (var n5 = 3 - i5 % 3, s4 = 0; s4 < n5; s4 += 1) r6 += "=";
625
+ if (e5 > 0 && (o3(t10 << 6 - e5), t10 = 0, e5 = 0), i5 % 3 != 0) for (var n5 = 3 - i5 % 3, s4 = 0; s4 < n5; s4 += 1) r6 += "=";
626
626
  }, n4.toString = function() {
627
627
  return r6;
628
628
  }, n4;
629
629
  })(), h2 = s2.toByteArray(), d2 = 0; d2 < h2.length; d2 += 1) a2.writeByte(h2[d2]);
630
630
  return a2.flush(), "data:image/gif;base64," + a2;
631
631
  };
632
- return t7;
632
+ return t8;
633
633
  })();
634
- n.stringToBytesFuncs["UTF-8"] = function(t7) {
635
- return (function(t8) {
636
- for (var e3 = [], i3 = 0; i3 < t8.length; i3++) {
637
- var r4 = t8.charCodeAt(i3);
638
- r4 < 128 ? e3.push(r4) : r4 < 2048 ? e3.push(192 | r4 >> 6, 128 | 63 & r4) : r4 < 55296 || r4 >= 57344 ? e3.push(224 | r4 >> 12, 128 | r4 >> 6 & 63, 128 | 63 & r4) : (i3++, r4 = 65536 + ((1023 & r4) << 10 | 1023 & t8.charCodeAt(i3)), e3.push(240 | r4 >> 18, 128 | r4 >> 12 & 63, 128 | r4 >> 6 & 63, 128 | 63 & r4));
634
+ n.stringToBytesFuncs["UTF-8"] = function(t8) {
635
+ return (function(t9) {
636
+ for (var e3 = [], i3 = 0; i3 < t9.length; i3++) {
637
+ var r4 = t9.charCodeAt(i3);
638
+ r4 < 128 ? e3.push(r4) : r4 < 2048 ? e3.push(192 | r4 >> 6, 128 | 63 & r4) : r4 < 55296 || r4 >= 57344 ? e3.push(224 | r4 >> 12, 128 | r4 >> 6 & 63, 128 | 63 & r4) : (i3++, r4 = 65536 + ((1023 & r4) << 10 | 1023 & t9.charCodeAt(i3)), e3.push(240 | r4 >> 18, 128 | r4 >> 12 & 63, 128 | r4 >> 6 & 63, 128 | 63 & r4));
639
639
  }
640
640
  return e3;
641
- })(t7);
641
+ })(t8);
642
642
  }, void 0 === (r3 = "function" == typeof (i2 = function() {
643
643
  return n;
644
- }) ? i2.apply(e2, []) : i2) || (t6.exports = r3);
644
+ }) ? i2.apply(e2, []) : i2) || (t7.exports = r3);
645
645
  } }, e = {};
646
646
  function i(r3) {
647
647
  var n = e[r3];
648
648
  if (void 0 !== n) return n.exports;
649
649
  var o = e[r3] = { exports: {} };
650
- return t5[r3](o, o.exports, i), o.exports;
650
+ return t6[r3](o, o.exports, i), o.exports;
651
651
  }
652
- i.n = (t6) => {
653
- var e2 = t6 && t6.__esModule ? () => t6.default : () => t6;
652
+ i.n = (t7) => {
653
+ var e2 = t7 && t7.__esModule ? () => t7.default : () => t7;
654
654
  return i.d(e2, { a: e2 }), e2;
655
- }, i.d = (t6, e2) => {
656
- for (var r3 in e2) i.o(e2, r3) && !i.o(t6, r3) && Object.defineProperty(t6, r3, { enumerable: true, get: e2[r3] });
657
- }, i.o = (t6, e2) => Object.prototype.hasOwnProperty.call(t6, e2);
655
+ }, i.d = (t7, e2) => {
656
+ for (var r3 in e2) i.o(e2, r3) && !i.o(t7, r3) && Object.defineProperty(t7, r3, { enumerable: true, get: e2[r3] });
657
+ }, i.o = (t7, e2) => Object.prototype.hasOwnProperty.call(t7, e2);
658
658
  var r2 = {};
659
659
  return (() => {
660
660
  "use strict";
661
661
  i.d(r2, { default: () => $ });
662
- const t6 = (t7) => !!t7 && "object" == typeof t7 && !Array.isArray(t7);
662
+ const t7 = (t8) => !!t8 && "object" == typeof t8 && !Array.isArray(t8);
663
663
  function e2(i2, ...r3) {
664
664
  if (!r3.length) return i2;
665
665
  const n2 = r3.shift();
666
- return void 0 !== n2 && t6(i2) && t6(n2) ? (i2 = Object.assign({}, i2), Object.keys(n2).forEach(((r4) => {
666
+ return void 0 !== n2 && t7(i2) && t7(n2) ? (i2 = Object.assign({}, i2), Object.keys(n2).forEach(((r4) => {
667
667
  const o2 = i2[r4], s2 = n2[r4];
668
- Array.isArray(o2) && Array.isArray(s2) ? i2[r4] = s2 : t6(o2) && t6(s2) ? i2[r4] = e2(Object.assign({}, o2), s2) : i2[r4] = s2;
668
+ Array.isArray(o2) && Array.isArray(s2) ? i2[r4] = s2 : t7(o2) && t7(s2) ? i2[r4] = e2(Object.assign({}, o2), s2) : i2[r4] = s2;
669
669
  })), e2(i2, ...r3)) : i2;
670
670
  }
671
- function n(t7, e3) {
671
+ function n(t8, e3) {
672
672
  const i2 = document.createElement("a");
673
- i2.download = e3, i2.href = t7, document.body.appendChild(i2), i2.click(), document.body.removeChild(i2);
673
+ i2.download = e3, i2.href = t8, document.body.appendChild(i2), i2.click(), document.body.removeChild(i2);
674
674
  }
675
675
  const o = { L: 0.07, M: 0.15, Q: 0.25, H: 0.3 };
676
676
  class s {
677
- constructor({ svg: t7, type: e3, window: i2 }) {
678
- this._svg = t7, this._type = e3, this._window = i2;
677
+ constructor({ svg: t8, type: e3, window: i2 }) {
678
+ this._svg = t8, this._type = e3, this._window = i2;
679
679
  }
680
- draw(t7, e3, i2, r3) {
680
+ draw(t8, e3, i2, r3) {
681
681
  let n2;
682
682
  switch (this._type) {
683
683
  case "dots":
@@ -698,100 +698,100 @@ var require_qr_code_styling = __commonJS({
698
698
  default:
699
699
  n2 = this._drawSquare;
700
700
  }
701
- n2.call(this, { x: t7, y: e3, size: i2, getNeighbor: r3 });
701
+ n2.call(this, { x: t8, y: e3, size: i2, getNeighbor: r3 });
702
702
  }
703
- _rotateFigure({ x: t7, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
703
+ _rotateFigure({ x: t8, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
704
704
  var o2;
705
- const s2 = t7 + i2 / 2, a2 = e3 + i2 / 2;
705
+ const s2 = t8 + i2 / 2, a2 = e3 + i2 / 2;
706
706
  n2(), null === (o2 = this._element) || void 0 === o2 || o2.setAttribute("transform", `rotate(${180 * r3 / Math.PI},${s2},${a2})`);
707
707
  }
708
- _basicDot(t7) {
709
- const { size: e3, x: i2, y: r3 } = t7;
710
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
708
+ _basicDot(t8) {
709
+ const { size: e3, x: i2, y: r3 } = t8;
710
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
711
711
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(i2 + e3 / 2)), this._element.setAttribute("cy", String(r3 + e3 / 2)), this._element.setAttribute("r", String(e3 / 2));
712
712
  } }));
713
713
  }
714
- _basicSquare(t7) {
715
- const { size: e3, x: i2, y: r3 } = t7;
716
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
714
+ _basicSquare(t8) {
715
+ const { size: e3, x: i2, y: r3 } = t8;
716
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
717
717
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(i2)), this._element.setAttribute("y", String(r3)), this._element.setAttribute("width", String(e3)), this._element.setAttribute("height", String(e3));
718
718
  } }));
719
719
  }
720
- _basicSideRounded(t7) {
721
- const { size: e3, x: i2, y: r3 } = t7;
722
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
720
+ _basicSideRounded(t8) {
721
+ const { size: e3, x: i2, y: r3 } = t8;
722
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
723
723
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${i2} ${r3}v ${e3}h ` + e3 / 2 + `a ${e3 / 2} ${e3 / 2}, 0, 0, 0, 0 ${-e3}`);
724
724
  } }));
725
725
  }
726
- _basicCornerRounded(t7) {
727
- const { size: e3, x: i2, y: r3 } = t7;
728
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
726
+ _basicCornerRounded(t8) {
727
+ const { size: e3, x: i2, y: r3 } = t8;
728
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
729
729
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${i2} ${r3}v ${e3}h ${e3}v ` + -e3 / 2 + `a ${e3 / 2} ${e3 / 2}, 0, 0, 0, ${-e3 / 2} ${-e3 / 2}`);
730
730
  } }));
731
731
  }
732
- _basicCornerExtraRounded(t7) {
733
- const { size: e3, x: i2, y: r3 } = t7;
734
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
732
+ _basicCornerExtraRounded(t8) {
733
+ const { size: e3, x: i2, y: r3 } = t8;
734
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
735
735
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${i2} ${r3}v ${e3}h ${e3}a ${e3} ${e3}, 0, 0, 0, ${-e3} ${-e3}`);
736
736
  } }));
737
737
  }
738
- _basicCornersRounded(t7) {
739
- const { size: e3, x: i2, y: r3 } = t7;
740
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
738
+ _basicCornersRounded(t8) {
739
+ const { size: e3, x: i2, y: r3 } = t8;
740
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
741
741
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${i2} ${r3}v ` + e3 / 2 + `a ${e3 / 2} ${e3 / 2}, 0, 0, 0, ${e3 / 2} ${e3 / 2}h ` + e3 / 2 + "v " + -e3 / 2 + `a ${e3 / 2} ${e3 / 2}, 0, 0, 0, ${-e3 / 2} ${-e3 / 2}`);
742
742
  } }));
743
743
  }
744
- _drawDot({ x: t7, y: e3, size: i2 }) {
745
- this._basicDot({ x: t7, y: e3, size: i2, rotation: 0 });
744
+ _drawDot({ x: t8, y: e3, size: i2 }) {
745
+ this._basicDot({ x: t8, y: e3, size: i2, rotation: 0 });
746
746
  }
747
- _drawSquare({ x: t7, y: e3, size: i2 }) {
748
- this._basicSquare({ x: t7, y: e3, size: i2, rotation: 0 });
747
+ _drawSquare({ x: t8, y: e3, size: i2 }) {
748
+ this._basicSquare({ x: t8, y: e3, size: i2, rotation: 0 });
749
749
  }
750
- _drawRounded({ x: t7, y: e3, size: i2, getNeighbor: r3 }) {
750
+ _drawRounded({ x: t8, y: e3, size: i2, getNeighbor: r3 }) {
751
751
  const n2 = r3 ? +r3(-1, 0) : 0, o2 = r3 ? +r3(1, 0) : 0, s2 = r3 ? +r3(0, -1) : 0, a2 = r3 ? +r3(0, 1) : 0, h2 = n2 + o2 + s2 + a2;
752
- if (0 !== h2) if (h2 > 2 || n2 && o2 || s2 && a2) this._basicSquare({ x: t7, y: e3, size: i2, rotation: 0 });
752
+ if (0 !== h2) if (h2 > 2 || n2 && o2 || s2 && a2) this._basicSquare({ x: t8, y: e3, size: i2, rotation: 0 });
753
753
  else {
754
754
  if (2 === h2) {
755
755
  let r4 = 0;
756
- return n2 && s2 ? r4 = Math.PI / 2 : s2 && o2 ? r4 = Math.PI : o2 && a2 && (r4 = -Math.PI / 2), void this._basicCornerRounded({ x: t7, y: e3, size: i2, rotation: r4 });
756
+ return n2 && s2 ? r4 = Math.PI / 2 : s2 && o2 ? r4 = Math.PI : o2 && a2 && (r4 = -Math.PI / 2), void this._basicCornerRounded({ x: t8, y: e3, size: i2, rotation: r4 });
757
757
  }
758
758
  if (1 === h2) {
759
759
  let r4 = 0;
760
- return s2 ? r4 = Math.PI / 2 : o2 ? r4 = Math.PI : a2 && (r4 = -Math.PI / 2), void this._basicSideRounded({ x: t7, y: e3, size: i2, rotation: r4 });
760
+ return s2 ? r4 = Math.PI / 2 : o2 ? r4 = Math.PI : a2 && (r4 = -Math.PI / 2), void this._basicSideRounded({ x: t8, y: e3, size: i2, rotation: r4 });
761
761
  }
762
762
  }
763
- else this._basicDot({ x: t7, y: e3, size: i2, rotation: 0 });
763
+ else this._basicDot({ x: t8, y: e3, size: i2, rotation: 0 });
764
764
  }
765
- _drawExtraRounded({ x: t7, y: e3, size: i2, getNeighbor: r3 }) {
765
+ _drawExtraRounded({ x: t8, y: e3, size: i2, getNeighbor: r3 }) {
766
766
  const n2 = r3 ? +r3(-1, 0) : 0, o2 = r3 ? +r3(1, 0) : 0, s2 = r3 ? +r3(0, -1) : 0, a2 = r3 ? +r3(0, 1) : 0, h2 = n2 + o2 + s2 + a2;
767
- if (0 !== h2) if (h2 > 2 || n2 && o2 || s2 && a2) this._basicSquare({ x: t7, y: e3, size: i2, rotation: 0 });
767
+ if (0 !== h2) if (h2 > 2 || n2 && o2 || s2 && a2) this._basicSquare({ x: t8, y: e3, size: i2, rotation: 0 });
768
768
  else {
769
769
  if (2 === h2) {
770
770
  let r4 = 0;
771
- return n2 && s2 ? r4 = Math.PI / 2 : s2 && o2 ? r4 = Math.PI : o2 && a2 && (r4 = -Math.PI / 2), void this._basicCornerExtraRounded({ x: t7, y: e3, size: i2, rotation: r4 });
771
+ return n2 && s2 ? r4 = Math.PI / 2 : s2 && o2 ? r4 = Math.PI : o2 && a2 && (r4 = -Math.PI / 2), void this._basicCornerExtraRounded({ x: t8, y: e3, size: i2, rotation: r4 });
772
772
  }
773
773
  if (1 === h2) {
774
774
  let r4 = 0;
775
- return s2 ? r4 = Math.PI / 2 : o2 ? r4 = Math.PI : a2 && (r4 = -Math.PI / 2), void this._basicSideRounded({ x: t7, y: e3, size: i2, rotation: r4 });
775
+ return s2 ? r4 = Math.PI / 2 : o2 ? r4 = Math.PI : a2 && (r4 = -Math.PI / 2), void this._basicSideRounded({ x: t8, y: e3, size: i2, rotation: r4 });
776
776
  }
777
777
  }
778
- else this._basicDot({ x: t7, y: e3, size: i2, rotation: 0 });
778
+ else this._basicDot({ x: t8, y: e3, size: i2, rotation: 0 });
779
779
  }
780
- _drawClassy({ x: t7, y: e3, size: i2, getNeighbor: r3 }) {
780
+ _drawClassy({ x: t8, y: e3, size: i2, getNeighbor: r3 }) {
781
781
  const n2 = r3 ? +r3(-1, 0) : 0, o2 = r3 ? +r3(1, 0) : 0, s2 = r3 ? +r3(0, -1) : 0, a2 = r3 ? +r3(0, 1) : 0;
782
- 0 !== n2 + o2 + s2 + a2 ? n2 || s2 ? o2 || a2 ? this._basicSquare({ x: t7, y: e3, size: i2, rotation: 0 }) : this._basicCornerRounded({ x: t7, y: e3, size: i2, rotation: Math.PI / 2 }) : this._basicCornerRounded({ x: t7, y: e3, size: i2, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: t7, y: e3, size: i2, rotation: Math.PI / 2 });
782
+ 0 !== n2 + o2 + s2 + a2 ? n2 || s2 ? o2 || a2 ? this._basicSquare({ x: t8, y: e3, size: i2, rotation: 0 }) : this._basicCornerRounded({ x: t8, y: e3, size: i2, rotation: Math.PI / 2 }) : this._basicCornerRounded({ x: t8, y: e3, size: i2, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: t8, y: e3, size: i2, rotation: Math.PI / 2 });
783
783
  }
784
- _drawClassyRounded({ x: t7, y: e3, size: i2, getNeighbor: r3 }) {
784
+ _drawClassyRounded({ x: t8, y: e3, size: i2, getNeighbor: r3 }) {
785
785
  const n2 = r3 ? +r3(-1, 0) : 0, o2 = r3 ? +r3(1, 0) : 0, s2 = r3 ? +r3(0, -1) : 0, a2 = r3 ? +r3(0, 1) : 0;
786
- 0 !== n2 + o2 + s2 + a2 ? n2 || s2 ? o2 || a2 ? this._basicSquare({ x: t7, y: e3, size: i2, rotation: 0 }) : this._basicCornerExtraRounded({ x: t7, y: e3, size: i2, rotation: Math.PI / 2 }) : this._basicCornerExtraRounded({ x: t7, y: e3, size: i2, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: t7, y: e3, size: i2, rotation: Math.PI / 2 });
786
+ 0 !== n2 + o2 + s2 + a2 ? n2 || s2 ? o2 || a2 ? this._basicSquare({ x: t8, y: e3, size: i2, rotation: 0 }) : this._basicCornerExtraRounded({ x: t8, y: e3, size: i2, rotation: Math.PI / 2 }) : this._basicCornerExtraRounded({ x: t8, y: e3, size: i2, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: t8, y: e3, size: i2, rotation: Math.PI / 2 });
787
787
  }
788
788
  }
789
789
  const a = { dot: "dot", square: "square", extraRounded: "extra-rounded" }, h = Object.values(a);
790
790
  class d {
791
- constructor({ svg: t7, type: e3, window: i2 }) {
792
- this._svg = t7, this._type = e3, this._window = i2;
791
+ constructor({ svg: t8, type: e3, window: i2 }) {
792
+ this._svg = t8, this._type = e3, this._window = i2;
793
793
  }
794
- draw(t7, e3, i2, r3) {
794
+ draw(t8, e3, i2, r3) {
795
795
  let n2;
796
796
  switch (this._type) {
797
797
  case a.square:
@@ -803,78 +803,78 @@ var require_qr_code_styling = __commonJS({
803
803
  default:
804
804
  n2 = this._drawDot;
805
805
  }
806
- n2.call(this, { x: t7, y: e3, size: i2, rotation: r3 });
806
+ n2.call(this, { x: t8, y: e3, size: i2, rotation: r3 });
807
807
  }
808
- _rotateFigure({ x: t7, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
808
+ _rotateFigure({ x: t8, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
809
809
  var o2;
810
- const s2 = t7 + i2 / 2, a2 = e3 + i2 / 2;
810
+ const s2 = t8 + i2 / 2, a2 = e3 + i2 / 2;
811
811
  n2(), null === (o2 = this._element) || void 0 === o2 || o2.setAttribute("transform", `rotate(${180 * r3 / Math.PI},${s2},${a2})`);
812
812
  }
813
- _basicDot(t7) {
814
- const { size: e3, x: i2, y: r3 } = t7, n2 = e3 / 7;
815
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
813
+ _basicDot(t8) {
814
+ const { size: e3, x: i2, y: r3 } = t8, n2 = e3 / 7;
815
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
816
816
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${i2 + e3 / 2} ${r3}a ${e3 / 2} ${e3 / 2} 0 1 0 0.1 0zm 0 ${n2}a ${e3 / 2 - n2} ${e3 / 2 - n2} 0 1 1 -0.1 0Z`);
817
817
  } }));
818
818
  }
819
- _basicSquare(t7) {
820
- const { size: e3, x: i2, y: r3 } = t7, n2 = e3 / 7;
821
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
819
+ _basicSquare(t8) {
820
+ const { size: e3, x: i2, y: r3 } = t8, n2 = e3 / 7;
821
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
822
822
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${i2} ${r3}v ${e3}h ${e3}v ` + -e3 + `zM ${i2 + n2} ${r3 + n2}h ` + (e3 - 2 * n2) + "v " + (e3 - 2 * n2) + "h " + (2 * n2 - e3) + "z");
823
823
  } }));
824
824
  }
825
- _basicExtraRounded(t7) {
826
- const { size: e3, x: i2, y: r3 } = t7, n2 = e3 / 7;
827
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
825
+ _basicExtraRounded(t8) {
826
+ const { size: e3, x: i2, y: r3 } = t8, n2 = e3 / 7;
827
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
828
828
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${i2} ${r3 + 2.5 * n2}v ` + 2 * n2 + `a ${2.5 * n2} ${2.5 * n2}, 0, 0, 0, ${2.5 * n2} ${2.5 * n2}h ` + 2 * n2 + `a ${2.5 * n2} ${2.5 * n2}, 0, 0, 0, ${2.5 * n2} ${2.5 * -n2}v ` + -2 * n2 + `a ${2.5 * n2} ${2.5 * n2}, 0, 0, 0, ${2.5 * -n2} ${2.5 * -n2}h ` + -2 * n2 + `a ${2.5 * n2} ${2.5 * n2}, 0, 0, 0, ${2.5 * -n2} ${2.5 * n2}M ${i2 + 2.5 * n2} ${r3 + n2}h ` + 2 * n2 + `a ${1.5 * n2} ${1.5 * n2}, 0, 0, 1, ${1.5 * n2} ${1.5 * n2}v ` + 2 * n2 + `a ${1.5 * n2} ${1.5 * n2}, 0, 0, 1, ${1.5 * -n2} ${1.5 * n2}h ` + -2 * n2 + `a ${1.5 * n2} ${1.5 * n2}, 0, 0, 1, ${1.5 * -n2} ${1.5 * -n2}v ` + -2 * n2 + `a ${1.5 * n2} ${1.5 * n2}, 0, 0, 1, ${1.5 * n2} ${1.5 * -n2}`);
829
829
  } }));
830
830
  }
831
- _drawDot({ x: t7, y: e3, size: i2, rotation: r3 }) {
832
- this._basicDot({ x: t7, y: e3, size: i2, rotation: r3 });
831
+ _drawDot({ x: t8, y: e3, size: i2, rotation: r3 }) {
832
+ this._basicDot({ x: t8, y: e3, size: i2, rotation: r3 });
833
833
  }
834
- _drawSquare({ x: t7, y: e3, size: i2, rotation: r3 }) {
835
- this._basicSquare({ x: t7, y: e3, size: i2, rotation: r3 });
834
+ _drawSquare({ x: t8, y: e3, size: i2, rotation: r3 }) {
835
+ this._basicSquare({ x: t8, y: e3, size: i2, rotation: r3 });
836
836
  }
837
- _drawExtraRounded({ x: t7, y: e3, size: i2, rotation: r3 }) {
838
- this._basicExtraRounded({ x: t7, y: e3, size: i2, rotation: r3 });
837
+ _drawExtraRounded({ x: t8, y: e3, size: i2, rotation: r3 }) {
838
+ this._basicExtraRounded({ x: t8, y: e3, size: i2, rotation: r3 });
839
839
  }
840
840
  }
841
841
  const u = { dot: "dot", square: "square" }, c = Object.values(u);
842
842
  class l {
843
- constructor({ svg: t7, type: e3, window: i2 }) {
844
- this._svg = t7, this._type = e3, this._window = i2;
843
+ constructor({ svg: t8, type: e3, window: i2 }) {
844
+ this._svg = t8, this._type = e3, this._window = i2;
845
845
  }
846
- draw(t7, e3, i2, r3) {
846
+ draw(t8, e3, i2, r3) {
847
847
  let n2;
848
- n2 = this._type === u.square ? this._drawSquare : this._drawDot, n2.call(this, { x: t7, y: e3, size: i2, rotation: r3 });
848
+ n2 = this._type === u.square ? this._drawSquare : this._drawDot, n2.call(this, { x: t8, y: e3, size: i2, rotation: r3 });
849
849
  }
850
- _rotateFigure({ x: t7, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
850
+ _rotateFigure({ x: t8, y: e3, size: i2, rotation: r3 = 0, draw: n2 }) {
851
851
  var o2;
852
- const s2 = t7 + i2 / 2, a2 = e3 + i2 / 2;
852
+ const s2 = t8 + i2 / 2, a2 = e3 + i2 / 2;
853
853
  n2(), null === (o2 = this._element) || void 0 === o2 || o2.setAttribute("transform", `rotate(${180 * r3 / Math.PI},${s2},${a2})`);
854
854
  }
855
- _basicDot(t7) {
856
- const { size: e3, x: i2, y: r3 } = t7;
857
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
855
+ _basicDot(t8) {
856
+ const { size: e3, x: i2, y: r3 } = t8;
857
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
858
858
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(i2 + e3 / 2)), this._element.setAttribute("cy", String(r3 + e3 / 2)), this._element.setAttribute("r", String(e3 / 2));
859
859
  } }));
860
860
  }
861
- _basicSquare(t7) {
862
- const { size: e3, x: i2, y: r3 } = t7;
863
- this._rotateFigure(Object.assign(Object.assign({}, t7), { draw: () => {
861
+ _basicSquare(t8) {
862
+ const { size: e3, x: i2, y: r3 } = t8;
863
+ this._rotateFigure(Object.assign(Object.assign({}, t8), { draw: () => {
864
864
  this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(i2)), this._element.setAttribute("y", String(r3)), this._element.setAttribute("width", String(e3)), this._element.setAttribute("height", String(e3));
865
865
  } }));
866
866
  }
867
- _drawDot({ x: t7, y: e3, size: i2, rotation: r3 }) {
868
- this._basicDot({ x: t7, y: e3, size: i2, rotation: r3 });
867
+ _drawDot({ x: t8, y: e3, size: i2, rotation: r3 }) {
868
+ this._basicDot({ x: t8, y: e3, size: i2, rotation: r3 });
869
869
  }
870
- _drawSquare({ x: t7, y: e3, size: i2, rotation: r3 }) {
871
- this._basicSquare({ x: t7, y: e3, size: i2, rotation: r3 });
870
+ _drawSquare({ x: t8, y: e3, size: i2, rotation: r3 }) {
871
+ this._basicSquare({ x: t8, y: e3, size: i2, rotation: r3 });
872
872
  }
873
873
  }
874
874
  const g = "circle", f = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]], w = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
875
875
  class p {
876
- constructor(t7, e3) {
877
- this._roundSize = (t8) => this._options.dotsOptions.roundSize ? Math.floor(t8) : t8, this._window = e3, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t7.width)), this._element.setAttribute("height", String(t7.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), t7.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", `0 0 ${t7.width} ${t7.height}`), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = t7.image, this._instanceId = p.instanceCount++, this._options = t7;
876
+ constructor(t8, e3) {
877
+ this._roundSize = (t9) => this._options.dotsOptions.roundSize ? Math.floor(t9) : t9, this._window = e3, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t8.width)), this._element.setAttribute("height", String(t8.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), t8.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", `0 0 ${t8.width} ${t8.height}`), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = t8.image, this._instanceId = p.instanceCount++, this._options = t8;
878
878
  }
879
879
  get width() {
880
880
  return this._options.width;
@@ -885,135 +885,135 @@ var require_qr_code_styling = __commonJS({
885
885
  getElement() {
886
886
  return this._element;
887
887
  }
888
- async drawQR(t7) {
889
- const e3 = t7.getModuleCount(), i2 = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, r3 = this._options.shape === g ? i2 / Math.sqrt(2) : i2, n2 = this._roundSize(r3 / e3);
888
+ async drawQR(t8) {
889
+ const e3 = t8.getModuleCount(), i2 = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, r3 = this._options.shape === g ? i2 / Math.sqrt(2) : i2, n2 = this._roundSize(r3 / e3);
890
890
  let s2 = { hideXDots: 0, hideYDots: 0, width: 0, height: 0 };
891
- if (this._qr = t7, this._options.image) {
891
+ if (this._qr = t8, this._options.image) {
892
892
  if (await this.loadImage(), !this._image) return;
893
- const { imageOptions: t8, qrOptions: i3 } = this._options, r4 = t8.imageSize * o[i3.errorCorrectionLevel], a2 = Math.floor(r4 * e3 * e3);
894
- s2 = (function({ originalHeight: t9, originalWidth: e4, maxHiddenDots: i4, maxHiddenAxisDots: r5, dotSize: n3 }) {
893
+ const { imageOptions: t9, qrOptions: i3 } = this._options, r4 = t9.imageSize * o[i3.errorCorrectionLevel], a2 = Math.floor(r4 * e3 * e3);
894
+ s2 = (function({ originalHeight: t10, originalWidth: e4, maxHiddenDots: i4, maxHiddenAxisDots: r5, dotSize: n3 }) {
895
895
  const o2 = { x: 0, y: 0 }, s3 = { x: 0, y: 0 };
896
- if (t9 <= 0 || e4 <= 0 || i4 <= 0 || n3 <= 0) return { height: 0, width: 0, hideYDots: 0, hideXDots: 0 };
897
- const a3 = t9 / e4;
896
+ if (t10 <= 0 || e4 <= 0 || i4 <= 0 || n3 <= 0) return { height: 0, width: 0, hideYDots: 0, hideXDots: 0 };
897
+ const a3 = t10 / e4;
898
898
  return o2.x = Math.floor(Math.sqrt(i4 / a3)), o2.x <= 0 && (o2.x = 1), r5 && r5 < o2.x && (o2.x = r5), o2.x % 2 == 0 && o2.x--, s3.x = o2.x * n3, o2.y = 1 + 2 * Math.ceil((o2.x * a3 - 1) / 2), s3.y = Math.round(s3.x * a3), (o2.y * o2.x > i4 || r5 && r5 < o2.y) && (r5 && r5 < o2.y ? (o2.y = r5, o2.y % 2 == 0 && o2.x--) : o2.y -= 2, s3.y = o2.y * n3, o2.x = 1 + 2 * Math.ceil((o2.y / a3 - 1) / 2), s3.x = Math.round(s3.y / a3)), { height: s3.y, width: s3.x, hideYDots: o2.y, hideXDots: o2.x };
899
899
  })({ originalWidth: this._image.width, originalHeight: this._image.height, maxHiddenDots: a2, maxHiddenAxisDots: e3 - 14, dotSize: n2 });
900
900
  }
901
- this.drawBackground(), this.drawDots(((t8, i3) => {
901
+ this.drawBackground(), this.drawDots(((t9, i3) => {
902
902
  var r4, n3, o2, a2, h2, d2;
903
- return !(this._options.imageOptions.hideBackgroundDots && t8 >= (e3 - s2.hideYDots) / 2 && t8 < (e3 + s2.hideYDots) / 2 && i3 >= (e3 - s2.hideXDots) / 2 && i3 < (e3 + s2.hideXDots) / 2 || (null === (r4 = f[t8]) || void 0 === r4 ? void 0 : r4[i3]) || (null === (n3 = f[t8 - e3 + 7]) || void 0 === n3 ? void 0 : n3[i3]) || (null === (o2 = f[t8]) || void 0 === o2 ? void 0 : o2[i3 - e3 + 7]) || (null === (a2 = w[t8]) || void 0 === a2 ? void 0 : a2[i3]) || (null === (h2 = w[t8 - e3 + 7]) || void 0 === h2 ? void 0 : h2[i3]) || (null === (d2 = w[t8]) || void 0 === d2 ? void 0 : d2[i3 - e3 + 7]));
903
+ return !(this._options.imageOptions.hideBackgroundDots && t9 >= (e3 - s2.hideYDots) / 2 && t9 < (e3 + s2.hideYDots) / 2 && i3 >= (e3 - s2.hideXDots) / 2 && i3 < (e3 + s2.hideXDots) / 2 || (null === (r4 = f[t9]) || void 0 === r4 ? void 0 : r4[i3]) || (null === (n3 = f[t9 - e3 + 7]) || void 0 === n3 ? void 0 : n3[i3]) || (null === (o2 = f[t9]) || void 0 === o2 ? void 0 : o2[i3 - e3 + 7]) || (null === (a2 = w[t9]) || void 0 === a2 ? void 0 : a2[i3]) || (null === (h2 = w[t9 - e3 + 7]) || void 0 === h2 ? void 0 : h2[i3]) || (null === (d2 = w[t9]) || void 0 === d2 ? void 0 : d2[i3 - e3 + 7]));
904
904
  })), this.drawCorners(), this._options.image && await this.drawImage({ width: s2.width, height: s2.height, count: e3, dotSize: n2 });
905
905
  }
906
906
  drawBackground() {
907
- var t7, e3, i2;
907
+ var t8, e3, i2;
908
908
  const r3 = this._element, n2 = this._options;
909
909
  if (r3) {
910
- const r4 = null === (t7 = n2.backgroundOptions) || void 0 === t7 ? void 0 : t7.gradient, o2 = null === (e3 = n2.backgroundOptions) || void 0 === e3 ? void 0 : e3.color;
910
+ const r4 = null === (t8 = n2.backgroundOptions) || void 0 === t8 ? void 0 : t8.gradient, o2 = null === (e3 = n2.backgroundOptions) || void 0 === e3 ? void 0 : e3.color;
911
911
  let s2 = n2.height, a2 = n2.width;
912
912
  if (r4 || o2) {
913
- const t8 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
914
- this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", `clip-path-background-color-${this._instanceId}`), this._defs.appendChild(this._backgroundClipPath), (null === (i2 = n2.backgroundOptions) || void 0 === i2 ? void 0 : i2.round) && (s2 = a2 = Math.min(n2.width, n2.height), t8.setAttribute("rx", String(s2 / 2 * n2.backgroundOptions.round))), t8.setAttribute("x", String(this._roundSize((n2.width - a2) / 2))), t8.setAttribute("y", String(this._roundSize((n2.height - s2) / 2))), t8.setAttribute("width", String(a2)), t8.setAttribute("height", String(s2)), this._backgroundClipPath.appendChild(t8), this._createColor({ options: r4, color: o2, additionalRotation: 0, x: 0, y: 0, height: n2.height, width: n2.width, name: `background-color-${this._instanceId}` });
913
+ const t9 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
914
+ this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", `clip-path-background-color-${this._instanceId}`), this._defs.appendChild(this._backgroundClipPath), (null === (i2 = n2.backgroundOptions) || void 0 === i2 ? void 0 : i2.round) && (s2 = a2 = Math.min(n2.width, n2.height), t9.setAttribute("rx", String(s2 / 2 * n2.backgroundOptions.round))), t9.setAttribute("x", String(this._roundSize((n2.width - a2) / 2))), t9.setAttribute("y", String(this._roundSize((n2.height - s2) / 2))), t9.setAttribute("width", String(a2)), t9.setAttribute("height", String(s2)), this._backgroundClipPath.appendChild(t9), this._createColor({ options: r4, color: o2, additionalRotation: 0, x: 0, y: 0, height: n2.height, width: n2.width, name: `background-color-${this._instanceId}` });
915
915
  }
916
916
  }
917
917
  }
918
- drawDots(t7) {
918
+ drawDots(t8) {
919
919
  var e3, i2;
920
920
  if (!this._qr) throw "QR code is not defined";
921
921
  const r3 = this._options, n2 = this._qr.getModuleCount();
922
922
  if (n2 > r3.width || n2 > r3.height) throw "The canvas is too small.";
923
923
  const o2 = Math.min(r3.width, r3.height) - 2 * r3.margin, a2 = r3.shape === g ? o2 / Math.sqrt(2) : o2, h2 = this._roundSize(a2 / n2), d2 = this._roundSize((r3.width - n2 * h2) / 2), u2 = this._roundSize((r3.height - n2 * h2) / 2), c2 = new s({ svg: this._element, type: r3.dotsOptions.type, window: this._window });
924
924
  this._dotsClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", `clip-path-dot-color-${this._instanceId}`), this._defs.appendChild(this._dotsClipPath), this._createColor({ options: null === (e3 = r3.dotsOptions) || void 0 === e3 ? void 0 : e3.gradient, color: r3.dotsOptions.color, additionalRotation: 0, x: 0, y: 0, height: r3.height, width: r3.width, name: `dot-color-${this._instanceId}` });
925
- for (let e4 = 0; e4 < n2; e4++) for (let r4 = 0; r4 < n2; r4++) t7 && !t7(e4, r4) || (null === (i2 = this._qr) || void 0 === i2 ? void 0 : i2.isDark(e4, r4)) && (c2.draw(d2 + r4 * h2, u2 + e4 * h2, h2, ((i3, o3) => !(r4 + i3 < 0 || e4 + o3 < 0 || r4 + i3 >= n2 || e4 + o3 >= n2) && !(t7 && !t7(e4 + o3, r4 + i3)) && !!this._qr && this._qr.isDark(e4 + o3, r4 + i3))), c2._element && this._dotsClipPath && this._dotsClipPath.appendChild(c2._element));
925
+ for (let e4 = 0; e4 < n2; e4++) for (let r4 = 0; r4 < n2; r4++) t8 && !t8(e4, r4) || (null === (i2 = this._qr) || void 0 === i2 ? void 0 : i2.isDark(e4, r4)) && (c2.draw(d2 + r4 * h2, u2 + e4 * h2, h2, ((i3, o3) => !(r4 + i3 < 0 || e4 + o3 < 0 || r4 + i3 >= n2 || e4 + o3 >= n2) && !(t8 && !t8(e4 + o3, r4 + i3)) && !!this._qr && this._qr.isDark(e4 + o3, r4 + i3))), c2._element && this._dotsClipPath && this._dotsClipPath.appendChild(c2._element));
926
926
  if (r3.shape === g) {
927
- const t8 = this._roundSize((o2 / h2 - n2) / 2), e4 = n2 + 2 * t8, i3 = d2 - t8 * h2, r4 = u2 - t8 * h2, s2 = [], a3 = this._roundSize(e4 / 2);
927
+ const t9 = this._roundSize((o2 / h2 - n2) / 2), e4 = n2 + 2 * t9, i3 = d2 - t9 * h2, r4 = u2 - t9 * h2, s2 = [], a3 = this._roundSize(e4 / 2);
928
928
  for (let i4 = 0; i4 < e4; i4++) {
929
929
  s2[i4] = [];
930
- for (let r5 = 0; r5 < e4; r5++) i4 >= t8 - 1 && i4 <= e4 - t8 && r5 >= t8 - 1 && r5 <= e4 - t8 || Math.sqrt((i4 - a3) * (i4 - a3) + (r5 - a3) * (r5 - a3)) > a3 ? s2[i4][r5] = 0 : s2[i4][r5] = this._qr.isDark(r5 - 2 * t8 < 0 ? r5 : r5 >= n2 ? r5 - 2 * t8 : r5 - t8, i4 - 2 * t8 < 0 ? i4 : i4 >= n2 ? i4 - 2 * t8 : i4 - t8) ? 1 : 0;
930
+ for (let r5 = 0; r5 < e4; r5++) i4 >= t9 - 1 && i4 <= e4 - t9 && r5 >= t9 - 1 && r5 <= e4 - t9 || Math.sqrt((i4 - a3) * (i4 - a3) + (r5 - a3) * (r5 - a3)) > a3 ? s2[i4][r5] = 0 : s2[i4][r5] = this._qr.isDark(r5 - 2 * t9 < 0 ? r5 : r5 >= n2 ? r5 - 2 * t9 : r5 - t9, i4 - 2 * t9 < 0 ? i4 : i4 >= n2 ? i4 - 2 * t9 : i4 - t9) ? 1 : 0;
931
931
  }
932
- for (let t9 = 0; t9 < e4; t9++) for (let n3 = 0; n3 < e4; n3++) s2[t9][n3] && (c2.draw(i3 + n3 * h2, r4 + t9 * h2, h2, ((e5, i4) => {
932
+ for (let t10 = 0; t10 < e4; t10++) for (let n3 = 0; n3 < e4; n3++) s2[t10][n3] && (c2.draw(i3 + n3 * h2, r4 + t10 * h2, h2, ((e5, i4) => {
933
933
  var r5;
934
- return !!(null === (r5 = s2[t9 + i4]) || void 0 === r5 ? void 0 : r5[n3 + e5]);
934
+ return !!(null === (r5 = s2[t10 + i4]) || void 0 === r5 ? void 0 : r5[n3 + e5]);
935
935
  })), c2._element && this._dotsClipPath && this._dotsClipPath.appendChild(c2._element));
936
936
  }
937
937
  }
938
938
  drawCorners() {
939
939
  if (!this._qr) throw "QR code is not defined";
940
- const t7 = this._element, e3 = this._options;
941
- if (!t7) throw "Element code is not defined";
940
+ const t8 = this._element, e3 = this._options;
941
+ if (!t8) throw "Element code is not defined";
942
942
  const i2 = this._qr.getModuleCount(), r3 = Math.min(e3.width, e3.height) - 2 * e3.margin, n2 = e3.shape === g ? r3 / Math.sqrt(2) : r3, o2 = this._roundSize(n2 / i2), a2 = 7 * o2, u2 = 3 * o2, p2 = this._roundSize((e3.width - i2 * o2) / 2), v2 = this._roundSize((e3.height - i2 * o2) / 2);
943
- [[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach((([t8, r4, n3]) => {
943
+ [[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach((([t9, r4, n3]) => {
944
944
  var g2, _2, m2, b2, y2, x2, S2, C2, A2, M2, $2, O, D, k;
945
- const z = p2 + t8 * o2 * (i2 - 7), B = v2 + r4 * o2 * (i2 - 7);
945
+ const z = p2 + t9 * o2 * (i2 - 7), B = v2 + r4 * o2 * (i2 - 7);
946
946
  let P = this._dotsClipPath, I = this._dotsClipPath;
947
- if (((null === (g2 = e3.cornersSquareOptions) || void 0 === g2 ? void 0 : g2.gradient) || (null === (_2 = e3.cornersSquareOptions) || void 0 === _2 ? void 0 : _2.color)) && (P = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), P.setAttribute("id", `clip-path-corners-square-color-${t8}-${r4}-${this._instanceId}`), this._defs.appendChild(P), this._cornersSquareClipPath = this._cornersDotClipPath = I = P, this._createColor({ options: null === (m2 = e3.cornersSquareOptions) || void 0 === m2 ? void 0 : m2.gradient, color: null === (b2 = e3.cornersSquareOptions) || void 0 === b2 ? void 0 : b2.color, additionalRotation: n3, x: z, y: B, height: a2, width: a2, name: `corners-square-color-${t8}-${r4}-${this._instanceId}` })), (null === (y2 = e3.cornersSquareOptions) || void 0 === y2 ? void 0 : y2.type) && h.includes(e3.cornersSquareOptions.type)) {
948
- const t9 = new d({ svg: this._element, type: e3.cornersSquareOptions.type, window: this._window });
949
- t9.draw(z, B, a2, n3), t9._element && P && P.appendChild(t9._element);
947
+ if (((null === (g2 = e3.cornersSquareOptions) || void 0 === g2 ? void 0 : g2.gradient) || (null === (_2 = e3.cornersSquareOptions) || void 0 === _2 ? void 0 : _2.color)) && (P = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), P.setAttribute("id", `clip-path-corners-square-color-${t9}-${r4}-${this._instanceId}`), this._defs.appendChild(P), this._cornersSquareClipPath = this._cornersDotClipPath = I = P, this._createColor({ options: null === (m2 = e3.cornersSquareOptions) || void 0 === m2 ? void 0 : m2.gradient, color: null === (b2 = e3.cornersSquareOptions) || void 0 === b2 ? void 0 : b2.color, additionalRotation: n3, x: z, y: B, height: a2, width: a2, name: `corners-square-color-${t9}-${r4}-${this._instanceId}` })), (null === (y2 = e3.cornersSquareOptions) || void 0 === y2 ? void 0 : y2.type) && h.includes(e3.cornersSquareOptions.type)) {
948
+ const t10 = new d({ svg: this._element, type: e3.cornersSquareOptions.type, window: this._window });
949
+ t10.draw(z, B, a2, n3), t10._element && P && P.appendChild(t10._element);
950
950
  } else {
951
- const t9 = new s({ svg: this._element, type: (null === (x2 = e3.cornersSquareOptions) || void 0 === x2 ? void 0 : x2.type) || e3.dotsOptions.type, window: this._window });
952
- for (let e4 = 0; e4 < f.length; e4++) for (let i3 = 0; i3 < f[e4].length; i3++) (null === (S2 = f[e4]) || void 0 === S2 ? void 0 : S2[i3]) && (t9.draw(z + i3 * o2, B + e4 * o2, o2, ((t10, r5) => {
951
+ const t10 = new s({ svg: this._element, type: (null === (x2 = e3.cornersSquareOptions) || void 0 === x2 ? void 0 : x2.type) || e3.dotsOptions.type, window: this._window });
952
+ for (let e4 = 0; e4 < f.length; e4++) for (let i3 = 0; i3 < f[e4].length; i3++) (null === (S2 = f[e4]) || void 0 === S2 ? void 0 : S2[i3]) && (t10.draw(z + i3 * o2, B + e4 * o2, o2, ((t11, r5) => {
953
953
  var n4;
954
- return !!(null === (n4 = f[e4 + r5]) || void 0 === n4 ? void 0 : n4[i3 + t10]);
955
- })), t9._element && P && P.appendChild(t9._element));
954
+ return !!(null === (n4 = f[e4 + r5]) || void 0 === n4 ? void 0 : n4[i3 + t11]);
955
+ })), t10._element && P && P.appendChild(t10._element));
956
956
  }
957
- if (((null === (C2 = e3.cornersDotOptions) || void 0 === C2 ? void 0 : C2.gradient) || (null === (A2 = e3.cornersDotOptions) || void 0 === A2 ? void 0 : A2.color)) && (I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), I.setAttribute("id", `clip-path-corners-dot-color-${t8}-${r4}-${this._instanceId}`), this._defs.appendChild(I), this._cornersDotClipPath = I, this._createColor({ options: null === (M2 = e3.cornersDotOptions) || void 0 === M2 ? void 0 : M2.gradient, color: null === ($2 = e3.cornersDotOptions) || void 0 === $2 ? void 0 : $2.color, additionalRotation: n3, x: z + 2 * o2, y: B + 2 * o2, height: u2, width: u2, name: `corners-dot-color-${t8}-${r4}-${this._instanceId}` })), (null === (O = e3.cornersDotOptions) || void 0 === O ? void 0 : O.type) && c.includes(e3.cornersDotOptions.type)) {
958
- const t9 = new l({ svg: this._element, type: e3.cornersDotOptions.type, window: this._window });
959
- t9.draw(z + 2 * o2, B + 2 * o2, u2, n3), t9._element && I && I.appendChild(t9._element);
957
+ if (((null === (C2 = e3.cornersDotOptions) || void 0 === C2 ? void 0 : C2.gradient) || (null === (A2 = e3.cornersDotOptions) || void 0 === A2 ? void 0 : A2.color)) && (I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), I.setAttribute("id", `clip-path-corners-dot-color-${t9}-${r4}-${this._instanceId}`), this._defs.appendChild(I), this._cornersDotClipPath = I, this._createColor({ options: null === (M2 = e3.cornersDotOptions) || void 0 === M2 ? void 0 : M2.gradient, color: null === ($2 = e3.cornersDotOptions) || void 0 === $2 ? void 0 : $2.color, additionalRotation: n3, x: z + 2 * o2, y: B + 2 * o2, height: u2, width: u2, name: `corners-dot-color-${t9}-${r4}-${this._instanceId}` })), (null === (O = e3.cornersDotOptions) || void 0 === O ? void 0 : O.type) && c.includes(e3.cornersDotOptions.type)) {
958
+ const t10 = new l({ svg: this._element, type: e3.cornersDotOptions.type, window: this._window });
959
+ t10.draw(z + 2 * o2, B + 2 * o2, u2, n3), t10._element && I && I.appendChild(t10._element);
960
960
  } else {
961
- const t9 = new s({ svg: this._element, type: (null === (D = e3.cornersDotOptions) || void 0 === D ? void 0 : D.type) || e3.dotsOptions.type, window: this._window });
962
- for (let e4 = 0; e4 < w.length; e4++) for (let i3 = 0; i3 < w[e4].length; i3++) (null === (k = w[e4]) || void 0 === k ? void 0 : k[i3]) && (t9.draw(z + i3 * o2, B + e4 * o2, o2, ((t10, r5) => {
961
+ const t10 = new s({ svg: this._element, type: (null === (D = e3.cornersDotOptions) || void 0 === D ? void 0 : D.type) || e3.dotsOptions.type, window: this._window });
962
+ for (let e4 = 0; e4 < w.length; e4++) for (let i3 = 0; i3 < w[e4].length; i3++) (null === (k = w[e4]) || void 0 === k ? void 0 : k[i3]) && (t10.draw(z + i3 * o2, B + e4 * o2, o2, ((t11, r5) => {
963
963
  var n4;
964
- return !!(null === (n4 = w[e4 + r5]) || void 0 === n4 ? void 0 : n4[i3 + t10]);
965
- })), t9._element && I && I.appendChild(t9._element));
964
+ return !!(null === (n4 = w[e4 + r5]) || void 0 === n4 ? void 0 : n4[i3 + t11]);
965
+ })), t10._element && I && I.appendChild(t10._element));
966
966
  }
967
967
  }));
968
968
  }
969
969
  loadImage() {
970
- return new Promise(((t7, e3) => {
970
+ return new Promise(((t8, e3) => {
971
971
  var i2;
972
972
  const r3 = this._options;
973
973
  if (!r3.image) return e3("Image is not defined");
974
974
  if (null === (i2 = r3.nodeCanvas) || void 0 === i2 ? void 0 : i2.loadImage) r3.nodeCanvas.loadImage(r3.image).then(((e4) => {
975
975
  var i3, n2;
976
976
  if (this._image = e4, this._options.imageOptions.saveAsBlob) {
977
- const t8 = null === (i3 = r3.nodeCanvas) || void 0 === i3 ? void 0 : i3.createCanvas(this._image.width, this._image.height);
978
- null === (n2 = null == t8 ? void 0 : t8.getContext("2d")) || void 0 === n2 || n2.drawImage(e4, 0, 0), this._imageUri = null == t8 ? void 0 : t8.toDataURL();
977
+ const t9 = null === (i3 = r3.nodeCanvas) || void 0 === i3 ? void 0 : i3.createCanvas(this._image.width, this._image.height);
978
+ null === (n2 = null == t9 ? void 0 : t9.getContext("2d")) || void 0 === n2 || n2.drawImage(e4, 0, 0), this._imageUri = null == t9 ? void 0 : t9.toDataURL();
979
979
  }
980
- t7();
980
+ t8();
981
981
  })).catch(e3);
982
982
  else {
983
983
  const e4 = new this._window.Image();
984
984
  "string" == typeof r3.imageOptions.crossOrigin && (e4.crossOrigin = r3.imageOptions.crossOrigin), this._image = e4, e4.onload = async () => {
985
- this._options.imageOptions.saveAsBlob && (this._imageUri = await (async function(t8, e5) {
985
+ this._options.imageOptions.saveAsBlob && (this._imageUri = await (async function(t9, e5) {
986
986
  return new Promise(((i3) => {
987
987
  const r4 = new e5.XMLHttpRequest();
988
988
  r4.onload = function() {
989
- const t9 = new e5.FileReader();
990
- t9.onloadend = function() {
991
- i3(t9.result);
992
- }, t9.readAsDataURL(r4.response);
993
- }, r4.open("GET", t8), r4.responseType = "blob", r4.send();
989
+ const t10 = new e5.FileReader();
990
+ t10.onloadend = function() {
991
+ i3(t10.result);
992
+ }, t10.readAsDataURL(r4.response);
993
+ }, r4.open("GET", t9), r4.responseType = "blob", r4.send();
994
994
  }));
995
- })(r3.image || "", this._window)), t7();
995
+ })(r3.image || "", this._window)), t8();
996
996
  }, e4.src = r3.image;
997
997
  }
998
998
  }));
999
999
  }
1000
- async drawImage({ width: t7, height: e3, count: i2, dotSize: r3 }) {
1001
- const n2 = this._options, o2 = this._roundSize((n2.width - i2 * r3) / 2), s2 = this._roundSize((n2.height - i2 * r3) / 2), a2 = o2 + this._roundSize(n2.imageOptions.margin + (i2 * r3 - t7) / 2), h2 = s2 + this._roundSize(n2.imageOptions.margin + (i2 * r3 - e3) / 2), d2 = t7 - 2 * n2.imageOptions.margin, u2 = e3 - 2 * n2.imageOptions.margin, c2 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "image");
1000
+ async drawImage({ width: t8, height: e3, count: i2, dotSize: r3 }) {
1001
+ const n2 = this._options, o2 = this._roundSize((n2.width - i2 * r3) / 2), s2 = this._roundSize((n2.height - i2 * r3) / 2), a2 = o2 + this._roundSize(n2.imageOptions.margin + (i2 * r3 - t8) / 2), h2 = s2 + this._roundSize(n2.imageOptions.margin + (i2 * r3 - e3) / 2), d2 = t8 - 2 * n2.imageOptions.margin, u2 = e3 - 2 * n2.imageOptions.margin, c2 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "image");
1002
1002
  c2.setAttribute("href", this._imageUri || ""), c2.setAttribute("xlink:href", this._imageUri || ""), c2.setAttribute("x", String(a2)), c2.setAttribute("y", String(h2)), c2.setAttribute("width", `${d2}px`), c2.setAttribute("height", `${u2}px`), this._element.appendChild(c2);
1003
1003
  }
1004
- _createColor({ options: t7, color: e3, additionalRotation: i2, x: r3, y: n2, height: o2, width: s2, name: a2 }) {
1004
+ _createColor({ options: t8, color: e3, additionalRotation: i2, x: r3, y: n2, height: o2, width: s2, name: a2 }) {
1005
1005
  const h2 = s2 > o2 ? s2 : o2, d2 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
1006
- if (d2.setAttribute("x", String(r3)), d2.setAttribute("y", String(n2)), d2.setAttribute("height", String(o2)), d2.setAttribute("width", String(s2)), d2.setAttribute("clip-path", `url('#clip-path-${a2}')`), t7) {
1006
+ if (d2.setAttribute("x", String(r3)), d2.setAttribute("y", String(n2)), d2.setAttribute("height", String(o2)), d2.setAttribute("width", String(s2)), d2.setAttribute("clip-path", `url('#clip-path-${a2}')`), t8) {
1007
1007
  let e4;
1008
- if ("radial" === t7.type) e4 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"), e4.setAttribute("id", a2), e4.setAttribute("gradientUnits", "userSpaceOnUse"), e4.setAttribute("fx", String(r3 + s2 / 2)), e4.setAttribute("fy", String(n2 + o2 / 2)), e4.setAttribute("cx", String(r3 + s2 / 2)), e4.setAttribute("cy", String(n2 + o2 / 2)), e4.setAttribute("r", String(h2 / 2));
1008
+ if ("radial" === t8.type) e4 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"), e4.setAttribute("id", a2), e4.setAttribute("gradientUnits", "userSpaceOnUse"), e4.setAttribute("fx", String(r3 + s2 / 2)), e4.setAttribute("fy", String(n2 + o2 / 2)), e4.setAttribute("cx", String(r3 + s2 / 2)), e4.setAttribute("cy", String(n2 + o2 / 2)), e4.setAttribute("r", String(h2 / 2));
1009
1009
  else {
1010
- const h3 = ((t7.rotation || 0) + i2) % (2 * Math.PI), d3 = (h3 + 2 * Math.PI) % (2 * Math.PI);
1010
+ const h3 = ((t8.rotation || 0) + i2) % (2 * Math.PI), d3 = (h3 + 2 * Math.PI) % (2 * Math.PI);
1011
1011
  let u2 = r3 + s2 / 2, c2 = n2 + o2 / 2, l2 = r3 + s2 / 2, g2 = n2 + o2 / 2;
1012
1012
  d3 >= 0 && d3 <= 0.25 * Math.PI || d3 > 1.75 * Math.PI && d3 <= 2 * Math.PI ? (u2 -= s2 / 2, c2 -= o2 / 2 * Math.tan(h3), l2 += s2 / 2, g2 += o2 / 2 * Math.tan(h3)) : d3 > 0.25 * Math.PI && d3 <= 0.75 * Math.PI ? (c2 -= o2 / 2, u2 -= s2 / 2 / Math.tan(h3), g2 += o2 / 2, l2 += s2 / 2 / Math.tan(h3)) : d3 > 0.75 * Math.PI && d3 <= 1.25 * Math.PI ? (u2 += s2 / 2, c2 += o2 / 2 * Math.tan(h3), l2 -= s2 / 2, g2 -= o2 / 2 * Math.tan(h3)) : d3 > 1.25 * Math.PI && d3 <= 1.75 * Math.PI && (c2 += o2 / 2, u2 += s2 / 2 / Math.tan(h3), g2 -= o2 / 2, l2 -= s2 / 2 / Math.tan(h3)), e4 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"), e4.setAttribute("id", a2), e4.setAttribute("gradientUnits", "userSpaceOnUse"), e4.setAttribute("x1", String(Math.round(u2))), e4.setAttribute("y1", String(Math.round(c2))), e4.setAttribute("x2", String(Math.round(l2))), e4.setAttribute("y2", String(Math.round(g2)));
1013
1013
  }
1014
- t7.colorStops.forEach((({ offset: t8, color: i3 }) => {
1014
+ t8.colorStops.forEach((({ offset: t9, color: i3 }) => {
1015
1015
  const r4 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "stop");
1016
- r4.setAttribute("offset", 100 * t8 + "%"), r4.setAttribute("stop-color", i3), e4.appendChild(r4);
1016
+ r4.setAttribute("offset", 100 * t9 + "%"), r4.setAttribute("stop-color", i3), e4.appendChild(r4);
1017
1017
  })), d2.setAttribute("fill", `url('#${a2}')`), this._defs.appendChild(e4);
1018
1018
  } else e3 && d2.setAttribute("fill", e3);
1019
1019
  this._element.appendChild(d2);
@@ -1021,119 +1021,119 @@ var require_qr_code_styling = __commonJS({
1021
1021
  }
1022
1022
  p.instanceCount = 0;
1023
1023
  const v = p, _ = "canvas", m = {};
1024
- for (let t7 = 0; t7 <= 40; t7++) m[t7] = t7;
1024
+ for (let t8 = 0; t8 <= 40; t8++) m[t8] = t8;
1025
1025
  const b = { type: _, shape: "square", width: 300, height: 300, data: "", margin: 0, qrOptions: { typeNumber: m[0], mode: void 0, errorCorrectionLevel: "Q" }, imageOptions: { saveAsBlob: true, hideBackgroundDots: true, imageSize: 0.4, crossOrigin: void 0, margin: 0 }, dotsOptions: { type: "square", color: "#000", roundSize: true }, backgroundOptions: { round: 0, color: "#fff" } };
1026
- function y(t7) {
1027
- const e3 = Object.assign({}, t7);
1026
+ function y(t8) {
1027
+ const e3 = Object.assign({}, t8);
1028
1028
  if (!e3.colorStops || !e3.colorStops.length) throw "Field 'colorStops' is required in gradient";
1029
- return e3.rotation ? e3.rotation = Number(e3.rotation) : e3.rotation = 0, e3.colorStops = e3.colorStops.map(((t8) => Object.assign(Object.assign({}, t8), { offset: Number(t8.offset) }))), e3;
1029
+ return e3.rotation ? e3.rotation = Number(e3.rotation) : e3.rotation = 0, e3.colorStops = e3.colorStops.map(((t9) => Object.assign(Object.assign({}, t9), { offset: Number(t9.offset) }))), e3;
1030
1030
  }
1031
- function x(t7) {
1032
- const e3 = Object.assign({}, t7);
1031
+ function x(t8) {
1032
+ const e3 = Object.assign({}, t8);
1033
1033
  return e3.width = Number(e3.width), e3.height = Number(e3.height), e3.margin = Number(e3.margin), e3.imageOptions = Object.assign(Object.assign({}, e3.imageOptions), { hideBackgroundDots: Boolean(e3.imageOptions.hideBackgroundDots), imageSize: Number(e3.imageOptions.imageSize), margin: Number(e3.imageOptions.margin) }), e3.margin > Math.min(e3.width, e3.height) && (e3.margin = Math.min(e3.width, e3.height)), e3.dotsOptions = Object.assign({}, e3.dotsOptions), e3.dotsOptions.gradient && (e3.dotsOptions.gradient = y(e3.dotsOptions.gradient)), e3.cornersSquareOptions && (e3.cornersSquareOptions = Object.assign({}, e3.cornersSquareOptions), e3.cornersSquareOptions.gradient && (e3.cornersSquareOptions.gradient = y(e3.cornersSquareOptions.gradient))), e3.cornersDotOptions && (e3.cornersDotOptions = Object.assign({}, e3.cornersDotOptions), e3.cornersDotOptions.gradient && (e3.cornersDotOptions.gradient = y(e3.cornersDotOptions.gradient))), e3.backgroundOptions && (e3.backgroundOptions = Object.assign({}, e3.backgroundOptions), e3.backgroundOptions.gradient && (e3.backgroundOptions.gradient = y(e3.backgroundOptions.gradient))), e3;
1034
1034
  }
1035
1035
  var S = i(873), C = i.n(S);
1036
- function A(t7) {
1037
- if (!t7) throw new Error("Extension must be defined");
1038
- "." === t7[0] && (t7 = t7.substring(1));
1039
- const e3 = { bmp: "image/bmp", gif: "image/gif", ico: "image/vnd.microsoft.icon", jpeg: "image/jpeg", jpg: "image/jpeg", png: "image/png", svg: "image/svg+xml", tif: "image/tiff", tiff: "image/tiff", webp: "image/webp", pdf: "application/pdf" }[t7.toLowerCase()];
1040
- if (!e3) throw new Error(`Extension "${t7}" is not supported`);
1036
+ function A(t8) {
1037
+ if (!t8) throw new Error("Extension must be defined");
1038
+ "." === t8[0] && (t8 = t8.substring(1));
1039
+ const e3 = { bmp: "image/bmp", gif: "image/gif", ico: "image/vnd.microsoft.icon", jpeg: "image/jpeg", jpg: "image/jpeg", png: "image/png", svg: "image/svg+xml", tif: "image/tiff", tiff: "image/tiff", webp: "image/webp", pdf: "application/pdf" }[t8.toLowerCase()];
1040
+ if (!e3) throw new Error(`Extension "${t8}" is not supported`);
1041
1041
  return e3;
1042
1042
  }
1043
1043
  class M {
1044
- constructor(t7) {
1045
- (null == t7 ? void 0 : t7.jsdom) ? this._window = new t7.jsdom("", { resources: "usable" }).window : this._window = window, this._options = t7 ? x(e2(b, t7)) : b, this.update();
1044
+ constructor(t8) {
1045
+ (null == t8 ? void 0 : t8.jsdom) ? this._window = new t8.jsdom("", { resources: "usable" }).window : this._window = window, this._options = t8 ? x(e2(b, t8)) : b, this.update();
1046
1046
  }
1047
- static _clearContainer(t7) {
1048
- t7 && (t7.innerHTML = "");
1047
+ static _clearContainer(t8) {
1048
+ t8 && (t8.innerHTML = "");
1049
1049
  }
1050
1050
  _setupSvg() {
1051
1051
  if (!this._qr) return;
1052
- const t7 = new v(this._options, this._window);
1053
- this._svg = t7.getElement(), this._svgDrawingPromise = t7.drawQR(this._qr).then((() => {
1052
+ const t8 = new v(this._options, this._window);
1053
+ this._svg = t8.getElement(), this._svgDrawingPromise = t8.drawQR(this._qr).then((() => {
1054
1054
  var e3;
1055
- this._svg && (null === (e3 = this._extension) || void 0 === e3 || e3.call(this, t7.getElement(), this._options));
1055
+ this._svg && (null === (e3 = this._extension) || void 0 === e3 || e3.call(this, t8.getElement(), this._options));
1056
1056
  }));
1057
1057
  }
1058
1058
  _setupCanvas() {
1059
- var t7, e3;
1060
- this._qr && ((null === (t7 = this._options.nodeCanvas) || void 0 === t7 ? void 0 : t7.createCanvas) ? (this._nodeCanvas = this._options.nodeCanvas.createCanvas(this._options.width, this._options.height), this._nodeCanvas.width = this._options.width, this._nodeCanvas.height = this._options.height) : (this._domCanvas = document.createElement("canvas"), this._domCanvas.width = this._options.width, this._domCanvas.height = this._options.height), this._setupSvg(), this._canvasDrawingPromise = null === (e3 = this._svgDrawingPromise) || void 0 === e3 ? void 0 : e3.then((() => {
1061
- var t8;
1059
+ var t8, e3;
1060
+ this._qr && ((null === (t8 = this._options.nodeCanvas) || void 0 === t8 ? void 0 : t8.createCanvas) ? (this._nodeCanvas = this._options.nodeCanvas.createCanvas(this._options.width, this._options.height), this._nodeCanvas.width = this._options.width, this._nodeCanvas.height = this._options.height) : (this._domCanvas = document.createElement("canvas"), this._domCanvas.width = this._options.width, this._domCanvas.height = this._options.height), this._setupSvg(), this._canvasDrawingPromise = null === (e3 = this._svgDrawingPromise) || void 0 === e3 ? void 0 : e3.then((() => {
1061
+ var t9;
1062
1062
  if (!this._svg) return;
1063
1063
  const e4 = this._svg, i2 = new this._window.XMLSerializer().serializeToString(e4), r3 = btoa(i2), n2 = `data:${A("svg")};base64,${r3}`;
1064
- if (null === (t8 = this._options.nodeCanvas) || void 0 === t8 ? void 0 : t8.loadImage) return this._options.nodeCanvas.loadImage(n2).then(((t9) => {
1064
+ if (null === (t9 = this._options.nodeCanvas) || void 0 === t9 ? void 0 : t9.loadImage) return this._options.nodeCanvas.loadImage(n2).then(((t10) => {
1065
1065
  var e5, i3;
1066
- t9.width = this._options.width, t9.height = this._options.height, null === (i3 = null === (e5 = this._nodeCanvas) || void 0 === e5 ? void 0 : e5.getContext("2d")) || void 0 === i3 || i3.drawImage(t9, 0, 0);
1066
+ t10.width = this._options.width, t10.height = this._options.height, null === (i3 = null === (e5 = this._nodeCanvas) || void 0 === e5 ? void 0 : e5.getContext("2d")) || void 0 === i3 || i3.drawImage(t10, 0, 0);
1067
1067
  }));
1068
1068
  {
1069
- const t9 = new this._window.Image();
1069
+ const t10 = new this._window.Image();
1070
1070
  return new Promise(((e5) => {
1071
- t9.onload = () => {
1071
+ t10.onload = () => {
1072
1072
  var i3, r4;
1073
- null === (r4 = null === (i3 = this._domCanvas) || void 0 === i3 ? void 0 : i3.getContext("2d")) || void 0 === r4 || r4.drawImage(t9, 0, 0), e5();
1074
- }, t9.src = n2;
1073
+ null === (r4 = null === (i3 = this._domCanvas) || void 0 === i3 ? void 0 : i3.getContext("2d")) || void 0 === r4 || r4.drawImage(t10, 0, 0), e5();
1074
+ }, t10.src = n2;
1075
1075
  }));
1076
1076
  }
1077
1077
  })));
1078
1078
  }
1079
- async _getElement(t7 = "png") {
1079
+ async _getElement(t8 = "png") {
1080
1080
  if (!this._qr) throw "QR code is empty";
1081
- return "svg" === t7.toLowerCase() ? (this._svg && this._svgDrawingPromise || this._setupSvg(), await this._svgDrawingPromise, this._svg) : ((this._domCanvas || this._nodeCanvas) && this._canvasDrawingPromise || this._setupCanvas(), await this._canvasDrawingPromise, this._domCanvas || this._nodeCanvas);
1081
+ return "svg" === t8.toLowerCase() ? (this._svg && this._svgDrawingPromise || this._setupSvg(), await this._svgDrawingPromise, this._svg) : ((this._domCanvas || this._nodeCanvas) && this._canvasDrawingPromise || this._setupCanvas(), await this._canvasDrawingPromise, this._domCanvas || this._nodeCanvas);
1082
1082
  }
1083
- update(t7) {
1084
- M._clearContainer(this._container), this._options = t7 ? x(e2(this._options, t7)) : this._options, this._options.data && (this._qr = C()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || (function(t8) {
1083
+ update(t8) {
1084
+ M._clearContainer(this._container), this._options = t8 ? x(e2(this._options, t8)) : this._options, this._options.data && (this._qr = C()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || (function(t9) {
1085
1085
  switch (true) {
1086
- case /^[0-9]*$/.test(t8):
1086
+ case /^[0-9]*$/.test(t9):
1087
1087
  return "Numeric";
1088
- case /^[0-9A-Z $%*+\-./:]*$/.test(t8):
1088
+ case /^[0-9A-Z $%*+\-./:]*$/.test(t9):
1089
1089
  return "Alphanumeric";
1090
1090
  default:
1091
1091
  return "Byte";
1092
1092
  }
1093
1093
  })(this._options.data)), this._qr.make(), this._options.type === _ ? this._setupCanvas() : this._setupSvg(), this.append(this._container));
1094
1094
  }
1095
- append(t7) {
1096
- if (t7) {
1097
- if ("function" != typeof t7.appendChild) throw "Container should be a single DOM node";
1098
- this._options.type === _ ? this._domCanvas && t7.appendChild(this._domCanvas) : this._svg && t7.appendChild(this._svg), this._container = t7;
1095
+ append(t8) {
1096
+ if (t8) {
1097
+ if ("function" != typeof t8.appendChild) throw "Container should be a single DOM node";
1098
+ this._options.type === _ ? this._domCanvas && t8.appendChild(this._domCanvas) : this._svg && t8.appendChild(this._svg), this._container = t8;
1099
1099
  }
1100
1100
  }
1101
- applyExtension(t7) {
1102
- if (!t7) throw "Extension function should be defined.";
1103
- this._extension = t7, this.update();
1101
+ applyExtension(t8) {
1102
+ if (!t8) throw "Extension function should be defined.";
1103
+ this._extension = t8, this.update();
1104
1104
  }
1105
1105
  deleteExtension() {
1106
1106
  this._extension = void 0, this.update();
1107
1107
  }
1108
- async getRawData(t7 = "png") {
1108
+ async getRawData(t8 = "png") {
1109
1109
  if (!this._qr) throw "QR code is empty";
1110
- const e3 = await this._getElement(t7), i2 = A(t7);
1110
+ const e3 = await this._getElement(t8), i2 = A(t8);
1111
1111
  if (!e3) return null;
1112
- if ("svg" === t7.toLowerCase()) {
1113
- const t8 = `<?xml version="1.0" standalone="no"?>\r
1112
+ if ("svg" === t8.toLowerCase()) {
1113
+ const t9 = `<?xml version="1.0" standalone="no"?>\r
1114
1114
  ${new this._window.XMLSerializer().serializeToString(e3)}`;
1115
- return "undefined" == typeof Blob || this._options.jsdom ? Buffer.from(t8) : new Blob([t8], { type: i2 });
1115
+ return "undefined" == typeof Blob || this._options.jsdom ? Buffer.from(t9) : new Blob([t9], { type: i2 });
1116
1116
  }
1117
- return new Promise(((t8) => {
1117
+ return new Promise(((t9) => {
1118
1118
  const r3 = e3;
1119
- if ("toBuffer" in r3) if ("image/png" === i2) t8(r3.toBuffer(i2));
1120
- else if ("image/jpeg" === i2) t8(r3.toBuffer(i2));
1119
+ if ("toBuffer" in r3) if ("image/png" === i2) t9(r3.toBuffer(i2));
1120
+ else if ("image/jpeg" === i2) t9(r3.toBuffer(i2));
1121
1121
  else {
1122
1122
  if ("application/pdf" !== i2) throw Error("Unsupported extension");
1123
- t8(r3.toBuffer(i2));
1123
+ t9(r3.toBuffer(i2));
1124
1124
  }
1125
- else "toBlob" in r3 && r3.toBlob(t8, i2, 1);
1125
+ else "toBlob" in r3 && r3.toBlob(t9, i2, 1);
1126
1126
  }));
1127
1127
  }
1128
- async download(t7) {
1128
+ async download(t8) {
1129
1129
  if (!this._qr) throw "QR code is empty";
1130
1130
  if ("undefined" == typeof Blob) throw "Cannot download in Node.js, call getRawData instead.";
1131
1131
  let e3 = "png", i2 = "qr";
1132
- "string" == typeof t7 ? (e3 = t7, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : "object" == typeof t7 && null !== t7 && (t7.name && (i2 = t7.name), t7.extension && (e3 = t7.extension));
1132
+ "string" == typeof t8 ? (e3 = t8, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : "object" == typeof t8 && null !== t8 && (t8.name && (i2 = t8.name), t8.extension && (e3 = t8.extension));
1133
1133
  const r3 = await this._getElement(e3);
1134
1134
  if (r3) if ("svg" === e3.toLowerCase()) {
1135
- let t8 = new XMLSerializer().serializeToString(r3);
1136
- t8 = '<?xml version="1.0" standalone="no"?>\r\n' + t8, n(`data:${A(e3)};charset=utf-8,${encodeURIComponent(t8)}`, `${i2}.svg`);
1135
+ let t9 = new XMLSerializer().serializeToString(r3);
1136
+ t9 = '<?xml version="1.0" standalone="no"?>\r\n' + t9, n(`data:${A(e3)};charset=utf-8,${encodeURIComponent(t9)}`, `${i2}.svg`);
1137
1137
  } else n(r3.toDataURL(A(e3)), `${i2}.${e3}`);
1138
1138
  }
1139
1139
  }
@@ -1145,8 +1145,8 @@ ${new this._window.XMLSerializer().serializeToString(e3)}`;
1145
1145
 
1146
1146
  // src/provider.tsx
1147
1147
  import React38, {
1148
- useState as useState23,
1149
- useCallback as useCallback10,
1148
+ useState as useState24,
1149
+ useCallback as useCallback11,
1150
1150
  useMemo as useMemo13
1151
1151
  } from "react";
1152
1152
 
@@ -1217,7 +1217,7 @@ function useUnifold() {
1217
1217
  }
1218
1218
 
1219
1219
  // ../ui-react/dist/index.mjs
1220
- import { useState as useState17, useEffect as useEffect142 } from "react";
1220
+ import { useState as useState19, useEffect as useEffect142 } from "react";
1221
1221
 
1222
1222
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1223
1223
  import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
@@ -1312,13 +1312,6 @@ var ChevronRight = createLucideIcon("ChevronRight", [
1312
1312
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1313
1313
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
1314
1314
 
1315
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-help.js
1316
- var CircleHelp = createLucideIcon("CircleHelp", [
1317
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1318
- ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
1319
- ["path", { d: "M12 17h.01", key: "p32p05" }]
1320
- ]);
1321
-
1322
1315
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
1323
1316
  var Clock = createLucideIcon("Clock", [
1324
1317
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
@@ -1350,15 +1343,6 @@ var ExternalLink = createLucideIcon("ExternalLink", [
1350
1343
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
1351
1344
  ]);
1352
1345
 
1353
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js
1354
- var FileText = createLucideIcon("FileText", [
1355
- ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
1356
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
1357
- ["path", { d: "M10 9H8", key: "b1mrlr" }],
1358
- ["path", { d: "M16 13H8", key: "t4e002" }],
1359
- ["path", { d: "M16 17H8", key: "z1uh3a" }]
1360
- ]);
1361
-
1362
1346
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
1363
1347
  var Info = createLucideIcon("Info", [
1364
1348
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
@@ -1406,6 +1390,18 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
1406
1390
  ["path", { d: "M12 17h.01", key: "p32p05" }]
1407
1391
  ]);
1408
1392
 
1393
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
1394
+ var WalletMinimal = createLucideIcon("WalletMinimal", [
1395
+ ["path", { d: "M17 14h.01", key: "7oqj8z" }],
1396
+ [
1397
+ "path",
1398
+ {
1399
+ d: "M7 7h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14",
1400
+ key: "u1rqew"
1401
+ }
1402
+ ]
1403
+ ]);
1404
+
1409
1405
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
1410
1406
  var X = createLucideIcon("X", [
1411
1407
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
@@ -2385,25 +2381,25 @@ function createFocusGuard() {
2385
2381
 
2386
2382
  // ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2387
2383
  var __assign = function() {
2388
- __assign = Object.assign || function __assign2(t5) {
2384
+ __assign = Object.assign || function __assign2(t6) {
2389
2385
  for (var s, i = 1, n = arguments.length; i < n; i++) {
2390
2386
  s = arguments[i];
2391
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t5[p] = s[p];
2387
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t6[p] = s[p];
2392
2388
  }
2393
- return t5;
2389
+ return t6;
2394
2390
  };
2395
2391
  return __assign.apply(this, arguments);
2396
2392
  };
2397
2393
  function __rest(s, e) {
2398
- var t5 = {};
2394
+ var t6 = {};
2399
2395
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2400
- t5[p] = s[p];
2396
+ t6[p] = s[p];
2401
2397
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
2402
2398
  for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2403
2399
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2404
- t5[p[i]] = s[p[i]];
2400
+ t6[p[i]] = s[p[i]];
2405
2401
  }
2406
- return t5;
2402
+ return t6;
2407
2403
  }
2408
2404
  function __spreadArray(to, from, pack) {
2409
2405
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
@@ -3530,16 +3526,16 @@ var Close = DialogClose;
3530
3526
 
3531
3527
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
3532
3528
  function r(e) {
3533
- var t5, f, n = "";
3529
+ var t6, f, n = "";
3534
3530
  if ("string" == typeof e || "number" == typeof e) n += e;
3535
3531
  else if ("object" == typeof e) if (Array.isArray(e)) {
3536
3532
  var o = e.length;
3537
- for (t5 = 0; t5 < o; t5++) e[t5] && (f = r(e[t5])) && (n && (n += " "), n += f);
3533
+ for (t6 = 0; t6 < o; t6++) e[t6] && (f = r(e[t6])) && (n && (n += " "), n += f);
3538
3534
  } else for (f in e) e[f] && (n && (n += " "), n += f);
3539
3535
  return n;
3540
3536
  }
3541
3537
  function clsx() {
3542
- for (var e, t5, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t5 = r(e)) && (n && (n += " "), n += t5);
3538
+ for (var e, t6, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t6 = r(e)) && (n && (n += " "), n += t6);
3543
3539
  return n;
3544
3540
  }
3545
3541
 
@@ -6125,6 +6121,26 @@ async function queryExecutions(externalUserId, publishableKey) {
6125
6121
  }
6126
6122
  return response.json();
6127
6123
  }
6124
+ async function pollDirectExecutions(request, publishableKey) {
6125
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6126
+ validatePublishableKey(pk);
6127
+ const response = await fetch(
6128
+ `${API_BASE_URL}/v1/public/direct_executions/poll`,
6129
+ {
6130
+ method: "POST",
6131
+ headers: {
6132
+ accept: "application/json",
6133
+ "x-publishable-key": pk,
6134
+ "Content-Type": "application/json"
6135
+ },
6136
+ body: JSON.stringify(request)
6137
+ }
6138
+ );
6139
+ if (!response.ok) {
6140
+ throw new Error(`Failed to poll direct executions: ${response.statusText}`);
6141
+ }
6142
+ return response.json();
6143
+ }
6128
6144
  async function getSupportedDepositTokens(publishableKey, options) {
6129
6145
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6130
6146
  validatePublishableKey(pk);
@@ -6506,12 +6522,16 @@ import * as React72 from "react";
6506
6522
  import { jsx as jsx162, jsxs as jsxs13 } from "react/jsx-runtime";
6507
6523
  import { useQuery as useQuery22 } from "@tanstack/react-query";
6508
6524
  import { useQuery as useQuery3 } from "@tanstack/react-query";
6509
- import { useState as useState152, useEffect as useEffect122 } from "react";
6525
+ import { useState as useState172, useEffect as useEffect122, useRef as useRef42 } from "react";
6510
6526
  var import_qr_code_styling = __toESM(require_qr_code_styling(), 1);
6511
6527
  import { useEffect as useEffect102, useRef as useRef32 } from "react";
6512
6528
  import { jsx as jsx172 } from "react/jsx-runtime";
6513
6529
  import { useState as useState142, useMemo as useMemo32, useEffect as useEffect112 } from "react";
6514
6530
  import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
6531
+ import { jsx as jsx19 } from "react/jsx-runtime";
6532
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
6533
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
6534
+ import { useState as useState152 } from "react";
6515
6535
  import * as React82 from "react";
6516
6536
 
6517
6537
  // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
@@ -9244,15 +9264,14 @@ function getHullPresorted(points) {
9244
9264
  }
9245
9265
  }
9246
9266
  var Provider = TooltipProvider;
9247
- var Root32 = Tooltip;
9248
9267
  var Trigger = TooltipTrigger;
9249
9268
  var Portal3 = TooltipPortal;
9250
9269
  var Content22 = TooltipContent;
9251
9270
 
9252
9271
  // ../ui-react/dist/index.mjs
9253
- import { jsx as jsx19 } from "react/jsx-runtime";
9254
- import { Fragment as Fragment42, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
9255
- import { useState as useState162, useEffect as useEffect132 } from "react";
9272
+ import { jsx as jsx222 } from "react/jsx-runtime";
9273
+ import { Fragment as Fragment42, jsx as jsx232, jsxs as jsxs17 } from "react/jsx-runtime";
9274
+ import { useState as useState182, useEffect as useEffect132, useRef as useRef52 } from "react";
9256
9275
  import * as React92 from "react";
9257
9276
 
9258
9277
  // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
@@ -10488,9 +10507,9 @@ var ScrollDownButton = SelectScrollDownButton;
10488
10507
  var Separator = SelectSeparator;
10489
10508
 
10490
10509
  // ../ui-react/dist/index.mjs
10491
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
10492
- import { jsx as jsx222, jsxs as jsxs17 } from "react/jsx-runtime";
10493
- import { Fragment as Fragment52, jsx as jsx232, jsxs as jsxs18 } from "react/jsx-runtime";
10510
+ import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
10511
+ import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
10512
+ import { Fragment as Fragment52, jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
10494
10513
  import * as React102 from "react";
10495
10514
 
10496
10515
  // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
@@ -10637,7 +10656,7 @@ var cva = (base, config) => (props) => {
10637
10656
  };
10638
10657
 
10639
10658
  // ../ui-react/dist/index.mjs
10640
- import { jsx as jsx24 } from "react/jsx-runtime";
10659
+ import { jsx as jsx27 } from "react/jsx-runtime";
10641
10660
  function cn(...inputs) {
10642
10661
  return twMerge(clsx(inputs));
10643
10662
  }
@@ -14170,7 +14189,7 @@ function saveRecentToken(token) {
14170
14189
  try {
14171
14190
  const recent = getRecentTokens();
14172
14191
  const filtered = recent.filter(
14173
- (t5) => !(t5.symbol === token.symbol && t5.chainType === token.chainType && t5.chainId === token.chainId)
14192
+ (t6) => !(t6.symbol === token.symbol && t6.chainType === token.chainType && t6.chainId === token.chainId)
14174
14193
  );
14175
14194
  filtered.unshift(token);
14176
14195
  const trimmed = filtered.slice(0, MAX_RECENT_TOKENS);
@@ -14183,7 +14202,7 @@ function removeRecentToken(token) {
14183
14202
  try {
14184
14203
  const recent = getRecentTokens();
14185
14204
  const filtered = recent.filter(
14186
- (t5) => !(t5.symbol === token.symbol && t5.chainType === token.chainType && t5.chainId === token.chainId)
14205
+ (t6) => !(t6.symbol === token.symbol && t6.chainType === token.chainType && t6.chainId === token.chainId)
14187
14206
  );
14188
14207
  localStorage.setItem(STORAGE_KEY, JSON.stringify(filtered));
14189
14208
  return filtered;
@@ -14222,7 +14241,7 @@ function TokenSelectorSheet({
14222
14241
  const addOption = (symbol, chainType, chainId, isRecent) => {
14223
14242
  const key = `${symbol}-${chainType}:${chainId}`;
14224
14243
  if (seen.has(key)) return;
14225
- const tokenData = tokens.find((t5) => t5.symbol === symbol);
14244
+ const tokenData = tokens.find((t6) => t6.symbol === symbol);
14226
14245
  if (!tokenData) return;
14227
14246
  const chainData = tokenData.chains.find(
14228
14247
  (c) => c.chain_type === chainType && c.chain_id === chainId
@@ -14590,12 +14609,175 @@ function TokenSelectorSheet({
14590
14609
  }
14591
14610
  );
14592
14611
  }
14612
+ function PollCooldownButton({
14613
+ currentWalletId,
14614
+ pollCooldown,
14615
+ publishableKey,
14616
+ onCooldownChange,
14617
+ cooldownRef,
14618
+ buttonText = "Check again"
14619
+ }) {
14620
+ const handleClick = async () => {
14621
+ if (!currentWalletId || pollCooldown > 0) return;
14622
+ try {
14623
+ await pollDirectExecutions(
14624
+ { deposit_wallet_id: currentWalletId },
14625
+ publishableKey
14626
+ );
14627
+ const cooldownSeconds = 5;
14628
+ onCooldownChange(cooldownSeconds);
14629
+ if (cooldownRef.current) clearInterval(cooldownRef.current);
14630
+ cooldownRef.current = setInterval(() => {
14631
+ onCooldownChange((prev) => {
14632
+ if (prev <= 1) {
14633
+ if (cooldownRef.current) clearInterval(cooldownRef.current);
14634
+ cooldownRef.current = null;
14635
+ return 0;
14636
+ }
14637
+ return prev - 1;
14638
+ });
14639
+ }, 1e3);
14640
+ } catch (error) {
14641
+ console.error("Failed to start poll workflow:", error);
14642
+ }
14643
+ };
14644
+ return /* @__PURE__ */ jsx19("div", { children: /* @__PURE__ */ jsx19(
14645
+ "button",
14646
+ {
14647
+ onClick: handleClick,
14648
+ disabled: !currentWalletId || pollCooldown > 0,
14649
+ className: "uf-w-full uf-rounded-xl uf-p-2 uf-flex uf-items-center uf-gap-3 uf-justify-center uf-text-center uf-text-sm uf-bg-primary hover:uf-bg-primary/80 uf-transition-colors uf-text-left disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
14650
+ children: pollCooldown > 0 ? `${buttonText} in ${pollCooldown}s` : "I've made the deposit"
14651
+ }
14652
+ ) });
14653
+ }
14654
+ function DepositFooterLinks({ onGlossaryClick }) {
14655
+ return /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-justify-end uf-items-center uf-gap-2 uf-text-xs uf-text-muted-foreground", children: [
14656
+ /* @__PURE__ */ jsx20(
14657
+ "a",
14658
+ {
14659
+ href: "https://unifold.io/terms",
14660
+ target: "_blank",
14661
+ className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
14662
+ children: "terms"
14663
+ }
14664
+ ),
14665
+ /* @__PURE__ */ jsx20("span", { className: "uf-text-xs uf-text-muted-foreground", children: "|" }),
14666
+ /* @__PURE__ */ jsx20(
14667
+ "a",
14668
+ {
14669
+ href: "https://unifold.io/support",
14670
+ target: "_blank",
14671
+ className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
14672
+ children: "help"
14673
+ }
14674
+ ),
14675
+ /* @__PURE__ */ jsx20("span", { className: "uf-text-xs uf-text-muted-foreground", children: "|" }),
14676
+ /* @__PURE__ */ jsx20(
14677
+ "div",
14678
+ {
14679
+ className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
14680
+ onClick: onGlossaryClick,
14681
+ children: "glossary"
14682
+ }
14683
+ )
14684
+ ] });
14685
+ }
14686
+ var t2 = i18n2.transferCrypto;
14687
+ function GlossaryModal({
14688
+ open,
14689
+ onOpenChange,
14690
+ themeClass,
14691
+ colors: colors2
14692
+ }) {
14693
+ return /* @__PURE__ */ jsx21(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs16(
14694
+ DialogContent2,
14695
+ {
14696
+ className: `sm:uf-max-w-[400px] !uf-top-auto !uf-h-auto sm:!uf-top-[50%] uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
14697
+ style: { backgroundColor: colors2.card },
14698
+ children: [
14699
+ /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-justify-between uf-p-4 uf-pb-2", children: [
14700
+ /* @__PURE__ */ jsx21(DialogTitle2, { className: "uf-text-base uf-font-semibold", children: "Glossary" }),
14701
+ /* @__PURE__ */ jsx21(
14702
+ "button",
14703
+ {
14704
+ onClick: () => onOpenChange(false),
14705
+ className: "uf-p-1 uf-rounded-lg hover:uf-bg-secondary uf-transition-colors uf-text-muted-foreground hover:uf-text-foreground",
14706
+ children: /* @__PURE__ */ jsx21(X, { className: "uf-w-4 uf-h-4" })
14707
+ }
14708
+ )
14709
+ ] }),
14710
+ /* @__PURE__ */ jsx21("div", { className: "uf-max-h-[60vh] sm:uf-max-h-[400px] uf-overflow-y-auto uf-px-4 uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs16("div", { className: "uf-space-y-4", children: [
14711
+ /* @__PURE__ */ jsxs16("div", { children: [
14712
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Your Deposit Token" }),
14713
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.selectTokenDepositTooltip })
14714
+ ] }),
14715
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14716
+ /* @__PURE__ */ jsxs16("div", { children: [
14717
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Deposit Address" }),
14718
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "A unique wallet address generated for you. Send supported tokens to this address and they will be automatically converted and deposited into your account." })
14719
+ ] }),
14720
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14721
+ /* @__PURE__ */ jsxs16("div", { children: [
14722
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Price Impact" }),
14723
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.priceImpact.tooltip })
14724
+ ] }),
14725
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14726
+ /* @__PURE__ */ jsxs16("div", { children: [
14727
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Slippage" }),
14728
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.slippage.tooltip })
14729
+ ] }),
14730
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14731
+ /* @__PURE__ */ jsxs16("div", { children: [
14732
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Processing Time" }),
14733
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "The estimated time for your deposit to be confirmed and credited. This depends on the source network's block confirmation time and current congestion." })
14734
+ ] }),
14735
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14736
+ /* @__PURE__ */ jsxs16("div", { children: [
14737
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Minimum Deposit" }),
14738
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.minDeposit.tooltip })
14739
+ ] }),
14740
+ /* @__PURE__ */ jsx21("div", { className: "uf-border-t uf-border-border" }),
14741
+ /* @__PURE__ */ jsxs16("div", { children: [
14742
+ /* @__PURE__ */ jsx21("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Recipient Address" }),
14743
+ /* @__PURE__ */ jsx21("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "The destination address on the target blockchain where your converted deposit will be sent. This is typically your wallet address on the application's native chain." })
14744
+ ] })
14745
+ ] }) })
14746
+ ]
14747
+ }
14748
+ ) });
14749
+ }
14750
+ function useCopyAddress() {
14751
+ const [copied, setCopied] = useState152(false);
14752
+ const handleCopy = (address) => {
14753
+ if (!address) return;
14754
+ navigator.clipboard.writeText(address);
14755
+ setCopied(true);
14756
+ setTimeout(() => setCopied(false), 2e3);
14757
+ };
14758
+ return { copied, handleCopy };
14759
+ }
14593
14760
  var TooltipProvider2 = Provider;
14594
- var Tooltip2 = Root32;
14595
- var TooltipTrigger2 = Trigger;
14761
+ var TooltipContext = React82.createContext({
14762
+ open: false,
14763
+ onOpenChange: () => {
14764
+ }
14765
+ });
14766
+ var TooltipTrigger2 = React82.forwardRef(({ onClick, ...props }, ref) => {
14767
+ const { open, onOpenChange } = React82.useContext(TooltipContext);
14768
+ const handleClick = React82.useCallback(
14769
+ (e) => {
14770
+ onOpenChange(!open);
14771
+ onClick?.(e);
14772
+ },
14773
+ [open, onOpenChange, onClick]
14774
+ );
14775
+ return /* @__PURE__ */ jsx222(Trigger, { ref, onClick: handleClick, ...props });
14776
+ });
14777
+ TooltipTrigger2.displayName = Trigger.displayName;
14596
14778
  var TooltipContent2 = React82.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
14597
14779
  const { themeClass, colors: colors2 } = useTheme();
14598
- return /* @__PURE__ */ jsx19(Portal3, { children: /* @__PURE__ */ jsx19(
14780
+ return /* @__PURE__ */ jsx222(Portal3, { children: /* @__PURE__ */ jsx222(
14599
14781
  Content22,
14600
14782
  {
14601
14783
  ref,
@@ -14611,7 +14793,7 @@ var TooltipContent2 = React82.forwardRef(({ className, sideOffset = 4, ...props
14611
14793
  ) });
14612
14794
  });
14613
14795
  TooltipContent2.displayName = Content22.displayName;
14614
- var t2 = i18n2.transferCrypto;
14796
+ var t3 = i18n2.transferCrypto;
14615
14797
  var getChainKey = (chainId, chainType) => {
14616
14798
  return `${chainType}:${chainId}`;
14617
14799
  };
@@ -14633,13 +14815,25 @@ function TransferCryptoSingleInput({
14633
14815
  }) {
14634
14816
  const { themeClass, colors: colors2, fonts, components } = useTheme();
14635
14817
  const isDarkMode = themeClass.includes("uf-dark");
14636
- const [token, setToken] = useState152("USDC");
14637
- const [chain, setChain] = useState152("solana:mainnet");
14638
- const [copied, setCopied] = useState152(false);
14639
- const [internalWallets, setInternalWallets] = useState152([]);
14640
- const [loading, setLoading] = useState152(!externalWallets?.length);
14818
+ const [token, setToken] = useState172("USDC");
14819
+ const [chain, setChain] = useState172("solana:mainnet");
14820
+ const [copied, setCopied] = useState172(false);
14821
+ const { copied: copiedRecipient, handleCopy: handleCopyRecipientAddress } = useCopyAddress();
14822
+ const [glossaryOpen, setGlossaryOpen] = useState172(false);
14823
+ const [pollCooldown, setPollCooldown] = useState172(0);
14824
+ const cooldownRef = useRef42(null);
14825
+ const [internalWallets, setInternalWallets] = useState172([]);
14826
+ const [loading, setLoading] = useState172(!externalWallets?.length);
14827
+ useEffect122(() => {
14828
+ return () => {
14829
+ if (cooldownRef.current) {
14830
+ clearInterval(cooldownRef.current);
14831
+ cooldownRef.current = null;
14832
+ }
14833
+ };
14834
+ }, []);
14641
14835
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
14642
- const [error, setError] = useState152(null);
14836
+ const [error, setError] = useState172(null);
14643
14837
  const { executions: depositExecutions, isPolling } = useDepositPolling({
14644
14838
  userId,
14645
14839
  publishableKey,
@@ -14647,14 +14841,14 @@ function TransferCryptoSingleInput({
14647
14841
  onDepositSuccess,
14648
14842
  onDepositError
14649
14843
  });
14650
- const [supportedTokens, setSupportedTokens] = useState152([]);
14651
- const [tokensLoading, setTokensLoading] = useState152(true);
14652
- const [detailsExpanded, setDetailsExpanded] = useState152(false);
14653
- const [depositsModalOpen, setDepositsModalOpen] = useState152(false);
14654
- const [tokenSelectorOpen, setTokenSelectorOpen] = useState152(false);
14844
+ const [supportedTokens, setSupportedTokens] = useState172([]);
14845
+ const [tokensLoading, setTokensLoading] = useState172(true);
14846
+ const [detailsExpanded, setDetailsExpanded] = useState172(false);
14847
+ const [depositsModalOpen, setDepositsModalOpen] = useState172(false);
14848
+ const [tokenSelectorOpen, setTokenSelectorOpen] = useState172(false);
14655
14849
  const allChainsMap = /* @__PURE__ */ new Map();
14656
- supportedTokens.forEach((t5) => {
14657
- t5.chains.forEach((c) => {
14850
+ supportedTokens.forEach((t6) => {
14851
+ t6.chains.forEach((c) => {
14658
14852
  const comboKey = `${c.chain_type}:${c.chain_id}`;
14659
14853
  if (!allChainsMap.has(comboKey)) {
14660
14854
  allChainsMap.set(comboKey, c);
@@ -14687,25 +14881,25 @@ function TransferCryptoSingleInput({
14687
14881
  let selectedTokenData;
14688
14882
  let selectedChainData;
14689
14883
  if (destinationTokenAddress) {
14690
- for (const t5 of response.data) {
14691
- const matchingChain = t5.chains.find(
14884
+ for (const t6 of response.data) {
14885
+ const matchingChain = t6.chains.find(
14692
14886
  (c) => c.token_address.toLowerCase() === destinationTokenAddress.toLowerCase()
14693
14887
  );
14694
14888
  if (matchingChain) {
14695
- selectedTokenData = t5;
14889
+ selectedTokenData = t6;
14696
14890
  selectedChainData = matchingChain;
14697
14891
  break;
14698
14892
  }
14699
14893
  }
14700
14894
  }
14701
14895
  if (!selectedTokenData) {
14702
- selectedTokenData = response.data.find((t5) => t5.symbol === "USDC");
14896
+ selectedTokenData = response.data.find((t6) => t6.symbol === "USDC");
14703
14897
  if (selectedTokenData && selectedTokenData.chains.length > 0) {
14704
14898
  selectedChainData = selectedTokenData.chains[0];
14705
14899
  }
14706
14900
  }
14707
14901
  if (!selectedTokenData) {
14708
- selectedTokenData = response.data.find((t5) => t5.symbol === "USDT");
14902
+ selectedTokenData = response.data.find((t6) => t6.symbol === "USDT");
14709
14903
  if (selectedTokenData && selectedTokenData.chains.length > 0) {
14710
14904
  selectedChainData = selectedTokenData.chains[0];
14711
14905
  }
@@ -14805,7 +14999,7 @@ function TransferCryptoSingleInput({
14805
14999
  ]);
14806
15000
  useEffect122(() => {
14807
15001
  if (!supportedTokens.length) return;
14808
- const currentToken = supportedTokens.find((t5) => t5.symbol === token);
15002
+ const currentToken = supportedTokens.find((t6) => t6.symbol === token);
14809
15003
  if (!currentToken || currentToken.chains.length === 0) return;
14810
15004
  const isChainAvailable = currentToken.chains.some((c) => {
14811
15005
  const key = getChainKey(c.chain_id, c.chain_type);
@@ -14817,7 +15011,7 @@ function TransferCryptoSingleInput({
14817
15011
  setChain(newChain);
14818
15012
  }
14819
15013
  }, [token, supportedTokens, chain]);
14820
- const selectedToken = supportedTokens.find((t5) => t5.symbol === token);
15014
+ const selectedToken = supportedTokens.find((t6) => t6.symbol === token);
14821
15015
  const availableChainsForToken = selectedToken?.chains || [];
14822
15016
  const currentChainFromBackend = availableChainsForToken.find((c) => {
14823
15017
  const key = getChainKey(c.chain_id, c.chain_type);
@@ -14833,67 +15027,44 @@ function TransferCryptoSingleInput({
14833
15027
  };
14834
15028
  const formatProcessingTime = (seconds) => {
14835
15029
  if (seconds === null) {
14836
- return t2.processingTime.lessThanMinutes.replace("{{minutes}}", "1");
15030
+ return t3.processingTime.lessThanMinutes.replace("{{minutes}}", "1");
14837
15031
  }
14838
15032
  const minutes = Math.ceil(seconds / 60);
14839
15033
  if (minutes < 60) {
14840
- return t2.processingTime.lessThanMinutes.replace(
15034
+ return t3.processingTime.lessThanMinutes.replace(
14841
15035
  "{{minutes}}",
14842
15036
  String(minutes)
14843
15037
  );
14844
15038
  }
14845
15039
  const hours = Math.ceil(minutes / 60);
14846
- return t2.processingTime.lessThanHours.replace("{{hours}}", String(hours));
15040
+ return t3.processingTime.lessThanHours.replace("{{hours}}", String(hours));
14847
15041
  };
14848
15042
  const priceImpact = currentChainFromBackend?.estimated_price_impact_percent ?? 0;
14849
15043
  const maxSlippage = currentChainFromBackend?.max_slippage_percent ?? 0.25;
14850
15044
  const processingTime = currentChainFromBackend?.estimated_processing_time ?? null;
14851
15045
  const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
14852
- return /* @__PURE__ */ jsx20(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs15(
15046
+ return /* @__PURE__ */ jsx232(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs17(
14853
15047
  "div",
14854
15048
  {
14855
15049
  className: "uf-space-y-3 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden",
14856
15050
  style: { backgroundColor: colors2.background },
14857
15051
  children: [
14858
- /* @__PURE__ */ jsx20("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-1 uf-flex uf-items-center uf-justify-between", children: /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
14859
- t2.selectTokenDeposit,
14860
- /* @__PURE__ */ jsxs15(Tooltip2, { children: [
14861
- /* @__PURE__ */ jsx20(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx20(
14862
- "span",
14863
- {
14864
- className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
14865
- tabIndex: 0,
14866
- role: "button",
14867
- "aria-label": "Deposit address information",
14868
- children: /* @__PURE__ */ jsx20(Info, { className: "uf-w-3 uf-h-3" })
14869
- }
14870
- ) }),
14871
- /* @__PURE__ */ jsx20(
14872
- TooltipContent2,
14873
- {
14874
- side: "bottom",
14875
- align: "center",
14876
- className: "uf-max-w-[240px]",
14877
- children: /* @__PURE__ */ jsx20("p", { children: t2.selectTokenDepositTooltip })
14878
- }
14879
- )
14880
- ] })
14881
- ] }) }),
14882
- /* @__PURE__ */ jsx20(
15052
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-1 uf-flex uf-items-center uf-justify-between", children: /* @__PURE__ */ jsx232("div", { className: "uf-flex uf-items-center uf-gap-1", children: t3.selectTokenDeposit }) }),
15053
+ /* @__PURE__ */ jsx232(
14883
15054
  "button",
14884
15055
  {
14885
15056
  onClick: () => setTokenSelectorOpen(true),
14886
15057
  disabled: tokensLoading || supportedTokens.length === 0,
14887
15058
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3 uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
14888
- children: tokensLoading ? /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-3 uf-animate-pulse", children: [
14889
- /* @__PURE__ */ jsx20("div", { className: "uf-w-10 uf-h-10 uf-rounded-full uf-bg-muted" }),
14890
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex-1", children: [
14891
- /* @__PURE__ */ jsx20("div", { className: "uf-h-4 uf-w-16 uf-bg-muted uf-rounded uf-mb-1" }),
14892
- /* @__PURE__ */ jsx20("div", { className: "uf-h-3 uf-w-24 uf-bg-muted uf-rounded" })
15059
+ children: tokensLoading ? /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-3 uf-animate-pulse", children: [
15060
+ /* @__PURE__ */ jsx232("div", { className: "uf-w-10 uf-h-10 uf-rounded-full uf-bg-muted" }),
15061
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex-1", children: [
15062
+ /* @__PURE__ */ jsx232("div", { className: "uf-h-4 uf-w-16 uf-bg-muted uf-rounded uf-mb-1" }),
15063
+ /* @__PURE__ */ jsx232("div", { className: "uf-h-3 uf-w-24 uf-bg-muted uf-rounded" })
14893
15064
  ] })
14894
- ] }) : /* @__PURE__ */ jsxs15(Fragment42, { children: [
14895
- /* @__PURE__ */ jsxs15("div", { className: "uf-relative uf-flex-shrink-0", children: [
14896
- selectedToken && /* @__PURE__ */ jsx20(
15065
+ ] }) : /* @__PURE__ */ jsxs17(Fragment42, { children: [
15066
+ /* @__PURE__ */ jsxs17("div", { className: "uf-relative uf-flex-shrink-0", children: [
15067
+ selectedToken && /* @__PURE__ */ jsx232(
14897
15068
  "img",
14898
15069
  {
14899
15070
  src: selectedToken.icon_url,
@@ -14901,7 +15072,7 @@ function TransferCryptoSingleInput({
14901
15072
  className: "uf-w-10 uf-h-10 uf-rounded-full"
14902
15073
  }
14903
15074
  ),
14904
- (currentChainFromBackend || currentChainData) && /* @__PURE__ */ jsx20(
15075
+ (currentChainFromBackend || currentChainData) && /* @__PURE__ */ jsx232(
14905
15076
  "img",
14906
15077
  {
14907
15078
  src: currentChainFromBackend?.icon_url || currentChainData?.icon_url,
@@ -14910,12 +15081,12 @@ function TransferCryptoSingleInput({
14910
15081
  }
14911
15082
  )
14912
15083
  ] }),
14913
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex-1 uf-text-left uf-min-w-0", children: [
14914
- /* @__PURE__ */ jsx20("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: selectedToken?.symbol || token }),
14915
- /* @__PURE__ */ jsx20("div", { className: "uf-text-xs uf-text-muted-foreground uf-truncate", children: currentChainFromBackend?.chain_name || currentChainData?.chain_name || "Select network" })
15084
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex-1 uf-text-left uf-min-w-0", children: [
15085
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: selectedToken?.symbol || token }),
15086
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-xs uf-text-muted-foreground uf-truncate", children: currentChainFromBackend?.chain_name || currentChainData?.chain_name || "Select network" })
14916
15087
  ] }),
14917
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2 uf-flex-shrink-0", children: [
14918
- /* @__PURE__ */ jsx20("div", { className: "uf-text-right", children: /* @__PURE__ */ jsxs15(
15088
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2 uf-flex-shrink-0", children: [
15089
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-right", children: /* @__PURE__ */ jsxs17(
14919
15090
  "div",
14920
15091
  {
14921
15092
  className: `uf-text-xs uf-font-medium ${isDarkMode ? "uf-text-amber-400" : "uf-text-amber-600"}`,
@@ -14926,12 +15097,12 @@ function TransferCryptoSingleInput({
14926
15097
  ]
14927
15098
  }
14928
15099
  ) }),
14929
- /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
15100
+ /* @__PURE__ */ jsx232(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
14930
15101
  ] })
14931
15102
  ] })
14932
15103
  }
14933
15104
  ),
14934
- /* @__PURE__ */ jsx20(
15105
+ /* @__PURE__ */ jsx232(
14935
15106
  TokenSelectorSheet,
14936
15107
  {
14937
15108
  open: tokenSelectorOpen,
@@ -14945,226 +15116,157 @@ function TransferCryptoSingleInput({
14945
15116
  }
14946
15117
  }
14947
15118
  ),
14948
- /* @__PURE__ */ jsx20("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx20("div", { className: "uf-p-2 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx20(
14949
- "div",
14950
- {
14951
- className: "uf-flex uf-items-center uf-justify-center",
14952
- style: { width: 180, height: 180 },
14953
- children: /* @__PURE__ */ jsx20("div", { className: "uf-text-foreground uf-text-sm", children: t2.loadingQRCode })
14954
- }
14955
- ) : depositAddress ? /* @__PURE__ */ jsx20(
14956
- StyledQRCode,
14957
- {
14958
- value: depositAddress,
14959
- size: 180,
14960
- imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url,
14961
- imageSize: 45,
14962
- darkMode: isDarkMode
14963
- },
14964
- `qr-${depositAddress}-${chain}`
14965
- ) : /* @__PURE__ */ jsx20(
14966
- "div",
14967
- {
14968
- className: "uf-flex uf-items-center uf-justify-center",
14969
- style: { width: 180, height: 180 },
14970
- children: /* @__PURE__ */ jsx20("div", { className: "uf-text-red-400 uf-text-sm", children: t2.noAddressAvailable })
14971
- }
14972
- ) }) }),
14973
- /* @__PURE__ */ jsxs15("div", { children: [
14974
- /* @__PURE__ */ jsxs15("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
14975
- t2.depositAddress.label,
14976
- /* @__PURE__ */ jsxs15(Tooltip2, { children: [
14977
- /* @__PURE__ */ jsx20(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx20(
14978
- "span",
14979
- {
14980
- className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
14981
- tabIndex: 0,
14982
- role: "button",
14983
- "aria-label": "Deposit address information",
14984
- children: /* @__PURE__ */ jsx20(Info, { className: "uf-w-3 uf-h-3" })
14985
- }
14986
- ) }),
14987
- /* @__PURE__ */ jsx20(
14988
- TooltipContent2,
14989
- {
14990
- side: "top",
14991
- align: "center",
14992
- className: "uf-max-w-[240px]",
14993
- children: /* @__PURE__ */ jsx20("p", { children: t2.depositAddress.tooltip.replace("{{token}}", token) })
14994
- }
14995
- )
15119
+ error && !loading && /* @__PURE__ */ jsxs17("div", { className: "uf-bg-destructive/10 uf-border uf-border-destructive/20 uf-rounded-xl uf-p-3 uf-space-y-2", children: [
15120
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-start uf-gap-2", children: [
15121
+ /* @__PURE__ */ jsx232(Info, { className: "uf-w-4 uf-h-4 uf-text-destructive uf-flex-shrink-0 uf-mt-0.5" }),
15122
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex-1 uf-min-w-0", children: [
15123
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-xs uf-font-medium uf-text-destructive uf-mb-1", children: "Failed to create deposit address" }),
15124
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-xs uf-text-muted-foreground", children: error })
14996
15125
  ] })
14997
15126
  ] }),
14998
- loading ? /* @__PURE__ */ jsx20("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t2.loading }) : error ? /* @__PURE__ */ jsx20("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsxs15(
14999
- "button",
15127
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-text-xs uf-text-muted-foreground uf-pl-6", children: [
15128
+ /* @__PURE__ */ jsx232(Clock, { className: "uf-w-3 uf-h-3" }),
15129
+ /* @__PURE__ */ jsx232("span", { children: "Retrying automatically every 5 seconds..." })
15130
+ ] })
15131
+ ] }),
15132
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
15133
+ /* @__PURE__ */ jsx232("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: "Intent address" }),
15134
+ /* @__PURE__ */ jsx232("div", { className: "uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx232(
15135
+ "div",
15136
+ {
15137
+ className: "uf-flex uf-items-center uf-justify-center",
15138
+ style: { width: 180, height: 180 },
15139
+ children: /* @__PURE__ */ jsx232("div", { className: "uf-text-foreground uf-text-sm", children: t3.loadingQRCode })
15140
+ }
15141
+ ) : depositAddress ? /* @__PURE__ */ jsx232(
15142
+ StyledQRCode,
15143
+ {
15144
+ value: depositAddress,
15145
+ size: 180,
15146
+ imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url,
15147
+ imageSize: 45,
15148
+ darkMode: isDarkMode
15149
+ },
15150
+ `qr-${depositAddress}-${chain}`
15151
+ ) : /* @__PURE__ */ jsx232(
15152
+ "div",
15153
+ {
15154
+ className: "uf-flex uf-items-center uf-justify-center",
15155
+ style: { width: 180, height: 180 },
15156
+ children: /* @__PURE__ */ jsx232("div", { className: "uf-text-red-400 uf-text-sm", children: t3.noAddressAvailable })
15157
+ }
15158
+ ) })
15159
+ ] }),
15160
+ /* @__PURE__ */ jsx232("div", { children: /* @__PURE__ */ jsxs17("div", { className: "uf-text-sm uf-text-muted-foreground uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
15161
+ /* @__PURE__ */ jsx232("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: loading ? t3.loading : depositAddress ? truncateAddress(depositAddress, 8, 6) : t3.noAddressAvailable }),
15162
+ depositAddress && /* @__PURE__ */ jsx232(
15163
+ "span",
15000
15164
  {
15001
15165
  onClick: handleCopyAddress,
15002
- disabled: !depositAddress,
15003
- className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-3 uf-py-2.5 uf-flex uf-items-center uf-justify-between uf-gap-2 uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
15004
- children: [
15005
- /* @__PURE__ */ jsx20("span", { className: "uf-text-xs uf-font-mono uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 18, 12) : t2.noAddressAvailable }),
15006
- depositAddress && /* @__PURE__ */ jsx20(
15007
- "span",
15008
- {
15009
- className: `uf-flex-shrink-0 uf-transition-colors ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15010
- children: copied ? /* @__PURE__ */ jsx20(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx20(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15011
- }
15012
- )
15013
- ]
15166
+ className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15167
+ children: copied ? /* @__PURE__ */ jsx232(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx232(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15014
15168
  }
15015
15169
  )
15016
- ] }),
15017
- /* @__PURE__ */ jsxs15("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-2.5", children: [
15018
- /* @__PURE__ */ jsxs15(
15170
+ ] }) }),
15171
+ /* @__PURE__ */ jsxs17("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-2.5", children: [
15172
+ /* @__PURE__ */ jsxs17(
15019
15173
  "button",
15020
15174
  {
15021
15175
  onClick: () => setDetailsExpanded(!detailsExpanded),
15022
15176
  className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
15023
15177
  children: [
15024
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15025
- /* @__PURE__ */ jsx20("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx20(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
15026
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-xs", children: [
15027
- t2.priceImpact.label,
15178
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15179
+ /* @__PURE__ */ jsx232("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx232(Clock, { className: "uf-w-3 uf-h-3" }) }),
15180
+ /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15181
+ t3.processingTime.label,
15028
15182
  ":",
15029
15183
  " ",
15030
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-foreground", children: [
15031
- priceImpact.toFixed(2),
15032
- "%"
15033
- ] })
15034
- ] }),
15035
- /* @__PURE__ */ jsxs15(Tooltip2, { children: [
15036
- /* @__PURE__ */ jsx20(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx20(
15037
- "span",
15038
- {
15039
- className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
15040
- onClick: (e) => e.stopPropagation(),
15041
- onKeyDown: (e) => {
15042
- if (e.key === "Enter" || e.key === " ") {
15043
- e.stopPropagation();
15044
- }
15045
- },
15046
- tabIndex: 0,
15047
- role: "button",
15048
- "aria-label": "Price impact information",
15049
- children: /* @__PURE__ */ jsx20(Info, { className: "uf-w-3 uf-h-3" })
15050
- }
15051
- ) }),
15052
- /* @__PURE__ */ jsx20(
15053
- TooltipContent2,
15054
- {
15055
- side: "top",
15056
- align: "center",
15057
- className: "uf-max-w-[240px]",
15058
- children: /* @__PURE__ */ jsx20("p", { children: t2.priceImpact.tooltip })
15059
- }
15060
- )
15184
+ /* @__PURE__ */ jsx232("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
15061
15185
  ] })
15062
15186
  ] }),
15063
- detailsExpanded ? /* @__PURE__ */ jsx20(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx20(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
15187
+ detailsExpanded ? /* @__PURE__ */ jsx232(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx232(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
15064
15188
  ]
15065
15189
  }
15066
15190
  ),
15067
- detailsExpanded && /* @__PURE__ */ jsxs15("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
15068
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15069
- /* @__PURE__ */ jsx20("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx20(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
15070
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-xs", children: [
15071
- t2.slippage.label,
15191
+ detailsExpanded && /* @__PURE__ */ jsxs17("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
15192
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15193
+ /* @__PURE__ */ jsx232("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx232(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
15194
+ /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15195
+ t3.slippage.label,
15072
15196
  ":",
15073
15197
  " ",
15074
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-foreground", children: [
15075
- t2.slippage.auto,
15198
+ /* @__PURE__ */ jsxs17("span", { className: "uf-text-foreground", children: [
15199
+ t3.slippage.auto,
15076
15200
  " \u2022 ",
15077
15201
  maxSlippage.toFixed(2),
15078
15202
  "%"
15079
15203
  ] })
15080
- ] }),
15081
- /* @__PURE__ */ jsxs15(Tooltip2, { children: [
15082
- /* @__PURE__ */ jsx20(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx20(
15083
- "span",
15084
- {
15085
- className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
15086
- tabIndex: 0,
15087
- role: "button",
15088
- "aria-label": "Slippage information",
15089
- children: /* @__PURE__ */ jsx20(Info, { className: "uf-w-3 uf-h-3" })
15090
- }
15091
- ) }),
15092
- /* @__PURE__ */ jsx20(
15093
- TooltipContent2,
15094
- {
15095
- side: "top",
15096
- align: "center",
15097
- className: "uf-max-w-[240px]",
15098
- children: /* @__PURE__ */ jsx20("p", { children: t2.slippage.tooltip })
15099
- }
15100
- )
15101
15204
  ] })
15102
15205
  ] }),
15103
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15104
- /* @__PURE__ */ jsx20("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx20(Clock, { className: "uf-w-3 uf-h-3" }) }),
15105
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-xs", children: [
15106
- t2.processingTime.label,
15206
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15207
+ /* @__PURE__ */ jsx232("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx232(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
15208
+ /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15209
+ t3.priceImpact.label,
15107
15210
  ":",
15108
15211
  " ",
15109
- /* @__PURE__ */ jsx20("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
15110
- ] })
15111
- ] }),
15112
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15113
- /* @__PURE__ */ jsx20("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx20(CircleHelp, { className: "uf-w-3 uf-h-3" }) }),
15114
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-xs", children: [
15115
- t2.help.needHelp,
15116
- " ",
15117
- /* @__PURE__ */ jsx20(
15118
- "a",
15119
- {
15120
- href: "#",
15121
- className: "uf-text-foreground uf-underline hover:uf-text-muted-foreground uf-transition-colors",
15122
- children: t2.help.contactSupport
15123
- }
15124
- )
15212
+ /* @__PURE__ */ jsxs17("span", { className: "uf-text-foreground", children: [
15213
+ priceImpact.toFixed(2),
15214
+ "%"
15215
+ ] })
15125
15216
  ] })
15126
15217
  ] }),
15127
- /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15128
- /* @__PURE__ */ jsx20("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx20(FileText, { className: "uf-w-3 uf-h-3" }) }),
15129
- /* @__PURE__ */ jsxs15("span", { className: "uf-text-xs", children: [
15130
- t2.terms.termsApply,
15131
- ":",
15218
+ /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15219
+ /* @__PURE__ */ jsx232("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx232(WalletMinimal, { className: "uf-w-3 uf-h-3" }) }),
15220
+ /* @__PURE__ */ jsxs17("span", { className: "uf-flex uf-gap-2 uf-text-xs", children: [
15221
+ "Recipient address:",
15132
15222
  " ",
15133
- /* @__PURE__ */ jsx20(
15134
- "a",
15223
+ /* @__PURE__ */ jsx232("span", { className: "uf-text-foreground", children: truncateAddress(recipientAddress || "", 8, 6) }),
15224
+ /* @__PURE__ */ jsx232(
15225
+ "span",
15135
15226
  {
15136
- href: "https://unifold.io/terms",
15137
- className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
15138
- target: "_blank",
15139
- children: t2.terms.seeTerms
15227
+ onClick: () => handleCopyRecipientAddress(recipientAddress),
15228
+ className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copiedRecipient ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15229
+ children: copiedRecipient ? /* @__PURE__ */ jsx232(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx232(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15140
15230
  }
15141
15231
  )
15142
15232
  ] })
15143
15233
  ] })
15144
15234
  ] })
15145
15235
  ] }),
15146
- depositExecutions.length > 1 && /* @__PURE__ */ jsx20("div", { className: "uf-flex uf-items-center uf-justify-end uf-text-xs uf-pt-2", children: /* @__PURE__ */ jsxs15(
15236
+ /* @__PURE__ */ jsx232(
15237
+ PollCooldownButton,
15238
+ {
15239
+ currentWalletId: currentWallet?.id,
15240
+ pollCooldown,
15241
+ publishableKey,
15242
+ onCooldownChange: setPollCooldown,
15243
+ cooldownRef,
15244
+ buttonText: "Try again"
15245
+ }
15246
+ ),
15247
+ /* @__PURE__ */ jsx232(DepositFooterLinks, { onGlossaryClick: () => setGlossaryOpen(true) }),
15248
+ depositExecutions.length > 1 && /* @__PURE__ */ jsx232("div", { className: "uf-flex uf-items-center uf-justify-end uf-text-xs uf-pt-2", children: /* @__PURE__ */ jsxs17(
15147
15249
  "button",
15148
15250
  {
15149
15251
  onClick: () => setDepositsModalOpen(true),
15150
15252
  className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
15151
15253
  children: [
15152
- /* @__PURE__ */ jsx20(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
15254
+ /* @__PURE__ */ jsx232(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
15153
15255
  "Track deposits (",
15154
15256
  depositExecutions.length,
15155
15257
  ")",
15156
- /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-3 uf-h-3" })
15258
+ /* @__PURE__ */ jsx232(ChevronRight, { className: "uf-w-3 uf-h-3" })
15157
15259
  ]
15158
15260
  }
15159
15261
  ) }),
15160
- /* @__PURE__ */ jsx20(
15262
+ /* @__PURE__ */ jsx232(
15161
15263
  DepositPollingToasts,
15162
15264
  {
15163
15265
  executions: depositExecutions,
15164
15266
  isPolling
15165
15267
  }
15166
15268
  ),
15167
- /* @__PURE__ */ jsx20(
15269
+ /* @__PURE__ */ jsx232(
15168
15270
  DepositsModal,
15169
15271
  {
15170
15272
  open: depositsModalOpen,
@@ -15174,6 +15276,15 @@ function TransferCryptoSingleInput({
15174
15276
  publishableKey,
15175
15277
  themeClass
15176
15278
  }
15279
+ ),
15280
+ /* @__PURE__ */ jsx232(
15281
+ GlossaryModal,
15282
+ {
15283
+ open: glossaryOpen,
15284
+ onOpenChange: setGlossaryOpen,
15285
+ themeClass,
15286
+ colors: colors2
15287
+ }
15177
15288
  )
15178
15289
  ]
15179
15290
  }
@@ -15181,7 +15292,7 @@ function TransferCryptoSingleInput({
15181
15292
  }
15182
15293
  var Select2 = Root23;
15183
15294
  var SelectValue2 = Value;
15184
- var SelectTrigger2 = React92.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
15295
+ var SelectTrigger2 = React92.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
15185
15296
  Trigger2,
15186
15297
  {
15187
15298
  ref,
@@ -15192,12 +15303,12 @@ var SelectTrigger2 = React92.forwardRef(({ className, children, ...props }, ref)
15192
15303
  ...props,
15193
15304
  children: [
15194
15305
  children,
15195
- /* @__PURE__ */ jsx21(Icon2, { asChild: true, children: /* @__PURE__ */ jsx21(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
15306
+ /* @__PURE__ */ jsx24(Icon2, { asChild: true, children: /* @__PURE__ */ jsx24(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
15196
15307
  ]
15197
15308
  }
15198
15309
  ));
15199
15310
  SelectTrigger2.displayName = Trigger2.displayName;
15200
- var SelectScrollUpButton2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
15311
+ var SelectScrollUpButton2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
15201
15312
  ScrollUpButton,
15202
15313
  {
15203
15314
  ref,
@@ -15206,11 +15317,11 @@ var SelectScrollUpButton2 = React92.forwardRef(({ className, ...props }, ref) =>
15206
15317
  className
15207
15318
  ),
15208
15319
  ...props,
15209
- children: /* @__PURE__ */ jsx21(ChevronUp, { className: "uf-h-4 uf-w-4" })
15320
+ children: /* @__PURE__ */ jsx24(ChevronUp, { className: "uf-h-4 uf-w-4" })
15210
15321
  }
15211
15322
  ));
15212
15323
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
15213
- var SelectScrollDownButton2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
15324
+ var SelectScrollDownButton2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
15214
15325
  ScrollDownButton,
15215
15326
  {
15216
15327
  ref,
@@ -15219,13 +15330,13 @@ var SelectScrollDownButton2 = React92.forwardRef(({ className, ...props }, ref)
15219
15330
  className
15220
15331
  ),
15221
15332
  ...props,
15222
- children: /* @__PURE__ */ jsx21(ChevronDown, { className: "uf-h-4 uf-w-4" })
15333
+ children: /* @__PURE__ */ jsx24(ChevronDown, { className: "uf-h-4 uf-w-4" })
15223
15334
  }
15224
15335
  ));
15225
15336
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
15226
15337
  var SelectContent2 = React92.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
15227
15338
  const { themeClass, colors: colors2 } = useTheme();
15228
- return /* @__PURE__ */ jsx21(Portal4, { children: /* @__PURE__ */ jsxs16(
15339
+ return /* @__PURE__ */ jsx24(Portal4, { children: /* @__PURE__ */ jsxs18(
15229
15340
  Content23,
15230
15341
  {
15231
15342
  ref,
@@ -15239,8 +15350,8 @@ var SelectContent2 = React92.forwardRef(({ className, children, position = "popp
15239
15350
  position,
15240
15351
  ...props,
15241
15352
  children: [
15242
- /* @__PURE__ */ jsx21(SelectScrollUpButton2, {}),
15243
- /* @__PURE__ */ jsx21(
15353
+ /* @__PURE__ */ jsx24(SelectScrollUpButton2, {}),
15354
+ /* @__PURE__ */ jsx24(
15244
15355
  Viewport,
15245
15356
  {
15246
15357
  className: cn(
@@ -15250,13 +15361,13 @@ var SelectContent2 = React92.forwardRef(({ className, children, position = "popp
15250
15361
  children
15251
15362
  }
15252
15363
  ),
15253
- /* @__PURE__ */ jsx21(SelectScrollDownButton2, {})
15364
+ /* @__PURE__ */ jsx24(SelectScrollDownButton2, {})
15254
15365
  ]
15255
15366
  }
15256
15367
  ) });
15257
15368
  });
15258
15369
  SelectContent2.displayName = Content23.displayName;
15259
- var SelectLabel2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
15370
+ var SelectLabel2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
15260
15371
  Label,
15261
15372
  {
15262
15373
  ref,
@@ -15268,7 +15379,7 @@ var SelectLabel2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PU
15268
15379
  }
15269
15380
  ));
15270
15381
  SelectLabel2.displayName = Label.displayName;
15271
- var SelectItem2 = React92.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
15382
+ var SelectItem2 = React92.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
15272
15383
  Item,
15273
15384
  {
15274
15385
  ref,
@@ -15278,13 +15389,13 @@ var SelectItem2 = React92.forwardRef(({ className, children, ...props }, ref) =>
15278
15389
  ),
15279
15390
  ...props,
15280
15391
  children: [
15281
- /* @__PURE__ */ jsx21("span", { className: "uf-absolute uf-left-2 uf-flex uf-h-3.5 uf-w-3.5 uf-items-center uf-justify-center", children: /* @__PURE__ */ jsx21(ItemIndicator, { children: /* @__PURE__ */ jsx21(Check, { className: "uf-h-4 uf-w-4" }) }) }),
15282
- /* @__PURE__ */ jsx21(ItemText, { children })
15392
+ /* @__PURE__ */ jsx24("span", { className: "uf-absolute uf-left-2 uf-flex uf-h-3.5 uf-w-3.5 uf-items-center uf-justify-center", children: /* @__PURE__ */ jsx24(ItemIndicator, { children: /* @__PURE__ */ jsx24(Check, { className: "uf-h-4 uf-w-4" }) }) }),
15393
+ /* @__PURE__ */ jsx24(ItemText, { children })
15283
15394
  ]
15284
15395
  }
15285
15396
  ));
15286
15397
  SelectItem2.displayName = Item.displayName;
15287
- var SelectSeparator2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
15398
+ var SelectSeparator2 = React92.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
15288
15399
  Separator,
15289
15400
  {
15290
15401
  ref,
@@ -15293,7 +15404,7 @@ var SelectSeparator2 = React92.forwardRef(({ className, ...props }, ref) => /* @
15293
15404
  }
15294
15405
  ));
15295
15406
  SelectSeparator2.displayName = Separator.displayName;
15296
- var t3 = i18n2.transferCrypto;
15407
+ var t4 = i18n2.transferCrypto;
15297
15408
  var getChainKey2 = (chainId, chainType) => {
15298
15409
  return `${chainType}:${chainId}`;
15299
15410
  };
@@ -15315,13 +15426,25 @@ function TransferCryptoDoubleInput({
15315
15426
  }) {
15316
15427
  const { themeClass, colors: colors2, fonts, components } = useTheme();
15317
15428
  const isDarkMode = themeClass.includes("uf-dark");
15318
- const [token, setToken] = useState162("USDC");
15319
- const [chain, setChain] = useState162("solana:mainnet");
15320
- const [copied, setCopied] = useState162(false);
15321
- const [internalWallets, setInternalWallets] = useState162([]);
15322
- const [loading, setLoading] = useState162(!externalWallets?.length);
15429
+ const [token, setToken] = useState182("USDC");
15430
+ const [chain, setChain] = useState182("solana:mainnet");
15431
+ const [copied, setCopied] = useState182(false);
15432
+ const { copied: copiedRecipient, handleCopy: handleCopyRecipientAddress } = useCopyAddress();
15433
+ const [glossaryOpen, setGlossaryOpen] = useState182(false);
15434
+ const [pollCooldown, setPollCooldown] = useState182(0);
15435
+ const cooldownRef = useRef52(null);
15436
+ const [internalWallets, setInternalWallets] = useState182([]);
15437
+ const [loading, setLoading] = useState182(!externalWallets?.length);
15438
+ useEffect132(() => {
15439
+ return () => {
15440
+ if (cooldownRef.current) {
15441
+ clearInterval(cooldownRef.current);
15442
+ cooldownRef.current = null;
15443
+ }
15444
+ };
15445
+ }, []);
15323
15446
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
15324
- const [error, setError] = useState162(null);
15447
+ const [error, setError] = useState182(null);
15325
15448
  const { executions: depositExecutions, isPolling } = useDepositPolling({
15326
15449
  userId,
15327
15450
  publishableKey,
@@ -15329,13 +15452,13 @@ function TransferCryptoDoubleInput({
15329
15452
  onDepositSuccess,
15330
15453
  onDepositError
15331
15454
  });
15332
- const [supportedTokens, setSupportedTokens] = useState162([]);
15333
- const [tokensLoading, setTokensLoading] = useState162(true);
15334
- const [detailsExpanded, setDetailsExpanded] = useState162(false);
15335
- const [depositsModalOpen, setDepositsModalOpen] = useState162(false);
15455
+ const [supportedTokens, setSupportedTokens] = useState182([]);
15456
+ const [tokensLoading, setTokensLoading] = useState182(true);
15457
+ const [detailsExpanded, setDetailsExpanded] = useState182(false);
15458
+ const [depositsModalOpen, setDepositsModalOpen] = useState182(false);
15336
15459
  const allChainsMap = /* @__PURE__ */ new Map();
15337
- supportedTokens.forEach((t5) => {
15338
- t5.chains.forEach((c) => {
15460
+ supportedTokens.forEach((t6) => {
15461
+ t6.chains.forEach((c) => {
15339
15462
  const comboKey = `${c.chain_type}:${c.chain_id}`;
15340
15463
  if (!allChainsMap.has(comboKey)) {
15341
15464
  allChainsMap.set(comboKey, c);
@@ -15366,8 +15489,8 @@ function TransferCryptoDoubleInput({
15366
15489
  setSupportedTokens(response.data);
15367
15490
  if (response.data.length > 0) {
15368
15491
  const allChains = /* @__PURE__ */ new Set();
15369
- response.data.forEach((t5) => {
15370
- t5.chains.forEach((c) => {
15492
+ response.data.forEach((t6) => {
15493
+ t6.chains.forEach((c) => {
15371
15494
  allChains.add(getChainKey2(c.chain_id, c.chain_type));
15372
15495
  });
15373
15496
  });
@@ -15457,7 +15580,7 @@ function TransferCryptoDoubleInput({
15457
15580
  ]);
15458
15581
  useEffect132(() => {
15459
15582
  if (!supportedTokens.length) return;
15460
- const currentToken = supportedTokens.find((t5) => t5.symbol === token);
15583
+ const currentToken = supportedTokens.find((t6) => t6.symbol === token);
15461
15584
  if (!currentToken || currentToken.chains.length === 0) return;
15462
15585
  const isChainAvailable = currentToken.chains.some((c) => {
15463
15586
  const key = getChainKey2(c.chain_id, c.chain_type);
@@ -15469,7 +15592,7 @@ function TransferCryptoDoubleInput({
15469
15592
  setChain(newChain);
15470
15593
  }
15471
15594
  }, [token, supportedTokens, chain]);
15472
- const selectedToken = supportedTokens.find((t5) => t5.symbol === token);
15595
+ const selectedToken = supportedTokens.find((t6) => t6.symbol === token);
15473
15596
  const availableChainsForToken = selectedToken?.chains || [];
15474
15597
  const currentChainFromBackend = availableChainsForToken.find((c) => {
15475
15598
  const key = getChainKey2(c.chain_id, c.chain_type);
@@ -15485,25 +15608,25 @@ function TransferCryptoDoubleInput({
15485
15608
  };
15486
15609
  const formatProcessingTime = (seconds) => {
15487
15610
  if (seconds === null) {
15488
- return t3.processingTime.lessThanMinutes.replace("{{minutes}}", "1");
15611
+ return t4.processingTime.lessThanMinutes.replace("{{minutes}}", "1");
15489
15612
  }
15490
15613
  const minutes = Math.ceil(seconds / 60);
15491
15614
  if (minutes < 60) {
15492
- return t3.processingTime.lessThanMinutes.replace(
15615
+ return t4.processingTime.lessThanMinutes.replace(
15493
15616
  "{{minutes}}",
15494
15617
  String(minutes)
15495
15618
  );
15496
15619
  }
15497
15620
  const hours = Math.ceil(minutes / 60);
15498
- return t3.processingTime.lessThanHours.replace("{{hours}}", String(hours));
15621
+ return t4.processingTime.lessThanHours.replace("{{hours}}", String(hours));
15499
15622
  };
15500
15623
  const priceImpact = currentChainFromBackend?.estimated_price_impact_percent ?? 0;
15501
15624
  const maxSlippage = currentChainFromBackend?.max_slippage_percent ?? 0.25;
15502
15625
  const processingTime = currentChainFromBackend?.estimated_processing_time ?? null;
15503
15626
  const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
15504
15627
  const renderTokenItem = (tokenData) => {
15505
- return /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15506
- /* @__PURE__ */ jsx222(
15628
+ return /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15629
+ /* @__PURE__ */ jsx25(
15507
15630
  "img",
15508
15631
  {
15509
15632
  src: tokenData.icon_url,
@@ -15513,13 +15636,13 @@ function TransferCryptoDoubleInput({
15513
15636
  className: "uf-rounded-full uf-flex-shrink-0"
15514
15637
  }
15515
15638
  ),
15516
- /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol })
15639
+ /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol })
15517
15640
  ] });
15518
15641
  };
15519
15642
  const renderChainItem = (chainData, showMinDeposit = false) => {
15520
- return /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-justify-between uf-w-full", children: [
15521
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15522
- /* @__PURE__ */ jsx222(
15643
+ return /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-justify-between uf-w-full", children: [
15644
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15645
+ /* @__PURE__ */ jsx25(
15523
15646
  "img",
15524
15647
  {
15525
15648
  src: chainData.icon_url,
@@ -15529,32 +15652,32 @@ function TransferCryptoDoubleInput({
15529
15652
  className: "uf-rounded-full uf-flex-shrink-0"
15530
15653
  }
15531
15654
  ),
15532
- /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name })
15655
+ /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name })
15533
15656
  ] }),
15534
- showMinDeposit && chainData.minimum_deposit_amount_usd && /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs uf-text-amber-400 uf-font-medium", children: [
15657
+ showMinDeposit && chainData.minimum_deposit_amount_usd && /* @__PURE__ */ jsxs19("span", { className: "uf-text-xs uf-text-amber-400 uf-font-medium", children: [
15535
15658
  "$",
15536
15659
  chainData.minimum_deposit_amount_usd
15537
15660
  ] })
15538
15661
  ] });
15539
15662
  };
15540
- return /* @__PURE__ */ jsx222(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs17(
15663
+ return /* @__PURE__ */ jsx25(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs19(
15541
15664
  "div",
15542
15665
  {
15543
15666
  className: "uf-space-y-3",
15544
15667
  style: { backgroundColor: colors2.background },
15545
15668
  children: [
15546
- /* @__PURE__ */ jsxs17("div", { className: "uf-grid uf-grid-cols-2 uf-gap-2.5", children: [
15547
- /* @__PURE__ */ jsxs17("div", { children: [
15548
- /* @__PURE__ */ jsx222("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t3.selectedToken }),
15549
- /* @__PURE__ */ jsxs17(
15669
+ /* @__PURE__ */ jsxs19("div", { className: "uf-grid uf-grid-cols-2 uf-gap-2.5", children: [
15670
+ /* @__PURE__ */ jsxs19("div", { children: [
15671
+ /* @__PURE__ */ jsx25("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t4.selectedToken }),
15672
+ /* @__PURE__ */ jsxs19(
15550
15673
  Select2,
15551
15674
  {
15552
15675
  value: token,
15553
15676
  onValueChange: setToken,
15554
15677
  disabled: tokensLoading || supportedTokens.length === 0,
15555
15678
  children: [
15556
- /* @__PURE__ */ jsx222(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx222(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t3.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
15557
- /* @__PURE__ */ jsx222(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx222(
15679
+ /* @__PURE__ */ jsx25(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx25(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx25("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t4.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx25("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
15680
+ /* @__PURE__ */ jsx25(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx25(
15558
15681
  SelectItem2,
15559
15682
  {
15560
15683
  value: tokenData.symbol,
@@ -15567,56 +15690,35 @@ function TransferCryptoDoubleInput({
15567
15690
  }
15568
15691
  )
15569
15692
  ] }),
15570
- /* @__PURE__ */ jsxs17("div", { children: [
15571
- /* @__PURE__ */ jsxs17("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
15572
- t3.selectedChain,
15573
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-amber-400 uf-font-medium", children: [
15693
+ /* @__PURE__ */ jsxs19("div", { children: [
15694
+ /* @__PURE__ */ jsxs19("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
15695
+ t4.selectedChain,
15696
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-amber-400 uf-font-medium", children: [
15574
15697
  "$",
15575
15698
  minDepositUsd,
15576
15699
  " ",
15577
- t3.minDeposit.label
15578
- ] }),
15579
- /* @__PURE__ */ jsxs17(Tooltip2, { children: [
15580
- /* @__PURE__ */ jsx222(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx222(
15581
- "span",
15582
- {
15583
- className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
15584
- tabIndex: 0,
15585
- role: "button",
15586
- "aria-label": "Minimum deposit information",
15587
- children: /* @__PURE__ */ jsx222(Info, { className: "uf-w-4 uf-h-4" })
15588
- }
15589
- ) }),
15590
- /* @__PURE__ */ jsx222(
15591
- TooltipContent2,
15592
- {
15593
- side: "left",
15594
- align: "center",
15595
- className: "uf-max-w-[200px]",
15596
- children: /* @__PURE__ */ jsx222("p", { children: t3.minDeposit.tooltip })
15597
- }
15598
- )
15700
+ t4.minDeposit.label
15599
15701
  ] })
15600
15702
  ] }),
15601
- /* @__PURE__ */ jsxs17(
15703
+ /* @__PURE__ */ jsxs19(
15602
15704
  Select2,
15603
15705
  {
15604
15706
  value: chain,
15605
15707
  onValueChange: setChain,
15606
15708
  disabled: tokensLoading || availableChainsForToken.length === 0,
15607
15709
  children: [
15608
- /* @__PURE__ */ jsx222(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx222(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t3.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
15609
- /* @__PURE__ */ jsx222(
15710
+ /* @__PURE__ */ jsx25(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx25(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx25("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t4.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx25("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx25("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
15711
+ /* @__PURE__ */ jsx25(
15610
15712
  SelectContent2,
15611
15713
  {
15612
15714
  align: "end",
15613
15715
  className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px] uf-min-w-[200px]",
15614
- children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx222("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t3.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
15716
+ children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx25("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t4.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
15615
15717
  const chainKey = getChainKey2(
15616
15718
  chainData.chain_id,
15617
15719
  chainData.chain_type
15618
15720
  );
15619
- return /* @__PURE__ */ jsx222(
15721
+ return /* @__PURE__ */ jsx25(
15620
15722
  SelectItem2,
15621
15723
  {
15622
15724
  value: chainKey,
@@ -15633,226 +15735,157 @@ function TransferCryptoDoubleInput({
15633
15735
  )
15634
15736
  ] })
15635
15737
  ] }),
15636
- /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx222("div", { className: "uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx222(
15637
- "div",
15638
- {
15639
- className: "uf-flex uf-items-center uf-justify-center",
15640
- style: { width: 180, height: 180 },
15641
- children: /* @__PURE__ */ jsx222("div", { className: "uf-text-foreground uf-text-sm", children: t3.loadingQRCode })
15642
- }
15643
- ) : depositAddress ? /* @__PURE__ */ jsx222(
15644
- StyledQRCode,
15645
- {
15646
- value: depositAddress,
15647
- size: 180,
15648
- imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url,
15649
- imageSize: 45,
15650
- darkMode: isDarkMode
15651
- },
15652
- `qr-${depositAddress}-${chain}`
15653
- ) : /* @__PURE__ */ jsx222(
15654
- "div",
15655
- {
15656
- className: "uf-flex uf-items-center uf-justify-center",
15657
- style: { width: 180, height: 180 },
15658
- children: /* @__PURE__ */ jsx222("div", { className: "uf-text-red-400 uf-text-sm", children: t3.noAddressAvailable })
15659
- }
15660
- ) }) }),
15661
- /* @__PURE__ */ jsxs17("div", { children: [
15662
- /* @__PURE__ */ jsxs17("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
15663
- t3.depositAddress.label,
15664
- /* @__PURE__ */ jsxs17(Tooltip2, { children: [
15665
- /* @__PURE__ */ jsx222(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx222(
15666
- "span",
15667
- {
15668
- className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
15669
- tabIndex: 0,
15670
- role: "button",
15671
- "aria-label": "Deposit address information",
15672
- children: /* @__PURE__ */ jsx222(Info, { className: "uf-w-3 uf-h-3" })
15673
- }
15674
- ) }),
15675
- /* @__PURE__ */ jsx222(
15676
- TooltipContent2,
15677
- {
15678
- side: "top",
15679
- align: "center",
15680
- className: "uf-max-w-[240px]",
15681
- children: /* @__PURE__ */ jsx222("p", { children: t3.depositAddress.tooltip.replace("{{token}}", token) })
15682
- }
15683
- )
15738
+ error && !loading && /* @__PURE__ */ jsxs19("div", { className: "uf-bg-destructive/10 uf-border uf-border-destructive/20 uf-rounded-xl uf-p-3 uf-space-y-2", children: [
15739
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-start uf-gap-2", children: [
15740
+ /* @__PURE__ */ jsx25(Info, { className: "uf-w-4 uf-h-4 uf-text-destructive uf-flex-shrink-0 uf-mt-0.5" }),
15741
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex-1 uf-min-w-0", children: [
15742
+ /* @__PURE__ */ jsx25("div", { className: "uf-text-xs uf-font-medium uf-text-destructive uf-mb-1", children: "Failed to create deposit address" }),
15743
+ /* @__PURE__ */ jsx25("div", { className: "uf-text-xs uf-text-muted-foreground", children: error })
15684
15744
  ] })
15685
15745
  ] }),
15686
- loading ? /* @__PURE__ */ jsx222("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t3.loading }) : error ? /* @__PURE__ */ jsx222("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsxs17(
15687
- "button",
15746
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-text-xs uf-text-muted-foreground uf-pl-6", children: [
15747
+ /* @__PURE__ */ jsx25(Clock, { className: "uf-w-3 uf-h-3" }),
15748
+ /* @__PURE__ */ jsx25("span", { children: "Retrying automatically every 5 seconds..." })
15749
+ ] })
15750
+ ] }),
15751
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
15752
+ /* @__PURE__ */ jsx25("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: "Intent address" }),
15753
+ /* @__PURE__ */ jsx25("div", { className: "uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx25(
15754
+ "div",
15755
+ {
15756
+ className: "uf-flex uf-items-center uf-justify-center",
15757
+ style: { width: 180, height: 180 },
15758
+ children: /* @__PURE__ */ jsx25("div", { className: "uf-text-foreground uf-text-sm", children: t4.loadingQRCode })
15759
+ }
15760
+ ) : depositAddress ? /* @__PURE__ */ jsx25(
15761
+ StyledQRCode,
15762
+ {
15763
+ value: depositAddress,
15764
+ size: 180,
15765
+ imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url,
15766
+ imageSize: 45,
15767
+ darkMode: isDarkMode
15768
+ },
15769
+ `qr-${depositAddress}-${chain}`
15770
+ ) : /* @__PURE__ */ jsx25(
15771
+ "div",
15772
+ {
15773
+ className: "uf-flex uf-items-center uf-justify-center",
15774
+ style: { width: 180, height: 180 },
15775
+ children: /* @__PURE__ */ jsx25("div", { className: "uf-text-red-400 uf-text-sm", children: t4.noAddressAvailable })
15776
+ }
15777
+ ) })
15778
+ ] }),
15779
+ /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsxs19("div", { className: "uf-text-sm uf-text-muted-foreground uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
15780
+ /* @__PURE__ */ jsx25("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: loading ? t4.loading : depositAddress ? truncateAddress(depositAddress, 8, 6) : t4.noAddressAvailable }),
15781
+ depositAddress && /* @__PURE__ */ jsx25(
15782
+ "span",
15688
15783
  {
15689
15784
  onClick: handleCopyAddress,
15690
- disabled: !depositAddress,
15691
- className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-3 uf-py-2.5 uf-flex uf-items-center uf-justify-between uf-gap-2 uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
15692
- children: [
15693
- /* @__PURE__ */ jsx222("span", { className: "uf-text-xs uf-font-mono uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 18, 12) : t3.noAddressAvailable }),
15694
- depositAddress && /* @__PURE__ */ jsx222(
15695
- "span",
15696
- {
15697
- className: `uf-flex-shrink-0 uf-transition-colors ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15698
- children: copied ? /* @__PURE__ */ jsx222(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx222(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15699
- }
15700
- )
15701
- ]
15785
+ className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15786
+ children: copied ? /* @__PURE__ */ jsx25(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx25(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15702
15787
  }
15703
15788
  )
15704
- ] }),
15705
- /* @__PURE__ */ jsxs17("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-2.5", children: [
15706
- /* @__PURE__ */ jsxs17(
15789
+ ] }) }),
15790
+ /* @__PURE__ */ jsxs19("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-2.5", children: [
15791
+ /* @__PURE__ */ jsxs19(
15707
15792
  "button",
15708
15793
  {
15709
15794
  onClick: () => setDetailsExpanded(!detailsExpanded),
15710
15795
  className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
15711
15796
  children: [
15712
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15713
- /* @__PURE__ */ jsx222("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx222(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
15714
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15715
- t3.priceImpact.label,
15797
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15798
+ /* @__PURE__ */ jsx25("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx25(Clock, { className: "uf-w-3 uf-h-3" }) }),
15799
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-xs", children: [
15800
+ t4.processingTime.label,
15716
15801
  ":",
15717
15802
  " ",
15718
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-foreground", children: [
15719
- priceImpact.toFixed(2),
15720
- "%"
15721
- ] })
15722
- ] }),
15723
- /* @__PURE__ */ jsxs17(Tooltip2, { children: [
15724
- /* @__PURE__ */ jsx222(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx222(
15725
- "span",
15726
- {
15727
- className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
15728
- onClick: (e) => e.stopPropagation(),
15729
- onKeyDown: (e) => {
15730
- if (e.key === "Enter" || e.key === " ") {
15731
- e.stopPropagation();
15732
- }
15733
- },
15734
- tabIndex: 0,
15735
- role: "button",
15736
- "aria-label": "Price impact information",
15737
- children: /* @__PURE__ */ jsx222(Info, { className: "uf-w-3 uf-h-3" })
15738
- }
15739
- ) }),
15740
- /* @__PURE__ */ jsx222(
15741
- TooltipContent2,
15742
- {
15743
- side: "top",
15744
- align: "center",
15745
- className: "uf-max-w-[240px]",
15746
- children: /* @__PURE__ */ jsx222("p", { children: t3.priceImpact.tooltip })
15747
- }
15748
- )
15803
+ /* @__PURE__ */ jsx25("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
15749
15804
  ] })
15750
15805
  ] }),
15751
- detailsExpanded ? /* @__PURE__ */ jsx222(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx222(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
15806
+ detailsExpanded ? /* @__PURE__ */ jsx25(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx25(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
15752
15807
  ]
15753
15808
  }
15754
15809
  ),
15755
- detailsExpanded && /* @__PURE__ */ jsxs17("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
15756
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15757
- /* @__PURE__ */ jsx222("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx222(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
15758
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15759
- t3.slippage.label,
15810
+ detailsExpanded && /* @__PURE__ */ jsxs19("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
15811
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15812
+ /* @__PURE__ */ jsx25("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx25(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
15813
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-xs", children: [
15814
+ t4.slippage.label,
15760
15815
  ":",
15761
15816
  " ",
15762
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-foreground", children: [
15763
- t3.slippage.auto,
15817
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-foreground", children: [
15818
+ t4.slippage.auto,
15764
15819
  " \u2022 ",
15765
15820
  maxSlippage.toFixed(2),
15766
15821
  "%"
15767
15822
  ] })
15768
- ] }),
15769
- /* @__PURE__ */ jsxs17(Tooltip2, { children: [
15770
- /* @__PURE__ */ jsx222(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx222(
15771
- "span",
15772
- {
15773
- className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
15774
- tabIndex: 0,
15775
- role: "button",
15776
- "aria-label": "Slippage information",
15777
- children: /* @__PURE__ */ jsx222(Info, { className: "uf-w-3 uf-h-3" })
15778
- }
15779
- ) }),
15780
- /* @__PURE__ */ jsx222(
15781
- TooltipContent2,
15782
- {
15783
- side: "top",
15784
- align: "center",
15785
- className: "uf-max-w-[240px]",
15786
- children: /* @__PURE__ */ jsx222("p", { children: t3.slippage.tooltip })
15787
- }
15788
- )
15789
15823
  ] })
15790
15824
  ] }),
15791
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15792
- /* @__PURE__ */ jsx222("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx222(Clock, { className: "uf-w-3 uf-h-3" }) }),
15793
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15794
- t3.processingTime.label,
15825
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15826
+ /* @__PURE__ */ jsx25("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx25(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
15827
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-xs", children: [
15828
+ t4.priceImpact.label,
15795
15829
  ":",
15796
15830
  " ",
15797
- /* @__PURE__ */ jsx222("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
15798
- ] })
15799
- ] }),
15800
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15801
- /* @__PURE__ */ jsx222("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx222(CircleHelp, { className: "uf-w-3 uf-h-3" }) }),
15802
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15803
- t3.help.needHelp,
15804
- " ",
15805
- /* @__PURE__ */ jsx222(
15806
- "a",
15807
- {
15808
- href: "https://unifold.io/support",
15809
- className: "uf-text-foreground uf-underline hover:uf-text-muted-foreground uf-transition-colors",
15810
- children: t3.help.contactSupport
15811
- }
15812
- )
15831
+ /* @__PURE__ */ jsxs19("span", { className: "uf-text-foreground", children: [
15832
+ priceImpact.toFixed(2),
15833
+ "%"
15834
+ ] })
15813
15835
  ] })
15814
15836
  ] }),
15815
- /* @__PURE__ */ jsxs17("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15816
- /* @__PURE__ */ jsx222("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx222(FileText, { className: "uf-w-3 uf-h-3" }) }),
15817
- /* @__PURE__ */ jsxs17("span", { className: "uf-text-xs", children: [
15818
- t3.terms.termsApply,
15819
- ":",
15837
+ /* @__PURE__ */ jsxs19("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15838
+ /* @__PURE__ */ jsx25("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx25(WalletMinimal, { className: "uf-w-3 uf-h-3" }) }),
15839
+ /* @__PURE__ */ jsxs19("span", { className: "uf-flex uf-gap-2 uf-text-xs", children: [
15840
+ "Recipient address:",
15820
15841
  " ",
15821
- /* @__PURE__ */ jsx222(
15822
- "a",
15842
+ /* @__PURE__ */ jsx25("span", { className: "uf-text-foreground", children: truncateAddress(recipientAddress || "", 8, 6) }),
15843
+ /* @__PURE__ */ jsx25(
15844
+ "span",
15823
15845
  {
15824
- href: "https://unifold.io/terms",
15825
- className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
15826
- target: "_blank",
15827
- children: t3.terms.seeTerms
15846
+ onClick: () => handleCopyRecipientAddress(recipientAddress),
15847
+ className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copiedRecipient ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
15848
+ children: copiedRecipient ? /* @__PURE__ */ jsx25(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx25(Copy, { className: "uf-w-3.5 uf-h-3.5" })
15828
15849
  }
15829
15850
  )
15830
15851
  ] })
15831
15852
  ] })
15832
15853
  ] })
15833
15854
  ] }),
15834
- depositExecutions.length > 1 && /* @__PURE__ */ jsx222("div", { className: "uf-flex uf-items-center uf-justify-end uf-text-xs uf-pt-2", children: /* @__PURE__ */ jsxs17(
15855
+ /* @__PURE__ */ jsx25(
15856
+ PollCooldownButton,
15857
+ {
15858
+ currentWalletId: currentWallet?.id,
15859
+ pollCooldown,
15860
+ publishableKey,
15861
+ onCooldownChange: setPollCooldown,
15862
+ cooldownRef,
15863
+ buttonText: "Check again"
15864
+ }
15865
+ ),
15866
+ /* @__PURE__ */ jsx25(DepositFooterLinks, { onGlossaryClick: () => setGlossaryOpen(true) }),
15867
+ depositExecutions.length > 1 && /* @__PURE__ */ jsx25("div", { className: "uf-flex uf-items-center uf-justify-end uf-text-xs uf-pt-2", children: /* @__PURE__ */ jsxs19(
15835
15868
  "button",
15836
15869
  {
15837
15870
  onClick: () => setDepositsModalOpen(true),
15838
15871
  className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
15839
15872
  children: [
15840
- /* @__PURE__ */ jsx222(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
15873
+ /* @__PURE__ */ jsx25(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
15841
15874
  "Track deposits (",
15842
15875
  depositExecutions.length,
15843
15876
  ")",
15844
- /* @__PURE__ */ jsx222(ChevronRight, { className: "uf-w-3 uf-h-3" })
15877
+ /* @__PURE__ */ jsx25(ChevronRight, { className: "uf-w-3 uf-h-3" })
15845
15878
  ]
15846
15879
  }
15847
15880
  ) }),
15848
- /* @__PURE__ */ jsx222(
15881
+ /* @__PURE__ */ jsx25(
15849
15882
  DepositPollingToasts,
15850
15883
  {
15851
15884
  executions: depositExecutions,
15852
15885
  isPolling
15853
15886
  }
15854
15887
  ),
15855
- /* @__PURE__ */ jsx222(
15888
+ /* @__PURE__ */ jsx25(
15856
15889
  DepositsModal,
15857
15890
  {
15858
15891
  open: depositsModalOpen,
@@ -15862,6 +15895,15 @@ function TransferCryptoDoubleInput({
15862
15895
  publishableKey,
15863
15896
  themeClass
15864
15897
  }
15898
+ ),
15899
+ /* @__PURE__ */ jsx25(
15900
+ GlossaryModal,
15901
+ {
15902
+ open: glossaryOpen,
15903
+ onOpenChange: setGlossaryOpen,
15904
+ themeClass,
15905
+ colors: colors2
15906
+ }
15865
15907
  )
15866
15908
  ]
15867
15909
  }
@@ -15870,27 +15912,27 @@ function TransferCryptoDoubleInput({
15870
15912
  function SkeletonButton({
15871
15913
  variant = "default"
15872
15914
  }) {
15873
- return /* @__PURE__ */ jsxs18("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
15874
- /* @__PURE__ */ jsxs18("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
15875
- /* @__PURE__ */ jsx232("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
15876
- /* @__PURE__ */ jsxs18("div", { className: "uf-space-y-1.5", children: [
15877
- /* @__PURE__ */ jsx232("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
15878
- /* @__PURE__ */ jsx232("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
15915
+ return /* @__PURE__ */ jsxs20("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
15916
+ /* @__PURE__ */ jsxs20("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
15917
+ /* @__PURE__ */ jsx26("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
15918
+ /* @__PURE__ */ jsxs20("div", { className: "uf-space-y-1.5", children: [
15919
+ /* @__PURE__ */ jsx26("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
15920
+ /* @__PURE__ */ jsx26("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
15879
15921
  ] })
15880
15922
  ] }),
15881
- /* @__PURE__ */ jsxs18("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15882
- variant === "with-icons" && /* @__PURE__ */ jsx232("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx232(
15923
+ /* @__PURE__ */ jsxs20("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
15924
+ variant === "with-icons" && /* @__PURE__ */ jsx26("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx26(
15883
15925
  "div",
15884
15926
  {
15885
15927
  className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary"
15886
15928
  },
15887
15929
  i
15888
15930
  )) }),
15889
- /* @__PURE__ */ jsx232(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
15931
+ /* @__PURE__ */ jsx26(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
15890
15932
  ] })
15891
15933
  ] });
15892
15934
  }
15893
- var t4 = i18n2.depositModal;
15935
+ var t5 = i18n2.depositModal;
15894
15936
  function DepositModal({
15895
15937
  open,
15896
15938
  onOpenChange,
@@ -15910,16 +15952,16 @@ function DepositModal({
15910
15952
  theme = "dark"
15911
15953
  }) {
15912
15954
  const { colors: colors2, fonts } = useTheme();
15913
- const [view, setView] = useState17("main");
15914
- const [cardView, setCardView] = useState17(
15955
+ const [view, setView] = useState19("main");
15956
+ const [cardView, setCardView] = useState19(
15915
15957
  "amount"
15916
15958
  );
15917
- const [quotesCount, setQuotesCount] = useState17(0);
15918
- const [depositsModalOpen, setDepositsModalOpen] = useState17(false);
15919
- const [depositExecutions, setDepositExecutions] = useState17([]);
15920
- const [projectConfig, setProjectConfig] = useState17(null);
15921
- const [wallets, setWallets] = useState17([]);
15922
- const [walletsLoading, setWalletsLoading] = useState17(false);
15959
+ const [quotesCount, setQuotesCount] = useState19(0);
15960
+ const [depositsModalOpen, setDepositsModalOpen] = useState19(false);
15961
+ const [depositExecutions, setDepositExecutions] = useState19([]);
15962
+ const [projectConfig, setProjectConfig] = useState19(null);
15963
+ const [wallets, setWallets] = useState19([]);
15964
+ const [walletsLoading, setWalletsLoading] = useState19(false);
15923
15965
  useEffect142(() => {
15924
15966
  setProjectConfig(null);
15925
15967
  }, [publishableKey]);
@@ -15933,7 +15975,7 @@ function DepositModal({
15933
15975
  destinationTokenAddress,
15934
15976
  publishableKey
15935
15977
  ]);
15936
- const [resolvedTheme, setResolvedTheme] = useState17(
15978
+ const [resolvedTheme, setResolvedTheme] = useState19(
15937
15979
  theme === "auto" ? "dark" : theme
15938
15980
  );
15939
15981
  useEffect142(() => {
@@ -16052,16 +16094,16 @@ function DepositModal({
16052
16094
  setQuotesCount(count3);
16053
16095
  }
16054
16096
  };
16055
- return /* @__PURE__ */ jsxs18(Dialog2, { open, onOpenChange: handleClose, children: [
16056
- /* @__PURE__ */ jsx232(
16097
+ return /* @__PURE__ */ jsxs20(Dialog2, { open, onOpenChange: handleClose, children: [
16098
+ /* @__PURE__ */ jsx26(
16057
16099
  DialogContent2,
16058
16100
  {
16059
16101
  className: `sm:uf-max-w-[400px] uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 uf-overflow-visible [&>button]:uf-hidden ${view === "main" ? "!uf-top-auto !uf-h-auto !uf-max-h-[60vh] sm:!uf-max-h-none sm:!uf-top-[50%]" : "!uf-top-0 !uf-h-full sm:!uf-h-auto sm:!uf-top-[50%]"} ${themeClass}`,
16060
16102
  style: { backgroundColor: colors2.background },
16061
16103
  onPointerDownOutside: (e) => e.preventDefault(),
16062
16104
  onInteractOutside: (e) => e.preventDefault(),
16063
- children: /* @__PURE__ */ jsx232(ThemeStyleInjector, { children: view === "main" ? /* @__PURE__ */ jsxs18(Fragment52, { children: [
16064
- /* @__PURE__ */ jsx232(
16105
+ children: /* @__PURE__ */ jsx26(ThemeStyleInjector, { children: view === "main" ? /* @__PURE__ */ jsxs20(Fragment52, { children: [
16106
+ /* @__PURE__ */ jsx26(
16065
16107
  DepositHeader,
16066
16108
  {
16067
16109
  title: modalTitle || "Deposit",
@@ -16074,56 +16116,56 @@ function DepositModal({
16074
16116
  publishableKey
16075
16117
  }
16076
16118
  ),
16077
- /* @__PURE__ */ jsx232("div", { className: "uf-pb-4 uf-space-y-3", children: isCountryLoading || isAddressValidationLoading || !projectConfig ? /* @__PURE__ */ jsxs18(Fragment52, { children: [
16078
- /* @__PURE__ */ jsx232(SkeletonButton, { variant: "with-icons" }),
16079
- /* @__PURE__ */ jsx232(SkeletonButton, { variant: "with-icons" }),
16080
- !hideDepositTracker && /* @__PURE__ */ jsx232(SkeletonButton, {})
16119
+ /* @__PURE__ */ jsx26("div", { className: "uf-pb-4 uf-space-y-3", children: isCountryLoading || isAddressValidationLoading || !projectConfig ? /* @__PURE__ */ jsxs20(Fragment52, { children: [
16120
+ /* @__PURE__ */ jsx26(SkeletonButton, { variant: "with-icons" }),
16121
+ /* @__PURE__ */ jsx26(SkeletonButton, { variant: "with-icons" }),
16122
+ !hideDepositTracker && /* @__PURE__ */ jsx26(SkeletonButton, {})
16081
16123
  ] }) : countryError ? (
16082
16124
  /* Error state - couldn't verify location */
16083
- /* @__PURE__ */ jsxs18("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16084
- /* @__PURE__ */ jsx232("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx232(TriangleAlert, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16085
- /* @__PURE__ */ jsx232("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
16086
- /* @__PURE__ */ jsx232("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
16125
+ /* @__PURE__ */ jsxs20("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16126
+ /* @__PURE__ */ jsx26("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx26(TriangleAlert, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16127
+ /* @__PURE__ */ jsx26("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
16128
+ /* @__PURE__ */ jsx26("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
16087
16129
  ] })
16088
16130
  ) : !isAllowed ? (
16089
16131
  /* Blocked country state (isAllowed is false or null without error) */
16090
- /* @__PURE__ */ jsxs18("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16091
- /* @__PURE__ */ jsx232("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx232(MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16092
- /* @__PURE__ */ jsx232("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
16093
- /* @__PURE__ */ jsx232("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
16132
+ /* @__PURE__ */ jsxs20("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16133
+ /* @__PURE__ */ jsx26("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx26(MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16134
+ /* @__PURE__ */ jsx26("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
16135
+ /* @__PURE__ */ jsx26("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
16094
16136
  ] })
16095
16137
  ) : isAddressValid === false ? (
16096
16138
  /* Invalid recipient address state (e.g., Algorand not opted in) */
16097
- /* @__PURE__ */ jsxs18("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16098
- /* @__PURE__ */ jsx232("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx232(TriangleAlert, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16099
- /* @__PURE__ */ jsx232("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
16100
- /* @__PURE__ */ jsx232("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
16139
+ /* @__PURE__ */ jsxs20("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
16140
+ /* @__PURE__ */ jsx26("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx26(TriangleAlert, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
16141
+ /* @__PURE__ */ jsx26("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
16142
+ /* @__PURE__ */ jsx26("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
16101
16143
  addressFailureCode,
16102
16144
  addressFailureMetadata
16103
16145
  ) })
16104
16146
  ] })
16105
16147
  ) : (
16106
16148
  /* Normal deposit options */
16107
- /* @__PURE__ */ jsxs18(Fragment52, { children: [
16108
- /* @__PURE__ */ jsx232(
16149
+ /* @__PURE__ */ jsxs20(Fragment52, { children: [
16150
+ /* @__PURE__ */ jsx26(
16109
16151
  TransferCryptoButton,
16110
16152
  {
16111
16153
  onClick: () => setView("transfer"),
16112
- title: t4.transferCrypto.title,
16113
- subtitle: t4.transferCrypto.subtitle,
16154
+ title: t5.transferCrypto.title,
16155
+ subtitle: t5.transferCrypto.subtitle,
16114
16156
  featuredTokens: projectConfig.transfer_crypto.networks
16115
16157
  }
16116
16158
  ),
16117
- /* @__PURE__ */ jsx232(
16159
+ /* @__PURE__ */ jsx26(
16118
16160
  DepositWithCardButton,
16119
16161
  {
16120
16162
  onClick: () => setView("card"),
16121
- title: t4.depositWithCard.title,
16122
- subtitle: t4.depositWithCard.subtitle,
16163
+ title: t5.depositWithCard.title,
16164
+ subtitle: t5.depositWithCard.subtitle,
16123
16165
  paymentNetworks: projectConfig.payment_networks.networks
16124
16166
  }
16125
16167
  ),
16126
- !hideDepositTracker && /* @__PURE__ */ jsx232(
16168
+ !hideDepositTracker && /* @__PURE__ */ jsx26(
16127
16169
  DepositTrackerButton,
16128
16170
  {
16129
16171
  onClick: () => setDepositsModalOpen(true),
@@ -16134,17 +16176,17 @@ function DepositModal({
16134
16176
  )
16135
16177
  ] })
16136
16178
  ) })
16137
- ] }) : view === "transfer" ? /* @__PURE__ */ jsxs18(Fragment52, { children: [
16138
- /* @__PURE__ */ jsx232(
16179
+ ] }) : view === "transfer" ? /* @__PURE__ */ jsxs20(Fragment52, { children: [
16180
+ /* @__PURE__ */ jsx26(
16139
16181
  DepositHeader,
16140
16182
  {
16141
- title: t4.transferCrypto.title,
16183
+ title: t5.transferCrypto.title,
16142
16184
  showBack: true,
16143
16185
  onBack: handleBack,
16144
16186
  onClose: handleClose
16145
16187
  }
16146
16188
  ),
16147
- transferInputVariant === "single_input" ? /* @__PURE__ */ jsx232(
16189
+ transferInputVariant === "single_input" ? /* @__PURE__ */ jsx26(
16148
16190
  TransferCryptoSingleInput,
16149
16191
  {
16150
16192
  userId,
@@ -16158,7 +16200,7 @@ function DepositModal({
16158
16200
  onDepositError,
16159
16201
  wallets
16160
16202
  }
16161
- ) : /* @__PURE__ */ jsx232(
16203
+ ) : /* @__PURE__ */ jsx26(
16162
16204
  TransferCryptoDoubleInput,
16163
16205
  {
16164
16206
  userId,
@@ -16173,18 +16215,18 @@ function DepositModal({
16173
16215
  wallets
16174
16216
  }
16175
16217
  )
16176
- ] }) : /* @__PURE__ */ jsxs18(Fragment52, { children: [
16177
- /* @__PURE__ */ jsx232(
16218
+ ] }) : /* @__PURE__ */ jsxs20(Fragment52, { children: [
16219
+ /* @__PURE__ */ jsx26(
16178
16220
  DepositHeader,
16179
16221
  {
16180
- title: cardView === "quotes" ? t4.quotes : t4.depositWithCard.title,
16222
+ title: cardView === "quotes" ? t5.quotes : t5.depositWithCard.title,
16181
16223
  showBack: true,
16182
16224
  onBack: handleBack,
16183
16225
  onClose: handleClose,
16184
16226
  badge: cardView === "quotes" ? { count: quotesCount } : void 0
16185
16227
  }
16186
16228
  ),
16187
- /* @__PURE__ */ jsx232(
16229
+ /* @__PURE__ */ jsx26(
16188
16230
  BuyWithCard,
16189
16231
  {
16190
16232
  userId,
@@ -16206,7 +16248,7 @@ function DepositModal({
16206
16248
  ] }) })
16207
16249
  }
16208
16250
  ),
16209
- /* @__PURE__ */ jsx232(
16251
+ /* @__PURE__ */ jsx26(
16210
16252
  DepositsModal,
16211
16253
  {
16212
16254
  open: depositsModalOpen,
@@ -16263,7 +16305,7 @@ var Button = React102.forwardRef(
16263
16305
  }
16264
16306
  return baseStyle;
16265
16307
  }, [variant, components, fonts, style]);
16266
- return /* @__PURE__ */ jsx24(
16308
+ return /* @__PURE__ */ jsx27(
16267
16309
  Comp,
16268
16310
  {
16269
16311
  className: cn(buttonVariants({ variant, size: size4, className })),
@@ -16277,14 +16319,14 @@ var Button = React102.forwardRef(
16277
16319
  Button.displayName = "Button";
16278
16320
 
16279
16321
  // src/provider.tsx
16280
- import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
16322
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
16281
16323
  function UnifoldProvider2({
16282
16324
  children,
16283
16325
  publishableKey,
16284
16326
  config
16285
16327
  }) {
16286
- const [isOpen, setIsOpen] = useState23(false);
16287
- const [depositConfig, setDepositConfig] = useState23(
16328
+ const [isOpen, setIsOpen] = useState24(false);
16329
+ const [depositConfig, setDepositConfig] = useState24(
16288
16330
  null
16289
16331
  );
16290
16332
  const [resolvedTheme, setResolvedTheme] = React38.useState("dark");
@@ -16305,7 +16347,7 @@ function UnifoldProvider2({
16305
16347
  }, [config?.appearance]);
16306
16348
  const depositPromiseRef = React38.useRef(null);
16307
16349
  const closeTimeoutRef = React38.useRef(null);
16308
- const beginDeposit = useCallback10((config2) => {
16350
+ const beginDeposit = useCallback11((config2) => {
16309
16351
  if (closeTimeoutRef.current) {
16310
16352
  clearTimeout(closeTimeoutRef.current);
16311
16353
  closeTimeoutRef.current = null;
@@ -16325,7 +16367,7 @@ function UnifoldProvider2({
16325
16367
  setIsOpen(true);
16326
16368
  return promise;
16327
16369
  }, []);
16328
- const closeDeposit = useCallback10(() => {
16370
+ const closeDeposit = useCallback11(() => {
16329
16371
  if (depositPromiseRef.current) {
16330
16372
  depositPromiseRef.current.reject({
16331
16373
  message: "Deposit cancelled by user",
@@ -16339,7 +16381,7 @@ function UnifoldProvider2({
16339
16381
  closeTimeoutRef.current = null;
16340
16382
  }, 200);
16341
16383
  }, []);
16342
- const handleDepositSuccess = useCallback10((data) => {
16384
+ const handleDepositSuccess = useCallback11((data) => {
16343
16385
  if (depositConfig?.onSuccess) {
16344
16386
  depositConfig.onSuccess(data);
16345
16387
  }
@@ -16348,7 +16390,7 @@ function UnifoldProvider2({
16348
16390
  depositPromiseRef.current = null;
16349
16391
  }
16350
16392
  }, [depositConfig]);
16351
- const handleDepositError = useCallback10((error) => {
16393
+ const handleDepositError = useCallback11((error) => {
16352
16394
  console.error("[UnifoldProvider] Deposit error:", error);
16353
16395
  if (depositConfig?.onError) {
16354
16396
  depositConfig.onError(error);
@@ -16367,7 +16409,7 @@ function UnifoldProvider2({
16367
16409
  }),
16368
16410
  [beginDeposit, closeDeposit, handleDepositSuccess, handleDepositError]
16369
16411
  );
16370
- return /* @__PURE__ */ jsx25(UnifoldProvider, { publishableKey, children: /* @__PURE__ */ jsx25(ConnectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs19(
16412
+ return /* @__PURE__ */ jsx28(UnifoldProvider, { publishableKey, children: /* @__PURE__ */ jsx28(ConnectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs21(
16371
16413
  ThemeProvider,
16372
16414
  {
16373
16415
  mode: resolvedTheme,
@@ -16378,7 +16420,7 @@ function UnifoldProvider2({
16378
16420
  components: config?.components,
16379
16421
  children: [
16380
16422
  children,
16381
- depositConfig && /* @__PURE__ */ jsx25(
16423
+ depositConfig && /* @__PURE__ */ jsx28(
16382
16424
  DepositModal,
16383
16425
  {
16384
16426
  open: isOpen,
@@ -16424,6 +16466,10 @@ function useUnifold2() {
16424
16466
  closeDeposit: connectContext.closeDeposit
16425
16467
  };
16426
16468
  }
16469
+ function useAllowedCountry2() {
16470
+ const { publishableKey } = useUnifold2();
16471
+ return useAllowedCountry(publishableKey);
16472
+ }
16427
16473
  export {
16428
16474
  Button,
16429
16475
  ExecutionStatus,
@@ -16447,7 +16493,7 @@ export {
16447
16493
  i18n,
16448
16494
  queryExecutions,
16449
16495
  setApiConfig,
16450
- useAllowedCountry,
16496
+ useAllowedCountry2 as useAllowedCountry,
16451
16497
  useUnifold2 as useUnifold,
16452
16498
  useUserIp
16453
16499
  };
@@ -16462,17 +16508,16 @@ lucide-react/dist/esm/icons/check.js:
16462
16508
  lucide-react/dist/esm/icons/chevron-down.js:
16463
16509
  lucide-react/dist/esm/icons/chevron-right.js:
16464
16510
  lucide-react/dist/esm/icons/chevron-up.js:
16465
- lucide-react/dist/esm/icons/circle-help.js:
16466
16511
  lucide-react/dist/esm/icons/clock.js:
16467
16512
  lucide-react/dist/esm/icons/copy.js:
16468
16513
  lucide-react/dist/esm/icons/credit-card.js:
16469
16514
  lucide-react/dist/esm/icons/dollar-sign.js:
16470
16515
  lucide-react/dist/esm/icons/external-link.js:
16471
- lucide-react/dist/esm/icons/file-text.js:
16472
16516
  lucide-react/dist/esm/icons/info.js:
16473
16517
  lucide-react/dist/esm/icons/map-pin-off.js:
16474
16518
  lucide-react/dist/esm/icons/shield-check.js:
16475
16519
  lucide-react/dist/esm/icons/triangle-alert.js:
16520
+ lucide-react/dist/esm/icons/wallet-minimal.js:
16476
16521
  lucide-react/dist/esm/icons/x.js:
16477
16522
  lucide-react/dist/esm/icons/zap.js:
16478
16523
  lucide-react/dist/esm/lucide-react.js: