tanya-chatbot 0.2.1 → 0.2.2
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/tanya-chatbot.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect as lt, forwardRef as mr, useState as L, createElement as fe, useRef as
|
|
1
|
+
import { useEffect as lt, forwardRef as mr, useState as L, createElement as fe, useRef as Ot } from "react";
|
|
2
2
|
import { jsx as l, jsxs as p, Fragment as pe } from "react/jsx-runtime";
|
|
3
3
|
import { createHttpLink as Xr, ApolloClient as Zr, InMemoryCache as tn, ApolloProvider as en } from "@apollo/client";
|
|
4
4
|
import { Provider as rn, useDispatch as gr, useSelector as Wt } from "react-redux";
|
|
@@ -126,7 +126,7 @@ const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
126
126
|
return z.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
async function
|
|
129
|
+
async function Nt() {
|
|
130
130
|
const t = localStorage.getItem("expires_in"), e = localStorage.getItem("access_token"), r = JSON.parse(
|
|
131
131
|
sessionStorage.getItem("customerData") || "{}"
|
|
132
132
|
).isGuest;
|
|
@@ -157,8 +157,8 @@ const ut = () => sessionStorage.getItem("Host"), et = () => sessionStorage.getIt
|
|
|
157
157
|
let n = "";
|
|
158
158
|
{
|
|
159
159
|
n = await Se();
|
|
160
|
-
const { access_token: o } = await
|
|
161
|
-
console.log("the token from getSearchResults",
|
|
160
|
+
const { access_token: o } = await Nt();
|
|
161
|
+
console.log("the token from getSearchResults", await Nt()), n = o;
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
164
|
const o = ut();
|
|
@@ -178,7 +178,7 @@ const ut = () => sessionStorage.getItem("Host"), et = () => sessionStorage.getIt
|
|
|
178
178
|
if (!t) throw new Error("Product ID is required");
|
|
179
179
|
const { serverUrl: e, basePath: r } = wt(), n = ut();
|
|
180
180
|
console.log("calling access");
|
|
181
|
-
const { access_token: o } = await
|
|
181
|
+
const { access_token: o } = await Nt();
|
|
182
182
|
return console.log(o), (await z.get(
|
|
183
183
|
`${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
184
184
|
{
|
|
@@ -192,7 +192,7 @@ const ut = () => sessionStorage.getItem("Host"), et = () => sessionStorage.getIt
|
|
|
192
192
|
if (!t) throw new Error("customerId is required");
|
|
193
193
|
const e = await Se(), { customer_token: r } = await vr(
|
|
194
194
|
e
|
|
195
|
-
), { serverUrl: n, basePath: o } = wt(), a = (await
|
|
195
|
+
), { serverUrl: n, basePath: o } = wt(), a = (await Nt()).access_token;
|
|
196
196
|
return (await z.get(
|
|
197
197
|
`${n}${o}/get-interest?baseUrl=${ut()}&customerId=${t}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
|
|
198
198
|
{
|
|
@@ -315,7 +315,7 @@ function vn(t, e) {
|
|
|
315
315
|
missing: /* @__PURE__ */ new Set()
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Et(t, e) {
|
|
319
319
|
const r = He[t] || (He[t] = /* @__PURE__ */ Object.create(null));
|
|
320
320
|
return r[e] || (r[e] = vn(t, e));
|
|
321
321
|
}
|
|
@@ -366,26 +366,26 @@ const Fr = /^[a-z0-9]+(-[a-z0-9]+)*$/, ee = (t, e, r, n = "") => {
|
|
|
366
366
|
}
|
|
367
367
|
return null;
|
|
368
368
|
}, Jt = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
|
|
369
|
-
let
|
|
369
|
+
let Mt = !1;
|
|
370
370
|
function Nr(t) {
|
|
371
|
-
return typeof t == "boolean" && (
|
|
371
|
+
return typeof t == "boolean" && (Mt = t), Mt;
|
|
372
372
|
}
|
|
373
373
|
function Ve(t) {
|
|
374
|
-
const e = typeof t == "string" ? ee(t, !0,
|
|
374
|
+
const e = typeof t == "string" ? ee(t, !0, Mt) : t;
|
|
375
375
|
if (e) {
|
|
376
|
-
const r =
|
|
376
|
+
const r = Et(e.provider, e.prefix), n = e.name;
|
|
377
377
|
return r.icons[n] || (r.missing.has(n) ? null : void 0);
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
function Sn(t, e) {
|
|
381
|
-
const r = ee(t, !0,
|
|
381
|
+
const r = ee(t, !0, Mt);
|
|
382
382
|
if (!r) return !1;
|
|
383
|
-
const n =
|
|
383
|
+
const n = Et(r.provider, r.prefix);
|
|
384
384
|
return e ? kn(n, r.name, e) : (n.missing.add(r.name), !0);
|
|
385
385
|
}
|
|
386
386
|
function In(t, e) {
|
|
387
387
|
if (typeof t != "object") return !1;
|
|
388
|
-
if (typeof e != "string" && (e = t.provider || ""),
|
|
388
|
+
if (typeof e != "string" && (e = t.provider || ""), Mt && !e && !t.prefix) {
|
|
389
389
|
let o = !1;
|
|
390
390
|
return Cr(t) && (t.prefix = "", Ir(t, (i, a) => {
|
|
391
391
|
Sn(i, a) && (o = !0);
|
|
@@ -396,7 +396,7 @@ function In(t, e) {
|
|
|
396
396
|
prefix: r,
|
|
397
397
|
name: "a"
|
|
398
398
|
})) return !1;
|
|
399
|
-
const n =
|
|
399
|
+
const n = Et(e, r);
|
|
400
400
|
return !!_r(n, t);
|
|
401
401
|
}
|
|
402
402
|
const Er = Object.freeze({
|
|
@@ -532,8 +532,8 @@ function Ce(t) {
|
|
|
532
532
|
dataAfterTimeout: t.dataAfterTimeout !== !1
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
const _e = /* @__PURE__ */ Object.create(null),
|
|
536
|
-
for (;
|
|
535
|
+
const _e = /* @__PURE__ */ Object.create(null), jt = ["https://api.simplesvg.com", "https://api.unisvg.com"], Kt = [];
|
|
536
|
+
for (; jt.length > 0; ) jt.length === 1 || Math.random() > 0.5 ? Kt.push(jt.shift()) : Kt.push(jt.pop());
|
|
537
537
|
_e[""] = Ce({ resources: ["https://api.iconify.design"].concat(Kt) });
|
|
538
538
|
function Dn(t, e) {
|
|
539
539
|
const r = Ce(e);
|
|
@@ -704,7 +704,7 @@ function Kn(t) {
|
|
|
704
704
|
return t.forEach((o) => {
|
|
705
705
|
if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
|
|
706
706
|
n = o;
|
|
707
|
-
const i = o.provider, a = o.prefix, c = o.name, s = r[i] || (r[i] = /* @__PURE__ */ Object.create(null)), d = s[a] || (s[a] =
|
|
707
|
+
const i = o.provider, a = o.prefix, c = o.name, s = r[i] || (r[i] = /* @__PURE__ */ Object.create(null)), d = s[a] || (s[a] = Et(i, a));
|
|
708
708
|
let f;
|
|
709
709
|
c in d.icons ? f = e.loaded : a === "" || d.missing.has(c) ? f = e.missing : f = e.pending;
|
|
710
710
|
const h = {
|
|
@@ -906,7 +906,7 @@ function eo(t) {
|
|
|
906
906
|
invalid: r
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function $t(t, e, r) {
|
|
910
910
|
function n() {
|
|
911
911
|
const o = t.pendingIcons;
|
|
912
912
|
e.forEach((i) => {
|
|
@@ -938,7 +938,7 @@ function ro(t, e) {
|
|
|
938
938
|
const i = t.loadIcon;
|
|
939
939
|
if (t.loadIcons && (o.length > 1 || !i)) {
|
|
940
940
|
We(t.loadIcons(o, n, r), (f) => {
|
|
941
|
-
|
|
941
|
+
$t(t, o, f);
|
|
942
942
|
});
|
|
943
943
|
return;
|
|
944
944
|
}
|
|
@@ -950,21 +950,21 @@ function ro(t, e) {
|
|
|
950
950
|
prefix: n,
|
|
951
951
|
icons: { [f]: m }
|
|
952
952
|
} : null;
|
|
953
|
-
|
|
953
|
+
$t(t, [f], g);
|
|
954
954
|
});
|
|
955
955
|
});
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
958
|
const { valid: a, invalid: c } = eo(o);
|
|
959
|
-
if (c.length &&
|
|
959
|
+
if (c.length && $t(t, c, null), !a.length) return;
|
|
960
960
|
const s = n.match(Fr) ? we(r) : null;
|
|
961
961
|
if (!s) {
|
|
962
|
-
|
|
962
|
+
$t(t, a, null);
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
965
965
|
s.prepare(r, n, a).forEach((f) => {
|
|
966
966
|
Zn(r, f, (h) => {
|
|
967
|
-
|
|
967
|
+
$t(t, f.icons, h);
|
|
968
968
|
});
|
|
969
969
|
});
|
|
970
970
|
}));
|
|
@@ -984,11 +984,11 @@ const no = (t, e) => {
|
|
|
984
984
|
return n.pending.forEach((s) => {
|
|
985
985
|
const { provider: d, prefix: f } = s;
|
|
986
986
|
if (f === c && d === a) return;
|
|
987
|
-
a = d, c = f, i.push(
|
|
987
|
+
a = d, c = f, i.push(Et(d, f));
|
|
988
988
|
const h = o[d] || (o[d] = /* @__PURE__ */ Object.create(null));
|
|
989
989
|
h[f] || (h[f] = []);
|
|
990
990
|
}), n.pending.forEach((s) => {
|
|
991
|
-
const { provider: d, prefix: f, name: h } = s, m =
|
|
991
|
+
const { provider: d, prefix: f, name: h } = s, m = Et(d, f), g = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
|
|
992
992
|
g.has(h) || (g.add(h), o[d][f].push(h));
|
|
993
993
|
}), i.forEach((s) => {
|
|
994
994
|
const d = o[s.provider][s.prefix];
|
|
@@ -1055,16 +1055,16 @@ function uo(t) {
|
|
|
1055
1055
|
function fo(t) {
|
|
1056
1056
|
return 'url("' + uo(t) + '")';
|
|
1057
1057
|
}
|
|
1058
|
-
let
|
|
1058
|
+
let zt;
|
|
1059
1059
|
function po() {
|
|
1060
1060
|
try {
|
|
1061
|
-
|
|
1061
|
+
zt = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
|
|
1062
1062
|
} catch {
|
|
1063
|
-
|
|
1063
|
+
zt = null;
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
function ho(t) {
|
|
1067
|
-
return
|
|
1067
|
+
return zt === void 0 && po(), zt ? zt.createHTML(t) : t;
|
|
1068
1068
|
}
|
|
1069
1069
|
const jr = {
|
|
1070
1070
|
...Tr,
|
|
@@ -1484,7 +1484,7 @@ const xo = ({
|
|
|
1484
1484
|
} catch (a) {
|
|
1485
1485
|
return z.isAxiosError(a) ? { status: (i = a.response) == null ? void 0 : i.status, data: null } : { status: null, data: null };
|
|
1486
1486
|
}
|
|
1487
|
-
}, er = "sfcc_basket_id", rr = "sfcc_customer_token",
|
|
1487
|
+
}, er = "sfcc_basket_id", rr = "sfcc_customer_token", Ut = "sfcc_token_expiry", ko = 300 * 1e3, At = "1.0.0";
|
|
1488
1488
|
const Ft = (t) => {
|
|
1489
1489
|
try {
|
|
1490
1490
|
t ? localStorage.setItem(er, t) : localStorage.removeItem(er);
|
|
@@ -1496,7 +1496,7 @@ const Ft = (t) => {
|
|
|
1496
1496
|
if (t) {
|
|
1497
1497
|
localStorage.setItem(rr, t);
|
|
1498
1498
|
const e = Date.now() + ko;
|
|
1499
|
-
localStorage.setItem(
|
|
1499
|
+
localStorage.setItem(Ut, e.toString());
|
|
1500
1500
|
} else
|
|
1501
1501
|
localStorage.removeItem(rr);
|
|
1502
1502
|
} catch (e) {
|
|
@@ -1526,13 +1526,13 @@ const Ft = (t) => {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
];
|
|
1528
1528
|
console.log(y, "the product data");
|
|
1529
|
-
const
|
|
1529
|
+
const Pt = JSON.parse(
|
|
1530
1530
|
sessionStorage.getItem("customerData") || "{}"
|
|
1531
|
-
), ht =
|
|
1531
|
+
), ht = Pt == null ? void 0 : Pt.basketId, re = !1, Bt = localStorage.getItem(Ut), rt = Date.now();
|
|
1532
1532
|
if (!re || !Bt || rt >= parseInt(Bt)) {
|
|
1533
1533
|
let R = "";
|
|
1534
1534
|
{
|
|
1535
|
-
const ot = await
|
|
1535
|
+
const ot = await Nt();
|
|
1536
1536
|
console.log("token from auth data"), R = "Bearer " + ot.access_token;
|
|
1537
1537
|
}
|
|
1538
1538
|
if (!R) {
|
|
@@ -1540,7 +1540,7 @@ const Ft = (t) => {
|
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
1542
1542
|
const qt = rt + 300 * 1e3;
|
|
1543
|
-
if (Zt(R), localStorage.setItem(
|
|
1543
|
+
if (Zt(R), localStorage.setItem(Ut, qt.toString()), ht) {
|
|
1544
1544
|
const ot = await Dr({
|
|
1545
1545
|
basketId: ht,
|
|
1546
1546
|
customer_token: R
|
|
@@ -1779,12 +1779,12 @@ const Ft = (t) => {
|
|
|
1779
1779
|
"Niece/Nephew": "his/her niece/nephew",
|
|
1780
1780
|
"My Friends": "his/her friends",
|
|
1781
1781
|
Others: "others"
|
|
1782
|
-
}, n =
|
|
1782
|
+
}, n = Ot(null), o = Ot(null), i = Ot(null), a = Ot(null), [c, s] = L(null), [d, f] = L(!1), [h, m] = L(!1), [g, S] = L(!1), [T, w] = L(!1), [k, M] = L(!1), [O, P] = L(!1), [Q, _] = L(""), [j, V] = L(""), X = (u) => ({
|
|
1783
1783
|
id: u.id,
|
|
1784
1784
|
title: u.name,
|
|
1785
1785
|
image: u.image ?? "",
|
|
1786
1786
|
price: u.price ?? 0
|
|
1787
|
-
}), [U, B] = L([]), yt =
|
|
1787
|
+
}), [U, B] = L([]), yt = Ot(null), y = Wt((u) => u.store.store), Pt = Wt((u) => u.product.product), ht = () => {
|
|
1788
1788
|
S(!0), setTimeout(() => m(!0), 10);
|
|
1789
1789
|
}, re = () => {
|
|
1790
1790
|
m(!1), setTimeout(() => S(!1), 300);
|
|
@@ -1827,7 +1827,7 @@ const Ft = (t) => {
|
|
|
1827
1827
|
return console.error("Error obtaining JWT token:", u), rt = null, R = null, null;
|
|
1828
1828
|
}
|
|
1829
1829
|
}, ne = async () => {
|
|
1830
|
-
const u = await
|
|
1830
|
+
const u = await Nt();
|
|
1831
1831
|
u != null && s(u);
|
|
1832
1832
|
};
|
|
1833
1833
|
lt(() => {
|
|
@@ -1843,9 +1843,9 @@ const Ft = (t) => {
|
|
|
1843
1843
|
).customerId;
|
|
1844
1844
|
return (await hn(u || "")).c_interests;
|
|
1845
1845
|
}, nt = async (u, E) => {
|
|
1846
|
-
console.log("in secondary flow",
|
|
1846
|
+
console.log("in secondary flow", At);
|
|
1847
1847
|
const I = await v();
|
|
1848
|
-
if (console.log(I, "interests of customer",
|
|
1848
|
+
if (console.log(I, "interests of customer", At), !!I)
|
|
1849
1849
|
try {
|
|
1850
1850
|
B(
|
|
1851
1851
|
(K) => K.map(
|
|
@@ -2051,7 +2051,7 @@ const Ft = (t) => {
|
|
|
2051
2051
|
const E = JSON.parse(
|
|
2052
2052
|
sessionStorage.getItem("customerData") || "{}"
|
|
2053
2053
|
);
|
|
2054
|
-
(E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow",
|
|
2054
|
+
(E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow", At), nt(n.current, 0)) : console.log("not running secondary flow", At);
|
|
2055
2055
|
}
|
|
2056
2056
|
P(!1);
|
|
2057
2057
|
}, Kr = async (u, E) => {
|
|
@@ -2072,10 +2072,10 @@ const Ft = (t) => {
|
|
|
2072
2072
|
quantity: E
|
|
2073
2073
|
}
|
|
2074
2074
|
];
|
|
2075
|
-
console.log(G, "product data", "app version",
|
|
2075
|
+
console.log(G, "product data", "app version", At);
|
|
2076
2076
|
const $ = JSON.parse(
|
|
2077
2077
|
sessionStorage.getItem("customerData") || "{}"
|
|
2078
|
-
), q = $ == null ? void 0 : $.basketId, st = !1, Rt = localStorage.getItem(
|
|
2078
|
+
), q = $ == null ? void 0 : $.basketId, st = !1, Rt = localStorage.getItem(Ut), Ae = Date.now();
|
|
2079
2079
|
if (!st || !Rt || Ae >= parseInt(Rt)) {
|
|
2080
2080
|
const Gr = await Se();
|
|
2081
2081
|
let { customer_token: mt } = await vr(
|
|
@@ -2086,7 +2086,7 @@ const Ft = (t) => {
|
|
|
2086
2086
|
return;
|
|
2087
2087
|
}
|
|
2088
2088
|
const Wr = Ae + 300 * 1e3;
|
|
2089
|
-
if (Zt(mt), localStorage.setItem(
|
|
2089
|
+
if (Zt(mt), localStorage.setItem(Ut, Wr.toString()), q) {
|
|
2090
2090
|
const Le = await Dr({
|
|
2091
2091
|
basketId: q,
|
|
2092
2092
|
customer_token: mt
|
|
@@ -2368,7 +2368,7 @@ const Ft = (t) => {
|
|
|
2368
2368
|
/* @__PURE__ */ p(
|
|
2369
2369
|
"div",
|
|
2370
2370
|
{
|
|
2371
|
-
className: `flex flex-col h-full ${
|
|
2371
|
+
className: `flex flex-col h-full ${Pt ? "lg:w-2/3 w-full" : "w-full"}`,
|
|
2372
2372
|
children: [
|
|
2373
2373
|
/* @__PURE__ */ p(
|
|
2374
2374
|
"div",
|
|
@@ -3004,15 +3004,15 @@ function te(t, e) {
|
|
|
3004
3004
|
return r;
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
|
-
function
|
|
3007
|
+
function Lt(t) {
|
|
3008
3008
|
var e = t.constructor;
|
|
3009
3009
|
return e !== void 0 && (e = e[Rr], e === null && (e = void 0)), e !== void 0 ? e : D;
|
|
3010
3010
|
}
|
|
3011
3011
|
function zo(t) {
|
|
3012
3012
|
return t instanceof D;
|
|
3013
3013
|
}
|
|
3014
|
-
function
|
|
3015
|
-
|
|
3014
|
+
function Tt(t) {
|
|
3015
|
+
Tt.log ? Tt.log(t) : setTimeout(function() {
|
|
3016
3016
|
throw t;
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
@@ -3021,7 +3021,7 @@ function Gt(t) {
|
|
|
3021
3021
|
try {
|
|
3022
3022
|
t();
|
|
3023
3023
|
} catch (e) {
|
|
3024
|
-
|
|
3024
|
+
Tt(e);
|
|
3025
3025
|
}
|
|
3026
3026
|
});
|
|
3027
3027
|
}
|
|
@@ -3036,7 +3036,7 @@ function Hr(t) {
|
|
|
3036
3036
|
r && r.call(e);
|
|
3037
3037
|
}
|
|
3038
3038
|
} catch (n) {
|
|
3039
|
-
|
|
3039
|
+
Tt(n);
|
|
3040
3040
|
}
|
|
3041
3041
|
}
|
|
3042
3042
|
function ke(t) {
|
|
@@ -3068,7 +3068,7 @@ function Vr(t, e, r) {
|
|
|
3068
3068
|
break;
|
|
3069
3069
|
}
|
|
3070
3070
|
} catch (i) {
|
|
3071
|
-
|
|
3071
|
+
Tt(i);
|
|
3072
3072
|
}
|
|
3073
3073
|
t._state === "closed" ? Hr(t) : t._state === "running" && (t._state = "ready");
|
|
3074
3074
|
}
|
|
@@ -3168,7 +3168,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3168
3168
|
}, e.map = function(n) {
|
|
3169
3169
|
var o = this;
|
|
3170
3170
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3171
|
-
var i =
|
|
3171
|
+
var i = Lt(this);
|
|
3172
3172
|
return new i(function(a) {
|
|
3173
3173
|
return o.subscribe({
|
|
3174
3174
|
next: function(c) {
|
|
@@ -3190,7 +3190,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3190
3190
|
}, e.filter = function(n) {
|
|
3191
3191
|
var o = this;
|
|
3192
3192
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3193
|
-
var i =
|
|
3193
|
+
var i = Lt(this);
|
|
3194
3194
|
return new i(function(a) {
|
|
3195
3195
|
return o.subscribe({
|
|
3196
3196
|
next: function(c) {
|
|
@@ -3212,7 +3212,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3212
3212
|
}, e.reduce = function(n) {
|
|
3213
3213
|
var o = this;
|
|
3214
3214
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3215
|
-
var i =
|
|
3215
|
+
var i = Lt(this), a = arguments.length > 1, c = !1, s = arguments[1], d = s;
|
|
3216
3216
|
return new i(function(f) {
|
|
3217
3217
|
return o.subscribe({
|
|
3218
3218
|
next: function(h) {
|
|
@@ -3238,7 +3238,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3238
3238
|
}, e.concat = function() {
|
|
3239
3239
|
for (var n = this, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
|
|
3240
3240
|
i[a] = arguments[a];
|
|
3241
|
-
var c =
|
|
3241
|
+
var c = Lt(this);
|
|
3242
3242
|
return new c(function(s) {
|
|
3243
3243
|
var d, f = 0;
|
|
3244
3244
|
function h(m) {
|
|
@@ -3261,7 +3261,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3261
3261
|
}, e.flatMap = function(n) {
|
|
3262
3262
|
var o = this;
|
|
3263
3263
|
if (typeof n != "function") throw new TypeError(n + " is not a function");
|
|
3264
|
-
var i =
|
|
3264
|
+
var i = Lt(this);
|
|
3265
3265
|
return new i(function(a) {
|
|
3266
3266
|
var c = [], s = o.subscribe({
|
|
3267
3267
|
next: function(f) {
|
|
@@ -3360,7 +3360,7 @@ var Uo = /* @__PURE__ */ (function() {
|
|
|
3360
3360
|
Oe() && Object.defineProperty(D, Symbol("extensions"), {
|
|
3361
3361
|
value: {
|
|
3362
3362
|
symbol: ve,
|
|
3363
|
-
hostReportError:
|
|
3363
|
+
hostReportError: Tt
|
|
3364
3364
|
},
|
|
3365
3365
|
configurable: !0
|
|
3366
3366
|
});
|
|
@@ -3434,7 +3434,7 @@ function Wo(t, e) {
|
|
|
3434
3434
|
function hr(t, e) {
|
|
3435
3435
|
return e ? e(t) : D.of();
|
|
3436
3436
|
}
|
|
3437
|
-
function
|
|
3437
|
+
function Dt(t) {
|
|
3438
3438
|
return typeof t == "function" ? new Yr(t) : t;
|
|
3439
3439
|
}
|
|
3440
3440
|
function Yt(t) {
|
|
@@ -3451,11 +3451,11 @@ var Yr = (
|
|
|
3451
3451
|
return D.of();
|
|
3452
3452
|
});
|
|
3453
3453
|
}, t.from = function(e) {
|
|
3454
|
-
return e.length === 0 ? t.empty() : e.map(
|
|
3454
|
+
return e.length === 0 ? t.empty() : e.map(Dt).reduce(function(r, n) {
|
|
3455
3455
|
return r.concat(n);
|
|
3456
3456
|
});
|
|
3457
3457
|
}, t.split = function(e, r, n) {
|
|
3458
|
-
var o =
|
|
3458
|
+
var o = Dt(r), i = Dt(n || new t(hr)), a;
|
|
3459
3459
|
return Yt(o) && Yt(i) ? a = new t(function(c) {
|
|
3460
3460
|
return e(c) ? o.request(c) || D.of() : i.request(c) || D.of();
|
|
3461
3461
|
}) : a = new t(function(c, s) {
|
|
@@ -3464,10 +3464,10 @@ var Yr = (
|
|
|
3464
3464
|
}, t.execute = function(e, r) {
|
|
3465
3465
|
return e.request(Ho(r.context, Vo(Ro(r)))) || D.of();
|
|
3466
3466
|
}, t.concat = function(e, r) {
|
|
3467
|
-
var n =
|
|
3467
|
+
var n = Dt(e);
|
|
3468
3468
|
if (Yt(n))
|
|
3469
3469
|
return globalThis.__DEV__ !== !1 && le.warn(47, n), n;
|
|
3470
|
-
var o =
|
|
3470
|
+
var o = Dt(r), i;
|
|
3471
3471
|
return Yt(o) ? i = new t(function(a) {
|
|
3472
3472
|
return n.request(a, function(c) {
|
|
3473
3473
|
return o.request(c) || D.of();
|