@revenuecat/purchases-js 1.12.0 → 1.12.1

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.
@@ -23,7 +23,7 @@ var Qn = (e) => [, , , qs((e == null ? void 0 : e[Kn("metadata")]) ?? null)], $n
23
23
  var Zn = (e, r, t, a) => (Ma(e, r, "write to private field"), a ? a.call(e, t) : r.set(e, t), t), js = (e, r, t) => (Ma(e, r, "access private method"), t);
24
24
  const Ms = "5";
25
25
  typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ms);
26
- const gn = 1, mn = 2, Ci = 4, Ns = 8, Cs = 16, Os = 1, Ls = 2, Bs = 4, Rs = 8, Us = 16, Vs = 1, Hs = 2, Ws = 4, Ys = 1, Gs = 2, Ie = Symbol(), Dt = "http://www.w3.org/2000/svg";
26
+ const gn = 1, mn = 2, Ci = 4, Ns = 8, Cs = 16, Os = 1, Ls = 2, Bs = 4, Rs = 8, Us = 16, Vs = 1, Hs = 2, Ws = 4, Ys = 1, Gs = 2, Ie = Symbol(), qt = "http://www.w3.org/2000/svg";
27
27
  function Xs(e) {
28
28
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
29
29
  }
@@ -87,7 +87,7 @@ function Wa(e) {
87
87
  for (var r = 0; r < e.length; r++)
88
88
  e[r]();
89
89
  }
90
- const Qe = 2, Li = 4, Nt = 8, ka = 16, $e = 32, Ct = 64, aa = 128, Gr = 256, na = 512, qe = 1024, Ar = 2048, Ot = 4096, gr = 8192, ct = 16384, Bi = 32768, jr = 65536, ol = 1 << 17, sl = 1 << 19, Ri = 1 << 20, Dr = Symbol("$state"), Ui = Symbol("legacy props"), ll = Symbol("");
90
+ const Qe = 2, Li = 4, Ct = 8, ka = 16, $e = 32, Ot = 64, aa = 128, Gr = 256, na = 512, qe = 1024, Ar = 2048, Lt = 4096, gr = 8192, ct = 16384, Bi = 32768, jr = 65536, ol = 1 << 17, sl = 1 << 19, Ri = 1 << 20, Dr = Symbol("$state"), Ui = Symbol("legacy props"), ll = Symbol("");
91
91
  function Vi(e) {
92
92
  return e === this.v;
93
93
  }
@@ -172,7 +172,7 @@ function Yi(e, r) {
172
172
  (l & Ar) === 0 && (!a && o === ee || (er(o, r), (l & (qe | Gr)) !== 0 && ((l & Qe) !== 0 ? Yi(
173
173
  /** @type {Derived} */
174
174
  o,
175
- Ot
175
+ Lt
176
176
  ) : Ea(
177
177
  /** @type {Effect} */
178
178
  o
@@ -308,7 +308,7 @@ function vl() {
308
308
  Gi = Ir(r, "firstChild").get, Xi = Ir(r, "nextSibling").get, e.__click = void 0, e.__className = "", e.__attributes = null, e.__styles = null, e.__e = void 0, Text.prototype.__t = void 0;
309
309
  }
310
310
  }
311
- function Lt(e = "") {
311
+ function Bt(e = "") {
312
312
  return document.createTextNode(e);
313
313
  }
314
314
  // @__NO_SIDE_EFFECTS__
@@ -413,11 +413,11 @@ function Ki(e) {
413
413
  return r;
414
414
  }
415
415
  function Ji(e) {
416
- var r = Ki(e), t = (Ur || (e.f & Gr) !== 0) && e.deps !== null ? Ot : qe;
416
+ var r = Ki(e), t = (Ur || (e.f & Gr) !== 0) && e.deps !== null ? Lt : qe;
417
417
  er(e, t), e.equals(r) || (e.v = r, e.wv = so());
418
418
  }
419
419
  function vn(e) {
420
- Zi(e), zt(e, 0), er(e, ct), e.v = e.children = e.deps = e.ctx = e.reactions = null;
420
+ Zi(e), At(e, 0), er(e, ct), e.v = e.children = e.deps = e.ctx = e.reactions = null;
421
421
  }
422
422
  function Qi(e) {
423
423
  ee === null && de === null && ul(), de !== null && (de.f & Gr) !== 0 && dl(), Pn && cl();
@@ -427,7 +427,7 @@ function Pl(e, r) {
427
427
  t === null ? r.last = r.first = e : (t.next = e, e.prev = t, r.last = e);
428
428
  }
429
429
  function ut(e, r, t, a = !0) {
430
- var n = (e & Ct) !== 0, i = ee, o = {
430
+ var n = (e & Ot) !== 0, i = ee, o = {
431
431
  ctx: ie,
432
432
  deps: null,
433
433
  deriveds: null,
@@ -447,7 +447,7 @@ function ut(e, r, t, a = !0) {
447
447
  if (t) {
448
448
  var l = nt;
449
449
  try {
450
- ii(!0), Rt(o), o.f |= Bi;
450
+ ii(!0), Ut(o), o.f |= Bi;
451
451
  } catch (p) {
452
452
  throw We(o), p;
453
453
  } finally {
@@ -465,7 +465,7 @@ function ut(e, r, t, a = !0) {
465
465
  return o;
466
466
  }
467
467
  function $i(e) {
468
- const r = ut(Nt, null, !1);
468
+ const r = ut(Ct, null, !1);
469
469
  return er(r, qe), r.teardown = e, r;
470
470
  }
471
471
  function ot(e) {
@@ -490,7 +490,7 @@ function xl(e) {
490
490
  return Qi(), Sa(e);
491
491
  }
492
492
  function Sl(e) {
493
- const r = ut(Ct, e, !0);
493
+ const r = ut(Ot, e, !0);
494
494
  return (t = {}) => new Promise((a) => {
495
495
  t.outro ? Wr(r, () => {
496
496
  We(r), a(void 0);
@@ -518,23 +518,23 @@ function El() {
518
518
  if (d(e.l.r2)) {
519
519
  for (var r of e.l.r1) {
520
520
  var t = r.effect;
521
- (t.f & qe) !== 0 && er(t, Ot), pt(t) && Rt(t), r.ran = !1;
521
+ (t.f & qe) !== 0 && er(t, Lt), pt(t) && Ut(t), r.ran = !1;
522
522
  }
523
523
  e.l.r2.v = !1;
524
524
  }
525
525
  });
526
526
  }
527
527
  function Sa(e) {
528
- return ut(Nt, e, !0);
528
+ return ut(Ct, e, !0);
529
529
  }
530
530
  function M(e) {
531
531
  return Mr(e);
532
532
  }
533
533
  function Mr(e, r = 0) {
534
- return ut(Nt | ka | r, e, !0);
534
+ return ut(Ct | ka | r, e, !0);
535
535
  }
536
536
  function He(e, r = !0) {
537
- return ut(Nt | $e, e, !0, r);
537
+ return ut(Ct | $e, e, !0, r);
538
538
  }
539
539
  function eo(e) {
540
540
  var r = e.teardown;
@@ -581,7 +581,7 @@ function We(e, r = !0) {
581
581
  }
582
582
  t = !0;
583
583
  }
584
- to(e, r && !t), ro(e), zt(e, 0), er(e, ct);
584
+ to(e, r && !t), ro(e), At(e, 0), er(e, ct);
585
585
  var o = e.transitions;
586
586
  if (o !== null)
587
587
  for (const s of o)
@@ -620,12 +620,12 @@ function kn(e, r, t) {
620
620
  }
621
621
  }
622
622
  }
623
- function qt(e) {
623
+ function zt(e) {
624
624
  io(e, !0);
625
625
  }
626
626
  function io(e, r) {
627
627
  if ((e.f & gr) !== 0) {
628
- pt(e) && Rt(e), e.f ^= gr;
628
+ pt(e) && Ut(e), e.f ^= gr;
629
629
  for (var t = e.first; t !== null; ) {
630
630
  var a = t.next, n = (t.f & jr) !== 0 || (t.f & $e) !== 0;
631
631
  io(t, n ? r : !1), t = a;
@@ -647,14 +647,14 @@ function Xr(e) {
647
647
  function wn(e) {
648
648
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
649
649
  }
650
- let St = !1, ia = !1, oa = null, nt = !1, Pn = !1;
650
+ let Et = !1, ia = !1, oa = null, nt = !1, Pn = !1;
651
651
  function ii(e) {
652
652
  nt = e;
653
653
  }
654
654
  function oi(e) {
655
655
  Pn = e;
656
656
  }
657
- let Za = [], Et = 0;
657
+ let Za = [], Tt = 0;
658
658
  let de = null;
659
659
  function Ye(e) {
660
660
  de = e;
@@ -686,7 +686,7 @@ function pt(e) {
686
686
  var r = e.f;
687
687
  if ((r & Ar) !== 0)
688
688
  return !0;
689
- if ((r & Ot) !== 0) {
689
+ if ((r & Lt) !== 0) {
690
690
  var t = e.deps, a = (r & Gr) !== 0;
691
691
  if (t !== null) {
692
692
  var n, i, o = (r & na) !== 0, l = a && ee !== null && !Ur, s = t.length;
@@ -720,21 +720,21 @@ function zl(e, r) {
720
720
  }
721
721
  t = t.parent;
722
722
  }
723
- throw St = !1, e;
723
+ throw Et = !1, e;
724
724
  }
725
725
  function Al(e) {
726
726
  return (e.f & ct) === 0 && (e.parent === null || (e.parent.f & aa) === 0);
727
727
  }
728
728
  function Na() {
729
- St = !1;
729
+ Et = !1;
730
730
  }
731
- function Bt(e, r, t, a) {
732
- if (St) {
733
- if (t === null && (St = !1), Al(r))
731
+ function Rt(e, r, t, a) {
732
+ if (Et) {
733
+ if (t === null && (Et = !1), Al(r))
734
734
  throw e;
735
735
  return;
736
736
  }
737
- t !== null && (St = !0);
737
+ t !== null && (Et = !0);
738
738
  {
739
739
  zl(e, r);
740
740
  return;
@@ -744,7 +744,7 @@ function lo(e) {
744
744
  var _;
745
745
  var r = Se, t = Ne, a = qr, n = de, i = Ur, o = mr, l = ie, s = e.f;
746
746
  Se = /** @type {null | Value[]} */
747
- null, Ne = 0, qr = null, de = (s & ($e | Ct)) === 0 ? e : null, Ur = !nt && (s & Gr) !== 0, mr = null, ie = e.ctx, Ka++;
747
+ null, Ne = 0, qr = null, de = (s & ($e | Ot)) === 0 ? e : null, Ur = !nt && (s & Gr) !== 0, mr = null, ie = e.ctx, Ka++;
748
748
  try {
749
749
  var c = (
750
750
  /** @type {Function} */
@@ -752,7 +752,7 @@ function lo(e) {
752
752
  ), p = e.deps;
753
753
  if (Se !== null) {
754
754
  var u;
755
- if (zt(e, Ne), p !== null && Ne > 0)
755
+ if (At(e, Ne), p !== null && Ne > 0)
756
756
  for (p.length = Ne + Se.length, u = 0; u < Se.length; u++)
757
757
  p[Ne + u] = Se[u];
758
758
  else
@@ -760,7 +760,7 @@ function lo(e) {
760
760
  if (!Ur)
761
761
  for (u = Ne; u < p.length; u++)
762
762
  ((_ = p[u]).reactions ?? (_.reactions = [])).push(e);
763
- } else p !== null && Ne < p.length && (zt(e, Ne), p.length = Ne);
763
+ } else p !== null && Ne < p.length && (At(e, Ne), p.length = Ne);
764
764
  return c;
765
765
  } finally {
766
766
  Se = r, Ne = t, qr = a, de = n, Ur = i, mr = o, ie = l;
@@ -778,19 +778,19 @@ function Fl(e, r) {
778
778
  t === null && (r.f & Qe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
779
779
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
780
780
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
781
- (Se === null || !Se.includes(r)) && (er(r, Ot), (r.f & (Gr | na)) === 0 && (r.f ^= na), zt(
781
+ (Se === null || !Se.includes(r)) && (er(r, Lt), (r.f & (Gr | na)) === 0 && (r.f ^= na), At(
782
782
  /** @type {Derived} **/
783
783
  r,
784
784
  0
785
785
  ));
786
786
  }
787
- function zt(e, r) {
787
+ function At(e, r) {
788
788
  var t = e.deps;
789
789
  if (t !== null)
790
790
  for (var a = r; a < t.length; a++)
791
791
  Fl(e, t[a]);
792
792
  }
793
- function Rt(e) {
793
+ function Ut(e) {
794
794
  var r = e.f;
795
795
  if ((r & ct) === 0) {
796
796
  er(e, qe);
@@ -803,25 +803,25 @@ function Rt(e) {
803
803
  var i = e.deps, o;
804
804
  ti && yl && e.f & Ar;
805
805
  } catch (l) {
806
- Bt(l, e, t, a || e.ctx);
806
+ Rt(l, e, t, a || e.ctx);
807
807
  } finally {
808
808
  ee = t;
809
809
  }
810
810
  }
811
811
  }
812
812
  function jl() {
813
- if (Et > 1e3) {
814
- Et = 0;
813
+ if (Tt > 1e3) {
814
+ Tt = 0;
815
815
  try {
816
816
  pl();
817
817
  } catch (e) {
818
818
  if (oa !== null)
819
- Bt(e, oa, null);
819
+ Rt(e, oa, null);
820
820
  else
821
821
  throw e;
822
822
  }
823
823
  }
824
- Et++;
824
+ Tt++;
825
825
  }
826
826
  function Ml(e) {
827
827
  var r = e.length;
@@ -848,24 +848,24 @@ function Nl(e) {
848
848
  var a = e[t];
849
849
  if ((a.f & (ct | gr)) === 0)
850
850
  try {
851
- pt(a) && (Rt(a), a.deps === null && a.first === null && a.nodes_start === null && (a.teardown === null ? ao(a) : a.fn = null));
851
+ pt(a) && (Ut(a), a.deps === null && a.first === null && a.nodes_start === null && (a.teardown === null ? ao(a) : a.fn = null));
852
852
  } catch (n) {
853
- Bt(n, a, null, a.ctx);
853
+ Rt(n, a, null, a.ctx);
854
854
  }
855
855
  }
856
856
  }
857
857
  function Cl() {
858
- if (ia = !1, Et > 1001)
858
+ if (ia = !1, Tt > 1001)
859
859
  return;
860
860
  const e = Za;
861
- Za = [], Ml(e), ia || (Et = 0, oa = null);
861
+ Za = [], Ml(e), ia || (Tt = 0, oa = null);
862
862
  }
863
863
  function Ea(e) {
864
864
  ia || (ia = !0, queueMicrotask(Cl)), oa = e;
865
865
  for (var r = e; r.parent !== null; ) {
866
866
  r = r.parent;
867
867
  var t = r.f;
868
- if ((t & (Ct | $e)) !== 0) {
868
+ if ((t & (Ot | $e)) !== 0) {
869
869
  if ((t & qe) === 0) return;
870
870
  r.f ^= qe;
871
871
  }
@@ -877,14 +877,14 @@ function co(e, r) {
877
877
  e: for (; t !== null; ) {
878
878
  var n = t.f, i = (n & $e) !== 0, o = i && (n & qe) !== 0, l = t.next;
879
879
  if (!o && (n & gr) === 0)
880
- if ((n & Nt) !== 0) {
880
+ if ((n & Ct) !== 0) {
881
881
  if (i)
882
882
  t.f ^= qe;
883
883
  else
884
884
  try {
885
- pt(t) && Rt(t);
885
+ pt(t) && Ut(t);
886
886
  } catch (u) {
887
- Bt(u, t, null, t.ctx);
887
+ Rt(u, t, null, t.ctx);
888
888
  }
889
889
  var s = t.first;
890
890
  if (s !== null) {
@@ -1217,12 +1217,12 @@ function fr(e, r, t = "svg") {
1217
1217
  }
1218
1218
  function oe(e = "") {
1219
1219
  {
1220
- var r = Lt(e + "");
1220
+ var r = Bt(e + "");
1221
1221
  return Yr(r, r), r;
1222
1222
  }
1223
1223
  }
1224
1224
  function te() {
1225
- var e = document.createDocumentFragment(), r = document.createComment(""), t = Lt();
1225
+ var e = document.createDocumentFragment(), r = document.createComment(""), t = Bt();
1226
1226
  return e.append(r, t), Yr(r, t), e;
1227
1227
  }
1228
1228
  function b(e, r) {
@@ -1259,7 +1259,7 @@ function Ul(e, { target: r, anchor: t, props: a = {}, events: n, context: i, int
1259
1259
  };
1260
1260
  s(fn(po)), Qa.add(s);
1261
1261
  var c = void 0, p = Sl(() => {
1262
- var u = t ?? r.appendChild(Lt());
1262
+ var u = t ?? r.appendChild(Bt());
1263
1263
  return He(() => {
1264
1264
  if (i) {
1265
1265
  G({});
@@ -1295,9 +1295,9 @@ function O(e, r, t = !1) {
1295
1295
  const c = (u, _ = !0) => {
1296
1296
  s = !0, p(_, u);
1297
1297
  }, p = (u, _) => {
1298
- o !== (o = u) && (o ? (n ? qt(n) : _ && (n = He(() => _(a))), i && Wr(i, () => {
1298
+ o !== (o = u) && (o ? (n ? zt(n) : _ && (n = He(() => _(a))), i && Wr(i, () => {
1299
1299
  i = null;
1300
- })) : (i ? qt(i) : _ && (i = He(() => _(a))), n && Wr(n, () => {
1300
+ })) : (i ? zt(i) : _ && (i = He(() => _(a))), n && Wr(n, () => {
1301
1301
  n = null;
1302
1302
  })));
1303
1303
  };
@@ -1337,7 +1337,7 @@ function lt(e, r, t, a, n, i = null) {
1337
1337
  /** @type {Element} */
1338
1338
  e
1339
1339
  );
1340
- o = c.appendChild(Lt());
1340
+ o = c.appendChild(Bt());
1341
1341
  }
1342
1342
  var p = null, u = !1;
1343
1343
  Mr(() => {
@@ -1359,7 +1359,7 @@ function lt(e, r, t, a, n, i = null) {
1359
1359
  a
1360
1360
  );
1361
1361
  }
1362
- i !== null && (f === 0 ? p ? qt(p) : p = He(() => i(o)) : p !== null && Wr(p, () => {
1362
+ i !== null && (f === 0 ? p ? zt(p) : p = He(() => i(o)) : p !== null && Wr(p, () => {
1363
1363
  p = null;
1364
1364
  })), t();
1365
1365
  }
@@ -1390,7 +1390,7 @@ function Hl(e, r, t, a, n, i, o, l) {
1390
1390
  ), u.set(D, m), h = [], y = [], g = m.next;
1391
1391
  continue;
1392
1392
  }
1393
- if (c && Wl(I, k, q, n), (I.e.f & gr) !== 0 && (qt(I.e), s && (($ = I.a) == null || $.unfix(), (P ?? (P = /* @__PURE__ */ new Set())).delete(I))), I !== g) {
1393
+ if (c && Wl(I, k, q, n), (I.e.f & gr) !== 0 && (zt(I.e), s && (($ = I.a) == null || $.unfix(), (P ?? (P = /* @__PURE__ */ new Set())).delete(I))), I !== g) {
1394
1394
  if (f !== void 0 && f.has(I)) {
1395
1395
  if (h.length < y.length) {
1396
1396
  var v = y[0], w;
@@ -1520,14 +1520,14 @@ function la(e, r, t, a, n, i) {
1520
1520
  ), p;
1521
1521
  Mr(() => {
1522
1522
  const u = r() || null;
1523
- var _ = u === "svg" ? Dt : null;
1523
+ var _ = u === "svg" ? qt : null;
1524
1524
  u !== o && (p && (u === null ? Wr(p, () => {
1525
1525
  p = null, l = null;
1526
- }) : u === l ? qt(p) : (We(p), li(!1))), u && u !== l && (p = He(() => {
1526
+ }) : u === l ? zt(p) : (We(p), li(!1))), u && u !== l && (p = He(() => {
1527
1527
  if (s = _ ? document.createElementNS(_, u) : document.createElement(u), Yr(s, s), a) {
1528
1528
  var g = (
1529
1529
  /** @type {TemplateNode} */
1530
- s.appendChild(Lt())
1530
+ s.appendChild(Bt())
1531
1531
  );
1532
1532
  a(s, g);
1533
1533
  }
@@ -1719,7 +1719,7 @@ function $l(e) {
1719
1719
  }
1720
1720
  };
1721
1721
  }
1722
- function Gt(e, r) {
1722
+ function Xt(e, r) {
1723
1723
  e.dispatchEvent(new CustomEvent(r));
1724
1724
  }
1725
1725
  function ec(e) {
@@ -1765,8 +1765,8 @@ function ho(e, r, t, a) {
1765
1765
  _ == null || _.abort(), (y = _ == null ? void 0 : _.reset) == null || y.call(_);
1766
1766
  return;
1767
1767
  }
1768
- i || u == null || u.abort(), Gt(r, "introstart"), u = rn(r, g(), _, 1, () => {
1769
- Gt(r, "introend"), u == null || u.abort(), u = c = void 0;
1768
+ i || u == null || u.abort(), Xt(r, "introstart"), u = rn(r, g(), _, 1, () => {
1769
+ Xt(r, "introend"), u == null || u.abort(), u = c = void 0;
1770
1770
  });
1771
1771
  },
1772
1772
  out(y) {
@@ -1774,8 +1774,8 @@ function ho(e, r, t, a) {
1774
1774
  y == null || y(), c = void 0;
1775
1775
  return;
1776
1776
  }
1777
- r.inert = !0, Gt(r, "outrostart"), _ = rn(r, g(), u, 0, () => {
1778
- Gt(r, "outroend"), y == null || y();
1777
+ r.inert = !0, Xt(r, "outrostart"), _ = rn(r, g(), u, 0, () => {
1778
+ Xt(r, "outroend"), y == null || y();
1779
1779
  });
1780
1780
  },
1781
1781
  stop: () => {
@@ -1948,7 +1948,7 @@ function Ge(e) {
1948
1948
  );
1949
1949
  });
1950
1950
  }
1951
- function Ut(e) {
1951
+ function Vt(e) {
1952
1952
  ie === null && wn(), Ge(() => () => Pr(e));
1953
1953
  }
1954
1954
  function tc(e) {
@@ -1970,7 +1970,7 @@ function ac(e, r, t) {
1970
1970
  );
1971
1971
  return a.unsubscribe ? () => a.unsubscribe() : a;
1972
1972
  }
1973
- let Xt = !1;
1973
+ let Zt = !1;
1974
1974
  function Fe(e, r, t) {
1975
1975
  const a = t[r] ?? (t[r] = {
1976
1976
  store: null,
@@ -1996,11 +1996,11 @@ function je() {
1996
1996
  }), e;
1997
1997
  }
1998
1998
  function nc(e) {
1999
- var r = Xt;
1999
+ var r = Zt;
2000
2000
  try {
2001
- return Xt = !1, [e(), Xt];
2001
+ return Zt = !1, [e(), Zt];
2002
2002
  } finally {
2003
- Xt = r;
2003
+ Zt = r;
2004
2004
  }
2005
2005
  }
2006
2006
  const ic = {
@@ -2082,7 +2082,7 @@ function xr(...e) {
2082
2082
  return new Proxy({ props: e }, oc);
2083
2083
  }
2084
2084
  function gi(e) {
2085
- for (var r = ee, t = ee; r !== null && (r.f & ($e | Ct)) === 0; )
2085
+ for (var r = ee, t = ee; r !== null && (r.f & ($e | Ot)) === 0; )
2086
2086
  r = r.parent;
2087
2087
  try {
2088
2088
  return ze(r), e();
@@ -2189,7 +2189,7 @@ function sc(e, r, t) {
2189
2189
  );
2190
2190
  });
2191
2191
  } catch (u) {
2192
- Bt(u, i, null, i.ctx);
2192
+ Rt(u, i, null, i.ctx);
2193
2193
  }
2194
2194
  Na(), o = !1;
2195
2195
  });
@@ -2198,7 +2198,7 @@ function sc(e, r, t) {
2198
2198
  }, jr | aa);
2199
2199
  }
2200
2200
  var he = /* @__PURE__ */ ((e) => (e[e.UnknownError = 0] = "UnknownError", e[e.UserCancelledError = 1] = "UserCancelledError", e[e.StoreProblemError = 2] = "StoreProblemError", e[e.PurchaseNotAllowedError = 3] = "PurchaseNotAllowedError", e[e.PurchaseInvalidError = 4] = "PurchaseInvalidError", e[e.ProductNotAvailableForPurchaseError = 5] = "ProductNotAvailableForPurchaseError", e[e.ProductAlreadyPurchasedError = 6] = "ProductAlreadyPurchasedError", e[e.ReceiptAlreadyInUseError = 7] = "ReceiptAlreadyInUseError", e[e.InvalidReceiptError = 8] = "InvalidReceiptError", e[e.MissingReceiptFileError = 9] = "MissingReceiptFileError", e[e.NetworkError = 10] = "NetworkError", e[e.InvalidCredentialsError = 11] = "InvalidCredentialsError", e[e.UnexpectedBackendResponseError = 12] = "UnexpectedBackendResponseError", e[e.InvalidAppUserIdError = 14] = "InvalidAppUserIdError", e[e.OperationAlreadyInProgressError = 15] = "OperationAlreadyInProgressError", e[e.UnknownBackendError = 16] = "UnknownBackendError", e[e.InvalidAppleSubscriptionKeyError = 17] = "InvalidAppleSubscriptionKeyError", e[e.IneligibleError = 18] = "IneligibleError", e[e.InsufficientPermissionsError = 19] = "InsufficientPermissionsError", e[e.PaymentPendingError = 20] = "PaymentPendingError", e[e.InvalidSubscriberAttributesError = 21] = "InvalidSubscriberAttributesError", e[e.LogOutWithAnonymousUserError = 22] = "LogOutWithAnonymousUserError", e[e.ConfigurationError = 23] = "ConfigurationError", e[e.UnsupportedError = 24] = "UnsupportedError", e[e.EmptySubscriberAttributesError = 25] = "EmptySubscriberAttributesError", e[e.CustomerInfoError = 28] = "CustomerInfoError", e[e.SignatureVerificationError = 36] = "SignatureVerificationError", e[e.InvalidEmailError = 38] = "InvalidEmailError", e))(he || {});
2201
- class Tt {
2201
+ class It {
2202
2202
  // This is the message shown to developers. It is not intended to be displayed to end customers.
2203
2203
  static getPublicMessage(r) {
2204
2204
  switch (r) {
@@ -2315,7 +2315,7 @@ class Tt {
2315
2315
  }
2316
2316
  }
2317
2317
  static convertCodeToBackendErrorCode(r) {
2318
- return r in It ? r : null;
2318
+ return r in Dt ? r : null;
2319
2319
  }
2320
2320
  static convertPurchaseFlowErrorCodeToErrorCode(r) {
2321
2321
  switch (r) {
@@ -2334,7 +2334,7 @@ class Tt {
2334
2334
  }
2335
2335
  }
2336
2336
  }
2337
- var It = /* @__PURE__ */ ((e) => (e[e.BackendInvalidPlatform = 7e3] = "BackendInvalidPlatform", e[e.BackendInvalidEmail = 7012] = "BackendInvalidEmail", e[e.BackendStoreProblem = 7101] = "BackendStoreProblem", e[e.BackendCannotTransferPurchase = 7102] = "BackendCannotTransferPurchase", e[e.BackendInvalidReceiptToken = 7103] = "BackendInvalidReceiptToken", e[e.BackendInvalidAppStoreSharedSecret = 7104] = "BackendInvalidAppStoreSharedSecret", e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided = 7105] = "BackendInvalidPaymentModeOrIntroPriceNotProvided", e[e.BackendProductIdForGoogleReceiptNotProvided = 7106] = "BackendProductIdForGoogleReceiptNotProvided", e[e.BackendInvalidPlayStoreCredentials = 7107] = "BackendInvalidPlayStoreCredentials", e[e.BackendInternalServerError = 7110] = "BackendInternalServerError", e[e.BackendEmptyAppUserId = 7220] = "BackendEmptyAppUserId", e[e.BackendInvalidAuthToken = 7224] = "BackendInvalidAuthToken", e[e.BackendInvalidAPIKey = 7225] = "BackendInvalidAPIKey", e[e.BackendBadRequest = 7226] = "BackendBadRequest", e[e.BackendPlayStoreQuotaExceeded = 7229] = "BackendPlayStoreQuotaExceeded", e[e.BackendPlayStoreInvalidPackageName = 7230] = "BackendPlayStoreInvalidPackageName", e[e.BackendPlayStoreGenericError = 7231] = "BackendPlayStoreGenericError", e[e.BackendUserIneligibleForPromoOffer = 7232] = "BackendUserIneligibleForPromoOffer", e[e.BackendInvalidAppleSubscriptionKey = 7234] = "BackendInvalidAppleSubscriptionKey", e[e.BackendSubscriberNotFound = 7259] = "BackendSubscriberNotFound", e[e.BackendInvalidSubscriberAttributes = 7263] = "BackendInvalidSubscriberAttributes", e[e.BackendInvalidSubscriberAttributesBody = 7264] = "BackendInvalidSubscriberAttributesBody", e[e.BackendProductIDsMalformed = 7662] = "BackendProductIDsMalformed", e[e.BackendAlreadySubscribedError = 7772] = "BackendAlreadySubscribedError", e[e.BackendPaymentGatewayGenericError = 7773] = "BackendPaymentGatewayGenericError", e[e.BackendOfferNotFound = 7814] = "BackendOfferNotFound", e[e.BackendNoMXRecordsFound = 7834] = "BackendNoMXRecordsFound", e[e.BackendInvalidOperationSession = 7877] = "BackendInvalidOperationSession", e[e.BackendPurchaseCannotBeCompleted = 7878] = "BackendPurchaseCannotBeCompleted", e[e.BackendEmailIsRequired = 7879] = "BackendEmailIsRequired", e[e.BackendGatewaySetupErrorStripeTaxNotActive = 7898] = "BackendGatewaySetupErrorStripeTaxNotActive", e[e.BackendGatewaySetupErrorInvalidTaxOriginAddress = 7899] = "BackendGatewaySetupErrorInvalidTaxOriginAddress", e[e.BackendGatewaySetupErrorMissingRequiredPermission = 7900] = "BackendGatewaySetupErrorMissingRequiredPermission", e[e.BackendGatewaySetupErrorSandboxModeOnly = 7901] = "BackendGatewaySetupErrorSandboxModeOnly", e))(It || {});
2337
+ var Dt = /* @__PURE__ */ ((e) => (e[e.BackendInvalidPlatform = 7e3] = "BackendInvalidPlatform", e[e.BackendInvalidEmail = 7012] = "BackendInvalidEmail", e[e.BackendStoreProblem = 7101] = "BackendStoreProblem", e[e.BackendCannotTransferPurchase = 7102] = "BackendCannotTransferPurchase", e[e.BackendInvalidReceiptToken = 7103] = "BackendInvalidReceiptToken", e[e.BackendInvalidAppStoreSharedSecret = 7104] = "BackendInvalidAppStoreSharedSecret", e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided = 7105] = "BackendInvalidPaymentModeOrIntroPriceNotProvided", e[e.BackendProductIdForGoogleReceiptNotProvided = 7106] = "BackendProductIdForGoogleReceiptNotProvided", e[e.BackendInvalidPlayStoreCredentials = 7107] = "BackendInvalidPlayStoreCredentials", e[e.BackendInternalServerError = 7110] = "BackendInternalServerError", e[e.BackendEmptyAppUserId = 7220] = "BackendEmptyAppUserId", e[e.BackendInvalidAuthToken = 7224] = "BackendInvalidAuthToken", e[e.BackendInvalidAPIKey = 7225] = "BackendInvalidAPIKey", e[e.BackendBadRequest = 7226] = "BackendBadRequest", e[e.BackendPlayStoreQuotaExceeded = 7229] = "BackendPlayStoreQuotaExceeded", e[e.BackendPlayStoreInvalidPackageName = 7230] = "BackendPlayStoreInvalidPackageName", e[e.BackendPlayStoreGenericError = 7231] = "BackendPlayStoreGenericError", e[e.BackendUserIneligibleForPromoOffer = 7232] = "BackendUserIneligibleForPromoOffer", e[e.BackendInvalidAppleSubscriptionKey = 7234] = "BackendInvalidAppleSubscriptionKey", e[e.BackendSubscriberNotFound = 7259] = "BackendSubscriberNotFound", e[e.BackendInvalidSubscriberAttributes = 7263] = "BackendInvalidSubscriberAttributes", e[e.BackendInvalidSubscriberAttributesBody = 7264] = "BackendInvalidSubscriberAttributesBody", e[e.BackendProductIDsMalformed = 7662] = "BackendProductIDsMalformed", e[e.BackendAlreadySubscribedError = 7772] = "BackendAlreadySubscribedError", e[e.BackendPaymentGatewayGenericError = 7773] = "BackendPaymentGatewayGenericError", e[e.BackendOfferNotFound = 7814] = "BackendOfferNotFound", e[e.BackendNoMXRecordsFound = 7834] = "BackendNoMXRecordsFound", e[e.BackendInvalidOperationSession = 7877] = "BackendInvalidOperationSession", e[e.BackendPurchaseCannotBeCompleted = 7878] = "BackendPurchaseCannotBeCompleted", e[e.BackendEmailIsRequired = 7879] = "BackendEmailIsRequired", e[e.BackendGatewaySetupErrorStripeTaxNotActive = 7898] = "BackendGatewaySetupErrorStripeTaxNotActive", e[e.BackendGatewaySetupErrorInvalidTaxOriginAddress = 7899] = "BackendGatewaySetupErrorInvalidTaxOriginAddress", e[e.BackendGatewaySetupErrorMissingRequiredPermission = 7900] = "BackendGatewaySetupErrorMissingRequiredPermission", e[e.BackendGatewaySetupErrorSandboxModeOnly = 7901] = "BackendGatewaySetupErrorSandboxModeOnly", e))(Dt || {});
2338
2338
  class ge extends Error {
2339
2339
  constructor(t, a, n, i) {
2340
2340
  super(a);
@@ -2343,10 +2343,10 @@ class ge extends Error {
2343
2343
  }
2344
2344
  /** @internal */
2345
2345
  static getForBackendError(t, a) {
2346
- const n = Tt.getErrorCodeForBackendErrorCode(t);
2346
+ const n = It.getErrorCodeForBackendErrorCode(t);
2347
2347
  return new ge(
2348
2348
  n,
2349
- Tt.getPublicMessage(n),
2349
+ It.getPublicMessage(n),
2350
2350
  a,
2351
2351
  { backendErrorCode: t }
2352
2352
  );
@@ -2354,7 +2354,7 @@ class ge extends Error {
2354
2354
  /** @internal */
2355
2355
  static getForPurchasesFlowError(t) {
2356
2356
  return new ge(
2357
- Tt.convertPurchaseFlowErrorCodeToErrorCode(
2357
+ It.convertPurchaseFlowErrorCodeToErrorCode(
2358
2358
  t.errorCode
2359
2359
  ),
2360
2360
  t.message,
@@ -2438,11 +2438,11 @@ class ue extends Error {
2438
2438
  }
2439
2439
  static fromBackendErrorCode(r) {
2440
2440
  switch (r) {
2441
- case It.BackendGatewaySetupErrorStripeTaxNotActive:
2441
+ case Dt.BackendGatewaySetupErrorStripeTaxNotActive:
2442
2442
  return 6;
2443
- case It.BackendGatewaySetupErrorInvalidTaxOriginAddress:
2443
+ case Dt.BackendGatewaySetupErrorInvalidTaxOriginAddress:
2444
2444
  return 7;
2445
- case It.BackendGatewaySetupErrorMissingRequiredPermission:
2445
+ case Dt.BackendGatewaySetupErrorMissingRequiredPermission:
2446
2446
  return 8;
2447
2447
  default:
2448
2448
  return null;
@@ -6356,7 +6356,7 @@ function Da({ background_color: e, border: r, margin: t, padding: a, color: n, c
6356
6356
  function yi(e) {
6357
6357
  return e.type === "fixed" ? `${e.value}px` : e.type === "fit" ? "fit-content" : e.type === "fill" ? navigator.userAgent.match(/firefox|fxios/i) ? "-moz-available" : "-webkit-fill-available" : "initial";
6358
6358
  }
6359
- function Vt(e) {
6359
+ function Ht(e) {
6360
6360
  const r = {
6361
6361
  "--width": "initial",
6362
6362
  "--height": "initial",
@@ -6545,7 +6545,7 @@ const qo = {
6545
6545
  padding: n,
6546
6546
  colorMode: l.colorMode,
6547
6547
  ...c
6548
- }), g = Vt({ ...o, ...c }), f = {
6548
+ }), g = Ht({ ...o, ...c }), f = {
6549
6549
  ...s,
6550
6550
  ..._,
6551
6551
  ...u,
@@ -6584,7 +6584,7 @@ function cd(e, r, t) {
6584
6584
  Object.assign(a, Da({
6585
6585
  background_color: t,
6586
6586
  ...e
6587
- }), Vt(r)), Object.assign(a, e.zStackChildStyles);
6587
+ }), Ht(r)), Object.assign(a, e.zStackChildStyles);
6588
6588
  const n = Ze(a, "text");
6589
6589
  return Le(n);
6590
6590
  }
@@ -6653,7 +6653,7 @@ function zo(e, r) {
6653
6653
  class: "rc-pw-text-block"
6654
6654
  },
6655
6655
  "svelte-1wz4si8",
6656
- o.namespaceURI === Dt,
6656
+ o.namespaceURI === qt,
6657
6657
  o.nodeName.includes("-")
6658
6658
  ));
6659
6659
  var c = te(), p = K(c);
@@ -6752,7 +6752,7 @@ const fd = (e) => {
6752
6752
  }), rd({
6753
6753
  ...c,
6754
6754
  ...m
6755
- }), Vt({ ...i, ...m })), Object.assign(f, g);
6755
+ }), Ht({ ...i, ...m })), Object.assign(f, g);
6756
6756
  const P = Ze(f, "stack");
6757
6757
  return Le(P);
6758
6758
  };
@@ -6791,13 +6791,13 @@ function bd(e) {
6791
6791
  background_color: r.background_color,
6792
6792
  color: r.color,
6793
6793
  colorMode: e.purchaseState.colorMode
6794
- })), r.style === "overlay" && (t["--margin-block-start"] = "0px", t["--margin-block-end"] = "0px", t["--transform"] = Zt(r, 0, -(((n = e.border) == null ? void 0 : n.width) || 0))), r.style === "edge_to_edge")
6794
+ })), r.style === "overlay" && (t["--margin-block-start"] = "0px", t["--margin-block-end"] = "0px", t["--transform"] = Kt(r, 0, -(((n = e.border) == null ? void 0 : n.width) || 0))), r.style === "edge_to_edge")
6795
6795
  if (t["--margin-block-start"] = "0px", t["--margin-block-end"] = "0px", t["--margin-inline-start"] = "0px", t["--margin-inline-end"] = "0px", r.alignment === "top" || r.alignment === "bottom") {
6796
6796
  t["--badge-width"] = `calc(100% + ${(((i = e.border) == null ? void 0 : i.width) || 0) * 2}px)`, t["--z-index"] = "-1";
6797
6797
  const p = Math.max(((l = (o = e.shape) == null ? void 0 : o.corners) == null ? void 0 : l.top_leading) || 0, ((c = (s = e.shape) == null ? void 0 : s.corners) == null ? void 0 : c.top_trailing) || 0);
6798
- r.alignment === "top" && (t["--padding-block-end"] = `${p + r.padding.bottom}px`, t["--transform"] = Zt(r, p)), r.alignment === "bottom" && (t["--padding-block-start"] = `${p + r.padding.top}px`, t["--transform"] = Zt(r, -p));
6798
+ r.alignment === "top" && (t["--padding-block-end"] = `${p + r.padding.bottom}px`, t["--transform"] = Kt(r, p)), r.alignment === "bottom" && (t["--padding-block-start"] = `${p + r.padding.top}px`, t["--transform"] = Kt(r, -p));
6799
6799
  } else
6800
- t["--transform"] = Zt(r), Object.assign(t, yd(e));
6800
+ t["--transform"] = Kt(r), Object.assign(t, yd(e));
6801
6801
  const a = Ze(t, "stack-badge");
6802
6802
  return Le(a);
6803
6803
  }
@@ -6825,7 +6825,7 @@ function yd(e) {
6825
6825
  const a = ((i = e.border) == null ? void 0 : i.width) || 0, n = t.alignment;
6826
6826
  return r[vi[hi[n]]] = `${(o = t.shape) == null ? void 0 : o.corners[hi[n]]}px`, r[vi[n]] = `${((l = e.shape) == null ? void 0 : l.corners[n]) - a}px`, r;
6827
6827
  }
6828
- function Zt(e, r = 0, t = 0) {
6828
+ function Kt(e, r = 0, t = 0) {
6829
6829
  if (!e)
6830
6830
  return "";
6831
6831
  if (e.style === "overlay") {
@@ -6904,7 +6904,7 @@ const Pd = {
6904
6904
  0px
6905
6905
  );border-start-end-radius:var(--stack-badge-border-start-end-radius, 0px);box-shadow:var(--stack-badge-shadow, none);display:flex;align-items:center;justify-content:center;width:var(--stack-badge-badge-width, max-content);height:var(--stack-badge-badge-height, max-content);z-index:var(--stack-badge-z-index, 1);}`
6906
6906
  };
6907
- function Ht(e, r) {
6907
+ function Wt(e, r) {
6908
6908
  G(r, !0), Y(e, Pd);
6909
6909
  const t = /* @__PURE__ */ Nr(r, [
6910
6910
  "$$slots",
@@ -7086,7 +7086,7 @@ function Ed(e, r) {
7086
7086
  },
7087
7087
  class: "rc-pw-button",
7088
7088
  children: (i, o) => {
7089
- Ht(i, xr(() => r.stack, {
7089
+ Wt(i, xr(() => r.stack, {
7090
7090
  get labels() {
7091
7091
  return r.labels;
7092
7092
  },
@@ -7104,7 +7104,7 @@ function Ed(e, r) {
7104
7104
  function ga(e, r) {
7105
7105
  G(r, !0);
7106
7106
  const t = je(), a = () => Fe(To, "$prefersDarkMode", t), n = {
7107
- stack: Ht,
7107
+ stack: Wt,
7108
7108
  text: md,
7109
7109
  image: Pu,
7110
7110
  button: Ed,
@@ -7213,7 +7213,7 @@ const qd = {
7213
7213
  function Ao(e, r) {
7214
7214
  Y(e, qd);
7215
7215
  var t = Dd(), a = x(t);
7216
- Ht(a, xr(() => r.stack, {
7216
+ Wt(a, xr(() => r.stack, {
7217
7217
  get labels() {
7218
7218
  return r.labels;
7219
7219
  },
@@ -7722,7 +7722,7 @@ const Wd = {
7722
7722
  desktop: or.captionLink,
7723
7723
  mobile: be.captionLink
7724
7724
  }
7725
- }, At = (e) => e.length == 7 ? {
7725
+ }, Ft = (e) => e.length == 7 ? {
7726
7726
  r: parseInt(e.slice(1, 3), 16),
7727
7727
  g: parseInt(e.slice(3, 5), 16),
7728
7728
  b: parseInt(e.slice(5, 7), 16)
@@ -7743,12 +7743,12 @@ const Wd = {
7743
7743
  };
7744
7744
  };
7745
7745
  function $d(e, r, t) {
7746
- const a = At(e) || { r: 0, g: 0, b: 0 }, n = At(r) || { r: 255, g: 255, b: 255 }, i = Math.round(n.r * t + a.r * (1 - t)), o = Math.round(n.g * t + a.g * (1 - t)), l = Math.round(n.b * t + a.b * (1 - t));
7746
+ const a = Ft(e) || { r: 0, g: 0, b: 0 }, n = Ft(r) || { r: 255, g: 255, b: 255 }, i = Math.round(n.r * t + a.r * (1 - t)), o = Math.round(n.g * t + a.g * (1 - t)), l = Math.round(n.b * t + a.b * (1 - t));
7747
7747
  return `#${Oa(i)}${Oa(o)}${Oa(l)}`;
7748
7748
  }
7749
7749
  function Pi(e, r) {
7750
7750
  const t = { r: 255, g: 255, b: 255 }, a = Math.max(0, Math.min(1, r));
7751
- let n = e, i = At(e) || t;
7751
+ let n = e, i = Ft(e) || t;
7752
7752
  (isNaN(i.r) || isNaN(i.g) || isNaN(i.b)) && (i = t, n = "#FFFFFF");
7753
7753
  const l = Dn({
7754
7754
  ...i,
@@ -7768,11 +7768,11 @@ const eu = (e, r, t, a = qn) => {
7768
7768
  "primary-text": t["primary-text"]
7769
7769
  };
7770
7770
  if (e != null && e.startsWith("#")) {
7771
- const i = At(e);
7771
+ const i = Ft(e);
7772
7772
  i !== null && Object.assign(n, Qd(i));
7773
7773
  }
7774
7774
  if (r != null && r.startsWith("#")) {
7775
- const i = At(r);
7775
+ const i = Ft(r);
7776
7776
  i !== null && (n["primary-text"] = Dn({ ...i, luminanceThreshold: a }) ? "black" : "white");
7777
7777
  }
7778
7778
  return n;
@@ -7950,7 +7950,7 @@ const _u = (e) => {
7950
7950
  "--inset": "0",
7951
7951
  "--transform": "initial"
7952
7952
  }, o = Tn(t, a);
7953
- Object.assign(i, n), Object.assign(i, Vt({ ...r, ...o })), Object.assign(i, od(e.mask_shape));
7953
+ Object.assign(i, n), Object.assign(i, Ht({ ...r, ...o })), Object.assign(i, od(e.mask_shape));
7954
7954
  const l = Ze(i, "image"), s = id(e), c = sd(e);
7955
7955
  return {
7956
7956
  imageStyles: Le(l),
@@ -8121,7 +8121,7 @@ function Eu(e, r) {
8121
8121
  return d(n);
8122
8122
  },
8123
8123
  children: (i, o) => {
8124
- Ht(i, xr(() => r.stack, {
8124
+ Wt(i, xr(() => r.stack, {
8125
8125
  get labels() {
8126
8126
  return r.labels;
8127
8127
  },
@@ -8158,7 +8158,7 @@ function qu(e, r) {
8158
8158
  var i = Iu();
8159
8159
  i.__click = [Tu, r];
8160
8160
  var o = x(i);
8161
- Ht(o, xr(() => r.stack, {
8161
+ Wt(o, xr(() => r.stack, {
8162
8162
  get labels() {
8163
8163
  return r.labels;
8164
8164
  },
@@ -8189,7 +8189,7 @@ function zu(e) {
8189
8189
  "--inset": "0",
8190
8190
  "--transform": "initial"
8191
8191
  };
8192
- Object.assign(r, Vt(e.size)), Object.assign(r, e.zStackChildStyles);
8192
+ Object.assign(r, Ht(e.size)), Object.assign(r, e.zStackChildStyles);
8193
8193
  const t = Ze(r, "timeline");
8194
8194
  return Le(t);
8195
8195
  }
@@ -8299,7 +8299,7 @@ function Mu(e, r) {
8299
8299
  style: d(o)
8300
8300
  },
8301
8301
  "svelte-gjmo4g",
8302
- h.namespaceURI === Dt,
8302
+ h.namespaceURI === qt,
8303
8303
  h.nodeName.includes("-")
8304
8304
  ));
8305
8305
  var D = oe();
@@ -8319,7 +8319,7 @@ function Mu(e, r) {
8319
8319
  style: d(p)
8320
8320
  },
8321
8321
  "svelte-gjmo4g",
8322
- D.namespaceURI === Dt,
8322
+ D.namespaceURI === qt,
8323
8323
  D.nodeName.includes("-")
8324
8324
  ));
8325
8325
  var U = oe();
@@ -8397,7 +8397,7 @@ function Vu(e, r) {
8397
8397
  Xe();
8398
8398
  var n = te(), i = K(n);
8399
8399
  la(i, t, !1, (o, l) => {
8400
- ca(o, null, { class: "rcb-modal-section" }, "svelte-1bzqb13", o.namespaceURI === Dt, o.nodeName.includes("-"));
8400
+ ca(o, null, { class: "rcb-modal-section" }, "svelte-1bzqb13", o.namespaceURI === qt, o.nodeName.includes("-"));
8401
8401
  var s = te(), c = K(s);
8402
8402
  fe(c, () => a() ?? se), b(l, s);
8403
8403
  }), b(e, n), X();
@@ -9280,7 +9280,7 @@ const Ap = {
9280
9280
  desktop: dr.captionLink,
9281
9281
  mobile: ye.captionLink
9282
9282
  }
9283
- }, Ft = (e) => e.length == 7 ? {
9283
+ }, jt = (e) => e.length == 7 ? {
9284
9284
  r: parseInt(e.slice(1, 3), 16),
9285
9285
  g: parseInt(e.slice(3, 5), 16),
9286
9286
  b: parseInt(e.slice(5, 7), 16)
@@ -9306,12 +9306,12 @@ const Ap = {
9306
9306
  };
9307
9307
  };
9308
9308
  function Lp(e, r, t) {
9309
- const a = Ft(e) || { r: 0, g: 0, b: 0 }, n = Ft(r) || { r: 255, g: 255, b: 255 }, i = Math.round(n.r * t + a.r * (1 - t)), o = Math.round(n.g * t + a.g * (1 - t)), l = Math.round(n.b * t + a.b * (1 - t));
9309
+ const a = jt(e) || { r: 0, g: 0, b: 0 }, n = jt(r) || { r: 255, g: 255, b: 255 }, i = Math.round(n.r * t + a.r * (1 - t)), o = Math.round(n.g * t + a.g * (1 - t)), l = Math.round(n.b * t + a.b * (1 - t));
9310
9310
  return `#${La(i)}${La(o)}${La(l)}`;
9311
9311
  }
9312
9312
  function Ti(e, r) {
9313
9313
  const t = { r: 255, g: 255, b: 255 }, a = Math.max(0, Math.min(1, r));
9314
- let n = e, i = Ft(e) || t;
9314
+ let n = e, i = jt(e) || t;
9315
9315
  (isNaN(i.r) || isNaN(i.g) || isNaN(i.b)) && (i = t, n = "#FFFFFF");
9316
9316
  const l = Nn({
9317
9317
  ...i,
@@ -9331,11 +9331,11 @@ const Bp = (e, r, t, a = Cn) => {
9331
9331
  "primary-text": t["primary-text"]
9332
9332
  };
9333
9333
  if (e != null && e.startsWith("#")) {
9334
- const i = Ft(e);
9334
+ const i = jt(e);
9335
9335
  i !== null && Object.assign(n, Op(i));
9336
9336
  }
9337
9337
  if (r != null && r.startsWith("#")) {
9338
- const i = Ft(r);
9338
+ const i = jt(r);
9339
9339
  i !== null && (n["primary-text"] = Nn({ ...i, luminanceThreshold: a }) ? "black" : "white");
9340
9340
  }
9341
9341
  return n;
@@ -9477,7 +9477,7 @@ const Bp = (e, r, t, a = Cn) => {
9477
9477
  // 48px
9478
9478
  }
9479
9479
  };
9480
- class jt {
9480
+ class Mt {
9481
9481
  constructor(r) {
9482
9482
  C(this, "brandingAppearance");
9483
9483
  r ? this.brandingAppearance = r : this.brandingAppearance = void 0;
@@ -9532,7 +9532,7 @@ var $p = function(r) {
9532
9532
  version: "7.3.1",
9533
9533
  startTime: t
9534
9534
  });
9535
- }, vt = null, Kt = null, Jt = null, t_ = function(r) {
9535
+ }, vt = null, Jt = null, Qt = null, t_ = function(r) {
9536
9536
  return function(t) {
9537
9537
  r(new Error("Failed to load Stripe.js", {
9538
9538
  cause: t
@@ -9557,12 +9557,12 @@ var $p = function(r) {
9557
9557
  if (!(n && r)) {
9558
9558
  if (!n)
9559
9559
  n = Ii(r);
9560
- else if (n && Jt !== null && Kt !== null) {
9560
+ else if (n && Qt !== null && Jt !== null) {
9561
9561
  var i;
9562
- n.removeEventListener("load", Jt), n.removeEventListener("error", Kt), (i = n.parentNode) === null || i === void 0 || i.removeChild(n), n = Ii(r);
9562
+ n.removeEventListener("load", Qt), n.removeEventListener("error", Jt), (i = n.parentNode) === null || i === void 0 || i.removeChild(n), n = Ii(r);
9563
9563
  }
9564
9564
  }
9565
- Jt = a_(t, a), Kt = t_(a), n.addEventListener("load", Jt), n.addEventListener("error", Kt);
9565
+ Qt = a_(t, a), Jt = t_(a), n.addEventListener("load", Qt), n.addEventListener("error", Jt);
9566
9566
  } catch (o) {
9567
9567
  a(o);
9568
9568
  return;
@@ -9634,7 +9634,7 @@ const tt = class tt {
9634
9634
  gatewayErrorCode: void 0,
9635
9635
  message: "Stripe client not found"
9636
9636
  };
9637
- const c = new jt(n == null ? void 0 : n.appearance), p = c.shape, u = c.formColors, _ = c.textStyles, g = cn.bodyBase[l].fontSize || cn.bodyBase.mobile.fontSize;
9637
+ const c = new Mt(n == null ? void 0 : n.appearance), p = c.shape, u = c.formColors, _ = c.textStyles, g = cn.bodyBase[l].fontSize || cn.bodyBase.mobile.fontSize;
9638
9638
  let f;
9639
9639
  try {
9640
9640
  f = s.elements({
@@ -9874,7 +9874,7 @@ function l_(e, r) {
9874
9874
  } catch (l) {
9875
9875
  r.onError(we.mapInitializationError(l));
9876
9876
  }
9877
- }), Ut(() => {
9877
+ }), Vt(() => {
9878
9878
  t == null || t.destroy(), t = null;
9879
9879
  });
9880
9880
  var i = s_();
@@ -9893,7 +9893,7 @@ function d_(e, r) {
9893
9893
  } catch (o) {
9894
9894
  r.onError(we.mapInitializationError(o));
9895
9895
  }
9896
- }), Ut(() => {
9896
+ }), Vt(() => {
9897
9897
  t == null || t.destroy(), t = null;
9898
9898
  });
9899
9899
  var i = c_();
@@ -9944,7 +9944,7 @@ function m_(e, r) {
9944
9944
  } catch (m) {
9945
9945
  r.onError(we.mapInitializationError(m));
9946
9946
  }
9947
- }), Ut(() => {
9947
+ }), Vt(() => {
9948
9948
  i == null || i.destroy(), i = null;
9949
9949
  });
9950
9950
  var _ = te(), g = K(_);
@@ -10185,7 +10185,7 @@ function D_(e, r) {
10185
10185
  r.onPriceBreakdownUpdated(d(g));
10186
10186
  }), Ge(async () => {
10187
10187
  d(s) === "unavailable" && await H(null).catch(Cr);
10188
- }), Ut(() => {
10188
+ }), Vt(() => {
10189
10189
  d(E) && (d(E).abort(), A(E, null));
10190
10190
  });
10191
10191
  async function H(F, ne) {
@@ -10305,7 +10305,7 @@ function D_(e, r) {
10305
10305
  d(S) === "loading" && F(qa);
10306
10306
  });
10307
10307
  }
10308
- var Wt = N(ft, 2);
10308
+ var Yt = N(ft, 2);
10309
10309
  {
10310
10310
  var za = (F) => {
10311
10311
  var ne = /* @__PURE__ */ T(() => a().translate(B.ErrorButtonTryAgain));
@@ -10326,11 +10326,11 @@ function D_(e, r) {
10326
10326
  $$slots: { icon: !0, message: !0 }
10327
10327
  });
10328
10328
  };
10329
- O(Wt, (F) => {
10329
+ O(Yt, (F) => {
10330
10330
  d(S) === "error" && F(za);
10331
10331
  });
10332
10332
  }
10333
- var Kr = N(Wt, 2), Yt = x(Kr), Er = x(Yt), ws = x(Er), Ps = /* @__PURE__ */ T(() => !!r.customerEmail), xs = /* @__PURE__ */ T(() => d(s) !== "disabled");
10333
+ var Kr = N(Yt, 2), Gt = x(Kr), Er = x(Gt), ws = x(Er), Ps = /* @__PURE__ */ T(() => !!r.customerEmail), xs = /* @__PURE__ */ T(() => d(s) !== "disabled");
10334
10334
  y_(ws, {
10335
10335
  get stripeAccountId() {
10336
10336
  return r.gatewayParams.stripe_account_id;
@@ -10395,7 +10395,7 @@ function D_(e, r) {
10395
10395
  return r.purchaseOption;
10396
10396
  }
10397
10397
  }), M(() => {
10398
- kr(Yt, "invisible", d(S) !== "form"), kr(Aa, "fully-hidden", d(s) !== "miss-match" || d(S) !== "form"), kr(Un, "fully-hidden", d(S) !== "form");
10398
+ kr(Gt, "invisible", d(S) !== "form"), kr(Aa, "fully-hidden", d(s) !== "miss-match" || d(S) !== "form"), kr(Un, "fully-hidden", d(S) !== "form");
10399
10399
  }), _r("submit", Kr, me), b(e, mt), X();
10400
10400
  }
10401
10401
  function q_(e) {
@@ -10625,7 +10625,7 @@ const U_ = {
10625
10625
  hash: "svelte-1qexsu3",
10626
10626
  code: ".arrow.svelte-1qexsu3 {transition:transform 0.3s ease;}.arrow-fill.svelte-1qexsu3 {fill:var(--rc-color-grey-text-dark);}.arrow.left.svelte-1qexsu3 {transform:rotate(90deg);}.arrow.up.svelte-1qexsu3 {transform:rotate(180deg);}.arrow.right.svelte-1qexsu3 {transform:rotate(-90deg);}.arrow.down.svelte-1qexsu3 {transform:rotate(0deg);}"
10627
10627
  };
10628
- function Qt(e, r) {
10628
+ function $t(e, r) {
10629
10629
  Y(e, U_);
10630
10630
  let t = R(r, "direction", 8);
10631
10631
  var a = R_();
@@ -10704,12 +10704,12 @@ const ng = {
10704
10704
  back: W_,
10705
10705
  info: Jo,
10706
10706
  close: ag,
10707
- "chevron-left": Qt,
10708
- "chevron-right": Qt,
10709
- "chevron-up": Qt,
10710
- "chevron-down": Qt
10707
+ "chevron-left": $t,
10708
+ "chevron-right": $t,
10709
+ "chevron-up": $t,
10710
+ "chevron-down": $t
10711
10711
  };
10712
- function Mt(e, r) {
10712
+ function Nt(e, r) {
10713
10713
  G(r, !0);
10714
10714
  const t = ng[r.name];
10715
10715
  let a = J(W({}));
@@ -10788,7 +10788,7 @@ function cg(e, r) {
10788
10788
  },
10789
10789
  icon: (P) => {
10790
10790
  var h = /* @__PURE__ */ T(u);
10791
- Mt(P, {
10791
+ Nt(P, {
10792
10792
  get name() {
10793
10793
  return d(h);
10794
10794
  }
@@ -10913,9 +10913,9 @@ function gg(e, r) {
10913
10913
  var u = N(p, 2), _ = x(u);
10914
10914
  {
10915
10915
  var g = (y) => {
10916
- Mt(y, { name: "chevron-up" });
10916
+ Nt(y, { name: "chevron-up" });
10917
10917
  }, f = (y) => {
10918
- Mt(y, { name: "chevron-down" });
10918
+ Nt(y, { name: "chevron-down" });
10919
10919
  };
10920
10920
  O(_, (y) => {
10921
10921
  n() ? y(g) : y(f, !1);
@@ -11035,16 +11035,16 @@ function Sg(e, r) {
11035
11035
  var mt = vg(), ft = x(mt), qa = x(ft);
11036
11036
  ae(qa, {
11037
11037
  size: "body-small",
11038
- children: (Kr, Yt) => {
11038
+ children: (Kr, Gt) => {
11039
11039
  var Er = oe();
11040
11040
  M(() => re(Er, d(Or).display_name)), b(Kr, Er);
11041
11041
  },
11042
11042
  $$slots: { default: !0 }
11043
11043
  });
11044
- var Wt = N(ft, 2), za = x(Wt);
11044
+ var Yt = N(ft, 2), za = x(Yt);
11045
11045
  ae(za, {
11046
11046
  size: "body-small",
11047
- children: (Kr, Yt) => {
11047
+ children: (Kr, Gt) => {
11048
11048
  var Er = oe();
11049
11049
  M(() => re(Er, a().formatPrice(d(Or).tax_amount_in_micros, r.priceBreakdown.currency))), b(Kr, Er);
11050
11050
  },
@@ -11506,7 +11506,7 @@ const Bg = {
11506
11506
  };
11507
11507
  function Rg(e, r) {
11508
11508
  G(r, !0), Y(e, Bg);
11509
- const t = R(r, "brandingAppearance", 3, void 0), a = R(r, "brandFontConfig", 3, void 0), n = R(r, "isInElement", 3, !1), i = /* @__PURE__ */ T(() => new jt(t()).getTextStyleVars(a())), o = /* @__PURE__ */ T(() => new jt(t()).spacingStyleVars), l = /* @__PURE__ */ T(() => [d(i), d(o)].join("; ")), s = /* @__PURE__ */ T(() => {
11509
+ const t = R(r, "brandingAppearance", 3, void 0), a = R(r, "brandFontConfig", 3, void 0), n = R(r, "isInElement", 3, !1), i = /* @__PURE__ */ T(() => new Mt(t()).getTextStyleVars(a())), o = /* @__PURE__ */ T(() => new Mt(t()).spacingStyleVars), l = /* @__PURE__ */ T(() => [d(i), d(o)].join("; ")), s = /* @__PURE__ */ T(() => {
11510
11510
  var _;
11511
11511
  return (_ = a()) != null && _.font_url ? xt(a().font_url) : null;
11512
11512
  }), c = async (_) => {
@@ -11610,7 +11610,7 @@ const em = {
11610
11610
  };
11611
11611
  function rm(e, r) {
11612
11612
  G(r, !0), Y(e, em);
11613
- const t = R(r, "brandingAppearance", 3, void 0), a = /* @__PURE__ */ T(() => new jt(t()).productInfoStyleVars);
11613
+ const t = R(r, "brandingAppearance", 3, void 0), a = /* @__PURE__ */ T(() => new Mt(t()).productInfoStyleVars);
11614
11614
  var n = $g(), i = x(n);
11615
11615
  rs(i, {
11616
11616
  location: "navbar",
@@ -11640,7 +11640,7 @@ const am = {
11640
11640
  function ts(e, r) {
11641
11641
  Y(e, am);
11642
11642
  var t = tm(), a = x(t);
11643
- Mt(a, { name: "close" }), _r("click", t, function(n) {
11643
+ Nt(a, { name: "close" }), _r("click", t, function(n) {
11644
11644
  ko.call(this, r, n);
11645
11645
  }), b(e, t);
11646
11646
  }
@@ -11695,7 +11695,7 @@ const cm = {
11695
11695
  };
11696
11696
  function dm(e, r) {
11697
11697
  G(r, !0), Y(e, cm);
11698
- const t = /* @__PURE__ */ T(() => new jt(r.brandingAppearance).formStyleVars);
11698
+ const t = /* @__PURE__ */ T(() => new Mt(r.brandingAppearance).formStyleVars);
11699
11699
  var a = lm(), n = x(a);
11700
11700
  rs(n, {
11701
11701
  location: "main-block",
@@ -11837,7 +11837,7 @@ const vm = {
11837
11837
  function km(e, r) {
11838
11838
  Y(e, vm);
11839
11839
  var t = hm(), a = x(t);
11840
- Mt(a, { name: "back" }), _r("click", t, function(n) {
11840
+ Nt(a, { name: "back" }), _r("click", t, function(n) {
11841
11841
  ko.call(this, r, n);
11842
11842
  }), b(e, t);
11843
11843
  }
@@ -12154,7 +12154,7 @@ function Mm(e, r) {
12154
12154
  let c = J("payment-entry-loading"), p = J(null), u = J(W({})), _ = J(null), g = J(null), f = J(null), m = J(null), P = new Ia(t(), r.selectedLocale, r.defaultLocale), h = Eo(P);
12155
12155
  Ca(Oe, h), Ca(Fn, (U = r.brandingInfo) == null ? void 0 : U.appearance), Ge(() => {
12156
12156
  r.isInElement || (A(g, W(document.documentElement.style.height)), A(f, W(document.documentElement.style.overflow)), A(m, W(document.body.style.height)), document.documentElement.style.height = "100%", document.body.style.height = "100%", document.documentElement.style.overflow = "hidden");
12157
- }), Ut(() => {
12157
+ }), Vt(() => {
12158
12158
  if (!r.isInElement) {
12159
12159
  const v = (w, E, S) => {
12160
12160
  S === "" ? w.style.removeProperty(E) : w.style.setProperty(E, S);
@@ -12442,16 +12442,23 @@ function Vm(e) {
12442
12442
  }
12443
12443
  return r;
12444
12444
  }
12445
- const os = "1.12.0", Hm = "https://api.revenuecat.com", Wm = "https://e.revenue.cat";
12445
+ const os = "1.12.1", Hm = "https://api.revenuecat.com", Wm = "https://e.revenue.cat";
12446
12446
  var ya;
12447
12447
  (function(e) {
12448
12448
  e[e.CONTINUE = 100] = "CONTINUE", e[e.SWITCHING_PROTOCOLS = 101] = "SWITCHING_PROTOCOLS", e[e.PROCESSING = 102] = "PROCESSING", e[e.EARLY_HINTS = 103] = "EARLY_HINTS", e[e.OK = 200] = "OK", e[e.CREATED = 201] = "CREATED", e[e.ACCEPTED = 202] = "ACCEPTED", e[e.NON_AUTHORITATIVE_INFORMATION = 203] = "NON_AUTHORITATIVE_INFORMATION", e[e.NO_CONTENT = 204] = "NO_CONTENT", e[e.RESET_CONTENT = 205] = "RESET_CONTENT", e[e.PARTIAL_CONTENT = 206] = "PARTIAL_CONTENT", e[e.MULTI_STATUS = 207] = "MULTI_STATUS", e[e.MULTIPLE_CHOICES = 300] = "MULTIPLE_CHOICES", e[e.MOVED_PERMANENTLY = 301] = "MOVED_PERMANENTLY", e[e.MOVED_TEMPORARILY = 302] = "MOVED_TEMPORARILY", e[e.SEE_OTHER = 303] = "SEE_OTHER", e[e.NOT_MODIFIED = 304] = "NOT_MODIFIED", e[e.USE_PROXY = 305] = "USE_PROXY", e[e.TEMPORARY_REDIRECT = 307] = "TEMPORARY_REDIRECT", e[e.PERMANENT_REDIRECT = 308] = "PERMANENT_REDIRECT", e[e.BAD_REQUEST = 400] = "BAD_REQUEST", e[e.UNAUTHORIZED = 401] = "UNAUTHORIZED", e[e.PAYMENT_REQUIRED = 402] = "PAYMENT_REQUIRED", e[e.FORBIDDEN = 403] = "FORBIDDEN", e[e.NOT_FOUND = 404] = "NOT_FOUND", e[e.METHOD_NOT_ALLOWED = 405] = "METHOD_NOT_ALLOWED", e[e.NOT_ACCEPTABLE = 406] = "NOT_ACCEPTABLE", e[e.PROXY_AUTHENTICATION_REQUIRED = 407] = "PROXY_AUTHENTICATION_REQUIRED", e[e.REQUEST_TIMEOUT = 408] = "REQUEST_TIMEOUT", e[e.CONFLICT = 409] = "CONFLICT", e[e.GONE = 410] = "GONE", e[e.LENGTH_REQUIRED = 411] = "LENGTH_REQUIRED", e[e.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", e[e.REQUEST_TOO_LONG = 413] = "REQUEST_TOO_LONG", e[e.REQUEST_URI_TOO_LONG = 414] = "REQUEST_URI_TOO_LONG", e[e.UNSUPPORTED_MEDIA_TYPE = 415] = "UNSUPPORTED_MEDIA_TYPE", e[e.REQUESTED_RANGE_NOT_SATISFIABLE = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE", e[e.EXPECTATION_FAILED = 417] = "EXPECTATION_FAILED", e[e.IM_A_TEAPOT = 418] = "IM_A_TEAPOT", e[e.INSUFFICIENT_SPACE_ON_RESOURCE = 419] = "INSUFFICIENT_SPACE_ON_RESOURCE", e[e.METHOD_FAILURE = 420] = "METHOD_FAILURE", e[e.MISDIRECTED_REQUEST = 421] = "MISDIRECTED_REQUEST", e[e.UNPROCESSABLE_ENTITY = 422] = "UNPROCESSABLE_ENTITY", e[e.LOCKED = 423] = "LOCKED", e[e.FAILED_DEPENDENCY = 424] = "FAILED_DEPENDENCY", e[e.UPGRADE_REQUIRED = 426] = "UPGRADE_REQUIRED", e[e.PRECONDITION_REQUIRED = 428] = "PRECONDITION_REQUIRED", e[e.TOO_MANY_REQUESTS = 429] = "TOO_MANY_REQUESTS", e[e.REQUEST_HEADER_FIELDS_TOO_LARGE = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE", e[e.UNAVAILABLE_FOR_LEGAL_REASONS = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS", e[e.INTERNAL_SERVER_ERROR = 500] = "INTERNAL_SERVER_ERROR", e[e.NOT_IMPLEMENTED = 501] = "NOT_IMPLEMENTED", e[e.BAD_GATEWAY = 502] = "BAD_GATEWAY", e[e.SERVICE_UNAVAILABLE = 503] = "SERVICE_UNAVAILABLE", e[e.GATEWAY_TIMEOUT = 504] = "GATEWAY_TIMEOUT", e[e.HTTP_VERSION_NOT_SUPPORTED = 505] = "HTTP_VERSION_NOT_SUPPORTED", e[e.INSUFFICIENT_STORAGE = 507] = "INSUFFICIENT_STORAGE", e[e.NETWORK_AUTHENTICATION_REQUIRED = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
12449
12449
  })(ya || (ya = {}));
12450
+ const Ym = /^rcb_[a-zA-Z0-9_.-]+$/, Gm = /^pdl_[a-zA-Z0-9_.-]+$/, Xm = /^test_[a-zA-Z0-9_.-]+$/;
12450
12451
  function ha(e) {
12451
12452
  return e ? e.startsWith("rcb_sb_") : !1;
12452
12453
  }
12453
- function $t(e) {
12454
- return e ? e.startsWith("test_") : !1;
12454
+ function Zm(e) {
12455
+ return e ? Ym.test(e) : !1;
12456
+ }
12457
+ function Km(e) {
12458
+ return e ? Gm.test(e) : !1;
12459
+ }
12460
+ function St(e) {
12461
+ return e ? Xm.test(e) : !1;
12455
12462
  }
12456
12463
  async function ur(e, r, t) {
12457
12464
  const { apiKey: a, body: n, headers: i, httpConfig: o } = r, s = `${(o == null ? void 0 : o.proxyURL) ?? Hm}${e.urlPath()}`;
@@ -12459,26 +12466,26 @@ async function ur(e, r, t) {
12459
12466
  const c = await fetch(s, {
12460
12467
  method: e.method,
12461
12468
  headers: ms(a, i, o == null ? void 0 : o.additionalHeaders),
12462
- body: Gm(n),
12469
+ body: Qm(n),
12463
12470
  signal: t
12464
12471
  });
12465
- return await Ym(c, e), await c.json();
12472
+ return await Jm(c, e), await c.json();
12466
12473
  } catch (c) {
12467
12474
  throw c instanceof TypeError ? new ge(
12468
12475
  he.NetworkError,
12469
- Tt.getPublicMessage(he.NetworkError),
12476
+ It.getPublicMessage(he.NetworkError),
12470
12477
  c.message
12471
12478
  ) : c;
12472
12479
  }
12473
12480
  }
12474
- async function Ym(e, r) {
12481
+ async function Jm(e, r) {
12475
12482
  const t = e.status;
12476
12483
  if (t >= ya.INTERNAL_SERVER_ERROR)
12477
12484
  Ra(r, t, await e.text());
12478
12485
  else if (t >= ya.BAD_REQUEST) {
12479
12486
  const a = await e.json(), n = a ? JSON.stringify(a) : null, i = a == null ? void 0 : a.code, o = a == null ? void 0 : a.message;
12480
12487
  if (i != null) {
12481
- const l = Tt.convertCodeToBackendErrorCode(i);
12488
+ const l = It.convertCodeToBackendErrorCode(i);
12482
12489
  if (l == null)
12483
12490
  Ra(
12484
12491
  r,
@@ -12503,10 +12510,10 @@ function Ra(e, r, t, a) {
12503
12510
  { backendErrorCode: a }
12504
12511
  );
12505
12512
  }
12506
- function Gm(e) {
12513
+ function Qm(e) {
12507
12514
  return e == null ? null : JSON.stringify(e);
12508
12515
  }
12509
- const ss = "Authorization", ls = "Content-Type", cs = "Accept", ds = "X-Platform", us = "X-Version", ps = "X-Platform-Flavor", _s = "X-Platform-Flavor-Version", gs = "X-Is-Sandbox", Xm = /* @__PURE__ */ new Set([
12516
+ const ss = "Authorization", ls = "Content-Type", cs = "Accept", ds = "X-Platform", us = "X-Version", ps = "X-Platform-Flavor", _s = "X-Platform-Flavor-Version", gs = "X-Is-Sandbox", $m = /* @__PURE__ */ new Set([
12510
12517
  ss,
12511
12518
  ls,
12512
12519
  cs,
@@ -12536,7 +12543,7 @@ function ms(e, r, t) {
12536
12543
  return r && (a = { ...a, ...r }), t && (a = { ...t, ...a }), a;
12537
12544
  }
12538
12545
  const Ln = "/v1/subscribers", _t = "/rcbilling/v1";
12539
- class Zm {
12546
+ class ef {
12540
12547
  constructor(r) {
12541
12548
  C(this, "appUserId");
12542
12549
  C(this, "method", "GET");
@@ -12548,7 +12555,7 @@ class Zm {
12548
12555
  return `${Ln}/${r}/offerings`;
12549
12556
  }
12550
12557
  }
12551
- class Km {
12558
+ class rf {
12552
12559
  constructor(r, t, a) {
12553
12560
  C(this, "method", "GET");
12554
12561
  C(this, "name", "getProducts");
@@ -12562,7 +12569,7 @@ class Km {
12562
12569
  return `${_t}/subscribers/${r}/products?id=${t}${a}`;
12563
12570
  }
12564
12571
  }
12565
- class Jm {
12572
+ class tf {
12566
12573
  constructor(r) {
12567
12574
  C(this, "method", "GET");
12568
12575
  C(this, "name", "getCustomerInfo");
@@ -12574,7 +12581,7 @@ class Jm {
12574
12581
  return `${Ln}/${r}`;
12575
12582
  }
12576
12583
  }
12577
- class Qm {
12584
+ class af {
12578
12585
  constructor() {
12579
12586
  C(this, "method", "GET");
12580
12587
  C(this, "name", "getBrandingInfo");
@@ -12583,7 +12590,7 @@ class Qm {
12583
12590
  return `${_t}/branding`;
12584
12591
  }
12585
12592
  }
12586
- class $m {
12593
+ class nf {
12587
12594
  constructor() {
12588
12595
  C(this, "method", "POST");
12589
12596
  C(this, "name", "postCheckoutStart");
@@ -12592,7 +12599,7 @@ class $m {
12592
12599
  return `${_t}/checkout/start`;
12593
12600
  }
12594
12601
  }
12595
- class ef {
12602
+ class of {
12596
12603
  constructor(r) {
12597
12604
  C(this, "method", "POST");
12598
12605
  C(this, "name", "postCheckoutCalculateTax");
@@ -12603,7 +12610,7 @@ class ef {
12603
12610
  return `${_t}/checkout/${this.operationSessionId}/calculate_taxes`;
12604
12611
  }
12605
12612
  }
12606
- class rf {
12613
+ class sf {
12607
12614
  constructor(r) {
12608
12615
  C(this, "method", "POST");
12609
12616
  C(this, "name", "postCheckoutComplete");
@@ -12614,7 +12621,7 @@ class rf {
12614
12621
  return `${_t}/checkout/${this.operationSessionId}/complete`;
12615
12622
  }
12616
12623
  }
12617
- class tf {
12624
+ class lf {
12618
12625
  constructor(r) {
12619
12626
  C(this, "method", "GET");
12620
12627
  C(this, "name", "getCheckoutStatus");
@@ -12625,7 +12632,7 @@ class tf {
12625
12632
  return `${_t}/checkout/${this.operationSessionId}`;
12626
12633
  }
12627
12634
  }
12628
- class af {
12635
+ class cf {
12629
12636
  constructor(r) {
12630
12637
  C(this, "method", "POST");
12631
12638
  C(this, "name", "setAttributes");
@@ -12637,7 +12644,7 @@ class af {
12637
12644
  return `${Ln}/${r}/attributes`;
12638
12645
  }
12639
12646
  }
12640
- class nf {
12647
+ class df {
12641
12648
  constructor() {
12642
12649
  C(this, "method", "POST");
12643
12650
  C(this, "name", "postReceipt");
@@ -12647,7 +12654,7 @@ class nf {
12647
12654
  }
12648
12655
  }
12649
12656
  const un = {};
12650
- class of {
12657
+ class uf {
12651
12658
  constructor(r, t = un) {
12652
12659
  C(this, "API_KEY");
12653
12660
  C(this, "httpConfig");
@@ -12659,7 +12666,7 @@ class of {
12659
12666
  }
12660
12667
  async getOfferings(r) {
12661
12668
  return await ur(
12662
- new Zm(r),
12669
+ new ef(r),
12663
12670
  {
12664
12671
  apiKey: this.API_KEY,
12665
12672
  httpConfig: this.httpConfig
@@ -12668,7 +12675,7 @@ class of {
12668
12675
  }
12669
12676
  async getCustomerInfo(r) {
12670
12677
  return await ur(
12671
- new Jm(r),
12678
+ new tf(r),
12672
12679
  {
12673
12680
  apiKey: this.API_KEY,
12674
12681
  httpConfig: this.httpConfig
@@ -12677,7 +12684,7 @@ class of {
12677
12684
  }
12678
12685
  async getProducts(r, t, a) {
12679
12686
  return await ur(
12680
- new Km(r, t, a),
12687
+ new rf(r, t, a),
12681
12688
  {
12682
12689
  apiKey: this.API_KEY,
12683
12690
  httpConfig: this.httpConfig
@@ -12686,7 +12693,7 @@ class of {
12686
12693
  }
12687
12694
  async getBrandingInfo() {
12688
12695
  return await ur(
12689
- new Qm(),
12696
+ new af(),
12690
12697
  {
12691
12698
  apiKey: this.API_KEY,
12692
12699
  httpConfig: this.httpConfig
@@ -12705,7 +12712,7 @@ class of {
12705
12712
  return l && (s.metadata = l), n.id !== "base_option" && (s.offer_id = n.id), a.targetingContext && (s.applied_targeting_rule = {
12706
12713
  rule_id: a.targetingContext.ruleId,
12707
12714
  revision: a.targetingContext.revision
12708
- }), a.placementIdentifier && (s.presented_placement_identifier = a.placementIdentifier), await ur(new $m(), {
12715
+ }), a.placementIdentifier && (s.presented_placement_identifier = a.placementIdentifier), await ur(new nf(), {
12709
12716
  apiKey: this.API_KEY,
12710
12717
  body: s,
12711
12718
  httpConfig: this.httpConfig
@@ -12717,7 +12724,7 @@ class of {
12717
12724
  postal_code: a
12718
12725
  };
12719
12726
  return await ur(
12720
- new ef(r),
12727
+ new of(r),
12721
12728
  {
12722
12729
  apiKey: this.API_KEY,
12723
12730
  body: i,
@@ -12730,7 +12737,7 @@ class of {
12730
12737
  const a = {
12731
12738
  email: t
12732
12739
  };
12733
- return await ur(new rf(r), {
12740
+ return await ur(new sf(r), {
12734
12741
  apiKey: this.API_KEY,
12735
12742
  body: a,
12736
12743
  httpConfig: this.httpConfig
@@ -12738,7 +12745,7 @@ class of {
12738
12745
  }
12739
12746
  async getCheckoutStatus(r) {
12740
12747
  return await ur(
12741
- new tf(r),
12748
+ new lf(r),
12742
12749
  {
12743
12750
  apiKey: this.API_KEY,
12744
12751
  httpConfig: this.httpConfig
@@ -12756,7 +12763,7 @@ class of {
12756
12763
  attributes: n
12757
12764
  };
12758
12765
  return await ur(
12759
- new af(r),
12766
+ new cf(r),
12760
12767
  {
12761
12768
  apiKey: this.API_KEY,
12762
12769
  body: i,
@@ -12780,7 +12787,7 @@ class of {
12780
12787
  initiation_source: i
12781
12788
  };
12782
12789
  return await ur(
12783
- new nf(),
12790
+ new df(),
12784
12791
  {
12785
12792
  apiKey: this.API_KEY,
12786
12793
  body: l,
@@ -12789,12 +12796,11 @@ class of {
12789
12796
  );
12790
12797
  }
12791
12798
  }
12792
- function sf(e) {
12793
- const r = /^rcb_[a-zA-Z0-9_.-]+$/, t = /^pdl_[a-zA-Z0-9_.-]+$/, a = /^test_[a-zA-Z0-9_.-]+$/;
12794
- if (!r.test(e) && !t.test(e) && !a.test(e))
12799
+ function pf(e, r) {
12800
+ if (!(Zm(e) || St(e) || Km(e) && (r == null ? void 0 : r.allowPaddleAPIKey)))
12795
12801
  throw new ge(
12796
12802
  he.InvalidCredentialsError,
12797
- "Invalid API key. Use your Web Billing or Paddle API key."
12803
+ "Invalid API key. Use your Web Billing API key."
12798
12804
  );
12799
12805
  }
12800
12806
  function zi(e) {
@@ -12816,17 +12822,17 @@ function zi(e) {
12816
12822
  'Provided user id: "' + (e ?? "[Not provided]") + '" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.'
12817
12823
  );
12818
12824
  }
12819
- function lf(e) {
12825
+ function _f(e) {
12820
12826
  if (e != null && e.endsWith("/"))
12821
12827
  throw new ge(
12822
12828
  he.ConfigurationError,
12823
12829
  "Invalid proxy URL. The proxy URL should not end with a trailing slash."
12824
12830
  );
12825
12831
  }
12826
- function cf(e) {
12832
+ function gf(e) {
12827
12833
  if (e) {
12828
12834
  for (const r in e)
12829
- if (Xm.has(r))
12835
+ if ($m.has(r))
12830
12836
  throw new ge(
12831
12837
  he.ConfigurationError,
12832
12838
  "Invalid additional headers. Some headers are reserved for internal use."
@@ -12834,7 +12840,7 @@ function cf(e) {
12834
12840
  }
12835
12841
  }
12836
12842
  var fs = /* @__PURE__ */ ((e) => (e.Current = "current", e))(fs || {});
12837
- function df(e, r) {
12843
+ function mf(e, r) {
12838
12844
  async function t(...a) {
12839
12845
  return await this.preload(), await e.call(this, ...a);
12840
12846
  }
@@ -12853,7 +12859,7 @@ const bs = (e, r) => {
12853
12859
  webBillingProduct: t,
12854
12860
  rcBillingProduct: t
12855
12861
  };
12856
- }, Rr = (e, r) => e == null ? null : bs(e, r), uf = (e, r, t) => {
12862
+ }, Rr = (e, r) => e == null ? null : bs(e, r), ff = (e, r, t) => {
12857
12863
  const a = e.offering_ids_by_placement ?? null;
12858
12864
  if (a == null)
12859
12865
  return null;
@@ -12902,7 +12908,7 @@ const bs = (e, r) => {
12902
12908
  )
12903
12909
  };
12904
12910
  };
12905
- function pf(e, r) {
12911
+ function bf(e, r) {
12906
12912
  const t = {};
12907
12913
  r.product_details.forEach((i) => {
12908
12914
  t[i.identifier] = i;
@@ -12925,8 +12931,8 @@ function pf(e, r) {
12925
12931
  current: n
12926
12932
  };
12927
12933
  }
12928
- const _f = 1000001;
12929
- function gf(e) {
12934
+ const yf = 1000001;
12935
+ function hf(e) {
12930
12936
  return e.webBillingProduct.defaultPurchaseOption;
12931
12937
  }
12932
12938
  function Ai(e, r, t, a = !1) {
@@ -12942,10 +12948,10 @@ function Ai(e, r, t, a = !1) {
12942
12948
  ) : ""
12943
12949
  });
12944
12950
  }
12945
- function mf(e, r) {
12951
+ function vf(e, r) {
12946
12952
  return e.unit === "year" ? r.translatePeriod(e.number * 12, xe.Month) : r.translatePeriod(e.number, e.unit);
12947
12953
  }
12948
- function ff({
12954
+ function kf({
12949
12955
  price: e,
12950
12956
  period: r,
12951
12957
  translator: t
@@ -12959,7 +12965,7 @@ function ff({
12959
12965
  e.currency
12960
12966
  ) : a : a;
12961
12967
  }
12962
- function bf({
12968
+ function wf({
12963
12969
  price: e,
12964
12970
  period: r,
12965
12971
  translator: t
@@ -13030,13 +13036,13 @@ function Fi({
13030
13036
  }
13031
13037
  );
13032
13038
  }
13033
- function yf(e, r) {
13039
+ function Pf(e, r) {
13034
13040
  const t = e.availablePackages, a = t.reduce((n, i) => {
13035
13041
  const o = n.webBillingProduct.price || n.webBillingProduct.price, l = i.webBillingProduct.price || i.webBillingProduct.price;
13036
13042
  return o.amountMicros > l.amountMicros ? n : i;
13037
13043
  });
13038
13044
  return t.reduce(
13039
- (n, i) => (n[i.identifier] = hf(
13045
+ (n, i) => (n[i.identifier] = xf(
13040
13046
  i,
13041
13047
  a,
13042
13048
  r
@@ -13044,11 +13050,11 @@ function yf(e, r) {
13044
13050
  {}
13045
13051
  );
13046
13052
  }
13047
- function hf(e, r, t) {
13053
+ function xf(e, r, t) {
13048
13054
  const a = e.webBillingProduct, n = a.price || a.price, i = t.formatPrice(
13049
13055
  n.amountMicros,
13050
13056
  n.currency
13051
- ), o = gf(e), l = a.productType, s = {
13057
+ ), o = hf(e), l = a.productType, s = {
13052
13058
  product_name: a.title,
13053
13059
  price: i,
13054
13060
  price_per_period: "",
@@ -13091,18 +13097,18 @@ function hf(e, r, t) {
13091
13097
  period: c,
13092
13098
  full: !0,
13093
13099
  translator: t
13094
- }), s.sub_price_per_month = bf({
13100
+ }), s.sub_price_per_month = wf({
13095
13101
  price: n,
13096
13102
  period: c,
13097
13103
  translator: t
13098
- }), s.sub_price_per_week = ff({
13104
+ }), s.sub_price_per_week = kf({
13099
13105
  price: n,
13100
13106
  period: c,
13101
13107
  translator: t
13102
13108
  }), s.sub_duration = t.translatePeriod(
13103
13109
  c == null ? void 0 : c.number,
13104
13110
  c == null ? void 0 : c.unit
13105
- ), s.sub_duration_in_months = mf(
13111
+ ), s.sub_duration_in_months = vf(
13106
13112
  c,
13107
13113
  t
13108
13114
  ), s.sub_period = t.translatePeriodFrequency(
@@ -13133,32 +13139,32 @@ function hf(e, r, t) {
13133
13139
  const Pe = [];
13134
13140
  for (let e = 0; e < 256; ++e)
13135
13141
  Pe.push((e + 256).toString(16).slice(1));
13136
- function vf(e, r = 0) {
13142
+ function Sf(e, r = 0) {
13137
13143
  return (Pe[e[r + 0]] + Pe[e[r + 1]] + Pe[e[r + 2]] + Pe[e[r + 3]] + "-" + Pe[e[r + 4]] + Pe[e[r + 5]] + "-" + Pe[e[r + 6]] + Pe[e[r + 7]] + "-" + Pe[e[r + 8]] + Pe[e[r + 9]] + "-" + Pe[e[r + 10]] + Pe[e[r + 11]] + Pe[e[r + 12]] + Pe[e[r + 13]] + Pe[e[r + 14]] + Pe[e[r + 15]]).toLowerCase();
13138
13144
  }
13139
13145
  let Ua;
13140
- const kf = new Uint8Array(16);
13141
- function wf() {
13146
+ const Ef = new Uint8Array(16);
13147
+ function Tf() {
13142
13148
  if (!Ua) {
13143
13149
  if (typeof crypto > "u" || !crypto.getRandomValues)
13144
13150
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
13145
13151
  Ua = crypto.getRandomValues.bind(crypto);
13146
13152
  }
13147
- return Ua(kf);
13153
+ return Ua(Ef);
13148
13154
  }
13149
- const Pf = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ji = { randomUUID: Pf };
13155
+ const If = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ji = { randomUUID: If };
13150
13156
  function ys(e, r, t) {
13151
13157
  var n;
13152
13158
  if (ji.randomUUID && !e)
13153
13159
  return ji.randomUUID();
13154
13160
  e = e || {};
13155
- const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? wf();
13161
+ const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Tf();
13156
13162
  if (a.length < 16)
13157
13163
  throw new Error("Random bytes length must be >= 16");
13158
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, vf(a);
13164
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Sf(a);
13159
13165
  }
13160
- var xf = /(%?)(%([sdijo]))/g;
13161
- function Sf(e, r) {
13166
+ var Df = /(%?)(%([sdijo]))/g;
13167
+ function qf(e, r) {
13162
13168
  switch (r) {
13163
13169
  case "s":
13164
13170
  return e;
@@ -13179,30 +13185,30 @@ function Bn(e, ...r) {
13179
13185
  if (r.length === 0)
13180
13186
  return e;
13181
13187
  let t = 0, a = e.replace(
13182
- xf,
13188
+ Df,
13183
13189
  (n, i, o, l) => {
13184
- const s = r[t], c = Sf(s, l);
13190
+ const s = r[t], c = qf(s, l);
13185
13191
  return i ? n : (t++, c);
13186
13192
  }
13187
13193
  );
13188
13194
  return t < r.length && (a += ` ${r.slice(t).join(" ")}`), a = a.replace(/%{2,2}/g, "%"), a;
13189
13195
  }
13190
- var Ef = 2;
13191
- function Tf(e) {
13196
+ var zf = 2;
13197
+ function Af(e) {
13192
13198
  if (!e.stack)
13193
13199
  return;
13194
13200
  const r = e.stack.split(`
13195
13201
  `);
13196
- r.splice(1, Ef), e.stack = r.join(`
13202
+ r.splice(1, zf), e.stack = r.join(`
13197
13203
  `);
13198
13204
  }
13199
- var If = class extends Error {
13205
+ var Ff = class extends Error {
13200
13206
  constructor(e, ...r) {
13201
- super(e), this.message = e, this.name = "Invariant Violation", this.message = Bn(e, ...r), Tf(this);
13207
+ super(e), this.message = e, this.name = "Invariant Violation", this.message = Bn(e, ...r), Af(this);
13202
13208
  }
13203
13209
  }, hs = (e, r, ...t) => {
13204
13210
  if (!e)
13205
- throw new If(r, ...t);
13211
+ throw new Ff(r, ...t);
13206
13212
  };
13207
13213
  hs.as = (e, r, t, ...a) => {
13208
13214
  if (!r) {
@@ -13218,33 +13224,33 @@ hs.as = (e, r, t, ...a) => {
13218
13224
  throw i;
13219
13225
  }
13220
13226
  };
13221
- const Df = "[MSW]";
13227
+ const jf = "[MSW]";
13222
13228
  function Rn(e, ...r) {
13223
13229
  const t = Bn(e, ...r);
13224
- return `${Df} ${t}`;
13230
+ return `${jf} ${t}`;
13225
13231
  }
13226
- function qf(e, ...r) {
13232
+ function Mf(e, ...r) {
13227
13233
  console.warn(Rn(e, ...r));
13228
13234
  }
13229
- function zf(e, ...r) {
13235
+ function Nf(e, ...r) {
13230
13236
  console.error(Rn(e, ...r));
13231
13237
  }
13232
- const Af = {
13238
+ const Cf = {
13233
13239
  formatMessage: Rn,
13234
- warn: qf,
13235
- error: zf
13240
+ warn: Mf,
13241
+ error: Nf
13236
13242
  };
13237
- function Ff() {
13243
+ function Of() {
13238
13244
  hs(
13239
13245
  typeof URL < "u",
13240
- Af.formatMessage(
13246
+ Cf.formatMessage(
13241
13247
  `Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`
13242
13248
  )
13243
13249
  );
13244
13250
  }
13245
13251
  var vs = /* @__PURE__ */ ((e) => (e.HEAD = "HEAD", e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.PATCH = "PATCH", e.OPTIONS = "OPTIONS", e.DELETE = "DELETE", e))(vs || {});
13246
- Ff();
13247
- class jf {
13252
+ Of();
13253
+ class Lf {
13248
13254
  constructor(r, t, a, n) {
13249
13255
  C(this, "initialDelay");
13250
13256
  C(this, "maxDelay");
@@ -13316,7 +13322,7 @@ function ks(e) {
13316
13322
  }
13317
13323
  return r;
13318
13324
  }
13319
- class Mf {
13325
+ class Bf {
13320
13326
  constructor(r) {
13321
13327
  C(this, "EVENT_TYPE", "web_billing");
13322
13328
  C(this, "id");
@@ -13341,7 +13347,7 @@ class Mf {
13341
13347
  });
13342
13348
  }
13343
13349
  }
13344
- function Nf(e, r) {
13350
+ function Rf(e, r) {
13345
13351
  const t = new URLSearchParams(window.location.search);
13346
13352
  return {
13347
13353
  libraryName: "purchases-js",
@@ -13363,8 +13369,8 @@ function Nf(e, r) {
13363
13369
  rcSource: r
13364
13370
  };
13365
13371
  }
13366
- const Cf = 2e3, Of = 5 * 6e4, Lf = 0.1;
13367
- class Bf {
13372
+ const Uf = 2e3, Vf = 5 * 6e4, Hf = 0.1;
13373
+ class Wf {
13368
13374
  constructor(r) {
13369
13375
  C(this, "apiKey");
13370
13376
  C(this, "eventsQueue", []);
@@ -13374,10 +13380,10 @@ class Bf {
13374
13380
  C(this, "appUserId");
13375
13381
  C(this, "isSilent");
13376
13382
  C(this, "rcSource");
13377
- this.apiKey = r.apiKey, this.eventsUrl = `${Wm}/v1/events`, this.appUserId = r.appUserId, this.isSilent = r.silent || !1, this.rcSource = r.rcSource, this.flushManager = new jf(
13378
- Cf,
13379
- Of,
13380
- Lf,
13383
+ this.apiKey = r.apiKey, this.eventsUrl = `${Wm}/v1/events`, this.appUserId = r.appUserId, this.isSilent = r.silent || !1, this.rcSource = r.rcSource, this.flushManager = new Lf(
13384
+ Uf,
13385
+ Vf,
13386
+ Hf,
13381
13387
  this.flushEvents.bind(this)
13382
13388
  );
13383
13389
  }
@@ -13399,11 +13405,11 @@ class Bf {
13399
13405
  return;
13400
13406
  }
13401
13407
  try {
13402
- const t = new Mf({
13408
+ const t = new Bf({
13403
13409
  eventName: r.eventName,
13404
13410
  traceId: this.traceId,
13405
13411
  appUserId: this.appUserId,
13406
- context: Nf(r.source, this.rcSource),
13412
+ context: Rf(r.source, this.rcSource),
13407
13413
  properties: r.properties || {}
13408
13414
  });
13409
13415
  this.eventsQueue.push(t), this.flushManager.tryFlush();
@@ -13433,7 +13439,7 @@ class Bf {
13433
13439
  });
13434
13440
  }
13435
13441
  }
13436
- const Rf = () => {
13442
+ const Yf = () => {
13437
13443
  const e = new URLSearchParams(window.location.search), r = [
13438
13444
  "utm_source",
13439
13445
  "utm_medium",
@@ -13445,7 +13451,7 @@ const Rf = () => {
13445
13451
  const n = e.get(a);
13446
13452
  n !== null && (t[a] = n);
13447
13453
  }), t;
13448
- }, Uf = ["app", "embedded"], Va = {
13454
+ }, Gf = ["app", "embedded"], Va = {
13449
13455
  autoCollectUTMAsMetadata: !0,
13450
13456
  collectAnalyticsEvents: !0
13451
13457
  };
@@ -13468,8 +13474,8 @@ function pn() {
13468
13474
  r.slice(10, 16).join("")
13469
13475
  ].join("-");
13470
13476
  }
13471
- var Vf = /* @__PURE__ */ z('<p class="svelte-11vxb6p"><strong>Free Trial:</strong> </p>'), Hf = /* @__PURE__ */ z('<p class="svelte-11vxb6p"><strong>Intro Price:</strong> </p>'), Wf = /* @__PURE__ */ z('<div class="rc-simulated-store-modal-overlay svelte-11vxb6p"><div class="rc-simulated-store-modal svelte-11vxb6p"><div class="rc-simulated-store-modal-content svelte-11vxb6p"><h2 class="rc-simulated-store-modal-title svelte-11vxb6p">Test Store Purchase</h2> <div class="rc-simulated-store-modal-details svelte-11vxb6p"><div><p class="svelte-11vxb6p"><strong>Product:</strong> </p> <p class="svelte-11vxb6p"><strong>Type:</strong> </p> <p class="svelte-11vxb6p"><strong>Price:</strong> </p> <!> <!></div></div> <div class="rc-simulated-store-modal-buttons svelte-11vxb6p"><button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-primary svelte-11vxb6p">Test valid purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-secondary svelte-11vxb6p">Test failed purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-cancel svelte-11vxb6p">Cancel</button></div></div></div></div>');
13472
- const Yf = {
13477
+ var Xf = /* @__PURE__ */ z('<p class="svelte-11vxb6p"><strong>Free Trial:</strong> </p>'), Zf = /* @__PURE__ */ z('<p class="svelte-11vxb6p"><strong>Intro Price:</strong> </p>'), Kf = /* @__PURE__ */ z('<div class="rc-simulated-store-modal-overlay svelte-11vxb6p"><div class="rc-simulated-store-modal svelte-11vxb6p"><div class="rc-simulated-store-modal-content svelte-11vxb6p"><h2 class="rc-simulated-store-modal-title svelte-11vxb6p">Test Store Purchase</h2> <div class="rc-simulated-store-modal-details svelte-11vxb6p"><div><p class="svelte-11vxb6p"><strong>Product:</strong> </p> <p class="svelte-11vxb6p"><strong>Type:</strong> </p> <p class="svelte-11vxb6p"><strong>Price:</strong> </p> <!> <!></div></div> <div class="rc-simulated-store-modal-buttons svelte-11vxb6p"><button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-primary svelte-11vxb6p">Test valid purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-secondary svelte-11vxb6p">Test failed purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-cancel svelte-11vxb6p">Cancel</button></div></div></div></div>');
13478
+ const Jf = {
13473
13479
  hash: "svelte-11vxb6p",
13474
13480
  code: `.rc-simulated-store-modal-overlay.svelte-11vxb6p {position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:9999;}.rc-simulated-store-modal.svelte-11vxb6p {background:white;border-radius:8px;padding:0;max-width:500px;width:90%;max-height:90%;overflow-y:auto;box-shadow:0 4px 20px rgba(0, 0, 0, 0.15);}.rc-simulated-store-modal-content.svelte-11vxb6p {padding:24px;}.rc-simulated-store-modal-title.svelte-11vxb6p {margin:0 0 20px 0;font-size:24px;font-weight:600;color:#333;}.rc-simulated-store-modal-details.svelte-11vxb6p {margin-bottom:24px;}.rc-simulated-store-modal-details.svelte-11vxb6p p:where(.svelte-11vxb6p) {margin:8px 0;color:#666;line-height:1.5;}.rc-simulated-store-modal-buttons.svelte-11vxb6p {display:flex;flex-direction:column;gap:12px;}.rc-simulated-store-modal-button.svelte-11vxb6p {padding:12px 24px;border:none;border-radius:6px;font-size:16px;font-weight:500;cursor:pointer;transition:background-color 0.2s ease;}.rc-simulated-store-modal-button-primary.svelte-11vxb6p {background-color:#007aff;color:white;}.rc-simulated-store-modal-button-primary.svelte-11vxb6p:hover {background-color:#0056cc;}.rc-simulated-store-modal-button-secondary.svelte-11vxb6p {background-color:#ff3b30;color:white;}.rc-simulated-store-modal-button-secondary.svelte-11vxb6p:hover {background-color:#cc2e24;}.rc-simulated-store-modal-button-cancel.svelte-11vxb6p {background-color:#f2f2f7;color:#333;}.rc-simulated-store-modal-button-cancel.svelte-11vxb6p:hover {background-color:#e5e5ea;}
13475
13481
 
@@ -13477,17 +13483,17 @@ const Yf = {
13477
13483
  @media (max-width: 768px) {.rc-simulated-store-modal-overlay.svelte-11vxb6p {padding:0;}.rc-simulated-store-modal.svelte-11vxb6p {width:100%;height:100%;border-radius:0;max-width:none;max-height:none;}.rc-simulated-store-modal-content.svelte-11vxb6p {height:100%;display:flex;flex-direction:column;justify-content:center;}
13478
13484
  }`
13479
13485
  };
13480
- function Gf(e, r) {
13481
- G(r, !1), Y(e, Yf);
13486
+ function Qf(e, r) {
13487
+ G(r, !1), Y(e, Jf);
13482
13488
  let t = R(r, "productIdentifier", 8), a = R(r, "productType", 8), n = R(r, "basePrice", 8), i = R(r, "freeTrialPeriod", 8, void 0), o = R(r, "introPriceFormatted", 8, void 0), l = R(r, "onValidPurchase", 8), s = R(r, "onFailedPurchase", 8), c = R(r, "onCancel", 8);
13483
13489
  function p(L) {
13484
13490
  L.target === L.currentTarget && c()();
13485
13491
  }
13486
13492
  Xe();
13487
- var u = Wf(), _ = x(u), g = x(_), f = N(x(g), 2), m = x(f), P = x(m), h = N(x(P)), y = N(P, 2), k = N(x(y)), D = N(y, 2), I = N(x(D)), q = N(D, 2);
13493
+ var u = Kf(), _ = x(u), g = x(_), f = N(x(g), 2), m = x(f), P = x(m), h = N(x(P)), y = N(P, 2), k = N(x(y)), D = N(y, 2), I = N(x(D)), q = N(D, 2);
13488
13494
  {
13489
13495
  var U = (L) => {
13490
- var H = Vf(), $ = N(x(H));
13496
+ var H = Xf(), $ = N(x(H));
13491
13497
  M(() => re($, ` ${i() ?? ""}`)), b(L, H);
13492
13498
  };
13493
13499
  O(q, (L) => {
@@ -13497,7 +13503,7 @@ function Gf(e, r) {
13497
13503
  var v = N(q, 2);
13498
13504
  {
13499
13505
  var w = (L) => {
13500
- var H = Hf(), $ = N(x(H));
13506
+ var H = Zf(), $ = N(x(H));
13501
13507
  M(() => re($, ` ${o() ?? ""}`)), b(L, H);
13502
13508
  };
13503
13509
  O(v, (L) => {
@@ -13518,7 +13524,7 @@ function Gf(e, r) {
13518
13524
  (H = c()) == null || H.apply(this, L);
13519
13525
  }), _r("click", u, p), b(e, u), X();
13520
13526
  }
13521
- async function Xf(e, r, t) {
13527
+ async function $f(e, r, t) {
13522
13528
  const a = /* @__PURE__ */ new Date(), n = `test_${a.getTime()}_${pn()}`, i = `test_store_operation_session_${pn()}`, l = {
13523
13529
  storeTransactionId: n,
13524
13530
  productIdentifier: e.identifier,
@@ -13537,7 +13543,7 @@ async function Xf(e, r, t) {
13537
13543
  storeTransaction: l
13538
13544
  };
13539
13545
  }
13540
- function Zf(e, r, t) {
13546
+ function eb(e, r, t) {
13541
13547
  const a = e.rcPackage.webBillingProduct, n = a.productType, i = a.freeTrialPhase, o = a.introPricePhase, l = a.price, s = (c) => c ? `${c.number} ${c.unit}${c.number > 1 ? "s" : ""}` : "N/A";
13542
13548
  return new Promise((c, p) => {
13543
13549
  var f;
@@ -13547,7 +13553,7 @@ function Zf(e, r, t) {
13547
13553
  g && ra(g), document.body.removeChild(u);
13548
13554
  };
13549
13555
  let g = null;
13550
- g = $a(Gf, {
13556
+ g = $a(Qf, {
13551
13557
  target: u,
13552
13558
  props: {
13553
13559
  productIdentifier: a.identifier,
@@ -13558,7 +13564,7 @@ function Zf(e, r, t) {
13558
13564
  onValidPurchase: async () => {
13559
13565
  _();
13560
13566
  try {
13561
- c(await Xf(a, r, t));
13567
+ c(await $f(a, r, t));
13562
13568
  } catch (m) {
13563
13569
  p(m);
13564
13570
  }
@@ -13578,10 +13584,10 @@ function Zf(e, r, t) {
13578
13584
  });
13579
13585
  });
13580
13586
  }
13581
- var Kf = /* @__PURE__ */ ((e) => (e.DisplayName = "$displayName", e.Email = "$email", e.PhoneNumber = "$phoneNumber", e.IDFA = "$idfa", e.IDFV = "$idfv", e.GPSAdId = "$gpsAdId", e.AndroidId = "$androidId", e.AmazonAdId = "$amazonAdId", e.IP = "$ip", e.AdjustId = "$adjustId", e.AmplitudeDeviceId = "$amplitudeDeviceId", e.AmplitudeUserId = "$amplitudeUserId", e.AppsflyerId = "$appsflyerId", e.AppsflyerSharingFilter = "$appsflyerSharingFilter", e.BranchId = "$branchId", e.BrazeAliasName = "$brazeAliasName", e.BrazeAliasLabel = "$brazeAliasLabel", e.ClevertapId = "$clevertapId", e.FbAnonId = "$fbAnonId", e.MparticleId = "$mparticleId", e.OnesignalId = "$onesignalId", e.OnesignalUserId = "$onesignalUserId", e.IntercomContactId = "$intercomContactId", e.MediaSource = "$mediaSource", e.Campaign = "$campaign", e.AdGroup = "$adGroup", e.AdId = "$ad", e.Keyword = "$keyword", e.Creative = "$creative", e.APNSTokens = "$apnsTokens", e.FCMTokens = "$fcmTokens", e.AirshipChannelId = "$airshipChannelId", e.SegmentId = "$segmentId", e.IterableUserId = "$iterableUserId", e.IterableCampaignId = "$iterableCampaignId", e.IterableTemplateId = "$iterableTemplateId", e.FirebaseAppInstanceId = "$firebaseAppInstanceId", e.MixpanelDistinctId = "$mixpanelDistinctId", e.ATTConsentStatus = "$attConsentStatus", e.KochavaDeviceId = "$kochavaDeviceId", e.DeviceVersion = "$deviceVersion", e.PosthogUserId = "$posthogUserId", e.TelemetryDeckUserId = "$telemetryDeckUserId", e.TelemetryDeckAppId = "$telemetryDeckAppId", e.AppleRefundHandlingPreference = "$appleRefundHandlingPreference", e.CustomerioId = "$customerioId", e.TenjinId = "$tenjinId", e))(Kf || {});
13587
+ var rb = /* @__PURE__ */ ((e) => (e.DisplayName = "$displayName", e.Email = "$email", e.PhoneNumber = "$phoneNumber", e.IDFA = "$idfa", e.IDFV = "$idfv", e.GPSAdId = "$gpsAdId", e.AndroidId = "$androidId", e.AmazonAdId = "$amazonAdId", e.IP = "$ip", e.AdjustId = "$adjustId", e.AmplitudeDeviceId = "$amplitudeDeviceId", e.AmplitudeUserId = "$amplitudeUserId", e.AppsflyerId = "$appsflyerId", e.AppsflyerSharingFilter = "$appsflyerSharingFilter", e.BranchId = "$branchId", e.BrazeAliasName = "$brazeAliasName", e.BrazeAliasLabel = "$brazeAliasLabel", e.ClevertapId = "$clevertapId", e.FbAnonId = "$fbAnonId", e.MparticleId = "$mparticleId", e.OnesignalId = "$onesignalId", e.OnesignalUserId = "$onesignalUserId", e.IntercomContactId = "$intercomContactId", e.MediaSource = "$mediaSource", e.Campaign = "$campaign", e.AdGroup = "$adGroup", e.AdId = "$ad", e.Keyword = "$keyword", e.Creative = "$creative", e.APNSTokens = "$apnsTokens", e.FCMTokens = "$fcmTokens", e.AirshipChannelId = "$airshipChannelId", e.SegmentId = "$segmentId", e.IterableUserId = "$iterableUserId", e.IterableCampaignId = "$iterableCampaignId", e.IterableTemplateId = "$iterableTemplateId", e.FirebaseAppInstanceId = "$firebaseAppInstanceId", e.MixpanelDistinctId = "$mixpanelDistinctId", e.ATTConsentStatus = "$attConsentStatus", e.KochavaDeviceId = "$kochavaDeviceId", e.DeviceVersion = "$deviceVersion", e.PosthogUserId = "$posthogUserId", e.TelemetryDeckUserId = "$telemetryDeckUserId", e.TelemetryDeckAppId = "$telemetryDeckAppId", e.AppleRefundHandlingPreference = "$appleRefundHandlingPreference", e.CustomerioId = "$customerioId", e.TenjinId = "$tenjinId", e))(rb || {});
13582
13588
  const Mi = "$RCAnonymousID:";
13583
13589
  var Ni, Ha;
13584
- Ni = [df];
13590
+ Ni = [mf];
13585
13591
  const ke = class ke {
13586
13592
  /** @internal */
13587
13593
  constructor(r, t, a = un, n = Va) {
@@ -13604,12 +13610,12 @@ const ke = class ke {
13604
13610
  C(this, "eventsTracker");
13605
13611
  this._API_KEY = r, this._appUserId = t, this._flags = { ...Va, ...n }, ha(r) ? Q.debugLog(
13606
13612
  "Initializing Purchases SDK with Web billing sandbox API Key"
13607
- ) : $t(r) && Q.debugLog("Initializing Purchases SDK with RC Test store API Key."), this.eventsTracker = new Bf({
13613
+ ) : St(r) && Q.debugLog("Initializing Purchases SDK with RC Test store API Key."), this.eventsTracker = new Wf({
13608
13614
  apiKey: this._API_KEY,
13609
13615
  appUserId: this._appUserId,
13610
13616
  silent: !this._flags.collectAnalyticsEvents,
13611
13617
  rcSource: this._flags.rcSource ?? null
13612
- }), this.backend = new of(this._API_KEY, a), this.purchaseOperationHelper = new dc(
13618
+ }), this.backend = new uf(this._API_KEY, a), this.purchaseOperationHelper = new dc(
13613
13619
  this.backend,
13614
13620
  this.eventsTracker
13615
13621
  ), this.eventsTracker.trackSDKEvent({
@@ -13690,7 +13696,7 @@ const ke = class ke {
13690
13696
  }
13691
13697
  static validateConfig(r) {
13692
13698
  var t, a;
13693
- sf(r.apiKey), zi(r.appUserId), lf((t = r.httpConfig) == null ? void 0 : t.proxyURL), cf((a = r.httpConfig) == null ? void 0 : a.additionalHeaders);
13699
+ pf(r.apiKey, r.flags), zi(r.appUserId), _f((t = r.httpConfig) == null ? void 0 : t.proxyURL), gf((a = r.httpConfig) == null ? void 0 : a.additionalHeaders);
13694
13700
  }
13695
13701
  /**
13696
13702
  * Loads and caches some optional data in the Purchases SDK.
@@ -13716,7 +13722,7 @@ const ke = class ke {
13716
13722
  }
13717
13723
  /** @internal */
13718
13724
  async fetchAndCacheBrandingInfo() {
13719
- if ($t(this._API_KEY)) {
13725
+ if (St(this._API_KEY)) {
13720
13726
  Q.warnLog(
13721
13727
  "Branding info is not available for RC Test Store API keys."
13722
13728
  );
@@ -13742,7 +13748,7 @@ const ke = class ke {
13742
13748
  let a = r.htmlTarget ?? document.getElementById("rcb-ui-pw-root");
13743
13749
  if (a === null) {
13744
13750
  const g = document.createElement("div");
13745
- g.id = "rcb-ui-pw-root", g.className = "rcb-ui-pw-root", g.style.zIndex = `${_f}`, document.body.appendChild(g), a = g;
13751
+ g.id = "rcb-ui-pw-root", g.className = "rcb-ui-pw-root", g.style.zIndex = `${yf}`, document.body.appendChild(g), a = g;
13746
13752
  }
13747
13753
  if (a === null)
13748
13754
  throw new Error(
@@ -13784,7 +13790,7 @@ const ke = class ke {
13784
13790
  r.onVisitCustomerCenter();
13785
13791
  return;
13786
13792
  }
13787
- }, _ = yf(
13793
+ }, _ = Pf(
13788
13794
  i,
13789
13795
  l
13790
13796
  );
@@ -13839,7 +13845,7 @@ const ke = class ke {
13839
13845
  a,
13840
13846
  t
13841
13847
  ), o = n.placements ?? null;
13842
- return o == null ? null : uf(
13848
+ return o == null ? null : ff(
13843
13849
  o,
13844
13850
  i.all,
13845
13851
  r
@@ -13851,7 +13857,7 @@ const ke = class ke {
13851
13857
  n,
13852
13858
  a == null ? void 0 : a.currency
13853
13859
  );
13854
- return this.logMissingProductIds(n, i.product_details), pf(r, i);
13860
+ return this.logMissingProductIds(n, i.product_details), bf(r, i);
13855
13861
  }
13856
13862
  /**
13857
13863
  * Convenience method to check whether a user is entitled to a specific
@@ -13895,8 +13901,8 @@ const ke = class ke {
13895
13901
  defaultLocale: l = it,
13896
13902
  skipSuccessPage: s = !1
13897
13903
  } = r;
13898
- if ($t(this._API_KEY))
13899
- return await Zf(
13904
+ if (St(this._API_KEY))
13905
+ return await eb(
13900
13906
  r,
13901
13907
  this.backend,
13902
13908
  this._appUserId
@@ -13921,14 +13927,14 @@ const ke = class ke {
13921
13927
  customerEmail: i
13922
13928
  });
13923
13929
  this.eventsTracker.trackSDKEvent(f);
13924
- const P = { ...this._flags.autoCollectUTMAsMetadata ? Rf() : {}, ...r.metadata || {} };
13930
+ const P = { ...this._flags.autoCollectUTMAsMetadata ? Yf() : {}, ...r.metadata || {} };
13925
13931
  let h = null;
13926
13932
  const y = this._brandingInfo;
13927
13933
  y && r.brandingAppearanceOverride && (y.appearance = r.brandingAppearanceOverride);
13928
13934
  const k = n !== void 0;
13929
13935
  return new Promise((I, q) => {
13930
13936
  k || window.history.pushState({ checkoutOpen: !0 }, "");
13931
- const v = this._flags.rcSource && Uf.includes(this._flags.rcSource) ? void 0 : () => {
13937
+ const v = this._flags.rcSource && Gf.includes(this._flags.rcSource) ? void 0 : () => {
13932
13938
  const S = vp();
13933
13939
  this.eventsTracker.trackSDKEvent(S), window.removeEventListener("popstate", v), h && ra(h), p.innerHTML = "", Q.debugLog("Purchase cancelled by user"), q(new ge(he.UserCancelledError));
13934
13940
  };
@@ -14032,7 +14038,7 @@ const ke = class ke {
14032
14038
  * @returns Whether the SDK is using a sandbox API Key.
14033
14039
  */
14034
14040
  isSandbox() {
14035
- return ha(this._API_KEY) || $t(this._API_KEY);
14041
+ return ha(this._API_KEY) || St(this._API_KEY);
14036
14042
  }
14037
14043
  /**
14038
14044
  * @returns Whether the current user is anonymous.
@@ -14086,6 +14092,6 @@ export {
14086
14092
  Vr as ProductType,
14087
14093
  _n as Purchases,
14088
14094
  ge as PurchasesError,
14089
- Kf as ReservedCustomerAttribute,
14095
+ rb as ReservedCustomerAttribute,
14090
14096
  lc as UninitializedPurchasesError
14091
14097
  };