@monetize.software/sdk 3.0.0-alpha.11 → 3.0.0-alpha.13

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.
@@ -1,17 +1,17 @@
1
- import { PaywallError as O, findApplicableOffer as H, BillingClient as Ut, EventTracker as Dt, resolveOffer as Nt, readBrowserOfferStart as $t, AuthClient as ct } from "../core.js";
2
- import { render as Y, h as dt, createContext as Ht } from "preact";
3
- import { jsx as n, jsxs as c, Fragment as ot } from "preact/jsx-runtime";
4
- import { useContext as Vt, useState as b, useEffect as E, useRef as F, useMemo as Gt, useLayoutEffect as qt } from "preact/hooks";
5
- const ut = 3600 * 1e3;
6
- function X(e) {
7
- return `paywall-${e}-trial-time-first-open`;
1
+ import { PaywallError as L, findApplicableOffer as N, BillingClient as Ne, EventTracker as He, resolveOffer as $e, readBrowserOfferStart as Ve, AuthClient as de } from "../core.js";
2
+ import { render as X, h as ue, createContext as qe } from "preact";
3
+ import { jsx as a, jsxs as d, Fragment as se } from "preact/jsx-runtime";
4
+ import { useContext as Ge, useState as v, useEffect as j, useRef as F, useMemo as We, useLayoutEffect as Ze } from "preact/hooks";
5
+ const pe = 3600 * 1e3;
6
+ function J(t) {
7
+ return `paywall-${t}-trial-time-first-open`;
8
8
  }
9
- function J(e) {
10
- return `paywall-${e}-skip-times`;
9
+ function Q(t) {
10
+ return `paywall-${t}-skip-times`;
11
11
  }
12
- class Ct {
13
- constructor(t, r, i) {
14
- this.storage = t, this.paywallId = r, this.config = i;
12
+ class Ie {
13
+ constructor(e, r, i) {
14
+ this.storage = e, this.paywallId = r, this.config = i;
15
15
  }
16
16
  async check() {
17
17
  return this.config.mode === "time" ? this.checkTime() : this.checkOpens();
@@ -20,70 +20,70 @@ class Ct {
20
20
  return this.config.mode === "time" ? this.recordTime() : this.recordOpens();
21
21
  }
22
22
  async reset() {
23
- await this.storage.removeItem(this.config.mode === "time" ? X(this.paywallId) : J(this.paywallId));
23
+ await this.storage.removeItem(this.config.mode === "time" ? J(this.paywallId) : Q(this.paywallId));
24
24
  }
25
25
  async checkTime() {
26
- const t = this.config.payload * ut, r = await this.storage.getItem(X(this.paywallId)), i = r ? Number(r) : null;
26
+ const e = this.config.payload * pe, r = await this.storage.getItem(J(this.paywallId)), i = r ? Number(r) : null;
27
27
  if (!i || !Number.isFinite(i))
28
28
  return {
29
29
  mode: "time",
30
30
  blocked: !0,
31
31
  startedAt: null,
32
32
  expiresAt: null,
33
- remainingMs: t,
34
- totalMs: t
33
+ remainingMs: e,
34
+ totalMs: e
35
35
  };
36
- const a = i + t, o = Math.max(0, a - Date.now());
36
+ const n = i + e, s = Math.max(0, n - Date.now());
37
37
  return {
38
38
  mode: "time",
39
- blocked: o > 0,
39
+ blocked: s > 0,
40
40
  startedAt: i,
41
- expiresAt: a,
42
- remainingMs: o,
43
- totalMs: t
41
+ expiresAt: n,
42
+ remainingMs: s,
43
+ totalMs: e
44
44
  };
45
45
  }
46
46
  async checkOpens() {
47
- const t = this.config.payload, r = await this.storage.getItem(J(this.paywallId)), i = r ? Number(r) : 0, a = Number.isFinite(i) ? i : 0, o = a < t, s = Math.max(0, t - a);
47
+ const e = this.config.payload, r = await this.storage.getItem(Q(this.paywallId)), i = r ? Number(r) : 0, n = Number.isFinite(i) ? i : 0, s = n < e, o = Math.max(0, e - n);
48
48
  return {
49
49
  mode: "opens",
50
- blocked: o,
51
- remainingActions: s,
52
- totalActions: t
50
+ blocked: s,
51
+ remainingActions: o,
52
+ totalActions: e
53
53
  };
54
54
  }
55
55
  async recordTime() {
56
- const t = this.config.payload * ut, r = X(this.paywallId), i = await this.storage.getItem(r);
57
- let a = i ? Number(i) : null;
58
- (!a || !Number.isFinite(a)) && (a = Date.now(), await this.storage.setItem(r, String(a)));
59
- const o = a + t, s = Math.max(0, o - Date.now());
56
+ const e = this.config.payload * pe, r = J(this.paywallId), i = await this.storage.getItem(r);
57
+ let n = i ? Number(i) : null;
58
+ (!n || !Number.isFinite(n)) && (n = Date.now(), await this.storage.setItem(r, String(n)));
59
+ const s = n + e, o = Math.max(0, s - Date.now());
60
60
  return {
61
61
  mode: "time",
62
- blocked: s > 0,
63
- startedAt: a,
64
- expiresAt: o,
65
- remainingMs: s,
66
- totalMs: t
62
+ blocked: o > 0,
63
+ startedAt: n,
64
+ expiresAt: s,
65
+ remainingMs: o,
66
+ totalMs: e
67
67
  };
68
68
  }
69
69
  async recordOpens() {
70
- const t = this.config.payload, r = J(this.paywallId), i = await this.storage.getItem(r), a = i ? Number(i) : 0, o = Number.isFinite(a) ? a : 0, s = Math.min(t, o + 1);
71
- await this.storage.setItem(r, String(s));
72
- const d = Math.max(0, t - s);
70
+ const e = this.config.payload, r = Q(this.paywallId), i = await this.storage.getItem(r), n = i ? Number(i) : 0, s = Number.isFinite(n) ? n : 0, o = Math.min(e, s + 1);
71
+ await this.storage.setItem(r, String(o));
72
+ const c = Math.max(0, e - o);
73
73
  return {
74
74
  mode: "opens",
75
- blocked: s < t,
76
- remainingActions: d,
77
- totalActions: t
75
+ blocked: o < e,
76
+ remainingActions: c,
77
+ totalActions: e
78
78
  };
79
79
  }
80
80
  }
81
- let pt = !1;
82
- class Wt {
83
- constructor(t, r, i) {
84
- pt || (pt = !0, console.warn(
81
+ let he = !1;
82
+ class Ke {
83
+ constructor(e, r, i) {
84
+ he || (he = !0, console.warn(
85
85
  '[paywall] trial.storage="server" is not implemented yet — falling back to client storage. State lives in localStorage; users can reset trial by clearing site data.'
86
- )), this.fallback = new Ct(t, r, i);
86
+ )), this.fallback = new Ie(e, r, i);
87
87
  }
88
88
  check() {
89
89
  return this.fallback.check();
@@ -95,23 +95,23 @@ class Wt {
95
95
  return this.fallback.reset();
96
96
  }
97
97
  }
98
- function Zt(e, t, r) {
99
- return r.storage === "server" ? new Wt(e, t, r) : new Ct(e, t, r);
98
+ function Ye(t, e, r) {
99
+ return r.storage === "server" ? new Ke(t, e, r) : new Ie(t, e, r);
100
100
  }
101
- const It = '/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-600:oklch(57.7% .245 27.325);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{all:initial;color-scheme:light;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.-top-2{top:calc(var(--spacing) * -2)}.-top-\\[9px\\]{top:-9px}.-top-\\[10px\\]{top:-10px}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-\\[6px\\]{right:-6px}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.z-\\[2147483647\\]{z-index:2147483647}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-2{margin-bottom:calc(var(--spacing) * -2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-6\\.5{height:calc(var(--spacing) * 6.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-\\[22px\\]{height:22px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[calc\\(100dvh-1rem\\)\\]{max-height:calc(100dvh - 1rem)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-12{min-height:calc(var(--spacing) * 12)}.min-h-\\[2\\.4em\\]{min-height:2.4em}.min-h-\\[120px\\]{min-height:120px}.w-1{width:calc(var(--spacing) * 1)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-6\\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[320px\\]{max-width:320px}.max-w-\\[360px\\]{max-width:360px}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[pw-fade-in_180ms_ease-out\\]{animation:.18s ease-out pw-fade-in}.animate-\\[pw-scale-in_220ms_cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{animation:.22s cubic-bezier(.16,1,.3,1) pw-scale-in}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-1\\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[9px\\]{border-radius:9px}.rounded-\\[11px\\]{border-radius:11px}.rounded-full{border-radius:3.40282e38px}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-tl-xl{border-top-left-radius:var(--radius-xl)}.rounded-tr-xl{border-top-right-radius:var(--radius-xl)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[2\\.5px\\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.border-\\[5px\\]{border-style:var(--tw-border-style);border-width:5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b,.border-b-1{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--pw-accent\\)\\]{border-color:var(--pw-accent)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-t-\\[var\\(--pw-accent\\)\\]{border-top-color:var(--pw-accent)}.border-t-gray-700{border-top-color:var(--color-gray-700)}.border-t-white{border-top-color:var(--color-white)}.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:var(--pw-accent)}@supports (color:color-mix(in lab,red,red)){.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:color-mix(in srgb,var(--pw-accent) 6%,white)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-950\\/50{background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\\/50{background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.p-2{padding:calc(var(--spacing) * 2)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.9375rem\\]{font-size:.9375rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[22px\\]{font-size:22px}.text-\\[26px\\]{font-size:26px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-800\\/70{color:#1e2939b3}@supports (color:color-mix(in lab,red,red)){.text-gray-800\\/70{color:color-mix(in oklab,var(--color-gray-800) 70%,transparent)}}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-gray-400{-webkit-text-decoration-color:var(--color-gray-400);text-decoration-color:var(--color-gray-400)}.decoration-\\[1\\.5px\\]{text-decoration-thickness:1.5px}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_2px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,#ef444480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\\:text-gray-500::placeholder{color:var(--color-gray-500)}@media(hover:hover){.hover\\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-50\\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-50\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-200\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:bg-gray-200\\/60:focus{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.focus\\:bg-gray-200\\/60:focus{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 30%,transparent))}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:opacity-80:focus-visible{opacity:.8}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--pw-accent\\)\\]:focus-visible{--tw-ring-color:var(--pw-accent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\\:hover\\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(min-width:40rem){.sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.sm\\:p-4{padding:calc(var(--spacing) * 4)}.sm\\:p-8{padding:calc(var(--spacing) * 8)}.sm\\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\\:pt-5{padding-top:calc(var(--spacing) * 5)}.sm\\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.sm\\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.sm\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}.pw-cta-shimmer:before{content:"";z-index:1;background:linear-gradient(90deg,#0000,#ffffff59 50%,#0000);width:100%;height:100%;animation:3s infinite pw-cta-shimmer;position:absolute;top:0;left:-100%}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}';
102
- let ht = !1;
103
- function Kt() {
104
- if (ht || (ht = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
105
- let e;
101
+ const Ae = '/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-600:oklch(57.7% .245 27.325);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{all:initial;color-scheme:light;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.-top-2{top:calc(var(--spacing) * -2)}.-top-\\[9px\\]{top:-9px}.-top-\\[10px\\]{top:-10px}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-\\[6px\\]{right:-6px}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.z-\\[2147483647\\]{z-index:2147483647}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-2{margin-bottom:calc(var(--spacing) * -2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-6\\.5{height:calc(var(--spacing) * 6.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-\\[22px\\]{height:22px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[calc\\(100dvh-1rem\\)\\]{max-height:calc(100dvh - 1rem)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-12{min-height:calc(var(--spacing) * 12)}.min-h-\\[2\\.4em\\]{min-height:2.4em}.min-h-\\[120px\\]{min-height:120px}.w-1{width:calc(var(--spacing) * 1)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-6\\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[320px\\]{max-width:320px}.max-w-\\[360px\\]{max-width:360px}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[pw-fade-in_180ms_ease-out\\]{animation:.18s ease-out pw-fade-in}.animate-\\[pw-scale-in_220ms_cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{animation:.22s cubic-bezier(.16,1,.3,1) pw-scale-in}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-1\\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[9px\\]{border-radius:9px}.rounded-\\[11px\\]{border-radius:11px}.rounded-full{border-radius:3.40282e38px}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-tl-xl{border-top-left-radius:var(--radius-xl)}.rounded-tr-xl{border-top-right-radius:var(--radius-xl)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[2\\.5px\\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.border-\\[5px\\]{border-style:var(--tw-border-style);border-width:5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b,.border-b-1{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--pw-accent\\)\\]{border-color:var(--pw-accent)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-t-\\[var\\(--pw-accent\\)\\]{border-top-color:var(--pw-accent)}.border-t-gray-700{border-top-color:var(--color-gray-700)}.border-t-white{border-top-color:var(--color-white)}.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:var(--pw-accent)}@supports (color:color-mix(in lab,red,red)){.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:color-mix(in srgb,var(--pw-accent) 6%,white)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-950\\/50{background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\\/50{background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.p-2{padding:calc(var(--spacing) * 2)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.9375rem\\]{font-size:.9375rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[22px\\]{font-size:22px}.text-\\[26px\\]{font-size:26px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-800\\/70{color:#1e2939b3}@supports (color:color-mix(in lab,red,red)){.text-gray-800\\/70{color:color-mix(in oklab,var(--color-gray-800) 70%,transparent)}}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-gray-400{-webkit-text-decoration-color:var(--color-gray-400);text-decoration-color:var(--color-gray-400)}.decoration-\\[1\\.5px\\]{text-decoration-thickness:1.5px}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_2px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,#ef444480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\\:text-gray-500::placeholder{color:var(--color-gray-500)}@media(hover:hover){.hover\\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-50\\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-50\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-200\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:bg-gray-200\\/60:focus{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.focus\\:bg-gray-200\\/60:focus{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 30%,transparent))}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:opacity-80:focus-visible{opacity:.8}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--pw-accent\\)\\]:focus-visible{--tw-ring-color:var(--pw-accent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\\:hover\\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(min-width:40rem){.sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.sm\\:p-4{padding:calc(var(--spacing) * 4)}.sm\\:p-8{padding:calc(var(--spacing) * 8)}.sm\\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\\:pt-5{padding-top:calc(var(--spacing) * 5)}.sm\\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.sm\\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.sm\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}.pw-cta-shimmer:before{content:"";z-index:1;background:linear-gradient(90deg,#0000,#ffffff59 50%,#0000);width:100%;height:100%;animation:3s infinite pw-cta-shimmer;position:absolute;top:0;left:-100%}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}';
102
+ let ge = !1;
103
+ function Xe() {
104
+ if (ge || (ge = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
105
+ let t;
106
106
  try {
107
- const t = new CSSStyleSheet();
108
- t.replaceSync(It), e = t.cssRules;
107
+ const e = new CSSStyleSheet();
108
+ e.replaceSync(Ae), t = e.cssRules;
109
109
  } catch {
110
110
  return;
111
111
  }
112
- for (const t of e) {
113
- if (t.constructor.name !== "CSSPropertyRule") continue;
114
- const r = t;
112
+ for (const e of t) {
113
+ if (e.constructor.name !== "CSSPropertyRule") continue;
114
+ const r = e;
115
115
  try {
116
116
  CSS.registerProperty({
117
117
  name: r.name,
@@ -123,13 +123,13 @@ function Kt() {
123
123
  }
124
124
  }
125
125
  }
126
- function Yt(e, t, r = {}) {
126
+ function Je(t, e, r = {}) {
127
127
  if (typeof document > "u")
128
128
  throw new Error("mountShadow called in non-DOM environment");
129
- Kt();
129
+ Xe();
130
130
  const i = r.host ?? document.createElement("div");
131
131
  i.setAttribute("data-paywall-host", ""), i.style.cssText = r.inline ? "all: initial; position: absolute; inset: 0; z-index: 1; pointer-events: none;" : "all: initial; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;", !i.isConnected && !r.inline && document.body.appendChild(i);
132
- const a = i.attachShadow({ mode: r.shadowMode ?? "closed" }), o = `
132
+ const n = i.attachShadow({ mode: r.shadowMode ?? "closed" }), s = `
133
133
  :host {
134
134
  all: initial !important;
135
135
  display: block !important;
@@ -147,34 +147,34 @@ function Yt(e, t, r = {}) {
147
147
  cursor: auto !important;
148
148
  visibility: visible !important;
149
149
  }
150
- `, s = document.createElement("style");
151
- s.textContent = o + It + (r.injectCss ?? ""), a.appendChild(s);
152
- const d = document.createElement("div");
153
- d.style.pointerEvents = "auto", a.appendChild(d);
154
- let l = t;
155
- return Y(dt(e, l), d), {
156
- shadowRoot: a,
157
- update(g) {
158
- l = { ...l, ...g }, Y(dt(e, l), d);
150
+ `, o = document.createElement("style");
151
+ o.textContent = s + Ae + (r.injectCss ?? ""), n.appendChild(o);
152
+ const c = document.createElement("div");
153
+ c.style.pointerEvents = "auto", n.appendChild(c);
154
+ let l = e;
155
+ return X(ue(t, l), c), {
156
+ shadowRoot: n,
157
+ update(p) {
158
+ l = { ...l, ...p }, X(ue(t, l), c);
159
159
  },
160
160
  unmount() {
161
- Y(null, d), i.remove();
161
+ X(null, c), i.remove();
162
162
  }
163
163
  };
164
164
  }
165
- const Xt = (e, t, r) => {
166
- const i = e[t];
167
- return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((a, o) => {
165
+ const Qe = (t, e, r) => {
166
+ const i = t[e];
167
+ return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((n, s) => {
168
168
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
169
- o.bind(
169
+ s.bind(
170
170
  null,
171
171
  new Error(
172
- "Unknown variable dynamic import: " + t + (t.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
172
+ "Unknown variable dynamic import: " + e + (e.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
173
173
  )
174
174
  )
175
175
  );
176
176
  });
177
- }, Jt = [
177
+ }, et = [
178
178
  "ru",
179
179
  "uk",
180
180
  "de",
@@ -202,144 +202,144 @@ const Xt = (e, t, r) => {
202
202
  "th",
203
203
  "vi",
204
204
  "he"
205
- ], At = (e, t, r) => Lt(t, r), Mt = Ht({ t: At, locale: "en" });
206
- function Lt(e, t) {
207
- if (!t) return e;
208
- let r = e;
209
- for (const [i, a] of Object.entries(t))
210
- r = r.split(`{${i}}`).join(String(a));
205
+ ], Me = (t, e, r) => Te(e, r), Le = qe({ t: Me, locale: "en" });
206
+ function Te(t, e) {
207
+ if (!e) return t;
208
+ let r = t;
209
+ for (const [i, n] of Object.entries(e))
210
+ r = r.split(`{${i}}`).join(String(n));
211
211
  return r;
212
212
  }
213
- const Q = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map();
214
- function Pt(e) {
215
- return Jt.includes(e);
213
+ const ee = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map();
214
+ function Pe(t) {
215
+ return et.includes(t);
216
216
  }
217
- function Qt(e) {
218
- const t = [];
217
+ function tt(t) {
218
+ const e = [];
219
219
  if (typeof navigator < "u" && navigator.language) {
220
- t.push(navigator.language);
220
+ e.push(navigator.language);
221
221
  const i = navigator.language.split("-")[0];
222
- i && i !== navigator.language && t.push(i);
222
+ i && i !== navigator.language && e.push(i);
223
223
  }
224
- const r = e.settings.locale_default;
224
+ const r = t.settings.locale_default;
225
225
  if (r) {
226
- t.push(r);
226
+ e.push(r);
227
227
  const i = r.split("-")[0];
228
- i && i !== r && t.push(i);
228
+ i && i !== r && e.push(i);
229
229
  }
230
- for (const i of t)
231
- if (Pt(i)) return i;
230
+ for (const i of e)
231
+ if (Pe(i)) return i;
232
232
  return null;
233
233
  }
234
- function te(e, t) {
235
- return !!e.locales && e.locales[t] !== void 0;
234
+ function rt(t, e) {
235
+ return !!t.locales && t.locales[e] !== void 0;
236
236
  }
237
- async function ee(e) {
238
- const t = Q.get(e);
239
- if (t) return t;
240
- const r = tt.get(e);
237
+ async function it(t) {
238
+ const e = ee.get(t);
239
+ if (e) return e;
240
+ const r = te.get(t);
241
241
  if (r) return r;
242
- const i = Xt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-B2Wg_IrC.js"), "./locales/cs.ts": () => import("./cs-BNo9Dx0Q.js"), "./locales/da.ts": () => import("./da-Do9Lq6En.js"), "./locales/de.ts": () => import("./de-C8pDZNvx.js"), "./locales/el.ts": () => import("./el-DzMNX-_P.js"), "./locales/es.ts": () => import("./es-YrKt-q4w.js"), "./locales/fi.ts": () => import("./fi-Bh44pwZ4.js"), "./locales/fr.ts": () => import("./fr-Bc0pw4ws.js"), "./locales/he.ts": () => import("./he-Bfm-bhe3.js"), "./locales/hi.ts": () => import("./hi-D-O-B9Dn.js"), "./locales/hu.ts": () => import("./hu-CmIuAbLL.js"), "./locales/id.ts": () => import("./id-DN7IES-A.js"), "./locales/it.ts": () => import("./it-Cz5Nmqx5.js"), "./locales/ja.ts": () => import("./ja-BH9BlBh2.js"), "./locales/ko.ts": () => import("./ko-CYV9QuYs.js"), "./locales/nl.ts": () => import("./nl-BvkB900D.js"), "./locales/no.ts": () => import("./no-3s9_ormb.js"), "./locales/pl.ts": () => import("./pl-C9WTGQtb.js"), "./locales/pt.ts": () => import("./pt-uFVUv_Op.js"), "./locales/ro.ts": () => import("./ro-BrqQ8Au-.js"), "./locales/ru.ts": () => import("./ru-DK594dA8.js"), "./locales/sv.ts": () => import("./sv-CHNH8-mq.js"), "./locales/th.ts": () => import("./th-l24Pm5q-.js"), "./locales/tr.ts": () => import("./tr-ADpigSY5.js"), "./locales/uk.ts": () => import("./uk-CGqo4jek.js"), "./locales/vi.ts": () => import("./vi-Dk9bTu6f.js"), "./locales/zh.ts": () => import("./zh-LDkEV2D9.js") }), `./locales/${e}.ts`, 3).then((a) => {
243
- const o = a.default ?? {};
244
- return Q.set(e, o), o;
245
- }).catch((a) => {
246
- console.warn(`[paywall] failed to load locale chunk "${e}"`, a);
247
- const o = {};
248
- return Q.set(e, o), o;
242
+ const i = Qe(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-B2Wg_IrC.js"), "./locales/cs.ts": () => import("./cs-BNo9Dx0Q.js"), "./locales/da.ts": () => import("./da-Do9Lq6En.js"), "./locales/de.ts": () => import("./de-C8pDZNvx.js"), "./locales/el.ts": () => import("./el-DzMNX-_P.js"), "./locales/es.ts": () => import("./es-YrKt-q4w.js"), "./locales/fi.ts": () => import("./fi-Bh44pwZ4.js"), "./locales/fr.ts": () => import("./fr-Bc0pw4ws.js"), "./locales/he.ts": () => import("./he-Bfm-bhe3.js"), "./locales/hi.ts": () => import("./hi-D-O-B9Dn.js"), "./locales/hu.ts": () => import("./hu-CmIuAbLL.js"), "./locales/id.ts": () => import("./id-DN7IES-A.js"), "./locales/it.ts": () => import("./it-Cz5Nmqx5.js"), "./locales/ja.ts": () => import("./ja-BH9BlBh2.js"), "./locales/ko.ts": () => import("./ko-CYV9QuYs.js"), "./locales/nl.ts": () => import("./nl-BvkB900D.js"), "./locales/no.ts": () => import("./no-3s9_ormb.js"), "./locales/pl.ts": () => import("./pl-C9WTGQtb.js"), "./locales/pt.ts": () => import("./pt-uFVUv_Op.js"), "./locales/ro.ts": () => import("./ro-BrqQ8Au-.js"), "./locales/ru.ts": () => import("./ru-DK594dA8.js"), "./locales/sv.ts": () => import("./sv-CHNH8-mq.js"), "./locales/th.ts": () => import("./th-l24Pm5q-.js"), "./locales/tr.ts": () => import("./tr-ADpigSY5.js"), "./locales/uk.ts": () => import("./uk-CGqo4jek.js"), "./locales/vi.ts": () => import("./vi-Dk9bTu6f.js"), "./locales/zh.ts": () => import("./zh-LDkEV2D9.js") }), `./locales/${t}.ts`, 3).then((n) => {
243
+ const s = n.default ?? {};
244
+ return ee.set(t, s), s;
245
+ }).catch((n) => {
246
+ console.warn(`[paywall] failed to load locale chunk "${t}"`, n);
247
+ const s = {};
248
+ return ee.set(t, s), s;
249
249
  }).finally(() => {
250
- tt.delete(e);
250
+ te.delete(t);
251
251
  });
252
- return tt.set(e, i), i;
253
- }
254
- function re({ bootstrap: e, forceLocale: t, children: r }) {
255
- const [i, a] = b("en"), [o, s] = b(null);
256
- E(() => {
257
- const g = (t && Pt(t) ? t : null) ?? (() => {
258
- if (!e) return null;
259
- const u = Qt(e);
260
- return !u || !te(e, u) ? null : u;
252
+ return te.set(t, i), i;
253
+ }
254
+ function nt({ bootstrap: t, forceLocale: e, children: r }) {
255
+ const [i, n] = v("en"), [s, o] = v(null);
256
+ j(() => {
257
+ const p = (e && Pe(e) ? e : null) ?? (() => {
258
+ if (!t) return null;
259
+ const f = tt(t);
260
+ return !f || !rt(t, f) ? null : f;
261
261
  })();
262
- if (!g) {
263
- (o !== null || i !== "en") && (a("en"), s(null));
262
+ if (!p) {
263
+ (s !== null || i !== "en") && (n("en"), o(null));
264
264
  return;
265
265
  }
266
- if (g === i && o) return;
267
- let p = !1;
268
- return ee(g).then((u) => {
269
- p || (a(g), s(u));
266
+ if (p === i && s) return;
267
+ let u = !1;
268
+ return it(p).then((f) => {
269
+ u || (n(p), o(f));
270
270
  }), () => {
271
- p = !0;
271
+ u = !0;
272
272
  };
273
- }, [e, t]);
274
- const d = {
273
+ }, [t, e]);
274
+ const c = {
275
275
  locale: i,
276
- t: o ? (l, g, p) => Lt(o[l] ?? g, p) : At
276
+ t: s ? (l, p, u) => Te(s[l] ?? p, u) : Me
277
277
  };
278
- return /* @__PURE__ */ n(Mt.Provider, { value: d, children: r });
278
+ return /* @__PURE__ */ a(Le.Provider, { value: c, children: r });
279
279
  }
280
- function v() {
281
- return Vt(Mt);
280
+ function S() {
281
+ return Ge(Le);
282
282
  }
283
- const gt = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
284
- function ie({
285
- open: e,
286
- onClose: t,
283
+ const fe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
284
+ function at({
285
+ open: t,
286
+ onClose: e,
287
287
  labelledBy: r,
288
288
  brandColor: i,
289
- topBanner: a,
290
- allowClose: o = !0,
291
- hideCloseButton: s = !1,
292
- inline: d = !1,
289
+ topBanner: n,
290
+ allowClose: s = !0,
291
+ hideCloseButton: o = !1,
292
+ inline: c = !1,
293
293
  children: l
294
294
  }) {
295
- const { t: g } = v(), p = F(null), u = F(null);
296
- return E(() => {
297
- if (!e) return;
298
- u.current = document.activeElement ?? null;
299
- const h = p.current;
300
- h && (h.querySelector(gt) ?? h).focus({ preventScroll: !0 });
301
- const m = (_) => {
302
- if (_.key === "Escape") {
303
- if (!o) return;
304
- _.stopPropagation(), t();
295
+ const { t: p } = S(), u = F(null), f = F(null);
296
+ return j(() => {
297
+ if (!t) return;
298
+ f.current = document.activeElement ?? null;
299
+ const w = u.current;
300
+ w && (w.querySelector(fe) ?? w).focus({ preventScroll: !0 });
301
+ const A = (m) => {
302
+ if (m.key === "Escape") {
303
+ if (!s) return;
304
+ m.stopPropagation(), e();
305
305
  return;
306
306
  }
307
- if (_.key !== "Tab" || !p.current) return;
308
- const S = Array.from(
309
- p.current.querySelectorAll(gt)
307
+ if (m.key !== "Tab" || !u.current) return;
308
+ const C = Array.from(
309
+ u.current.querySelectorAll(fe)
310
310
  ).filter((z) => !z.hasAttribute("disabled") && z.tabIndex !== -1);
311
- if (S.length === 0) {
312
- _.preventDefault();
311
+ if (C.length === 0) {
312
+ m.preventDefault();
313
313
  return;
314
314
  }
315
- const A = S[0], R = S[S.length - 1], P = document.activeElement;
316
- _.shiftKey && P === A ? (_.preventDefault(), R.focus()) : !_.shiftKey && P === R && (_.preventDefault(), A.focus());
315
+ const I = C[0], B = C[C.length - 1], M = document.activeElement;
316
+ m.shiftKey && M === I ? (m.preventDefault(), B.focus()) : !m.shiftKey && M === B && (m.preventDefault(), I.focus());
317
317
  };
318
- document.addEventListener("keydown", m, !0);
319
- const j = document.body.style.overflow;
320
- return d || (document.body.style.overflow = "hidden"), () => {
321
- document.removeEventListener("keydown", m, !0), d || (document.body.style.overflow = j), u.current?.focus?.({ preventScroll: !0 });
318
+ document.addEventListener("keydown", A, !0);
319
+ const b = document.body.style.overflow;
320
+ return c || (document.body.style.overflow = "hidden"), () => {
321
+ document.removeEventListener("keydown", A, !0), c || (document.body.style.overflow = b), f.current?.focus?.({ preventScroll: !0 });
322
322
  };
323
- }, [e, t, o, d]), e ? /* @__PURE__ */ c(
323
+ }, [t, e, s, c]), t ? /* @__PURE__ */ d(
324
324
  "div",
325
325
  {
326
- class: `${d ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
327
- onClick: (h) => {
328
- o && h.target === h.currentTarget && t();
326
+ class: `${c ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
327
+ onClick: (w) => {
328
+ s && w.target === w.currentTarget && e();
329
329
  },
330
330
  "data-pw-root": !0,
331
331
  children: [
332
- /* @__PURE__ */ c(
332
+ /* @__PURE__ */ d(
333
333
  "div",
334
334
  {
335
335
  class: "relative flex w-full max-w-[400px] flex-col animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]",
336
336
  style: { "--pw-accent": i ?? "#3b82f6" },
337
337
  children: [
338
- a,
339
- /* @__PURE__ */ c(
338
+ n,
339
+ /* @__PURE__ */ d(
340
340
  "div",
341
341
  {
342
- ref: p,
342
+ ref: u,
343
343
  role: "dialog",
344
344
  "aria-modal": "true",
345
345
  "aria-labelledby": r,
@@ -350,14 +350,14 @@ function ie({
350
350
  },
351
351
  children: [
352
352
  l,
353
- o && !s ? /* @__PURE__ */ n(
353
+ s && !o ? /* @__PURE__ */ a(
354
354
  "button",
355
355
  {
356
356
  type: "button",
357
- onClick: t,
358
- "aria-label": g("modal.close_aria", "Close"),
357
+ onClick: e,
358
+ "aria-label": p("modal.close_aria", "Close"),
359
359
  class: "absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-500 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
360
- children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n(
360
+ children: /* @__PURE__ */ a("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a(
361
361
  "path",
362
362
  {
363
363
  d: "M3 3l10 10M13 3L3 13",
@@ -374,7 +374,7 @@ function ie({
374
374
  ]
375
375
  }
376
376
  ),
377
- /* @__PURE__ */ n("style", { children: `
377
+ /* @__PURE__ */ a("style", { children: `
378
378
  @keyframes pw-fade-in { from { opacity: 0 } to { opacity: 1 } }
379
379
  @keyframes pw-scale-in {
380
380
  from { opacity: 0; transform: translateY(12px) scale(0.96) }
@@ -385,22 +385,22 @@ function ie({
385
385
  }
386
386
  ) : null;
387
387
  }
388
- function ne(e, t) {
389
- switch (e) {
388
+ function ot(t, e) {
389
+ switch (t) {
390
390
  case "google":
391
- return t("auth.continue_with_google", "Continue with Google");
391
+ return e("auth.continue_with_google", "Continue with Google");
392
392
  case "apple":
393
- return t("auth.continue_with_apple", "Continue with Apple");
393
+ return e("auth.continue_with_apple", "Continue with Apple");
394
394
  case "github":
395
- return t("auth.continue_with_github", "Continue with GitHub");
395
+ return e("auth.continue_with_github", "Continue with GitHub");
396
396
  case "facebook":
397
- return t("auth.continue_with_facebook", "Continue with Facebook");
397
+ return e("auth.continue_with_facebook", "Continue with Facebook");
398
398
  }
399
399
  }
400
- function ft(e, t, r) {
401
- const i = t === "signup" ? r("auth.signup_failed", "Sign-up failed") : r("auth.signin_failed", "Sign-in failed");
402
- if (!(e instanceof O)) return i;
403
- switch (e.code) {
400
+ function we(t, e, r) {
401
+ const i = e === "signup" ? r("auth.signup_failed", "Sign-up failed") : r("auth.signin_failed", "Sign-in failed");
402
+ if (!(t instanceof L)) return i;
403
+ switch (t.code) {
404
404
  case "invalid_credentials":
405
405
  return r("auth.invalid_credentials", "Invalid email or password");
406
406
  case "email_not_confirmed":
@@ -431,265 +431,265 @@ function ft(e, t, r) {
431
431
  return i;
432
432
  }
433
433
  }
434
- function Tt({ block: e, ctx: t }) {
435
- const r = t.auth, i = t.authSession, a = e.allow_signup !== !1, o = e.allow_password_reset !== !1, s = e.hide_when_authenticated !== !1;
434
+ function Ee({ block: t, ctx: e }) {
435
+ const r = e.auth, i = e.authSession, n = t.allow_signup !== !1, s = t.allow_password_reset !== !1, o = t.hide_when_authenticated !== !1;
436
436
  if (!r)
437
437
  return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
438
- const d = i && !i.user.is_anonymous ? i : null;
439
- return d && s ? null : d ? /* @__PURE__ */ n(ae, { email: d.user.email ?? "", onSignOut: () => r.signOut().catch(() => {
440
- }) }) : /* @__PURE__ */ n(
441
- oe,
438
+ const c = i && !i.user.is_anonymous ? i : null;
439
+ return c && o ? null : c ? /* @__PURE__ */ a(st, { email: c.user.email ?? "", onSignOut: () => r.signOut().catch(() => {
440
+ }) }) : /* @__PURE__ */ a(
441
+ lt,
442
442
  {
443
- block: e,
444
- allowSignup: a,
445
- allowReset: o,
446
- ctx: t
443
+ block: t,
444
+ allowSignup: n,
445
+ allowReset: s,
446
+ ctx: e
447
447
  }
448
448
  );
449
449
  }
450
- function ae({ email: e, onSignOut: t }) {
451
- const { t: r } = v();
452
- return /* @__PURE__ */ c("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
453
- /* @__PURE__ */ c("div", { class: "flex flex-col", children: [
454
- /* @__PURE__ */ n("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: r("auth.signed_in", "Signed in") }),
455
- /* @__PURE__ */ n("span", { class: "text-sm font-medium text-gray-900", children: e })
450
+ function st({ email: t, onSignOut: e }) {
451
+ const { t: r } = S();
452
+ return /* @__PURE__ */ d("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
453
+ /* @__PURE__ */ d("div", { class: "flex flex-col", children: [
454
+ /* @__PURE__ */ a("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: r("auth.signed_in", "Signed in") }),
455
+ /* @__PURE__ */ a("span", { class: "text-sm font-medium text-gray-900", children: t })
456
456
  ] }),
457
- /* @__PURE__ */ n(
457
+ /* @__PURE__ */ a(
458
458
  "button",
459
459
  {
460
460
  type: "button",
461
- onClick: t,
461
+ onClick: e,
462
462
  class: "rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-600 transition-colors hover:bg-white hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
463
463
  children: r("auth.sign_out", "Sign out")
464
464
  }
465
465
  )
466
466
  ] });
467
467
  }
468
- function oe({ block: e, allowSignup: t, allowReset: r, ctx: i }) {
469
- const { t: a } = v(), o = i.auth, s = e.providers ?? [], d = i.initialAuthMode === "signup" && t ? "signup" : "signin", [l, g] = b(d), [p, u] = b(""), [x, y] = b(""), [k, h] = b(""), [m, j] = b(""), [_, S] = b(null), A = F(!1), [R, P] = b(null), [z, U] = b(null), [B, T] = b(!1), [M, D] = b(null);
470
- E(() => {
471
- if (typeof o.getLastLogin != "function") return;
472
- let I = !1;
473
- return o.getLastLogin().then(
474
- (L) => {
475
- I || !L || (D(L), L.email && u((V) => V === "" ? L.email : V));
468
+ function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
469
+ const { t: n } = S(), s = i.auth, o = t.providers ?? [], c = i.initialAuthMode === "signup" && e ? "signup" : "signin", [l, p] = v(c), [u, f] = v(""), [_, h] = v(""), [k, w] = v(""), [A, b] = v(""), [m, C] = v(null), I = F(!1), [B, M] = v(null), [z, O] = v(null), [R, P] = v(!1), [T, U] = v(null);
470
+ j(() => {
471
+ if (typeof s.getLastLogin != "function") return;
472
+ let g = !1;
473
+ return s.getLastLogin().then(
474
+ (x) => {
475
+ g || !x || (U(x), x.email && f((E) => E === "" ? x.email : E));
476
476
  },
477
477
  () => {
478
478
  }
479
479
  ), () => {
480
- I = !0;
480
+ g = !0;
481
481
  };
482
- }, [o]);
483
- const N = (I) => {
484
- g(I), P(null), U(null), T(!1);
485
- }, Z = async (I) => {
486
- if (I.preventDefault(), !(A.current || _)) {
487
- A.current = !0;
482
+ }, [s]);
483
+ const D = (g) => {
484
+ p(g), M(null), O(null), P(!1);
485
+ }, Z = async (g) => {
486
+ if (g.preventDefault(), !(I.current || m)) {
487
+ I.current = !0;
488
488
  try {
489
- if (P(null), U(null), l === "signup" && !B) {
490
- if (!p.trim()) return;
491
- T(!0);
489
+ if (M(null), O(null), l === "signup" && !R) {
490
+ if (!u.trim()) return;
491
+ P(!0);
492
492
  return;
493
493
  }
494
- if (l === "signup" && x !== k) {
495
- P(a("auth.passwords_mismatch", "Passwords don't match"));
494
+ if (l === "signup" && _ !== k) {
495
+ M(n("auth.passwords_mismatch", "Passwords don't match"));
496
496
  return;
497
497
  }
498
- S("email");
498
+ C("email");
499
499
  try {
500
- l === "signin" ? await o.signInWithEmail({ email: p, password: x }) : l === "signup" ? (await o.signUp({ email: p, password: x })).kind === "confirmation_required" && (y(""), g("signup_verify"), U(a("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await o.requestPasswordReset({ email: p }), g("reset_sent"), U(
501
- a("auth.reset_sent_message", "If that email exists, a reset code has been sent.")
502
- )) : l === "signup_verify" ? await o.verifyOtp({ email: p, token: m, type: "email" }) : l === "reset_verify" && (await o.verifyOtp({
503
- email: p,
504
- token: m,
505
- type: x ? "recovery" : "email"
506
- }), x && await o.updatePassword({ password: x }));
507
- } catch (L) {
508
- P(ft(L, l === "signup" ? "signup" : l === "signup_verify" || l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", a));
500
+ l === "signin" ? await s.signInWithEmail({ email: u, password: _ }) : l === "signup" ? (await s.signUp({ email: u, password: _ })).kind === "confirmation_required" && (h(""), p("signup_verify"), O(n("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await s.requestPasswordReset({ email: u }), p("reset_sent"), O(
501
+ n("auth.reset_sent_message", "If that email exists, a reset code has been sent.")
502
+ )) : l === "signup_verify" ? await s.verifyOtp({ email: u, token: A, type: "email" }) : l === "reset_verify" && (await s.verifyOtp({
503
+ email: u,
504
+ token: A,
505
+ type: _ ? "recovery" : "email"
506
+ }), _ && await s.updatePassword({ password: _ }));
507
+ } catch (x) {
508
+ M(we(x, l === "signup" ? "signup" : l === "signup_verify" || l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", n));
509
509
  } finally {
510
- S(null);
510
+ C(null);
511
511
  }
512
512
  } finally {
513
- A.current = !1;
513
+ I.current = !1;
514
514
  }
515
515
  }
516
- }, w = async (I) => {
517
- if (!(A.current || _)) {
518
- A.current = !0, S(I), P(null), U(null);
516
+ }, V = async (g) => {
517
+ if (!(I.current || m)) {
518
+ I.current = !0, C(g), M(null), O(null);
519
519
  try {
520
- await o.signInWithOAuth({
521
- provider: I,
522
- onPopupOpened: () => S(null)
520
+ await s.signInWithOAuth({
521
+ provider: g,
522
+ onPopupOpened: () => C(null)
523
523
  });
524
- } catch (L) {
525
- if (L instanceof O && (L.code === "oauth_cancelled" || L.code === "oauth_timeout"))
524
+ } catch (x) {
525
+ if (x instanceof L && (x.code === "oauth_cancelled" || x.code === "oauth_timeout"))
526
526
  return;
527
- P(ft(L, "signin", a));
527
+ M(we(x, "signin", n));
528
528
  } finally {
529
- A.current = !1, S(null);
529
+ I.current = !1, C(null);
530
530
  }
531
531
  }
532
- }, f = s.length > 0 && (l === "signin" || l === "signup"), C = l === "signin" || l === "signup" || l === "forgot", K = l === "signin" || l === "signup" && B;
533
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
534
- /* @__PURE__ */ n(se, { mode: l, customHeading: e.heading, customSubheading: e.subheading }),
535
- f ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-2.5", children: [
536
- s.map((I) => /* @__PURE__ */ c("div", { class: "relative", children: [
537
- /* @__PURE__ */ c(
532
+ }, K = o.length > 0 && (l === "signin" || l === "signup"), Y = l === "signin" || l === "signup" || l === "forgot", y = l === "signin" || l === "signup" && R;
533
+ return /* @__PURE__ */ d("div", { class: "flex flex-col gap-5", children: [
534
+ /* @__PURE__ */ a(ct, { mode: l, customHeading: t.heading, customSubheading: t.subheading }),
535
+ K ? /* @__PURE__ */ d("div", { class: "flex flex-col gap-2.5", children: [
536
+ o.map((g) => /* @__PURE__ */ d("div", { class: "relative", children: [
537
+ /* @__PURE__ */ d(
538
538
  "button",
539
539
  {
540
540
  type: "button",
541
- onClick: () => w(I),
542
- disabled: _ !== null,
541
+ onClick: () => V(g),
542
+ disabled: m !== null,
543
543
  class: "flex h-12 w-full items-center justify-center gap-2.5 rounded-full border-1 border-gray-200 bg-white px-5 text-base font-medium text-gray-900 transition-all hover:border-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
544
544
  children: [
545
- _ === I ? /* @__PURE__ */ n("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ n(me, { provider: I }),
546
- /* @__PURE__ */ n("span", { children: ne(I, a) })
545
+ m === g ? /* @__PURE__ */ a("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ a(yt, { provider: g }),
546
+ /* @__PURE__ */ a("span", { children: ot(g, n) })
547
547
  ]
548
548
  }
549
549
  ),
550
- M?.method === I ? /* @__PURE__ */ n(ge, { email: M.email }) : null
551
- ] }, I)),
552
- /* @__PURE__ */ n(we, {})
550
+ T?.method === g ? /* @__PURE__ */ a(wt, { email: T.email }) : null
551
+ ] }, g)),
552
+ /* @__PURE__ */ a(bt, {})
553
553
  ] }) : null,
554
- /* @__PURE__ */ c("form", { onSubmit: Z, class: "flex flex-col gap-3", children: [
555
- C && /* @__PURE__ */ n(
556
- wt,
554
+ /* @__PURE__ */ d("form", { onSubmit: Z, class: "flex flex-col gap-3", children: [
555
+ Y && /* @__PURE__ */ a(
556
+ me,
557
557
  {
558
558
  type: "email",
559
- placeholder: a("auth.email", "Email address"),
560
- value: p,
561
- onInput: u,
559
+ placeholder: n("auth.email", "Email address"),
560
+ value: u,
561
+ onInput: f,
562
562
  autocomplete: "email",
563
563
  required: !0
564
564
  }
565
565
  ),
566
- K && /* @__PURE__ */ n(
567
- et,
566
+ y && /* @__PURE__ */ a(
567
+ re,
568
568
  {
569
- placeholder: a("auth.password", "Password"),
570
- value: x,
571
- onInput: y,
569
+ placeholder: n("auth.password", "Password"),
570
+ value: _,
571
+ onInput: h,
572
572
  autocomplete: l === "signin" ? "current-password" : "new-password",
573
573
  required: !0
574
574
  }
575
575
  ),
576
- l === "signup" && B && /* @__PURE__ */ n(
577
- et,
576
+ l === "signup" && R && /* @__PURE__ */ a(
577
+ re,
578
578
  {
579
- placeholder: a("auth.repeat_password", "Repeat password"),
579
+ placeholder: n("auth.repeat_password", "Repeat password"),
580
580
  value: k,
581
- onInput: h,
581
+ onInput: w,
582
582
  autocomplete: "new-password",
583
583
  required: !0
584
584
  }
585
585
  ),
586
- (l === "signup_verify" || l === "reset_verify") && /* @__PURE__ */ n(
587
- wt,
586
+ (l === "signup_verify" || l === "reset_verify") && /* @__PURE__ */ a(
587
+ me,
588
588
  {
589
589
  type: "text",
590
- placeholder: a("auth.confirmation_code", "Confirmation code"),
591
- value: m,
592
- onInput: j,
590
+ placeholder: n("auth.confirmation_code", "Confirmation code"),
591
+ value: A,
592
+ onInput: b,
593
593
  autocomplete: "one-time-code",
594
594
  inputMode: "numeric",
595
595
  required: !0
596
596
  }
597
597
  ),
598
- l === "reset_verify" && /* @__PURE__ */ n(
599
- et,
598
+ l === "reset_verify" && /* @__PURE__ */ a(
599
+ re,
600
600
  {
601
- placeholder: a(
601
+ placeholder: n(
602
602
  "auth.new_password_optional",
603
603
  "New password (optional — only for password reset)"
604
604
  ),
605
- value: x,
606
- onInput: y,
605
+ value: _,
606
+ onInput: h,
607
607
  autocomplete: "new-password"
608
608
  }
609
609
  ),
610
- l === "reset_sent" && z && /* @__PURE__ */ n("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: z }),
611
- l === "signin" && r && /* @__PURE__ */ n("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ n(W, { onClick: () => N("forgot"), children: a("auth.forgot_password", "Forgot password?") }) }),
612
- R && /* @__PURE__ */ n("p", { class: "text-sm text-red-600", children: R }),
613
- z && l !== "reset_sent" && /* @__PURE__ */ n("p", { class: "text-sm text-gray-500", children: z }),
614
- l !== "reset_sent" && /* @__PURE__ */ n(
615
- ue,
610
+ l === "reset_sent" && z && /* @__PURE__ */ a("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: z }),
611
+ l === "signin" && r && /* @__PURE__ */ a("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ a(W, { onClick: () => D("forgot"), children: n("auth.forgot_password", "Forgot password?") }) }),
612
+ B && /* @__PURE__ */ a("p", { class: "text-sm text-red-600", children: B }),
613
+ z && l !== "reset_sent" && /* @__PURE__ */ a("p", { class: "text-sm text-gray-500", children: z }),
614
+ l !== "reset_sent" && /* @__PURE__ */ a(
615
+ ht,
616
616
  {
617
- busy: _ === "email",
618
- label: ce(l, B, e.submit_label ?? e.heading, a)
617
+ busy: m === "email",
618
+ label: ut(l, R, t.submit_label ?? t.heading, n)
619
619
  }
620
620
  )
621
621
  ] }),
622
- /* @__PURE__ */ n(
623
- de,
622
+ /* @__PURE__ */ a(
623
+ pt,
624
624
  {
625
625
  mode: l,
626
- allowSignup: t,
627
- onSwitch: N
626
+ allowSignup: e,
627
+ onSwitch: D
628
628
  }
629
629
  )
630
630
  ] });
631
631
  }
632
- function se({
633
- mode: e,
634
- customHeading: t,
632
+ function ct({
633
+ mode: t,
634
+ customHeading: e,
635
635
  customSubheading: r
636
636
  }) {
637
- const { t: i } = v(), a = le(e, i), o = e === "signin" || e === "signup", s = o && t ? t : a.title, d = o && r !== void 0 ? r || null : a.subtitle;
638
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
639
- /* @__PURE__ */ n("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: s }),
640
- d ? /* @__PURE__ */ n("p", { class: "text-base leading-relaxed text-gray-600", children: d }) : null
637
+ const { t: i } = S(), n = dt(t, i), s = t === "signin" || t === "signup", o = s && e ? e : n.title, c = s && r !== void 0 ? r || null : n.subtitle;
638
+ return /* @__PURE__ */ d("div", { class: "flex flex-col gap-2", children: [
639
+ /* @__PURE__ */ a("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: o }),
640
+ c ? /* @__PURE__ */ a("p", { class: "text-base leading-relaxed text-gray-600", children: c }) : null
641
641
  ] });
642
642
  }
643
- function le(e, t) {
644
- switch (e) {
643
+ function dt(t, e) {
644
+ switch (t) {
645
645
  case "signin":
646
646
  return {
647
- title: t("auth.welcome", "Welcome back!"),
648
- subtitle: t("auth.default_subtitle", "Sign in to access all features and sync your data.")
647
+ title: e("auth.welcome", "Welcome back!"),
648
+ subtitle: e("auth.default_subtitle", "Sign in to access all features and sync your data.")
649
649
  };
650
650
  case "signup":
651
651
  return {
652
- title: t("auth.welcome_signup", "Welcome!"),
653
- subtitle: t("auth.default_subtitle", "Sign in to access all features and sync your data.")
652
+ title: e("auth.welcome_signup", "Welcome!"),
653
+ subtitle: e("auth.default_subtitle", "Sign in to access all features and sync your data.")
654
654
  };
655
655
  case "forgot":
656
656
  return {
657
- title: t("auth.forgot_password_title", "Forgot password?"),
658
- subtitle: t(
657
+ title: e("auth.forgot_password_title", "Forgot password?"),
658
+ subtitle: e(
659
659
  "auth.forgot_subtitle",
660
660
  "Enter your email and we'll send you a password reset link."
661
661
  )
662
662
  };
663
663
  case "reset_sent":
664
664
  return {
665
- title: t("auth.check_email_title", "Check your email"),
665
+ title: e("auth.check_email_title", "Check your email"),
666
666
  subtitle: null
667
667
  };
668
668
  case "reset_verify":
669
669
  return {
670
- title: t("auth.reset_password_title", "Reset password"),
671
- subtitle: t(
670
+ title: e("auth.reset_password_title", "Reset password"),
671
+ subtitle: e(
672
672
  "auth.reset_password_subtitle",
673
673
  "Enter the code from your email and a new password."
674
674
  )
675
675
  };
676
676
  case "signup_verify":
677
677
  return {
678
- title: t("auth.confirm_email_title", "Confirm your email"),
679
- subtitle: t(
678
+ title: e("auth.confirm_email_title", "Confirm your email"),
679
+ subtitle: e(
680
680
  "auth.confirm_email_subtitle",
681
681
  "Enter the code we sent to your email to finish creating your account."
682
682
  )
683
683
  };
684
684
  }
685
685
  }
686
- function ce(e, t, r, i) {
687
- if (e === "signin" && r) return r;
688
- switch (e) {
686
+ function ut(t, e, r, i) {
687
+ if (t === "signin" && r) return r;
688
+ switch (t) {
689
689
  case "signin":
690
690
  return i("auth.log_in", "Sign In");
691
691
  case "signup":
692
- return t ? i("auth.create_account", "Create Account") : i("auth.sign_up", "Sign Up");
692
+ return e ? i("auth.create_account", "Create Account") : i("auth.sign_up", "Sign Up");
693
693
  case "forgot":
694
694
  return i("auth.send_reset", "Send Reset Email");
695
695
  case "signup_verify":
@@ -699,108 +699,108 @@ function ce(e, t, r, i) {
699
699
  return i("cta.continue", "Continue");
700
700
  }
701
701
  }
702
- function de({
703
- mode: e,
704
- allowSignup: t,
702
+ function pt({
703
+ mode: t,
704
+ allowSignup: e,
705
705
  onSwitch: r
706
706
  }) {
707
- const { t: i } = v();
708
- return e === "signin" && t ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
707
+ const { t: i } = S();
708
+ return t === "signin" && e ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
709
709
  i("auth.no_account", "Don't have an account?"),
710
710
  " ",
711
- /* @__PURE__ */ n(W, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
712
- ] }) : e === "signup" || e === "signup_verify" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
711
+ /* @__PURE__ */ a(W, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
712
+ ] }) : t === "signup" || t === "signup_verify" ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
713
713
  i("auth.have_account", "Already have an account?"),
714
714
  " ",
715
- /* @__PURE__ */ n(W, { onClick: () => r("signin"), children: i("auth.log_in_link", "Log In") })
716
- ] }) : e === "forgot" || e === "reset_sent" || e === "reset_verify" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
715
+ /* @__PURE__ */ a(W, { onClick: () => r("signin"), children: i("auth.log_in_link", "Log In") })
716
+ ] }) : t === "forgot" || t === "reset_sent" || t === "reset_verify" ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
717
717
  i("auth.no_account", "Don't have an account?"),
718
718
  " ",
719
- /* @__PURE__ */ n(W, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
719
+ /* @__PURE__ */ a(W, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
720
720
  ] }) : null;
721
721
  }
722
722
  function W({
723
- onClick: e,
724
- children: t
723
+ onClick: t,
724
+ children: e
725
725
  }) {
726
- return /* @__PURE__ */ n(
726
+ return /* @__PURE__ */ a(
727
727
  "button",
728
728
  {
729
729
  type: "button",
730
- onClick: e,
730
+ onClick: t,
731
731
  class: "font-semibold transition-opacity hover:opacity-80 focus:outline-none focus-visible:opacity-80",
732
732
  style: { color: "var(--pw-accent)" },
733
- children: t
733
+ children: e
734
734
  }
735
735
  );
736
736
  }
737
- function ue({ busy: e, label: t }) {
738
- return /* @__PURE__ */ n(
737
+ function ht({ busy: t, label: e }) {
738
+ return /* @__PURE__ */ a(
739
739
  "button",
740
740
  {
741
741
  type: "submit",
742
- disabled: e,
742
+ disabled: t,
743
743
  class: "pw-cta-shimmer relative mt-1 flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight text-white transition-transform duration-150 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
744
744
  style: {
745
745
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 55%, color-mix(in srgb, var(--pw-accent) 90%, black) 100%)",
746
746
  boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
747
747
  },
748
- children: e ? /* @__PURE__ */ n("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ n("span", { class: "relative z-10", children: t })
748
+ children: t ? /* @__PURE__ */ a("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ a("span", { class: "relative z-10", children: e })
749
749
  }
750
750
  );
751
751
  }
752
- function wt({ type: e, placeholder: t, value: r, onInput: i, autocomplete: a, inputMode: o, required: s }) {
753
- return /* @__PURE__ */ n(
752
+ function me({ type: t, placeholder: e, value: r, onInput: i, autocomplete: n, inputMode: s, required: o }) {
753
+ return /* @__PURE__ */ a(
754
754
  "input",
755
755
  {
756
- type: e,
756
+ type: t,
757
757
  value: r,
758
- placeholder: t,
759
- onInput: (d) => i(d.target.value),
760
- autocomplete: a,
761
- inputMode: o,
762
- required: s,
758
+ placeholder: e,
759
+ onInput: (c) => i(c.target.value),
760
+ autocomplete: n,
761
+ inputMode: s,
762
+ required: o,
763
763
  class: "h-14 w-full rounded-2xl bg-gray-100 px-5 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"
764
764
  }
765
765
  );
766
766
  }
767
- function et({ placeholder: e, value: t, onInput: r, autocomplete: i, required: a }) {
768
- const { t: o } = v(), [s, d] = b(!1), l = F(null);
769
- E(() => {
770
- const u = l.current;
771
- u && u.value !== t && (u.value = t);
772
- }, [s, t]);
773
- const g = o("auth.show_password", "Show password"), p = o("auth.hide_password", "Hide password");
774
- return /* @__PURE__ */ c("div", { class: "relative", children: [
775
- /* @__PURE__ */ n(
767
+ function re({ placeholder: t, value: e, onInput: r, autocomplete: i, required: n }) {
768
+ const { t: s } = S(), [o, c] = v(!1), l = F(null);
769
+ j(() => {
770
+ const f = l.current;
771
+ f && f.value !== e && (f.value = e);
772
+ }, [o, e]);
773
+ const p = s("auth.show_password", "Show password"), u = s("auth.hide_password", "Hide password");
774
+ return /* @__PURE__ */ d("div", { class: "relative", children: [
775
+ /* @__PURE__ */ a(
776
776
  "input",
777
777
  {
778
778
  ref: l,
779
- type: s ? "text" : "password",
780
- value: t,
781
- placeholder: e,
782
- onInput: (u) => r(u.target.value),
779
+ type: o ? "text" : "password",
780
+ value: e,
781
+ placeholder: t,
782
+ onInput: (f) => r(f.target.value),
783
783
  autocomplete: i,
784
- required: a,
784
+ required: n,
785
785
  class: "h-14 w-full rounded-2xl bg-gray-100 pl-5 pr-12 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"
786
786
  }
787
787
  ),
788
- /* @__PURE__ */ n(
788
+ /* @__PURE__ */ a(
789
789
  "button",
790
790
  {
791
791
  type: "button",
792
- onClick: () => d((u) => !u),
793
- "aria-label": s ? p : g,
792
+ onClick: () => c((f) => !f),
793
+ "aria-label": o ? u : p,
794
794
  tabIndex: -1,
795
795
  class: "absolute right-4 top-1/2 -translate-y-1/2 flex h-6 w-6 items-center justify-center rounded text-gray-500 transition-colors hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
796
- children: s ? /* @__PURE__ */ n(he, {}) : /* @__PURE__ */ n(pe, {})
796
+ children: o ? /* @__PURE__ */ a(ft, {}) : /* @__PURE__ */ a(gt, {})
797
797
  }
798
798
  )
799
799
  ] });
800
800
  }
801
- function pe() {
802
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
803
- /* @__PURE__ */ n(
801
+ function gt() {
802
+ return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
803
+ /* @__PURE__ */ a(
804
804
  "path",
805
805
  {
806
806
  d: "M1.667 10S4.583 4.167 10 4.167 18.333 10 18.333 10 15.417 15.833 10 15.833 1.667 10 1.667 10Z",
@@ -810,12 +810,12 @@ function pe() {
810
810
  "stroke-linejoin": "round"
811
811
  }
812
812
  ),
813
- /* @__PURE__ */ n("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
813
+ /* @__PURE__ */ a("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
814
814
  ] });
815
815
  }
816
- function he() {
817
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
818
- /* @__PURE__ */ n(
816
+ function ft() {
817
+ return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
818
+ /* @__PURE__ */ a(
819
819
  "path",
820
820
  {
821
821
  d: "M8.236 4.293A6.96 6.96 0 0 1 10 4.167C15.417 4.167 18.333 10 18.333 10a13.5 13.5 0 0 1-1.92 2.755M11.768 11.768A2.5 2.5 0 0 1 8.233 8.233",
@@ -825,7 +825,7 @@ function he() {
825
825
  "stroke-linejoin": "round"
826
826
  }
827
827
  ),
828
- /* @__PURE__ */ n(
828
+ /* @__PURE__ */ a(
829
829
  "path",
830
830
  {
831
831
  d: "M14.953 14.953A8.84 8.84 0 0 1 10 15.833C4.583 15.833 1.667 10 1.667 10a13.5 13.5 0 0 1 3.38-3.953M1.667 1.667l16.666 16.666",
@@ -837,47 +837,47 @@ function he() {
837
837
  )
838
838
  ] });
839
839
  }
840
- function ge({ email: e }) {
841
- const { t } = v(), r = e ? t("auth.last_used", "Last · {email}", { email: fe(e) }) : t("auth.last_used_no_email", "Last");
842
- return /* @__PURE__ */ n("span", { class: "pointer-events-none absolute -top-2 right-3 max-w-[75%] truncate rounded-full bg-gray-900 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-white shadow-sm", children: r });
840
+ function wt({ email: t }) {
841
+ const { t: e } = S(), r = t ? e("auth.last_used", "Last · {email}", { email: mt(t) }) : e("auth.last_used_no_email", "Last");
842
+ return /* @__PURE__ */ a("span", { class: "pointer-events-none absolute -top-2 right-3 max-w-[75%] truncate rounded-full bg-gray-900 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-white shadow-sm", children: r });
843
843
  }
844
- function fe(e) {
845
- const [t, r] = e.split("@");
846
- return r ? `${t.slice(0, 3)}*****@${r}` : e;
844
+ function mt(t) {
845
+ const [e, r] = t.split("@");
846
+ return r ? `${e.slice(0, 3)}*****@${r}` : t;
847
847
  }
848
- function we() {
849
- const { t: e } = v();
850
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
851
- /* @__PURE__ */ n("div", { class: "h-px flex-1 bg-gray-200" }),
852
- /* @__PURE__ */ n("span", { children: e("auth.or", "or") }),
853
- /* @__PURE__ */ n("div", { class: "h-px flex-1 bg-gray-200" })
848
+ function bt() {
849
+ const { t } = S();
850
+ return /* @__PURE__ */ d("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
851
+ /* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" }),
852
+ /* @__PURE__ */ a("span", { children: t("auth.or", "or") }),
853
+ /* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" })
854
854
  ] });
855
855
  }
856
- function me({ provider: e }) {
857
- return e === "google" ? /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
858
- /* @__PURE__ */ n("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.49h4.84a4.14 4.14 0 0 1-1.79 2.71v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62Z" }),
859
- /* @__PURE__ */ n("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.83.86-3.06.86-2.36 0-4.36-1.59-5.07-3.74H.92v2.33A9 9 0 0 0 9 18Z" }),
860
- /* @__PURE__ */ n("path", { fill: "#FBBC05", d: "M3.93 10.68a5.4 5.4 0 0 1 0-3.36V4.99H.92a9 9 0 0 0 0 8.02l3-2.33Z" }),
861
- /* @__PURE__ */ n("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.34l2.58-2.58A9 9 0 0 0 .92 4.99l3.01 2.33C4.64 5.17 6.64 3.58 9 3.58Z" })
862
- ] }) : e === "apple" ? (
856
+ function yt({ provider: t }) {
857
+ return t === "google" ? /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
858
+ /* @__PURE__ */ a("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.49h4.84a4.14 4.14 0 0 1-1.79 2.71v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62Z" }),
859
+ /* @__PURE__ */ a("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.83.86-3.06.86-2.36 0-4.36-1.59-5.07-3.74H.92v2.33A9 9 0 0 0 9 18Z" }),
860
+ /* @__PURE__ */ a("path", { fill: "#FBBC05", d: "M3.93 10.68a5.4 5.4 0 0 1 0-3.36V4.99H.92a9 9 0 0 0 0 8.02l3-2.33Z" }),
861
+ /* @__PURE__ */ a("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.34l2.58-2.58A9 9 0 0 0 .92 4.99l3.01 2.33C4.64 5.17 6.64 3.58 9 3.58Z" })
862
+ ] }) : t === "apple" ? (
863
863
  // viewBox 0 0 24 24 даёт воздух сверху/снизу пути, поэтому визуально
864
864
  // Apple-яблоко выглядит меньше Google. Компенсируем увеличенным
865
865
  // width/height — 26×26 даёт примерно equal optical size с Google 20×20.
866
- /* @__PURE__ */ n("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }) })
867
- ) : e === "github" ? /* @__PURE__ */ n("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M8 0C3.6 0 0 3.6 0 8a8 8 0 0 0 5.5 7.6c.4.1.5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.2 1.9.9 2.4.7 0-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.5.8 1.2.8 2.1 0 3.1-1.9 3.7-3.6 3.9.3.3.6.8.6 1.6V15c0 .2.1.5.6.4A8 8 0 0 0 16 8c0-4.4-3.6-8-8-8Z" }) }) : /* @__PURE__ */ n("svg", { width: "18", height: "20", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M14 2.7C14 1.2 12.8 0 11.3 0H2.7C1.2 0 0 1.2 0 2.7v10.6C0 14.8 1.2 16 2.7 16h4V9.8H4.7v-2H6.7V6.4c0-2 1.2-3.1 3-3.1.9 0 1.7.1 2 .2V5h-1.4c-.8 0-1 .4-1 1v1.5h2.4l-.3 2H9.3V16h2c1.5 0 2.7-1.2 2.7-2.7V2.7Z" }) });
866
+ /* @__PURE__ */ a("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }) })
867
+ ) : t === "github" ? /* @__PURE__ */ a("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M8 0C3.6 0 0 3.6 0 8a8 8 0 0 0 5.5 7.6c.4.1.5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.2 1.9.9 2.4.7 0-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.5.8 1.2.8 2.1 0 3.1-1.9 3.7-3.6 3.9.3.3.6.8.6 1.6V15c0 .2.1.5.6.4A8 8 0 0 0 16 8c0-4.4-3.6-8-8-8Z" }) }) : /* @__PURE__ */ a("svg", { width: "18", height: "20", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M14 2.7C14 1.2 12.8 0 11.3 0H2.7C1.2 0 0 1.2 0 2.7v10.6C0 14.8 1.2 16 2.7 16h4V9.8H4.7v-2H6.7V6.4c0-2 1.2-3.1 3-3.1.9 0 1.7.1 2 .2V5h-1.4c-.8 0-1 .4-1 1v1.5h2.4l-.3 2H9.3V16h2c1.5 0 2.7-1.2 2.7-2.7V2.7Z" }) });
868
868
  }
869
- function be({
870
- block: e,
871
- bootstrap: t,
869
+ function xt({
870
+ block: t,
871
+ bootstrap: e,
872
872
  auth: r,
873
873
  authSession: i,
874
- onBack: a,
875
- showBack: o = !0,
876
- intent: s = "preauth",
877
- initialMode: d
874
+ onBack: n,
875
+ showBack: s = !0,
876
+ intent: o = "preauth",
877
+ initialMode: c
878
878
  }) {
879
- const { t: l } = v(), g = {
880
- bootstrap: t,
879
+ const { t: l } = S(), p = {
880
+ bootstrap: e,
881
881
  selectedPriceId: null,
882
882
  setSelectedPriceId: () => {
883
883
  },
@@ -885,16 +885,16 @@ function be({
885
885
  },
886
886
  auth: r,
887
887
  authSession: i,
888
- initialAuthMode: d
889
- }, p = s === "restore" ? {
890
- ...e,
888
+ initialAuthMode: c
889
+ }, u = o === "restore" ? {
890
+ ...t,
891
891
  heading: l("auth.restore_purchases_heading", "Restore Purchases"),
892
892
  subheading: l(
893
893
  "auth.restore_purchases_subheading",
894
894
  "Please sign in to restore your purchases."
895
895
  )
896
- } : s === "preauth" ? {
897
- ...e,
896
+ } : o === "preauth" ? {
897
+ ...t,
898
898
  heading: l("auth.login_continue_purchase", "Log in to continue your purchase"),
899
899
  subheading: l(
900
900
  "auth.link_purchase_subheading",
@@ -905,22 +905,22 @@ function be({
905
905
  // чтобы продолжить покупку") в pill-кнопку h-12 не помещаются и
906
906
  // переносятся на 2 строки. Явный короткий submit_label решает.
907
907
  submit_label: l("auth.log_in", "Sign In")
908
- } : e;
909
- return /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
910
- o ? /* @__PURE__ */ n(xe, { onClick: a, ariaLabel: l("nav.back_aria", "Back") }) : null,
911
- /* @__PURE__ */ n(Tt, { block: p, ctx: g })
908
+ } : t;
909
+ return /* @__PURE__ */ d("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
910
+ s ? /* @__PURE__ */ a(vt, { onClick: n, ariaLabel: l("nav.back_aria", "Back") }) : null,
911
+ /* @__PURE__ */ a(Ee, { block: u, ctx: p })
912
912
  ] });
913
913
  }
914
- function xe({ onClick: e, ariaLabel: t }) {
915
- return /* @__PURE__ */ n(
914
+ function vt({ onClick: t, ariaLabel: e }) {
915
+ return /* @__PURE__ */ a(
916
916
  "button",
917
917
  {
918
918
  type: "button",
919
- onClick: e,
920
- "aria-label": t,
919
+ onClick: t,
920
+ "aria-label": e,
921
921
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
922
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
923
- /* @__PURE__ */ n(
922
+ children: /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
923
+ /* @__PURE__ */ a(
924
924
  "path",
925
925
  {
926
926
  d: "M5 8h8a4 4 0 0 1 0 8H9",
@@ -930,7 +930,7 @@ function xe({ onClick: e, ariaLabel: t }) {
930
930
  "stroke-linejoin": "round"
931
931
  }
932
932
  ),
933
- /* @__PURE__ */ n(
933
+ /* @__PURE__ */ a(
934
934
  "path",
935
935
  {
936
936
  d: "M8 4 4 8l4 4",
@@ -944,68 +944,68 @@ function xe({ onClick: e, ariaLabel: t }) {
944
944
  }
945
945
  );
946
946
  }
947
- const Et = (e) => `pw-offer-${e}-start`;
948
- function rt(e) {
949
- const t = e - Date.now();
950
- return t <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
951
- days: Math.floor(t / (1e3 * 60 * 60 * 24)),
952
- hours: Math.floor(t % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)),
953
- minutes: Math.floor(t % (1e3 * 60 * 60) / (1e3 * 60)),
954
- seconds: Math.floor(t % (1e3 * 60) / 1e3),
947
+ const je = (t) => `pw-offer-${t}-start`;
948
+ function ie(t) {
949
+ const e = t - Date.now();
950
+ return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
951
+ days: Math.floor(e / (1e3 * 60 * 60 * 24)),
952
+ hours: Math.floor(e % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)),
953
+ minutes: Math.floor(e % (1e3 * 60 * 60) / (1e3 * 60)),
954
+ seconds: Math.floor(e % (1e3 * 60) / 1e3),
955
955
  expired: !1
956
956
  };
957
957
  }
958
- function ye(e) {
959
- if (e.expires_at) {
960
- const t = Date.parse(e.expires_at);
961
- return Number.isFinite(t) ? t : null;
958
+ function kt(t) {
959
+ if (t.expires_at) {
960
+ const e = Date.parse(t.expires_at);
961
+ return Number.isFinite(e) ? e : null;
962
962
  }
963
- if (e.duration_minutes && e.duration_minutes > 0) {
963
+ if (t.duration_minutes && t.duration_minutes > 0) {
964
964
  if (typeof window > "u") return null;
965
965
  try {
966
- const t = Et(e.id);
967
- let r = window.localStorage.getItem(t);
968
- return r || (r = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(t, r)), Date.parse(r) + e.duration_minutes * 6e4;
966
+ const e = je(t.id);
967
+ let r = window.localStorage.getItem(e);
968
+ return r || (r = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, r)), Date.parse(r) + t.duration_minutes * 6e4;
969
969
  } catch {
970
970
  return null;
971
971
  }
972
972
  }
973
973
  return null;
974
974
  }
975
- function jt(e, t) {
976
- if (!e || e.length === 0) return null;
977
- if (t) {
978
- const r = e.find((i) => i.id === t);
975
+ function ze(t, e) {
976
+ if (!t || t.length === 0) return null;
977
+ if (e) {
978
+ const r = t.find((i) => i.id === e);
979
979
  if (r) return r;
980
980
  }
981
- return e.find((r) => r.expires_at || r.duration_minutes) ?? null;
981
+ return t.find((r) => r.expires_at || r.duration_minutes) ?? null;
982
982
  }
983
- function zt(e) {
984
- const t = e ? ye(e) : null, [r, i] = b(
985
- () => t !== null ? rt(t) : null
986
- ), a = F(t);
987
- return a.current = t, E(() => {
988
- if (t === null) {
983
+ function Be(t) {
984
+ const e = t ? kt(t) : null, [r, i] = v(
985
+ () => e !== null ? ie(e) : null
986
+ ), n = F(e);
987
+ return n.current = e, j(() => {
988
+ if (e === null) {
989
989
  i(null);
990
990
  return;
991
991
  }
992
- i(rt(t));
993
- const o = setInterval(() => {
994
- const s = rt(a.current ?? 0);
995
- if (i(s), s.expired && (clearInterval(o), e?.duration_minutes && typeof window < "u"))
992
+ i(ie(e));
993
+ const s = setInterval(() => {
994
+ const o = ie(n.current ?? 0);
995
+ if (i(o), o.expired && (clearInterval(s), t?.duration_minutes && typeof window < "u"))
996
996
  try {
997
- window.localStorage.removeItem(Et(e.id));
997
+ window.localStorage.removeItem(je(t.id));
998
998
  } catch {
999
999
  }
1000
1000
  }, 1e3);
1001
- return () => clearInterval(o);
1002
- }, [t, e?.duration_minutes, e?.id]), r;
1003
- }
1004
- function ve({ block: e, ctx: t }) {
1005
- const { t: r } = v(), i = jt(t.bootstrap.offers, e.offer_id), a = zt(i);
1006
- if (!i || a === null || a.expired && !e.force) return null;
1007
- const o = e.title ?? i.label ?? r("offer.limited_time", "Limited-time offer"), s = i.discount_percent ? `${o} ${i.discount_percent}%` : o;
1008
- return /* @__PURE__ */ c(
1001
+ return () => clearInterval(s);
1002
+ }, [e, t?.duration_minutes, t?.id]), r;
1003
+ }
1004
+ function _t({ block: t, ctx: e }) {
1005
+ const { t: r } = S(), i = ze(e.bootstrap.offers, t.offer_id), n = Be(i);
1006
+ if (!i || n === null || n.expired && !t.force) return null;
1007
+ const s = t.title ?? i.label ?? r("offer.limited_time", "Limited-time offer"), o = i.discount_percent ? `${s} ${i.discount_percent}%` : s;
1008
+ return /* @__PURE__ */ d(
1009
1009
  "div",
1010
1010
  {
1011
1011
  class: "flex flex-wrap items-center justify-center gap-2 rounded-2xl px-4 py-3 text-[15px] font-semibold leading-tight text-white",
@@ -1015,35 +1015,35 @@ function ve({ block: e, ctx: t }) {
1015
1015
  },
1016
1016
  role: "status",
1017
1017
  children: [
1018
- /* @__PURE__ */ n(Ot, {}),
1019
- /* @__PURE__ */ n("span", { children: s }),
1020
- /* @__PURE__ */ n(Bt, { value: a, t: r })
1018
+ /* @__PURE__ */ a(Fe, {}),
1019
+ /* @__PURE__ */ a("span", { children: o }),
1020
+ /* @__PURE__ */ a(Oe, { value: n, t: r })
1021
1021
  ]
1022
1022
  }
1023
1023
  );
1024
1024
  }
1025
- function Bt({ value: e, t }) {
1026
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
1027
- e.days > 0 ? /* @__PURE__ */ c(ot, { children: [
1028
- /* @__PURE__ */ n(G, { children: String(e.days) }),
1029
- /* @__PURE__ */ n("span", { class: "text-xs", children: t("countdown.d", "d") })
1025
+ function Oe({ value: t, t: e }) {
1026
+ return /* @__PURE__ */ d("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
1027
+ t.days > 0 ? /* @__PURE__ */ d(se, { children: [
1028
+ /* @__PURE__ */ a(q, { children: String(t.days) }),
1029
+ /* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.d", "d") })
1030
1030
  ] }) : null,
1031
- /* @__PURE__ */ n(G, { children: String(e.hours).padStart(2, "0") }),
1032
- /* @__PURE__ */ n("span", { class: "text-xs", children: t("countdown.h", "h") }),
1033
- /* @__PURE__ */ n(G, { children: String(e.minutes).padStart(2, "0") }),
1034
- /* @__PURE__ */ n("span", { class: "text-xs", children: t("countdown.m", "m") }),
1035
- /* @__PURE__ */ n(G, { children: String(e.seconds).padStart(2, "0") }),
1036
- /* @__PURE__ */ n("span", { class: "text-xs", children: t("countdown.s", "s") })
1031
+ /* @__PURE__ */ a(q, { children: String(t.hours).padStart(2, "0") }),
1032
+ /* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.h", "h") }),
1033
+ /* @__PURE__ */ a(q, { children: String(t.minutes).padStart(2, "0") }),
1034
+ /* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.m", "m") }),
1035
+ /* @__PURE__ */ a(q, { children: String(t.seconds).padStart(2, "0") }),
1036
+ /* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.s", "s") })
1037
1037
  ] });
1038
1038
  }
1039
- function G({ children: e }) {
1040
- return /* @__PURE__ */ n("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: e });
1039
+ function q({ children: t }) {
1040
+ return /* @__PURE__ */ a("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: t });
1041
1041
  }
1042
- function ke({ offer: e }) {
1043
- const { t } = v(), r = zt(e);
1042
+ function St({ offer: t }) {
1043
+ const { t: e } = S(), r = Be(t);
1044
1044
  if (r === null || r.expired) return null;
1045
- const i = e.label ?? t("offer.limited_time", "Limited-time offer"), a = e.discount_percent ? `${i} ${e.discount_percent}%` : i;
1046
- return /* @__PURE__ */ c(
1045
+ const i = t.label ?? e("offer.limited_time", "Limited-time offer"), n = t.discount_percent ? `${i} ${t.discount_percent}%` : i;
1046
+ return /* @__PURE__ */ d(
1047
1047
  "div",
1048
1048
  {
1049
1049
  class: "-mb-2 flex flex-wrap items-center justify-center gap-2 rounded-t-xl px-4 pb-5 pt-3 text-[15px] font-semibold leading-tight text-white",
@@ -1053,15 +1053,15 @@ function ke({ offer: e }) {
1053
1053
  },
1054
1054
  role: "status",
1055
1055
  children: [
1056
- /* @__PURE__ */ n(Ot, {}),
1057
- /* @__PURE__ */ n("span", { children: a }),
1058
- /* @__PURE__ */ n(Bt, { value: r, t })
1056
+ /* @__PURE__ */ a(Fe, {}),
1057
+ /* @__PURE__ */ a("span", { children: n }),
1058
+ /* @__PURE__ */ a(Oe, { value: r, t: e })
1059
1059
  ]
1060
1060
  }
1061
1061
  );
1062
1062
  }
1063
- function Ot() {
1064
- return /* @__PURE__ */ n(
1063
+ function Fe() {
1064
+ return /* @__PURE__ */ a(
1065
1065
  "svg",
1066
1066
  {
1067
1067
  width: "16",
@@ -1069,7 +1069,7 @@ function Ot() {
1069
1069
  viewBox: "0 0 12 12",
1070
1070
  fill: "none",
1071
1071
  "aria-hidden": "true",
1072
- children: /* @__PURE__ */ n(
1072
+ children: /* @__PURE__ */ a(
1073
1073
  "path",
1074
1074
  {
1075
1075
  fill: "currentColor",
@@ -1079,41 +1079,41 @@ function Ot() {
1079
1079
  }
1080
1080
  );
1081
1081
  }
1082
- const mt = 3, bt = 200, xt = 5e3, it = 5, _e = 10 * 1024 * 1024, yt = ["image/jpeg", "image/png", "image/webp"], Se = /.+@.+\..+/;
1083
- function Ce({ client: e, authSession: t, origin: r, onBack: i }) {
1084
- const { t: a } = v(), o = t?.user.email ?? "", s = o || null, [d, l] = b(o), [g, p] = b(""), [u, x] = b(""), [y, k] = b([]), [h, m] = b(!1), [j, _] = b(null), [S, A] = b({}), R = () => {
1085
- const T = {}, M = (s ?? d).trim(), D = g.trim(), N = u.trim();
1086
- return M ? Se.test(M.toLowerCase()) || (T.email = a("support.invalid_email", "Invalid email")) : T.email = a("support.required", "Required"), (D.length < mt || D.length > bt) && (T.subject = a("support.subject_length", "{min}–{max} characters", {
1087
- min: mt,
1088
- max: bt
1089
- })), (N.length < 1 || N.length > xt) && (T.message = a("support.message_length", "{min}–{max} characters", {
1082
+ const be = 3, ye = 200, xe = 5e3, ne = 5, Ct = 10 * 1024 * 1024, ve = ["image/jpeg", "image/png", "image/webp"], It = /.+@.+\..+/;
1083
+ function At({ client: t, authSession: e, origin: r, onBack: i }) {
1084
+ const { t: n } = S(), s = e?.user.email ?? "", o = s || null, [c, l] = v(s), [p, u] = v(""), [f, _] = v(""), [h, k] = v([]), [w, A] = v(!1), [b, m] = v(null), [C, I] = v({}), B = () => {
1085
+ const P = {}, T = (o ?? c).trim(), U = p.trim(), D = f.trim();
1086
+ return T ? It.test(T.toLowerCase()) || (P.email = n("support.invalid_email", "Invalid email")) : P.email = n("support.required", "Required"), (U.length < be || U.length > ye) && (P.subject = n("support.subject_length", "{min}–{max} characters", {
1087
+ min: be,
1088
+ max: ye
1089
+ })), (D.length < 1 || D.length > xe) && (P.message = n("support.message_length", "{min}–{max} characters", {
1090
1090
  min: 1,
1091
- max: xt
1092
- })), A(T), Object.keys(T).length === 0;
1093
- }, P = async (T) => {
1094
- if (T.preventDefault(), !h && R()) {
1095
- m(!0), A((M) => ({ ...M, submit: void 0 }));
1091
+ max: xe
1092
+ })), I(P), Object.keys(P).length === 0;
1093
+ }, M = async (P) => {
1094
+ if (P.preventDefault(), !w && B()) {
1095
+ A(!0), I((T) => ({ ...T, submit: void 0 }));
1096
1096
  try {
1097
- const M = (s ?? d).trim();
1098
- await e.createSupportTicket({
1099
- subject: g.trim(),
1100
- content: u.trim(),
1101
- email: M || void 0,
1102
- files: y.length > 0 ? y : void 0
1103
- }), _(M);
1104
- } catch (M) {
1105
- const D = M instanceof O && M.message || "Failed to send. Please try again.";
1106
- A((N) => ({ ...N, submit: D }));
1097
+ const T = (o ?? c).trim();
1098
+ await t.createSupportTicket({
1099
+ subject: p.trim(),
1100
+ content: f.trim(),
1101
+ email: T || void 0,
1102
+ files: h.length > 0 ? h : void 0
1103
+ }), m(T);
1104
+ } catch (T) {
1105
+ const U = T instanceof L && T.message || "Failed to send. Please try again.";
1106
+ I((D) => ({ ...D, submit: U }));
1107
1107
  } finally {
1108
- m(!1);
1108
+ A(!1);
1109
1109
  }
1110
1110
  }
1111
1111
  }, z = () => {
1112
- p(""), x(""), k([]), A({}), _(null);
1113
- }, U = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", B = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1114
- return j ? /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1115
- /* @__PURE__ */ c("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1116
- /* @__PURE__ */ n(
1112
+ u(""), _(""), k([]), I({}), m(null);
1113
+ }, O = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", R = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1114
+ return b ? /* @__PURE__ */ d("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1115
+ /* @__PURE__ */ d("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1116
+ /* @__PURE__ */ a(
1117
1117
  "div",
1118
1118
  {
1119
1119
  class: "flex h-14 w-14 items-center justify-center rounded-full",
@@ -1123,7 +1123,7 @@ function Ce({ client: e, authSession: t, origin: r, onBack: i }) {
1123
1123
  boxShadow: "0 0 0 8px color-mix(in srgb, var(--pw-accent) 12%, transparent), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 45%, transparent)"
1124
1124
  },
1125
1125
  "aria-hidden": "true",
1126
- children: /* @__PURE__ */ n("svg", { viewBox: "0 0 24 24", class: "h-7 w-7", children: /* @__PURE__ */ n(
1126
+ children: /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", class: "h-7 w-7", children: /* @__PURE__ */ a(
1127
1127
  "path",
1128
1128
  {
1129
1129
  fill: "currentColor",
@@ -1132,28 +1132,28 @@ function Ce({ client: e, authSession: t, origin: r, onBack: i }) {
1132
1132
  ) })
1133
1133
  }
1134
1134
  ),
1135
- /* @__PURE__ */ n("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: a("support.success_heading", "Request submitted") }),
1136
- /* @__PURE__ */ c("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1137
- a(
1135
+ /* @__PURE__ */ a("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: n("support.success_heading", "Request submitted") }),
1136
+ /* @__PURE__ */ d("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1137
+ n(
1138
1138
  "support.success_message_prefix",
1139
1139
  "We've received your message and will respond to"
1140
1140
  ),
1141
1141
  " ",
1142
- /* @__PURE__ */ n("b", { class: "text-gray-700", children: j }),
1142
+ /* @__PURE__ */ a("b", { class: "text-gray-700", children: b }),
1143
1143
  "."
1144
1144
  ] })
1145
1145
  ] }),
1146
- /* @__PURE__ */ n("div", { class: U, style: B, children: /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1147
- /* @__PURE__ */ n(
1146
+ /* @__PURE__ */ a("div", { class: O, style: R, children: /* @__PURE__ */ d("div", { class: "flex items-center justify-center gap-3", children: [
1147
+ /* @__PURE__ */ a(
1148
1148
  "button",
1149
1149
  {
1150
1150
  type: "button",
1151
1151
  onClick: i,
1152
1152
  class: "rounded-xl px-3 py-2 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1153
- children: r === "standalone" ? a("support.done_button", "Done") : a("nav.back_aria", "Back")
1153
+ children: r === "standalone" ? n("support.done_button", "Done") : n("nav.back_aria", "Back")
1154
1154
  }
1155
1155
  ),
1156
- /* @__PURE__ */ n(
1156
+ /* @__PURE__ */ a(
1157
1157
  "button",
1158
1158
  {
1159
1159
  type: "button",
@@ -1163,98 +1163,98 @@ function Ce({ client: e, authSession: t, origin: r, onBack: i }) {
1163
1163
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
1164
1164
  boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
1165
1165
  },
1166
- children: a("support.send_another", "Send another request")
1166
+ children: n("support.send_another", "Send another request")
1167
1167
  }
1168
1168
  )
1169
1169
  ] }) })
1170
- ] }) : /* @__PURE__ */ c("form", { onSubmit: P, class: "relative flex-1 min-h-0 flex flex-col", children: [
1171
- /* @__PURE__ */ n(Ie, { onClick: i, ariaLabel: a("nav.back_aria", "Back") }),
1172
- /* @__PURE__ */ n("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
1173
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-2 pr-10", children: [
1174
- /* @__PURE__ */ n("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: a("support.heading", "Support") }),
1175
- /* @__PURE__ */ n("p", { class: "text-base leading-relaxed text-gray-600", children: a("support.instruction", "Please fill out the form below to submit your support request.") })
1170
+ ] }) : /* @__PURE__ */ d("form", { onSubmit: M, class: "relative flex-1 min-h-0 flex flex-col", children: [
1171
+ /* @__PURE__ */ a(Mt, { onClick: i, ariaLabel: n("nav.back_aria", "Back") }),
1172
+ /* @__PURE__ */ a("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ d("div", { class: "flex flex-col gap-5", children: [
1173
+ /* @__PURE__ */ d("div", { class: "flex flex-col gap-2 pr-10", children: [
1174
+ /* @__PURE__ */ a("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: n("support.heading", "Support") }),
1175
+ /* @__PURE__ */ a("p", { class: "text-base leading-relaxed text-gray-600", children: n("support.instruction", "Please fill out the form below to submit your support request.") })
1176
1176
  ] }),
1177
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
1178
- s ? /* @__PURE__ */ c("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1179
- a("support.sending_as", "Sending as"),
1177
+ /* @__PURE__ */ d("div", { class: "flex flex-col gap-3", children: [
1178
+ o ? /* @__PURE__ */ d("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1179
+ n("support.sending_as", "Sending as"),
1180
1180
  " ",
1181
- /* @__PURE__ */ n("b", { class: "font-medium text-gray-900", children: s })
1182
- ] }) : /* @__PURE__ */ n(
1183
- vt,
1181
+ /* @__PURE__ */ a("b", { class: "font-medium text-gray-900", children: o })
1182
+ ] }) : /* @__PURE__ */ a(
1183
+ ke,
1184
1184
  {
1185
1185
  type: "email",
1186
- placeholder: a("support.email_placeholder", "Enter your email *"),
1187
- value: d,
1186
+ placeholder: n("support.email_placeholder", "Enter your email *"),
1187
+ value: c,
1188
1188
  onInput: l,
1189
- error: S.email,
1189
+ error: C.email,
1190
1190
  autocomplete: "email",
1191
1191
  required: !0
1192
1192
  }
1193
1193
  ),
1194
- /* @__PURE__ */ n(
1195
- vt,
1194
+ /* @__PURE__ */ a(
1195
+ ke,
1196
1196
  {
1197
1197
  type: "text",
1198
- placeholder: a("support.subject_placeholder", "Enter your subject *"),
1199
- value: g,
1200
- onInput: p,
1201
- error: S.subject,
1198
+ placeholder: n("support.subject_placeholder", "Enter your subject *"),
1199
+ value: p,
1200
+ onInput: u,
1201
+ error: C.subject,
1202
1202
  required: !0
1203
1203
  }
1204
1204
  ),
1205
- /* @__PURE__ */ n(
1206
- Ae,
1205
+ /* @__PURE__ */ a(
1206
+ Lt,
1207
1207
  {
1208
- placeholder: a("support.message_placeholder", "Enter your message *"),
1209
- value: u,
1210
- onInput: x,
1211
- error: S.message,
1208
+ placeholder: n("support.message_placeholder", "Enter your message *"),
1209
+ value: f,
1210
+ onInput: _,
1211
+ error: C.message,
1212
1212
  required: !0
1213
1213
  }
1214
1214
  ),
1215
- /* @__PURE__ */ n(Me, { files: y, onChange: k, disabled: h })
1215
+ /* @__PURE__ */ a(Tt, { files: h, onChange: k, disabled: w })
1216
1216
  ] })
1217
1217
  ] }) }),
1218
- /* @__PURE__ */ c("div", { class: U, style: B, children: [
1219
- S.submit && /* @__PURE__ */ n("p", { class: "text-sm text-red-600", children: S.submit }),
1220
- /* @__PURE__ */ c("div", { class: "flex items-center justify-end gap-3", children: [
1221
- /* @__PURE__ */ n(
1218
+ /* @__PURE__ */ d("div", { class: O, style: R, children: [
1219
+ C.submit && /* @__PURE__ */ a("p", { class: "text-sm text-red-600", children: C.submit }),
1220
+ /* @__PURE__ */ d("div", { class: "flex items-center justify-end gap-3", children: [
1221
+ /* @__PURE__ */ a(
1222
1222
  "button",
1223
1223
  {
1224
1224
  type: "button",
1225
1225
  onClick: i,
1226
- disabled: h,
1226
+ disabled: w,
1227
1227
  class: "rounded-full px-4 py-2 text-base font-medium text-gray-700 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1228
- children: r === "standalone" ? a("support.close_button", "Close") : a("nav.back_aria", "Back")
1228
+ children: r === "standalone" ? n("support.close_button", "Close") : n("nav.back_aria", "Back")
1229
1229
  }
1230
1230
  ),
1231
- /* @__PURE__ */ n(
1231
+ /* @__PURE__ */ a(
1232
1232
  "button",
1233
1233
  {
1234
1234
  type: "submit",
1235
- disabled: h,
1235
+ disabled: w,
1236
1236
  class: "pw-cta-shimmer relative flex h-12 items-center justify-center overflow-hidden rounded-full px-8 text-base font-semibold text-white transition-transform duration-150 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1237
1237
  style: {
1238
1238
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 55%, color-mix(in srgb, var(--pw-accent) 90%, black) 100%)",
1239
1239
  boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
1240
1240
  },
1241
- children: h ? /* @__PURE__ */ n("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ n("span", { class: "relative z-10", children: a("support.send_button", "Send") })
1241
+ children: w ? /* @__PURE__ */ a("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ a("span", { class: "relative z-10", children: n("support.send_button", "Send") })
1242
1242
  }
1243
1243
  )
1244
1244
  ] })
1245
1245
  ] })
1246
1246
  ] });
1247
1247
  }
1248
- function Ie({ onClick: e, ariaLabel: t }) {
1249
- return /* @__PURE__ */ n(
1248
+ function Mt({ onClick: t, ariaLabel: e }) {
1249
+ return /* @__PURE__ */ a(
1250
1250
  "button",
1251
1251
  {
1252
1252
  type: "button",
1253
- onClick: e,
1254
- "aria-label": t,
1253
+ onClick: t,
1254
+ "aria-label": e,
1255
1255
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1256
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1257
- /* @__PURE__ */ n(
1256
+ children: /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1257
+ /* @__PURE__ */ a(
1258
1258
  "path",
1259
1259
  {
1260
1260
  d: "M5 8h8a4 4 0 0 1 0 8H9",
@@ -1264,7 +1264,7 @@ function Ie({ onClick: e, ariaLabel: t }) {
1264
1264
  "stroke-linejoin": "round"
1265
1265
  }
1266
1266
  ),
1267
- /* @__PURE__ */ n(
1267
+ /* @__PURE__ */ a(
1268
1268
  "path",
1269
1269
  {
1270
1270
  d: "M8 4 4 8l4 4",
@@ -1278,176 +1278,176 @@ function Ie({ onClick: e, ariaLabel: t }) {
1278
1278
  }
1279
1279
  );
1280
1280
  }
1281
- function vt({
1282
- type: e,
1283
- placeholder: t,
1281
+ function ke({
1282
+ type: t,
1283
+ placeholder: e,
1284
1284
  value: r,
1285
1285
  onInput: i,
1286
- error: a,
1287
- autocomplete: o,
1288
- required: s
1286
+ error: n,
1287
+ autocomplete: s,
1288
+ required: o
1289
1289
  }) {
1290
- return /* @__PURE__ */ c("div", { children: [
1291
- /* @__PURE__ */ n(
1290
+ return /* @__PURE__ */ d("div", { children: [
1291
+ /* @__PURE__ */ a(
1292
1292
  "input",
1293
1293
  {
1294
- type: e,
1294
+ type: t,
1295
1295
  value: r,
1296
- placeholder: t,
1297
- onInput: (d) => i(d.target.value),
1298
- autocomplete: o,
1299
- required: s,
1300
- class: `h-14 w-full rounded-2xl bg-gray-100 px-5 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${a ? "shadow-[0_0_0_2px_rgba(239,68,68,0.5)]" : "focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"}`
1296
+ placeholder: e,
1297
+ onInput: (c) => i(c.target.value),
1298
+ autocomplete: s,
1299
+ required: o,
1300
+ class: `h-14 w-full rounded-2xl bg-gray-100 px-5 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${n ? "shadow-[0_0_0_2px_rgba(239,68,68,0.5)]" : "focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"}`
1301
1301
  }
1302
1302
  ),
1303
- a && /* @__PURE__ */ n("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: a })
1303
+ n && /* @__PURE__ */ a("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
1304
1304
  ] });
1305
1305
  }
1306
- function Ae({
1307
- placeholder: e,
1308
- value: t,
1306
+ function Lt({
1307
+ placeholder: t,
1308
+ value: e,
1309
1309
  onInput: r,
1310
1310
  error: i,
1311
- required: a
1311
+ required: n
1312
1312
  }) {
1313
- return /* @__PURE__ */ c("div", { children: [
1314
- /* @__PURE__ */ n(
1313
+ return /* @__PURE__ */ d("div", { children: [
1314
+ /* @__PURE__ */ a(
1315
1315
  "textarea",
1316
1316
  {
1317
- value: t,
1318
- placeholder: e,
1319
- onInput: (o) => r(o.target.value),
1320
- required: a,
1317
+ value: e,
1318
+ placeholder: t,
1319
+ onInput: (s) => r(s.target.value),
1320
+ required: n,
1321
1321
  rows: 5,
1322
1322
  class: `min-h-[120px] w-full rounded-2xl bg-gray-100 px-5 py-3.5 text-base leading-relaxed text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${i ? "shadow-[0_0_0_2px_rgba(239,68,68,0.5)]" : "focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"}`
1323
1323
  }
1324
1324
  ),
1325
- i && /* @__PURE__ */ n("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
1325
+ i && /* @__PURE__ */ a("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
1326
1326
  ] });
1327
1327
  }
1328
- function Me({ files: e, onChange: t, disabled: r }) {
1329
- const { t: i } = v(), a = F(null), [o, s] = b(!1), [d, l] = b(null), g = (p) => {
1330
- if (!p || r) return;
1328
+ function Tt({ files: t, onChange: e, disabled: r }) {
1329
+ const { t: i } = S(), n = F(null), [s, o] = v(!1), [c, l] = v(null), p = (u) => {
1330
+ if (!u || r) return;
1331
1331
  l(null);
1332
- const u = Array.from(p);
1333
- if (e.length + u.length > it) {
1334
- l(i("support.too_many_files", "Up to {max} files", { max: it }));
1332
+ const f = Array.from(u);
1333
+ if (t.length + f.length > ne) {
1334
+ l(i("support.too_many_files", "Up to {max} files", { max: ne }));
1335
1335
  return;
1336
1336
  }
1337
- const x = u.filter(
1338
- (y) => yt.includes(y.type) && y.size <= _e
1337
+ const _ = f.filter(
1338
+ (h) => ve.includes(h.type) && h.size <= Ct
1339
1339
  );
1340
- if (x.length !== u.length) {
1340
+ if (_.length !== f.length) {
1341
1341
  l(i("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
1342
1342
  return;
1343
1343
  }
1344
- t([...e, ...x]);
1344
+ e([...t, ..._]);
1345
1345
  };
1346
- return /* @__PURE__ */ c("div", { children: [
1347
- /* @__PURE__ */ n("span", { class: "text-xs font-medium text-gray-700", children: i("support.attachments_label", "Attachments (optional)") }),
1348
- /* @__PURE__ */ c(
1346
+ return /* @__PURE__ */ d("div", { children: [
1347
+ /* @__PURE__ */ a("span", { class: "text-xs font-medium text-gray-700", children: i("support.attachments_label", "Attachments (optional)") }),
1348
+ /* @__PURE__ */ d(
1349
1349
  "div",
1350
1350
  {
1351
1351
  role: "button",
1352
1352
  tabIndex: 0,
1353
1353
  "aria-label": i("support.attachments_aria", "Attachments upload"),
1354
- onClick: () => !r && a.current?.click(),
1355
- onDragOver: (p) => {
1356
- p.preventDefault(), r || s(!0);
1354
+ onClick: () => !r && n.current?.click(),
1355
+ onDragOver: (u) => {
1356
+ u.preventDefault(), r || o(!0);
1357
1357
  },
1358
- onDragLeave: () => s(!1),
1359
- onDrop: (p) => {
1360
- p.preventDefault(), s(!1), g(p.dataTransfer?.files ?? null);
1358
+ onDragLeave: () => o(!1),
1359
+ onDrop: (u) => {
1360
+ u.preventDefault(), o(!1), p(u.dataTransfer?.files ?? null);
1361
1361
  },
1362
- class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${o ? "border-[var(--pw-accent)] bg-[color-mix(in_srgb,var(--pw-accent)_6%,white)]" : "border-gray-300 hover:border-gray-400 hover:bg-gray-50/60"} ${r ? "cursor-not-allowed opacity-60" : ""}`,
1362
+ class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${s ? "border-[var(--pw-accent)] bg-[color-mix(in_srgb,var(--pw-accent)_6%,white)]" : "border-gray-300 hover:border-gray-400 hover:bg-gray-50/60"} ${r ? "cursor-not-allowed opacity-60" : ""}`,
1363
1363
  children: [
1364
- /* @__PURE__ */ n("div", { class: "text-xs text-gray-500", children: i("support.dropzone_text", "Drop images here or click to select") }),
1365
- /* @__PURE__ */ n("div", { class: "mt-0.5 text-[11px] text-gray-400", children: i("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
1366
- max: it
1364
+ /* @__PURE__ */ a("div", { class: "text-xs text-gray-500", children: i("support.dropzone_text", "Drop images here or click to select") }),
1365
+ /* @__PURE__ */ a("div", { class: "mt-0.5 text-[11px] text-gray-400", children: i("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
1366
+ max: ne
1367
1367
  }) })
1368
1368
  ]
1369
1369
  }
1370
1370
  ),
1371
- /* @__PURE__ */ n(
1371
+ /* @__PURE__ */ a(
1372
1372
  "input",
1373
1373
  {
1374
- ref: a,
1374
+ ref: n,
1375
1375
  type: "file",
1376
1376
  multiple: !0,
1377
- accept: yt.join(","),
1377
+ accept: ve.join(","),
1378
1378
  class: "hidden",
1379
- onChange: (p) => {
1380
- g(p.target.files), p.currentTarget.value = "";
1379
+ onChange: (u) => {
1380
+ p(u.target.files), u.currentTarget.value = "";
1381
1381
  }
1382
1382
  }
1383
1383
  ),
1384
- d && /* @__PURE__ */ n("p", { class: "mt-1 text-xs text-red-600", children: d }),
1385
- e.length > 0 && /* @__PURE__ */ n("ul", { class: "mt-2 flex flex-col gap-1", children: e.map((p, u) => /* @__PURE__ */ c(
1384
+ c && /* @__PURE__ */ a("p", { class: "mt-1 text-xs text-red-600", children: c }),
1385
+ t.length > 0 && /* @__PURE__ */ a("ul", { class: "mt-2 flex flex-col gap-1", children: t.map((u, f) => /* @__PURE__ */ d(
1386
1386
  "li",
1387
1387
  {
1388
1388
  class: "flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",
1389
1389
  children: [
1390
- /* @__PURE__ */ n("span", { class: "truncate text-gray-700", children: p.name }),
1391
- /* @__PURE__ */ n(
1390
+ /* @__PURE__ */ a("span", { class: "truncate text-gray-700", children: u.name }),
1391
+ /* @__PURE__ */ a(
1392
1392
  "button",
1393
1393
  {
1394
1394
  type: "button",
1395
1395
  onClick: () => {
1396
- const x = [...e];
1397
- x.splice(u, 1), t(x);
1396
+ const _ = [...t];
1397
+ _.splice(f, 1), e(_);
1398
1398
  },
1399
1399
  disabled: r,
1400
1400
  class: "text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60",
1401
- "aria-label": i("support.remove_file_aria", "Remove {filename}", { filename: p.name }),
1401
+ "aria-label": i("support.remove_file_aria", "Remove {filename}", { filename: u.name }),
1402
1402
  children: "✕"
1403
1403
  }
1404
1404
  )
1405
1405
  ]
1406
1406
  },
1407
- `${p.name}-${p.size}-${u}`
1407
+ `${u.name}-${u.size}-${f}`
1408
1408
  )) })
1409
1409
  ] });
1410
1410
  }
1411
- const Le = {
1411
+ const Pt = {
1412
1412
  day: "cta.get_plan_daily",
1413
1413
  week: "cta.get_plan_weekly",
1414
1414
  month: "cta.get_plan_monthly",
1415
1415
  year: "cta.get_plan_yearly"
1416
- }, Pe = {
1416
+ }, Et = {
1417
1417
  day: "Get Daily Plan",
1418
1418
  week: "Get Weekly Plan",
1419
1419
  month: "Get Monthly Plan",
1420
1420
  year: "Get Yearly Plan"
1421
1421
  };
1422
- function Te(e, t, r, i) {
1423
- if (t === "close") return i("cta.close", "Close");
1424
- if (!e) return i("cta.continue", "Continue");
1425
- if (!r && e.trial_days && e.interval && e.interval !== "lifetime")
1426
- return i("cta.start_trial", "Start {days}-Day Free Trial", { days: e.trial_days });
1427
- if (!e.interval || e.interval === "lifetime")
1422
+ function jt(t, e, r, i) {
1423
+ if (e === "close") return i("cta.close", "Close");
1424
+ if (!t) return i("cta.continue", "Continue");
1425
+ if (!r && t.trial_days && t.interval && t.interval !== "lifetime")
1426
+ return i("cta.start_trial", "Start {days}-Day Free Trial", { days: t.trial_days });
1427
+ if (!t.interval || t.interval === "lifetime")
1428
1428
  return i("cta.get_lifetime_access", "Get Lifetime Access");
1429
- const a = Le[e.interval];
1430
- return a ? i(a, Pe[e.interval]) : i("cta.get_plan_generic", "Get {interval} Plan", {
1431
- interval: Ee(e.interval)
1429
+ const n = Pt[t.interval];
1430
+ return n ? i(n, Et[t.interval]) : i("cta.get_plan_generic", "Get {interval} Plan", {
1431
+ interval: zt(t.interval)
1432
1432
  });
1433
1433
  }
1434
- function Ee(e) {
1435
- return e.length ? e[0].toUpperCase() + e.slice(1) : e;
1434
+ function zt(t) {
1435
+ return t.length ? t[0].toUpperCase() + t.slice(1) : t;
1436
1436
  }
1437
- function je({ block: e, ctx: t }) {
1438
- const { t: r } = v(), [i, a] = b(!1), o = e.priceId ?? t.selectedPriceId, s = i || e.action === "checkout" && !o, d = o ? t.bootstrap.prices.find((u) => u.id === o) ?? null : null, l = t.bootstrap.user?.had_previous_trial ?? !1, g = e.label ?? Te(d, e.action, l, r);
1439
- return /* @__PURE__ */ c(
1437
+ function Bt({ block: t, ctx: e }) {
1438
+ const { t: r } = S(), [i, n] = v(!1), s = t.priceId ?? e.selectedPriceId, o = i || t.action === "checkout" && !s, c = s ? e.bootstrap.prices.find((f) => f.id === s) ?? null : null, l = e.bootstrap.user?.had_previous_trial ?? !1, p = t.label ?? jt(c, t.action, l, r);
1439
+ return /* @__PURE__ */ d(
1440
1440
  "button",
1441
1441
  {
1442
1442
  type: "button",
1443
- disabled: s,
1443
+ disabled: o,
1444
1444
  onClick: async () => {
1445
- if (!s) {
1446
- a(!0);
1445
+ if (!o) {
1446
+ n(!0);
1447
1447
  try {
1448
- await t.onAction(e.action, { priceId: o });
1448
+ await e.onAction(t.action, { priceId: s });
1449
1449
  } finally {
1450
- a(!1);
1450
+ n(!1);
1451
1451
  }
1452
1452
  }
1453
1453
  },
@@ -1457,7 +1457,7 @@ function je({ block: e, ctx: t }) {
1457
1457
  boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
1458
1458
  },
1459
1459
  children: [
1460
- /* @__PURE__ */ n(
1460
+ /* @__PURE__ */ a(
1461
1461
  "span",
1462
1462
  {
1463
1463
  class: "absolute inset-0 opacity-40",
@@ -1467,67 +1467,67 @@ function je({ block: e, ctx: t }) {
1467
1467
  "aria-hidden": "true"
1468
1468
  }
1469
1469
  ),
1470
- i ? /* @__PURE__ */ n("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ n("span", { class: "relative z-10", children: g })
1470
+ i ? /* @__PURE__ */ a("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ a("span", { class: "relative z-10", children: p })
1471
1471
  ]
1472
1472
  }
1473
1473
  );
1474
1474
  }
1475
- function ze({ ctx: e }) {
1476
- const { t } = v(), r = e.authSession, i = e.auth, [a, o] = b(!1), s = () => e.onAction("support");
1475
+ function Ot({ ctx: t }) {
1476
+ const { t: e } = S(), r = t.authSession, i = t.auth, [n, s] = v(!1), o = () => t.onAction("support");
1477
1477
  if (r && !r.user.is_anonymous) {
1478
- const d = async () => {
1479
- if (!(!i || a)) {
1480
- o(!0);
1478
+ const c = async () => {
1479
+ if (!(!i || n)) {
1480
+ s(!0);
1481
1481
  try {
1482
1482
  await i.signOut();
1483
1483
  } catch {
1484
1484
  } finally {
1485
- o(!1);
1485
+ s(!1);
1486
1486
  }
1487
1487
  }
1488
1488
  };
1489
- return /* @__PURE__ */ c("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
1490
- /* @__PURE__ */ c("span", { children: [
1491
- t("session.signed_in_as_prefix", "Signed in as"),
1489
+ return /* @__PURE__ */ d("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
1490
+ /* @__PURE__ */ d("span", { children: [
1491
+ e("session.signed_in_as_prefix", "Signed in as"),
1492
1492
  " ",
1493
- /* @__PURE__ */ n("b", { class: "font-medium text-gray-700", children: r.user.email })
1493
+ /* @__PURE__ */ a("b", { class: "font-medium text-gray-700", children: r.user.email })
1494
1494
  ] }),
1495
- /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1496
- /* @__PURE__ */ n(q, { onClick: d, disabled: !i || a, children: a ? t("session.signing_out", "Signing out…") : t("session.sign_out", "Sign Out") }),
1497
- /* @__PURE__ */ n(kt, {}),
1498
- /* @__PURE__ */ n(q, { onClick: s, children: t("session.contact_support", "Contact Support") })
1495
+ /* @__PURE__ */ d("div", { class: "flex items-center justify-center gap-3", children: [
1496
+ /* @__PURE__ */ a(G, { onClick: c, disabled: !i || n, children: n ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
1497
+ /* @__PURE__ */ a(_e, {}),
1498
+ /* @__PURE__ */ a(G, { onClick: o, children: e("session.contact_support", "Contact Support") })
1499
1499
  ] })
1500
1500
  ] });
1501
1501
  }
1502
- return /* @__PURE__ */ c("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1503
- /* @__PURE__ */ n(q, { onClick: () => e.onAction("restore"), children: t("session.restore_purchases", "Restore purchases") }),
1504
- /* @__PURE__ */ n(kt, {}),
1505
- /* @__PURE__ */ n(q, { onClick: s, children: t("session.contact_support", "Contact Support") })
1502
+ return /* @__PURE__ */ d("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1503
+ /* @__PURE__ */ a(G, { onClick: () => t.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
1504
+ /* @__PURE__ */ a(_e, {}),
1505
+ /* @__PURE__ */ a(G, { onClick: o, children: e("session.contact_support", "Contact Support") })
1506
1506
  ] });
1507
1507
  }
1508
- function q({
1509
- onClick: e,
1510
- disabled: t,
1508
+ function G({
1509
+ onClick: t,
1510
+ disabled: e,
1511
1511
  children: r
1512
1512
  }) {
1513
- return /* @__PURE__ */ n(
1513
+ return /* @__PURE__ */ a(
1514
1514
  "button",
1515
1515
  {
1516
1516
  type: "button",
1517
- onClick: e,
1518
- disabled: t,
1517
+ onClick: t,
1518
+ disabled: e,
1519
1519
  class: "font-semibold transition-opacity hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:opacity-80",
1520
1520
  style: { color: "var(--pw-accent)" },
1521
1521
  children: r
1522
1522
  }
1523
1523
  );
1524
1524
  }
1525
- function kt() {
1526
- return /* @__PURE__ */ n("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
1525
+ function _e() {
1526
+ return /* @__PURE__ */ a("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
1527
1527
  }
1528
- function Be({ block: e }) {
1529
- return e.items.length ? /* @__PURE__ */ n("ul", { class: "flex flex-col gap-2.5", role: "list", children: e.items.map((t) => /* @__PURE__ */ c("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1530
- /* @__PURE__ */ n(
1528
+ function Ft({ block: t }) {
1529
+ return t.items.length ? /* @__PURE__ */ a("ul", { class: "flex flex-col gap-2.5", role: "list", children: t.items.map((e) => /* @__PURE__ */ d("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1530
+ /* @__PURE__ */ a(
1531
1531
  "svg",
1532
1532
  {
1533
1533
  width: "18",
@@ -1536,7 +1536,7 @@ function Be({ block: e }) {
1536
1536
  fill: "none",
1537
1537
  class: "mt-0.5 flex-shrink-0 text-emerald-500",
1538
1538
  "aria-hidden": "true",
1539
- children: /* @__PURE__ */ n(
1539
+ children: /* @__PURE__ */ a(
1540
1540
  "path",
1541
1541
  {
1542
1542
  d: "M4 10.5l3.5 3.5 8.5-8.5",
@@ -1548,32 +1548,32 @@ function Be({ block: e }) {
1548
1548
  )
1549
1549
  }
1550
1550
  ),
1551
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-0.5", children: [
1552
- /* @__PURE__ */ n("span", { class: "font-medium leading-snug text-gray-900", children: t.name }),
1553
- t.desc ? /* @__PURE__ */ n("span", { class: "text-xs leading-relaxed text-gray-400", children: t.desc }) : null
1551
+ /* @__PURE__ */ d("div", { class: "flex flex-col gap-0.5", children: [
1552
+ /* @__PURE__ */ a("span", { class: "font-medium leading-snug text-gray-900", children: e.name }),
1553
+ e.desc ? /* @__PURE__ */ a("span", { class: "text-xs leading-relaxed text-gray-400", children: e.desc }) : null
1554
1554
  ] })
1555
- ] }, t.id)) }) : null;
1556
- }
1557
- function Oe({ block: e }) {
1558
- const { t } = v(), r = e.title ?? t("pricing.money_back", "30-day money-back guarantee"), i = e.subtitle, a = (e.icon ?? "dollar_shield") !== "none", o = Fe(r);
1559
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1560
- /* @__PURE__ */ c("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1561
- a ? /* @__PURE__ */ n(Re, {}) : null,
1562
- o ? /* @__PURE__ */ c("span", { children: [
1563
- /* @__PURE__ */ n("b", { class: "font-bold text-gray-900", children: o.bold }),
1555
+ ] }, e.id)) }) : null;
1556
+ }
1557
+ function Rt({ block: t }) {
1558
+ const { t: e } = S(), r = t.title ?? e("pricing.money_back", "30-day money-back guarantee"), i = t.subtitle, n = (t.icon ?? "dollar_shield") !== "none", s = Ut(r);
1559
+ return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1560
+ /* @__PURE__ */ d("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1561
+ n ? /* @__PURE__ */ a(Dt, {}) : null,
1562
+ s ? /* @__PURE__ */ d("span", { children: [
1563
+ /* @__PURE__ */ a("b", { class: "font-bold text-gray-900", children: s.bold }),
1564
1564
  " ",
1565
- /* @__PURE__ */ n("span", { class: "font-medium", children: o.rest })
1566
- ] }) : /* @__PURE__ */ n("span", { class: "font-medium", children: r })
1565
+ /* @__PURE__ */ a("span", { class: "font-medium", children: s.rest })
1566
+ ] }) : /* @__PURE__ */ a("span", { class: "font-medium", children: r })
1567
1567
  ] }),
1568
- i ? /* @__PURE__ */ n("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: i }) : null
1568
+ i ? /* @__PURE__ */ a("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: i }) : null
1569
1569
  ] });
1570
1570
  }
1571
- function Fe(e) {
1572
- const t = e.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
1573
- return t ? { bold: t[1], rest: t[2] } : null;
1571
+ function Ut(t) {
1572
+ const e = t.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
1573
+ return e ? { bold: e[1], rest: e[2] } : null;
1574
1574
  }
1575
- function Re() {
1576
- return /* @__PURE__ */ c(
1575
+ function Dt() {
1576
+ return /* @__PURE__ */ d(
1577
1577
  "svg",
1578
1578
  {
1579
1579
  xmlns: "http://www.w3.org/2000/svg",
@@ -1584,7 +1584,7 @@ function Re() {
1584
1584
  class: "flex-shrink-0 text-emerald-500",
1585
1585
  "aria-hidden": "true",
1586
1586
  children: [
1587
- /* @__PURE__ */ n(
1587
+ /* @__PURE__ */ a(
1588
1588
  "path",
1589
1589
  {
1590
1590
  d: "M12 2 4 5v6c0 5.25 3.5 9.5 8 11 4.5-1.5 8-5.75 8-11V5l-8-3Z",
@@ -1593,7 +1593,7 @@ function Re() {
1593
1593
  "stroke-linejoin": "round"
1594
1594
  }
1595
1595
  ),
1596
- /* @__PURE__ */ n(
1596
+ /* @__PURE__ */ a(
1597
1597
  "path",
1598
1598
  {
1599
1599
  d: "m9 12 2 2 4-4",
@@ -1607,131 +1607,131 @@ function Re() {
1607
1607
  }
1608
1608
  );
1609
1609
  }
1610
- const Ft = 24, Ue = 16, De = 2;
1611
- function Ne(e, t) {
1612
- const r = t * De;
1613
- let i = Ft;
1614
- for (e.style.fontSize = `${i}px`; e.scrollHeight > r && i > Ue; )
1615
- i -= 1, e.style.fontSize = `${i}px`;
1616
- }
1617
- function $e({ block: e, ctx: t }) {
1618
- const r = e.level ?? 1, i = `h${r}`, a = r === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : r === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", o = F(null), s = r === 1 && !!t.bootstrap.settings.title_auto_fit;
1619
- return E(() => {
1620
- if (!s || !o.current) return;
1621
- const d = getComputedStyle(o.current), l = parseFloat(d.lineHeight) || Ft * 1.5;
1622
- Ne(o.current, l);
1623
- }, [s, e.text]), /* @__PURE__ */ n(i, { ref: o, class: a, children: e.text });
1624
- }
1625
- function He(e) {
1626
- const t = e.local ?? { currency: e.currency, amount: e.amount };
1627
- if (e.interval === "year") {
1628
- const r = (e.interval_count ?? 1) * 12;
1629
- return { amount: t.amount / r, currency: t.currency };
1630
- }
1631
- return { amount: t.amount, currency: t.currency };
1632
- }
1633
- function nt(e, t) {
1634
- const r = e % 1 !== 0 ? 2 : 0;
1610
+ const Re = 24, Nt = 16, Ht = 2;
1611
+ function $t(t, e) {
1612
+ const r = e * Ht;
1613
+ let i = Re;
1614
+ for (t.style.fontSize = `${i}px`; t.scrollHeight > r && i > Nt; )
1615
+ i -= 1, t.style.fontSize = `${i}px`;
1616
+ }
1617
+ function Vt({ block: t, ctx: e }) {
1618
+ const r = t.level ?? 1, i = `h${r}`, n = r === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : r === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = F(null), o = r === 1 && !!e.bootstrap.settings.title_auto_fit;
1619
+ return j(() => {
1620
+ if (!o || !s.current) return;
1621
+ const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) || Re * 1.5;
1622
+ $t(s.current, l);
1623
+ }, [o, t.text]), /* @__PURE__ */ a(i, { ref: s, class: n, children: t.text });
1624
+ }
1625
+ function qt(t) {
1626
+ const e = t.local ?? { currency: t.currency, amount: t.amount };
1627
+ if (t.interval === "year") {
1628
+ const r = (t.interval_count ?? 1) * 12;
1629
+ return { amount: e.amount / r, currency: e.currency };
1630
+ }
1631
+ return { amount: e.amount, currency: e.currency };
1632
+ }
1633
+ function ae(t, e) {
1634
+ const r = t % 1 !== 0 ? 2 : 0;
1635
1635
  try {
1636
1636
  const i = new Intl.NumberFormat(void 0, {
1637
1637
  style: "currency",
1638
- currency: t,
1638
+ currency: e,
1639
1639
  currencyDisplay: "narrowSymbol",
1640
1640
  maximumFractionDigits: r,
1641
1641
  minimumFractionDigits: r
1642
- }).formatToParts(e);
1643
- let a = "", o = "";
1644
- for (const s of i)
1645
- s.type === "currency" ? a = s.value : s.type !== "literal" && (o += s.value);
1646
- return { currency: a || t, amount: o.trim() };
1642
+ }).formatToParts(t);
1643
+ let n = "", s = "";
1644
+ for (const o of i)
1645
+ o.type === "currency" ? n = o.value : o.type !== "literal" && (s += o.value);
1646
+ return { currency: n || e, amount: s.trim() };
1647
1647
  } catch {
1648
- return { currency: t, amount: String(e) };
1648
+ return { currency: e, amount: String(t) };
1649
1649
  }
1650
1650
  }
1651
- function st(e, t) {
1652
- const { amount: r, currency: i } = He(e);
1653
- if (!t) {
1654
- const { currency: d, amount: l } = nt(r, i);
1655
- return { currency: d, amount: l, originalAmount: null };
1651
+ function le(t, e) {
1652
+ const { amount: r, currency: i } = qt(t);
1653
+ if (!e) {
1654
+ const { currency: c, amount: l } = ae(r, i);
1655
+ return { currency: c, amount: l, originalAmount: null };
1656
1656
  }
1657
- const a = r * (1 - t / 100), o = nt(a, i), s = nt(r, i);
1657
+ const n = r * (1 - e / 100), s = ae(n, i), o = ae(r, i);
1658
1658
  return {
1659
- currency: o.currency,
1660
- amount: o.amount,
1661
- originalAmount: `${s.currency}${s.amount}`
1659
+ currency: s.currency,
1660
+ amount: s.amount,
1661
+ originalAmount: `${o.currency}${o.amount}`
1662
1662
  };
1663
1663
  }
1664
- function Rt(e, t) {
1665
- if (e.label) return e.label.toUpperCase();
1666
- if (!e.interval || e.interval === "lifetime")
1667
- return t("pricing.plan_label.lifetime", "LIFETIME");
1664
+ function Ue(t, e) {
1665
+ if (t.label) return t.label.toUpperCase();
1666
+ if (!t.interval || t.interval === "lifetime")
1667
+ return e("pricing.plan_label.lifetime", "LIFETIME");
1668
1668
  const i = {
1669
1669
  day: { key: "pricing.plan_label.daily", fallback: "DAILY PLAN" },
1670
1670
  week: { key: "pricing.plan_label.weekly", fallback: "WEEKLY PLAN" },
1671
1671
  month: { key: "pricing.plan_label.monthly", fallback: "MONTHLY PLAN" },
1672
1672
  year: { key: "pricing.plan_label.yearly", fallback: "YEARLY PLAN" }
1673
- }[e.interval];
1674
- return i ? t(i.key, i.fallback) : `${e.interval.toUpperCase()} PLAN`;
1675
- }
1676
- function lt(e, t) {
1677
- if (!e.interval || e.interval === "lifetime")
1678
- return t("pricing.interval.lifetime_short", "lifetime");
1679
- if (e.interval === "year") return t("pricing.interval.month", "month");
1680
- const r = e.interval_count ?? 1;
1681
- return r === 1 ? t(`pricing.interval.${e.interval}`, e.interval) : `${r} ${e.interval}s`;
1682
- }
1683
- function Ve({ block: e, ctx: t }) {
1684
- const { t: r } = v(), i = e.priceIds && e.priceIds.length > 0 ? new Set(e.priceIds) : null, a = t.bootstrap.prices.filter((s) => !i || i.has(s.id));
1685
- if (a.length === 0)
1686
- return /* @__PURE__ */ n("p", { class: "text-sm text-gray-500", children: r("pricing.no_prices", "No prices available.") });
1687
- const o = e.popular_label ?? r("pricing.most_popular", "Most popular");
1688
- if (e.view === "compact")
1689
- return /* @__PURE__ */ n(
1673
+ }[t.interval];
1674
+ return i ? e(i.key, i.fallback) : `${t.interval.toUpperCase()} PLAN`;
1675
+ }
1676
+ function ce(t, e) {
1677
+ if (!t.interval || t.interval === "lifetime")
1678
+ return e("pricing.interval.lifetime_short", "lifetime");
1679
+ if (t.interval === "year") return e("pricing.interval.month", "month");
1680
+ const r = t.interval_count ?? 1;
1681
+ return r === 1 ? e(`pricing.interval.${t.interval}`, t.interval) : `${r} ${t.interval}s`;
1682
+ }
1683
+ function Gt({ block: t, ctx: e }) {
1684
+ const { t: r } = S(), i = t.priceIds && t.priceIds.length > 0 ? new Set(t.priceIds) : null, n = e.bootstrap.prices.filter((o) => !i || i.has(o.id));
1685
+ if (n.length === 0)
1686
+ return /* @__PURE__ */ a("p", { class: "text-sm text-gray-500", children: r("pricing.no_prices", "No prices available.") });
1687
+ const s = t.popular_label ?? r("pricing.most_popular", "Most popular");
1688
+ if (t.view === "compact")
1689
+ return /* @__PURE__ */ a(
1690
1690
  "div",
1691
1691
  {
1692
1692
  class: "flex w-full flex-col rounded-xl border border-gray-200 bg-gray-50",
1693
1693
  role: "radiogroup",
1694
1694
  "aria-label": r("pricing.plans_aria", "Plans"),
1695
- children: a.map((s, d) => /* @__PURE__ */ n(
1696
- qe,
1695
+ children: n.map((o, c) => /* @__PURE__ */ a(
1696
+ Zt,
1697
1697
  {
1698
- price: s,
1699
- isLast: d === a.length - 1,
1700
- isPopular: e.popular_price_id === s.id,
1701
- popularLabel: o,
1702
- offer: H(t.bootstrap.offers, s.id),
1703
- selected: t.selectedPriceId === s.id,
1698
+ price: o,
1699
+ isLast: c === n.length - 1,
1700
+ isPopular: t.popular_price_id === o.id,
1701
+ popularLabel: s,
1702
+ offer: N(e.bootstrap.offers, o.id),
1703
+ selected: e.selectedPriceId === o.id,
1704
1704
  onSelect: () => {
1705
- t.setSelectedPriceId(s.id), t.onAction("price_selected", { priceId: s.id, price: s });
1705
+ e.setSelectedPriceId(o.id), e.onAction("price_selected", { priceId: o.id, price: o });
1706
1706
  },
1707
1707
  t: r
1708
1708
  },
1709
- s.id
1709
+ o.id
1710
1710
  ))
1711
1711
  }
1712
1712
  );
1713
- if (e.view === "horizontal") {
1714
- const s = Math.min(a.length, 3), d = a.some(
1715
- (l) => (H(t.bootstrap.offers, l.id)?.discount_percent ?? 0) > 0
1713
+ if (t.view === "horizontal") {
1714
+ const o = Math.min(n.length, 3), c = n.some(
1715
+ (l) => (N(e.bootstrap.offers, l.id)?.discount_percent ?? 0) > 0
1716
1716
  );
1717
- return /* @__PURE__ */ n(
1717
+ return /* @__PURE__ */ a(
1718
1718
  "div",
1719
1719
  {
1720
1720
  class: "grid items-stretch gap-2",
1721
- style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
1721
+ style: { gridTemplateColumns: `repeat(${o}, minmax(0, 1fr))` },
1722
1722
  role: "radiogroup",
1723
1723
  "aria-label": r("pricing.plans_aria", "Plans"),
1724
- children: a.map((l) => /* @__PURE__ */ n(
1725
- We,
1724
+ children: n.map((l) => /* @__PURE__ */ a(
1725
+ Kt,
1726
1726
  {
1727
1727
  price: l,
1728
- isPopular: e.popular_price_id === l.id,
1729
- popularLabel: o,
1730
- offer: H(t.bootstrap.offers, l.id),
1731
- reserveStrikeRow: d,
1732
- selected: t.selectedPriceId === l.id,
1728
+ isPopular: t.popular_price_id === l.id,
1729
+ popularLabel: s,
1730
+ offer: N(e.bootstrap.offers, l.id),
1731
+ reserveStrikeRow: c,
1732
+ selected: e.selectedPriceId === l.id,
1733
1733
  onSelect: () => {
1734
- t.setSelectedPriceId(l.id), t.onAction("price_selected", { priceId: l.id, price: l });
1734
+ e.setSelectedPriceId(l.id), e.onAction("price_selected", { priceId: l.id, price: l });
1735
1735
  },
1736
1736
  t: r
1737
1737
  },
@@ -1740,48 +1740,48 @@ function Ve({ block: e, ctx: t }) {
1740
1740
  }
1741
1741
  );
1742
1742
  }
1743
- return /* @__PURE__ */ n(
1743
+ return /* @__PURE__ */ a(
1744
1744
  "div",
1745
1745
  {
1746
1746
  class: "flex flex-col gap-2",
1747
1747
  role: "radiogroup",
1748
1748
  "aria-label": r("pricing.plans_aria", "Plans"),
1749
- children: a.map((s) => {
1750
- const d = t.selectedPriceId === s.id, l = e.popular_price_id === s.id, p = H(t.bootstrap.offers, s.id)?.discount_percent ?? null, { currency: u, amount: x, originalAmount: y } = st(s, p);
1751
- return /* @__PURE__ */ c(
1749
+ children: n.map((o) => {
1750
+ const c = e.selectedPriceId === o.id, l = t.popular_price_id === o.id, u = N(e.bootstrap.offers, o.id)?.discount_percent ?? null, { currency: f, amount: _, originalAmount: h } = le(o, u);
1751
+ return /* @__PURE__ */ d(
1752
1752
  "button",
1753
1753
  {
1754
1754
  type: "button",
1755
1755
  role: "radio",
1756
- "aria-checked": d,
1756
+ "aria-checked": c,
1757
1757
  onClick: () => {
1758
- t.setSelectedPriceId(s.id), t.onAction("price_selected", { priceId: s.id, price: s });
1758
+ e.setSelectedPriceId(o.id), e.onAction("price_selected", { priceId: o.id, price: o });
1759
1759
  },
1760
1760
  class: [
1761
1761
  "group relative inline-flex w-full mx-auto items-center justify-between flex-row-reverse gap-4 rounded-2xl border-2 px-4 py-3.5 text-left transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1762
1762
  // Везде border 2px — selection выражается только цветом, layout
1763
1763
  // не прыгает (равная толщина у selected/unselected). Цветовая
1764
1764
  // разница accent vs gray достаточно сильная для visual hierarchy.
1765
- d ? "border-[var(--pw-accent)] bg-transparent" : "border-gray-200 bg-transparent hover:bg-gray-50"
1765
+ c ? "border-[var(--pw-accent)] bg-transparent" : "border-gray-200 bg-transparent hover:bg-gray-50"
1766
1766
  ].join(" "),
1767
1767
  children: [
1768
- /* @__PURE__ */ n(
1768
+ /* @__PURE__ */ a(
1769
1769
  "span",
1770
1770
  {
1771
1771
  class: [
1772
1772
  "flex h-6.5 w-6.5 flex-shrink-0 items-center justify-center rounded-full border transition-colors",
1773
- d ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent",
1773
+ c ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent",
1774
1774
  // Popular-label badge сидит absolute сверху-справа карточки и
1775
1775
  // визуально сдвигает центр content'а вниз. flex items-center
1776
1776
  // на карточке держит галочку по геометрическому центру, что
1777
1777
  // делает её визуально выше — компенсируем небольшим mt'ом.
1778
1778
  l ? "mt-3" : ""
1779
1779
  ].join(" "),
1780
- style: d ? {
1780
+ style: c ? {
1781
1781
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 70%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)"
1782
1782
  } : void 0,
1783
1783
  "aria-hidden": "true",
1784
- children: /* @__PURE__ */ n(
1784
+ children: /* @__PURE__ */ a(
1785
1785
  "svg",
1786
1786
  {
1787
1787
  width: "14",
@@ -1789,8 +1789,8 @@ function Ve({ block: e, ctx: t }) {
1789
1789
  viewBox: "0 0 17 12",
1790
1790
  fill: "none",
1791
1791
  xmlns: "http://www.w3.org/2000/svg",
1792
- class: d ? "opacity-100" : "opacity-0",
1793
- children: /* @__PURE__ */ n(
1792
+ class: c ? "opacity-100" : "opacity-0",
1793
+ children: /* @__PURE__ */ a(
1794
1794
  "path",
1795
1795
  {
1796
1796
  d: "M16.5234 0.476562C16.9805 0.898438 16.9805 1.63672 16.5234 2.05859L7.52344 11.0586C7.10156 11.5156 6.36328 11.5156 5.94141 11.0586L1.44141 6.55859C0.984375 6.13672 0.984375 5.39844 1.44141 4.97656C1.86328 4.51953 2.60156 4.51953 3.02344 4.97656L6.75 8.66797L14.9414 0.476562C15.3633 0.0195312 16.1016 0.0195312 16.5234 0.476562Z",
@@ -1801,87 +1801,87 @@ function Ve({ block: e, ctx: t }) {
1801
1801
  )
1802
1802
  }
1803
1803
  ),
1804
- /* @__PURE__ */ c("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1805
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1806
- /* @__PURE__ */ n("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Rt(s, r) }),
1807
- y ? (
1804
+ /* @__PURE__ */ d("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1805
+ /* @__PURE__ */ d("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1806
+ /* @__PURE__ */ a("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Ue(o, r) }),
1807
+ h ? (
1808
1808
  // opacity-60 приглушает strike: глаз сначала ловит label
1809
1809
  // и discount-badge, потом main price; original «бывшая цена»
1810
1810
  // — третичная информация, не должна конкурировать с label.
1811
- /* @__PURE__ */ n("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: y })
1811
+ /* @__PURE__ */ a("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: h })
1812
1812
  ) : null,
1813
- p ? (
1813
+ u ? (
1814
1814
  // Emerald pill — фиксированный «успех/выгода», не зависит от
1815
1815
  // brand_color. Читается даже на тёмных бренд-акцентах.
1816
- /* @__PURE__ */ c("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1816
+ /* @__PURE__ */ d("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1817
1817
  "-",
1818
- p,
1818
+ u,
1819
1819
  "%"
1820
1820
  ] })
1821
1821
  ) : null
1822
1822
  ] }),
1823
- /* @__PURE__ */ n("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ c("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1824
- /* @__PURE__ */ n("span", { class: "opacity-90", children: u }),
1825
- x,
1826
- /* @__PURE__ */ c("span", { class: "text-sm font-normal text-gray-500", children: [
1823
+ /* @__PURE__ */ a("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ d("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1824
+ /* @__PURE__ */ a("span", { class: "opacity-90", children: f }),
1825
+ _,
1826
+ /* @__PURE__ */ d("span", { class: "text-sm font-normal text-gray-500", children: [
1827
1827
  " ",
1828
1828
  "/ ",
1829
- lt(s, r)
1829
+ ce(o, r)
1830
1830
  ] })
1831
1831
  ] }) }),
1832
- s.description ? /* @__PURE__ */ n("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: s.description }) : null
1832
+ o.description ? /* @__PURE__ */ a("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: o.description }) : null
1833
1833
  ] }),
1834
- l ? /* @__PURE__ */ n(
1834
+ l ? /* @__PURE__ */ a(
1835
1835
  "span",
1836
1836
  {
1837
1837
  class: "absolute -top-[9px] -right-[6px] rounded-[11px] border-[5px] border-white px-2 py-1 text-[12px] font-semibold text-white",
1838
1838
  style: { background: "var(--pw-accent)" },
1839
- children: o
1839
+ children: s
1840
1840
  }
1841
1841
  ) : null
1842
1842
  ]
1843
1843
  },
1844
- s.id
1844
+ o.id
1845
1845
  );
1846
1846
  })
1847
1847
  }
1848
1848
  );
1849
1849
  }
1850
- function Ge(e, t) {
1851
- return e.label ? e.label : !e.interval || e.interval === "lifetime" ? t("pricing.interval.lifetime_short", "lifetime") : t(`pricing.interval.${e.interval}`, e.interval);
1850
+ function Wt(t, e) {
1851
+ return t.label ? t.label : !t.interval || t.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${t.interval}`, t.interval);
1852
1852
  }
1853
- function qe({
1854
- price: e,
1855
- isLast: t,
1853
+ function Zt({
1854
+ price: t,
1855
+ isLast: e,
1856
1856
  isPopular: r,
1857
1857
  popularLabel: i,
1858
- offer: a,
1859
- selected: o,
1860
- onSelect: s,
1861
- t: d
1858
+ offer: n,
1859
+ selected: s,
1860
+ onSelect: o,
1861
+ t: c
1862
1862
  }) {
1863
- const l = a?.discount_percent ?? null, { currency: g, amount: p, originalAmount: u } = st(e, l);
1864
- return /* @__PURE__ */ c(
1863
+ const l = n?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } = le(t, l);
1864
+ return /* @__PURE__ */ d(
1865
1865
  "button",
1866
1866
  {
1867
1867
  type: "button",
1868
1868
  role: "radio",
1869
- "aria-checked": o,
1870
- onClick: s,
1869
+ "aria-checked": s,
1870
+ onClick: o,
1871
1871
  class: "group relative inline-flex w-full max-w-[360px] mx-auto items-center justify-between gap-4 px-4 pt-3.5 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--pw-accent)]",
1872
1872
  children: [
1873
- /* @__PURE__ */ n(
1873
+ /* @__PURE__ */ a(
1874
1874
  "span",
1875
1875
  {
1876
1876
  class: [
1877
1877
  "flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border transition-colors mb-3",
1878
- o ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent"
1878
+ s ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent"
1879
1879
  ].join(" "),
1880
- style: o ? {
1880
+ style: s ? {
1881
1881
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 70%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)"
1882
1882
  } : void 0,
1883
1883
  "aria-hidden": "true",
1884
- children: /* @__PURE__ */ n(
1884
+ children: /* @__PURE__ */ a(
1885
1885
  "svg",
1886
1886
  {
1887
1887
  width: "14",
@@ -1889,8 +1889,8 @@ function qe({
1889
1889
  viewBox: "0 0 17 12",
1890
1890
  fill: "none",
1891
1891
  xmlns: "http://www.w3.org/2000/svg",
1892
- class: o ? "opacity-100" : "opacity-0",
1893
- children: /* @__PURE__ */ n(
1892
+ class: s ? "opacity-100" : "opacity-0",
1893
+ children: /* @__PURE__ */ a(
1894
1894
  "path",
1895
1895
  {
1896
1896
  d: "M16.5234 0.476562C16.9805 0.898438 16.9805 1.63672 16.5234 2.05859L7.52344 11.0586C7.10156 11.5156 6.36328 11.5156 5.94141 11.0586L1.44141 6.55859C0.984375 6.13672 0.984375 5.39844 1.44141 4.97656C1.86328 4.51953 2.60156 4.51953 3.02344 4.97656L6.75 8.66797L14.9414 0.476562C15.3633 0.0195312 16.1016 0.0195312 16.5234 0.476562Z",
@@ -1901,21 +1901,21 @@ function qe({
1901
1901
  )
1902
1902
  }
1903
1903
  ),
1904
- /* @__PURE__ */ c(
1904
+ /* @__PURE__ */ d(
1905
1905
  "div",
1906
1906
  {
1907
1907
  class: [
1908
1908
  "flex flex-1 items-center gap-1.5 pb-3.5",
1909
- t ? "" : "border-b border-gray-200"
1909
+ e ? "" : "border-b border-gray-200"
1910
1910
  ].join(" "),
1911
1911
  children: [
1912
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1913
- /* @__PURE__ */ n("span", { class: "text-base font-normal capitalize text-gray-800", children: Ge(e, d) }),
1912
+ /* @__PURE__ */ d("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1913
+ /* @__PURE__ */ a("span", { class: "text-base font-normal capitalize text-gray-800", children: Wt(t, c) }),
1914
1914
  r ? (
1915
1915
  // Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
1916
1916
  // Низкий visual weight: pill про "имя плана" (most popular), а не
1917
1917
  // про savings — не должна конкурировать с -X% discount-pill.
1918
- /* @__PURE__ */ n(
1918
+ /* @__PURE__ */ a(
1919
1919
  "span",
1920
1920
  {
1921
1921
  class: "rounded-[9px] px-2 py-1 text-[10px] font-bold",
@@ -1927,22 +1927,22 @@ function qe({
1927
1927
  }
1928
1928
  )
1929
1929
  ) : null,
1930
- l ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1930
+ l ? /* @__PURE__ */ d("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1931
1931
  "-",
1932
1932
  l,
1933
1933
  "%"
1934
1934
  ] }) : null
1935
1935
  ] }),
1936
- /* @__PURE__ */ n("div", { class: "flex-1" }),
1937
- /* @__PURE__ */ c("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1938
- u ? /* @__PURE__ */ n("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: u }) : null,
1939
- /* @__PURE__ */ c("span", { class: "whitespace-nowrap", children: [
1940
- /* @__PURE__ */ n("span", { class: "opacity-90", children: g }),
1941
- p,
1942
- /* @__PURE__ */ c("span", { class: "text-xs text-gray-400", children: [
1936
+ /* @__PURE__ */ a("div", { class: "flex-1" }),
1937
+ /* @__PURE__ */ d("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1938
+ f ? /* @__PURE__ */ a("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: f }) : null,
1939
+ /* @__PURE__ */ d("span", { class: "whitespace-nowrap", children: [
1940
+ /* @__PURE__ */ a("span", { class: "opacity-90", children: p }),
1941
+ u,
1942
+ /* @__PURE__ */ d("span", { class: "text-xs text-gray-400", children: [
1943
1943
  " ",
1944
1944
  "/ ",
1945
- lt(e, d)
1945
+ ce(t, c)
1946
1946
  ] })
1947
1947
  ] })
1948
1948
  ] })
@@ -1953,48 +1953,48 @@ function qe({
1953
1953
  }
1954
1954
  );
1955
1955
  }
1956
- function We({
1957
- price: e,
1958
- isPopular: t,
1956
+ function Kt({
1957
+ price: t,
1958
+ isPopular: e,
1959
1959
  popularLabel: r,
1960
1960
  offer: i,
1961
- reserveStrikeRow: a,
1962
- selected: o,
1963
- onSelect: s,
1964
- t: d
1961
+ reserveStrikeRow: n,
1962
+ selected: s,
1963
+ onSelect: o,
1964
+ t: c
1965
1965
  }) {
1966
- const l = i?.discount_percent ?? null, { currency: g, amount: p, originalAmount: u } = st(e, l);
1967
- return /* @__PURE__ */ c(
1966
+ const l = i?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } = le(t, l);
1967
+ return /* @__PURE__ */ d(
1968
1968
  "button",
1969
1969
  {
1970
1970
  type: "button",
1971
1971
  role: "radio",
1972
- "aria-checked": o,
1973
- onClick: s,
1972
+ "aria-checked": s,
1973
+ onClick: o,
1974
1974
  class: [
1975
1975
  "group relative flex h-full flex-col items-center justify-start gap-1 rounded-2xl border-2 px-3 pb-4 pt-3.5 text-center transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1976
- o ? "border-[var(--pw-accent)]" : "border-gray-200 hover:bg-gray-50"
1976
+ s ? "border-[var(--pw-accent)]" : "border-gray-200 hover:bg-gray-50"
1977
1977
  ].join(" "),
1978
- style: o ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
1978
+ style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
1979
1979
  children: [
1980
- /* @__PURE__ */ n("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Rt(e, d) }),
1981
- a ? /* @__PURE__ */ c("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
1982
- u ? /* @__PURE__ */ n("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: u }) : null,
1983
- l ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1980
+ /* @__PURE__ */ a("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Ue(t, c) }),
1981
+ n ? /* @__PURE__ */ d("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
1982
+ f ? /* @__PURE__ */ a("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: f }) : null,
1983
+ l ? /* @__PURE__ */ d("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1984
1984
  "-",
1985
1985
  l,
1986
1986
  "%"
1987
1987
  ] }) : null
1988
1988
  ] }) : null,
1989
- /* @__PURE__ */ c("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
1990
- /* @__PURE__ */ n("span", { class: "opacity-90", children: g }),
1991
- p
1989
+ /* @__PURE__ */ d("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
1990
+ /* @__PURE__ */ a("span", { class: "opacity-90", children: p }),
1991
+ u
1992
1992
  ] }),
1993
- /* @__PURE__ */ c("span", { class: "text-xs font-normal text-gray-500", children: [
1993
+ /* @__PURE__ */ d("span", { class: "text-xs font-normal text-gray-500", children: [
1994
1994
  "/ ",
1995
- lt(e, d)
1995
+ ce(t, c)
1996
1996
  ] }),
1997
- t ? /* @__PURE__ */ n(
1997
+ e ? /* @__PURE__ */ a(
1998
1998
  "span",
1999
1999
  {
2000
2000
  class: "absolute -top-[10px] left-1/2 -translate-x-1/2 whitespace-nowrap rounded-[11px] border-[3px] border-white px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-white",
@@ -2006,38 +2006,38 @@ function We({
2006
2006
  }
2007
2007
  );
2008
2008
  }
2009
- function Ze({ block: e }) {
2010
- return /* @__PURE__ */ n("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: e.text });
2009
+ function Yt({ block: t }) {
2010
+ return /* @__PURE__ */ a("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: t.text });
2011
2011
  }
2012
- const Ke = {
2012
+ const Xt = {
2013
2013
  week: 0.25,
2014
2014
  month: 1,
2015
2015
  year: 12
2016
2016
  };
2017
- function Ye(e, t) {
2018
- return e ? t(`pricing.interval.${e}`, e) : t("pricing.interval.period", "period");
2019
- }
2020
- function Xe({ block: e, ctx: t }) {
2021
- const { t: r } = v();
2022
- if (!e.queries.length) return null;
2023
- const a = t.bootstrap.prices.find((s) => s.id === t.selectedPriceId)?.interval ?? null, o = a ? Ke[a] : void 0;
2024
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
2025
- /* @__PURE__ */ n("div", { class: "text-sm font-semibold text-gray-800", children: !a || a === "lifetime" ? r("pricing.included_total", "Included for lifetime:") : r("pricing.included_per", "Included per {interval}:", {
2026
- interval: Ye(a, r)
2017
+ function Jt(t, e) {
2018
+ return t ? e(`pricing.interval.${t}`, t) : e("pricing.interval.period", "period");
2019
+ }
2020
+ function Qt({ block: t, ctx: e }) {
2021
+ const { t: r } = S();
2022
+ if (!t.queries.length) return null;
2023
+ const n = e.bootstrap.prices.find((o) => o.id === e.selectedPriceId)?.interval ?? null, s = n ? Xt[n] : void 0;
2024
+ return /* @__PURE__ */ d("div", { class: "flex flex-col gap-2", children: [
2025
+ /* @__PURE__ */ a("div", { class: "text-sm font-semibold text-gray-800", children: !n || n === "lifetime" ? r("pricing.included_total", "Included for lifetime:") : r("pricing.included_per", "Included per {interval}:", {
2026
+ interval: Jt(n, r)
2027
2027
  }) }),
2028
- /* @__PURE__ */ n("ul", { class: "flex flex-col gap-2", role: "list", children: e.queries.map((s) => {
2029
- const d = Number.isFinite(s.count) ? s.count : 0, l = o !== void 0 ? Math.round(d * o) : d;
2030
- return /* @__PURE__ */ c("li", { class: `flex gap-3 ${s.desc ? "items-start" : "items-center"}`, children: [
2031
- /* @__PURE__ */ n(
2028
+ /* @__PURE__ */ a("ul", { class: "flex flex-col gap-2", role: "list", children: t.queries.map((o) => {
2029
+ const c = Number.isFinite(o.count) ? o.count : 0, l = s !== void 0 ? Math.round(c * s) : c;
2030
+ return /* @__PURE__ */ d("li", { class: `flex gap-3 ${o.desc ? "items-start" : "items-center"}`, children: [
2031
+ /* @__PURE__ */ a(
2032
2032
  "svg",
2033
2033
  {
2034
2034
  width: "18",
2035
2035
  height: "18",
2036
2036
  viewBox: "0 0 20 20",
2037
2037
  fill: "none",
2038
- class: `flex-shrink-0 text-emerald-500 ${s.desc ? "mt-0.5" : ""}`,
2038
+ class: `flex-shrink-0 text-emerald-500 ${o.desc ? "mt-0.5" : ""}`,
2039
2039
  "aria-hidden": "true",
2040
- children: /* @__PURE__ */ n(
2040
+ children: /* @__PURE__ */ a(
2041
2041
  "path",
2042
2042
  {
2043
2043
  d: "M4 10.5l3.5 3.5 8.5-8.5",
@@ -2049,223 +2049,255 @@ function Xe({ block: e, ctx: t }) {
2049
2049
  )
2050
2050
  }
2051
2051
  ),
2052
- /* @__PURE__ */ c("div", { children: [
2053
- /* @__PURE__ */ n("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
2052
+ /* @__PURE__ */ d("div", { children: [
2053
+ /* @__PURE__ */ a("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
2054
2054
  " ",
2055
- /* @__PURE__ */ n("span", { class: "text-sm text-gray-800", children: s.name }),
2056
- s.desc ? /* @__PURE__ */ c(ot, { children: [
2057
- /* @__PURE__ */ n("br", {}),
2058
- /* @__PURE__ */ n("span", { class: "text-xs text-gray-400", children: s.desc })
2055
+ /* @__PURE__ */ a("span", { class: "text-sm text-gray-800", children: o.name }),
2056
+ o.desc ? /* @__PURE__ */ d(se, { children: [
2057
+ /* @__PURE__ */ a("br", {}),
2058
+ /* @__PURE__ */ a("span", { class: "text-xs text-gray-400", children: o.desc })
2059
2059
  ] }) : null
2060
2060
  ] })
2061
- ] }, s.id);
2061
+ ] }, o.id);
2062
2062
  }) })
2063
2063
  ] });
2064
2064
  }
2065
- const Je = {
2066
- heading: $e,
2067
- text: Ze,
2068
- price_grid: Ve,
2069
- cta_button: je,
2070
- auth_panel: Tt,
2071
- current_session: ze,
2072
- features_list: Be,
2073
- tokenization_gate: Xe,
2074
- guarantee_badge: Oe,
2075
- offer_banner: ve
2065
+ const er = {
2066
+ heading: Vt,
2067
+ text: Yt,
2068
+ price_grid: Gt,
2069
+ cta_button: Bt,
2070
+ auth_panel: Ee,
2071
+ current_session: Ot,
2072
+ features_list: Ft,
2073
+ tokenization_gate: Qt,
2074
+ guarantee_badge: Rt,
2075
+ offer_banner: _t
2076
2076
  };
2077
- function Qe({ layout: e, bootstrap: t, onAction: r, auth: i, authSession: a, hasTopBanner: o }) {
2078
- const s = Gt(() => {
2079
- for (const k of e.blocks)
2080
- if (k.type === "price_grid" && k.popular_price_id && t.prices.some((h) => h.id === k.popular_price_id))
2077
+ function tr({ layout: t, bootstrap: e, onAction: r, auth: i, authSession: n, hasTopBanner: s }) {
2078
+ const o = We(() => {
2079
+ for (const k of t.blocks)
2080
+ if (k.type === "price_grid" && k.popular_price_id && e.prices.some((w) => w.id === k.popular_price_id))
2081
2081
  return k.popular_price_id;
2082
- return t.prices[0]?.id ?? null;
2083
- }, [e.blocks, t.prices]), [d, l] = b(s), g = {
2084
- bootstrap: t,
2085
- selectedPriceId: d,
2082
+ return e.prices[0]?.id ?? null;
2083
+ }, [t.blocks, e.prices]), [c, l] = v(o), p = {
2084
+ bootstrap: e,
2085
+ selectedPriceId: c,
2086
2086
  setSelectedPriceId: l,
2087
2087
  onAction: r,
2088
2088
  auth: i,
2089
- authSession: a
2090
- }, p = e.blocks.findIndex((k) => k.type === "cta_button"), u = p === -1 ? e.blocks : e.blocks.slice(0, p), x = p === -1 ? [] : e.blocks.slice(p), y = (k, h) => {
2091
- const m = Je[k.type];
2092
- return m ? /* @__PURE__ */ n(m, { block: k, ctx: g }, `${k.type}-${h}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${k.type}`), null);
2089
+ authSession: n
2090
+ }, u = t.blocks.findIndex((k) => k.type === "cta_button"), f = u === -1 ? t.blocks : t.blocks.slice(0, u), _ = u === -1 ? [] : t.blocks.slice(u), h = (k, w) => {
2091
+ const A = er[k.type];
2092
+ return A ? /* @__PURE__ */ a(A, { block: k, ctx: p }, `${k.type}-${w}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${k.type}`), null);
2093
2093
  };
2094
- return /* @__PURE__ */ c(ot, { children: [
2095
- /* @__PURE__ */ n("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ n("div", { class: "flex flex-col gap-6", children: u.map(y) }) }),
2096
- x.length > 0 ? (
2094
+ return /* @__PURE__ */ d(se, { children: [
2095
+ /* @__PURE__ */ a("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ a("div", { class: "flex flex-col gap-6", children: f.map(h) }) }),
2096
+ _.length > 0 ? (
2097
2097
  // Тонкий shadow-top вместо border-t — создаёт depth, читается как
2098
2098
  // «footer закреплён к низу dialog'а». Линия выглядела как divider
2099
2099
  // в обычном flow, не передавала sticky-character.
2100
- /* @__PURE__ */ n(
2100
+ /* @__PURE__ */ a(
2101
2101
  "div",
2102
2102
  {
2103
2103
  class: "flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",
2104
2104
  style: { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" },
2105
- children: x.map((k, h) => y(k, u.length + h))
2105
+ children: _.map((k, w) => h(k, f.length + w))
2106
2106
  }
2107
2107
  )
2108
2108
  ) : null
2109
2109
  ] });
2110
2110
  }
2111
- function tr(e, t, r, i) {
2112
- return e ? i ? { open: !0, view: "purchased", error: null } : t.status === "idle" || t.status === "loading" ? { open: !0, view: "loading", error: null } : t.status === "error" ? { open: !0, view: "error", error: t.error } : r.kind === "support" ? { open: !0, view: "support", error: null } : r.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : r.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : r.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : r.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : r.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
2111
+ function rr(t, e, r, i) {
2112
+ return t ? i ? { open: !0, view: "purchased", error: null, processing: !1 } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null, processing: !1 } : e.status === "error" ? { open: !0, view: "error", error: e.error, processing: !1 } : r.kind === "support" ? { open: !0, view: "support", error: null, processing: !1 } : r.kind === "auth_gate" ? { open: !0, view: "auth", error: null, processing: !1 } : r.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null, processing: !1 } : r.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null, processing: !1 } : r.kind === "purchase_success" ? { open: !0, view: "purchased", error: null, processing: !1 } : r.kind === "verifying" ? { open: !0, view: "loading", error: null, processing: !1 } : { open: !0, view: "layout", error: null, processing: !1 } : { open: !1, view: null, error: null, processing: !1 };
2113
2113
  }
2114
- function er(e, t) {
2115
- return e.open === t.open && e.view === t.view && e.error === t.error;
2114
+ function ir(t, e) {
2115
+ return t.open === e.open && t.view === e.view && t.error === e.error && t.processing === e.processing;
2116
2116
  }
2117
- function rr({
2118
- client: e,
2119
- open: t,
2117
+ function nr({
2118
+ client: t,
2119
+ open: e,
2120
2120
  onClose: r,
2121
2121
  onEvent: i,
2122
- initialView: a,
2123
- initialAuthMode: o,
2124
- purchased: s,
2125
- renew: d,
2126
- onState: l,
2127
- inline: g,
2128
- locale: p
2122
+ initialView: n,
2123
+ initialAuthMode: s,
2124
+ initialCheckoutPriceId: o,
2125
+ initialCheckoutUrl: c,
2126
+ purchased: l,
2127
+ renew: p,
2128
+ onState: u,
2129
+ inline: f,
2130
+ locale: _
2129
2131
  }) {
2130
- const [u, x] = b({ status: "idle" }), [y, k] = b(
2131
- () => e.auth?.getCachedSession() ?? null
2132
- ), [h, m] = b(() => a === "support" ? { kind: "support", origin: "standalone" } : a === "auth" ? { kind: "auth_gate", origin: "standalone" } : { kind: "layout" }), j = F(!1), _ = F(null);
2133
- E(() => {
2134
- if (!l) return;
2135
- const w = tr(t, u, h, s), f = _.current;
2136
- f && er(f, w) || (_.current = w, l(w));
2137
- }, [t, u, h, s, l]), E(() => {
2138
- if (e.auth)
2139
- return e.auth.onAuthChange((w, f) => k(f));
2140
- }, [e.auth]), E(() => {
2141
- if (typeof e.onBootstrapChange == "function")
2142
- return e.onBootstrapChange((w) => {
2143
- x(
2144
- (f) => f.status === "ready" ? { status: "ready", data: w } : f
2132
+ const [h, k] = v({ status: "idle" }), [w, A] = v(
2133
+ () => t.auth?.getCachedSession() ?? null
2134
+ ), [b, m] = v(() => n === "support" ? { kind: "support", origin: "standalone" } : n === "auth" ? o ? {
2135
+ kind: "auth_gate",
2136
+ pendingCheckout: { priceId: o, direct: !0 },
2137
+ origin: "standalone",
2138
+ intent: "preauth"
2139
+ } : { kind: "auth_gate", origin: "standalone" } : n === "awaiting_payment" && o && c ? {
2140
+ kind: "awaiting_payment",
2141
+ priceId: o,
2142
+ url: c
2143
+ } : n === "popup_blocked" && o && c ? {
2144
+ kind: "popup_blocked",
2145
+ priceId: o,
2146
+ url: c
2147
+ } : { kind: "layout" }), C = n === "awaiting_payment" || n === "popup_blocked" || n === "auth" && !!o, I = F(!1), B = F(null);
2148
+ j(() => {
2149
+ if (!u) return;
2150
+ const y = rr(e, h, b, l), g = B.current;
2151
+ g && ir(g, y) || (B.current = y, u(y));
2152
+ }, [e, h, b, l, u]), j(() => {
2153
+ if (t.auth)
2154
+ return t.auth.onAuthChange((y, g) => A(g));
2155
+ }, [t.auth]), j(() => {
2156
+ if (typeof t.onBootstrapChange == "function")
2157
+ return t.onBootstrapChange((y) => {
2158
+ k(
2159
+ (g) => g.status === "ready" ? { status: "ready", data: y } : g
2145
2160
  );
2146
2161
  });
2147
- }, [e]), E(() => {
2148
- if (!t || u.status === "ready" || u.status === "loading") return;
2149
- let w = !1;
2150
- return x({ status: "loading" }), e.bootstrap().then((f) => {
2151
- w || (x({ status: "ready", data: f }), i("ready", f), f.user?.has_active_subscription && !d && !a && (i("purchase_completed", {
2152
- priceId: null,
2162
+ }, [t]), j(() => {
2163
+ if (!e || h.status === "ready" || h.status === "loading") return;
2164
+ let y = !1;
2165
+ return k({ status: "loading" }), t.bootstrap().then((g) => {
2166
+ if (y) return;
2167
+ k({ status: "ready", data: g }), i("ready", g);
2168
+ const x = n === "support" || n === "auth" || C;
2169
+ g.user?.has_active_subscription && !p && !x && (i("purchase_completed", {
2170
+ priceId: o ?? null,
2153
2171
  sessionId: null,
2154
2172
  restored: !0
2155
- }), m({ kind: "purchase_success", restored: !0 })));
2156
- }).catch((f) => {
2157
- if (w) return;
2158
- const C = f instanceof O ? f : new O("unknown", "Failed to load paywall", { cause: f });
2159
- x({ status: "error", error: C }), i("error", C);
2173
+ }), m({ kind: "purchase_success", restored: !0 }));
2174
+ }).catch((g) => {
2175
+ if (y) return;
2176
+ const x = g instanceof L ? g : new L("unknown", "Failed to load paywall", { cause: g });
2177
+ k({ status: "error", error: x }), i("error", x);
2160
2178
  }), () => {
2161
- w = !0;
2179
+ y = !0;
2162
2180
  };
2163
- }, [t, e]), qt(() => {
2164
- if (!t) {
2165
- m({ kind: "layout" }), j.current = !1;
2181
+ }, [e, t]), Ze(() => {
2182
+ if (!e) {
2183
+ m({ kind: "layout" }), I.current = !1;
2166
2184
  return;
2167
2185
  }
2168
- a === "support" ? m({ kind: "support", origin: "standalone" }) : a === "auth" && m({ kind: "auth_gate", origin: "standalone" });
2169
- }, [t, a]);
2170
- const S = async (w) => {
2186
+ n === "support" ? m({ kind: "support", origin: "standalone" }) : n === "auth" ? m(o ? {
2187
+ kind: "auth_gate",
2188
+ pendingCheckout: { priceId: o, direct: !0 },
2189
+ origin: "standalone",
2190
+ intent: "preauth"
2191
+ } : { kind: "auth_gate", origin: "standalone" }) : n === "awaiting_payment" && o && c ? m({
2192
+ kind: "awaiting_payment",
2193
+ priceId: o,
2194
+ url: c
2195
+ }) : n === "popup_blocked" && o && c && m({
2196
+ kind: "popup_blocked",
2197
+ priceId: o,
2198
+ url: c
2199
+ });
2200
+ }, [e, n, o, c]);
2201
+ const M = async (y) => {
2171
2202
  try {
2172
- const f = await e.createCheckout({
2173
- priceId: w,
2174
- ignoreActivePurchase: d === !0
2203
+ const g = t.getCachedOffers?.() ?? null, x = g ? N(g, y) : null, E = await t.createCheckout({
2204
+ priceId: y,
2205
+ offerId: x?.id,
2206
+ ignoreActivePurchase: p === !0
2175
2207
  });
2176
- if (i("checkout_started", { priceId: w, url: f.url, acquiring: f.acquiring }), typeof window > "u" || !f.url) return;
2177
- const C = window.open(f.url, "_blank");
2178
- if (C) {
2208
+ if (i("checkout_started", { priceId: y, url: E.url, acquiring: E.acquiring }), typeof window > "u" || !E.url) return;
2209
+ const $ = window.open(E.url, "_blank");
2210
+ if ($) {
2179
2211
  try {
2180
- C.opener = null;
2212
+ $.opener = null;
2181
2213
  } catch {
2182
2214
  }
2183
- m({ kind: "awaiting_payment", priceId: w, url: f.url });
2215
+ m({ kind: "awaiting_payment", priceId: y, url: E.url });
2184
2216
  } else
2185
- m({ kind: "popup_blocked", priceId: w, url: f.url });
2186
- } catch (f) {
2187
- if (f instanceof O && f.code === "already_purchased") {
2217
+ m({ kind: "popup_blocked", priceId: y, url: E.url });
2218
+ } catch (g) {
2219
+ if (g instanceof L && g.code === "already_purchased") {
2188
2220
  try {
2189
- await e.getUser({ force: !0 });
2221
+ await t.getUser({ force: !0 });
2190
2222
  } catch {
2191
2223
  }
2192
- i("purchase_completed", { priceId: w, sessionId: null, restored: !0 }), m({ kind: "purchase_success", restored: !0 });
2224
+ i("purchase_completed", { priceId: y, sessionId: null, restored: !0 }), C ? r() : m({ kind: "purchase_success", restored: !0 });
2193
2225
  return;
2194
2226
  }
2195
- const C = f instanceof O ? f : new O("checkout_failed", "Checkout failed", { cause: f });
2196
- i("error", C), m({ kind: "layout" });
2227
+ const x = g instanceof L ? g : new L("checkout_failed", "Checkout failed", { cause: g });
2228
+ i("error", x), C ? r() : m({ kind: "layout" });
2197
2229
  }
2198
- }, A = (w, f) => {
2230
+ }, z = (y, g) => {
2199
2231
  if (typeof window > "u") return;
2200
- const C = window.open(f, "_blank");
2201
- if (C) {
2232
+ const x = window.open(g, "_blank");
2233
+ if (x) {
2202
2234
  try {
2203
- C.opener = null;
2235
+ x.opener = null;
2204
2236
  } catch {
2205
2237
  }
2206
- m({ kind: "awaiting_payment", priceId: w, url: f });
2238
+ m({ kind: "awaiting_payment", priceId: y, url: g });
2207
2239
  }
2208
2240
  };
2209
- E(() => {
2210
- if (h.kind !== "auth_gate" || !y || y.user.is_anonymous || j.current) return;
2211
- j.current = !0;
2212
- const w = h.pendingCheckout, f = h.origin;
2241
+ j(() => {
2242
+ if (b.kind !== "auth_gate" || !w || w.user.is_anonymous || I.current) return;
2243
+ I.current = !0;
2244
+ const y = b.pendingCheckout, g = b.origin;
2213
2245
  m({ kind: "verifying" }), (async () => {
2214
- if (!d)
2246
+ if (!p)
2215
2247
  try {
2216
- if ((await e.getUser({ force: !0 })).has_active_subscription) {
2248
+ if ((await t.getUser({ force: !0 })).has_active_subscription) {
2217
2249
  i("purchase_completed", {
2218
- priceId: w?.priceId ?? null,
2250
+ priceId: y?.priceId ?? null,
2219
2251
  sessionId: null,
2220
2252
  restored: !0
2221
- }), m({ kind: "purchase_success", restored: !0 });
2253
+ }), y?.direct ? r() : m({ kind: "purchase_success", restored: !0 });
2222
2254
  return;
2223
2255
  }
2224
2256
  } catch {
2225
2257
  }
2226
- if (!w) {
2227
- f === "standalone" ? r() : m({ kind: "layout" });
2258
+ if (!y) {
2259
+ g === "standalone" ? r() : m({ kind: "layout" });
2228
2260
  return;
2229
2261
  }
2230
- await S(w.priceId);
2262
+ await M(y.priceId);
2231
2263
  })().finally(() => {
2232
- j.current = !1;
2264
+ I.current = !1;
2233
2265
  });
2234
- }, [y, h]);
2235
- const R = async (w, f) => {
2236
- if (w === "close") {
2266
+ }, [w, b]);
2267
+ const O = async (y, g) => {
2268
+ if (y === "close") {
2237
2269
  r();
2238
2270
  return;
2239
2271
  }
2240
- if (w === "price_selected") {
2241
- i("price_selected", f);
2272
+ if (y === "price_selected") {
2273
+ i("price_selected", g);
2242
2274
  return;
2243
2275
  }
2244
- if (w === "restore") {
2245
- if (!e.auth) return;
2246
- const C = e.auth.getCachedSession();
2247
- if (C && !C.user.is_anonymous) return;
2276
+ if (y === "restore") {
2277
+ if (!t.auth) return;
2278
+ const x = t.auth.getCachedSession();
2279
+ if (x && !x.user.is_anonymous) return;
2248
2280
  m({ kind: "auth_gate", intent: "restore" });
2249
2281
  return;
2250
2282
  }
2251
- if (w === "support") {
2283
+ if (y === "support") {
2252
2284
  m({ kind: "support", origin: "layout" });
2253
2285
  return;
2254
2286
  }
2255
- if (w === "checkout" && u.status === "ready") {
2256
- const C = f?.priceId;
2257
- if (!C) {
2258
- i("error", new O("no_price", "No price selected"));
2287
+ if (y === "checkout" && h.status === "ready") {
2288
+ const x = g?.priceId;
2289
+ if (!x) {
2290
+ i("error", new L("no_price", "No price selected"));
2259
2291
  return;
2260
2292
  }
2261
- const K = u.data.settings.checkout_mode ?? "guest", I = e.auth?.getCachedSession() ?? null, L = !!I && !I.user.is_anonymous;
2262
- if (K === "preauth" && !!e.auth && !L) {
2263
- m({ kind: "auth_gate", pendingCheckout: { priceId: C } });
2293
+ const E = h.data.settings.checkout_mode ?? "guest", $ = t.auth?.getCachedSession() ?? null, De = !!$ && !$.user.is_anonymous;
2294
+ if (E === "preauth" && !!t.auth && !De) {
2295
+ m({ kind: "auth_gate", pendingCheckout: { priceId: x } });
2264
2296
  return;
2265
2297
  }
2266
- await S(C);
2298
+ await M(x);
2267
2299
  }
2268
- }, P = u.status === "ready" ? u.data.settings.brand_color : null, z = u.status === "ready" ? u.data.settings.allow_close !== !1 : !0, B = h.kind === "layout" && u.status === "ready" ? jt(u.data.offers) : null, T = B ? /* @__PURE__ */ n(ke, { offer: B }) : null, M = {
2300
+ }, R = h.status === "ready" ? h.data.settings.brand_color : null, P = h.status === "ready" ? h.data.settings.allow_close !== !1 : !0, U = b.kind === "layout" && h.status === "ready" ? ze(h.data.offers) : null, D = U ? /* @__PURE__ */ a(St, { offer: U }) : null, Z = {
2269
2301
  type: "auth_panel",
2270
2302
  // Заголовок не задаём — AuthGate сам решит по intent'у (restore →
2271
2303
  // "Restore Purchases", остальные → дефолтный "Welcome back!").
@@ -2274,163 +2306,163 @@ function rr({
2274
2306
  // Не скрываем при наличии сессии — auto-resume useEffect отрабатывает быстрее,
2275
2307
  // чем хотим показывать "Signed in as ..." промежуточным экраном.
2276
2308
  hide_when_authenticated: !1,
2277
- providers: u.status === "ready" ? u.data.settings.auth_providers : void 0
2278
- }, D = h.kind === "support" ? /* @__PURE__ */ n(
2279
- Ce,
2309
+ providers: h.status === "ready" ? h.data.settings.auth_providers : void 0
2310
+ }, V = b.kind === "support" ? /* @__PURE__ */ a(
2311
+ At,
2280
2312
  {
2281
- client: e,
2282
- authSession: y,
2283
- origin: h.origin,
2313
+ client: t,
2314
+ authSession: w,
2315
+ origin: b.origin,
2284
2316
  onBack: () => {
2285
- h.origin === "standalone" ? r() : m({ kind: "layout" });
2317
+ b.origin === "standalone" ? r() : m({ kind: "layout" });
2286
2318
  }
2287
2319
  }
2288
- ) : null, N = h.kind === "auth_gate" && h.origin !== "standalone" || h.kind === "support", Z = u.status === "ready" ? u.data : null;
2289
- return /* @__PURE__ */ n(re, { bootstrap: Z, forceLocale: p, children: /* @__PURE__ */ n(
2290
- ie,
2320
+ ) : null, K = b.kind === "auth_gate" && b.origin !== "standalone" || b.kind === "support", Y = h.status === "ready" ? h.data : null;
2321
+ return /* @__PURE__ */ a(nt, { bootstrap: Y, forceLocale: _, children: /* @__PURE__ */ a(
2322
+ at,
2291
2323
  {
2292
- open: t,
2324
+ open: e,
2293
2325
  onClose: r,
2294
- brandColor: P,
2295
- topBanner: T,
2296
- allowClose: z,
2297
- hideCloseButton: N,
2298
- inline: g,
2326
+ brandColor: R,
2327
+ topBanner: D,
2328
+ allowClose: P,
2329
+ hideCloseButton: K,
2330
+ inline: f,
2299
2331
  labelledBy: "pw-title",
2300
- children: s ? /* @__PURE__ */ n(_t, { onContinue: r }) : h.kind === "purchase_success" ? /* @__PURE__ */ n(_t, { restored: h.restored, onContinue: r }) : D || (u.status === "loading" || u.status === "idle" || h.kind === "verifying" ? /* @__PURE__ */ n(ir, { verifying: h.kind === "verifying" }) : u.status === "error" ? /* @__PURE__ */ n(nr, { message: u.error.message }) : h.kind === "auth_gate" && e.auth ? /* @__PURE__ */ n(
2301
- be,
2332
+ children: l ? /* @__PURE__ */ a(Se, { onContinue: r }) : b.kind === "purchase_success" ? /* @__PURE__ */ a(Se, { restored: b.restored, onContinue: r }) : V || (h.status === "loading" || h.status === "idle" || b.kind === "verifying" ? /* @__PURE__ */ a(ar, { verifying: b.kind === "verifying" }) : h.status === "error" ? /* @__PURE__ */ a(or, { message: h.error.message }) : b.kind === "auth_gate" && t.auth ? /* @__PURE__ */ a(
2333
+ xt,
2302
2334
  {
2303
- block: M,
2304
- bootstrap: u.data,
2305
- auth: e.auth,
2306
- authSession: y,
2307
- showBack: h.origin !== "standalone",
2308
- intent: h.intent ?? (h.origin === "standalone" ? "standalone" : "preauth"),
2309
- initialMode: h.origin === "standalone" ? o : void 0,
2335
+ block: Z,
2336
+ bootstrap: h.data,
2337
+ auth: t.auth,
2338
+ authSession: w,
2339
+ showBack: b.origin !== "standalone",
2340
+ intent: b.intent ?? (b.origin === "standalone" ? "standalone" : "preauth"),
2341
+ initialMode: b.origin === "standalone" ? s : void 0,
2310
2342
  onBack: () => {
2311
- h.origin === "standalone" ? r() : m({ kind: "layout" });
2343
+ b.origin === "standalone" ? r() : m({ kind: "layout" });
2312
2344
  }
2313
2345
  }
2314
- ) : h.kind === "awaiting_payment" ? /* @__PURE__ */ n(
2315
- or,
2346
+ ) : b.kind === "awaiting_payment" ? /* @__PURE__ */ a(
2347
+ lr,
2316
2348
  {
2317
- client: e,
2349
+ client: t,
2318
2350
  onBack: () => m({ kind: "layout" }),
2319
2351
  onReopen: () => {
2320
2352
  if (typeof window > "u") return;
2321
- const w = window.open(h.url, "_blank");
2322
- if (w)
2353
+ const y = window.open(b.url, "_blank");
2354
+ if (y)
2323
2355
  try {
2324
- w.opener = null;
2356
+ y.opener = null;
2325
2357
  } catch {
2326
2358
  }
2327
2359
  },
2328
- onRetry: () => S(h.priceId)
2360
+ onRetry: () => M(b.priceId)
2329
2361
  }
2330
- ) : h.kind === "popup_blocked" ? /* @__PURE__ */ n(ar, { onReopen: () => A(h.priceId, h.url) }) : /* @__PURE__ */ n(
2331
- Qe,
2362
+ ) : b.kind === "popup_blocked" ? /* @__PURE__ */ a(sr, { onReopen: () => z(b.priceId, b.url) }) : /* @__PURE__ */ a(
2363
+ tr,
2332
2364
  {
2333
- layout: u.data.layout,
2334
- bootstrap: u.data,
2335
- onAction: R,
2336
- auth: e.auth,
2337
- authSession: y
2365
+ layout: h.data.layout,
2366
+ bootstrap: h.data,
2367
+ onAction: O,
2368
+ auth: t.auth,
2369
+ authSession: w
2338
2370
  }
2339
2371
  ))
2340
2372
  }
2341
2373
  ) });
2342
2374
  }
2343
- function ir({ verifying: e }) {
2344
- const { t } = v();
2345
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2346
- /* @__PURE__ */ n("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
2347
- /* @__PURE__ */ n("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: e ? t("modal.verifying_subscription", "Checking your subscription…") : t("modal.loading", "Loading…") })
2375
+ function ar({ verifying: t }) {
2376
+ const { t: e } = S();
2377
+ return /* @__PURE__ */ d("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2378
+ /* @__PURE__ */ a("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
2379
+ /* @__PURE__ */ a("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: t ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
2348
2380
  ] });
2349
2381
  }
2350
- function nr({ message: e }) {
2351
- const { t } = v();
2352
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2353
- /* @__PURE__ */ n("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
2354
- /* @__PURE__ */ n("path", { d: "M10 6v5M10 14h.01", stroke: "#dc2626", "stroke-width": "2", "stroke-linecap": "round" }),
2355
- /* @__PURE__ */ n("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
2382
+ function or({ message: t }) {
2383
+ const { t: e } = S();
2384
+ return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2385
+ /* @__PURE__ */ a("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
2386
+ /* @__PURE__ */ a("path", { d: "M10 6v5M10 14h.01", stroke: "#dc2626", "stroke-width": "2", "stroke-linecap": "round" }),
2387
+ /* @__PURE__ */ a("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
2356
2388
  ] }) }),
2357
- /* @__PURE__ */ n("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: t("modal.error_generic", "Something went wrong") }),
2358
- /* @__PURE__ */ n("p", { class: "text-xs leading-relaxed text-gray-500", children: e })
2389
+ /* @__PURE__ */ a("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: e("modal.error_generic", "Something went wrong") }),
2390
+ /* @__PURE__ */ a("p", { class: "text-xs leading-relaxed text-gray-500", children: t })
2359
2391
  ] });
2360
2392
  }
2361
- function ar({ onReopen: e }) {
2362
- const { t } = v();
2363
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2364
- /* @__PURE__ */ n(
2393
+ function sr({ onReopen: t }) {
2394
+ const { t: e } = S();
2395
+ return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2396
+ /* @__PURE__ */ a(
2365
2397
  "div",
2366
2398
  {
2367
2399
  class: "flex h-11 w-11 items-center justify-center rounded-full",
2368
2400
  style: { background: "color-mix(in srgb, var(--pw-accent) 12%, white)", color: "var(--pw-accent)" },
2369
2401
  "aria-hidden": "true",
2370
- children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
2371
- /* @__PURE__ */ n("path", { d: "M4 5h12v10H4z", stroke: "currentColor", "stroke-width": "1.75", "stroke-linejoin": "round" }),
2372
- /* @__PURE__ */ n("path", { d: "M7 9l3 3 4-5", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })
2402
+ children: /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
2403
+ /* @__PURE__ */ a("path", { d: "M4 5h12v10H4z", stroke: "currentColor", "stroke-width": "1.75", "stroke-linejoin": "round" }),
2404
+ /* @__PURE__ */ a("path", { d: "M7 9l3 3 4-5", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })
2373
2405
  ] })
2374
2406
  }
2375
2407
  ),
2376
- /* @__PURE__ */ n("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: t("payment.popup_blocked_title", "Allow popups to continue") }),
2377
- /* @__PURE__ */ n("p", { class: "max-w-[18rem] text-xs leading-relaxed text-gray-500", children: t("payment.popup_blocked_message", "Your browser blocked the checkout tab. Click below to open it.") }),
2378
- /* @__PURE__ */ n(
2408
+ /* @__PURE__ */ a("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: e("payment.popup_blocked_title", "Allow popups to continue") }),
2409
+ /* @__PURE__ */ a("p", { class: "max-w-[18rem] text-xs leading-relaxed text-gray-500", children: e("payment.popup_blocked_message", "Your browser blocked the checkout tab. Click below to open it.") }),
2410
+ /* @__PURE__ */ a(
2379
2411
  "button",
2380
2412
  {
2381
2413
  type: "button",
2382
- onClick: e,
2414
+ onClick: t,
2383
2415
  class: "mt-1 rounded-xl px-4 py-2 text-xs font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
2384
2416
  style: {
2385
2417
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
2386
2418
  boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2387
2419
  },
2388
- children: t("payment.open_checkout_button", "Open checkout")
2420
+ children: e("payment.open_checkout_button", "Open checkout")
2389
2421
  }
2390
2422
  )
2391
2423
  ] });
2392
2424
  }
2393
- function or({
2394
- client: e,
2395
- onBack: t,
2425
+ function lr({
2426
+ client: t,
2427
+ onBack: e,
2396
2428
  onReopen: r,
2397
2429
  onRetry: i
2398
2430
  }) {
2399
- const { t: a } = v(), [o, s] = b(!1), [d, l] = b(!1), g = F(null);
2400
- E(() => () => {
2401
- g.current !== null && clearTimeout(g.current);
2431
+ const { t: n } = S(), [s, o] = v(!1), [c, l] = v(!1), p = F(null);
2432
+ j(() => () => {
2433
+ p.current !== null && clearTimeout(p.current);
2402
2434
  }, []);
2403
- const p = async () => {
2404
- if (!o) {
2405
- s(!0), l(!1);
2435
+ const u = async () => {
2436
+ if (!s) {
2437
+ o(!0), l(!1);
2406
2438
  try {
2407
- if ((await e.getUser({ force: !0 })).has_active_subscription) {
2439
+ if ((await t.getUser({ force: !0 })).has_active_subscription) {
2408
2440
  typeof window < "u" && window.postMessage({ type: "paywall_purchase" }, "*");
2409
2441
  return;
2410
2442
  }
2411
- l(!0), g.current !== null && clearTimeout(g.current), g.current = setTimeout(() => {
2412
- l(!1), g.current = null;
2443
+ l(!0), p.current !== null && clearTimeout(p.current), p.current = setTimeout(() => {
2444
+ l(!1), p.current = null;
2413
2445
  }, 5e3);
2414
2446
  } catch {
2415
2447
  l(!0);
2416
2448
  } finally {
2417
- s(!1);
2449
+ o(!1);
2418
2450
  }
2419
2451
  }
2420
2452
  };
2421
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-3 px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-5", children: [
2422
- /* @__PURE__ */ n(
2453
+ return /* @__PURE__ */ d("div", { class: "flex flex-col gap-3 px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-5", children: [
2454
+ /* @__PURE__ */ a(
2423
2455
  "button",
2424
2456
  {
2425
2457
  type: "button",
2426
- onClick: t,
2458
+ onClick: e,
2427
2459
  class: "-ml-1 self-start rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
2428
- children: a("nav.back", "← Back")
2460
+ children: n("nav.back", "← Back")
2429
2461
  }
2430
2462
  ),
2431
- /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2432
- /* @__PURE__ */ c("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
2433
- /* @__PURE__ */ n(
2463
+ /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2464
+ /* @__PURE__ */ d("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
2465
+ /* @__PURE__ */ a(
2434
2466
  "span",
2435
2467
  {
2436
2468
  class: "absolute inset-0 animate-ping rounded-full opacity-40",
@@ -2438,59 +2470,59 @@ function or({
2438
2470
  "aria-hidden": "true"
2439
2471
  }
2440
2472
  ),
2441
- /* @__PURE__ */ n("span", { class: "relative inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" })
2473
+ /* @__PURE__ */ a("span", { class: "relative inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" })
2442
2474
  ] }),
2443
- /* @__PURE__ */ n("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: a("payment.awaiting_title", "Complete payment in the new tab") }),
2444
- /* @__PURE__ */ n("p", { class: "max-w-[20rem] text-xs leading-relaxed text-gray-500", children: a(
2475
+ /* @__PURE__ */ a("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: n("payment.awaiting_title", "Complete payment in the new tab") }),
2476
+ /* @__PURE__ */ a("p", { class: "max-w-[20rem] text-xs leading-relaxed text-gray-500", children: n(
2445
2477
  "payment.awaiting_subtitle",
2446
2478
  "We'll detect your payment automatically — or click below once you're done."
2447
2479
  ) }),
2448
- /* @__PURE__ */ n(
2480
+ /* @__PURE__ */ a(
2449
2481
  "button",
2450
2482
  {
2451
2483
  type: "button",
2452
- onClick: p,
2453
- disabled: o,
2484
+ onClick: u,
2485
+ disabled: s,
2454
2486
  class: "mt-1 rounded-xl px-5 py-2.5 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:brightness-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
2455
2487
  style: {
2456
2488
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
2457
2489
  boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2458
2490
  },
2459
- children: o ? a("payment.checking", "Checking…") : a("payment.ive_paid", "I've paid")
2491
+ children: s ? n("payment.checking", "Checking…") : n("payment.ive_paid", "I've paid")
2460
2492
  }
2461
2493
  ),
2462
- d ? /* @__PURE__ */ n("p", { class: "text-xs leading-relaxed text-gray-500", children: a("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
2494
+ c ? /* @__PURE__ */ a("p", { class: "text-xs leading-relaxed text-gray-500", children: n("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
2463
2495
  ] }),
2464
- /* @__PURE__ */ c("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2465
- /* @__PURE__ */ n("p", { class: "text-xs leading-relaxed text-gray-600", children: a("payment.popup_help_text", "Checkout window didn't open or got blocked? Click here to open it again.") }),
2466
- /* @__PURE__ */ n(
2496
+ /* @__PURE__ */ d("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2497
+ /* @__PURE__ */ a("p", { class: "text-xs leading-relaxed text-gray-600", children: n("payment.popup_help_text", "Checkout window didn't open or got blocked? Click here to open it again.") }),
2498
+ /* @__PURE__ */ a(
2467
2499
  "button",
2468
2500
  {
2469
2501
  type: "button",
2470
2502
  onClick: r,
2471
2503
  class: "mt-2.5 w-full rounded-xl border border-gray-200 bg-white px-3 py-2 text-xs font-semibold text-gray-700 transition-colors hover:border-gray-300 hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
2472
- children: a("payment.open_checkout_again", "Open checkout again")
2504
+ children: n("payment.open_checkout_again", "Open checkout again")
2473
2505
  }
2474
2506
  )
2475
2507
  ] }),
2476
- /* @__PURE__ */ n(
2508
+ /* @__PURE__ */ a(
2477
2509
  "button",
2478
2510
  {
2479
2511
  type: "button",
2480
2512
  onClick: i,
2481
2513
  class: "self-center rounded-md px-2 py-1 text-xs text-gray-500 underline-offset-2 hover:text-gray-900 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
2482
- children: a("payment.tab_closed_retry", "Tab closed? Try again")
2514
+ children: n("payment.tab_closed_retry", "Tab closed? Try again")
2483
2515
  }
2484
2516
  )
2485
2517
  ] });
2486
2518
  }
2487
- function _t({
2488
- onContinue: e,
2489
- restored: t = !1
2519
+ function Se({
2520
+ onContinue: t,
2521
+ restored: e = !1
2490
2522
  }) {
2491
- const { t: r } = v();
2492
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2493
- /* @__PURE__ */ n(
2523
+ const { t: r } = S();
2524
+ return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2525
+ /* @__PURE__ */ a(
2494
2526
  "div",
2495
2527
  {
2496
2528
  class: "flex h-14 w-14 items-center justify-center rounded-full ring-8",
@@ -2501,7 +2533,7 @@ function _t({
2501
2533
  boxShadow: "0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"
2502
2534
  },
2503
2535
  "aria-hidden": "true",
2504
- children: /* @__PURE__ */ n("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ n(
2536
+ children: /* @__PURE__ */ a("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ a(
2505
2537
  "path",
2506
2538
  {
2507
2539
  d: "M5 13l4 4L19 7",
@@ -2513,16 +2545,16 @@ function _t({
2513
2545
  ) })
2514
2546
  }
2515
2547
  ),
2516
- /* @__PURE__ */ n("p", { id: "pw-title", class: "mt-1 text-lg font-semibold tracking-tight text-gray-900", children: t ? r("modal.purchase_restored_title", "Subscription restored") : r("modal.purchase_success_title", "Payment received") }),
2517
- /* @__PURE__ */ n("p", { class: "text-sm leading-relaxed text-gray-500", children: t ? r(
2548
+ /* @__PURE__ */ a("p", { id: "pw-title", class: "mt-1 text-lg font-semibold tracking-tight text-gray-900", children: e ? r("modal.purchase_restored_title", "Subscription restored") : r("modal.purchase_success_title", "Payment received") }),
2549
+ /* @__PURE__ */ a("p", { class: "text-sm leading-relaxed text-gray-500", children: e ? r(
2518
2550
  "modal.purchase_restored_subtitle",
2519
2551
  "Welcome back — your subscription is already active."
2520
2552
  ) : r("modal.purchase_success_subtitle", "Your subscription is now active.") }),
2521
- /* @__PURE__ */ n(
2553
+ /* @__PURE__ */ a(
2522
2554
  "button",
2523
2555
  {
2524
2556
  type: "button",
2525
- onClick: e,
2557
+ onClick: t,
2526
2558
  class: "mt-3 rounded-xl px-5 py-2.5 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
2527
2559
  style: {
2528
2560
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
@@ -2533,21 +2565,21 @@ function _t({
2533
2565
  )
2534
2566
  ] });
2535
2567
  }
2536
- const sr = 10 * 6e4, lr = 5e3, cr = 3e4;
2537
- class dr {
2538
- constructor(t) {
2568
+ const cr = 10 * 6e4, dr = 5e3, ur = 3e4;
2569
+ class pr {
2570
+ constructor(e) {
2539
2571
  this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
2540
- client: t.client,
2541
- onActive: t.onActive,
2542
- onTimeout: t.onTimeout ?? (() => {
2572
+ client: e.client,
2573
+ onActive: e.onActive,
2574
+ onTimeout: e.onTimeout ?? (() => {
2543
2575
  }),
2544
- timeoutMs: t.timeoutMs ?? sr,
2545
- visibleIntervalMs: t.visibleIntervalMs ?? lr,
2546
- hiddenIntervalMs: t.hiddenIntervalMs ?? cr
2576
+ timeoutMs: e.timeoutMs ?? cr,
2577
+ visibleIntervalMs: e.visibleIntervalMs ?? dr,
2578
+ hiddenIntervalMs: e.hiddenIntervalMs ?? ur
2547
2579
  };
2548
2580
  }
2549
2581
  start() {
2550
- this.stopped || typeof document > "u" || typeof window > "u" || (this.check(), this.scheduleNext(), this.visibilityHandler = () => this.handleVisibilityChange(), document.addEventListener("visibilitychange", this.visibilityHandler), this.focusHandler = () => void this.check(), window.addEventListener("focus", this.focusHandler), this.messageHandler = (t) => this.handleMessage(t), window.addEventListener("message", this.messageHandler), this.timeoutTimer = setTimeout(() => {
2582
+ this.stopped || typeof document > "u" || typeof window > "u" || (this.check(), this.scheduleNext(), this.visibilityHandler = () => this.handleVisibilityChange(), document.addEventListener("visibilitychange", this.visibilityHandler), this.focusHandler = () => void this.check(), window.addEventListener("focus", this.focusHandler), this.messageHandler = (e) => this.handleMessage(e), window.addEventListener("message", this.messageHandler), this.timeoutTimer = setTimeout(() => {
2551
2583
  this.stopped || (this.stop(), this.opts.onTimeout());
2552
2584
  }, this.opts.timeoutMs));
2553
2585
  }
@@ -2558,9 +2590,9 @@ class dr {
2558
2590
  if (!(this.stopped || this.checking)) {
2559
2591
  this.checking = !0;
2560
2592
  try {
2561
- const t = await this.opts.client.getUser({ force: !0 });
2593
+ const e = await this.opts.client.getUser({ force: !0 });
2562
2594
  if (this.stopped) return;
2563
- t.has_active_subscription && (this.stop(), this.opts.onActive(t));
2595
+ e.has_active_subscription && (this.stop(), this.opts.onActive(e));
2564
2596
  } catch {
2565
2597
  } finally {
2566
2598
  this.checking = !1;
@@ -2577,35 +2609,40 @@ class dr {
2577
2609
  handleVisibilityChange() {
2578
2610
  typeof document > "u" || (document.visibilityState === "visible" && this.check(), this.timer !== null && (clearTimeout(this.timer), this.timer = null), this.scheduleNext());
2579
2611
  }
2580
- handleMessage(t) {
2581
- const r = t.data;
2612
+ handleMessage(e) {
2613
+ const r = e.data;
2582
2614
  !r || typeof r != "object" || r.type === "paywall_purchase" && this.check();
2583
2615
  }
2584
2616
  }
2585
- function ur() {
2617
+ function hr() {
2586
2618
  return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
2587
2619
  }
2588
- const at = { open: !1, view: null, error: null }, $ = {
2620
+ const oe = {
2621
+ open: !1,
2622
+ view: null,
2623
+ error: null,
2624
+ processing: !1
2625
+ }, H = {
2589
2626
  status: "paywall_status",
2590
2627
  priceId: "paywall_price_id",
2591
2628
  sessionId: "paywall_session_id"
2592
2629
  };
2593
- class kr {
2594
- constructor(t) {
2595
- this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = at, this.stateListeners = /* @__PURE__ */ new Set();
2596
- const { auth: r, ownsAuth: i } = pr(t);
2597
- this.auth = r, this.ownsAuth = i, this.billing = t.client ?? new Ut({ ...t, auth: this.auth }), this.host = t.host, this.shadowMode = t.shadowMode ?? "closed", this.mountThenLoad = t.mountThenLoad ?? !0, this.inline = t.inline === !0, this.forceLocale = t.locale ?? null, this.userUnsub = this.billing.onUserChange((a) => {
2598
- this.emit("userChange", a);
2599
- }), this.auth && (this.authUnsub = this.auth.onAuthChange((a, o) => {
2600
- this.emit("authChange", { event: a, session: o });
2601
- })), this.initTracker(t.analytics), t.autoDetectReturn !== !1 && typeof window < "u" && queueMicrotask(() => this.checkReturn());
2602
- }
2603
- initTracker(t) {
2604
- if (t === !1) return;
2605
- const r = typeof t == "object" && t !== null ? t : {};
2630
+ class Cr {
2631
+ constructor(e) {
2632
+ this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = oe, this.stateListeners = /* @__PURE__ */ new Set();
2633
+ const { auth: r, ownsAuth: i } = gr(e);
2634
+ this.auth = r, this.ownsAuth = i, this.billing = e.client ?? new Ne({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((n) => {
2635
+ this.emit("userChange", n);
2636
+ }), this.auth && (this.authUnsub = this.auth.onAuthChange((n, s) => {
2637
+ this.emit("authChange", { event: n, session: s });
2638
+ })), this.initTracker(e.analytics), e.autoDetectReturn !== !1 && typeof window < "u" && queueMicrotask(() => this.checkReturn());
2639
+ }
2640
+ initTracker(e) {
2641
+ if (e === !1) return;
2642
+ const r = typeof e == "object" && e !== null ? e : {};
2606
2643
  if (r.enabled === !1) return;
2607
2644
  const i = r.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
2608
- this.tracker = new Dt({
2645
+ this.tracker = new He({
2609
2646
  endpoint: i,
2610
2647
  paywallId: this.billing.paywallId,
2611
2648
  capabilities: this.billing.capabilities,
@@ -2618,45 +2655,45 @@ class kr {
2618
2655
  sendBeacon: r.sendBeacon
2619
2656
  }), this.on("open", () => this.tracker?.track("paywall_opened")), this.on(
2620
2657
  "ready",
2621
- (a) => this.tracker?.track("paywall_viewed", {
2622
- is_test_mode: a.settings.is_test_mode,
2623
- prices_count: a.prices.length,
2624
- offers_count: a.offers.length
2658
+ (n) => this.tracker?.track("paywall_viewed", {
2659
+ is_test_mode: n.settings.is_test_mode,
2660
+ prices_count: n.prices.length,
2661
+ offers_count: n.offers.length
2625
2662
  })
2626
2663
  ), this.on(
2627
2664
  "price_selected",
2628
- (a) => this.tracker?.track("price_selected", { price_id: a.priceId })
2665
+ (n) => this.tracker?.track("price_selected", { price_id: n.priceId })
2629
2666
  ), this.on(
2630
2667
  "checkout_started",
2631
- (a) => this.tracker?.track("checkout_started", {
2632
- price_id: a.priceId,
2633
- acquiring: a.acquiring
2668
+ (n) => this.tracker?.track("checkout_started", {
2669
+ price_id: n.priceId,
2670
+ acquiring: n.acquiring
2634
2671
  })
2635
2672
  ), this.on(
2636
2673
  "purchase_completed",
2637
- (a) => this.tracker?.track("purchase_completed", {
2638
- price_id: a.priceId,
2639
- session_id: a.sessionId
2674
+ (n) => this.tracker?.track("purchase_completed", {
2675
+ price_id: n.priceId,
2676
+ session_id: n.sessionId
2640
2677
  })
2641
2678
  ), this.on(
2642
2679
  "purchase_failed",
2643
- (a) => this.tracker?.track("purchase_failed", { reason: a.reason })
2680
+ (n) => this.tracker?.track("purchase_failed", { reason: n.reason })
2644
2681
  ), this.on("close", () => this.tracker?.track("paywall_closed")), this.on(
2645
2682
  "trial_blocked",
2646
- (a) => this.tracker?.track("trial_blocked", {
2647
- mode: a.mode,
2648
- ...a.mode === "time" ? { remaining_ms: a.remainingMs, total_ms: a.totalMs } : a.mode === "opens" ? { remaining_actions: a.remainingActions, total_actions: a.totalActions } : {}
2683
+ (n) => this.tracker?.track("trial_blocked", {
2684
+ mode: n.mode,
2685
+ ...n.mode === "time" ? { remaining_ms: n.remainingMs, total_ms: n.totalMs } : n.mode === "opens" ? { remaining_actions: n.remainingActions, total_actions: n.totalActions } : {}
2649
2686
  })
2650
2687
  ), this.on("trial_expired", () => this.tracker?.track("trial_expired")), this.on(
2651
2688
  "visibility_blocked",
2652
- (a) => this.tracker?.track("visibility_blocked", {
2653
- reason: a.reason,
2654
- country: a.country,
2655
- tier: a.tier
2689
+ (n) => this.tracker?.track("visibility_blocked", {
2690
+ reason: n.reason,
2691
+ country: n.country,
2692
+ tier: n.tier
2656
2693
  })
2657
2694
  ), this.on(
2658
2695
  "error",
2659
- (a) => this.tracker?.track("error", { code: a.code, message: a.message })
2696
+ (n) => this.tracker?.track("error", { code: n.code, message: n.message })
2660
2697
  );
2661
2698
  }
2662
2699
  /**
@@ -2668,16 +2705,16 @@ class kr {
2668
2705
  * Самый частый кейс — `track('app_opened')` от хоста сразу после загрузки
2669
2706
  * приложения, чтобы зафиксировать воронку до открытия пейвола.
2670
2707
  */
2671
- track(t, r) {
2672
- this.tracker?.track(t, r);
2708
+ track(e, r) {
2709
+ this.tracker?.track(e, r);
2673
2710
  }
2674
2711
  /**
2675
2712
  * Удобный шорткат вместо `paywall.on('userChange', cb)` — самый частый
2676
2713
  * паттерн в host-коде, поэтому отдельный named метод. Колбек получает
2677
2714
  * last-known user из кеша синхронно через microtask, если он есть.
2678
2715
  */
2679
- onUserChange(t) {
2680
- return this.on("userChange", t);
2716
+ onUserChange(e) {
2717
+ return this.on("userChange", e);
2681
2718
  }
2682
2719
  /**
2683
2720
  * Заменить cachedBootstrap живыми данными — для preview-режима в редакторе
@@ -2689,8 +2726,8 @@ class kr {
2689
2726
  * работает и в production-режиме, но конкуренция с revalidate'ом из сети
2690
2727
  * почти всегда нежелательна.
2691
2728
  */
2692
- setBootstrap(t) {
2693
- this.billing.setBootstrap(t);
2729
+ setBootstrap(e) {
2730
+ this.billing.setBootstrap(e);
2694
2731
  }
2695
2732
  /**
2696
2733
  * Сменить force-locale на лету — для live-preview редактора админки, когда
@@ -2700,30 +2737,30 @@ class kr {
2700
2737
  * Передай `null`/`undefined`, чтобы вернуть автоматическую резолв-логику
2701
2738
  * (navigator.language → locale_default).
2702
2739
  */
2703
- setLocale(t) {
2704
- const r = t ?? null;
2740
+ setLocale(e) {
2741
+ const r = e ?? null;
2705
2742
  r !== this.forceLocale && (this.forceLocale = r, this.handle && this.handle.update({ locale: r }));
2706
2743
  }
2707
- on(t, r) {
2708
- let i = this.listeners.get(t);
2709
- return i || (i = /* @__PURE__ */ new Set(), this.listeners.set(t, i)), i.add(r), () => i.delete(r);
2744
+ on(e, r) {
2745
+ let i = this.listeners.get(e);
2746
+ return i || (i = /* @__PURE__ */ new Set(), this.listeners.set(e, i)), i.add(r), () => i.delete(r);
2710
2747
  }
2711
- off(t, r) {
2712
- this.listeners.get(t)?.delete(r);
2748
+ off(e, r) {
2749
+ this.listeners.get(e)?.delete(r);
2713
2750
  }
2714
- emit(t, ...r) {
2715
- const i = this.listeners.get(t);
2751
+ emit(e, ...r) {
2752
+ const i = this.listeners.get(e);
2716
2753
  if (!i) return;
2717
- const a = r[0];
2718
- for (const o of i)
2754
+ const n = r[0];
2755
+ for (const s of i)
2719
2756
  try {
2720
- o(a);
2721
- } catch (s) {
2722
- typeof console < "u" && console.error("[paywall] listener error", s);
2757
+ s(n);
2758
+ } catch (o) {
2759
+ typeof console < "u" && console.error("[paywall] listener error", o);
2723
2760
  }
2724
2761
  }
2725
- open(t = {}) {
2726
- this.openInternal("layout", t);
2762
+ open(e = {}) {
2763
+ this.openInternal("layout", e);
2727
2764
  }
2728
2765
  /**
2729
2766
  * Прогревает bootstrap-кеш и balance-кеш заранее, без открытия модалки.
@@ -2737,9 +2774,9 @@ class kr {
2737
2774
  * Вызывать можно сколько угодно раз — последующие вызовы возвращают cached
2738
2775
  * Promise (BillingClient уже дедуплицирует).
2739
2776
  */
2740
- async preload(t = {}) {
2777
+ async preload(e = {}) {
2741
2778
  try {
2742
- await this.billing.bootstrap({ signal: t.signal }), this.billing.auth && await this.billing.getBalances({ signal: t.signal });
2779
+ await this.billing.bootstrap({ signal: e.signal }), this.billing.auth && await this.billing.getBalances({ signal: e.signal });
2743
2780
  } catch {
2744
2781
  }
2745
2782
  }
@@ -2753,8 +2790,8 @@ class kr {
2753
2790
  * Contact Support-ссылку в `current_session`-блоке (там Back возвращает
2754
2791
  * к layout).
2755
2792
  */
2756
- openSupport(t = {}) {
2757
- this.openInternal("support", t);
2793
+ openSupport(e = {}) {
2794
+ this.openInternal("support", e);
2758
2795
  }
2759
2796
  /**
2760
2797
  * Открывает модалку сразу с auth-gate (логин/регистрация), без layout с
@@ -2768,8 +2805,8 @@ class kr {
2768
2805
  *
2769
2806
  * Триал не блокирует этот флоу — auth не connect'ится с trial-механикой.
2770
2807
  */
2771
- openAuth(t = {}) {
2772
- this.auth && this.openInternal("auth", { ...t, skipTrial: !0 });
2808
+ openAuth(e = {}) {
2809
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0 });
2773
2810
  }
2774
2811
  /**
2775
2812
  * Шорткат над `openAuth()` — открывает модалку сразу на signin-форме.
@@ -2779,8 +2816,8 @@ class kr {
2779
2816
  * - `paywall.openSignup()` — «новая регистрация»
2780
2817
  * Без managed-auth — no-op.
2781
2818
  */
2782
- openSignin(t = {}) {
2783
- this.auth && this.openInternal("auth", { ...t, skipTrial: !0, authMode: "signin" });
2819
+ openSignin(e = {}) {
2820
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signin" });
2784
2821
  }
2785
2822
  /**
2786
2823
  * Открывает модалку с auth-gate сразу в режиме регистрации (signup-mode
@@ -2789,8 +2826,190 @@ class kr {
2789
2826
  * соблюдается admin-конфиг.
2790
2827
  * Без managed-auth — no-op.
2791
2828
  */
2792
- openSignup(t = {}) {
2793
- this.auth && this.openInternal("auth", { ...t, skipTrial: !0, authMode: "signup" });
2829
+ openSignup(e = {}) {
2830
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signup" });
2831
+ }
2832
+ /**
2833
+ * Direct-checkout: создать checkout-URL по конкретной цене и сразу открыть
2834
+ * платёжного провайдера, минуя layout с тарифами. Полезно когда
2835
+ * host-приложение рендерит pricing-карточки/таблицу собственным UI и
2836
+ * хочет, чтобы клик по «Buy / Get this plan» вёл прямо в Stripe/Paddle.
2837
+ *
2838
+ * **Late-mount UX.** В отличие от `open()`, модалка не появляется во время
2839
+ * фоновой работы (bootstrap + visibility/trial gates + createCheckout).
2840
+ * Хост на этой фазе показывает busy-state прямо на своей кнопке (через
2841
+ * `state.processing === true` из `paywall.getState()` — или автоматически
2842
+ * через `<PaywallButton priceId>` в sdk-react). Модалка монтируется
2843
+ * ТОЛЬКО когда реально нужна UI:
2844
+ * - `checkout_mode='preauth'` + managed-auth + не залогинен → auth-gate
2845
+ * (форма signin'а); после успеха auto-resume в createCheckout.
2846
+ * - popup провайдера заблокирован браузером → popup_blocked view с
2847
+ * retry-кнопкой под fresh user gesture.
2848
+ * - popup открылся успешно → awaiting_payment view (индикатор «оплати
2849
+ * в новой вкладке» + I've paid).
2850
+ *
2851
+ * Что эмитится без модалки:
2852
+ * - `purchase_completed{restored:true, priceId}` когда юзер уже подписан
2853
+ * (cached user, fresh bootstrap, или 409 hasActivePurchase от бэка) —
2854
+ * headless reject;
2855
+ * - `error` когда createCheckout упал или identity.email отсутствует;
2856
+ * - `visibility_blocked` / `trial_blocked` — стандартные gate-эвенты.
2857
+ *
2858
+ * Что эмитится одновременно с модалкой:
2859
+ * - `checkout_started{priceId, url, acquiring}` ровно когда headless URL
2860
+ * получен, ДО mount'а awaiting_payment/popup_blocked.
2861
+ *
2862
+ * Offer (countdown-скидка) автоматически резолвится из cached offers'ов
2863
+ * через `getOfferForPrice(priceId)` и передаётся в createCheckout как
2864
+ * `offerId` — чтобы duration_minutes-офферы тоже применились на бэке
2865
+ * (для них нет server-side таймера, без явного offer-id скидка теряется).
2866
+ *
2867
+ * Требования:
2868
+ * - `identity.email` должен быть выставлен (через `opts.identity`, либо
2869
+ * managed-auth, либо ранний `setIdentity`/`paywall.open({identity})`).
2870
+ * Без email бэк `/start-checkout` 400'нёт; SDK эмитнет `error`.
2871
+ * - В `checkout_mode='preauth'` без managed-auth — backend требует
2872
+ * email-юзера; убедись что `identity.email` явно задан.
2873
+ *
2874
+ * Без модалки совсем (когда host рендерит свой awaiting-payment экран) —
2875
+ * используй `paywall.billing.createCheckout({priceId, offerId})` напрямую,
2876
+ * но тогда auth-gate / popup_blocked / awaiting_payment придётся рисовать
2877
+ * самостоятельно.
2878
+ */
2879
+ checkout(e, r = {}) {
2880
+ if (r.identity && this.billing.setIdentity(r.identity), r.renew !== !0 && this.billing.getCachedUser()?.has_active_subscription) {
2881
+ this.emit("purchase_completed", {
2882
+ priceId: e,
2883
+ sessionId: null,
2884
+ restored: !0
2885
+ });
2886
+ return;
2887
+ }
2888
+ this.runDirectCheckout(e, r);
2889
+ }
2890
+ /** Headless prep-work для `checkout(priceId, opts)`: bootstrap → gates →
2891
+ * preauth check → createCheckout → mount модалки с финальным view.
2892
+ * Вынесено отдельным методом ради чистого async/await flow вместо вложенных
2893
+ * then-chain'ов (5+ ветвей). Любая ошибка не пробрасывается наружу: эмитим
2894
+ * через `paywall.emit('error')` и выходим — host подписан на `error`-event. */
2895
+ async runDirectCheckout(e, r) {
2896
+ const i = r.renew === !0, n = r.skipTrial === !0, s = r.skipVisibility === !0;
2897
+ this.applyProcessing(!0);
2898
+ const o = () => {
2899
+ this.applyProcessing(!1);
2900
+ };
2901
+ let c;
2902
+ try {
2903
+ c = await this.billing.bootstrap();
2904
+ } catch (w) {
2905
+ const A = w instanceof L ? w : new L("unknown", "Failed to load paywall", { cause: w });
2906
+ this.emit("error", A), o();
2907
+ return;
2908
+ }
2909
+ if (!s) {
2910
+ const w = c.settings.visibility;
2911
+ if (w && (this.lastVisibility = w, !w.visible)) {
2912
+ this.emit("visibility_blocked", w), o();
2913
+ return;
2914
+ }
2915
+ }
2916
+ if (!n && await this.checkTrialBeforeCheckout(c)) {
2917
+ o();
2918
+ return;
2919
+ }
2920
+ if (!i && c.user?.has_active_subscription) {
2921
+ this.emit("purchase_completed", {
2922
+ priceId: e,
2923
+ sessionId: null,
2924
+ restored: !0
2925
+ }), o();
2926
+ return;
2927
+ }
2928
+ const l = c.settings.checkout_mode ?? "guest", p = this.auth?.getCachedSession() ?? null, u = !!p && !p.user.is_anonymous;
2929
+ if (l === "preauth" && !!this.auth && !u) {
2930
+ this.purchased = !1, this.mountAndShow("auth", {
2931
+ renew: i,
2932
+ authMode: "signin",
2933
+ checkoutPriceId: e
2934
+ });
2935
+ return;
2936
+ }
2937
+ const _ = this.getOfferForPrice(e);
2938
+ let h;
2939
+ try {
2940
+ h = await this.billing.createCheckout({
2941
+ priceId: e,
2942
+ offerId: _?.offer.id,
2943
+ ignoreActivePurchase: i
2944
+ });
2945
+ } catch (w) {
2946
+ if (w instanceof L && w.code === "already_purchased") {
2947
+ try {
2948
+ await this.billing.getUser({ force: !0 });
2949
+ } catch {
2950
+ }
2951
+ this.emit("purchase_completed", {
2952
+ priceId: e,
2953
+ sessionId: null,
2954
+ restored: !0
2955
+ }), o();
2956
+ return;
2957
+ }
2958
+ const A = w instanceof L ? w : new L("checkout_failed", "Checkout failed", { cause: w });
2959
+ this.emit("error", A), o();
2960
+ return;
2961
+ }
2962
+ if (this.emit("checkout_started", {
2963
+ priceId: e,
2964
+ url: h.url,
2965
+ acquiring: h.acquiring
2966
+ }), this.startUserWatcher(), typeof window > "u" || !h.url) {
2967
+ this.mountAndShow("awaiting_payment", {
2968
+ renew: i,
2969
+ checkoutPriceId: e,
2970
+ checkoutUrl: h.url
2971
+ });
2972
+ return;
2973
+ }
2974
+ const k = window.open(h.url, "_blank");
2975
+ if (this.purchased = !1, k) {
2976
+ try {
2977
+ k.opener = null;
2978
+ } catch {
2979
+ }
2980
+ this.mountAndShow("awaiting_payment", {
2981
+ renew: i,
2982
+ checkoutPriceId: e,
2983
+ checkoutUrl: h.url
2984
+ });
2985
+ } else
2986
+ this.mountAndShow("popup_blocked", {
2987
+ renew: i,
2988
+ checkoutPriceId: e,
2989
+ checkoutUrl: h.url
2990
+ });
2991
+ }
2992
+ /** Trial-check без mount'а (для late-mount direct-checkout). Возвращает
2993
+ * true если trial заблокировал — caller должен прекратить flow. На любой
2994
+ * storage-ошибке log+продолжаем (не блокируем продажу). */
2995
+ async checkTrialBeforeCheckout(e) {
2996
+ const r = e.settings.trial;
2997
+ if (!r) return !1;
2998
+ const i = this.ensureTrialStore(r);
2999
+ try {
3000
+ const n = await i.check();
3001
+ if (this.lastTrialStatus = n, n.mode === "none") return !1;
3002
+ if (n.blocked) {
3003
+ const s = await i.recordBlock();
3004
+ return this.lastTrialStatus = s, this.emit("trial_blocked", s), !0;
3005
+ }
3006
+ return this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), !1;
3007
+ } catch (n) {
3008
+ return typeof console < "u" && console.warn("[paywall] trial check failed", n), !1;
3009
+ }
3010
+ }
3011
+ applyProcessing(e) {
3012
+ this.currentState.processing !== e && this.applyState({ ...this.currentState, processing: e });
2794
3013
  }
2795
3014
  /**
2796
3015
  * Headless anonymous signin без открытия модалки. Внутри:
@@ -2805,148 +3024,154 @@ class kr {
2805
3024
  */
2806
3025
  signInAnonymously() {
2807
3026
  return this.auth ? this.auth.signInAnonymously() : Promise.reject(
2808
- new O(
3027
+ new L(
2809
3028
  "invalid_config",
2810
3029
  "signInAnonymously requires managed-auth. Pass `auth: true` to PaywallUI."
2811
3030
  )
2812
3031
  );
2813
3032
  }
2814
- openInternal(t, r) {
3033
+ openInternal(e, r) {
2815
3034
  r.identity && this.billing.setIdentity(r.identity), this.purchased = !1;
2816
- const i = r.skipTrial === !0 || t === "support", a = r.skipVisibility === !0 || t === "support" || t === "auth", o = r.renew === !0;
2817
- if (i && a) {
2818
- this.mountAndShow(t, { renew: o, authMode: r.authMode });
3035
+ const i = r.skipTrial === !0 || e === "support", n = r.skipVisibility === !0 || e === "support" || e === "auth", s = r.renew === !0;
3036
+ if (i && n) {
3037
+ this.mountAndShow(e, { renew: s, authMode: r.authMode });
2819
3038
  return;
2820
3039
  }
2821
- const s = this.billing.getCachedBootstrap();
2822
- if (s) {
2823
- this.runOpenGates(t, s, { skipTrial: i, skipVisibility: a, renew: o });
3040
+ const o = this.billing.getCachedBootstrap();
3041
+ if (o) {
3042
+ this.runOpenGates(e, o, { skipTrial: i, skipVisibility: n, renew: s });
2824
3043
  return;
2825
3044
  }
2826
3045
  if (this.mountThenLoad) {
2827
- this.mountAndShow(t, { renew: o }), this.billing.bootstrap().then((d) => this.runDelayedGates(d, { skipTrial: i, skipVisibility: a })).catch(() => {
3046
+ this.mountAndShow(e, { renew: s }), this.billing.bootstrap().then((c) => this.runDelayedGates(c, { skipTrial: i, skipVisibility: n })).catch(() => {
2828
3047
  });
2829
3048
  return;
2830
3049
  }
2831
- this.billing.bootstrap().then((d) => this.runOpenGates(t, d, { skipTrial: i, skipVisibility: a, renew: o })).catch(() => {
2832
- this.mountAndShow(t, { renew: o });
3050
+ this.billing.bootstrap().then(
3051
+ (c) => this.runOpenGates(e, c, { skipTrial: i, skipVisibility: n, renew: s })
3052
+ ).catch(() => {
3053
+ this.mountAndShow(e, { renew: s });
2833
3054
  });
2834
3055
  }
2835
3056
  /** Применить gates ПОСЛЕ того, как модалка уже смонтирована (mount-then-load
2836
3057
  * путь). Если gate блокирует — close() + emit. Если юзер уже сам закрыл
2837
3058
  * модалку до резолва bootstrap'а — no-op (isOpen=false). */
2838
- runDelayedGates(t, r) {
3059
+ runDelayedGates(e, r) {
2839
3060
  if (!this.isOpen) return;
2840
3061
  if (!r.skipVisibility) {
2841
- const o = t.settings.visibility;
2842
- if (o && (this.lastVisibility = o, !o.visible)) {
2843
- this.close(), this.emit("visibility_blocked", o);
3062
+ const s = e.settings.visibility;
3063
+ if (s && (this.lastVisibility = s, !s.visible)) {
3064
+ this.close(), this.emit("visibility_blocked", s);
2844
3065
  return;
2845
3066
  }
2846
3067
  }
2847
3068
  if (r.skipTrial) return;
2848
- const i = t.settings.trial;
3069
+ const i = e.settings.trial;
2849
3070
  if (!i) return;
2850
- const a = this.ensureTrialStore(i);
2851
- a.check().then(async (o) => {
2852
- if (this.isOpen && (this.lastTrialStatus = o, o.mode !== "none")) {
2853
- if (o.blocked) {
2854
- const s = await a.recordBlock();
2855
- if (this.lastTrialStatus = s, !this.isOpen) return;
2856
- this.close(), this.emit("trial_blocked", s);
3071
+ const n = this.ensureTrialStore(i);
3072
+ n.check().then(async (s) => {
3073
+ if (this.isOpen && (this.lastTrialStatus = s, s.mode !== "none")) {
3074
+ if (s.blocked) {
3075
+ const o = await n.recordBlock();
3076
+ if (this.lastTrialStatus = o, !this.isOpen) return;
3077
+ this.close(), this.emit("trial_blocked", o);
2857
3078
  return;
2858
3079
  }
2859
3080
  this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired"));
2860
3081
  }
2861
- }).catch((o) => {
2862
- typeof console < "u" && console.warn("[paywall] trial check failed", o);
3082
+ }).catch((s) => {
3083
+ typeof console < "u" && console.warn("[paywall] trial check failed", s);
2863
3084
  });
2864
3085
  }
2865
3086
  // Порядок гейтов: visibility → trial. Country-mismatch ≠ trial-block, и
2866
3087
  // вести trial-стейт «осталось N показов» под юзером, который вообще не
2867
3088
  // должен увидеть пейвол по таргетингу — бессмысленно: при возврате в
2868
3089
  // правильную страну он окажется со «слипшимся» триал-счётчиком.
2869
- runOpenGates(t, r, i) {
3090
+ runOpenGates(e, r, i) {
2870
3091
  if (!i.skipVisibility) {
2871
- const a = r.settings.visibility;
2872
- if (a && (this.lastVisibility = a, !a.visible)) {
2873
- this.emit("visibility_blocked", a);
3092
+ const n = r.settings.visibility;
3093
+ if (n && (this.lastVisibility = n, !n.visible)) {
3094
+ this.emit("visibility_blocked", n);
2874
3095
  return;
2875
3096
  }
2876
3097
  }
2877
3098
  if (i.skipTrial) {
2878
- this.mountAndShow(t, { renew: i.renew });
3099
+ this.mountAndShow(e, { renew: i.renew });
2879
3100
  return;
2880
3101
  }
2881
- this.gateThroughTrial(t, r, i.renew);
3102
+ this.gateThroughTrial(e, r, i.renew);
2882
3103
  }
2883
- gateThroughTrial(t, r, i) {
2884
- const a = r.settings.trial;
2885
- if (!a) {
2886
- this.mountAndShow(t, { renew: i });
3104
+ gateThroughTrial(e, r, i) {
3105
+ const n = r.settings.trial;
3106
+ if (!n) {
3107
+ this.mountAndShow(e, { renew: i });
2887
3108
  return;
2888
3109
  }
2889
- const o = this.ensureTrialStore(a);
2890
- o.check().then(async (s) => {
2891
- if (this.lastTrialStatus = s, s.mode === "none") {
2892
- this.mountAndShow(t, { renew: i });
3110
+ const s = this.ensureTrialStore(n);
3111
+ s.check().then(async (o) => {
3112
+ if (this.lastTrialStatus = o, o.mode === "none") {
3113
+ this.mountAndShow(e, { renew: i });
2893
3114
  return;
2894
3115
  }
2895
- if (s.blocked) {
2896
- const d = await o.recordBlock();
2897
- this.lastTrialStatus = d, this.emit("trial_blocked", d);
3116
+ if (o.blocked) {
3117
+ const c = await s.recordBlock();
3118
+ this.lastTrialStatus = c, this.emit("trial_blocked", c);
2898
3119
  return;
2899
3120
  }
2900
- this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), this.mountAndShow(t, { renew: i });
2901
- }).catch((s) => {
2902
- typeof console < "u" && console.warn("[paywall] trial check failed", s), this.mountAndShow(t, { renew: i });
3121
+ this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), this.mountAndShow(e, { renew: i });
3122
+ }).catch((o) => {
3123
+ typeof console < "u" && console.warn("[paywall] trial check failed", o), this.mountAndShow(e, { renew: i });
2903
3124
  });
2904
3125
  }
2905
- ensureTrialStore(t) {
2906
- if (this.trialStore && this.trialStoreConfig && fr(this.trialStoreConfig, t))
3126
+ ensureTrialStore(e) {
3127
+ if (this.trialStore && this.trialStoreConfig && mr(this.trialStoreConfig, e))
2907
3128
  return this.trialStore;
2908
- this.trialStoreConfig = t;
3129
+ this.trialStoreConfig = e;
2909
3130
  const r = this.billing.createTrialStore;
2910
- return this.trialStore = typeof r == "function" ? r.call(this.billing, t) : Zt(this.billing.getStorage(), this.billing.paywallId, t), this.trialStore;
3131
+ return this.trialStore = typeof r == "function" ? r.call(this.billing, e) : Ye(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
2911
3132
  }
2912
- mountAndShow(t, r = {}) {
2913
- const i = r.renew === !0, a = r.authMode;
3133
+ mountAndShow(e, r = {}) {
3134
+ const i = r.renew === !0, n = r.authMode, o = e === "auth" || e === "awaiting_payment" || e === "popup_blocked" ? r.checkoutPriceId ?? null : null, c = e === "awaiting_payment" || e === "popup_blocked" ? r.checkoutUrl ?? null : null;
2914
3135
  if (this.handle) {
2915
3136
  this.isOpen = !0, this.handle.update({
2916
3137
  open: !0,
2917
- initialView: t,
2918
- initialAuthMode: a,
3138
+ initialView: e,
3139
+ initialAuthMode: n,
3140
+ initialCheckoutPriceId: o,
3141
+ initialCheckoutUrl: c,
2919
3142
  purchased: !1,
2920
3143
  renew: i
2921
3144
  }), this.emit("open");
2922
3145
  return;
2923
3146
  }
2924
- this.isOpen = !0, this.handle = Yt(
2925
- rr,
3147
+ this.isOpen = !0, this.handle = Je(
3148
+ nr,
2926
3149
  {
2927
3150
  client: this.billing,
2928
3151
  open: !0,
2929
- initialView: t,
2930
- initialAuthMode: a,
3152
+ initialView: e,
3153
+ initialAuthMode: n,
3154
+ initialCheckoutPriceId: o,
3155
+ initialCheckoutUrl: c,
2931
3156
  purchased: !1,
2932
3157
  renew: i,
2933
3158
  onClose: () => this.close(),
2934
- onEvent: (o, s) => {
2935
- this.emit(o, s), o === "checkout_started" && this.startUserWatcher();
3159
+ onEvent: (l, p) => {
3160
+ this.emit(l, p), l === "checkout_started" && this.startUserWatcher();
2936
3161
  },
2937
- onState: (o) => this.applyState(o),
3162
+ onState: (l) => this.applyState(l),
2938
3163
  inline: this.inline,
2939
3164
  locale: this.forceLocale
2940
3165
  },
2941
3166
  { host: this.host, shadowMode: this.shadowMode, inline: this.inline }
2942
3167
  ), this.emit("open");
2943
3168
  }
2944
- applyState(t) {
2945
- if (!gr(this.currentState, t)) {
2946
- this.currentState = t;
3169
+ applyState(e) {
3170
+ if (!wr(this.currentState, e)) {
3171
+ this.currentState = e;
2947
3172
  for (const r of this.stateListeners)
2948
3173
  try {
2949
- r(t);
3174
+ r(e);
2950
3175
  } catch (i) {
2951
3176
  console.warn("[paywall] onStateChange listener threw", i);
2952
3177
  }
@@ -2973,24 +3198,24 @@ class kr {
2973
3198
  *
2974
3199
  * Возвращает unsubscribe.
2975
3200
  */
2976
- onStateChange(t, r = {}) {
2977
- this.stateListeners.add(t);
3201
+ onStateChange(e, r = {}) {
3202
+ this.stateListeners.add(e);
2978
3203
  const i = r.immediate ?? "microtask";
2979
3204
  if (i !== "none") {
2980
- const a = this.currentState;
3205
+ const n = this.currentState;
2981
3206
  if (i === "sync")
2982
3207
  try {
2983
- t(a);
2984
- } catch (o) {
2985
- console.warn("[paywall] onStateChange initial sync threw", o);
3208
+ e(n);
3209
+ } catch (s) {
3210
+ console.warn("[paywall] onStateChange initial sync threw", s);
2986
3211
  }
2987
3212
  else
2988
3213
  queueMicrotask(() => {
2989
- this.stateListeners.has(t) && t(a);
3214
+ this.stateListeners.has(e) && e(n);
2990
3215
  });
2991
3216
  }
2992
3217
  return () => {
2993
- this.stateListeners.delete(t);
3218
+ this.stateListeners.delete(e);
2994
3219
  };
2995
3220
  }
2996
3221
  /** Sync-доступ к последнему известному статусу триала. null — `paywall.open()`
@@ -3013,8 +3238,8 @@ class kr {
3013
3238
  * pricing-страниц/карточек на сайте, где host хочет показать те же цены,
3014
3239
  * что и в модалке, не вытаскивая bootstrap руками.
3015
3240
  */
3016
- getPrices(t = {}) {
3017
- return this.billing.getPrices(t);
3241
+ getPrices(e = {}) {
3242
+ return this.billing.getPrices(e);
3018
3243
  }
3019
3244
  /** Sync-снимок цен. null — bootstrap ещё не загружали. */
3020
3245
  getCachedPrices() {
@@ -3041,13 +3266,13 @@ class kr {
3041
3266
  * этого использовать React-хук `usePaywallOffer(priceId)` из sdk-react
3042
3267
  * либо обёртку поверх `setInterval(1000)` + повторный вызов этого метода.
3043
3268
  */
3044
- getOfferForPrice(t) {
3269
+ getOfferForPrice(e) {
3045
3270
  const r = this.billing.getCachedOffers();
3046
3271
  if (!r) return null;
3047
- const i = H(r, t);
3048
- return i ? Nt(i, {
3272
+ const i = N(r, e);
3273
+ return i ? $e(i, {
3049
3274
  now: Date.now(),
3050
- readStart: $t
3275
+ readStart: Ve
3051
3276
  }) : null;
3052
3277
  }
3053
3278
  /** Снимок текущего «языка юзера» — proxy над `billing.getUserLanguage()`.
@@ -3077,25 +3302,25 @@ class kr {
3077
3302
  * `getVisibility()` / `getTrialStatus()` видели свежие данные после первого
3078
3303
  * `getAccess()`, а не только после первого `open()`.
3079
3304
  */
3080
- async getAccess(t = {}) {
3305
+ async getAccess(e = {}) {
3081
3306
  let r = this.billing.getCachedBootstrap();
3082
3307
  if (!r)
3083
3308
  try {
3084
- r = await this.billing.bootstrap({ signal: t.signal });
3309
+ r = await this.billing.bootstrap({ signal: e.signal });
3085
3310
  } catch {
3086
- const s = this.billing.getCachedUser();
3087
- return s?.has_active_subscription ? {
3311
+ const o = this.billing.getCachedUser();
3312
+ return o?.has_active_subscription ? {
3088
3313
  access: "granted",
3089
3314
  reason: "has_subscription",
3090
3315
  visibility: null,
3091
3316
  trial: null,
3092
- user: s
3317
+ user: o
3093
3318
  } : {
3094
3319
  access: "blocked",
3095
3320
  reason: "no_subscription",
3096
3321
  visibility: null,
3097
3322
  trial: null,
3098
- user: s
3323
+ user: o
3099
3324
  };
3100
3325
  }
3101
3326
  const i = r.user ?? null;
@@ -3107,24 +3332,24 @@ class kr {
3107
3332
  trial: null,
3108
3333
  user: i
3109
3334
  };
3110
- let a = null;
3111
- if (!t.skipVisibility) {
3112
- const s = r.settings.visibility;
3113
- if (s && (a = s, this.lastVisibility = s, !s.visible))
3114
- return { access: "granted", reason: "visibility_blocked", visibility: a, trial: null, user: i };
3335
+ let n = null;
3336
+ if (!e.skipVisibility) {
3337
+ const o = r.settings.visibility;
3338
+ if (o && (n = o, this.lastVisibility = o, !o.visible))
3339
+ return { access: "granted", reason: "visibility_blocked", visibility: n, trial: null, user: i };
3115
3340
  }
3116
- let o = null;
3117
- if (!t.skipTrial) {
3118
- const s = r.settings.trial;
3119
- if (s)
3341
+ let s = null;
3342
+ if (!e.skipTrial) {
3343
+ const o = r.settings.trial;
3344
+ if (o)
3120
3345
  try {
3121
- if (o = await this.ensureTrialStore(s).check(), this.lastTrialStatus = o, o.blocked)
3122
- return { access: "granted", reason: "trial_blocked", visibility: a, trial: o, user: i };
3123
- } catch (d) {
3124
- typeof console < "u" && console.warn("[paywall] getAccess: trial check failed", d);
3346
+ if (s = await this.ensureTrialStore(o).check(), this.lastTrialStatus = s, s.blocked)
3347
+ return { access: "granted", reason: "trial_blocked", visibility: n, trial: s, user: i };
3348
+ } catch (c) {
3349
+ typeof console < "u" && console.warn("[paywall] getAccess: trial check failed", c);
3125
3350
  }
3126
3351
  }
3127
- return { access: "blocked", reason: "no_subscription", visibility: a, trial: o, user: i };
3352
+ return { access: "blocked", reason: "no_subscription", visibility: n, trial: s, user: i };
3128
3353
  }
3129
3354
  /** Сбросить состояние триала в storage. Полезно для дев-режима / админ-кнопки
3130
3355
  * «прогнать сценарий заново». В проде хост обычно не дёргает. */
@@ -3138,9 +3363,9 @@ class kr {
3138
3363
  // В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
3139
3364
  // bootstrap при следующем открытии.
3140
3365
  startUserWatcher() {
3141
- this.watcher || ur() && (this.watcher = new dr({
3366
+ this.watcher || hr() && (this.watcher = new pr({
3142
3367
  client: this.billing,
3143
- onActive: (t) => {
3368
+ onActive: (e) => {
3144
3369
  this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
3145
3370
  const r = this.billing.getCachedBootstrap()?.settings.success_redirect_url;
3146
3371
  if (r && typeof window < "u")
@@ -3157,7 +3382,7 @@ class kr {
3157
3382
  }), this.watcher.start());
3158
3383
  }
3159
3384
  close() {
3160
- !this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(at), this.emit("close"));
3385
+ !this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(oe), this.emit("close"));
3161
3386
  }
3162
3387
  /**
3163
3388
  * Сканирует текущий URL на маркеры возврата с checkout и эмитит
@@ -3167,79 +3392,79 @@ class kr {
3167
3392
  */
3168
3393
  checkReturn() {
3169
3394
  if (typeof window > "u") return;
3170
- const t = new URL(window.location.href), r = St(t.hash.replace(/^#/, "")), i = St(t.search.replace(/^\?/, "")), a = r ?? i;
3171
- a && (a.status === "paid" ? (this.emit("purchase_completed", {
3172
- priceId: a.priceId,
3173
- sessionId: a.sessionId
3174
- }), wr(a)) : (a.status === "failed" || a.status === "cancelled") && this.emit("purchase_failed", { reason: a.status }), mr(t));
3395
+ const e = new URL(window.location.href), r = Ce(e.hash.replace(/^#/, "")), i = Ce(e.search.replace(/^\?/, "")), n = r ?? i;
3396
+ n && (n.status === "paid" ? (this.emit("purchase_completed", {
3397
+ priceId: n.priceId,
3398
+ sessionId: n.sessionId
3399
+ }), br(n)) : (n.status === "failed" || n.status === "cancelled") && this.emit("purchase_failed", { reason: n.status }), yr(e));
3175
3400
  }
3176
3401
  destroy() {
3177
- this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = at;
3402
+ this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = oe;
3178
3403
  }
3179
3404
  }
3180
- function pr(e) {
3181
- if (!e.auth) return { auth: void 0, ownsAuth: !1 };
3182
- if (e.auth instanceof ct || hr(e.auth))
3183
- return { auth: e.auth, ownsAuth: !1 };
3184
- const t = e.auth === !0 ? {} : e.auth;
3405
+ function gr(t) {
3406
+ if (!t.auth) return { auth: void 0, ownsAuth: !1 };
3407
+ if (t.auth instanceof de || fr(t.auth))
3408
+ return { auth: t.auth, ownsAuth: !1 };
3409
+ const e = t.auth === !0 ? {} : t.auth;
3185
3410
  return {
3186
- auth: new ct({
3187
- paywallId: e.paywallId,
3188
- apiOrigin: t.apiOrigin ?? e.apiOrigin,
3189
- storage: t.storage ?? e.storage,
3190
- fetch: t.fetch ?? e.fetch,
3191
- openPopup: t.openPopup
3411
+ auth: new de({
3412
+ paywallId: t.paywallId,
3413
+ apiOrigin: e.apiOrigin ?? t.apiOrigin,
3414
+ storage: e.storage ?? t.storage,
3415
+ fetch: e.fetch ?? t.fetch,
3416
+ openPopup: e.openPopup
3192
3417
  }),
3193
3418
  ownsAuth: !0
3194
3419
  };
3195
3420
  }
3196
- function hr(e) {
3197
- if (typeof e != "object" || e === null) return !1;
3198
- const t = e;
3199
- return typeof t.onAuthChange == "function" && typeof t.getCachedSession == "function" && typeof t.signOut == "function";
3421
+ function fr(t) {
3422
+ if (typeof t != "object" || t === null) return !1;
3423
+ const e = t;
3424
+ return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
3200
3425
  }
3201
- function gr(e, t) {
3202
- return e.open === t.open && e.view === t.view && e.error === t.error;
3426
+ function wr(t, e) {
3427
+ return t.open === e.open && t.view === e.view && t.error === e.error && t.processing === e.processing;
3203
3428
  }
3204
- function fr(e, t) {
3205
- return e.mode === t.mode && e.payload === t.payload && e.storage === t.storage;
3429
+ function mr(t, e) {
3430
+ return t.mode === e.mode && t.payload === e.payload && t.storage === e.storage;
3206
3431
  }
3207
- function St(e) {
3208
- if (!e) return null;
3209
- const t = new URLSearchParams(e), r = t.get($.status);
3432
+ function Ce(t) {
3433
+ if (!t) return null;
3434
+ const e = new URLSearchParams(t), r = e.get(H.status);
3210
3435
  return r ? {
3211
3436
  status: r,
3212
- priceId: t.get($.priceId),
3213
- sessionId: t.get($.sessionId)
3437
+ priceId: e.get(H.priceId),
3438
+ sessionId: e.get(H.sessionId)
3214
3439
  } : null;
3215
3440
  }
3216
- function wr(e) {
3441
+ function br(t) {
3217
3442
  if (!(typeof window > "u" || !window.opener))
3218
3443
  try {
3219
3444
  window.opener.postMessage(
3220
3445
  {
3221
3446
  type: "paywall_purchase",
3222
- status: e.status,
3223
- priceId: e.priceId,
3224
- sessionId: e.sessionId
3447
+ status: t.status,
3448
+ priceId: t.priceId,
3449
+ sessionId: t.sessionId
3225
3450
  },
3226
3451
  "*"
3227
3452
  );
3228
3453
  } catch {
3229
3454
  }
3230
3455
  }
3231
- function mr(e) {
3232
- const t = (i, a) => {
3456
+ function yr(t) {
3457
+ const e = (i, n) => {
3233
3458
  if (!i) return "";
3234
- const o = new URLSearchParams(i.replace(/^[?#]/, ""));
3235
- o.delete($.status), o.delete($.priceId), o.delete($.sessionId);
3236
- const s = o.toString();
3237
- return s ? a + s : "";
3238
- }, r = e.pathname + t(e.search, "?") + t(e.hash, "#");
3459
+ const s = new URLSearchParams(i.replace(/^[?#]/, ""));
3460
+ s.delete(H.status), s.delete(H.priceId), s.delete(H.sessionId);
3461
+ const o = s.toString();
3462
+ return o ? n + o : "";
3463
+ }, r = t.pathname + e(t.search, "?") + e(t.hash, "#");
3239
3464
  window.history.replaceState(null, "", r);
3240
3465
  }
3241
3466
  export {
3242
- kr as P,
3243
- Je as b
3467
+ Cr as P,
3468
+ er as b
3244
3469
  };
3245
- //# sourceMappingURL=PaywallUI-CQG9HCwo.js.map
3470
+ //# sourceMappingURL=PaywallUI-vv6Hw8su.js.map