l-min-components 1.8.342 → 1.8.344
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/chunks/{useCustomNavigate-e4a9b439.js → useCustomNavigate-cbfd6f87.js} +206 -196
- package/dist/chunks/useCustomNavigate-cbfd6f87.js.map +1 -0
- package/dist/components.js +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/hooks/useTranslation.jsx +16 -2
- package/dist/chunks/useCustomNavigate-e4a9b439.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import J, { useEffect as r1, useState as P, useCallback as m, useMemo as G1, useRef as $ } from "react";
|
|
2
|
-
import { j as g, a as t, i as
|
|
2
|
+
import { j as g, a as t, i as y } from "./axiosConfig-a2dc7c1f.js";
|
|
3
3
|
if (typeof z1 > "u")
|
|
4
4
|
var z1 = window;
|
|
5
5
|
var A1 = {
|
|
@@ -42,7 +42,7 @@ function G(e) {
|
|
|
42
42
|
}
|
|
43
43
|
function q1(e) {
|
|
44
44
|
var i = function(n) {
|
|
45
|
-
var r = e.attr, h = e.size, a = e.title, f = W1(e, ["attr", "size", "title"]),
|
|
45
|
+
var r = e.attr, h = e.size, a = e.title, f = W1(e, ["attr", "size", "title"]), u = h || n.size || "1em", v;
|
|
46
46
|
return n.className && (v = n.className), e.className && (v = (v ? v + " " : "") + e.className), J.createElement("svg", W({
|
|
47
47
|
stroke: "currentColor",
|
|
48
48
|
fill: "currentColor",
|
|
@@ -52,8 +52,8 @@ function q1(e) {
|
|
|
52
52
|
style: W(W({
|
|
53
53
|
color: e.color || n.color
|
|
54
54
|
}, n.style), e.style),
|
|
55
|
-
height:
|
|
56
|
-
width:
|
|
55
|
+
height: u,
|
|
56
|
+
width: u,
|
|
57
57
|
xmlns: "http://www.w3.org/2000/svg"
|
|
58
58
|
}), a && J.createElement("title", null, a), e.children);
|
|
59
59
|
};
|
|
@@ -375,67 +375,77 @@ const g1 = window.location.hostname.includes("staging") || window.location.hostn
|
|
|
375
375
|
r1(() => {
|
|
376
376
|
i && r(i);
|
|
377
377
|
}, [i]);
|
|
378
|
-
const [n, r] = P(i ?? "en"), [h, a] = P({}), [f,
|
|
379
|
-
(
|
|
378
|
+
const [n, r] = P(i ?? "en"), [h, a] = P({}), [f, u] = P(!0), v = m(
|
|
379
|
+
(Z, A = {}) => i6(h[Z] || Z, A),
|
|
380
380
|
[h]
|
|
381
381
|
), T = async () => {
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
384
|
-
return
|
|
382
|
+
const Z = Date.now(), A = window.translationCache.master;
|
|
383
|
+
if (A && A.data && A.expires > Z)
|
|
384
|
+
return A.data;
|
|
385
385
|
try {
|
|
386
|
-
const
|
|
387
|
-
`${e6}${window.location.hostname.includes("staging") ? `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json` : `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json`}`
|
|
386
|
+
const x = await fetch(
|
|
387
|
+
`${e6}${window.location.hostname.includes("staging") || window.location.hostname.includes("localhost") ? `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json` : `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json`}`
|
|
388
388
|
);
|
|
389
|
-
if (!
|
|
390
|
-
throw new Error(`Failed to fetch translations: ${
|
|
391
|
-
const
|
|
392
|
-
return console.log(
|
|
393
|
-
data:
|
|
394
|
-
timestamp:
|
|
395
|
-
expires:
|
|
396
|
-
},
|
|
397
|
-
} catch (
|
|
398
|
-
if (console.error("Failed to fetch master translations:",
|
|
399
|
-
return
|
|
400
|
-
throw
|
|
389
|
+
if (!x.ok)
|
|
390
|
+
throw new Error(`Failed to fetch translations: ${x.status}`);
|
|
391
|
+
const k = await x.json();
|
|
392
|
+
return console.log(k, "MASTER"), window.translationCache.master = {
|
|
393
|
+
data: k,
|
|
394
|
+
timestamp: Z,
|
|
395
|
+
expires: Z + t6
|
|
396
|
+
}, k;
|
|
397
|
+
} catch (x) {
|
|
398
|
+
if (console.error("Failed to fetch master translations:", x), A && A.data)
|
|
399
|
+
return A.data;
|
|
400
|
+
throw x;
|
|
401
401
|
}
|
|
402
|
-
}, j = (
|
|
403
|
-
const
|
|
404
|
-
return
|
|
405
|
-
if (
|
|
406
|
-
const F =
|
|
407
|
-
|
|
402
|
+
}, j = (Z, A, x) => {
|
|
403
|
+
const k = {}, I = x.toUpperCase();
|
|
404
|
+
return A.forEach((S) => {
|
|
405
|
+
if (Z[S] && Z[S][I]) {
|
|
406
|
+
const F = Z[S][I];
|
|
407
|
+
k[S] = F.trim() || S;
|
|
408
408
|
} else
|
|
409
|
-
|
|
410
|
-
}),
|
|
411
|
-
}, K = async (
|
|
412
|
-
if (!
|
|
413
|
-
|
|
409
|
+
k[S] = S;
|
|
410
|
+
}), k;
|
|
411
|
+
}, K = async (Z, A) => {
|
|
412
|
+
if (!A || A.length === 0) {
|
|
413
|
+
u(!1);
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if ((Z == null ? void 0 : Z.toLowerCase()) === "en") {
|
|
417
|
+
const x = {};
|
|
418
|
+
A.forEach((k) => {
|
|
419
|
+
x[k] = k;
|
|
420
|
+
}), a((k) => ({
|
|
421
|
+
...k,
|
|
422
|
+
...x
|
|
423
|
+
})), u(!1);
|
|
414
424
|
return;
|
|
415
425
|
}
|
|
416
426
|
try {
|
|
417
|
-
const
|
|
418
|
-
A,
|
|
427
|
+
const x = await T(), k = j(
|
|
419
428
|
x,
|
|
420
|
-
|
|
429
|
+
A,
|
|
430
|
+
Z
|
|
421
431
|
);
|
|
422
432
|
a((I) => ({
|
|
423
433
|
...I,
|
|
424
|
-
...
|
|
425
|
-
})),
|
|
426
|
-
} catch (
|
|
427
|
-
console.error("Failed to load translations:",
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
|
|
434
|
+
...k
|
|
435
|
+
})), u(!1);
|
|
436
|
+
} catch (x) {
|
|
437
|
+
console.error("Failed to load translations:", x);
|
|
438
|
+
const k = {};
|
|
439
|
+
A.forEach((I) => {
|
|
440
|
+
k[I] = I;
|
|
431
441
|
}), a((I) => ({
|
|
432
442
|
...I,
|
|
433
|
-
...
|
|
434
|
-
})),
|
|
443
|
+
...k
|
|
444
|
+
})), u(!1);
|
|
435
445
|
}
|
|
436
446
|
};
|
|
437
447
|
return r1(() => {
|
|
438
|
-
e && e.length > 0 ? K(n, e) :
|
|
448
|
+
e && e.length > 0 ? K(n, e) : u(!1);
|
|
439
449
|
}, [n]), {
|
|
440
450
|
defaultLang: n,
|
|
441
451
|
setDefaultLang: r,
|
|
@@ -443,7 +453,7 @@ const g1 = window.location.hostname.includes("staging") || window.location.hostn
|
|
|
443
453
|
translations: h,
|
|
444
454
|
findText: v,
|
|
445
455
|
isTranslationsLoading: f,
|
|
446
|
-
setIsTranslationsLoading:
|
|
456
|
+
setIsTranslationsLoading: u
|
|
447
457
|
};
|
|
448
458
|
};
|
|
449
459
|
function i6(e, i) {
|
|
@@ -453,13 +463,13 @@ const d7 = n6;
|
|
|
453
463
|
function C7(e) {
|
|
454
464
|
return G({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z" } }] })(e);
|
|
455
465
|
}
|
|
456
|
-
function
|
|
466
|
+
function w7(e) {
|
|
457
467
|
return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z" } }] })(e);
|
|
458
468
|
}
|
|
459
469
|
function o6(e) {
|
|
460
470
|
return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" } }] })(e);
|
|
461
471
|
}
|
|
462
|
-
function
|
|
472
|
+
function u7(e) {
|
|
463
473
|
return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" } }] })(e);
|
|
464
474
|
}
|
|
465
475
|
function f7(e) {
|
|
@@ -1072,7 +1082,7 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
|
|
|
1072
1082
|
)
|
|
1073
1083
|
]
|
|
1074
1084
|
}
|
|
1075
|
-
),
|
|
1085
|
+
), w6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
|
|
1076
1086
|
"svg",
|
|
1077
1087
|
{
|
|
1078
1088
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1090,7 +1100,7 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
|
|
|
1090
1100
|
}
|
|
1091
1101
|
)
|
|
1092
1102
|
}
|
|
1093
|
-
),
|
|
1103
|
+
), u6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
|
|
1094
1104
|
"svg",
|
|
1095
1105
|
{
|
|
1096
1106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1564,8 +1574,8 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
|
|
|
1564
1574
|
},
|
|
1565
1575
|
{
|
|
1566
1576
|
path: "/personal/addons",
|
|
1567
|
-
icon: /* @__PURE__ */ t(
|
|
1568
|
-
iconActive: /* @__PURE__ */ t(
|
|
1577
|
+
icon: /* @__PURE__ */ t(w6, {}),
|
|
1578
|
+
iconActive: /* @__PURE__ */ t(u6, {}),
|
|
1569
1579
|
text: "Add on",
|
|
1570
1580
|
disabled: !0
|
|
1571
1581
|
}
|
|
@@ -1607,13 +1617,13 @@ function C1(e, i = 500) {
|
|
|
1607
1617
|
return () => clearInterval(h);
|
|
1608
1618
|
}, [e, i, n]), n;
|
|
1609
1619
|
}
|
|
1610
|
-
const L6 = 5 * 1024 * 1024,
|
|
1620
|
+
const L6 = 5 * 1024 * 1024, w1 = (e) => {
|
|
1611
1621
|
if (!e)
|
|
1612
1622
|
return "";
|
|
1613
1623
|
const i = String(e).toLowerCase();
|
|
1614
1624
|
return i.startsWith("instructor") ? "instructor" : i === "enterprise" ? "enterprise" : i === "personal" || i === "student" ? "personal" : i;
|
|
1615
1625
|
}, m6 = (e, i) => {
|
|
1616
|
-
const n =
|
|
1626
|
+
const n = w1(e);
|
|
1617
1627
|
return n === "instructor" ? i ? `/instructor/${i}/files/` : "/instructor/files/" : n === "enterprise" ? "/enterprise/files/" : "/files/";
|
|
1618
1628
|
}, k6 = (e = "") => e.startsWith("/") ? e.slice(1) : e, U = (e = {}, i) => i ? {
|
|
1619
1629
|
...e,
|
|
@@ -1647,11 +1657,11 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1647
1657
|
const a = r.part_number ?? h + 1, f = (a - 1) * n;
|
|
1648
1658
|
if (f >= e.size)
|
|
1649
1659
|
throw new Error("partSize does not match file size for uploadUrls.");
|
|
1650
|
-
const
|
|
1660
|
+
const u = Math.min(f + n, e.size);
|
|
1651
1661
|
return {
|
|
1652
1662
|
partNumber: a,
|
|
1653
1663
|
url: r.url,
|
|
1654
|
-
body: e.slice(f,
|
|
1664
|
+
body: e.slice(f, u)
|
|
1655
1665
|
};
|
|
1656
1666
|
});
|
|
1657
1667
|
}, V6 = async ({
|
|
@@ -1662,25 +1672,25 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1662
1672
|
parts: h
|
|
1663
1673
|
}) => {
|
|
1664
1674
|
const a = h || M6({ file: e, uploadUrls: i, partSize: n }), f = [];
|
|
1665
|
-
for (const
|
|
1675
|
+
for (const u of a) {
|
|
1666
1676
|
const { etag: v } = await j1({
|
|
1667
|
-
url:
|
|
1668
|
-
file:
|
|
1677
|
+
url: u.url,
|
|
1678
|
+
file: u.body,
|
|
1669
1679
|
headers: r,
|
|
1670
1680
|
method: "PUT"
|
|
1671
1681
|
});
|
|
1672
1682
|
v || console.warn(
|
|
1673
|
-
`Part ${
|
|
1683
|
+
`Part ${u.partNumber}: ETag header not exposed. CORS should include 'ETag' in Access-Control-Expose-Headers.`
|
|
1674
1684
|
), f.push({
|
|
1675
1685
|
ETag: v,
|
|
1676
|
-
PartNumber:
|
|
1686
|
+
PartNumber: u.partNumber
|
|
1677
1687
|
});
|
|
1678
1688
|
}
|
|
1679
1689
|
return f;
|
|
1680
1690
|
}, H6 = (e = {}) => {
|
|
1681
1691
|
const i = C1("defaultAccountType"), n = C1("defaultAccountID"), r = C1("affiliateAccount"), h = G1(
|
|
1682
1692
|
() => ({
|
|
1683
|
-
accountType:
|
|
1693
|
+
accountType: w1(
|
|
1684
1694
|
e.accountType || i
|
|
1685
1695
|
),
|
|
1686
1696
|
accountId: e.accountId || n,
|
|
@@ -1697,7 +1707,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1697
1707
|
]
|
|
1698
1708
|
), a = m(
|
|
1699
1709
|
(c = {}) => ({
|
|
1700
|
-
accountType:
|
|
1710
|
+
accountType: w1(
|
|
1701
1711
|
c.accountType || h.accountType
|
|
1702
1712
|
),
|
|
1703
1713
|
accountId: c.accountId || h.accountId,
|
|
@@ -1713,7 +1723,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1713
1723
|
)}`;
|
|
1714
1724
|
},
|
|
1715
1725
|
[a]
|
|
1716
|
-
),
|
|
1726
|
+
), u = m(
|
|
1717
1727
|
(c, C) => `${f(C)}${c}/`,
|
|
1718
1728
|
[f]
|
|
1719
1729
|
), v = m(
|
|
@@ -1727,86 +1737,86 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1727
1737
|
[f]
|
|
1728
1738
|
), K = m(
|
|
1729
1739
|
async (c, { context: C, config: d } = {}) => {
|
|
1730
|
-
const
|
|
1731
|
-
return
|
|
1740
|
+
const w = a(C), p = f(w);
|
|
1741
|
+
return y.post(p, c, U(d, w.accountId));
|
|
1732
1742
|
},
|
|
1733
1743
|
[f, a]
|
|
1734
|
-
),
|
|
1744
|
+
), Z = m(
|
|
1735
1745
|
async ({ params: c, context: C, config: d } = {}) => {
|
|
1736
|
-
const
|
|
1746
|
+
const w = a(C), p = f(w), M = {
|
|
1737
1747
|
...d || {},
|
|
1738
1748
|
params: {
|
|
1739
1749
|
...c || {},
|
|
1740
1750
|
...(d == null ? void 0 : d.params) || {}
|
|
1741
1751
|
}
|
|
1742
1752
|
};
|
|
1743
|
-
return
|
|
1753
|
+
return y.get(p, U(M, w.accountId));
|
|
1744
1754
|
},
|
|
1745
1755
|
[f, a]
|
|
1746
|
-
),
|
|
1756
|
+
), A = m(
|
|
1747
1757
|
async (c, { context: C, config: d } = {}) => {
|
|
1748
|
-
const
|
|
1749
|
-
return
|
|
1750
|
-
|
|
1751
|
-
U(d,
|
|
1758
|
+
const w = a(C);
|
|
1759
|
+
return y.get(
|
|
1760
|
+
u(c, w),
|
|
1761
|
+
U(d, w.accountId)
|
|
1752
1762
|
);
|
|
1753
1763
|
},
|
|
1754
|
-
[
|
|
1755
|
-
),
|
|
1756
|
-
async (c, C, { context: d, config:
|
|
1764
|
+
[u, a]
|
|
1765
|
+
), x = m(
|
|
1766
|
+
async (c, C, { context: d, config: w } = {}) => {
|
|
1757
1767
|
const p = a(d);
|
|
1758
|
-
return
|
|
1759
|
-
|
|
1768
|
+
return y.patch(
|
|
1769
|
+
u(c, p),
|
|
1760
1770
|
C,
|
|
1761
|
-
U(
|
|
1771
|
+
U(w, p.accountId)
|
|
1762
1772
|
);
|
|
1763
1773
|
},
|
|
1764
|
-
[
|
|
1765
|
-
),
|
|
1774
|
+
[u, a]
|
|
1775
|
+
), k = m(
|
|
1766
1776
|
async (c, { context: C, config: d } = {}) => {
|
|
1767
|
-
const
|
|
1768
|
-
return
|
|
1769
|
-
|
|
1770
|
-
U(d,
|
|
1777
|
+
const w = a(C);
|
|
1778
|
+
return y.delete(
|
|
1779
|
+
u(c, w),
|
|
1780
|
+
U(d, w.accountId)
|
|
1771
1781
|
);
|
|
1772
1782
|
},
|
|
1773
|
-
[
|
|
1783
|
+
[u, a]
|
|
1774
1784
|
), I = m(
|
|
1775
|
-
async (c, C, { context: d, config:
|
|
1776
|
-
const p = a(d),
|
|
1777
|
-
return
|
|
1785
|
+
async (c, C, { context: d, config: w } = {}) => {
|
|
1786
|
+
const p = a(d), M = `${u(c, p)}presign_upload_urls/`;
|
|
1787
|
+
return y.post(M, C, U(w, p.accountId));
|
|
1778
1788
|
},
|
|
1779
|
-
[
|
|
1789
|
+
[u, a]
|
|
1780
1790
|
), S = m(
|
|
1781
|
-
async (c, C, { context: d, config:
|
|
1782
|
-
const p = a(d),
|
|
1783
|
-
return
|
|
1791
|
+
async (c, C, { context: d, config: w } = {}) => {
|
|
1792
|
+
const p = a(d), M = `${u(c, p)}confirm_upload/`;
|
|
1793
|
+
return y.post(M, C, U(w, p.accountId));
|
|
1784
1794
|
},
|
|
1785
|
-
[
|
|
1795
|
+
[u, a]
|
|
1786
1796
|
), F = m(
|
|
1787
1797
|
async (c, { context: C, config: d } = {}) => {
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1790
|
-
v(c,
|
|
1791
|
-
U(d,
|
|
1798
|
+
const w = a(C);
|
|
1799
|
+
return y.get(
|
|
1800
|
+
v(c, w),
|
|
1801
|
+
U(d, w.accountId)
|
|
1792
1802
|
);
|
|
1793
1803
|
},
|
|
1794
1804
|
[v, a]
|
|
1795
1805
|
), s1 = m(
|
|
1796
1806
|
async (c, { context: C, config: d } = {}) => {
|
|
1797
|
-
const
|
|
1798
|
-
return
|
|
1799
|
-
j(c,
|
|
1800
|
-
U(d,
|
|
1807
|
+
const w = a(C);
|
|
1808
|
+
return y.get(
|
|
1809
|
+
j(c, w),
|
|
1810
|
+
U(d, w.accountId)
|
|
1801
1811
|
);
|
|
1802
1812
|
},
|
|
1803
1813
|
[j, a]
|
|
1804
1814
|
), q = m(
|
|
1805
|
-
async (c, C, { context: d, config:
|
|
1815
|
+
async (c, C, { context: d, config: w } = {}) => {
|
|
1806
1816
|
const p = a(d);
|
|
1807
|
-
return
|
|
1817
|
+
return y.get(
|
|
1808
1818
|
T(c, C, p),
|
|
1809
|
-
U(
|
|
1819
|
+
U(w, p.accountId)
|
|
1810
1820
|
);
|
|
1811
1821
|
},
|
|
1812
1822
|
[T, a]
|
|
@@ -1814,8 +1824,8 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1814
1824
|
async (c, { context: C, preferHls: d } = {}) => {
|
|
1815
1825
|
if (!c)
|
|
1816
1826
|
return null;
|
|
1817
|
-
const
|
|
1818
|
-
...U({},
|
|
1827
|
+
const w = a(C), p = v(c, w), M = {
|
|
1828
|
+
...U({}, w.accountId),
|
|
1819
1829
|
maxRedirects: 5
|
|
1820
1830
|
};
|
|
1821
1831
|
let V = null;
|
|
@@ -1824,18 +1834,18 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1824
1834
|
return ((N = o == null ? void 0 : o.request) == null ? void 0 : N.responseURL) || ((R = l == null ? void 0 : l.request) == null ? void 0 : R.responseURL) || ((D = o == null ? void 0 : o.headers) == null ? void 0 : D.location) || ((X = (z = l == null ? void 0 : l.response) == null ? void 0 : z.headers) == null ? void 0 : X.location) || null;
|
|
1825
1835
|
};
|
|
1826
1836
|
if (d) {
|
|
1827
|
-
const o = T(c, "index.m3u8",
|
|
1837
|
+
const o = T(c, "index.m3u8", w);
|
|
1828
1838
|
try {
|
|
1829
|
-
return await
|
|
1839
|
+
return await y.get(o, M), `${y.defaults.baseURL || ""}${o}`;
|
|
1830
1840
|
} catch (l) {
|
|
1831
1841
|
V = l;
|
|
1832
1842
|
}
|
|
1833
1843
|
}
|
|
1834
1844
|
try {
|
|
1835
|
-
const o = await
|
|
1836
|
-
...
|
|
1845
|
+
const o = await y.get(p, {
|
|
1846
|
+
...M,
|
|
1837
1847
|
headers: {
|
|
1838
|
-
...
|
|
1848
|
+
...M.headers || {},
|
|
1839
1849
|
Range: "bytes=0-0"
|
|
1840
1850
|
}
|
|
1841
1851
|
}), l = s(o);
|
|
@@ -1848,7 +1858,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1848
1858
|
return l;
|
|
1849
1859
|
}
|
|
1850
1860
|
try {
|
|
1851
|
-
const o = await
|
|
1861
|
+
const o = await y.get(p, M), l = s(o);
|
|
1852
1862
|
if (l)
|
|
1853
1863
|
return l;
|
|
1854
1864
|
} catch (o) {
|
|
@@ -1864,17 +1874,17 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1864
1874
|
async (c, { context: C } = {}) => {
|
|
1865
1875
|
if (!c)
|
|
1866
1876
|
return null;
|
|
1867
|
-
const d = a(C),
|
|
1877
|
+
const d = a(C), w = j(c, d), p = {
|
|
1868
1878
|
...U({}, d.accountId),
|
|
1869
1879
|
maxRedirects: 5
|
|
1870
1880
|
};
|
|
1871
|
-
let
|
|
1881
|
+
let M = null;
|
|
1872
1882
|
const V = (s, o) => {
|
|
1873
1883
|
var l, N, R, D, z;
|
|
1874
1884
|
return ((l = s == null ? void 0 : s.request) == null ? void 0 : l.responseURL) || ((N = o == null ? void 0 : o.request) == null ? void 0 : N.responseURL) || ((R = s == null ? void 0 : s.headers) == null ? void 0 : R.location) || ((z = (D = o == null ? void 0 : o.response) == null ? void 0 : D.headers) == null ? void 0 : z.location) || null;
|
|
1875
1885
|
};
|
|
1876
1886
|
try {
|
|
1877
|
-
const s = await
|
|
1887
|
+
const s = await y.get(w, {
|
|
1878
1888
|
...p,
|
|
1879
1889
|
headers: {
|
|
1880
1890
|
...p.headers || {},
|
|
@@ -1884,65 +1894,65 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1884
1894
|
if (o)
|
|
1885
1895
|
return o;
|
|
1886
1896
|
} catch (s) {
|
|
1887
|
-
|
|
1897
|
+
M = s;
|
|
1888
1898
|
const o = V(null, s);
|
|
1889
1899
|
if (o)
|
|
1890
1900
|
return o;
|
|
1891
1901
|
}
|
|
1892
1902
|
try {
|
|
1893
|
-
const s = await
|
|
1903
|
+
const s = await y.get(w, p), o = V(s);
|
|
1894
1904
|
if (o)
|
|
1895
1905
|
return o;
|
|
1896
1906
|
} catch (s) {
|
|
1897
|
-
|
|
1907
|
+
M = s;
|
|
1898
1908
|
const o = V(null, s);
|
|
1899
1909
|
if (o)
|
|
1900
1910
|
return o;
|
|
1901
1911
|
}
|
|
1902
|
-
return
|
|
1912
|
+
return M && console.error("Failed to resolve download URL:", M), null;
|
|
1903
1913
|
},
|
|
1904
1914
|
[j, a]
|
|
1905
|
-
),
|
|
1915
|
+
), E = m(
|
|
1906
1916
|
(c, C) => {
|
|
1907
|
-
const d = a(C),
|
|
1908
|
-
return `${
|
|
1917
|
+
const d = a(C), w = v(c, d);
|
|
1918
|
+
return `${y.defaults.baseURL || ""}${w}`;
|
|
1909
1919
|
},
|
|
1910
1920
|
[v, a]
|
|
1911
1921
|
), b = m(
|
|
1912
1922
|
(c, C) => {
|
|
1913
|
-
const d = a(C),
|
|
1914
|
-
return `${
|
|
1923
|
+
const d = a(C), w = j(c, d);
|
|
1924
|
+
return `${y.defaults.baseURL || ""}${w}`;
|
|
1915
1925
|
},
|
|
1916
1926
|
[j, a]
|
|
1917
|
-
),
|
|
1927
|
+
), O = m(
|
|
1918
1928
|
async ({ category: c, context: C, config: d } = {}) => {
|
|
1919
|
-
const
|
|
1929
|
+
const w = a(C), p = `${f(w)}download-all-deletable-files/`, M = {
|
|
1920
1930
|
...d || {},
|
|
1921
1931
|
params: {
|
|
1922
1932
|
...c ? { category: c } : {},
|
|
1923
1933
|
...(d == null ? void 0 : d.params) || {}
|
|
1924
1934
|
}
|
|
1925
1935
|
};
|
|
1926
|
-
return
|
|
1936
|
+
return y.get(p, U(M, w.accountId));
|
|
1927
1937
|
},
|
|
1928
1938
|
[f, a]
|
|
1929
1939
|
), L = m(
|
|
1930
1940
|
async (c, { context: C, config: d } = {}) => {
|
|
1931
1941
|
if (!c || !Array.isArray(c) || c.length === 0)
|
|
1932
1942
|
throw new Error("downloadFiles requires a non-empty array of file IDs.");
|
|
1933
|
-
const
|
|
1934
|
-
return
|
|
1943
|
+
const w = a(C), p = `${f(w)}download-files/`;
|
|
1944
|
+
return y.post(p, { ids: c }, U(d, w.accountId));
|
|
1935
1945
|
},
|
|
1936
1946
|
[f, a]
|
|
1937
1947
|
), H = m((c, C) => {
|
|
1938
1948
|
const d = document.createElement("a");
|
|
1939
1949
|
d.href = c, C && (d.download = C), d.target = "_blank", document.body.appendChild(d), d.click(), document.body.removeChild(d);
|
|
1940
1950
|
}, []), Q = m(
|
|
1941
|
-
async (c, { filenames: C = {}, context: d, config:
|
|
1942
|
-
var
|
|
1951
|
+
async (c, { filenames: C = {}, context: d, config: w } = {}) => {
|
|
1952
|
+
var M;
|
|
1943
1953
|
const p = { success: [], failed: [] };
|
|
1944
1954
|
try {
|
|
1945
|
-
const V = await L(c, { context: d, config:
|
|
1955
|
+
const V = await L(c, { context: d, config: w }), s = ((M = V == null ? void 0 : V.data) == null ? void 0 : M.results) || [];
|
|
1946
1956
|
for (const l of s)
|
|
1947
1957
|
try {
|
|
1948
1958
|
H(l.url, C[l.id]), p.success.push(l.id);
|
|
@@ -1959,11 +1969,11 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1959
1969
|
},
|
|
1960
1970
|
[L, H]
|
|
1961
1971
|
), _ = m(
|
|
1962
|
-
async ({ category: c, filenames: C = {}, context: d, config:
|
|
1963
|
-
var
|
|
1972
|
+
async ({ category: c, filenames: C = {}, context: d, config: w } = {}) => {
|
|
1973
|
+
var M;
|
|
1964
1974
|
const p = { success: [], failed: [] };
|
|
1965
1975
|
try {
|
|
1966
|
-
const V = await
|
|
1976
|
+
const V = await O({ category: c, context: d, config: w }), s = ((M = V == null ? void 0 : V.data) == null ? void 0 : M.results) || [];
|
|
1967
1977
|
for (const o of s)
|
|
1968
1978
|
try {
|
|
1969
1979
|
H(o.url, C[o.id]), p.success.push(o.id);
|
|
@@ -1975,25 +1985,25 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
1975
1985
|
}
|
|
1976
1986
|
return p;
|
|
1977
1987
|
},
|
|
1978
|
-
[
|
|
1988
|
+
[O, H]
|
|
1979
1989
|
);
|
|
1980
1990
|
return {
|
|
1981
1991
|
// Context
|
|
1982
1992
|
context: h,
|
|
1983
1993
|
// URL builders
|
|
1984
1994
|
getBasePath: f,
|
|
1985
|
-
buildFileUrl:
|
|
1995
|
+
buildFileUrl: u,
|
|
1986
1996
|
buildStreamUrl: v,
|
|
1987
1997
|
buildStreamPathUrl: T,
|
|
1988
1998
|
buildDownloadUrl: j,
|
|
1989
|
-
buildStreamUrlWithAccount:
|
|
1999
|
+
buildStreamUrlWithAccount: E,
|
|
1990
2000
|
buildDownloadUrlWithAccount: b,
|
|
1991
2001
|
// CRUD operations
|
|
1992
2002
|
createFiles: K,
|
|
1993
|
-
listFiles:
|
|
1994
|
-
getFile:
|
|
1995
|
-
updateFile:
|
|
1996
|
-
deleteFile:
|
|
2003
|
+
listFiles: Z,
|
|
2004
|
+
getFile: A,
|
|
2005
|
+
updateFile: x,
|
|
2006
|
+
deleteFile: k,
|
|
1997
2007
|
// Upload operations
|
|
1998
2008
|
presignUploadUrls: I,
|
|
1999
2009
|
confirmUpload: S,
|
|
@@ -2006,13 +2016,13 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
2006
2016
|
resolvePresignedUrl: B,
|
|
2007
2017
|
resolveDownloadUrl: Y,
|
|
2008
2018
|
// V2 Bulk download operations
|
|
2009
|
-
downloadAllDeletableFiles:
|
|
2019
|
+
downloadAllDeletableFiles: O,
|
|
2010
2020
|
downloadFiles: L,
|
|
2011
2021
|
bulkDownloadFiles: Q,
|
|
2012
2022
|
bulkDownloadDeletableFiles: _,
|
|
2013
2023
|
triggerBrowserDownload: H
|
|
2014
2024
|
};
|
|
2015
|
-
}, k7 = H6,
|
|
2025
|
+
}, k7 = H6, u1 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ g(
|
|
2016
2026
|
"svg",
|
|
2017
2027
|
{
|
|
2018
2028
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2602,7 +2612,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
2602
2612
|
}
|
|
2603
2613
|
)
|
|
2604
2614
|
}
|
|
2605
|
-
),
|
|
2615
|
+
), E6 = () => /* @__PURE__ */ g(
|
|
2606
2616
|
"svg",
|
|
2607
2617
|
{
|
|
2608
2618
|
width: "24",
|
|
@@ -2629,7 +2639,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
2629
2639
|
) }) })
|
|
2630
2640
|
]
|
|
2631
2641
|
}
|
|
2632
|
-
),
|
|
2642
|
+
), O6 = () => /* @__PURE__ */ g(
|
|
2633
2643
|
"svg",
|
|
2634
2644
|
{
|
|
2635
2645
|
width: "24",
|
|
@@ -3112,7 +3122,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3112
3122
|
}
|
|
3113
3123
|
)
|
|
3114
3124
|
}
|
|
3115
|
-
),
|
|
3125
|
+
), E1 = {
|
|
3116
3126
|
path: null,
|
|
3117
3127
|
icon: /* @__PURE__ */ t(Q6, {}),
|
|
3118
3128
|
iconActive: /* @__PURE__ */ t($6, {}),
|
|
@@ -3153,7 +3163,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3153
3163
|
routes: [
|
|
3154
3164
|
{
|
|
3155
3165
|
path: "/dashboard",
|
|
3156
|
-
icon: /* @__PURE__ */ t(
|
|
3166
|
+
icon: /* @__PURE__ */ t(u1, {}),
|
|
3157
3167
|
iconActive: /* @__PURE__ */ t(f1, {}),
|
|
3158
3168
|
text: "Dashboard",
|
|
3159
3169
|
hasNotification: !1,
|
|
@@ -3214,7 +3224,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3214
3224
|
optionType: null,
|
|
3215
3225
|
routes: [
|
|
3216
3226
|
{
|
|
3217
|
-
...
|
|
3227
|
+
...E1,
|
|
3218
3228
|
dropdownItems: [
|
|
3219
3229
|
{
|
|
3220
3230
|
path: "/admins",
|
|
@@ -3247,7 +3257,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3247
3257
|
routes: [
|
|
3248
3258
|
{
|
|
3249
3259
|
path: "/dashboard",
|
|
3250
|
-
icon: /* @__PURE__ */ t(
|
|
3260
|
+
icon: /* @__PURE__ */ t(u1, {}),
|
|
3251
3261
|
iconActive: /* @__PURE__ */ t(f1, {}),
|
|
3252
3262
|
text: "Dashboard",
|
|
3253
3263
|
hasNotification: !1,
|
|
@@ -3370,7 +3380,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3370
3380
|
},
|
|
3371
3381
|
{
|
|
3372
3382
|
optionType: null,
|
|
3373
|
-
routes: [
|
|
3383
|
+
routes: [E1]
|
|
3374
3384
|
}
|
|
3375
3385
|
], H7 = [
|
|
3376
3386
|
{
|
|
@@ -3378,7 +3388,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3378
3388
|
routes: [
|
|
3379
3389
|
{
|
|
3380
3390
|
path: "/dashboard",
|
|
3381
|
-
icon: /* @__PURE__ */ t(
|
|
3391
|
+
icon: /* @__PURE__ */ t(u1, {}),
|
|
3382
3392
|
iconActive: /* @__PURE__ */ t(f1, {}),
|
|
3383
3393
|
text: "Dashboard",
|
|
3384
3394
|
hasNotification: !1,
|
|
@@ -3481,8 +3491,8 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3481
3491
|
},
|
|
3482
3492
|
{
|
|
3483
3493
|
path: "/security",
|
|
3484
|
-
icon: /* @__PURE__ */ t(
|
|
3485
|
-
iconActive: /* @__PURE__ */ t(
|
|
3494
|
+
icon: /* @__PURE__ */ t(E6, {}),
|
|
3495
|
+
iconActive: /* @__PURE__ */ t(O6, {}),
|
|
3486
3496
|
text: "Security",
|
|
3487
3497
|
hasNotification: !1,
|
|
3488
3498
|
hasDropdown: !1
|
|
@@ -3572,19 +3582,19 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
|
|
|
3572
3582
|
o1[4]
|
|
3573
3583
|
], Z7 = [o1[4]];
|
|
3574
3584
|
function r7(e, i = {}) {
|
|
3575
|
-
const n = e.numberOfChannels, r = e.sampleRate, h = 1, a = 16, f = n === 2 ? l7(e.getChannelData(0), e.getChannelData(1)) : e.getChannelData(0),
|
|
3585
|
+
const n = e.numberOfChannels, r = e.sampleRate, h = 1, a = 16, f = n === 2 ? l7(e.getChannelData(0), e.getChannelData(1)) : e.getChannelData(0), u = s7(
|
|
3576
3586
|
f,
|
|
3577
3587
|
h,
|
|
3578
3588
|
r,
|
|
3579
3589
|
n,
|
|
3580
3590
|
a
|
|
3581
3591
|
);
|
|
3582
|
-
return new Blob([
|
|
3592
|
+
return new Blob([u], {
|
|
3583
3593
|
type: "audio/wav"
|
|
3584
3594
|
});
|
|
3585
3595
|
}
|
|
3586
3596
|
function s7(e, i, n, r, h) {
|
|
3587
|
-
const a = h / 8, f = r * a,
|
|
3597
|
+
const a = h / 8, f = r * a, u = new ArrayBuffer(44 + e.length * a), v = new DataView(u);
|
|
3588
3598
|
return i1(v, 0, "RIFF"), v.setUint32(4, 36 + e.length * a, !0), i1(v, 8, "WAVE"), i1(v, 12, "fmt "), v.setUint32(16, 16, !0), v.setUint16(20, i, !0), v.setUint16(22, r, !0), v.setUint32(24, n, !0), v.setUint32(28, n * f, !0), v.setUint16(32, f, !0), v.setUint16(34, h, !0), i1(v, 36, "data"), v.setUint32(40, e.length * a, !0), a7(v, 44, e), v;
|
|
3589
3599
|
}
|
|
3590
3600
|
function a7(e, i, n) {
|
|
@@ -3612,7 +3622,7 @@ function A7(e) {
|
|
|
3612
3622
|
onError: h,
|
|
3613
3623
|
onStreamReady: a,
|
|
3614
3624
|
config: f
|
|
3615
|
-
} = e || {}, [
|
|
3625
|
+
} = e || {}, [u, v] = P("idle"), [T, j] = P(0), [K, Z] = P([]), [A, x] = P(null), [k, I] = P(""), [S, F] = P(null), [s1, q] = P(!1), B = $(null), Y = $([]), E = $(null), b = $(null), O = $(null), L = m(
|
|
3616
3626
|
(s) => {
|
|
3617
3627
|
v((o) => (o !== s && (i == null || i({
|
|
3618
3628
|
newState: s,
|
|
@@ -3639,7 +3649,7 @@ function A7(e) {
|
|
|
3639
3649
|
const s = await navigator.mediaDevices.getUserMedia({
|
|
3640
3650
|
audio: !0
|
|
3641
3651
|
});
|
|
3642
|
-
if (
|
|
3652
|
+
if (O.current = s, !b.current)
|
|
3643
3653
|
try {
|
|
3644
3654
|
b.current = new (window.AudioContext || window.webkitAudioContext)();
|
|
3645
3655
|
} catch (o) {
|
|
@@ -3655,26 +3665,26 @@ function A7(e) {
|
|
|
3655
3665
|
) : H("Error accessing microphone.", s), L("permissionDenied"), !1;
|
|
3656
3666
|
}
|
|
3657
3667
|
}, [H, L]), _ = () => {
|
|
3658
|
-
|
|
3668
|
+
E.current && clearInterval(E.current), E.current = setInterval(() => {
|
|
3659
3669
|
j((s) => {
|
|
3660
3670
|
const o = s + 1;
|
|
3661
3671
|
return n == null || n(o), o;
|
|
3662
3672
|
});
|
|
3663
3673
|
}, 1e3);
|
|
3664
3674
|
}, c = () => {
|
|
3665
|
-
|
|
3675
|
+
E.current && clearInterval(E.current), E.current = null;
|
|
3666
3676
|
}, C = () => {
|
|
3667
3677
|
c(), j(0), n == null || n(0);
|
|
3668
3678
|
}, d = m(() => {
|
|
3669
3679
|
var s;
|
|
3670
|
-
B.current && B.current.state !== "inactive" && B.current.stop(), (s =
|
|
3680
|
+
B.current && B.current.state !== "inactive" && B.current.stop(), (s = O.current) == null || s.getTracks().forEach((o) => o.stop()), O.current = null, k && URL.revokeObjectURL(k), I(""), x(null), Z([]), Y.current = [], C(), F(null), L("permissionNeeded"), navigator.mediaDevices && navigator.mediaDevices.getUserMedia ? (q(!0), navigator.permissions && navigator.permissions.query ? navigator.permissions.query({
|
|
3671
3681
|
name: "microphone"
|
|
3672
3682
|
}).then((o) => {
|
|
3673
3683
|
o.state === "granted" ? L("ready") : o.state === "denied" ? (L("permissionDenied"), F(
|
|
3674
3684
|
(l) => l || "Microphone permission is denied."
|
|
3675
3685
|
)) : L("permissionNeeded");
|
|
3676
3686
|
}).catch(() => L("permissionNeeded")) : L("permissionNeeded")) : (q(!1), L("permissionDenied"), F("MediaDevices API not supported on this browser."));
|
|
3677
|
-
}, [
|
|
3687
|
+
}, [k, L]);
|
|
3678
3688
|
r1(() => {
|
|
3679
3689
|
if (q(
|
|
3680
3690
|
!!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)
|
|
@@ -3709,22 +3719,22 @@ function A7(e) {
|
|
|
3709
3719
|
s = l, o(), l.onchange = o;
|
|
3710
3720
|
}).catch(() => L("permissionNeeded")), () => {
|
|
3711
3721
|
var l, N, R;
|
|
3712
|
-
|
|
3722
|
+
E.current && clearInterval(E.current), k && URL.revokeObjectURL(k), (l = O.current) == null || l.getTracks().forEach((D) => D.stop()), (R = (N = B.current) == null ? void 0 : N.stream) == null || R.getTracks().forEach((D) => D.stop()), s && (s.onchange = null);
|
|
3713
3723
|
};
|
|
3714
3724
|
}, []);
|
|
3715
|
-
const
|
|
3725
|
+
const w = m(async () => {
|
|
3716
3726
|
if (!["ready", "finished", "idle", "permissionNeeded"].includes(
|
|
3717
|
-
|
|
3727
|
+
u
|
|
3718
3728
|
)) {
|
|
3719
|
-
H(`Cannot start recording in state: ${
|
|
3729
|
+
H(`Cannot start recording in state: ${u}`);
|
|
3720
3730
|
return;
|
|
3721
3731
|
}
|
|
3722
|
-
F(null),
|
|
3723
|
-
let s =
|
|
3732
|
+
F(null), x(null), k && (URL.revokeObjectURL(k), I("")), Y.current = [], Z([]), C();
|
|
3733
|
+
let s = O.current;
|
|
3724
3734
|
if (!s || s.getAudioTracks().every((o) => o.readyState === "ended")) {
|
|
3725
3735
|
if (!await Q())
|
|
3726
3736
|
return;
|
|
3727
|
-
s =
|
|
3737
|
+
s = O.current;
|
|
3728
3738
|
}
|
|
3729
3739
|
if (!s) {
|
|
3730
3740
|
H("Microphone stream not available."), L("permissionDenied");
|
|
@@ -3762,7 +3772,7 @@ function A7(e) {
|
|
|
3762
3772
|
var R;
|
|
3763
3773
|
L("processing");
|
|
3764
3774
|
const l = [...Y.current];
|
|
3765
|
-
|
|
3775
|
+
Z(l);
|
|
3766
3776
|
const N = new Blob(l, {
|
|
3767
3777
|
type: ((R = B.current) == null ? void 0 : R.mimeType) || "audio/webm"
|
|
3768
3778
|
});
|
|
@@ -3780,9 +3790,9 @@ function A7(e) {
|
|
|
3780
3790
|
}
|
|
3781
3791
|
try {
|
|
3782
3792
|
const D = await N.arrayBuffer(), z = await b.current.decodeAudioData(D), X = r7(z);
|
|
3783
|
-
|
|
3784
|
-
const
|
|
3785
|
-
I(
|
|
3793
|
+
x(X);
|
|
3794
|
+
const O1 = URL.createObjectURL(X);
|
|
3795
|
+
I(O1), r == null || r({
|
|
3786
3796
|
wavBlob: X,
|
|
3787
3797
|
audioChunks: l,
|
|
3788
3798
|
duration: T
|
|
@@ -3793,7 +3803,7 @@ function A7(e) {
|
|
|
3793
3803
|
D
|
|
3794
3804
|
);
|
|
3795
3805
|
const z = URL.createObjectURL(N);
|
|
3796
|
-
I(z),
|
|
3806
|
+
I(z), x(null), r == null || r({
|
|
3797
3807
|
wavBlob: null,
|
|
3798
3808
|
audioChunks: l,
|
|
3799
3809
|
duration: T
|
|
@@ -3806,8 +3816,8 @@ function A7(e) {
|
|
|
3806
3816
|
H("Failed to start recording.", o);
|
|
3807
3817
|
}
|
|
3808
3818
|
}, [
|
|
3809
|
-
|
|
3810
|
-
|
|
3819
|
+
u,
|
|
3820
|
+
k,
|
|
3811
3821
|
Q,
|
|
3812
3822
|
a,
|
|
3813
3823
|
f,
|
|
@@ -3817,26 +3827,26 @@ function A7(e) {
|
|
|
3817
3827
|
T
|
|
3818
3828
|
]), p = m(() => {
|
|
3819
3829
|
var s;
|
|
3820
|
-
|
|
3821
|
-
}, [
|
|
3830
|
+
u === "recording" && ((s = B.current) == null ? void 0 : s.state) === "recording" && (B.current.pause(), L("paused"), c());
|
|
3831
|
+
}, [u, L]), M = m(() => {
|
|
3822
3832
|
var s;
|
|
3823
|
-
|
|
3824
|
-
}, [
|
|
3833
|
+
u === "paused" && ((s = B.current) == null ? void 0 : s.state) === "paused" && (B.current.resume(), L("recording"), _());
|
|
3834
|
+
}, [u, L]), V = m(async () => {
|
|
3825
3835
|
var s, o;
|
|
3826
|
-
(
|
|
3827
|
-
}, [
|
|
3836
|
+
(u === "recording" || u === "paused") && ((s = B.current) == null ? void 0 : s.state) !== "inactive" && (L("stopping"), (o = B.current) == null || o.stop(), c());
|
|
3837
|
+
}, [u, L]);
|
|
3828
3838
|
return {
|
|
3829
|
-
recordingState:
|
|
3839
|
+
recordingState: u,
|
|
3830
3840
|
duration: T,
|
|
3831
3841
|
audioChunks: K,
|
|
3832
|
-
finalWavBlob:
|
|
3833
|
-
audioURL:
|
|
3842
|
+
finalWavBlob: A,
|
|
3843
|
+
audioURL: k,
|
|
3834
3844
|
errorMessage: S,
|
|
3835
3845
|
isMicrophoneAvailable: s1,
|
|
3836
3846
|
actions: {
|
|
3837
|
-
start:
|
|
3847
|
+
start: w,
|
|
3838
3848
|
pause: p,
|
|
3839
|
-
resume:
|
|
3849
|
+
resume: M,
|
|
3840
3850
|
stop: V,
|
|
3841
3851
|
requestPermission: Q,
|
|
3842
3852
|
reset: d
|
|
@@ -3875,7 +3885,7 @@ export {
|
|
|
3875
3885
|
Y6 as U,
|
|
3876
3886
|
N1 as a,
|
|
3877
3887
|
T1 as b,
|
|
3878
|
-
|
|
3888
|
+
w7 as c,
|
|
3879
3889
|
C1 as d,
|
|
3880
3890
|
k7 as e,
|
|
3881
3891
|
C7 as f,
|
|
@@ -3888,11 +3898,11 @@ export {
|
|
|
3888
3898
|
Z7 as m,
|
|
3889
3899
|
x7 as n,
|
|
3890
3900
|
o1 as o,
|
|
3891
|
-
|
|
3901
|
+
u7 as p,
|
|
3892
3902
|
y7 as q,
|
|
3893
3903
|
A7 as r,
|
|
3894
3904
|
m7 as s,
|
|
3895
|
-
|
|
3905
|
+
u1 as t,
|
|
3896
3906
|
d7 as u,
|
|
3897
3907
|
f1 as v,
|
|
3898
3908
|
F1 as w,
|
|
@@ -3900,4 +3910,4 @@ export {
|
|
|
3900
3910
|
n7 as y,
|
|
3901
3911
|
o7 as z
|
|
3902
3912
|
};
|
|
3903
|
-
//# sourceMappingURL=useCustomNavigate-
|
|
3913
|
+
//# sourceMappingURL=useCustomNavigate-cbfd6f87.js.map
|