@revenuecat/purchases-js 0.1.2 → 0.1.3
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.js +191 -183
- package/dist/Purchases.umd.js +4 -4
- package/package.json +16 -1
package/dist/Purchases.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Ot = Object.defineProperty;
|
|
2
2
|
var Lt = (t, e, r) => e in t ? Ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
3
|
+
var Q = (t, e, r) => (Lt(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
4
|
function xt(t) {
|
|
5
5
|
return t != null;
|
|
6
6
|
}
|
|
@@ -75,7 +75,7 @@ function bt(t) {
|
|
|
75
75
|
function Xe() {
|
|
76
76
|
return /* @__PURE__ */ Object.create(null);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ke(t) {
|
|
79
79
|
t.forEach(bt);
|
|
80
80
|
}
|
|
81
81
|
function ae(t) {
|
|
@@ -84,9 +84,9 @@ function ae(t) {
|
|
|
84
84
|
function P(t, e) {
|
|
85
85
|
return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
|
|
86
86
|
}
|
|
87
|
-
let
|
|
88
|
-
function
|
|
89
|
-
return t === e ? !0 : (
|
|
87
|
+
let ye;
|
|
88
|
+
function Z(t, e) {
|
|
89
|
+
return t === e ? !0 : (ye || (ye = document.createElement("a")), ye.href = e, t === ye.href);
|
|
90
90
|
}
|
|
91
91
|
function Ze(t) {
|
|
92
92
|
return t.split(",").map((e) => e.trim().split(" ").filter(Boolean));
|
|
@@ -99,7 +99,7 @@ function qt(t, e) {
|
|
|
99
99
|
// relative URLs inside srcset are not automatically resolved to absolute URLs by
|
|
100
100
|
// browsers (in contrast to img.src). This means both SSR and DOM code could
|
|
101
101
|
// contain relative or absolute URLs.
|
|
102
|
-
(
|
|
102
|
+
(Z(r[s][0], i) || Z(i, r[s][0]))
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
function jt(t) {
|
|
@@ -144,7 +144,7 @@ function q(t) {
|
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ie(t) {
|
|
148
148
|
return t ?? "";
|
|
149
149
|
}
|
|
150
150
|
function D(t, e) {
|
|
@@ -192,7 +192,7 @@ function T() {
|
|
|
192
192
|
function ee() {
|
|
193
193
|
return R("");
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function $e(t, e, r, n) {
|
|
196
196
|
return t.addEventListener(e, r, n), () => t.removeEventListener(e, r, n);
|
|
197
197
|
}
|
|
198
198
|
function kt(t) {
|
|
@@ -224,7 +224,7 @@ function en(t) {
|
|
|
224
224
|
function tn(t) {
|
|
225
225
|
return Array.from(t.childNodes);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function ne(t, e) {
|
|
228
228
|
e = "" + e, t.data !== e && (t.data = /** @type {string} */
|
|
229
229
|
e);
|
|
230
230
|
}
|
|
@@ -234,14 +234,14 @@ function et(t, e) {
|
|
|
234
234
|
function nn(t, e, { bubbles: r = !1, cancelable: n = !1 } = {}) {
|
|
235
235
|
return new CustomEvent(t, { detail: e, bubbles: r, cancelable: n });
|
|
236
236
|
}
|
|
237
|
-
let
|
|
237
|
+
let be;
|
|
238
238
|
function he(t) {
|
|
239
|
-
|
|
239
|
+
be = t;
|
|
240
240
|
}
|
|
241
241
|
function Re() {
|
|
242
|
-
if (!
|
|
242
|
+
if (!be)
|
|
243
243
|
throw new Error("Function called outside component initialization");
|
|
244
|
-
return
|
|
244
|
+
return be;
|
|
245
245
|
}
|
|
246
246
|
function Se(t) {
|
|
247
247
|
Re().$$.on_mount.push(t);
|
|
@@ -292,7 +292,7 @@ let oe = 0;
|
|
|
292
292
|
function vt() {
|
|
293
293
|
if (oe !== 0)
|
|
294
294
|
return;
|
|
295
|
-
const t =
|
|
295
|
+
const t = be;
|
|
296
296
|
do {
|
|
297
297
|
try {
|
|
298
298
|
for (; oe < le.length; ) {
|
|
@@ -316,7 +316,7 @@ function vt() {
|
|
|
316
316
|
}
|
|
317
317
|
function un(t) {
|
|
318
318
|
if (t.fragment !== null) {
|
|
319
|
-
t.update(),
|
|
319
|
+
t.update(), ke(t.before_update);
|
|
320
320
|
const e = t.dirty;
|
|
321
321
|
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(Ke);
|
|
322
322
|
}
|
|
@@ -326,17 +326,17 @@ function fn(t) {
|
|
|
326
326
|
ce.forEach((n) => t.indexOf(n) === -1 ? e.push(n) : r.push(n)), r.forEach((n) => n()), ce = e;
|
|
327
327
|
}
|
|
328
328
|
const Qe = /* @__PURE__ */ new Set();
|
|
329
|
-
let
|
|
329
|
+
let re;
|
|
330
330
|
function L() {
|
|
331
|
-
|
|
331
|
+
re = {
|
|
332
332
|
r: 0,
|
|
333
333
|
c: [],
|
|
334
|
-
p:
|
|
334
|
+
p: re
|
|
335
335
|
// parent group
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
function x() {
|
|
339
|
-
|
|
339
|
+
re.r || ke(re.c), re = re.p;
|
|
340
340
|
}
|
|
341
341
|
function u(t, e) {
|
|
342
342
|
t && t.i && (Qe.delete(t), t.i(e));
|
|
@@ -345,7 +345,7 @@ function m(t, e, r, n) {
|
|
|
345
345
|
if (t && t.o) {
|
|
346
346
|
if (Qe.has(t))
|
|
347
347
|
return;
|
|
348
|
-
Qe.add(t),
|
|
348
|
+
Qe.add(t), re.c.push(() => {
|
|
349
349
|
Qe.delete(t), n && (r && t.d(1), n());
|
|
350
350
|
}), t.o(e);
|
|
351
351
|
} else
|
|
@@ -362,18 +362,18 @@ function I(t, e, r) {
|
|
|
362
362
|
const { fragment: n, after_update: i } = t.$$;
|
|
363
363
|
n && n.m(e, r), Ke(() => {
|
|
364
364
|
const o = t.$$.on_mount.map(bt).filter(ae);
|
|
365
|
-
t.$$.on_destroy ? t.$$.on_destroy.push(...o) :
|
|
365
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...o) : ke(o), t.$$.on_mount = [];
|
|
366
366
|
}), i.forEach(Ke);
|
|
367
367
|
}
|
|
368
368
|
function b(t, e) {
|
|
369
369
|
const r = t.$$;
|
|
370
|
-
r.fragment !== null && (fn(r.after_update),
|
|
370
|
+
r.fragment !== null && (fn(r.after_update), ke(r.on_destroy), r.fragment && r.fragment.d(e), r.on_destroy = r.fragment = null, r.ctx = []);
|
|
371
371
|
}
|
|
372
372
|
function mn(t, e) {
|
|
373
373
|
t.$$.dirty[0] === -1 && (le.push(t), cn(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
374
374
|
}
|
|
375
375
|
function N(t, e, r, n, i, o, s = null, l = [-1]) {
|
|
376
|
-
const c =
|
|
376
|
+
const c = be;
|
|
377
377
|
he(t);
|
|
378
378
|
const a = t.$$ = {
|
|
379
379
|
fragment: null,
|
|
@@ -401,7 +401,7 @@ function N(t, e, r, n, i, o, s = null, l = [-1]) {
|
|
|
401
401
|
if (a.ctx = r ? r(t, e.props || {}, (d, E, ...v) => {
|
|
402
402
|
const A = v.length ? v[0] : E;
|
|
403
403
|
return a.ctx && i(a.ctx[d], a.ctx[d] = A) && (!a.skip_bound && a.bound[d] && a.bound[d](A), f && mn(t, d)), E;
|
|
404
|
-
}) : [], a.update(), f = !0,
|
|
404
|
+
}) : [], a.update(), f = !0, ke(a.before_update), a.fragment = n ? n(a.ctx) : !1, e.target) {
|
|
405
405
|
if (e.hydrate) {
|
|
406
406
|
const d = tn(e.target);
|
|
407
407
|
a.fragment && a.fragment.l(d), d.forEach(g);
|
|
@@ -420,7 +420,7 @@ class U {
|
|
|
420
420
|
*
|
|
421
421
|
* @type {any}
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
Q(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
|
+
Q(this, "$$set");
|
|
432
432
|
}
|
|
433
433
|
/** @returns {void} */
|
|
434
434
|
$destroy() {
|
|
@@ -483,7 +483,7 @@ function Fe(t) {
|
|
|
483
483
|
/*as*/
|
|
484
484
|
t[0]
|
|
485
485
|
)(e, {
|
|
486
|
-
class:
|
|
486
|
+
class: Ie("rcb-modal-section") + " svelte-1bzqb13"
|
|
487
487
|
});
|
|
488
488
|
},
|
|
489
489
|
m(o, s) {
|
|
@@ -611,7 +611,7 @@ class V {
|
|
|
611
611
|
this.log(e, j.Verbose);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
|
|
614
|
+
Q(V, "logLevel", j.Silent);
|
|
615
615
|
var pe = /* @__PURE__ */ ((t) => (t.Year = "year", t.Month = "month", t.Week = "week", t.Day = "day", t))(pe || {});
|
|
616
616
|
function hn(t) {
|
|
617
617
|
const e = t.match(/^PT?([0-9]+)([MDYW])$/);
|
|
@@ -687,33 +687,33 @@ function In(t) {
|
|
|
687
687
|
t[0].currentPrice.amount,
|
|
688
688
|
/*productDetails*/
|
|
689
689
|
t[0].currentPrice.currency
|
|
690
|
-
) + "", E, v, A,
|
|
690
|
+
) + "", E, v, A, M, h, y = nt(
|
|
691
691
|
/*productDetails*/
|
|
692
692
|
t[0].normalPeriodDuration
|
|
693
|
-
) + "", F, $, de,
|
|
693
|
+
) + "", F, $, de, Be, ie;
|
|
694
694
|
return {
|
|
695
695
|
c() {
|
|
696
|
-
e = k("div"), r = k("span"), i = R(n), o = T(), s = k("span"), c = R(l), f = R(a), E = R(d), v = T(), A = k("ul"),
|
|
696
|
+
e = k("div"), r = k("span"), i = R(n), o = T(), s = k("span"), c = R(l), f = R(a), E = R(d), v = T(), A = k("ul"), M = k("li"), h = R("Billed "), F = R(y), $ = T(), de = k("li"), de.textContent = "Continues until canceled", Be = T(), ie = k("li"), ie.textContent = "Cancel anytime", _(s, "class", "rcb-product-price svelte-i5dq8q"), _(A, "class", "rcb-product-details svelte-i5dq8q"), _(e, "class", "rcb-pricing-info svelte-i5dq8q");
|
|
697
697
|
},
|
|
698
698
|
m(z, W) {
|
|
699
|
-
p(z, e, W), D(e, r), D(r, i), D(e, o), D(e, s), D(s, c), D(s, f), D(s, E), D(e, v), D(e, A), D(A,
|
|
699
|
+
p(z, e, W), D(e, r), D(r, i), D(e, o), D(e, s), D(s, c), D(s, f), D(s, E), D(e, v), D(e, A), D(A, M), D(M, h), D(M, F), D(A, $), D(A, de), D(A, Be), D(A, ie);
|
|
700
700
|
},
|
|
701
701
|
p(z, W) {
|
|
702
702
|
W & /*productDetails*/
|
|
703
703
|
1 && n !== (n = /*productDetails*/
|
|
704
|
-
z[0].displayName + "") &&
|
|
704
|
+
z[0].displayName + "") && ne(i, n), W & /*productDetails*/
|
|
705
705
|
1 && l !== (l = /*productDetails*/
|
|
706
|
-
z[0].currentPrice.currency + "") &&
|
|
706
|
+
z[0].currentPrice.currency + "") && ne(c, l), W & /*productDetails*/
|
|
707
707
|
1 && d !== (d = tt(
|
|
708
708
|
/*productDetails*/
|
|
709
709
|
z[0].currentPrice.amount,
|
|
710
710
|
/*productDetails*/
|
|
711
711
|
z[0].currentPrice.currency
|
|
712
|
-
) + "") &&
|
|
712
|
+
) + "") && ne(E, d), W & /*productDetails*/
|
|
713
713
|
1 && y !== (y = nt(
|
|
714
714
|
/*productDetails*/
|
|
715
715
|
z[0].normalPeriodDuration
|
|
716
|
-
) + "") &&
|
|
716
|
+
) + "") && ne(F, y);
|
|
717
717
|
},
|
|
718
718
|
d(z) {
|
|
719
719
|
z && g(e);
|
|
@@ -766,7 +766,7 @@ function $n(t) {
|
|
|
766
766
|
let e, r;
|
|
767
767
|
return {
|
|
768
768
|
c() {
|
|
769
|
-
e = k("img"),
|
|
769
|
+
e = k("img"), Z(e.src, r = kn) || _(e, "src", r), _(e, "alt", "spinner");
|
|
770
770
|
},
|
|
771
771
|
m(n, i) {
|
|
772
772
|
p(n, e, i);
|
|
@@ -813,7 +813,7 @@ class je extends U {
|
|
|
813
813
|
super(), N(this, e, null, yn, P, {}, Bn);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
var _e = /* @__PURE__ */ ((t) => (t.Started = "started", t.InProgress = "in_progress", t.Succeeded = "succeeded", t.Failed = "failed", t))(_e || {}),
|
|
816
|
+
var _e = /* @__PURE__ */ ((t) => (t.Started = "started", t.InProgress = "in_progress", t.Succeeded = "succeeded", t.Failed = "failed", t))(_e || {}), Pe = /* @__PURE__ */ ((t) => (t[t.SetupIntentCreationFailed = 1] = "SetupIntentCreationFailed", t[t.PaymentMethodCreationFailed = 2] = "PaymentMethodCreationFailed", t[t.PaymentChargeFailed = 3] = "PaymentChargeFailed", t))(Pe || {}), S = /* @__PURE__ */ ((t) => (t[t.ErrorSettingUpPurchase = 0] = "ErrorSettingUpPurchase", t[t.ErrorChargingPayment = 1] = "ErrorChargingPayment", t[t.UnknownError = 2] = "UnknownError", t[t.NetworkError = 3] = "NetworkError", t[t.StripeError = 4] = "StripeError", t[t.MissingEmailError = 5] = "MissingEmailError", t))(S || {});
|
|
817
817
|
class G extends Error {
|
|
818
818
|
constructor(e, r, n) {
|
|
819
819
|
super(r), this.errorCode = e, this.underlyingErrorMessage = n;
|
|
@@ -821,10 +821,10 @@ class G extends Error {
|
|
|
821
821
|
}
|
|
822
822
|
class Dn {
|
|
823
823
|
constructor(e, r = 10) {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
824
|
+
Q(this, "operationSessionId", null);
|
|
825
|
+
Q(this, "backend");
|
|
826
|
+
Q(this, "maxNumberAttempts");
|
|
827
|
+
Q(this, "waitMSBetweenAttempts", 1e3);
|
|
828
828
|
this.backend = e, this.maxNumberAttempts = r;
|
|
829
829
|
}
|
|
830
830
|
async startPurchase(e, r, n, i) {
|
|
@@ -898,7 +898,7 @@ class Dn {
|
|
|
898
898
|
return;
|
|
899
899
|
}
|
|
900
900
|
switch (e.code) {
|
|
901
|
-
case
|
|
901
|
+
case Pe.SetupIntentCreationFailed:
|
|
902
902
|
r(
|
|
903
903
|
new G(
|
|
904
904
|
0,
|
|
@@ -906,7 +906,7 @@ class Dn {
|
|
|
906
906
|
)
|
|
907
907
|
);
|
|
908
908
|
return;
|
|
909
|
-
case
|
|
909
|
+
case Pe.PaymentMethodCreationFailed:
|
|
910
910
|
r(
|
|
911
911
|
new G(
|
|
912
912
|
0,
|
|
@@ -914,7 +914,7 @@ class Dn {
|
|
|
914
914
|
)
|
|
915
915
|
);
|
|
916
916
|
return;
|
|
917
|
-
case
|
|
917
|
+
case Pe.PaymentChargeFailed:
|
|
918
918
|
r(
|
|
919
919
|
new G(
|
|
920
920
|
1,
|
|
@@ -926,14 +926,14 @@ class Dn {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
const Cn = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23767676'/%3e%3cpath%20d='M87.6668%2041.504L82.4968%2036.334L62.0002%2056.8307L41.5035%2036.334L36.3335%2041.504L56.8302%2062.0006L36.3335%2082.4973L41.5035%2087.6673L62.0002%2067.1706L82.4968%2087.6673L87.6668%2082.4973L67.1702%2062.0006L87.6668%2041.504Z'%20fill='white'/%3e%3c/svg%3e";
|
|
929
|
-
function
|
|
929
|
+
function Mn(t) {
|
|
930
930
|
O(t, "svelte-1609h93", "img.svelte-1609h93{width:124px;height:124px;margin:0 auto}");
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Qn(t) {
|
|
933
933
|
let e, r;
|
|
934
934
|
return {
|
|
935
935
|
c() {
|
|
936
|
-
e = k("img"),
|
|
936
|
+
e = k("img"), Z(e.src, r = Cn) || _(e, "src", r), _(e, "alt", "icon"), _(e, "class", "rcb-ui-asset-icon svelte-1609h93");
|
|
937
937
|
},
|
|
938
938
|
m(n, i) {
|
|
939
939
|
p(n, e, i);
|
|
@@ -948,7 +948,7 @@ function Mn(t) {
|
|
|
948
948
|
}
|
|
949
949
|
class Pn extends U {
|
|
950
950
|
constructor(e) {
|
|
951
|
-
super(), N(this, e, null,
|
|
951
|
+
super(), N(this, e, null, Qn, P, {}, Mn);
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
954
|
function Tn(t) {
|
|
@@ -968,12 +968,12 @@ function Nn(t) {
|
|
|
968
968
|
);
|
|
969
969
|
return {
|
|
970
970
|
c() {
|
|
971
|
-
e = k("button"), l && l.c(), _(e, "class", r =
|
|
971
|
+
e = k("button"), l && l.c(), _(e, "class", r = Ie(`intent-${/*intent*/
|
|
972
972
|
t[0]}`) + " svelte-1rmxk7q"), e.disabled = /*disabled*/
|
|
973
973
|
t[1];
|
|
974
974
|
},
|
|
975
975
|
m(c, a) {
|
|
976
|
-
p(c, e, a), l && l.m(e, null), n = !0, i || (o =
|
|
976
|
+
p(c, e, a), l && l.m(e, null), n = !0, i || (o = $e(
|
|
977
977
|
e,
|
|
978
978
|
"click",
|
|
979
979
|
/*click_handler*/
|
|
@@ -1000,7 +1000,7 @@ function Nn(t) {
|
|
|
1000
1000
|
),
|
|
1001
1001
|
null
|
|
1002
1002
|
), (!n || a & /*intent*/
|
|
1003
|
-
1 && r !== (r =
|
|
1003
|
+
1 && r !== (r = Ie(`intent-${/*intent*/
|
|
1004
1004
|
c[0]}`) + " svelte-1rmxk7q")) && _(e, "class", r), (!n || a & /*disabled*/
|
|
1005
1005
|
2) && (e.disabled = /*disabled*/
|
|
1006
1006
|
c[1]);
|
|
@@ -1025,7 +1025,7 @@ function Un(t, e, r) {
|
|
|
1025
1025
|
"intent" in c && r(0, o = c.intent), "disabled" in c && r(1, s = c.disabled), "$$scope" in c && r(2, i = c.$$scope);
|
|
1026
1026
|
}, [o, s, i, n, l];
|
|
1027
1027
|
}
|
|
1028
|
-
class
|
|
1028
|
+
class we extends U {
|
|
1029
1029
|
constructor(e) {
|
|
1030
1030
|
super(), N(this, e, Un, Nn, P, { intent: 0, disabled: 1 }, Tn);
|
|
1031
1031
|
}
|
|
@@ -1158,7 +1158,7 @@ function Fn(t, e, r) {
|
|
|
1158
1158
|
"gutter" in s && r(0, o = s.gutter), "$$scope" in s && r(1, i = s.$$scope);
|
|
1159
1159
|
}, [o, i, n];
|
|
1160
1160
|
}
|
|
1161
|
-
class
|
|
1161
|
+
class ve extends U {
|
|
1162
1162
|
constructor(e) {
|
|
1163
1163
|
super(), N(this, e, Fn, xn, P, { gutter: 0 }, Ln);
|
|
1164
1164
|
}
|
|
@@ -1171,11 +1171,11 @@ function Hn(t) {
|
|
|
1171
1171
|
let e, r, n, i, o;
|
|
1172
1172
|
return {
|
|
1173
1173
|
c() {
|
|
1174
|
-
e = k("button"), r = k("img"),
|
|
1174
|
+
e = k("button"), r = k("img"), Z(r.src, n = Gn) || _(r, "src", n), _(r, "alt", "close"), _(e, "class", "close-button svelte-14xreta"), e.disabled = /*disabled*/
|
|
1175
1175
|
t[0];
|
|
1176
1176
|
},
|
|
1177
1177
|
m(s, l) {
|
|
1178
|
-
p(s, e, l), D(e, r), i || (o =
|
|
1178
|
+
p(s, e, l), D(e, r), i || (o = $e(
|
|
1179
1179
|
e,
|
|
1180
1180
|
"click",
|
|
1181
1181
|
/*click_handler*/
|
|
@@ -1231,7 +1231,7 @@ function Vn(t) {
|
|
|
1231
1231
|
return {
|
|
1232
1232
|
c() {
|
|
1233
1233
|
e = k("picture"), r = k("source"), i = T(), o = k("img"), _(r, "type", "image/webp"), qt(r, n = /*srcWebp*/
|
|
1234
|
-
t[1]) || _(r, "srcset", n), _(o, "class", "rcb-app-icon svelte-44qpq9"),
|
|
1234
|
+
t[1]) || _(r, "srcset", n), _(o, "class", "rcb-app-icon svelte-44qpq9"), Z(o.src, s = /*src*/
|
|
1235
1235
|
t[0]) || _(o, "src", s), _(o, "alt", "App icon"), _(e, "class", "rcb-app-icon-picture-container svelte-44qpq9");
|
|
1236
1236
|
},
|
|
1237
1237
|
m(l, c) {
|
|
@@ -1241,7 +1241,7 @@ function Vn(t) {
|
|
|
1241
1241
|
c & /*srcWebp*/
|
|
1242
1242
|
2 && n !== (n = /*srcWebp*/
|
|
1243
1243
|
l[1]) && _(r, "srcset", n), c & /*src*/
|
|
1244
|
-
1 && !
|
|
1244
|
+
1 && !Z(o.src, s = /*src*/
|
|
1245
1245
|
l[0]) && _(o, "src", s);
|
|
1246
1246
|
},
|
|
1247
1247
|
d(l) {
|
|
@@ -1286,7 +1286,7 @@ class yt extends U {
|
|
|
1286
1286
|
super(), N(this, e, zn, Wn, P, { src: 0, srcWebp: 1 }, jn);
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1289
|
+
const De = (t) => `https://da08ctfrofx1b.cloudfront.net/${t}`;
|
|
1290
1290
|
function Xn(t) {
|
|
1291
1291
|
O(t, "svelte-10uf5fq", ".app-title.svelte-10uf5fq{font-weight:500;margin:8px 0;font-size:16px}.rcb-header-layout__business-info.svelte-10uf5fq{display:flex;align-items:center}");
|
|
1292
1292
|
}
|
|
@@ -1335,7 +1335,7 @@ function er(t) {
|
|
|
1335
1335
|
s = null;
|
|
1336
1336
|
}), x()), (!o || c & /*brandingInfo*/
|
|
1337
1337
|
1) && n !== (n = /*brandingInfo*/
|
|
1338
|
-
l[0].seller_company_name + "") &&
|
|
1338
|
+
l[0].seller_company_name + "") && ne(i, n);
|
|
1339
1339
|
},
|
|
1340
1340
|
i(l) {
|
|
1341
1341
|
o || (u(s), o = !0);
|
|
@@ -1352,11 +1352,11 @@ function rt(t) {
|
|
|
1352
1352
|
let e, r;
|
|
1353
1353
|
return e = new yt({
|
|
1354
1354
|
props: {
|
|
1355
|
-
src:
|
|
1355
|
+
src: De(
|
|
1356
1356
|
/*brandingInfo*/
|
|
1357
1357
|
t[0].app_icon
|
|
1358
1358
|
),
|
|
1359
|
-
srcWebp:
|
|
1359
|
+
srcWebp: De(
|
|
1360
1360
|
/*brandingInfo*/
|
|
1361
1361
|
t[0].app_icon_webp
|
|
1362
1362
|
)
|
|
@@ -1371,11 +1371,11 @@ function rt(t) {
|
|
|
1371
1371
|
p(n, i) {
|
|
1372
1372
|
const o = {};
|
|
1373
1373
|
i & /*brandingInfo*/
|
|
1374
|
-
1 && (o.src =
|
|
1374
|
+
1 && (o.src = De(
|
|
1375
1375
|
/*brandingInfo*/
|
|
1376
1376
|
n[0].app_icon
|
|
1377
1377
|
)), i & /*brandingInfo*/
|
|
1378
|
-
1 && (o.srcWebp =
|
|
1378
|
+
1 && (o.srcWebp = De(
|
|
1379
1379
|
/*brandingInfo*/
|
|
1380
1380
|
n[0].app_icon_webp
|
|
1381
1381
|
)), e.$set(o);
|
|
@@ -1545,7 +1545,7 @@ function ur(t) {
|
|
|
1545
1545
|
},
|
|
1546
1546
|
p(c, a) {
|
|
1547
1547
|
(!o || a & /*title*/
|
|
1548
|
-
4) &&
|
|
1548
|
+
4) && ne(
|
|
1549
1549
|
r,
|
|
1550
1550
|
/*title*/
|
|
1551
1551
|
c[2]
|
|
@@ -1592,7 +1592,7 @@ function fr(t) {
|
|
|
1592
1592
|
t[5],
|
|
1593
1593
|
it
|
|
1594
1594
|
);
|
|
1595
|
-
return r = new
|
|
1595
|
+
return r = new ve({
|
|
1596
1596
|
props: {
|
|
1597
1597
|
gutter: "16px",
|
|
1598
1598
|
$$slots: { default: [ur] },
|
|
@@ -1642,7 +1642,7 @@ function fr(t) {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
function dr(t) {
|
|
1644
1644
|
let e, r, n;
|
|
1645
|
-
return r = new
|
|
1645
|
+
return r = new ve({
|
|
1646
1646
|
props: {
|
|
1647
1647
|
gutter: "16px",
|
|
1648
1648
|
$$slots: { default: [fr] },
|
|
@@ -1698,7 +1698,7 @@ function mr(t) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
function gr(t) {
|
|
1700
1700
|
let e, r;
|
|
1701
|
-
return e = new
|
|
1701
|
+
return e = new we({
|
|
1702
1702
|
props: {
|
|
1703
1703
|
$$slots: { default: [mr] },
|
|
1704
1704
|
$$scope: { ctx: t }
|
|
@@ -1789,7 +1789,7 @@ function pr(t) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
function _r(t) {
|
|
1791
1791
|
let e, r;
|
|
1792
|
-
return e = new
|
|
1792
|
+
return e = new ve({
|
|
1793
1793
|
props: {
|
|
1794
1794
|
gutter: "32px",
|
|
1795
1795
|
$$slots: { default: [pr] },
|
|
@@ -1857,7 +1857,7 @@ function ot(t) {
|
|
|
1857
1857
|
},
|
|
1858
1858
|
p(s, l) {
|
|
1859
1859
|
l & /*supportEmail*/
|
|
1860
|
-
2 &&
|
|
1860
|
+
2 && ne(
|
|
1861
1861
|
n,
|
|
1862
1862
|
/*supportEmail*/
|
|
1863
1863
|
s[1]
|
|
@@ -2006,7 +2006,7 @@ function vr(t) {
|
|
|
2006
2006
|
let e, r;
|
|
2007
2007
|
return {
|
|
2008
2008
|
c() {
|
|
2009
|
-
e = k("img"),
|
|
2009
|
+
e = k("img"), Z(e.src, r = kr) || _(e, "src", r), _(e, "alt", "icon"), _(e, "class", "rcb-ui-asset-icon svelte-1609h93");
|
|
2010
2010
|
},
|
|
2011
2011
|
m(n, i) {
|
|
2012
2012
|
p(n, e, i);
|
|
@@ -2106,15 +2106,15 @@ function Cr(t) {
|
|
|
2106
2106
|
}
|
|
2107
2107
|
};
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2109
|
+
function Mr(t, e, r) {
|
|
2110
2110
|
let { brandingInfo: n = null } = e, { onContinue: i } = e;
|
|
2111
2111
|
return t.$$set = (o) => {
|
|
2112
2112
|
"brandingInfo" in o && r(0, n = o.brandingInfo), "onContinue" in o && r(1, i = o.onContinue);
|
|
2113
2113
|
}, [n, i];
|
|
2114
2114
|
}
|
|
2115
|
-
class
|
|
2115
|
+
class Qr extends U {
|
|
2116
2116
|
constructor(e) {
|
|
2117
|
-
super(), N(this, e,
|
|
2117
|
+
super(), N(this, e, Mr, Cr, P, { brandingInfo: 0, onContinue: 1 });
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
2120
|
function Pr(t, e, r, n, i = {}) {
|
|
@@ -2279,15 +2279,15 @@ function Or(t) {
|
|
|
2279
2279
|
};
|
|
2280
2280
|
}
|
|
2281
2281
|
function Lr(t, e, r) {
|
|
2282
|
-
let n, { $$slots: i = {}, $$scope: o } = e, { stripe: s } = e, { mode: l = void 0 } = e, { theme: c = "stripe" } = e, { variables: a = {} } = e, { rules: f = {} } = e, { labels: d = "above" } = e, { loader: E = "auto" } = e, { fonts: v = [] } = e, { locale: A = "auto" } = e, { currency:
|
|
2282
|
+
let n, { $$slots: i = {}, $$scope: o } = e, { stripe: s } = e, { mode: l = void 0 } = e, { theme: c = "stripe" } = e, { variables: a = {} } = e, { rules: f = {} } = e, { labels: d = "above" } = e, { loader: E = "auto" } = e, { fonts: v = [] } = e, { locale: A = "auto" } = e, { currency: M = void 0 } = e, { amount: h = void 0 } = e, { clientSecret: y = void 0 } = e, { elements: F = null } = e;
|
|
2283
2283
|
return t.$$set = ($) => {
|
|
2284
|
-
"stripe" in $ && r(1, s = $.stripe), "mode" in $ && r(2, l = $.mode), "theme" in $ && r(3, c = $.theme), "variables" in $ && r(4, a = $.variables), "rules" in $ && r(5, f = $.rules), "labels" in $ && r(6, d = $.labels), "loader" in $ && r(7, E = $.loader), "fonts" in $ && r(8, v = $.fonts), "locale" in $ && r(9, A = $.locale), "currency" in $ && r(10,
|
|
2284
|
+
"stripe" in $ && r(1, s = $.stripe), "mode" in $ && r(2, l = $.mode), "theme" in $ && r(3, c = $.theme), "variables" in $ && r(4, a = $.variables), "rules" in $ && r(5, f = $.rules), "labels" in $ && r(6, d = $.labels), "loader" in $ && r(7, E = $.loader), "fonts" in $ && r(8, v = $.fonts), "locale" in $ && r(9, A = $.locale), "currency" in $ && r(10, M = $.currency), "amount" in $ && r(11, h = $.amount), "clientSecret" in $ && r(12, y = $.clientSecret), "elements" in $ && r(0, F = $.elements), "$$scope" in $ && r(14, o = $.$$scope);
|
|
2285
2285
|
}, t.$$.update = () => {
|
|
2286
2286
|
t.$$.dirty & /*theme, variables, rules, labels*/
|
|
2287
2287
|
120 && r(13, n = { theme: c, variables: a, rules: f, labels: d }), t.$$.dirty & /*stripe, elements, mode, currency, amount, appearance, clientSecret, fonts, loader, locale*/
|
|
2288
2288
|
16263 && s && !F && (r(0, F = s.elements({
|
|
2289
2289
|
mode: l,
|
|
2290
|
-
currency:
|
|
2290
|
+
currency: M,
|
|
2291
2291
|
amount: h,
|
|
2292
2292
|
appearance: n,
|
|
2293
2293
|
clientSecret: y,
|
|
@@ -2307,7 +2307,7 @@ function Lr(t, e, r) {
|
|
|
2307
2307
|
E,
|
|
2308
2308
|
v,
|
|
2309
2309
|
A,
|
|
2310
|
-
|
|
2310
|
+
M,
|
|
2311
2311
|
h,
|
|
2312
2312
|
y,
|
|
2313
2313
|
n,
|
|
@@ -2334,8 +2334,8 @@ class xr extends U {
|
|
|
2334
2334
|
});
|
|
2335
2335
|
}
|
|
2336
2336
|
}
|
|
2337
|
-
var
|
|
2338
|
-
for (var e = document.querySelectorAll('script[src^="'.concat(
|
|
2337
|
+
var Mt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, lt = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Gr = function() {
|
|
2338
|
+
for (var e = document.querySelectorAll('script[src^="'.concat(Mt, '"]')), r = 0; r < e.length; r++) {
|
|
2339
2339
|
var n = e[r];
|
|
2340
2340
|
if (Fr.test(n.src))
|
|
2341
2341
|
return n;
|
|
@@ -2343,7 +2343,7 @@ var Qt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.
|
|
|
2343
2343
|
return null;
|
|
2344
2344
|
}, ct = function(e) {
|
|
2345
2345
|
var r = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
|
|
2346
|
-
n.src = "".concat(
|
|
2346
|
+
n.src = "".concat(Mt).concat(r);
|
|
2347
2347
|
var i = document.head || document.body;
|
|
2348
2348
|
if (!i)
|
|
2349
2349
|
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
@@ -2351,10 +2351,10 @@ var Qt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.
|
|
|
2351
2351
|
}, Yr = function(e, r) {
|
|
2352
2352
|
!e || !e._registerWrapper || e._registerWrapper({
|
|
2353
2353
|
name: "stripe-js",
|
|
2354
|
-
version: "2.
|
|
2354
|
+
version: "2.4.0",
|
|
2355
2355
|
startTime: r
|
|
2356
2356
|
});
|
|
2357
|
-
}, me = null,
|
|
2357
|
+
}, me = null, Ce = null, Me = null, Hr = function(e) {
|
|
2358
2358
|
return function() {
|
|
2359
2359
|
e(new Error("Failed to load Stripe.js"));
|
|
2360
2360
|
};
|
|
@@ -2378,11 +2378,11 @@ var Qt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.
|
|
|
2378
2378
|
console.warn(lt);
|
|
2379
2379
|
else if (!i)
|
|
2380
2380
|
i = ct(e);
|
|
2381
|
-
else if (i &&
|
|
2381
|
+
else if (i && Me !== null && Ce !== null) {
|
|
2382
2382
|
var o;
|
|
2383
|
-
i.removeEventListener("load",
|
|
2383
|
+
i.removeEventListener("load", Me), i.removeEventListener("error", Ce), (o = i.parentNode) === null || o === void 0 || o.removeChild(i), i = ct(e);
|
|
2384
2384
|
}
|
|
2385
|
-
|
|
2385
|
+
Me = Kr(r, n), Ce = Hr(n), i.addEventListener("load", Me), i.addEventListener("error", Ce);
|
|
2386
2386
|
} catch (s) {
|
|
2387
2387
|
n(s);
|
|
2388
2388
|
return;
|
|
@@ -2395,7 +2395,7 @@ var Qt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.
|
|
|
2395
2395
|
return null;
|
|
2396
2396
|
var i = e.apply(void 0, r);
|
|
2397
2397
|
return Yr(i, n), i;
|
|
2398
|
-
}, ge,
|
|
2398
|
+
}, ge, Qt = !1, Pt = function() {
|
|
2399
2399
|
return ge || (ge = qr(null).catch(function(e) {
|
|
2400
2400
|
return ge = null, Promise.reject(e);
|
|
2401
2401
|
}), ge);
|
|
@@ -2403,12 +2403,12 @@ var Qt = "https://js.stripe.com/v3", Fr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.
|
|
|
2403
2403
|
Promise.resolve().then(function() {
|
|
2404
2404
|
return Pt();
|
|
2405
2405
|
}).catch(function(t) {
|
|
2406
|
-
|
|
2406
|
+
Qt || console.warn(t);
|
|
2407
2407
|
});
|
|
2408
2408
|
var Jr = function() {
|
|
2409
2409
|
for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
|
|
2410
2410
|
r[n] = arguments[n];
|
|
2411
|
-
|
|
2411
|
+
Qt = !0;
|
|
2412
2412
|
var i = Date.now();
|
|
2413
2413
|
return Pt().then(function(o) {
|
|
2414
2414
|
return jr(o, r, i);
|
|
@@ -2515,7 +2515,7 @@ function ei(t) {
|
|
|
2515
2515
|
let e, r;
|
|
2516
2516
|
return {
|
|
2517
2517
|
c() {
|
|
2518
|
-
e = k("img"),
|
|
2518
|
+
e = k("img"), Z(e.src, r = Zr) || _(e, "src", r), _(e, "alt", "icon"), _(e, "class", "rcb-ui-asset-icon");
|
|
2519
2519
|
},
|
|
2520
2520
|
m(n, i) {
|
|
2521
2521
|
p(n, e, i);
|
|
@@ -2648,7 +2648,7 @@ function si(t) {
|
|
|
2648
2648
|
e = k("form"), w(r.$$.fragment);
|
|
2649
2649
|
},
|
|
2650
2650
|
m(a, f) {
|
|
2651
|
-
p(a, e, f), I(r, e, null), i = !0, o || (s =
|
|
2651
|
+
p(a, e, f), I(r, e, null), i = !0, o || (s = $e(e, "submit", kt(
|
|
2652
2652
|
/*handleContinue*/
|
|
2653
2653
|
t[5]
|
|
2654
2654
|
)), o = !0);
|
|
@@ -2801,7 +2801,7 @@ function di(t) {
|
|
|
2801
2801
|
}
|
|
2802
2802
|
function mi(t) {
|
|
2803
2803
|
let e, r, n, i;
|
|
2804
|
-
return e = new
|
|
2804
|
+
return e = new we({
|
|
2805
2805
|
props: {
|
|
2806
2806
|
disabled: (
|
|
2807
2807
|
/*processing*/
|
|
@@ -2810,7 +2810,7 @@ function mi(t) {
|
|
|
2810
2810
|
$$slots: { default: [fi] },
|
|
2811
2811
|
$$scope: { ctx: t }
|
|
2812
2812
|
}
|
|
2813
|
-
}), n = new
|
|
2813
|
+
}), n = new we({
|
|
2814
2814
|
props: {
|
|
2815
2815
|
disabled: (
|
|
2816
2816
|
/*processing*/
|
|
@@ -2858,7 +2858,7 @@ function mi(t) {
|
|
|
2858
2858
|
}
|
|
2859
2859
|
function gi(t) {
|
|
2860
2860
|
let e, r;
|
|
2861
|
-
return e = new
|
|
2861
|
+
return e = new ve({
|
|
2862
2862
|
props: {
|
|
2863
2863
|
$$slots: { default: [mi] },
|
|
2864
2864
|
$$scope: { ctx: t }
|
|
@@ -2971,10 +2971,10 @@ function Ai(t, e, r) {
|
|
|
2971
2971
|
const c = s.data.client_secret;
|
|
2972
2972
|
let a = null, f, d;
|
|
2973
2973
|
Se(async () => {
|
|
2974
|
-
const A = s.data.publishable_api_key,
|
|
2975
|
-
if (!A || !
|
|
2974
|
+
const A = s.data.publishable_api_key, M = s.data.stripe_account_id;
|
|
2975
|
+
if (!A || !M)
|
|
2976
2976
|
throw new Error("Stripe publishable key or account ID not found");
|
|
2977
|
-
r(3, a = await Jr(A, { stripeAccount:
|
|
2977
|
+
r(3, a = await Jr(A, { stripeAccount: M }));
|
|
2978
2978
|
});
|
|
2979
2979
|
const E = async () => {
|
|
2980
2980
|
if (l || !a || !d)
|
|
@@ -3057,7 +3057,7 @@ function at(t) {
|
|
|
3057
3057
|
},
|
|
3058
3058
|
p(n, i) {
|
|
3059
3059
|
i & /*error*/
|
|
3060
|
-
4 &&
|
|
3060
|
+
4 && ne(
|
|
3061
3061
|
r,
|
|
3062
3062
|
/*error*/
|
|
3063
3063
|
n[2]
|
|
@@ -3083,7 +3083,7 @@ function bi(t) {
|
|
|
3083
3083
|
o,
|
|
3084
3084
|
/*email*/
|
|
3085
3085
|
t[3]
|
|
3086
|
-
), D(e, l), f && f.m(e, null), c || (a =
|
|
3086
|
+
), D(e, l), f && f.m(e, null), c || (a = $e(
|
|
3087
3087
|
o,
|
|
3088
3088
|
"input",
|
|
3089
3089
|
/*input_input_handler*/
|
|
@@ -3192,7 +3192,7 @@ function vi(t) {
|
|
|
3192
3192
|
}
|
|
3193
3193
|
function Bi(t) {
|
|
3194
3194
|
let e, r, n, i;
|
|
3195
|
-
return e = new
|
|
3195
|
+
return e = new we({
|
|
3196
3196
|
props: {
|
|
3197
3197
|
disabled: (
|
|
3198
3198
|
/*processing*/
|
|
@@ -3201,7 +3201,7 @@ function Bi(t) {
|
|
|
3201
3201
|
$$slots: { default: [$i] },
|
|
3202
3202
|
$$scope: { ctx: t }
|
|
3203
3203
|
}
|
|
3204
|
-
}), n = new
|
|
3204
|
+
}), n = new we({
|
|
3205
3205
|
props: {
|
|
3206
3206
|
intent: "secondary",
|
|
3207
3207
|
disabled: (
|
|
@@ -3249,7 +3249,7 @@ function Bi(t) {
|
|
|
3249
3249
|
}
|
|
3250
3250
|
function yi(t) {
|
|
3251
3251
|
let e, r;
|
|
3252
|
-
return e = new
|
|
3252
|
+
return e = new ve({
|
|
3253
3253
|
props: {
|
|
3254
3254
|
$$slots: { default: [Bi] },
|
|
3255
3255
|
$$scope: { ctx: t }
|
|
@@ -3299,7 +3299,7 @@ function Di(t) {
|
|
|
3299
3299
|
e = k("form"), w(r.$$.fragment), n = T(), w(i.$$.fragment), o = T(), w(s.$$.fragment), _(e, "class", "svelte-favd20");
|
|
3300
3300
|
},
|
|
3301
3301
|
m(f, d) {
|
|
3302
|
-
p(f, e, d), I(r, e, null), D(e, n), I(i, e, null), D(e, o), I(s, e, null), l = !0, c || (a =
|
|
3302
|
+
p(f, e, d), I(r, e, null), D(e, n), I(i, e, null), D(e, o), I(s, e, null), l = !0, c || (a = $e(e, "submit", kt(
|
|
3303
3303
|
/*handleContinue*/
|
|
3304
3304
|
t[5]
|
|
3305
3305
|
)), c = !0);
|
|
@@ -3350,12 +3350,12 @@ function Ci(t, e, r) {
|
|
|
3350
3350
|
f
|
|
3351
3351
|
];
|
|
3352
3352
|
}
|
|
3353
|
-
class
|
|
3353
|
+
class Mi extends U {
|
|
3354
3354
|
constructor(e) {
|
|
3355
3355
|
super(), N(this, e, Ci, Di, P, { onContinue: 6, onClose: 0, processing: 1 }, Ei);
|
|
3356
3356
|
}
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3358
|
+
function Qi(t) {
|
|
3359
3359
|
O(t, "svelte-17tslso", ".rcb-modal-backdrop.svelte-17tslso{position:fixed;top:0;left:0;right:0;min-width:100%;width:100vw;width:100dvw;min-height:100%;height:100vh;height:100dvh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around;z-index:1000001}");
|
|
3360
3360
|
}
|
|
3361
3361
|
function Pi(t) {
|
|
@@ -3417,7 +3417,7 @@ function Ti(t, e, r) {
|
|
|
3417
3417
|
}
|
|
3418
3418
|
class Ni extends U {
|
|
3419
3419
|
constructor(e) {
|
|
3420
|
-
super(), N(this, e, Ti, Pi, P, {},
|
|
3420
|
+
super(), N(this, e, Ti, Pi, P, {}, Qi);
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
3423
|
function Ui(t) {
|
|
@@ -3437,7 +3437,7 @@ function Ri(t) {
|
|
|
3437
3437
|
);
|
|
3438
3438
|
return {
|
|
3439
3439
|
c() {
|
|
3440
|
-
e = k("div"), r = k("main"), s && s.c(), _(r, "class", n =
|
|
3440
|
+
e = k("div"), r = k("main"), s && s.c(), _(r, "class", n = Ie(`rcb-modal-main ${/*dark*/
|
|
3441
3441
|
t[0] ? "rcb-modal-dark" : ""}`) + " svelte-ioxu5d"), _(e, "class", "rcb-modal-container svelte-ioxu5d");
|
|
3442
3442
|
},
|
|
3443
3443
|
m(l, c) {
|
|
@@ -3463,7 +3463,7 @@ function Ri(t) {
|
|
|
3463
3463
|
),
|
|
3464
3464
|
null
|
|
3465
3465
|
), (!i || c & /*dark*/
|
|
3466
|
-
1 && n !== (n =
|
|
3466
|
+
1 && n !== (n = Ie(`rcb-modal-main ${/*dark*/
|
|
3467
3467
|
l[0] ? "rcb-modal-dark" : ""}`) + " svelte-ioxu5d")) && _(r, "class", n);
|
|
3468
3468
|
},
|
|
3469
3469
|
i(l) {
|
|
@@ -3790,8 +3790,8 @@ class Nt extends U {
|
|
|
3790
3790
|
super(), N(this, e, Ji, ji, P, { dark: 0 });
|
|
3791
3791
|
}
|
|
3792
3792
|
}
|
|
3793
|
-
var
|
|
3794
|
-
class
|
|
3793
|
+
var te = /* @__PURE__ */ ((t) => (t[t.UnknownError = 0] = "UnknownError", t[t.UserCancelledError = 1] = "UserCancelledError", t[t.StoreProblemError = 2] = "StoreProblemError", t[t.PurchaseNotAllowedError = 3] = "PurchaseNotAllowedError", t[t.PurchaseInvalidError = 4] = "PurchaseInvalidError", t[t.ProductNotAvailableForPurchaseError = 5] = "ProductNotAvailableForPurchaseError", t[t.ProductAlreadyPurchasedError = 6] = "ProductAlreadyPurchasedError", t[t.ReceiptAlreadyInUseError = 7] = "ReceiptAlreadyInUseError", t[t.InvalidReceiptError = 8] = "InvalidReceiptError", t[t.MissingReceiptFileError = 9] = "MissingReceiptFileError", t[t.NetworkError = 10] = "NetworkError", t[t.InvalidCredentialsError = 11] = "InvalidCredentialsError", t[t.UnexpectedBackendResponseError = 12] = "UnexpectedBackendResponseError", t[t.InvalidAppUserIdError = 14] = "InvalidAppUserIdError", t[t.OperationAlreadyInProgressError = 15] = "OperationAlreadyInProgressError", t[t.UnknownBackendError = 16] = "UnknownBackendError", t[t.InvalidAppleSubscriptionKeyError = 17] = "InvalidAppleSubscriptionKeyError", t[t.IneligibleError = 18] = "IneligibleError", t[t.InsufficientPermissionsError = 19] = "InsufficientPermissionsError", t[t.PaymentPendingError = 20] = "PaymentPendingError", t[t.InvalidSubscriberAttributesError = 21] = "InvalidSubscriberAttributesError", t[t.LogOutWithAnonymousUserError = 22] = "LogOutWithAnonymousUserError", t[t.ConfigurationError = 23] = "ConfigurationError", t[t.UnsupportedError = 24] = "UnsupportedError", t[t.EmptySubscriberAttributesError = 25] = "EmptySubscriberAttributesError", t[t.CustomerInfoError = 28] = "CustomerInfoError", t[t.SignatureVerificationError = 36] = "SignatureVerificationError", t))(te || {});
|
|
3794
|
+
class Ee {
|
|
3795
3795
|
static getPublicMessage(e) {
|
|
3796
3796
|
switch (e) {
|
|
3797
3797
|
case 0:
|
|
@@ -3909,25 +3909,25 @@ class Pe {
|
|
|
3909
3909
|
}
|
|
3910
3910
|
}
|
|
3911
3911
|
var Ut = /* @__PURE__ */ ((t) => (t[t.BackendInvalidPlatform = 7e3] = "BackendInvalidPlatform", t[t.BackendStoreProblem = 7101] = "BackendStoreProblem", t[t.BackendCannotTransferPurchase = 7102] = "BackendCannotTransferPurchase", t[t.BackendInvalidReceiptToken = 7103] = "BackendInvalidReceiptToken", t[t.BackendInvalidAppStoreSharedSecret = 7104] = "BackendInvalidAppStoreSharedSecret", t[t.BackendInvalidPaymentModeOrIntroPriceNotProvided = 7105] = "BackendInvalidPaymentModeOrIntroPriceNotProvided", t[t.BackendProductIdForGoogleReceiptNotProvided = 7106] = "BackendProductIdForGoogleReceiptNotProvided", t[t.BackendInvalidPlayStoreCredentials = 7107] = "BackendInvalidPlayStoreCredentials", t[t.BackendInternalServerError = 7110] = "BackendInternalServerError", t[t.BackendEmptyAppUserId = 7220] = "BackendEmptyAppUserId", t[t.BackendInvalidAuthToken = 7224] = "BackendInvalidAuthToken", t[t.BackendInvalidAPIKey = 7225] = "BackendInvalidAPIKey", t[t.BackendBadRequest = 7226] = "BackendBadRequest", t[t.BackendPlayStoreQuotaExceeded = 7229] = "BackendPlayStoreQuotaExceeded", t[t.BackendPlayStoreInvalidPackageName = 7230] = "BackendPlayStoreInvalidPackageName", t[t.BackendPlayStoreGenericError = 7231] = "BackendPlayStoreGenericError", t[t.BackendUserIneligibleForPromoOffer = 7232] = "BackendUserIneligibleForPromoOffer", t[t.BackendInvalidAppleSubscriptionKey = 7234] = "BackendInvalidAppleSubscriptionKey", t[t.BackendInvalidSubscriberAttributes = 7263] = "BackendInvalidSubscriberAttributes", t[t.BackendInvalidSubscriberAttributesBody = 7264] = "BackendInvalidSubscriberAttributesBody", t[t.BackendProductIDsMalformed = 7662] = "BackendProductIDsMalformed", t))(Ut || {});
|
|
3912
|
-
class
|
|
3912
|
+
class X extends Error {
|
|
3913
3913
|
constructor(r, n, i) {
|
|
3914
3914
|
super(n);
|
|
3915
|
-
|
|
3915
|
+
Q(this, "toString", () => `PurchasesError(code: ${te[this.errorCode]}, message: ${this.message})`);
|
|
3916
3916
|
this.errorCode = r, this.underlyingErrorMessage = i;
|
|
3917
3917
|
}
|
|
3918
3918
|
/** @internal */
|
|
3919
3919
|
static getForBackendError(r, n) {
|
|
3920
|
-
const i =
|
|
3921
|
-
return new
|
|
3920
|
+
const i = Ee.getErrorCodeForBackendErrorCode(r);
|
|
3921
|
+
return new X(
|
|
3922
3922
|
i,
|
|
3923
|
-
|
|
3923
|
+
Ee.getPublicMessage(i),
|
|
3924
3924
|
n
|
|
3925
3925
|
);
|
|
3926
3926
|
}
|
|
3927
3927
|
/** @internal */
|
|
3928
3928
|
static getForPurchasesFlowError(r) {
|
|
3929
|
-
return new
|
|
3930
|
-
|
|
3929
|
+
return new X(
|
|
3930
|
+
Ee.convertPurchaseFlowErrorCodeToErrorCode(
|
|
3931
3931
|
r.errorCode
|
|
3932
3932
|
),
|
|
3933
3933
|
r.message,
|
|
@@ -3940,7 +3940,7 @@ class Vi extends Error {
|
|
|
3940
3940
|
super("Purchases must be configured before calling getInstance");
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
|
-
const Wi = "0.1.
|
|
3943
|
+
const Wi = "0.1.3", fe = "https://api.revenuecat.com";
|
|
3944
3944
|
var Ue;
|
|
3945
3945
|
(function(t) {
|
|
3946
3946
|
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";
|
|
@@ -3949,12 +3949,20 @@ function qe(t) {
|
|
|
3949
3949
|
return t ? t.startsWith("rcb_sb_") : !1;
|
|
3950
3950
|
}
|
|
3951
3951
|
async function se(t, e, r, n) {
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3952
|
+
try {
|
|
3953
|
+
const i = await fetch(t.url(), {
|
|
3954
|
+
method: t.method,
|
|
3955
|
+
headers: Zi(e, n),
|
|
3956
|
+
body: Xi(r)
|
|
3957
|
+
});
|
|
3958
|
+
return await zi(i, t), await i.json();
|
|
3959
|
+
} catch (i) {
|
|
3960
|
+
throw i instanceof TypeError ? new X(
|
|
3961
|
+
te.NetworkError,
|
|
3962
|
+
Ee.getPublicMessage(te.NetworkError),
|
|
3963
|
+
i.message
|
|
3964
|
+
) : i;
|
|
3965
|
+
}
|
|
3958
3966
|
}
|
|
3959
3967
|
async function zi(t, e) {
|
|
3960
3968
|
const r = t.status;
|
|
@@ -3963,11 +3971,11 @@ async function zi(t, e) {
|
|
|
3963
3971
|
else if (r >= Ue.BAD_REQUEST) {
|
|
3964
3972
|
const n = await t.json(), i = n ? JSON.stringify(n) : null, o = n == null ? void 0 : n.code, s = n == null ? void 0 : n.message;
|
|
3965
3973
|
if (o != null) {
|
|
3966
|
-
const l =
|
|
3974
|
+
const l = Ee.convertCodeToBackendErrorCode(o);
|
|
3967
3975
|
if (l == null)
|
|
3968
3976
|
Ge(e, r, i);
|
|
3969
3977
|
else
|
|
3970
|
-
throw
|
|
3978
|
+
throw X.getForBackendError(
|
|
3971
3979
|
l,
|
|
3972
3980
|
s
|
|
3973
3981
|
);
|
|
@@ -3976,8 +3984,8 @@ async function zi(t, e) {
|
|
|
3976
3984
|
}
|
|
3977
3985
|
}
|
|
3978
3986
|
function Ge(t, e, r) {
|
|
3979
|
-
throw new
|
|
3980
|
-
|
|
3987
|
+
throw new X(
|
|
3988
|
+
te.UnknownBackendError,
|
|
3981
3989
|
`Unknown backend error. Request: ${t.name}. Status code: ${e}. Body: ${r}.`
|
|
3982
3990
|
);
|
|
3983
3991
|
}
|
|
@@ -3998,9 +4006,9 @@ function Zi(t, e) {
|
|
|
3998
4006
|
const Rt = "/v1/subscribers", Oe = "/rcbilling/v1";
|
|
3999
4007
|
class eo {
|
|
4000
4008
|
constructor(e) {
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4009
|
+
Q(this, "appUserId");
|
|
4010
|
+
Q(this, "method", "GET");
|
|
4011
|
+
Q(this, "name", "getOfferings");
|
|
4004
4012
|
this.appUserId = e;
|
|
4005
4013
|
}
|
|
4006
4014
|
url() {
|
|
@@ -4010,8 +4018,8 @@ class eo {
|
|
|
4010
4018
|
}
|
|
4011
4019
|
class to {
|
|
4012
4020
|
constructor() {
|
|
4013
|
-
|
|
4014
|
-
|
|
4021
|
+
Q(this, "method", "POST");
|
|
4022
|
+
Q(this, "name", "subscribe");
|
|
4015
4023
|
}
|
|
4016
4024
|
url() {
|
|
4017
4025
|
return `${fe}${Oe}/subscribe`;
|
|
@@ -4019,10 +4027,10 @@ class to {
|
|
|
4019
4027
|
}
|
|
4020
4028
|
class no {
|
|
4021
4029
|
constructor(e, r) {
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4030
|
+
Q(this, "method", "GET");
|
|
4031
|
+
Q(this, "name", "getProducts");
|
|
4032
|
+
Q(this, "appUserId");
|
|
4033
|
+
Q(this, "productIds");
|
|
4026
4034
|
this.appUserId = e, this.productIds = r;
|
|
4027
4035
|
}
|
|
4028
4036
|
url() {
|
|
@@ -4032,9 +4040,9 @@ class no {
|
|
|
4032
4040
|
}
|
|
4033
4041
|
class ro {
|
|
4034
4042
|
constructor(e) {
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4043
|
+
Q(this, "method", "GET");
|
|
4044
|
+
Q(this, "name", "getCustomerInfo");
|
|
4045
|
+
Q(this, "appUserId");
|
|
4038
4046
|
this.appUserId = e;
|
|
4039
4047
|
}
|
|
4040
4048
|
url() {
|
|
@@ -4044,8 +4052,8 @@ class ro {
|
|
|
4044
4052
|
}
|
|
4045
4053
|
class io {
|
|
4046
4054
|
constructor() {
|
|
4047
|
-
|
|
4048
|
-
|
|
4055
|
+
Q(this, "method", "GET");
|
|
4056
|
+
Q(this, "name", "getBrandingInfo");
|
|
4049
4057
|
}
|
|
4050
4058
|
url() {
|
|
4051
4059
|
return `${fe}${Oe}/branding`;
|
|
@@ -4053,9 +4061,9 @@ class io {
|
|
|
4053
4061
|
}
|
|
4054
4062
|
class oo {
|
|
4055
4063
|
constructor(e) {
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4064
|
+
Q(this, "method", "GET");
|
|
4065
|
+
Q(this, "name", "getCheckoutStatus");
|
|
4066
|
+
Q(this, "operationSessionId");
|
|
4059
4067
|
this.operationSessionId = e;
|
|
4060
4068
|
}
|
|
4061
4069
|
url() {
|
|
@@ -4064,7 +4072,7 @@ class oo {
|
|
|
4064
4072
|
}
|
|
4065
4073
|
class so {
|
|
4066
4074
|
constructor(e) {
|
|
4067
|
-
|
|
4075
|
+
Q(this, "API_KEY");
|
|
4068
4076
|
this.API_KEY = e;
|
|
4069
4077
|
}
|
|
4070
4078
|
async getOfferings(e) {
|
|
@@ -4115,7 +4123,7 @@ function co(t) {
|
|
|
4115
4123
|
let e, r;
|
|
4116
4124
|
return {
|
|
4117
4125
|
c() {
|
|
4118
|
-
e = k("img"),
|
|
4126
|
+
e = k("img"), Z(e.src, r = lo) || _(e, "src", r), _(e, "alt", "icon"), _(e, "class", "rcb-ui-asset-icon");
|
|
4119
4127
|
},
|
|
4120
4128
|
m(n, i) {
|
|
4121
4129
|
p(n, e, i);
|
|
@@ -4427,7 +4435,7 @@ function gt(t) {
|
|
|
4427
4435
|
}
|
|
4428
4436
|
function pt(t) {
|
|
4429
4437
|
let e, r;
|
|
4430
|
-
return e = new
|
|
4438
|
+
return e = new Mi({
|
|
4431
4439
|
props: {
|
|
4432
4440
|
onContinue: (
|
|
4433
4441
|
/*handleContinue*/
|
|
@@ -4590,7 +4598,7 @@ function ht(t) {
|
|
|
4590
4598
|
}
|
|
4591
4599
|
function Et(t) {
|
|
4592
4600
|
let e, r;
|
|
4593
|
-
return e = new
|
|
4601
|
+
return e = new Qr({
|
|
4594
4602
|
props: {
|
|
4595
4603
|
brandingInfo: (
|
|
4596
4604
|
/*brandingInfo*/
|
|
@@ -4649,16 +4657,16 @@ function Io(t) {
|
|
|
4649
4657
|
), A = (
|
|
4650
4658
|
/*state*/
|
|
4651
4659
|
t[6] === "error" && ht(t)
|
|
4652
|
-
),
|
|
4660
|
+
), M = (
|
|
4653
4661
|
/*state*/
|
|
4654
4662
|
t[6] === "success" && Et(t)
|
|
4655
4663
|
);
|
|
4656
4664
|
return {
|
|
4657
4665
|
c() {
|
|
4658
|
-
a && a.c(), e = T(), f && f.c(), r = T(), d && d.c(), n = T(), E && E.c(), i = T(), v && v.c(), o = T(), A && A.c(), s = T(),
|
|
4666
|
+
a && a.c(), e = T(), f && f.c(), r = T(), d && d.c(), n = T(), E && E.c(), i = T(), v && v.c(), o = T(), A && A.c(), s = T(), M && M.c(), l = ee();
|
|
4659
4667
|
},
|
|
4660
4668
|
m(h, y) {
|
|
4661
|
-
a && a.m(h, y), p(h, e, y), f && f.m(h, y), p(h, r, y), d && d.m(h, y), p(h, n, y), E && E.m(h, y), p(h, i, y), v && v.m(h, y), p(h, o, y), A && A.m(h, y), p(h, s, y),
|
|
4669
|
+
a && a.m(h, y), p(h, e, y), f && f.m(h, y), p(h, r, y), d && d.m(h, y), p(h, n, y), E && E.m(h, y), p(h, i, y), v && v.m(h, y), p(h, o, y), A && A.m(h, y), p(h, s, y), M && M.m(h, y), p(h, l, y), c = !0;
|
|
4662
4670
|
},
|
|
4663
4671
|
p(h, y) {
|
|
4664
4672
|
/*state*/
|
|
@@ -4691,19 +4699,19 @@ function Io(t) {
|
|
|
4691
4699
|
64 && u(A, 1)) : (A = ht(h), A.c(), u(A, 1), A.m(s.parentNode, s)) : A && (L(), m(A, 1, 1, () => {
|
|
4692
4700
|
A = null;
|
|
4693
4701
|
}), x()), /*state*/
|
|
4694
|
-
h[6] === "success" ?
|
|
4695
|
-
64 && u(
|
|
4696
|
-
|
|
4702
|
+
h[6] === "success" ? M ? (M.p(h, y), y & /*state*/
|
|
4703
|
+
64 && u(M, 1)) : (M = Et(h), M.c(), u(M, 1), M.m(l.parentNode, l)) : M && (L(), m(M, 1, 1, () => {
|
|
4704
|
+
M = null;
|
|
4697
4705
|
}), x());
|
|
4698
4706
|
},
|
|
4699
4707
|
i(h) {
|
|
4700
|
-
c || (u(a), u(f), u(d), u(E), u(v), u(A), u(
|
|
4708
|
+
c || (u(a), u(f), u(d), u(E), u(v), u(A), u(M), c = !0);
|
|
4701
4709
|
},
|
|
4702
4710
|
o(h) {
|
|
4703
|
-
m(a), m(f), m(d), m(E), m(v), m(A), m(
|
|
4711
|
+
m(a), m(f), m(d), m(E), m(v), m(A), m(M), c = !1;
|
|
4704
4712
|
},
|
|
4705
4713
|
d(h) {
|
|
4706
|
-
h && (g(e), g(r), g(n), g(i), g(o), g(s), g(l)), a && a.d(h), f && f.d(h), d && d.d(h), E && E.d(h), v && v.d(h), A && A.d(h),
|
|
4714
|
+
h && (g(e), g(r), g(n), g(i), g(o), g(s), g(l)), a && a.d(h), f && f.d(h), d && d.d(h), E && E.d(h), v && v.d(h), A && A.d(h), M && M.d(h);
|
|
4707
4715
|
}
|
|
4708
4716
|
};
|
|
4709
4717
|
}
|
|
@@ -4797,7 +4805,7 @@ function ko(t, e, r) {
|
|
|
4797
4805
|
var We;
|
|
4798
4806
|
let { asModal: n = !0 } = e, { customerEmail: i } = e, { appUserId: o } = e, { rcPackage: s } = e, { onFinished: l } = e, { onError: c } = e, { onClose: a } = e, { purchases: f } = e, { backend: d } = e, { purchaseOperationHelper: E } = e;
|
|
4799
4807
|
const v = Object.entries(Ae).map(([C, Le]) => `--rc-color-${C}: ${Le}`).join("; ");
|
|
4800
|
-
let A = null,
|
|
4808
|
+
let A = null, M = null, h = null, y = null;
|
|
4801
4809
|
const F = ((We = s.rcBillingProduct) == null ? void 0 : We.identifier) ?? null;
|
|
4802
4810
|
let $ = "present-offer";
|
|
4803
4811
|
const de = [
|
|
@@ -4809,12 +4817,12 @@ function ko(t, e, r) {
|
|
|
4809
4817
|
"loading"
|
|
4810
4818
|
];
|
|
4811
4819
|
Se(async () => {
|
|
4812
|
-
if (r(2, A = s.rcBillingProduct), r(3,
|
|
4820
|
+
if (r(2, A = s.rcBillingProduct), r(3, M = await d.getBrandingInfo()), $ === "present-offer") {
|
|
4813
4821
|
i ? ie() : r(6, $ = "needs-auth-info");
|
|
4814
4822
|
return;
|
|
4815
4823
|
}
|
|
4816
4824
|
});
|
|
4817
|
-
const
|
|
4825
|
+
const Be = () => {
|
|
4818
4826
|
a();
|
|
4819
4827
|
}, ie = () => {
|
|
4820
4828
|
if (F === null) {
|
|
@@ -4867,13 +4875,13 @@ function ko(t, e, r) {
|
|
|
4867
4875
|
n,
|
|
4868
4876
|
f,
|
|
4869
4877
|
A,
|
|
4870
|
-
|
|
4878
|
+
M,
|
|
4871
4879
|
h,
|
|
4872
4880
|
y,
|
|
4873
4881
|
$,
|
|
4874
4882
|
v,
|
|
4875
4883
|
de,
|
|
4876
|
-
|
|
4884
|
+
Be,
|
|
4877
4885
|
z,
|
|
4878
4886
|
W,
|
|
4879
4887
|
St,
|
|
@@ -4928,8 +4936,8 @@ function Bo(t, e, r, n) {
|
|
|
4928
4936
|
e,
|
|
4929
4937
|
n[i]
|
|
4930
4938
|
);
|
|
4931
|
-
throw new
|
|
4932
|
-
|
|
4939
|
+
throw new X(
|
|
4940
|
+
te.CustomerInfoError,
|
|
4933
4941
|
"Could not find entitlement product in subscriptions or non-subscriptions."
|
|
4934
4942
|
);
|
|
4935
4943
|
}
|
|
@@ -4937,7 +4945,7 @@ function yo(t, e, r) {
|
|
|
4937
4945
|
return {
|
|
4938
4946
|
identifier: t,
|
|
4939
4947
|
isActive: vo(e),
|
|
4940
|
-
willRenew:
|
|
4948
|
+
willRenew: Qo(e, r),
|
|
4941
4949
|
store: (r == null ? void 0 : r.store) ?? "unknown",
|
|
4942
4950
|
latestPurchaseDate: new Date(e.purchase_date),
|
|
4943
4951
|
originalPurchaseDate: new Date(e.purchase_date),
|
|
@@ -4990,7 +4998,7 @@ function Co(t, e, r) {
|
|
|
4990
4998
|
function Te(t) {
|
|
4991
4999
|
return t == null ? null : new Date(t);
|
|
4992
5000
|
}
|
|
4993
|
-
function
|
|
5001
|
+
function Mo(t) {
|
|
4994
5002
|
const e = To(t), r = t.subscriber, n = Uo(
|
|
4995
5003
|
r.non_subscriptions
|
|
4996
5004
|
);
|
|
@@ -5015,7 +5023,7 @@ function Qo(t) {
|
|
|
5015
5023
|
originalAppUserId: t.subscriber.original_app_user_id
|
|
5016
5024
|
};
|
|
5017
5025
|
}
|
|
5018
|
-
function
|
|
5026
|
+
function Qo(t, e) {
|
|
5019
5027
|
if (e == null)
|
|
5020
5028
|
return !1;
|
|
5021
5029
|
const r = e.store == "promotional", n = t.expires_date == null, i = e.unsubscribe_detected_at != null, o = e.billing_issues_detected_at != null;
|
|
@@ -5065,8 +5073,8 @@ function Uo(t) {
|
|
|
5065
5073
|
}
|
|
5066
5074
|
function Ro(t) {
|
|
5067
5075
|
if (!t.startsWith("rcb_"))
|
|
5068
|
-
throw new
|
|
5069
|
-
|
|
5076
|
+
throw new X(
|
|
5077
|
+
te.InvalidCredentialsError,
|
|
5070
5078
|
"Invalid API key. Use your RevenueCat Billing API key."
|
|
5071
5079
|
);
|
|
5072
5080
|
}
|
|
@@ -5084,8 +5092,8 @@ function So(t) {
|
|
|
5084
5092
|
"undefined",
|
|
5085
5093
|
"unknown"
|
|
5086
5094
|
])).has(t) || t.includes("/"))
|
|
5087
|
-
throw new
|
|
5088
|
-
|
|
5095
|
+
throw new X(
|
|
5096
|
+
te.InvalidAppUserIdError,
|
|
5089
5097
|
'Provided user id: "' + t + '" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.'
|
|
5090
5098
|
);
|
|
5091
5099
|
}
|
|
@@ -5093,15 +5101,15 @@ const J = class J {
|
|
|
5093
5101
|
/** @internal */
|
|
5094
5102
|
constructor(e, r) {
|
|
5095
5103
|
/** @internal */
|
|
5096
|
-
|
|
5104
|
+
Q(this, "_API_KEY");
|
|
5097
5105
|
/** @internal */
|
|
5098
|
-
|
|
5106
|
+
Q(this, "_appUserId");
|
|
5099
5107
|
/** @internal */
|
|
5100
|
-
|
|
5108
|
+
Q(this, "backend");
|
|
5101
5109
|
/** @internal */
|
|
5102
|
-
|
|
5110
|
+
Q(this, "purchaseOperationHelper");
|
|
5103
5111
|
/** @internal */
|
|
5104
|
-
|
|
5112
|
+
Q(this, "toOfferings", (e, r) => {
|
|
5105
5113
|
const n = e.offerings.find(
|
|
5106
5114
|
(l) => l.identifier === e.current_offering_id
|
|
5107
5115
|
) ?? null, i = {};
|
|
@@ -5219,10 +5227,10 @@ const J = class J {
|
|
|
5219
5227
|
});
|
|
5220
5228
|
},
|
|
5221
5229
|
onClose: () => {
|
|
5222
|
-
o.innerHTML = "", V.debugLog("Purchase cancelled by user"), a(new
|
|
5230
|
+
o.innerHTML = "", V.debugLog("Purchase cancelled by user"), a(new X(te.UserCancelledError));
|
|
5223
5231
|
},
|
|
5224
5232
|
onError: (f) => {
|
|
5225
|
-
o.innerHTML = "", a(
|
|
5233
|
+
o.innerHTML = "", a(X.getForPurchasesFlowError(f));
|
|
5226
5234
|
},
|
|
5227
5235
|
purchases: this,
|
|
5228
5236
|
backend: this.backend,
|
|
@@ -5286,17 +5294,17 @@ const J = class J {
|
|
|
5286
5294
|
/** @internal */
|
|
5287
5295
|
async _getCustomerInfoForUserId(e) {
|
|
5288
5296
|
const r = await this.backend.getCustomerInfo(e);
|
|
5289
|
-
return
|
|
5297
|
+
return Mo(r);
|
|
5290
5298
|
}
|
|
5291
5299
|
};
|
|
5292
5300
|
/** @internal */
|
|
5293
|
-
|
|
5301
|
+
Q(J, "instance");
|
|
5294
5302
|
let It = J;
|
|
5295
5303
|
export {
|
|
5296
|
-
|
|
5304
|
+
te as ErrorCode,
|
|
5297
5305
|
j as LogLevel,
|
|
5298
5306
|
Ft as PackageType,
|
|
5299
5307
|
It as Purchases,
|
|
5300
|
-
|
|
5308
|
+
X as PurchasesError,
|
|
5301
5309
|
Vi as UninitializedPurchasesError
|
|
5302
5310
|
};
|