@chainrails/react 0.0.8 → 0.0.10

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.
@@ -1,24 +1,37 @@
1
- import { useState as U, useEffect as z } from "react";
2
- import { jsxs as N, jsx as w } from "react/jsx-runtime";
3
- import './index.css';class x extends Error {
1
+ import { useState as v, useEffect as F } from "react";
2
+ import { jsxs as k, jsx as g } from "react/jsx-runtime";
3
+ import './index.css';function O(t) {
4
+ var e, s, r = "";
5
+ if (typeof t == "string" || typeof t == "number") r += t;
6
+ else if (typeof t == "object") if (Array.isArray(t)) {
7
+ var n = t.length;
8
+ for (e = 0; e < n; e++) t[e] && (s = O(t[e])) && (r && (r += " "), r += s);
9
+ } else for (s in t) t[s] && (r && (r += " "), r += s);
10
+ return r;
11
+ }
12
+ function z() {
13
+ for (var t, e, s = 0, r = "", n = arguments.length; s < n; s++) (t = arguments[s]) && (e = O(t)) && (r && (r += " "), r += e);
14
+ return r;
15
+ }
16
+ class S extends Error {
4
17
  response;
5
18
  request;
6
19
  options;
7
- constructor(e, r, s) {
20
+ constructor(e, s, r) {
8
21
  const n = e.status || e.status === 0 ? e.status : "", o = e.statusText ?? "", i = `${n} ${o}`.trim(), u = i ? `status code ${i}` : "an unknown error";
9
- super(`Request failed with ${u}: ${r.method} ${r.url}`), this.name = "HTTPError", this.response = e, this.request = r, this.options = s;
22
+ super(`Request failed with ${u}: ${s.method} ${s.url}`), this.name = "HTTPError", this.response = e, this.request = s, this.options = r;
10
23
  }
11
24
  }
12
25
  class L extends Error {
13
26
  name = "NonError";
14
27
  value;
15
28
  constructor(e) {
16
- let r = "Non-error value was thrown";
29
+ let s = "Non-error value was thrown";
17
30
  try {
18
- typeof e == "string" ? r = e : e && typeof e == "object" && "message" in e && typeof e.message == "string" && (r = e.message);
31
+ typeof e == "string" ? s = e : e && typeof e == "object" && "message" in e && typeof e.message == "string" && (s = e.message);
19
32
  } catch {
20
33
  }
21
- super(r), this.value = e;
34
+ super(s), this.value = e;
22
35
  }
23
36
  }
24
37
  class E extends Error {
@@ -27,14 +40,14 @@ class E extends Error {
27
40
  code;
28
41
  customRequest;
29
42
  constructor(e) {
30
- const r = e?.cause ? e.cause instanceof Error ? e.cause : new L(e.cause) : void 0;
31
- super(e?.code ? `Forced retry: ${e.code}` : "Forced retry", r ? { cause: r } : void 0), this.customDelay = e?.delay, this.code = e?.code, this.customRequest = e?.request;
43
+ const s = e?.cause ? e.cause instanceof Error ? e.cause : new L(e.cause) : void 0;
44
+ super(e?.code ? `Forced retry: ${e.code}` : "Forced retry", s ? { cause: s } : void 0), this.customDelay = e?.delay, this.code = e?.code, this.customRequest = e?.request;
32
45
  }
33
46
  }
34
- const v = (() => {
47
+ const N = (() => {
35
48
  let t = !1, e = !1;
36
- const r = typeof globalThis.ReadableStream == "function", s = typeof globalThis.Request == "function";
37
- if (r && s)
49
+ const s = typeof globalThis.ReadableStream == "function", r = typeof globalThis.Request == "function";
50
+ if (s && r)
38
51
  try {
39
52
  e = new globalThis.Request("https://empty.invalid", {
40
53
  body: new globalThis.ReadableStream(),
@@ -50,7 +63,7 @@ const v = (() => {
50
63
  throw n;
51
64
  }
52
65
  return t && !e;
53
- })(), J = typeof globalThis.AbortController == "function", I = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", V = typeof globalThis.ReadableStream == "function", K = typeof globalThis.FormData == "function", _ = ["get", "post", "put", "patch", "head", "delete"], W = {
66
+ })(), J = typeof globalThis.AbortController == "function", M = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", V = typeof globalThis.ReadableStream == "function", K = typeof globalThis.FormData == "function", I = ["get", "post", "put", "patch", "head", "delete"], W = {
54
67
  json: "application/json",
55
68
  text: "text/*",
56
69
  formData: "multipart/form-data",
@@ -59,14 +72,14 @@ const v = (() => {
59
72
  // Supported in modern Fetch implementations (for example, browsers and recent Node.js/undici).
60
73
  // We still feature-check at runtime before exposing the shortcut.
61
74
  bytes: "*/*"
62
- }, A = 2147483647, X = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length, M = Symbol("stop");
63
- class B {
75
+ }, A = 2147483647, X = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length, B = Symbol("stop");
76
+ class _ {
64
77
  options;
65
78
  constructor(e) {
66
79
  this.options = e;
67
80
  }
68
81
  }
69
- const Z = (t) => new B(t), Y = {
82
+ const Z = (t) => new _(t), Y = {
70
83
  json: !0,
71
84
  parseJson: !0,
72
85
  stringifyJson: !0,
@@ -103,8 +116,8 @@ const Z = (t) => new B(t), Y = {
103
116
  return 0;
104
117
  if (t instanceof FormData) {
105
118
  let e = 0;
106
- for (const [r, s] of t)
107
- e += X, e += new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length, e += typeof s == "string" ? new TextEncoder().encode(s).length : s.size;
119
+ for (const [s, r] of t)
120
+ e += X, e += new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length, e += typeof r == "string" ? new TextEncoder().encode(r).length : r.size;
108
121
  return e;
109
122
  }
110
123
  if (t instanceof Blob)
@@ -125,19 +138,19 @@ const Z = (t) => new B(t), Y = {
125
138
  return 0;
126
139
  }
127
140
  return 0;
128
- }, H = (t, e, r) => {
129
- let s, n = 0;
141
+ }, H = (t, e, s) => {
142
+ let r, n = 0;
130
143
  return t.pipeThrough(new TransformStream({
131
144
  transform(o, i) {
132
- if (i.enqueue(o), s) {
133
- n += s.byteLength;
145
+ if (i.enqueue(o), r) {
146
+ n += r.byteLength;
134
147
  let u = e === 0 ? 0 : n / e;
135
- u >= 1 && (u = 1 - Number.EPSILON), r?.({ percent: u, totalBytes: Math.max(e, n), transferredBytes: n }, s);
148
+ u >= 1 && (u = 1 - Number.EPSILON), s?.({ percent: u, totalBytes: Math.max(e, n), transferredBytes: n }, r);
136
149
  }
137
- s = o;
150
+ r = o;
138
151
  },
139
152
  flush() {
140
- s && (n += s.byteLength, r?.({ percent: 1, totalBytes: Math.max(e, n), transferredBytes: n }, s));
153
+ r && (n += r.byteLength, s?.({ percent: 1, totalBytes: Math.max(e, n), transferredBytes: n }, r));
141
154
  }
142
155
  }));
143
156
  }, te = (t, e) => {
@@ -149,76 +162,76 @@ const Z = (t) => new B(t), Y = {
149
162
  statusText: t.statusText,
150
163
  headers: t.headers
151
164
  });
152
- const r = Math.max(0, Number(t.headers.get("content-length")) || 0);
153
- return new Response(H(t.body, r, e), {
165
+ const s = Math.max(0, Number(t.headers.get("content-length")) || 0);
166
+ return new Response(H(t.body, s, e), {
154
167
  status: t.status,
155
168
  statusText: t.statusText,
156
169
  headers: t.headers
157
170
  });
158
- }, re = (t, e, r) => {
171
+ }, se = (t, e, s) => {
159
172
  if (!t.body)
160
173
  return t;
161
- const s = ee(r ?? t.body);
174
+ const r = ee(s ?? t.body);
162
175
  return new Request(t, {
163
176
  // @ts-expect-error - Types are outdated.
164
177
  duplex: "half",
165
- body: H(t.body, s, e)
178
+ body: H(t.body, r, e)
166
179
  });
167
- }, l = (t) => t !== null && typeof t == "object", b = (...t) => {
180
+ }, f = (t) => t !== null && typeof t == "object", w = (...t) => {
168
181
  for (const e of t)
169
- if ((!l(e) || Array.isArray(e)) && e !== void 0)
182
+ if ((!f(e) || Array.isArray(e)) && e !== void 0)
170
183
  throw new TypeError("The `options` argument must be an object");
171
- return k({}, ...t);
184
+ return q({}, ...t);
172
185
  }, D = (t = {}, e = {}) => {
173
- const r = new globalThis.Headers(t), s = e instanceof globalThis.Headers, n = new globalThis.Headers(e);
186
+ const s = new globalThis.Headers(t), r = e instanceof globalThis.Headers, n = new globalThis.Headers(e);
174
187
  for (const [o, i] of n.entries())
175
- s && i === "undefined" || i === void 0 ? r.delete(o) : r.set(o, i);
176
- return r;
188
+ r && i === "undefined" || i === void 0 ? s.delete(o) : s.set(o, i);
189
+ return s;
177
190
  };
178
- function R(t, e, r) {
179
- return Object.hasOwn(e, r) && e[r] === void 0 ? [] : k(t[r] ?? [], e[r] ?? []);
191
+ function b(t, e, s) {
192
+ return Object.hasOwn(e, s) && e[s] === void 0 ? [] : q(t[s] ?? [], e[s] ?? []);
180
193
  }
181
194
  const $ = (t = {}, e = {}) => ({
182
- beforeRequest: R(t, e, "beforeRequest"),
183
- beforeRetry: R(t, e, "beforeRetry"),
184
- afterResponse: R(t, e, "afterResponse"),
185
- beforeError: R(t, e, "beforeError")
186
- }), se = (t, e) => {
187
- const r = new URLSearchParams();
188
- for (const s of [t, e])
189
- if (s !== void 0)
190
- if (s instanceof URLSearchParams)
191
- for (const [n, o] of s.entries())
192
- r.append(n, o);
193
- else if (Array.isArray(s))
194
- for (const n of s) {
195
+ beforeRequest: b(t, e, "beforeRequest"),
196
+ beforeRetry: b(t, e, "beforeRetry"),
197
+ afterResponse: b(t, e, "afterResponse"),
198
+ beforeError: b(t, e, "beforeError")
199
+ }), re = (t, e) => {
200
+ const s = new URLSearchParams();
201
+ for (const r of [t, e])
202
+ if (r !== void 0)
203
+ if (r instanceof URLSearchParams)
204
+ for (const [n, o] of r.entries())
205
+ s.append(n, o);
206
+ else if (Array.isArray(r))
207
+ for (const n of r) {
195
208
  if (!Array.isArray(n) || n.length !== 2)
196
209
  throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");
197
- r.append(String(n[0]), String(n[1]));
210
+ s.append(String(n[0]), String(n[1]));
198
211
  }
199
- else if (l(s))
200
- for (const [n, o] of Object.entries(s))
201
- o !== void 0 && r.append(n, String(o));
212
+ else if (f(r))
213
+ for (const [n, o] of Object.entries(r))
214
+ o !== void 0 && s.append(n, String(o));
202
215
  else {
203
- const n = new URLSearchParams(s);
216
+ const n = new URLSearchParams(r);
204
217
  for (const [o, i] of n.entries())
205
- r.append(o, i);
218
+ s.append(o, i);
206
219
  }
207
- return r;
208
- }, k = (...t) => {
209
- let e = {}, r = {}, s = {}, n;
220
+ return s;
221
+ }, q = (...t) => {
222
+ let e = {}, s = {}, r = {}, n;
210
223
  const o = [];
211
224
  for (const i of t)
212
225
  if (Array.isArray(i))
213
226
  Array.isArray(e) || (e = []), e = [...e, ...i];
214
- else if (l(i)) {
227
+ else if (f(i)) {
215
228
  for (let [u, a] of Object.entries(i)) {
216
229
  if (u === "signal" && a instanceof globalThis.AbortSignal) {
217
230
  o.push(a);
218
231
  continue;
219
232
  }
220
233
  if (u === "context") {
221
- if (a != null && (!l(a) || Array.isArray(a)))
234
+ if (a != null && (!f(a) || Array.isArray(a)))
222
235
  throw new TypeError("The `context` option must be an object");
223
236
  e = {
224
237
  ...e,
@@ -227,15 +240,15 @@ const $ = (t = {}, e = {}) => ({
227
240
  continue;
228
241
  }
229
242
  if (u === "searchParams") {
230
- a == null ? n = void 0 : n = n === void 0 ? a : se(n, a);
243
+ a == null ? n = void 0 : n = n === void 0 ? a : re(n, a);
231
244
  continue;
232
245
  }
233
- l(a) && u in e && (a = k(e[u], a)), e = { ...e, [u]: a };
246
+ f(a) && u in e && (a = q(e[u], a)), e = { ...e, [u]: a };
234
247
  }
235
- l(i.hooks) && (s = $(s, i.hooks), e.hooks = s), l(i.headers) && (r = D(r, i.headers), e.headers = r);
248
+ f(i.hooks) && (r = $(r, i.hooks), e.hooks = r), f(i.headers) && (s = D(s, i.headers), e.headers = s);
236
249
  }
237
- return n !== void 0 && (e.searchParams = n), o.length > 0 && (o.length === 1 ? e.signal = o[0] : I ? e.signal = AbortSignal.any(o) : e.signal = o.at(-1)), e.context === void 0 && (e.context = {}), e;
238
- }, ne = (t) => _.includes(t) ? t.toUpperCase() : t, oe = ["get", "put", "head", "delete", "options", "trace"], ie = [408, 413, 429, 500, 502, 503, 504], ae = [413, 429, 503], O = {
250
+ return n !== void 0 && (e.searchParams = n), o.length > 0 && (o.length === 1 ? e.signal = o[0] : M ? e.signal = AbortSignal.any(o) : e.signal = o.at(-1)), e.context === void 0 && (e.context = {}), e;
251
+ }, ne = (t) => I.includes(t) ? t.toUpperCase() : t, oe = ["get", "put", "head", "delete", "options", "trace"], ie = [408, 413, 429, 500, 502, 503, 504], ae = [413, 429, 503], U = {
239
252
  limit: 2,
240
253
  methods: oe,
241
254
  statusCodes: ie,
@@ -248,7 +261,7 @@ const $ = (t = {}, e = {}) => ({
248
261
  }, ue = (t = {}) => {
249
262
  if (typeof t == "number")
250
263
  return {
251
- ...O,
264
+ ...U,
252
265
  limit: t
253
266
  };
254
267
  if (t.methods && !Array.isArray(t.methods))
@@ -256,7 +269,7 @@ const $ = (t = {}, e = {}) => ({
256
269
  if (t.statusCodes && !Array.isArray(t.statusCodes))
257
270
  throw new Error("retry.statusCodes must be an array");
258
271
  return {
259
- ...O,
272
+ ...U,
260
273
  ...t
261
274
  };
262
275
  };
@@ -266,81 +279,81 @@ class C extends Error {
266
279
  super(`Request timed out: ${e.method} ${e.url}`), this.name = "TimeoutError", this.request = e;
267
280
  }
268
281
  }
269
- async function ce(t, e, r, s) {
282
+ async function ce(t, e, s, r) {
270
283
  return new Promise((n, o) => {
271
284
  const i = setTimeout(() => {
272
- r && r.abort(), o(new C(t));
273
- }, s.timeout);
274
- s.fetch(t, e).then(n).catch(o).then(() => {
285
+ s && s.abort(), o(new C(t));
286
+ }, r.timeout);
287
+ r.fetch(t, e).then(n).catch(o).then(() => {
275
288
  clearTimeout(i);
276
289
  });
277
290
  });
278
291
  }
279
292
  async function he(t, { signal: e }) {
280
- return new Promise((r, s) => {
293
+ return new Promise((s, r) => {
281
294
  e && (e.throwIfAborted(), e.addEventListener("abort", n, { once: !0 }));
282
295
  function n() {
283
- clearTimeout(o), s(e.reason);
296
+ clearTimeout(o), r(e.reason);
284
297
  }
285
298
  const o = setTimeout(() => {
286
- e?.removeEventListener("abort", n), r();
299
+ e?.removeEventListener("abort", n), s();
287
300
  }, t);
288
301
  });
289
302
  }
290
303
  const le = (t, e) => {
291
- const r = {};
292
- for (const s in e)
293
- Object.hasOwn(e, s) && !(s in Q) && !(s in Y) && (!(s in t) || s in G) && (r[s] = e[s]);
294
- return r;
304
+ const s = {};
305
+ for (const r in e)
306
+ Object.hasOwn(e, r) && !(r in Q) && !(r in Y) && (!(r in t) || r in G) && (s[r] = e[r]);
307
+ return s;
295
308
  }, fe = (t) => t === void 0 ? !1 : Array.isArray(t) ? t.length > 0 : t instanceof URLSearchParams ? t.size > 0 : typeof t == "object" ? Object.keys(t).length > 0 : typeof t == "string" ? t.trim().length > 0 : !!t;
296
309
  function de(t) {
297
- return t instanceof x || t?.name === x.name;
310
+ return t instanceof S || t?.name === S.name;
298
311
  }
299
312
  function pe(t) {
300
313
  return t instanceof C || t?.name === C.name;
301
314
  }
302
- class y {
303
- static create(e, r) {
304
- const s = new y(e, r), n = async () => {
305
- if (typeof s.#e.timeout == "number" && s.#e.timeout > A)
315
+ class p {
316
+ static create(e, s) {
317
+ const r = new p(e, s), n = async () => {
318
+ if (typeof r.#e.timeout == "number" && r.#e.timeout > A)
306
319
  throw new RangeError(`The \`timeout\` option cannot be greater than ${A}`);
307
320
  await Promise.resolve();
308
- let i = await s.#y();
309
- for (const u of s.#e.hooks.afterResponse) {
310
- const a = s.#h(i.clone()), c = await u(s.request, s.#a(), a, { retryCount: s.#r });
311
- if (c instanceof globalThis.Response && (i = c), c instanceof B)
321
+ let i = await r.#y();
322
+ for (const u of r.#e.hooks.afterResponse) {
323
+ const a = r.#h(i.clone()), h = await u(r.request, r.#a(), a, { retryCount: r.#s });
324
+ if (h instanceof globalThis.Response && (i = h), h instanceof _)
312
325
  throw await Promise.all([
313
326
  a.body?.cancel(),
314
327
  i.body?.cancel()
315
- ]), new E(c.options);
328
+ ]), new E(h.options);
316
329
  }
317
- if (s.#h(i), !i.ok && (typeof s.#e.throwHttpErrors == "function" ? s.#e.throwHttpErrors(i.status) : s.#e.throwHttpErrors)) {
318
- let u = new x(i, s.request, s.#a());
319
- for (const a of s.#e.hooks.beforeError)
320
- u = await a(u, { retryCount: s.#r });
330
+ if (r.#h(i), !i.ok && (typeof r.#e.throwHttpErrors == "function" ? r.#e.throwHttpErrors(i.status) : r.#e.throwHttpErrors)) {
331
+ let u = new S(i, r.request, r.#a());
332
+ for (const a of r.#e.hooks.beforeError)
333
+ u = await a(u, { retryCount: r.#s });
321
334
  throw u;
322
335
  }
323
- if (s.#e.onDownloadProgress) {
324
- if (typeof s.#e.onDownloadProgress != "function")
336
+ if (r.#e.onDownloadProgress) {
337
+ if (typeof r.#e.onDownloadProgress != "function")
325
338
  throw new TypeError("The `onDownloadProgress` option must be a function");
326
339
  if (!V)
327
340
  throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
328
- return te(i.clone(), s.#e.onDownloadProgress);
341
+ return te(i.clone(), r.#e.onDownloadProgress);
329
342
  }
330
343
  return i;
331
- }, o = s.#l(n).finally(async () => {
332
- const i = s.#o, u = [];
333
- i && !i.bodyUsed && u.push(i.body?.cancel()), s.request.bodyUsed || u.push(s.request.body?.cancel()), await Promise.all(u);
344
+ }, o = r.#l(n).finally(async () => {
345
+ const i = r.#o, u = [];
346
+ i && !i.bodyUsed && u.push(i.body?.cancel()), r.request.bodyUsed || u.push(r.request.body?.cancel()), await Promise.all(u);
334
347
  });
335
348
  for (const [i, u] of Object.entries(W))
336
349
  i === "bytes" && typeof globalThis.Response?.prototype?.bytes != "function" || (o[i] = async () => {
337
- s.request.headers.set("accept", s.request.headers.get("accept") || u);
350
+ r.request.headers.set("accept", r.request.headers.get("accept") || u);
338
351
  const a = await o;
339
352
  if (i === "json") {
340
353
  if (a.status === 204)
341
354
  return "";
342
- const c = await a.text();
343
- return c === "" ? "" : r.parseJson ? r.parseJson(c) : JSON.parse(c);
355
+ const h = await a.text();
356
+ return h === "" ? "" : s.parseJson ? s.parseJson(h) : JSON.parse(h);
344
357
  }
345
358
  return a[i]();
346
359
  });
@@ -348,11 +361,11 @@ class y {
348
361
  }
349
362
  // eslint-disable-next-line unicorn/prevent-abbreviations
350
363
  static #d(e) {
351
- return e && typeof e == "object" && !Array.isArray(e) && !(e instanceof URLSearchParams) ? Object.fromEntries(Object.entries(e).filter(([, r]) => r !== void 0)) : e;
364
+ return e && typeof e == "object" && !Array.isArray(e) && !(e instanceof URLSearchParams) ? Object.fromEntries(Object.entries(e).filter(([, s]) => s !== void 0)) : e;
352
365
  }
353
366
  request;
354
- #s;
355
- #r = 0;
367
+ #r;
368
+ #s = 0;
356
369
  // eslint-disable-next-line @typescript-eslint/prefer-readonly -- False positive: #input is reassigned on line 202
357
370
  #t;
358
371
  #e;
@@ -360,24 +373,24 @@ class y {
360
373
  #n;
361
374
  #i;
362
375
  // eslint-disable-next-line complexity
363
- constructor(e, r = {}) {
376
+ constructor(e, s = {}) {
364
377
  if (this.#t = e, this.#e = {
365
- ...r,
366
- headers: D(this.#t.headers, r.headers),
378
+ ...s,
379
+ headers: D(this.#t.headers, s.headers),
367
380
  hooks: $({
368
381
  beforeRequest: [],
369
382
  beforeRetry: [],
370
383
  beforeError: [],
371
384
  afterResponse: []
372
- }, r.hooks),
373
- method: ne(r.method ?? this.#t.method ?? "GET"),
385
+ }, s.hooks),
386
+ method: ne(s.method ?? this.#t.method ?? "GET"),
374
387
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
375
- prefixUrl: String(r.prefixUrl || ""),
376
- retry: ue(r.retry),
377
- throwHttpErrors: r.throwHttpErrors ?? !0,
378
- timeout: r.timeout ?? 1e4,
379
- fetch: r.fetch ?? globalThis.fetch.bind(globalThis),
380
- context: r.context ?? {}
388
+ prefixUrl: String(s.prefixUrl || ""),
389
+ retry: ue(s.retry),
390
+ throwHttpErrors: s.throwHttpErrors ?? !0,
391
+ timeout: s.timeout ?? 1e4,
392
+ fetch: s.fetch ?? globalThis.fetch.bind(globalThis),
393
+ context: s.context ?? {}
381
394
  }, typeof this.#t != "string" && !(this.#t instanceof URL || this.#t instanceof globalThis.Request))
382
395
  throw new TypeError("`input` must be a string, URL, or Request");
383
396
  if (this.#e.prefixUrl && typeof this.#t == "string") {
@@ -385,38 +398,38 @@ class y {
385
398
  throw new Error("`input` must not begin with a slash when using `prefixUrl`");
386
399
  this.#e.prefixUrl.endsWith("/") || (this.#e.prefixUrl += "/"), this.#t = this.#e.prefixUrl + this.#t;
387
400
  }
388
- J && I && (this.#n = this.#e.signal ?? this.#t.signal, this.#s = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#s.signal]) : this.#s.signal), v && (this.#e.duplex = "half"), this.#e.json !== void 0 && (this.#e.body = this.#e.stringifyJson?.(this.#e.json) ?? JSON.stringify(this.#e.json), this.#e.headers.set("content-type", this.#e.headers.get("content-type") ?? "application/json"));
389
- const s = r.headers && new globalThis.Headers(r.headers).has("content-type");
390
- if (this.#t instanceof globalThis.Request && (K && this.#e.body instanceof globalThis.FormData || this.#e.body instanceof URLSearchParams) && !s && this.#e.headers.delete("content-type"), this.request = new globalThis.Request(this.#t, this.#e), fe(this.#e.searchParams)) {
391
- const o = "?" + (typeof this.#e.searchParams == "string" ? this.#e.searchParams.replace(/^\?/, "") : new URLSearchParams(y.#d(this.#e.searchParams)).toString()), i = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, o);
401
+ J && M && (this.#n = this.#e.signal ?? this.#t.signal, this.#r = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#r.signal]) : this.#r.signal), N && (this.#e.duplex = "half"), this.#e.json !== void 0 && (this.#e.body = this.#e.stringifyJson?.(this.#e.json) ?? JSON.stringify(this.#e.json), this.#e.headers.set("content-type", this.#e.headers.get("content-type") ?? "application/json"));
402
+ const r = s.headers && new globalThis.Headers(s.headers).has("content-type");
403
+ if (this.#t instanceof globalThis.Request && (K && this.#e.body instanceof globalThis.FormData || this.#e.body instanceof URLSearchParams) && !r && this.#e.headers.delete("content-type"), this.request = new globalThis.Request(this.#t, this.#e), fe(this.#e.searchParams)) {
404
+ const o = "?" + (typeof this.#e.searchParams == "string" ? this.#e.searchParams.replace(/^\?/, "") : new URLSearchParams(p.#d(this.#e.searchParams)).toString()), i = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, o);
392
405
  this.request = new globalThis.Request(i, this.#e);
393
406
  }
394
407
  if (this.#e.onUploadProgress) {
395
408
  if (typeof this.#e.onUploadProgress != "function")
396
409
  throw new TypeError("The `onUploadProgress` option must be a function");
397
- if (!v)
410
+ if (!N)
398
411
  throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");
399
412
  this.request = this.#f(this.request, this.#e.body ?? void 0);
400
413
  }
401
414
  }
402
415
  #u() {
403
- const e = this.#e.retry.delay(this.#r);
404
- let r = e;
405
- return this.#e.retry.jitter === !0 ? r = Math.random() * e : typeof this.#e.retry.jitter == "function" && (r = this.#e.retry.jitter(e), (!Number.isFinite(r) || r < 0) && (r = e)), Math.min(this.#e.retry.backoffLimit, r);
416
+ const e = this.#e.retry.delay(this.#s);
417
+ let s = e;
418
+ return this.#e.retry.jitter === !0 ? s = Math.random() * e : typeof this.#e.retry.jitter == "function" && (s = this.#e.retry.jitter(e), (!Number.isFinite(s) || s < 0) && (s = e)), Math.min(this.#e.retry.backoffLimit, s);
406
419
  }
407
420
  async #p(e) {
408
- if (this.#r++, this.#r > this.#e.retry.limit)
421
+ if (this.#s++, this.#s > this.#e.retry.limit)
409
422
  throw e;
410
- const r = e instanceof Error ? e : new L(e);
411
- if (r instanceof E)
412
- return r.customDelay ?? this.#u();
423
+ const s = e instanceof Error ? e : new L(e);
424
+ if (s instanceof E)
425
+ return s.customDelay ?? this.#u();
413
426
  if (!this.#e.retry.methods.includes(this.request.method.toLowerCase()))
414
427
  throw e;
415
428
  if (this.#e.retry.shouldRetry !== void 0) {
416
- const s = await this.#e.retry.shouldRetry({ error: r, retryCount: this.#r });
417
- if (s === !1)
429
+ const r = await this.#e.retry.shouldRetry({ error: s, retryCount: this.#s });
430
+ if (r === !1)
418
431
  throw e;
419
- if (s === !0)
432
+ if (r === !0)
420
433
  return this.#u();
421
434
  }
422
435
  if (pe(e) && !this.#e.retry.retryOnTimeout)
@@ -424,10 +437,10 @@ class y {
424
437
  if (de(e)) {
425
438
  if (!this.#e.retry.statusCodes.includes(e.response.status))
426
439
  throw e;
427
- const s = e.response.headers.get("Retry-After") ?? e.response.headers.get("RateLimit-Reset") ?? e.response.headers.get("X-RateLimit-Retry-After") ?? e.response.headers.get("X-RateLimit-Reset") ?? e.response.headers.get("X-Rate-Limit-Reset");
428
- if (s && this.#e.retry.afterStatusCodes.includes(e.response.status)) {
429
- let n = Number(s) * 1e3;
430
- Number.isNaN(n) ? n = Date.parse(s) - Date.now() : n >= Date.parse("2024-01-01") && (n -= Date.now());
440
+ const r = e.response.headers.get("Retry-After") ?? e.response.headers.get("RateLimit-Reset") ?? e.response.headers.get("X-RateLimit-Retry-After") ?? e.response.headers.get("X-RateLimit-Reset") ?? e.response.headers.get("X-Rate-Limit-Reset");
441
+ if (r && this.#e.retry.afterStatusCodes.includes(e.response.status)) {
442
+ let n = Number(r) * 1e3;
443
+ Number.isNaN(n) ? n = Date.parse(r) - Date.now() : n >= Date.parse("2024-01-01") && (n -= Date.now());
431
444
  const o = this.#e.retry.maxRetryAfter ?? n;
432
445
  return n < o ? n : o;
433
446
  }
@@ -442,20 +455,20 @@ class y {
442
455
  async #l(e) {
443
456
  try {
444
457
  return await e();
445
- } catch (r) {
446
- const s = Math.min(await this.#p(r), A);
447
- if (this.#r < 1)
448
- throw r;
449
- if (await he(s, this.#n ? { signal: this.#n } : {}), r instanceof E && r.customRequest) {
450
- const n = this.#e.signal ? new globalThis.Request(r.customRequest, { signal: this.#e.signal }) : new globalThis.Request(r.customRequest);
458
+ } catch (s) {
459
+ const r = Math.min(await this.#p(s), A);
460
+ if (this.#s < 1)
461
+ throw s;
462
+ if (await he(r, this.#n ? { signal: this.#n } : {}), s instanceof E && s.customRequest) {
463
+ const n = this.#e.signal ? new globalThis.Request(s.customRequest, { signal: this.#e.signal }) : new globalThis.Request(s.customRequest);
451
464
  this.#c(n);
452
465
  }
453
466
  for (const n of this.#e.hooks.beforeRetry) {
454
467
  const o = await n({
455
468
  request: this.request,
456
469
  options: this.#a(),
457
- error: r,
458
- retryCount: this.#r
470
+ error: s,
471
+ retryCount: this.#s
459
472
  });
460
473
  if (o instanceof globalThis.Request) {
461
474
  this.#c(o);
@@ -463,64 +476,65 @@ class y {
463
476
  }
464
477
  if (o instanceof globalThis.Response)
465
478
  return o;
466
- if (o === M)
479
+ if (o === B)
467
480
  return;
468
481
  }
469
482
  return this.#l(e);
470
483
  }
471
484
  }
472
485
  async #y() {
473
- this.#s?.signal.aborted && (this.#s = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#s.signal]) : this.#s.signal, this.request = new globalThis.Request(this.request, { signal: this.#e.signal }));
474
- for (const r of this.#e.hooks.beforeRequest) {
475
- const s = await r(this.request, this.#a(), { retryCount: this.#r });
476
- if (s instanceof Response)
477
- return s;
478
- if (s instanceof globalThis.Request) {
479
- this.#c(s);
486
+ this.#r?.signal.aborted && (this.#r = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#r.signal]) : this.#r.signal, this.request = new globalThis.Request(this.request, { signal: this.#e.signal }));
487
+ for (const s of this.#e.hooks.beforeRequest) {
488
+ const r = await s(this.request, this.#a(), { retryCount: this.#s });
489
+ if (r instanceof Response)
490
+ return r;
491
+ if (r instanceof globalThis.Request) {
492
+ this.#c(r);
480
493
  break;
481
494
  }
482
495
  }
483
496
  const e = le(this.request, this.#e);
484
- return this.#o = this.request, this.request = this.#o.clone(), this.#e.timeout === !1 ? this.#e.fetch(this.#o, e) : ce(this.#o, e, this.#s, this.#e);
497
+ return this.#o = this.request, this.request = this.#o.clone(), this.#e.timeout === !1 ? this.#e.fetch(this.#o, e) : ce(this.#o, e, this.#r, this.#e);
485
498
  }
486
499
  #a() {
487
500
  if (!this.#i) {
488
- const { hooks: e, ...r } = this.#e;
489
- this.#i = Object.freeze(r);
501
+ const { hooks: e, ...s } = this.#e;
502
+ this.#i = Object.freeze(s);
490
503
  }
491
504
  return this.#i;
492
505
  }
493
506
  #c(e) {
494
507
  this.#i = void 0, this.request = this.#f(e);
495
508
  }
496
- #f(e, r) {
497
- return !this.#e.onUploadProgress || !e.body ? e : re(e, this.#e.onUploadProgress, r ?? this.#e.body ?? void 0);
509
+ #f(e, s) {
510
+ return !this.#e.onUploadProgress || !e.body ? e : se(e, this.#e.onUploadProgress, s ?? this.#e.body ?? void 0);
498
511
  }
499
512
  }
500
513
  /*! MIT License © Sindre Sorhus */
501
- const P = (t) => {
502
- const e = (r, s) => y.create(r, b(t, s));
503
- for (const r of _)
504
- e[r] = (s, n) => y.create(s, b(t, n, { method: r }));
505
- return e.create = (r) => P(b(r)), e.extend = (r) => (typeof r == "function" && (r = r(t ?? {})), P(b(t, r))), e.stop = M, e.retry = Z, e;
506
- }, ye = P();
507
- let me = class d {
514
+ const x = (t) => {
515
+ const e = (s, r) => p.create(s, w(t, r));
516
+ for (const s of I)
517
+ e[s] = (r, n) => p.create(r, w(t, n, { method: s }));
518
+ return e.create = (s) => x(w(s)), e.extend = (s) => (typeof s == "function" && (s = s(t ?? {})), x(w(t, s))), e.stop = B, e.retry = Z, e;
519
+ }, ye = x();
520
+ var me = /* @__PURE__ */ ((t) => (t.ARBITRUM = "ARBITRUM_MAINNET", t.ARBITRUM_TESTNET = "ARBITRUM_TESTNET", t.BASE = "BASE_MAINNET", t.BASE_TESTNET = "BASE_TESTNET", t.AVALANCHE = "AVALANCHE_MAINNET", t.AVALANCHE_TESTNET = "AVALANCHE_TESTNET", t.BSC = "BSC_MAINNET", t.ETHEREUM = "ETHEREUM_MAINNET", t.ETHEREUM_TESTNET = "ETHEREUM_TESTNET", t.STARKNET = "STARKNET_MAINNET", t))(me || {}), ge = /* @__PURE__ */ ((t) => (t.USDC = "USDC", t))(ge || {});
521
+ class l {
508
522
  constructor({ api_key: e }) {
509
523
  this.api_key = e;
510
524
  }
511
525
  static config(e) {
512
- if (!d.app) {
526
+ if (!l.app) {
513
527
  if (!e)
514
528
  throw new Error("Please provide an api_key");
515
- d.app = new d(e);
529
+ l.app = new l(e);
516
530
  }
517
- return e && (this.app.api_key = e.api_key), d.app;
531
+ return e && (this.app.api_key = e.api_key), l.app;
518
532
  }
519
533
  static getApiKey() {
520
- return d.app.api_key;
534
+ return l.app.api_key;
521
535
  }
522
- };
523
- const h = ye.create({
536
+ }
537
+ const c = ye.create({
524
538
  prefixUrl: "https://dev.chainrails.io/api/v1",
525
539
  headers: {
526
540
  "Content-Type": "application/json"
@@ -528,195 +542,177 @@ const h = ye.create({
528
542
  hooks: {
529
543
  beforeRequest: [
530
544
  (t) => {
531
- const e = me.getApiKey();
545
+ const e = l.getApiKey();
532
546
  t.headers.set("Authorization", `Bearer ${e}`);
533
547
  }
534
548
  ],
535
- afterResponse: [(t, e, r) => r]
549
+ afterResponse: [(t, e, s) => s]
536
550
  },
537
551
  retry: {
538
552
  limit: 2
539
553
  }
540
554
  });
541
- class ge {
542
- async getClientInfo() {
543
- return await h.get("client/auth/client-info").json();
544
- }
545
- }
546
555
  class we {
547
556
  async getById(e) {
548
- return await h.get("intents/" + e).json();
557
+ return await c.get("intents/" + e).json();
549
558
  }
550
559
  async getForSender(e) {
551
- return await h.get("intents/user/" + e).json();
560
+ return await c.get("intents/user/" + e).json();
552
561
  }
553
562
  async getForAddress(e) {
554
- return await h.get("intents/address/" + e).json();
563
+ return await c.get("intents/address/" + e).json();
555
564
  }
556
565
  async getAll(e) {
557
- return await h.get("intents", { searchParams: e }).json();
566
+ return await c.get("intents", { searchParams: e }).json();
558
567
  }
559
568
  async create(e) {
560
- return await h.post("intents", { json: e }).json();
569
+ return await c.post("intents", { json: e }).json();
561
570
  }
562
- async update(e, r) {
563
- return await h.post("intents", { json: r }).json();
571
+ async update(e, s) {
572
+ return await c.post("intents", { json: s }).json();
564
573
  }
565
574
  //Calculate Destination
566
575
  }
567
576
  class be {
577
+ async getFromSpecificBridge(e) {
578
+ return await c.get("quotes/single", { searchParams: e }).json();
579
+ }
580
+ async getFromAllBridges(e) {
581
+ return await c.get("quotes/multiple", { searchParams: e }).json();
582
+ }
583
+ async getBestAcrossBridges(e) {
584
+ return await c.get("quotes/best", { searchParams: e }).json();
585
+ }
568
586
  async getAll(e) {
569
- return await h.get("quotes/multi-source", { searchParams: e }).json();
587
+ return await c.get("quotes/multi-source", { searchParams: e }).json();
570
588
  }
571
589
  }
572
- class Re {
590
+ class Te {
573
591
  async getOptimalRoutes(e) {
574
- return await h.get("router/optimal-route", { searchParams: e }).json();
592
+ return await c.get("router/optimal-route", { searchParams: e }).json();
575
593
  }
576
594
  async getAllSupportedBridges() {
577
- return await h.get("router/supported-bridges/all").json();
595
+ return await c.get("router/supported-bridges/all").json();
578
596
  }
579
597
  async getSupportedBridges(e) {
580
- return await h.get("router/supported-bridges/route", { searchParams: e }).json();
598
+ return await c.get("router/supported-bridges/route", { searchParams: e }).json();
581
599
  }
582
- async getSupportedRoutes(e, r) {
583
- return await h.get("router/supported-bridges/bridge/" + e, { searchParams: r }).json();
600
+ async getSupportedRoutes(e, s) {
601
+ return await c.get("router/supported-bridges/bridge/" + e, { searchParams: s }).json();
584
602
  }
585
603
  }
586
- const Te = {
587
- router: new Re(),
588
- quotes: new be(),
589
- intents: new we(),
590
- client: new ge()
591
- }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
592
- __proto__: null,
593
- default: Te
594
- }, Symbol.toStringTag, { value: "Module" }));
595
- function F(t) {
596
- var e, r, s = "";
597
- if (typeof t == "string" || typeof t == "number") s += t;
598
- else if (typeof t == "object") if (Array.isArray(t)) {
599
- var n = t.length;
600
- for (e = 0; e < n; e++) t[e] && (r = F(t[e])) && (s && (s += " "), s += r);
601
- } else for (r in t) t[r] && (s && (s += " "), s += r);
602
- return s;
603
- }
604
- function Se() {
605
- for (var t, e, r = 0, s = "", n = arguments.length; r < n; r++) (t = arguments[r]) && (e = F(t)) && (s && (s += " "), s += e);
606
- return s;
607
- }
608
- var Ee = /* @__PURE__ */ ((t) => (t.ARBITRUM = "ARBITRUM_MAINNET", t.ARBITRUM_TESTNET = "ARBITRUM_TESTNET", t.BASE = "BASE_MAINNET", t.BASE_TESTNET = "BASE_TESTNET", t.AVALANCHE = "AVALANCHE_MAINNET", t.AVALANCHE_TESTNET = "AVALANCHE_TESTNET", t))(Ee || {}), Ae = /* @__PURE__ */ ((t) => (t.USDC = "USDC", t))(Ae || {});
609
- class f {
610
- constructor({ api_key: e }) {
611
- this.api_key = e;
612
- }
613
- static config(e) {
614
- if (!f.app) {
615
- if (!e)
616
- throw new Error("Please provide an api_key");
617
- f.app = new f(e);
618
- }
619
- return e && (this.app.api_key = e.api_key), f.app;
604
+ class Re {
605
+ async getSupported(e) {
606
+ return await c.get("chains", { searchParams: e }).json();
620
607
  }
621
- static getApiKey() {
622
- return f.app.api_key;
608
+ }
609
+ class Ee {
610
+ async getClientInfo() {
611
+ return await c.get("client/auth/client-info").json();
623
612
  }
624
613
  }
625
- function ke(t) {
614
+ const Ce = {
615
+ router: new Te(),
616
+ quotes: new be(),
617
+ intents: new we(),
618
+ chains: new Re(),
619
+ client: new Ee()
620
+ };
621
+ function xe(t) {
626
622
  const {
627
623
  to: e,
628
- token: r,
629
- chain: s,
624
+ token: s,
625
+ chain: r,
630
626
  amount: n,
631
627
  isOpen: o,
632
628
  close: i,
633
629
  complete: u,
634
630
  cancel: a,
635
- chainSelected: c,
636
- intentCreated: m,
631
+ chainSelected: h,
632
+ intentCreated: y,
637
633
  ...T
638
- } = t, [p, S] = U(!0);
639
- return z(() => {
640
- const q = document.body.style.overflow;
641
- o ? document.body.style.overflow = "hidden" : document.body.style.overflow = q || "";
642
- const j = (g) => {
643
- g.data === "closed" && a(), g.data === "completed" && u(), g.data === "chainSelected" && c(), g.data === "intentCreated" && m();
634
+ } = t, [d, R] = v(!0);
635
+ return F(() => {
636
+ const P = document.body.style.overflow;
637
+ o ? document.body.style.overflow = "hidden" : document.body.style.overflow = P || "";
638
+ const j = (m) => {
639
+ m.data === "closed" && a(), m.data === "completed" && u(), m.data === "chainSelected" && h(), m.data === "intentCreated" && y();
644
640
  };
645
641
  return window.addEventListener("message", j), () => {
646
- document.body.style.overflow = q || "", window.removeEventListener("message", j);
642
+ document.body.style.overflow = P || "", window.removeEventListener("message", j);
647
643
  };
648
- }, [o, a, u, c, m]), /* @__PURE__ */ N("div", {
644
+ }, [o, a, u, h, y]), /* @__PURE__ */ k("div", {
649
645
  ...T,
650
- className: Se("payment-modal-wrapper", p ? "loading" : "not-loading", o ? "open" : "closed"),
651
- children: [p && /* @__PURE__ */ w("div", {
646
+ className: z("payment-modal-wrapper", d ? "loading" : "not-loading", o ? "open" : "closed"),
647
+ children: [d && /* @__PURE__ */ g("div", {
652
648
  role: "status",
653
649
  className: "payment-modal-loader",
654
- children: /* @__PURE__ */ N("svg", {
650
+ children: /* @__PURE__ */ k("svg", {
655
651
  "aria-hidden": "true",
656
652
  className: "icon",
657
653
  viewBox: "0 0 100 101",
658
654
  fill: "none",
659
655
  xmlns: "http://www.w3.org/2000/svg",
660
- children: [/* @__PURE__ */ w("path", {
656
+ children: [/* @__PURE__ */ g("path", {
661
657
  d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
662
658
  fill: "currentColor"
663
- }), /* @__PURE__ */ w("path", {
659
+ }), /* @__PURE__ */ g("path", {
664
660
  d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
665
661
  fill: "currentFill"
666
662
  })]
667
663
  })
668
- }), /* @__PURE__ */ w("iframe", {
664
+ }), /* @__PURE__ */ g("iframe", {
669
665
  allow: "clipboard-read *; clipboard-write *",
670
- src: `https://chainrails-frontend.vercel.app/pay/_chain_/${s}/_token_/${r}/_to_/${e}/_amount_/${n * 100}?id=${f.getApiKey()}`,
666
+ src: `https://chainrails-frontend.vercel.app/pay/_chain_/${r}/_token_/${s}/_to_/${e}/_amount_/${n * 100}?id=${l.getApiKey()}`,
671
667
  onLoad: () => {
672
- S(!1);
668
+ R(!1);
673
669
  },
674
- className: `payment-modal ${p ? "invisible" : "visible"}`
670
+ className: `payment-modal ${d ? "invisible" : "visible"}`
675
671
  })]
676
672
  });
677
673
  }
678
674
  function qe(t) {
679
675
  const {
680
676
  onCancel: e,
681
- onSuccess: r,
682
- onChainSelect: s,
677
+ onSuccess: s,
678
+ onChainSelect: r,
683
679
  onIntentCreate: n,
684
680
  ...o
685
- } = t, [i, u] = U(!1);
681
+ } = t, [i, u] = v(!1);
686
682
  function a() {
687
683
  u(!0);
688
684
  }
689
- function c() {
685
+ function h() {
690
686
  u(!1);
691
687
  }
692
- function m() {
693
- c(), e?.();
688
+ function y() {
689
+ h(), e?.();
694
690
  }
695
691
  function T() {
696
- window.setTimeout(c, 2e3), r?.();
692
+ window.setTimeout(h, 2e3), s?.();
697
693
  }
698
- function p() {
699
- s?.();
694
+ function d() {
695
+ r?.();
700
696
  }
701
- function S() {
697
+ function R() {
702
698
  n?.();
703
699
  }
704
700
  return {
705
701
  open: a,
706
- close: c,
702
+ close: h,
707
703
  complete: T,
708
- cancel: m,
709
- chainSelected: p,
710
- intentCreated: S,
704
+ cancel: y,
705
+ chainSelected: d,
706
+ intentCreated: R,
711
707
  isOpen: i,
712
708
  ...o
713
709
  };
714
710
  }
715
711
  export {
716
- Pe as CRAPI,
717
- f as Chainrails,
718
- ke as PaymentModal,
719
- Ee as chains,
720
- Ae as tokens,
712
+ l as Chainrails,
713
+ xe as PaymentModal,
714
+ me as chains,
715
+ Ce as crapi,
716
+ ge as tokens,
721
717
  qe as usePaymentModal
722
718
  };