@revenuecat/purchases-js 0.0.13 → 0.0.14
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/Purchases.es.d.ts +7 -7
- package/dist/Purchases.es.js +153 -153
- package/dist/Purchases.umd.js +2 -2
- package/package.json +1 -1
package/dist/Purchases.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var vt = Object.defineProperty;
|
|
2
2
|
var Mt = (t, e, r) => e in t ? vt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
4
|
-
function
|
|
3
|
+
var T = (t, e, r) => (Mt(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
function Tt(t) {
|
|
5
5
|
return t != null;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var Pt = /* @__PURE__ */ ((t) => (t.Unknown = "unknown", t.Custom = "custom", t.Lifetime = "$rc_lifetime", t.Annual = "$rc_annual", t.SixMonth = "$rc_six_month", t.ThreeMonth = "$rc_three_month", t.TwoMonth = "$rc_two_month", t.Monthly = "$rc_monthly", t.Weekly = "$rc_weekly", t))(Pt || {});
|
|
8
8
|
const Nt = (t, e) => ({
|
|
9
9
|
identifier: t.identifier,
|
|
10
10
|
displayName: t.title,
|
|
@@ -21,7 +21,7 @@ const Nt = (t, e) => ({
|
|
|
21
21
|
}, Fe = (t, e) => {
|
|
22
22
|
const r = t.packages.map(
|
|
23
23
|
(i) => Rt(t.identifier, i, e)
|
|
24
|
-
).filter(
|
|
24
|
+
).filter(Tt), n = {};
|
|
25
25
|
for (const i of r)
|
|
26
26
|
i != null && (n[i.identifier] = i);
|
|
27
27
|
return r.length == 0 ? null : {
|
|
@@ -30,13 +30,13 @@ const Nt = (t, e) => ({
|
|
|
30
30
|
metadata: t.metadata,
|
|
31
31
|
packagesById: n,
|
|
32
32
|
availablePackages: r,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
lifetime: n.$rc_lifetime ?? null,
|
|
34
|
+
annual: n.$rc_annual ?? null,
|
|
35
|
+
sixMonth: n.$rc_six_month ?? null,
|
|
36
|
+
threeMonth: n.$rc_three_month ?? null,
|
|
37
|
+
twoMonth: n.$rc_two_month ?? null,
|
|
38
|
+
monthly: n.$rc_monthly ?? null,
|
|
39
|
+
weekly: n.$rc_weekly ?? null
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
function Ct(t) {
|
|
@@ -186,7 +186,7 @@ function $(t) {
|
|
|
186
186
|
function L(t) {
|
|
187
187
|
return document.createTextNode(t);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function P() {
|
|
190
190
|
return L(" ");
|
|
191
191
|
}
|
|
192
192
|
function z() {
|
|
@@ -274,7 +274,7 @@ function dt(t, e) {
|
|
|
274
274
|
const r = t.$$.callbacks[e.type];
|
|
275
275
|
r && r.slice().forEach((n) => n.call(this, e));
|
|
276
276
|
}
|
|
277
|
-
const te = [],
|
|
277
|
+
const te = [], Be = [];
|
|
278
278
|
let re = [];
|
|
279
279
|
const Ce = [], zt = /* @__PURE__ */ Promise.resolve();
|
|
280
280
|
let Ue = !1;
|
|
@@ -287,7 +287,7 @@ function Oe(t) {
|
|
|
287
287
|
function Zt(t) {
|
|
288
288
|
Ce.push(t);
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const Pe = /* @__PURE__ */ new Set();
|
|
291
291
|
let Z = 0;
|
|
292
292
|
function mt() {
|
|
293
293
|
if (Z !== 0)
|
|
@@ -302,17 +302,17 @@ function mt() {
|
|
|
302
302
|
} catch (e) {
|
|
303
303
|
throw te.length = 0, Z = 0, e;
|
|
304
304
|
}
|
|
305
|
-
for (ue(null), te.length = 0, Z = 0;
|
|
306
|
-
|
|
305
|
+
for (ue(null), te.length = 0, Z = 0; Be.length; )
|
|
306
|
+
Be.pop()();
|
|
307
307
|
for (let e = 0; e < re.length; e += 1) {
|
|
308
308
|
const r = re[e];
|
|
309
|
-
|
|
309
|
+
Pe.has(r) || (Pe.add(r), r());
|
|
310
310
|
}
|
|
311
311
|
re.length = 0;
|
|
312
312
|
} while (te.length);
|
|
313
313
|
for (; Ce.length; )
|
|
314
314
|
Ce.pop()();
|
|
315
|
-
Ue = !1,
|
|
315
|
+
Ue = !1, Pe.clear(), ue(t);
|
|
316
316
|
}
|
|
317
317
|
function en(t) {
|
|
318
318
|
if (t.fragment !== null) {
|
|
@@ -398,9 +398,9 @@ function C(t, e, r, n, i, l, s = null, o = [-1]) {
|
|
|
398
398
|
};
|
|
399
399
|
s && s(u.root);
|
|
400
400
|
let _ = !1;
|
|
401
|
-
if (u.ctx = r ? r(t, e.props || {}, (m,
|
|
402
|
-
const E =
|
|
403
|
-
return u.ctx && i(u.ctx[m], u.ctx[m] = E) && (!u.skip_bound && u.bound[m] && u.bound[m](E), _ && rn(t, m)),
|
|
401
|
+
if (u.ctx = r ? r(t, e.props || {}, (m, B, ...k) => {
|
|
402
|
+
const E = k.length ? k[0] : B;
|
|
403
|
+
return u.ctx && i(u.ctx[m], u.ctx[m] = E) && (!u.skip_bound && u.bound[m] && u.bound[m](E), _ && rn(t, m)), B;
|
|
404
404
|
}) : [], u.update(), _ = !0, ge(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
405
405
|
if (e.hydrate) {
|
|
406
406
|
const m = Jt(e.target);
|
|
@@ -420,7 +420,7 @@ class U {
|
|
|
420
420
|
*
|
|
421
421
|
* @type {any}
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
T(this, "$$");
|
|
424
424
|
/**
|
|
425
425
|
* ### PRIVATE API
|
|
426
426
|
*
|
|
@@ -428,7 +428,7 @@ class U {
|
|
|
428
428
|
*
|
|
429
429
|
* @type {any}
|
|
430
430
|
*/
|
|
431
|
-
|
|
431
|
+
T(this, "$$set");
|
|
432
432
|
}
|
|
433
433
|
/** @returns {void} */
|
|
434
434
|
$destroy() {
|
|
@@ -625,16 +625,16 @@ function gn(t) {
|
|
|
625
625
|
t[0].currentPrice.amount,
|
|
626
626
|
/*productDetails*/
|
|
627
627
|
t[0].currentPrice.currency
|
|
628
|
-
) + "",
|
|
628
|
+
) + "", B, k, E, y, v = je(
|
|
629
629
|
/*productDetails*/
|
|
630
630
|
t[0].normalPeriodDuration
|
|
631
631
|
) + "", N;
|
|
632
632
|
return {
|
|
633
633
|
c() {
|
|
634
|
-
e = $("div"), r = $("span"), i = L(n), l =
|
|
634
|
+
e = $("div"), r = $("span"), i = L(n), l = P(), s = $("span"), c = L(o), _ = L(u), B = L(m), k = P(), E = $("span"), y = L("Billed "), N = L(v), h(s, "class", "rcb-product-price svelte-1oa6nu8"), h(E, "class", "rcb-product-duration svelte-1oa6nu8"), h(e, "class", "rcb-pricing-info svelte-1oa6nu8");
|
|
635
635
|
},
|
|
636
636
|
m(d, p) {
|
|
637
|
-
A(d, e, p), M(e, r), M(r, i), M(e, l), M(e, s), M(s, c), M(s, _), M(s,
|
|
637
|
+
A(d, e, p), M(e, r), M(r, i), M(e, l), M(e, s), M(s, c), M(s, _), M(s, B), M(e, k), M(e, E), M(E, y), M(E, N);
|
|
638
638
|
},
|
|
639
639
|
p(d, p) {
|
|
640
640
|
p & /*productDetails*/
|
|
@@ -647,7 +647,7 @@ function gn(t) {
|
|
|
647
647
|
d[0].currentPrice.amount,
|
|
648
648
|
/*productDetails*/
|
|
649
649
|
d[0].currentPrice.currency
|
|
650
|
-
) + "") && ne(
|
|
650
|
+
) + "") && ne(B, m), p & /*productDetails*/
|
|
651
651
|
1 && v !== (v = je(
|
|
652
652
|
/*productDetails*/
|
|
653
653
|
d[0].normalPeriodDuration
|
|
@@ -759,10 +759,10 @@ class Y extends Error {
|
|
|
759
759
|
}
|
|
760
760
|
class bn {
|
|
761
761
|
constructor(e, r = 10) {
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
762
|
+
T(this, "operationSessionId", null);
|
|
763
|
+
T(this, "backend");
|
|
764
|
+
T(this, "maxNumberAttempts");
|
|
765
|
+
T(this, "waitMSBetweenAttempts", 1e3);
|
|
766
766
|
this.backend = e, this.maxNumberAttempts = r;
|
|
767
767
|
}
|
|
768
768
|
async startPurchase(e, r, n) {
|
|
@@ -865,7 +865,7 @@ class bn {
|
|
|
865
865
|
function $n(t) {
|
|
866
866
|
S(t, "svelte-igat39", "button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:black;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:white;font-size:1rem}");
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Bn(t) {
|
|
869
869
|
let e, r, n, i, l;
|
|
870
870
|
const s = (
|
|
871
871
|
/*#slots*/
|
|
@@ -927,7 +927,7 @@ function kn(t) {
|
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function kn(t, e, r) {
|
|
931
931
|
let { $$slots: n = {}, $$scope: i } = e, { intent: l = "primary" } = e, { disabled: s = !1 } = e;
|
|
932
932
|
function o(c) {
|
|
933
933
|
dt.call(this, t, c);
|
|
@@ -938,7 +938,7 @@ function Bn(t, e, r) {
|
|
|
938
938
|
}
|
|
939
939
|
class me extends U {
|
|
940
940
|
constructor(e) {
|
|
941
|
-
super(), C(this, e,
|
|
941
|
+
super(), C(this, e, kn, Bn, R, { intent: 0, disabled: 1 }, $n);
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
function yn(t) {
|
|
@@ -1010,7 +1010,7 @@ const vn = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
1010
1010
|
function Mn(t) {
|
|
1011
1011
|
S(t, "svelte-7khg4b", "img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}");
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function Tn(t) {
|
|
1014
1014
|
let e, r;
|
|
1015
1015
|
return {
|
|
1016
1016
|
c() {
|
|
@@ -1027,9 +1027,9 @@ function Pn(t) {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
};
|
|
1029
1029
|
}
|
|
1030
|
-
class
|
|
1030
|
+
class Pn extends U {
|
|
1031
1031
|
constructor(e) {
|
|
1032
|
-
super(), C(this, e, null,
|
|
1032
|
+
super(), C(this, e, null, Tn, R, {}, Mn);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
function Nn(t) {
|
|
@@ -1167,7 +1167,7 @@ function Hn(t) {
|
|
|
1167
1167
|
let e, r, n, i, l, s;
|
|
1168
1168
|
return {
|
|
1169
1169
|
c() {
|
|
1170
|
-
e = $("picture"), r = $("source"), i =
|
|
1170
|
+
e = $("picture"), r = $("source"), i = P(), l = $("img"), h(r, "type", "image/webp"), Ot(r, n = /*srcWebp*/
|
|
1171
1171
|
t[1]) || h(r, "srcset", n), h(l, "class", "rcb-app-icon svelte-10u48yl"), x(l.src, s = /*src*/
|
|
1172
1172
|
t[0]) || h(l, "src", s), h(l, "alt", "App icon"), h(e, "class", "rcb-app-icon-picture-container svelte-10u48yl");
|
|
1173
1173
|
},
|
|
@@ -1259,7 +1259,7 @@ function Vn(t) {
|
|
|
1259
1259
|
);
|
|
1260
1260
|
return {
|
|
1261
1261
|
c() {
|
|
1262
|
-
s && s.c(), e =
|
|
1262
|
+
s && s.c(), e = P(), r = $("span"), i = L(n), h(r, "class", "app-title svelte-1tdgim9");
|
|
1263
1263
|
},
|
|
1264
1264
|
m(o, c) {
|
|
1265
1265
|
s && s.m(o, c), A(o, e, c), A(o, r, c), M(r, i), l = !0;
|
|
@@ -1389,7 +1389,7 @@ function Xn(t) {
|
|
|
1389
1389
|
) && t[1].apply(this, arguments);
|
|
1390
1390
|
}), {
|
|
1391
1391
|
c() {
|
|
1392
|
-
e = $("div"), b(r.$$.fragment), n =
|
|
1392
|
+
e = $("div"), b(r.$$.fragment), n = P(), b(i.$$.fragment), h(e, "class", "rcb-post-purchase-header-layout svelte-j03lz1");
|
|
1393
1393
|
},
|
|
1394
1394
|
m(s, o) {
|
|
1395
1395
|
A(s, e, o), I(r, e, null), M(e, n), I(i, e, null), l = !0;
|
|
@@ -1495,7 +1495,7 @@ function nr(t) {
|
|
|
1495
1495
|
);
|
|
1496
1496
|
return {
|
|
1497
1497
|
c() {
|
|
1498
|
-
e = $("span"), e.textContent = "Something went wrong.", r =
|
|
1498
|
+
e = $("span"), e.textContent = "Something went wrong.", r = P(), n = $("span"), l = L(i), s = P(), o && o.c(), h(e, "class", "title svelte-ahi052"), h(n, "class", "subtitle svelte-ahi052");
|
|
1499
1499
|
},
|
|
1500
1500
|
m(c, u) {
|
|
1501
1501
|
A(c, e, u), A(c, r, u), A(c, n, u), M(n, l), M(n, s), o && o.m(n, null);
|
|
@@ -1511,7 +1511,7 @@ function nr(t) {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
function rr(t) {
|
|
1513
1513
|
let e, r, n, i;
|
|
1514
|
-
return e = new
|
|
1514
|
+
return e = new Pn({}), n = new X({
|
|
1515
1515
|
props: {
|
|
1516
1516
|
gutter: "1rem",
|
|
1517
1517
|
$$slots: { default: [nr] },
|
|
@@ -1519,7 +1519,7 @@ function rr(t) {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}), {
|
|
1521
1521
|
c() {
|
|
1522
|
-
b(e.$$.fragment), r =
|
|
1522
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment);
|
|
1523
1523
|
},
|
|
1524
1524
|
m(l, s) {
|
|
1525
1525
|
I(e, l, s), A(l, r, s), I(n, l, s), i = !0;
|
|
@@ -1646,7 +1646,7 @@ function or(t) {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
}), {
|
|
1648
1648
|
c() {
|
|
1649
|
-
b(e.$$.fragment), r =
|
|
1649
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment), i = P(), b(l.$$.fragment);
|
|
1650
1650
|
},
|
|
1651
1651
|
m(o, c) {
|
|
1652
1652
|
I(e, o, c), A(o, r, c), I(n, o, c), A(o, i, c), I(l, o, c), s = !0;
|
|
@@ -1784,7 +1784,7 @@ function _r(t) {
|
|
|
1784
1784
|
let e, r, n;
|
|
1785
1785
|
return {
|
|
1786
1786
|
c() {
|
|
1787
|
-
e = $("span"), e.textContent = "Purchase Successful", r =
|
|
1787
|
+
e = $("span"), e.textContent = "Purchase Successful", r = P(), n = $("span"), n.textContent = "Your plan is now active.", h(e, "class", "title svelte-1lcsna9"), h(n, "class", "subtitle svelte-1lcsna9");
|
|
1788
1788
|
},
|
|
1789
1789
|
m(i, l) {
|
|
1790
1790
|
A(i, e, l), A(i, r, l), A(i, n, l);
|
|
@@ -1805,7 +1805,7 @@ function pr(t) {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
}), {
|
|
1807
1807
|
c() {
|
|
1808
|
-
b(e.$$.fragment), r =
|
|
1808
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment);
|
|
1809
1809
|
},
|
|
1810
1810
|
m(l, s) {
|
|
1811
1811
|
I(e, l, s), A(l, r, s), I(n, l, s), i = !0;
|
|
@@ -1932,7 +1932,7 @@ function wr(t) {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
}), {
|
|
1934
1934
|
c() {
|
|
1935
|
-
b(e.$$.fragment), r =
|
|
1935
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment), i = P(), b(l.$$.fragment);
|
|
1936
1936
|
},
|
|
1937
1937
|
m(o, c) {
|
|
1938
1938
|
I(e, o, c), A(o, r, c), I(n, o, c), A(o, i, c), I(l, o, c), s = !0;
|
|
@@ -1999,12 +1999,12 @@ function $r(t, e, r) {
|
|
|
1999
1999
|
"brandingInfo" in l && r(0, n = l.brandingInfo), "onContinue" in l && r(1, i = l.onContinue);
|
|
2000
2000
|
}, [n, i];
|
|
2001
2001
|
}
|
|
2002
|
-
class
|
|
2002
|
+
class Br extends U {
|
|
2003
2003
|
constructor(e) {
|
|
2004
2004
|
super(), C(this, e, $r, br, R, { brandingInfo: 0, onContinue: 1 }, Ar);
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function kr(t, e, r, n, i = {}) {
|
|
2008
2008
|
const l = r.create(e, i);
|
|
2009
2009
|
return l.mount(t), l.on("change", (s) => n("change", s)), l.on("ready", (s) => n("ready", s)), l.on("focus", (s) => n("focus", s)), l.on("blur", (s) => n("blur", s)), l.on("escape", (s) => n("escape", s)), l.on("click", (s) => n("click", s)), l.on("loaderror", (s) => n("loaderror", s)), l.on("loaderstart", (s) => n("loaderstart", s)), l.on("networkschange", (s) => n("networkschange", s)), l;
|
|
2010
2010
|
}
|
|
@@ -2037,7 +2037,7 @@ function vr(t, e, r) {
|
|
|
2037
2037
|
let n, i;
|
|
2038
2038
|
const l = Vt(), { elements: s } = Wt("stripe");
|
|
2039
2039
|
let { options: o = void 0 } = e;
|
|
2040
|
-
De(() => (n =
|
|
2040
|
+
De(() => (n = kr(i, "payment", s, l, o), () => n.destroy()));
|
|
2041
2041
|
function c() {
|
|
2042
2042
|
n.blur();
|
|
2043
2043
|
}
|
|
@@ -2050,14 +2050,14 @@ function vr(t, e, r) {
|
|
|
2050
2050
|
function m() {
|
|
2051
2051
|
n.focus();
|
|
2052
2052
|
}
|
|
2053
|
-
function k
|
|
2054
|
-
|
|
2055
|
-
i =
|
|
2053
|
+
function B(k) {
|
|
2054
|
+
Be[k ? "unshift" : "push"](() => {
|
|
2055
|
+
i = k, r(0, i);
|
|
2056
2056
|
});
|
|
2057
2057
|
}
|
|
2058
|
-
return t.$$set = (
|
|
2059
|
-
"options" in
|
|
2060
|
-
}, [i, o, c, u, _, m,
|
|
2058
|
+
return t.$$set = (k) => {
|
|
2059
|
+
"options" in k && r(1, o = k.options);
|
|
2060
|
+
}, [i, o, c, u, _, m, B];
|
|
2061
2061
|
}
|
|
2062
2062
|
class Mr extends U {
|
|
2063
2063
|
constructor(e) {
|
|
@@ -2133,7 +2133,7 @@ function Ve(t) {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
};
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2136
|
+
function Tr(t) {
|
|
2137
2137
|
let e, r, n = (
|
|
2138
2138
|
/*stripe*/
|
|
2139
2139
|
t[1] && /*elements*/
|
|
@@ -2165,10 +2165,10 @@ function Pr(t) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
};
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2169
|
-
let n, { $$slots: i = {}, $$scope: l } = e, { stripe: s } = e, { mode: o = void 0 } = e, { theme: c = "stripe" } = e, { variables: u = {} } = e, { rules: _ = {} } = e, { labels: m = "above" } = e, { loader:
|
|
2168
|
+
function Pr(t, e, r) {
|
|
2169
|
+
let n, { $$slots: i = {}, $$scope: l } = e, { stripe: s } = e, { mode: o = void 0 } = e, { theme: c = "stripe" } = e, { variables: u = {} } = e, { rules: _ = {} } = e, { labels: m = "above" } = e, { loader: B = "auto" } = e, { fonts: k = [] } = e, { locale: E = "auto" } = e, { currency: y = void 0 } = e, { amount: v = void 0 } = e, { clientSecret: N = void 0 } = e, { elements: d = null } = e;
|
|
2170
2170
|
return t.$$set = (p) => {
|
|
2171
|
-
"stripe" in p && r(1, s = p.stripe), "mode" in p && r(2, o = p.mode), "theme" in p && r(3, c = p.theme), "variables" in p && r(4, u = p.variables), "rules" in p && r(5, _ = p.rules), "labels" in p && r(6, m = p.labels), "loader" in p && r(7,
|
|
2171
|
+
"stripe" in p && r(1, s = p.stripe), "mode" in p && r(2, o = p.mode), "theme" in p && r(3, c = p.theme), "variables" in p && r(4, u = p.variables), "rules" in p && r(5, _ = p.rules), "labels" in p && r(6, m = p.labels), "loader" in p && r(7, B = p.loader), "fonts" in p && r(8, k = p.fonts), "locale" in p && r(9, E = p.locale), "currency" in p && r(10, y = p.currency), "amount" in p && r(11, v = p.amount), "clientSecret" in p && r(12, N = p.clientSecret), "elements" in p && r(0, d = p.elements), "$$scope" in p && r(14, l = p.$$scope);
|
|
2172
2172
|
}, t.$$.update = () => {
|
|
2173
2173
|
t.$$.dirty & /*theme, variables, rules, labels*/
|
|
2174
2174
|
120 && r(13, n = { theme: c, variables: u, rules: _, labels: m }), t.$$.dirty & /*stripe, elements, mode, currency, amount, appearance, clientSecret, fonts, loader, locale*/
|
|
@@ -2178,8 +2178,8 @@ function Tr(t, e, r) {
|
|
|
2178
2178
|
amount: v,
|
|
2179
2179
|
appearance: n,
|
|
2180
2180
|
clientSecret: N,
|
|
2181
|
-
fonts:
|
|
2182
|
-
loader:
|
|
2181
|
+
fonts: k,
|
|
2182
|
+
loader: B,
|
|
2183
2183
|
locale: E
|
|
2184
2184
|
})), Dr(s), qt("stripe", { stripe: s, elements: d })), t.$$.dirty & /*elements, appearance, locale*/
|
|
2185
2185
|
8705 && d && d.update({ appearance: n, locale: E });
|
|
@@ -2191,8 +2191,8 @@ function Tr(t, e, r) {
|
|
|
2191
2191
|
u,
|
|
2192
2192
|
_,
|
|
2193
2193
|
m,
|
|
2194
|
-
k,
|
|
2195
2194
|
B,
|
|
2195
|
+
k,
|
|
2196
2196
|
E,
|
|
2197
2197
|
y,
|
|
2198
2198
|
v,
|
|
@@ -2204,7 +2204,7 @@ function Tr(t, e, r) {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
class Nr extends U {
|
|
2206
2206
|
constructor(e) {
|
|
2207
|
-
super(), C(this, e,
|
|
2207
|
+
super(), C(this, e, Pr, Tr, R, {
|
|
2208
2208
|
stripe: 1,
|
|
2209
2209
|
mode: 2,
|
|
2210
2210
|
theme: 3,
|
|
@@ -2346,7 +2346,7 @@ function Kr(t) {
|
|
|
2346
2346
|
return (
|
|
2347
2347
|
/*elements*/
|
|
2348
2348
|
t[1] !== void 0 && (c.elements = /*elements*/
|
|
2349
|
-
t[1]), r = new Nr({ props: c }),
|
|
2349
|
+
t[1]), r = new Nr({ props: c }), Be.push(() => nn(r, "elements", o)), {
|
|
2350
2350
|
c() {
|
|
2351
2351
|
e = $("form"), b(r.$$.fragment);
|
|
2352
2352
|
},
|
|
@@ -2492,7 +2492,7 @@ function Wr(t) {
|
|
|
2492
2492
|
) && t[0].apply(this, arguments);
|
|
2493
2493
|
}), {
|
|
2494
2494
|
c() {
|
|
2495
|
-
b(e.$$.fragment), r =
|
|
2495
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment);
|
|
2496
2496
|
},
|
|
2497
2497
|
m(l, s) {
|
|
2498
2498
|
I(e, l, s), A(l, r, s), I(n, l, s), i = !0;
|
|
@@ -2565,7 +2565,7 @@ function Xr(t) {
|
|
|
2565
2565
|
}
|
|
2566
2566
|
}), {
|
|
2567
2567
|
c() {
|
|
2568
|
-
b(e.$$.fragment), r =
|
|
2568
|
+
b(e.$$.fragment), r = P(), b(n.$$.fragment);
|
|
2569
2569
|
},
|
|
2570
2570
|
m(l, s) {
|
|
2571
2571
|
I(e, l, s), A(l, r, s), I(n, l, s), i = !0;
|
|
@@ -2633,7 +2633,7 @@ function ei(t, e, r) {
|
|
|
2633
2633
|
throw new Error("Stripe publishable key or account ID not found");
|
|
2634
2634
|
r(2, c = await Gr(E, { stripeAccount: y }));
|
|
2635
2635
|
});
|
|
2636
|
-
const
|
|
2636
|
+
const B = async () => {
|
|
2637
2637
|
if (_ || !c || !m)
|
|
2638
2638
|
return;
|
|
2639
2639
|
r(3, _ = !0);
|
|
@@ -2643,7 +2643,7 @@ function ei(t, e, r) {
|
|
|
2643
2643
|
});
|
|
2644
2644
|
E.error ? (r(3, _ = !1), l(new Y(O.StripeError, E.error.message))) : i();
|
|
2645
2645
|
};
|
|
2646
|
-
function
|
|
2646
|
+
function k(E) {
|
|
2647
2647
|
u = E, r(1, u);
|
|
2648
2648
|
}
|
|
2649
2649
|
return t.$$set = (E) => {
|
|
@@ -2657,11 +2657,11 @@ function ei(t, e, r) {
|
|
|
2657
2657
|
c,
|
|
2658
2658
|
_,
|
|
2659
2659
|
o,
|
|
2660
|
-
|
|
2660
|
+
B,
|
|
2661
2661
|
i,
|
|
2662
2662
|
l,
|
|
2663
2663
|
s,
|
|
2664
|
-
|
|
2664
|
+
k
|
|
2665
2665
|
];
|
|
2666
2666
|
}
|
|
2667
2667
|
class ti extends U {
|
|
@@ -2704,7 +2704,7 @@ function ii(t) {
|
|
|
2704
2704
|
let e, r, n, i, l, s, o;
|
|
2705
2705
|
return {
|
|
2706
2706
|
c() {
|
|
2707
|
-
e = $("div"), r = $("div"), r.innerHTML = '<label for="email">E-mail</label>', n =
|
|
2707
|
+
e = $("div"), r = $("div"), r.innerHTML = '<label for="email">E-mail</label>', n = P(), i = $("div"), l = $("input"), h(r, "class", "form-label svelte-1xardyz"), h(l, "name", "email"), h(l, "placeholder", "john@appleseed.com"), h(l, "class", "svelte-1xardyz"), h(i, "class", "form-input svelte-1xardyz"), h(e, "class", "form-container svelte-1xardyz");
|
|
2708
2708
|
},
|
|
2709
2709
|
m(c, u) {
|
|
2710
2710
|
A(c, e, u), M(e, r), M(e, n), M(e, i), M(i, l), He(
|
|
@@ -2795,24 +2795,24 @@ function oi(t) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
}), {
|
|
2797
2797
|
c() {
|
|
2798
|
-
e = $("div"), r = $("form"), b(n.$$.fragment), i =
|
|
2798
|
+
e = $("div"), r = $("form"), b(n.$$.fragment), i = P(), b(l.$$.fragment), s = P(), b(o.$$.fragment);
|
|
2799
2799
|
},
|
|
2800
|
-
m(m,
|
|
2801
|
-
A(m, e,
|
|
2800
|
+
m(m, B) {
|
|
2801
|
+
A(m, e, B), M(e, r), I(n, r, null), M(r, i), I(l, r, null), M(r, s), I(o, r, null), c = !0, u || (_ = Ae(r, "submit", ft(
|
|
2802
2802
|
/*handleContinue*/
|
|
2803
2803
|
t[1]
|
|
2804
2804
|
)), u = !0);
|
|
2805
2805
|
},
|
|
2806
|
-
p(m, [
|
|
2807
|
-
const
|
|
2808
|
-
|
|
2809
|
-
16 && (
|
|
2806
|
+
p(m, [B]) {
|
|
2807
|
+
const k = {};
|
|
2808
|
+
B & /*$$scope*/
|
|
2809
|
+
16 && (k.$$scope = { dirty: B, ctx: m }), n.$set(k);
|
|
2810
2810
|
const E = {};
|
|
2811
|
-
|
|
2812
|
-
17 && (E.$$scope = { dirty:
|
|
2811
|
+
B & /*$$scope, email*/
|
|
2812
|
+
17 && (E.$$scope = { dirty: B, ctx: m }), l.$set(E);
|
|
2813
2813
|
const y = {};
|
|
2814
|
-
|
|
2815
|
-
16 && (y.$$scope = { dirty:
|
|
2814
|
+
B & /*$$scope*/
|
|
2815
|
+
16 && (y.$$scope = { dirty: B, ctx: m }), o.$set(y);
|
|
2816
2816
|
},
|
|
2817
2817
|
i(m) {
|
|
2818
2818
|
c || (a(n.$$.fragment, m), a(l.$$.fragment, m), a(o.$$.fragment, m), c = !0);
|
|
@@ -2877,7 +2877,7 @@ function gi(t) {
|
|
|
2877
2877
|
) }
|
|
2878
2878
|
}), i = new di({}), {
|
|
2879
2879
|
c() {
|
|
2880
|
-
e = $("div"), b(r.$$.fragment), n =
|
|
2880
|
+
e = $("div"), b(r.$$.fragment), n = P(), b(i.$$.fragment), h(e, "class", "rcb-header-layout svelte-1ggdgso");
|
|
2881
2881
|
},
|
|
2882
2882
|
m(s, o) {
|
|
2883
2883
|
A(s, e, o), I(r, e, null), M(e, n), I(i, e, null), l = !0;
|
|
@@ -3063,15 +3063,15 @@ function $i(t) {
|
|
|
3063
3063
|
}
|
|
3064
3064
|
};
|
|
3065
3065
|
}
|
|
3066
|
-
function
|
|
3066
|
+
function Bi(t, e, r) {
|
|
3067
3067
|
let { $$slots: n = {}, $$scope: i } = e, { dark: l = !1 } = e;
|
|
3068
3068
|
return t.$$set = (s) => {
|
|
3069
3069
|
"dark" in s && r(0, l = s.dark), "$$scope" in s && r(1, i = s.$$scope);
|
|
3070
3070
|
}, [l, i, n];
|
|
3071
3071
|
}
|
|
3072
|
-
class
|
|
3072
|
+
class ki extends U {
|
|
3073
3073
|
constructor(e) {
|
|
3074
|
-
super(), C(this, e,
|
|
3074
|
+
super(), C(this, e, Bi, $i, R, { dark: 0 }, bi);
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
3077
|
function yi(t) {
|
|
@@ -3245,7 +3245,7 @@ function Mi(t, e, r) {
|
|
|
3245
3245
|
"condition" in s && r(0, l = s.condition), "$$scope" in s && r(2, i = s.$$scope);
|
|
3246
3246
|
}, [l, n, i];
|
|
3247
3247
|
}
|
|
3248
|
-
class
|
|
3248
|
+
class Ti extends U {
|
|
3249
3249
|
constructor(e) {
|
|
3250
3250
|
super(), C(this, e, Mi, vi, R, { condition: 0 });
|
|
3251
3251
|
}
|
|
@@ -3281,7 +3281,7 @@ function ze(t) {
|
|
|
3281
3281
|
}
|
|
3282
3282
|
};
|
|
3283
3283
|
}
|
|
3284
|
-
function
|
|
3284
|
+
function Pi(t) {
|
|
3285
3285
|
let e, r, n = (
|
|
3286
3286
|
/*showHeader*/
|
|
3287
3287
|
t[1] && ze(t)
|
|
@@ -3298,7 +3298,7 @@ function Ti(t) {
|
|
|
3298
3298
|
);
|
|
3299
3299
|
return {
|
|
3300
3300
|
c() {
|
|
3301
|
-
n && n.c(), e =
|
|
3301
|
+
n && n.c(), e = P(), l && l.c();
|
|
3302
3302
|
},
|
|
3303
3303
|
m(s, o) {
|
|
3304
3304
|
n && n.m(s, o), A(s, e, o), l && l.m(s, o), r = !0;
|
|
@@ -3341,13 +3341,13 @@ function Ti(t) {
|
|
|
3341
3341
|
}
|
|
3342
3342
|
function Ni(t) {
|
|
3343
3343
|
let e, r;
|
|
3344
|
-
return e = new
|
|
3344
|
+
return e = new ki({
|
|
3345
3345
|
props: {
|
|
3346
3346
|
dark: (
|
|
3347
3347
|
/*dark*/
|
|
3348
3348
|
t[0]
|
|
3349
3349
|
),
|
|
3350
|
-
$$slots: { default: [
|
|
3350
|
+
$$slots: { default: [Pi] },
|
|
3351
3351
|
$$scope: { ctx: t }
|
|
3352
3352
|
}
|
|
3353
3353
|
}), {
|
|
@@ -3508,7 +3508,7 @@ var bt = /* @__PURE__ */ ((t) => (t[t.BackendInvalidPlatform = 7e3] = "BackendIn
|
|
|
3508
3508
|
class W extends Error {
|
|
3509
3509
|
constructor(r, n, i) {
|
|
3510
3510
|
super(n);
|
|
3511
|
-
|
|
3511
|
+
T(this, "toString", () => `PurchasesError(code: ${Me[this.errorCode]}, message: ${this.message})`);
|
|
3512
3512
|
this.errorCode = r, this.underlyingErrorMessage = i;
|
|
3513
3513
|
}
|
|
3514
3514
|
/** @internal */
|
|
@@ -3532,10 +3532,10 @@ class W extends Error {
|
|
|
3532
3532
|
}
|
|
3533
3533
|
}
|
|
3534
3534
|
const Ci = "0.0.10", le = "https://api.revenuecat.com";
|
|
3535
|
-
var
|
|
3535
|
+
var ke;
|
|
3536
3536
|
(function(t) {
|
|
3537
3537
|
t[t.CONTINUE = 100] = "CONTINUE", t[t.SWITCHING_PROTOCOLS = 101] = "SWITCHING_PROTOCOLS", t[t.PROCESSING = 102] = "PROCESSING", t[t.EARLY_HINTS = 103] = "EARLY_HINTS", t[t.OK = 200] = "OK", t[t.CREATED = 201] = "CREATED", t[t.ACCEPTED = 202] = "ACCEPTED", t[t.NON_AUTHORITATIVE_INFORMATION = 203] = "NON_AUTHORITATIVE_INFORMATION", t[t.NO_CONTENT = 204] = "NO_CONTENT", t[t.RESET_CONTENT = 205] = "RESET_CONTENT", t[t.PARTIAL_CONTENT = 206] = "PARTIAL_CONTENT", t[t.MULTI_STATUS = 207] = "MULTI_STATUS", t[t.MULTIPLE_CHOICES = 300] = "MULTIPLE_CHOICES", t[t.MOVED_PERMANENTLY = 301] = "MOVED_PERMANENTLY", t[t.MOVED_TEMPORARILY = 302] = "MOVED_TEMPORARILY", t[t.SEE_OTHER = 303] = "SEE_OTHER", t[t.NOT_MODIFIED = 304] = "NOT_MODIFIED", t[t.USE_PROXY = 305] = "USE_PROXY", t[t.TEMPORARY_REDIRECT = 307] = "TEMPORARY_REDIRECT", t[t.PERMANENT_REDIRECT = 308] = "PERMANENT_REDIRECT", t[t.BAD_REQUEST = 400] = "BAD_REQUEST", t[t.UNAUTHORIZED = 401] = "UNAUTHORIZED", t[t.PAYMENT_REQUIRED = 402] = "PAYMENT_REQUIRED", t[t.FORBIDDEN = 403] = "FORBIDDEN", t[t.NOT_FOUND = 404] = "NOT_FOUND", t[t.METHOD_NOT_ALLOWED = 405] = "METHOD_NOT_ALLOWED", t[t.NOT_ACCEPTABLE = 406] = "NOT_ACCEPTABLE", t[t.PROXY_AUTHENTICATION_REQUIRED = 407] = "PROXY_AUTHENTICATION_REQUIRED", t[t.REQUEST_TIMEOUT = 408] = "REQUEST_TIMEOUT", t[t.CONFLICT = 409] = "CONFLICT", t[t.GONE = 410] = "GONE", t[t.LENGTH_REQUIRED = 411] = "LENGTH_REQUIRED", t[t.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", t[t.REQUEST_TOO_LONG = 413] = "REQUEST_TOO_LONG", t[t.REQUEST_URI_TOO_LONG = 414] = "REQUEST_URI_TOO_LONG", t[t.UNSUPPORTED_MEDIA_TYPE = 415] = "UNSUPPORTED_MEDIA_TYPE", t[t.REQUESTED_RANGE_NOT_SATISFIABLE = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE", t[t.EXPECTATION_FAILED = 417] = "EXPECTATION_FAILED", t[t.IM_A_TEAPOT = 418] = "IM_A_TEAPOT", t[t.INSUFFICIENT_SPACE_ON_RESOURCE = 419] = "INSUFFICIENT_SPACE_ON_RESOURCE", t[t.METHOD_FAILURE = 420] = "METHOD_FAILURE", t[t.MISDIRECTED_REQUEST = 421] = "MISDIRECTED_REQUEST", t[t.UNPROCESSABLE_ENTITY = 422] = "UNPROCESSABLE_ENTITY", t[t.LOCKED = 423] = "LOCKED", t[t.FAILED_DEPENDENCY = 424] = "FAILED_DEPENDENCY", t[t.UPGRADE_REQUIRED = 426] = "UPGRADE_REQUIRED", t[t.PRECONDITION_REQUIRED = 428] = "PRECONDITION_REQUIRED", t[t.TOO_MANY_REQUESTS = 429] = "TOO_MANY_REQUESTS", t[t.REQUEST_HEADER_FIELDS_TOO_LARGE = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE", t[t.UNAVAILABLE_FOR_LEGAL_REASONS = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS", t[t.INTERNAL_SERVER_ERROR = 500] = "INTERNAL_SERVER_ERROR", t[t.NOT_IMPLEMENTED = 501] = "NOT_IMPLEMENTED", t[t.BAD_GATEWAY = 502] = "BAD_GATEWAY", t[t.SERVICE_UNAVAILABLE = 503] = "SERVICE_UNAVAILABLE", t[t.GATEWAY_TIMEOUT = 504] = "GATEWAY_TIMEOUT", t[t.HTTP_VERSION_NOT_SUPPORTED = 505] = "HTTP_VERSION_NOT_SUPPORTED", t[t.INSUFFICIENT_STORAGE = 507] = "INSUFFICIENT_STORAGE", t[t.NETWORK_AUTHENTICATION_REQUIRED = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
|
|
3538
|
-
})(
|
|
3538
|
+
})(ke || (ke = {}));
|
|
3539
3539
|
function $t(t) {
|
|
3540
3540
|
return t ? t.startsWith("rcb_sb_") : !1;
|
|
3541
3541
|
}
|
|
@@ -3549,9 +3549,9 @@ async function ee(t, e, r, n) {
|
|
|
3549
3549
|
}
|
|
3550
3550
|
async function Ui(t, e) {
|
|
3551
3551
|
const r = t.status;
|
|
3552
|
-
if (r >=
|
|
3552
|
+
if (r >= ke.INTERNAL_SERVER_ERROR)
|
|
3553
3553
|
Re(e, r, await t.text());
|
|
3554
|
-
else if (r >=
|
|
3554
|
+
else if (r >= ke.BAD_REQUEST) {
|
|
3555
3555
|
const n = await t.json(), i = n ? JSON.stringify(n) : null, l = n == null ? void 0 : n.code, s = n == null ? void 0 : n.message;
|
|
3556
3556
|
if (l != null) {
|
|
3557
3557
|
const o = be.convertCodeToBackendErrorCode(l);
|
|
@@ -3586,73 +3586,73 @@ function Si(t, e) {
|
|
|
3586
3586
|
};
|
|
3587
3587
|
return e != null && (r = { ...r, ...e }), r;
|
|
3588
3588
|
}
|
|
3589
|
-
const
|
|
3589
|
+
const Bt = "/v1/subscribers", Te = "/rcbilling/v1";
|
|
3590
3590
|
class Li {
|
|
3591
3591
|
constructor(e) {
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3592
|
+
T(this, "appUserId");
|
|
3593
|
+
T(this, "method", "GET");
|
|
3594
|
+
T(this, "name", "getOfferings");
|
|
3595
3595
|
this.appUserId = e;
|
|
3596
3596
|
}
|
|
3597
3597
|
url() {
|
|
3598
|
-
return `${le}${
|
|
3598
|
+
return `${le}${Bt}/${this.appUserId}/offerings`;
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
3601
|
class Fi {
|
|
3602
3602
|
constructor() {
|
|
3603
|
-
|
|
3604
|
-
|
|
3603
|
+
T(this, "method", "POST");
|
|
3604
|
+
T(this, "name", "subscribe");
|
|
3605
3605
|
}
|
|
3606
3606
|
url() {
|
|
3607
|
-
return `${le}${
|
|
3607
|
+
return `${le}${Te}/subscribe`;
|
|
3608
3608
|
}
|
|
3609
3609
|
}
|
|
3610
3610
|
class Gi {
|
|
3611
3611
|
constructor(e, r) {
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3612
|
+
T(this, "method", "GET");
|
|
3613
|
+
T(this, "name", "getProducts");
|
|
3614
|
+
T(this, "appUserId");
|
|
3615
|
+
T(this, "productIds");
|
|
3616
3616
|
this.appUserId = e, this.productIds = r;
|
|
3617
3617
|
}
|
|
3618
3618
|
url() {
|
|
3619
|
-
return `${le}${
|
|
3619
|
+
return `${le}${Te}/subscribers/${this.appUserId}/products?id=${this.productIds.join("&id=")}`;
|
|
3620
3620
|
}
|
|
3621
3621
|
}
|
|
3622
3622
|
class Yi {
|
|
3623
3623
|
constructor(e) {
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3624
|
+
T(this, "method", "GET");
|
|
3625
|
+
T(this, "name", "getCustomerInfo");
|
|
3626
|
+
T(this, "appUserId");
|
|
3627
3627
|
this.appUserId = e;
|
|
3628
3628
|
}
|
|
3629
3629
|
url() {
|
|
3630
|
-
return `${le}${
|
|
3630
|
+
return `${le}${Bt}/${this.appUserId}`;
|
|
3631
3631
|
}
|
|
3632
3632
|
}
|
|
3633
3633
|
class Hi {
|
|
3634
3634
|
constructor() {
|
|
3635
|
-
|
|
3636
|
-
|
|
3635
|
+
T(this, "method", "GET");
|
|
3636
|
+
T(this, "name", "getBrandingInfo");
|
|
3637
3637
|
}
|
|
3638
3638
|
url() {
|
|
3639
|
-
return `${le}${
|
|
3639
|
+
return `${le}${Te}/branding`;
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
3642
|
class Ki {
|
|
3643
3643
|
constructor(e) {
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3644
|
+
T(this, "method", "GET");
|
|
3645
|
+
T(this, "name", "getCheckoutStatus");
|
|
3646
|
+
T(this, "operationSessionId");
|
|
3647
3647
|
this.operationSessionId = e;
|
|
3648
3648
|
}
|
|
3649
3649
|
url() {
|
|
3650
|
-
return `${le}${
|
|
3650
|
+
return `${le}${Te}/checkout/${this.operationSessionId}`;
|
|
3651
3651
|
}
|
|
3652
3652
|
}
|
|
3653
3653
|
class ji {
|
|
3654
3654
|
constructor(e) {
|
|
3655
|
-
|
|
3655
|
+
T(this, "API_KEY");
|
|
3656
3656
|
this.API_KEY = e;
|
|
3657
3657
|
}
|
|
3658
3658
|
async getOfferings(e) {
|
|
@@ -3733,7 +3733,7 @@ function Xe(t) {
|
|
|
3733
3733
|
let s = i && et();
|
|
3734
3734
|
return {
|
|
3735
3735
|
c() {
|
|
3736
|
-
e = $("div"), b(r.$$.fragment), n =
|
|
3736
|
+
e = $("div"), b(r.$$.fragment), n = P(), s && s.c(), h(e, "class", "rcb-ui-aside svelte-ofxzf4");
|
|
3737
3737
|
},
|
|
3738
3738
|
m(o, c) {
|
|
3739
3739
|
A(o, e, c), I(r, e, null), M(e, n), s && s.m(e, null), l = !0;
|
|
@@ -4061,7 +4061,7 @@ function ot(t) {
|
|
|
4061
4061
|
}
|
|
4062
4062
|
function ct(t) {
|
|
4063
4063
|
let e, r;
|
|
4064
|
-
return e = new
|
|
4064
|
+
return e = new Br({
|
|
4065
4065
|
props: {
|
|
4066
4066
|
brandingInfo: (
|
|
4067
4067
|
/*brandingInfo*/
|
|
@@ -4105,10 +4105,10 @@ function Vi(t) {
|
|
|
4105
4105
|
/*state*/
|
|
4106
4106
|
t[6] === "present-offer" && !/*productDetails*/
|
|
4107
4107
|
t[2] && nt()
|
|
4108
|
-
),
|
|
4108
|
+
), B = (
|
|
4109
4109
|
/*state*/
|
|
4110
4110
|
t[6] === "polling-purchase-status" && rt()
|
|
4111
|
-
),
|
|
4111
|
+
), k = (
|
|
4112
4112
|
/*state*/
|
|
4113
4113
|
t[6] === "needs-auth-info" && it(t)
|
|
4114
4114
|
), E = (
|
|
@@ -4127,10 +4127,10 @@ function Vi(t) {
|
|
|
4127
4127
|
);
|
|
4128
4128
|
return {
|
|
4129
4129
|
c() {
|
|
4130
|
-
_ && _.c(), e =
|
|
4130
|
+
_ && _.c(), e = P(), m && m.c(), r = P(), B && B.c(), n = P(), k && k.c(), i = P(), E && E.c(), l = P(), y && y.c(), s = P(), v && v.c(), o = P(), N && N.c(), c = z();
|
|
4131
4131
|
},
|
|
4132
4132
|
m(d, p) {
|
|
4133
|
-
_ && _.m(d, p), A(d, e, p), m && m.m(d, p), A(d, r, p),
|
|
4133
|
+
_ && _.m(d, p), A(d, e, p), m && m.m(d, p), A(d, r, p), B && B.m(d, p), A(d, n, p), k && k.m(d, p), A(d, i, p), E && E.m(d, p), A(d, l, p), y && y.m(d, p), A(d, s, p), v && v.m(d, p), A(d, o, p), N && N.m(d, p), A(d, c, p), u = !0;
|
|
4134
4134
|
},
|
|
4135
4135
|
p(d, p) {
|
|
4136
4136
|
/*state*/
|
|
@@ -4144,14 +4144,14 @@ function Vi(t) {
|
|
|
4144
4144
|
68 && a(m, 1) : (m = nt(), m.c(), a(m, 1), m.m(r.parentNode, r)) : m && (F(), f(m, 1, 1, () => {
|
|
4145
4145
|
m = null;
|
|
4146
4146
|
}), G()), /*state*/
|
|
4147
|
-
d[6] === "polling-purchase-status" ?
|
|
4148
|
-
64 && a(
|
|
4149
|
-
k = null;
|
|
4150
|
-
}), G()), /*state*/
|
|
4151
|
-
d[6] === "needs-auth-info" ? B ? (B.p(d, p), p & /*state*/
|
|
4152
|
-
64 && a(B, 1)) : (B = it(d), B.c(), a(B, 1), B.m(i.parentNode, i)) : B && (F(), f(B, 1, 1, () => {
|
|
4147
|
+
d[6] === "polling-purchase-status" ? B ? p & /*state*/
|
|
4148
|
+
64 && a(B, 1) : (B = rt(), B.c(), a(B, 1), B.m(n.parentNode, n)) : B && (F(), f(B, 1, 1, () => {
|
|
4153
4149
|
B = null;
|
|
4154
4150
|
}), G()), /*state*/
|
|
4151
|
+
d[6] === "needs-auth-info" ? k ? (k.p(d, p), p & /*state*/
|
|
4152
|
+
64 && a(k, 1)) : (k = it(d), k.c(), a(k, 1), k.m(i.parentNode, i)) : k && (F(), f(k, 1, 1, () => {
|
|
4153
|
+
k = null;
|
|
4154
|
+
}), G()), /*state*/
|
|
4155
4155
|
d[6] === "needs-payment-info" && /*paymentInfoCollectionMetadata*/
|
|
4156
4156
|
d[4] ? E ? (E.p(d, p), p & /*state, paymentInfoCollectionMetadata*/
|
|
4157
4157
|
80 && a(E, 1)) : (E = lt(d), E.c(), a(E, 1), E.m(l.parentNode, l)) : E && (F(), f(E, 1, 1, () => {
|
|
@@ -4171,13 +4171,13 @@ function Vi(t) {
|
|
|
4171
4171
|
}), G());
|
|
4172
4172
|
},
|
|
4173
4173
|
i(d) {
|
|
4174
|
-
u || (a(_), a(m), a(
|
|
4174
|
+
u || (a(_), a(m), a(B), a(k), a(E), a(y), a(v), a(N), u = !0);
|
|
4175
4175
|
},
|
|
4176
4176
|
o(d) {
|
|
4177
|
-
f(_), f(m), f(
|
|
4177
|
+
f(_), f(m), f(B), f(k), f(E), f(y), f(v), f(N), u = !1;
|
|
4178
4178
|
},
|
|
4179
4179
|
d(d) {
|
|
4180
|
-
d && (g(e), g(r), g(n), g(i), g(l), g(s), g(o), g(c)), _ && _.d(d), m && m.d(d),
|
|
4180
|
+
d && (g(e), g(r), g(n), g(i), g(l), g(s), g(o), g(c)), _ && _.d(d), m && m.d(d), B && B.d(d), k && k.d(d), E && E.d(d), y && y.d(d), v && v.d(d), N && N.d(d);
|
|
4181
4181
|
}
|
|
4182
4182
|
};
|
|
4183
4183
|
}
|
|
@@ -4196,7 +4196,7 @@ function qi(t) {
|
|
|
4196
4196
|
}
|
|
4197
4197
|
}), {
|
|
4198
4198
|
c() {
|
|
4199
|
-
e = $("div"), s && s.c(), n =
|
|
4199
|
+
e = $("div"), s && s.c(), n = P(), b(i.$$.fragment), h(e, "class", "rcb-ui-layout svelte-ofxzf4");
|
|
4200
4200
|
},
|
|
4201
4201
|
m(o, c) {
|
|
4202
4202
|
A(o, e, c), s && s.m(e, null), M(e, n), I(i, e, null), l = !0;
|
|
@@ -4228,7 +4228,7 @@ function qi(t) {
|
|
|
4228
4228
|
}
|
|
4229
4229
|
function Wi(t) {
|
|
4230
4230
|
let e, r, n;
|
|
4231
|
-
return r = new
|
|
4231
|
+
return r = new Ti({
|
|
4232
4232
|
props: {
|
|
4233
4233
|
condition: (
|
|
4234
4234
|
/*asModal*/
|
|
@@ -4264,17 +4264,17 @@ function Wi(t) {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
function zi(t, e, r) {
|
|
4266
4266
|
var Le;
|
|
4267
|
-
let { asModal: n = !0 } = e, { customerEmail: i } = e, { appUserId: l } = e, { rcPackage: s } = e, { onFinished: o } = e, { onError: c } = e, { onClose: u } = e, { purchases: _ } = e, { backend: m } = e, { purchaseOperationHelper:
|
|
4267
|
+
let { asModal: n = !0 } = e, { customerEmail: i } = e, { appUserId: l } = e, { rcPackage: s } = e, { onFinished: o } = e, { onError: c } = e, { onClose: u } = e, { purchases: _ } = e, { backend: m } = e, { purchaseOperationHelper: B } = e, k = null, E = null, y = null, v = null;
|
|
4268
4268
|
const N = ((Le = s.rcBillingProduct) == null ? void 0 : Le.identifier) ?? null;
|
|
4269
4269
|
let d = "present-offer";
|
|
4270
4270
|
const p = ["present-offer", "needs-auth-info", "needs-payment-info", "loading"];
|
|
4271
4271
|
De(async () => {
|
|
4272
|
-
if (r(2,
|
|
4272
|
+
if (r(2, k = s.rcBillingProduct), r(3, E = await m.getBrandingInfo()), d === "present-offer") {
|
|
4273
4273
|
i ? Se() : r(6, d = "needs-auth-info");
|
|
4274
4274
|
return;
|
|
4275
4275
|
}
|
|
4276
4276
|
});
|
|
4277
|
-
const
|
|
4277
|
+
const kt = () => {
|
|
4278
4278
|
u();
|
|
4279
4279
|
}, Se = () => {
|
|
4280
4280
|
if (N === null) {
|
|
@@ -4286,7 +4286,7 @@ function zi(t, e, r) {
|
|
|
4286
4286
|
se(new Y(O.MissingEmailError));
|
|
4287
4287
|
return;
|
|
4288
4288
|
}
|
|
4289
|
-
|
|
4289
|
+
B.startPurchase(l, N, i).then((Q) => {
|
|
4290
4290
|
if (Q.next_action === "collect_payment_info") {
|
|
4291
4291
|
r(6, d = "needs-payment-info"), r(4, y = Q);
|
|
4292
4292
|
return;
|
|
@@ -4304,7 +4304,7 @@ function zi(t, e, r) {
|
|
|
4304
4304
|
return;
|
|
4305
4305
|
}
|
|
4306
4306
|
if (d === "needs-payment-info") {
|
|
4307
|
-
r(6, d = "polling-purchase-status"),
|
|
4307
|
+
r(6, d = "polling-purchase-status"), B.pollCurrentPurchaseForCompletion().then(() => {
|
|
4308
4308
|
r(6, d = "success");
|
|
4309
4309
|
}).catch((Qt) => {
|
|
4310
4310
|
se(Qt);
|
|
@@ -4322,17 +4322,17 @@ function zi(t, e, r) {
|
|
|
4322
4322
|
c(v ?? new Y(O.UnknownError, "Unknown error without state set."));
|
|
4323
4323
|
};
|
|
4324
4324
|
return t.$$set = (Q) => {
|
|
4325
|
-
"asModal" in Q && r(0, n = Q.asModal), "customerEmail" in Q && r(12, i = Q.customerEmail), "appUserId" in Q && r(13, l = Q.appUserId), "rcPackage" in Q && r(14, s = Q.rcPackage), "onFinished" in Q && r(15, o = Q.onFinished), "onError" in Q && r(16, c = Q.onError), "onClose" in Q && r(17, u = Q.onClose), "purchases" in Q && r(1, _ = Q.purchases), "backend" in Q && r(18, m = Q.backend), "purchaseOperationHelper" in Q && r(19,
|
|
4325
|
+
"asModal" in Q && r(0, n = Q.asModal), "customerEmail" in Q && r(12, i = Q.customerEmail), "appUserId" in Q && r(13, l = Q.appUserId), "rcPackage" in Q && r(14, s = Q.rcPackage), "onFinished" in Q && r(15, o = Q.onFinished), "onError" in Q && r(16, c = Q.onError), "onClose" in Q && r(17, u = Q.onClose), "purchases" in Q && r(1, _ = Q.purchases), "backend" in Q && r(18, m = Q.backend), "purchaseOperationHelper" in Q && r(19, B = Q.purchaseOperationHelper);
|
|
4326
4326
|
}, [
|
|
4327
4327
|
n,
|
|
4328
4328
|
_,
|
|
4329
|
-
|
|
4329
|
+
k,
|
|
4330
4330
|
E,
|
|
4331
4331
|
y,
|
|
4332
4332
|
v,
|
|
4333
4333
|
d,
|
|
4334
4334
|
p,
|
|
4335
|
-
|
|
4335
|
+
kt,
|
|
4336
4336
|
yt,
|
|
4337
4337
|
se,
|
|
4338
4338
|
Dt,
|
|
@@ -4343,7 +4343,7 @@ function zi(t, e, r) {
|
|
|
4343
4343
|
c,
|
|
4344
4344
|
u,
|
|
4345
4345
|
m,
|
|
4346
|
-
|
|
4346
|
+
B
|
|
4347
4347
|
];
|
|
4348
4348
|
}
|
|
4349
4349
|
class Xi extends U {
|
|
@@ -4470,13 +4470,13 @@ class cl {
|
|
|
4470
4470
|
*/
|
|
4471
4471
|
constructor(e) {
|
|
4472
4472
|
/** @internal */
|
|
4473
|
-
|
|
4473
|
+
T(this, "_API_KEY");
|
|
4474
4474
|
/** @internal */
|
|
4475
|
-
|
|
4475
|
+
T(this, "backend");
|
|
4476
4476
|
/** @internal */
|
|
4477
|
-
|
|
4477
|
+
T(this, "purchaseOperationHelper");
|
|
4478
4478
|
/** @internal */
|
|
4479
|
-
|
|
4479
|
+
T(this, "toOfferings", (e, r) => {
|
|
4480
4480
|
const n = e.offerings.find(
|
|
4481
4481
|
(o) => o.identifier === e.current_offering_id
|
|
4482
4482
|
) ?? null, i = {};
|
|
@@ -4602,7 +4602,7 @@ class cl {
|
|
|
4602
4602
|
}
|
|
4603
4603
|
export {
|
|
4604
4604
|
Me as ErrorCode,
|
|
4605
|
-
|
|
4605
|
+
Pt as PackageType,
|
|
4606
4606
|
cl as Purchases,
|
|
4607
4607
|
W as PurchasesError
|
|
4608
4608
|
};
|