@monetize.software/sdk 3.0.0-alpha.19 → 3.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PaywallUI-BcKPNHPf.js → PaywallUI-BXEOgPTK.js} +89 -93
- package/dist/chunks/PaywallUI-BXEOgPTK.js.map +1 -0
- package/dist/chunks/PaywallUI-Cybo6wdO.js +26 -0
- package/dist/chunks/PaywallUI-Cybo6wdO.js.map +1 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +4 -2
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +4 -2
- package/dist/ui.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/PaywallUI-BcKPNHPf.js.map +0 -1
- package/dist/chunks/PaywallUI-DQ_4d6sJ.js +0 -26
- package/dist/chunks/PaywallUI-DQ_4d6sJ.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PaywallError as L, findApplicableOffer as N, BillingClient as
|
|
2
|
-
import { render as X, h as ue, createContext as
|
|
1
|
+
import { PaywallError as L, findApplicableOffer as N, BillingClient as De, EventTracker as Ne, resolveOffer as He, readBrowserOfferStart as $e, AuthClient as de } from "../core.js";
|
|
2
|
+
import { render as X, h as ue, createContext as Ve } from "preact";
|
|
3
3
|
import { jsx as a, jsxs as d, Fragment as se } from "preact/jsx-runtime";
|
|
4
|
-
import { useContext as
|
|
4
|
+
import { useContext as qe, useState as v, useEffect as j, useRef as O, useMemo as Ge, useLayoutEffect as We } from "preact/hooks";
|
|
5
5
|
const pe = 3600 * 1e3;
|
|
6
6
|
function J(t) {
|
|
7
7
|
return `paywall-${t}-trial-time-first-open`;
|
|
@@ -79,7 +79,7 @@ class Ie {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
let he = !1;
|
|
82
|
-
class
|
|
82
|
+
class Ze {
|
|
83
83
|
constructor(e, r, i) {
|
|
84
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.'
|
|
@@ -95,12 +95,12 @@ class Ke {
|
|
|
95
95
|
return this.fallback.reset();
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return r.storage === "server" ? new
|
|
98
|
+
function Ke(t, e, r) {
|
|
99
|
+
return r.storage === "server" ? new Ze(t, e, r) : new Ie(t, e, r);
|
|
100
100
|
}
|
|
101
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-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[22rem\\]{max-width:22rem}.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}.break-all{word-break:break-all}.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
102
|
let ge = !1;
|
|
103
|
-
function
|
|
103
|
+
function Ye() {
|
|
104
104
|
if (ge || (ge = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
|
|
105
105
|
let t;
|
|
106
106
|
try {
|
|
@@ -123,10 +123,10 @@ function Xe() {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Xe(t, e, r = {}) {
|
|
127
127
|
if (typeof document > "u")
|
|
128
128
|
throw new Error("mountShadow called in non-DOM environment");
|
|
129
|
-
|
|
129
|
+
Ye();
|
|
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
132
|
const n = i.attachShadow({ mode: r.shadowMode ?? "closed" }), s = `
|
|
@@ -162,7 +162,7 @@ function Je(t, e, r = {}) {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const Je = (t, e, r) => {
|
|
166
166
|
const i = t[e];
|
|
167
167
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((n, s) => {
|
|
168
168
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -174,7 +174,7 @@ const Qe = (t, e, r) => {
|
|
|
174
174
|
)
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
|
-
},
|
|
177
|
+
}, Qe = [
|
|
178
178
|
"ru",
|
|
179
179
|
"uk",
|
|
180
180
|
"de",
|
|
@@ -202,7 +202,7 @@ const Qe = (t, e, r) => {
|
|
|
202
202
|
"th",
|
|
203
203
|
"vi",
|
|
204
204
|
"he"
|
|
205
|
-
], Me = (t, e, r) => Te(e, r), Le =
|
|
205
|
+
], Me = (t, e, r) => Te(e, r), Le = Ve({ t: Me, locale: "en" });
|
|
206
206
|
function Te(t, e) {
|
|
207
207
|
if (!e) return t;
|
|
208
208
|
let r = t;
|
|
@@ -212,9 +212,9 @@ function Te(t, e) {
|
|
|
212
212
|
}
|
|
213
213
|
const ee = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map();
|
|
214
214
|
function Pe(t) {
|
|
215
|
-
return
|
|
215
|
+
return Qe.includes(t);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function et(t) {
|
|
218
218
|
const e = [];
|
|
219
219
|
if (typeof navigator < "u" && navigator.language) {
|
|
220
220
|
e.push(navigator.language);
|
|
@@ -231,15 +231,15 @@ function tt(t) {
|
|
|
231
231
|
if (Pe(i)) return i;
|
|
232
232
|
return null;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function tt(t, e) {
|
|
235
235
|
return !!t.locales && t.locales[e] !== void 0;
|
|
236
236
|
}
|
|
237
|
-
async function
|
|
237
|
+
async function rt(t) {
|
|
238
238
|
const e = ee.get(t);
|
|
239
239
|
if (e) return e;
|
|
240
240
|
const r = te.get(t);
|
|
241
241
|
if (r) return r;
|
|
242
|
-
const i =
|
|
242
|
+
const i = Je(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-rSKgwKvp.js"), "./locales/cs.ts": () => import("./cs-DIWkcge_.js"), "./locales/da.ts": () => import("./da-DdMW98j3.js"), "./locales/de.ts": () => import("./de-D1bSmD_-.js"), "./locales/el.ts": () => import("./el-C4LtWpfP.js"), "./locales/es.ts": () => import("./es-Bhx7w85J.js"), "./locales/fi.ts": () => import("./fi-C34Oc6rg.js"), "./locales/fr.ts": () => import("./fr-BrWtqej3.js"), "./locales/he.ts": () => import("./he-Byr2r07x.js"), "./locales/hi.ts": () => import("./hi-CABVgpKU.js"), "./locales/hu.ts": () => import("./hu-CSQ9avfJ.js"), "./locales/id.ts": () => import("./id-BJ5w6RSU.js"), "./locales/it.ts": () => import("./it-Df8ChmTK.js"), "./locales/ja.ts": () => import("./ja-a53E5b2s.js"), "./locales/ko.ts": () => import("./ko-AZ8GrmXu.js"), "./locales/nl.ts": () => import("./nl-sF6ms5FU.js"), "./locales/no.ts": () => import("./no-DGf5PuW5.js"), "./locales/pl.ts": () => import("./pl-Dd-Ze6wn.js"), "./locales/pt.ts": () => import("./pt-BL9X8Du2.js"), "./locales/ro.ts": () => import("./ro-CGYmtR8q.js"), "./locales/ru.ts": () => import("./ru-oPoQtUxk.js"), "./locales/sv.ts": () => import("./sv-kXHP1Ct3.js"), "./locales/th.ts": () => import("./th-DMcmb36d.js"), "./locales/tr.ts": () => import("./tr-zjLbddlL.js"), "./locales/uk.ts": () => import("./uk-BYSiM14V.js"), "./locales/vi.ts": () => import("./vi-FbVRwy9D.js"), "./locales/zh.ts": () => import("./zh-Cv0Yw4qR.js") }), `./locales/${t}.ts`, 3).then((n) => {
|
|
243
243
|
const s = n.default ?? {};
|
|
244
244
|
return ee.set(t, s), s;
|
|
245
245
|
}).catch((n) => {
|
|
@@ -251,13 +251,13 @@ async function it(t) {
|
|
|
251
251
|
});
|
|
252
252
|
return te.set(t, i), i;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function it({ bootstrap: t, forceLocale: e, children: r }) {
|
|
255
255
|
const [i, n] = v("en"), [s, o] = v(null);
|
|
256
256
|
j(() => {
|
|
257
257
|
const p = (e && Pe(e) ? e : null) ?? (() => {
|
|
258
258
|
if (!t) return null;
|
|
259
|
-
const f =
|
|
260
|
-
return !f || !
|
|
259
|
+
const f = et(t);
|
|
260
|
+
return !f || !tt(t, f) ? null : f;
|
|
261
261
|
})();
|
|
262
262
|
if (!p) {
|
|
263
263
|
(s !== null || i !== "en") && (n("en"), o(null));
|
|
@@ -265,7 +265,7 @@ function nt({ bootstrap: t, forceLocale: e, children: r }) {
|
|
|
265
265
|
}
|
|
266
266
|
if (p === i && s) return;
|
|
267
267
|
let u = !1;
|
|
268
|
-
return
|
|
268
|
+
return rt(p).then((f) => {
|
|
269
269
|
u || (n(p), o(f));
|
|
270
270
|
}), () => {
|
|
271
271
|
u = !0;
|
|
@@ -278,10 +278,10 @@ function nt({ bootstrap: t, forceLocale: e, children: r }) {
|
|
|
278
278
|
return /* @__PURE__ */ a(Le.Provider, { value: c, children: r });
|
|
279
279
|
}
|
|
280
280
|
function S() {
|
|
281
|
-
return
|
|
281
|
+
return qe(Le);
|
|
282
282
|
}
|
|
283
283
|
const fe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
284
|
-
function
|
|
284
|
+
function nt({
|
|
285
285
|
open: t,
|
|
286
286
|
onClose: e,
|
|
287
287
|
labelledBy: r,
|
|
@@ -385,7 +385,7 @@ function at({
|
|
|
385
385
|
}
|
|
386
386
|
) : null;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function at(t, e) {
|
|
389
389
|
switch (t) {
|
|
390
390
|
case "google":
|
|
391
391
|
return e("auth.continue_with_google", "Continue with Google");
|
|
@@ -436,9 +436,9 @@ function Ee({ block: t, ctx: e }) {
|
|
|
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
438
|
const c = i && !i.user.is_anonymous ? i : null;
|
|
439
|
-
return c && o ? null : c ? /* @__PURE__ */ a(
|
|
439
|
+
return c && o ? null : c ? /* @__PURE__ */ a(ot, { email: c.user.email ?? "", onSignOut: () => r.signOut().catch(() => {
|
|
440
440
|
}) }) : /* @__PURE__ */ a(
|
|
441
|
-
|
|
441
|
+
st,
|
|
442
442
|
{
|
|
443
443
|
block: t,
|
|
444
444
|
allowSignup: n,
|
|
@@ -447,7 +447,7 @@ function Ee({ block: t, ctx: e }) {
|
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ot({ email: t, onSignOut: e }) {
|
|
451
451
|
const { t: r } = S();
|
|
452
452
|
return /* @__PURE__ */ d("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
|
|
453
453
|
/* @__PURE__ */ d("div", { class: "flex flex-col", children: [
|
|
@@ -465,7 +465,7 @@ function st({ email: t, onSignOut: e }) {
|
|
|
465
465
|
)
|
|
466
466
|
] });
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
469
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 = O(!1), [z, M] = v(null), [F, R] = v(null), [U, P] = v(!1), [T, D] = v(null);
|
|
470
470
|
j(() => {
|
|
471
471
|
if (typeof s.getLastLogin != "function") return;
|
|
@@ -528,8 +528,8 @@ function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
}, K = o.length > 0 && (l === "signin" || l === "signup"), Y = l === "signin" || l === "signup" || l === "forgot", x = l === "signin" || l === "signup" && U;
|
|
531
|
-
return l === "reset_sent" ? /* @__PURE__ */ a(
|
|
532
|
-
/* @__PURE__ */ a(
|
|
531
|
+
return l === "reset_sent" ? /* @__PURE__ */ a(xt, { email: u, onBack: () => B("signin"), t: n }) : /* @__PURE__ */ d("div", { class: "flex flex-col gap-5", children: [
|
|
532
|
+
/* @__PURE__ */ a(lt, { mode: l, customHeading: t.heading, customSubheading: t.subheading }),
|
|
533
533
|
K ? /* @__PURE__ */ d("div", { class: "flex flex-col gap-2.5", children: [
|
|
534
534
|
o.map((g) => /* @__PURE__ */ d("div", { class: "relative", children: [
|
|
535
535
|
/* @__PURE__ */ d(
|
|
@@ -540,14 +540,14 @@ function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
540
540
|
disabled: m !== null,
|
|
541
541
|
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)]",
|
|
542
542
|
children: [
|
|
543
|
-
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(
|
|
544
|
-
/* @__PURE__ */ a("span", { children:
|
|
543
|
+
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(bt, { provider: g }),
|
|
544
|
+
/* @__PURE__ */ a("span", { children: at(g, n) })
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
|
-
T?.method === g ? /* @__PURE__ */ a(
|
|
548
|
+
T?.method === g ? /* @__PURE__ */ a(ft, { email: T.email }) : null
|
|
549
549
|
] }, g)),
|
|
550
|
-
/* @__PURE__ */ a(
|
|
550
|
+
/* @__PURE__ */ a(mt, {})
|
|
551
551
|
] }) : null,
|
|
552
552
|
/* @__PURE__ */ d("form", { onSubmit: Z, class: "flex flex-col gap-3", children: [
|
|
553
553
|
Y && /* @__PURE__ */ a(
|
|
@@ -609,15 +609,15 @@ function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
609
609
|
z && /* @__PURE__ */ a("p", { class: "text-sm text-red-600", children: z }),
|
|
610
610
|
F && /* @__PURE__ */ a("p", { class: "text-sm text-gray-500", children: F }),
|
|
611
611
|
/* @__PURE__ */ a(
|
|
612
|
-
|
|
612
|
+
pt,
|
|
613
613
|
{
|
|
614
614
|
busy: m === "email",
|
|
615
|
-
label:
|
|
615
|
+
label: dt(l, U, t.submit_label ?? t.heading, n)
|
|
616
616
|
}
|
|
617
617
|
)
|
|
618
618
|
] }),
|
|
619
619
|
/* @__PURE__ */ a(
|
|
620
|
-
|
|
620
|
+
ut,
|
|
621
621
|
{
|
|
622
622
|
mode: l,
|
|
623
623
|
allowSignup: e,
|
|
@@ -626,18 +626,18 @@ function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
626
626
|
)
|
|
627
627
|
] });
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function lt({
|
|
630
630
|
mode: t,
|
|
631
631
|
customHeading: e,
|
|
632
632
|
customSubheading: r
|
|
633
633
|
}) {
|
|
634
|
-
const { t: i } = S(), n =
|
|
634
|
+
const { t: i } = S(), n = ct(t, i), s = t === "signin" || t === "signup", o = s && e ? e : n.title, c = s && r !== void 0 ? r || null : n.subtitle;
|
|
635
635
|
return /* @__PURE__ */ d("div", { class: "flex flex-col gap-2", children: [
|
|
636
636
|
/* @__PURE__ */ a("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: o }),
|
|
637
637
|
c ? /* @__PURE__ */ a("p", { class: "text-base leading-relaxed text-gray-600", children: c }) : null
|
|
638
638
|
] });
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function ct(t, e) {
|
|
641
641
|
switch (t) {
|
|
642
642
|
case "signin":
|
|
643
643
|
return {
|
|
@@ -680,7 +680,7 @@ function dt(t, e) {
|
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function dt(t, e, r, i) {
|
|
684
684
|
if (t === "signin" && r) return r;
|
|
685
685
|
switch (t) {
|
|
686
686
|
case "signin":
|
|
@@ -696,7 +696,7 @@ function ut(t, e, r, i) {
|
|
|
696
696
|
return i("cta.continue", "Continue");
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function ut({
|
|
700
700
|
mode: t,
|
|
701
701
|
allowSignup: e,
|
|
702
702
|
onSwitch: r
|
|
@@ -731,7 +731,7 @@ function W({
|
|
|
731
731
|
}
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function pt({ busy: t, label: e }) {
|
|
735
735
|
return /* @__PURE__ */ a(
|
|
736
736
|
"button",
|
|
737
737
|
{
|
|
@@ -790,12 +790,12 @@ function re({ placeholder: t, value: e, onInput: r, autocomplete: i, required: n
|
|
|
790
790
|
"aria-label": o ? u : p,
|
|
791
791
|
tabIndex: -1,
|
|
792
792
|
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)]",
|
|
793
|
-
children: o ? /* @__PURE__ */ a(
|
|
793
|
+
children: o ? /* @__PURE__ */ a(gt, {}) : /* @__PURE__ */ a(ht, {})
|
|
794
794
|
}
|
|
795
795
|
)
|
|
796
796
|
] });
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function ht() {
|
|
799
799
|
return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
800
800
|
/* @__PURE__ */ a(
|
|
801
801
|
"path",
|
|
@@ -810,7 +810,7 @@ function gt() {
|
|
|
810
810
|
/* @__PURE__ */ a("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
|
|
811
811
|
] });
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function gt() {
|
|
814
814
|
return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
815
815
|
/* @__PURE__ */ a(
|
|
816
816
|
"path",
|
|
@@ -834,15 +834,15 @@ function ft() {
|
|
|
834
834
|
)
|
|
835
835
|
] });
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
const { t: e } = S(), r = t ? e("auth.last_used", "Last · {email}", { email:
|
|
837
|
+
function ft({ email: t }) {
|
|
838
|
+
const { t: e } = S(), r = t ? e("auth.last_used", "Last · {email}", { email: wt(t) }) : e("auth.last_used_no_email", "Last");
|
|
839
839
|
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 });
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function wt(t) {
|
|
842
842
|
const [e, r] = t.split("@");
|
|
843
843
|
return r ? `${e.slice(0, 3)}*****@${r}` : t;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function mt() {
|
|
846
846
|
const { t } = S();
|
|
847
847
|
return /* @__PURE__ */ d("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
|
|
848
848
|
/* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" }),
|
|
@@ -850,7 +850,7 @@ function bt() {
|
|
|
850
850
|
/* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" })
|
|
851
851
|
] });
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function bt({ provider: t }) {
|
|
854
854
|
return t === "google" ? /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
|
|
855
855
|
/* @__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" }),
|
|
856
856
|
/* @__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" }),
|
|
@@ -863,7 +863,7 @@ function xt({ provider: t }) {
|
|
|
863
863
|
/* @__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" }) })
|
|
864
864
|
) : 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" }) });
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function xt({
|
|
867
867
|
email: t,
|
|
868
868
|
onBack: e,
|
|
869
869
|
t: r
|
|
@@ -913,7 +913,7 @@ function yt({
|
|
|
913
913
|
)
|
|
914
914
|
] });
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function yt({
|
|
917
917
|
block: t,
|
|
918
918
|
bootstrap: e,
|
|
919
919
|
auth: r,
|
|
@@ -954,11 +954,11 @@ function vt({
|
|
|
954
954
|
submit_label: l("auth.log_in", "Sign In")
|
|
955
955
|
} : t;
|
|
956
956
|
return /* @__PURE__ */ d("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
|
|
957
|
-
s ? /* @__PURE__ */ a(
|
|
957
|
+
s ? /* @__PURE__ */ a(vt, { onClick: n, ariaLabel: l("nav.back_aria", "Back") }) : null,
|
|
958
958
|
/* @__PURE__ */ a(Ee, { block: u, ctx: p })
|
|
959
959
|
] });
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function vt({ onClick: t, ariaLabel: e }) {
|
|
962
962
|
return /* @__PURE__ */ a(
|
|
963
963
|
"button",
|
|
964
964
|
{
|
|
@@ -991,7 +991,7 @@ function kt({ onClick: t, ariaLabel: e }) {
|
|
|
991
991
|
}
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
|
-
const
|
|
994
|
+
const kt = (t) => `pw-offer-${t}-start`;
|
|
995
995
|
function ie(t) {
|
|
996
996
|
const e = t - Date.now();
|
|
997
997
|
return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
|
|
@@ -1010,7 +1010,7 @@ function _t(t) {
|
|
|
1010
1010
|
if (t.duration_minutes && t.duration_minutes > 0) {
|
|
1011
1011
|
if (typeof window > "u") return null;
|
|
1012
1012
|
try {
|
|
1013
|
-
const e =
|
|
1013
|
+
const e = kt(t.id);
|
|
1014
1014
|
let r = window.localStorage.getItem(e);
|
|
1015
1015
|
return r || (r = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, r)), Date.parse(r) + t.duration_minutes * 6e4;
|
|
1016
1016
|
} catch {
|
|
@@ -1019,7 +1019,7 @@ function _t(t) {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
return null;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function je(t, e) {
|
|
1023
1023
|
if (!t || t.length === 0) return null;
|
|
1024
1024
|
if (e) {
|
|
1025
1025
|
const r = t.find((i) => i.id === e);
|
|
@@ -1027,7 +1027,7 @@ function ze(t, e) {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return t.find((r) => r.expires_at || r.duration_minutes) ?? null;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function ze(t) {
|
|
1031
1031
|
const e = t ? _t(t) : null, [r, i] = v(
|
|
1032
1032
|
() => e !== null ? ie(e) : null
|
|
1033
1033
|
), n = O(e);
|
|
@@ -1039,17 +1039,13 @@ function Be(t) {
|
|
|
1039
1039
|
i(ie(e));
|
|
1040
1040
|
const s = setInterval(() => {
|
|
1041
1041
|
const o = ie(n.current ?? 0);
|
|
1042
|
-
|
|
1043
|
-
try {
|
|
1044
|
-
window.localStorage.removeItem(je(t.id));
|
|
1045
|
-
} catch {
|
|
1046
|
-
}
|
|
1042
|
+
i(o), o.expired && clearInterval(s);
|
|
1047
1043
|
}, 1e3);
|
|
1048
1044
|
return () => clearInterval(s);
|
|
1049
1045
|
}, [e, t?.duration_minutes, t?.id]), r;
|
|
1050
1046
|
}
|
|
1051
1047
|
function St({ block: t, ctx: e }) {
|
|
1052
|
-
const { t: r } = S(), i =
|
|
1048
|
+
const { t: r } = S(), i = je(e.bootstrap.offers, t.offer_id), n = ze(i);
|
|
1053
1049
|
if (!i || n === null || n.expired && !t.force) return null;
|
|
1054
1050
|
const s = t.title ?? i.label ?? r("offer.limited_time", "Limited-time offer"), o = i.discount_percent ? `${s} ${i.discount_percent}%` : s;
|
|
1055
1051
|
return /* @__PURE__ */ d(
|
|
@@ -1062,14 +1058,14 @@ function St({ block: t, ctx: e }) {
|
|
|
1062
1058
|
},
|
|
1063
1059
|
role: "status",
|
|
1064
1060
|
children: [
|
|
1065
|
-
/* @__PURE__ */ a(
|
|
1061
|
+
/* @__PURE__ */ a(Oe, {}),
|
|
1066
1062
|
/* @__PURE__ */ a("span", { children: o }),
|
|
1067
|
-
/* @__PURE__ */ a(
|
|
1063
|
+
/* @__PURE__ */ a(Be, { value: n, t: r })
|
|
1068
1064
|
]
|
|
1069
1065
|
}
|
|
1070
1066
|
);
|
|
1071
1067
|
}
|
|
1072
|
-
function
|
|
1068
|
+
function Be({ value: t, t: e }) {
|
|
1073
1069
|
return /* @__PURE__ */ d("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
|
|
1074
1070
|
t.days > 0 ? /* @__PURE__ */ d(se, { children: [
|
|
1075
1071
|
/* @__PURE__ */ a(q, { children: String(t.days) }),
|
|
@@ -1087,7 +1083,7 @@ function q({ children: t }) {
|
|
|
1087
1083
|
return /* @__PURE__ */ a("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: t });
|
|
1088
1084
|
}
|
|
1089
1085
|
function Ct({ offer: t }) {
|
|
1090
|
-
const { t: e } = S(), r =
|
|
1086
|
+
const { t: e } = S(), r = ze(t);
|
|
1091
1087
|
if (r === null || r.expired) return null;
|
|
1092
1088
|
const i = t.label ?? e("offer.limited_time", "Limited-time offer"), n = t.discount_percent ? `${i} ${t.discount_percent}%` : i;
|
|
1093
1089
|
return /* @__PURE__ */ d(
|
|
@@ -1100,14 +1096,14 @@ function Ct({ offer: t }) {
|
|
|
1100
1096
|
},
|
|
1101
1097
|
role: "status",
|
|
1102
1098
|
children: [
|
|
1103
|
-
/* @__PURE__ */ a(
|
|
1099
|
+
/* @__PURE__ */ a(Oe, {}),
|
|
1104
1100
|
/* @__PURE__ */ a("span", { children: n }),
|
|
1105
|
-
/* @__PURE__ */ a(
|
|
1101
|
+
/* @__PURE__ */ a(Be, { value: r, t: e })
|
|
1106
1102
|
]
|
|
1107
1103
|
}
|
|
1108
1104
|
);
|
|
1109
1105
|
}
|
|
1110
|
-
function
|
|
1106
|
+
function Oe() {
|
|
1111
1107
|
return /* @__PURE__ */ a(
|
|
1112
1108
|
"svg",
|
|
1113
1109
|
{
|
|
@@ -1654,10 +1650,10 @@ function Nt() {
|
|
|
1654
1650
|
}
|
|
1655
1651
|
);
|
|
1656
1652
|
}
|
|
1657
|
-
const
|
|
1653
|
+
const Fe = 24, Ht = 16, $t = 2;
|
|
1658
1654
|
function Vt(t, e) {
|
|
1659
1655
|
const r = e * $t;
|
|
1660
|
-
let i =
|
|
1656
|
+
let i = Fe;
|
|
1661
1657
|
for (t.style.fontSize = `${i}px`; t.scrollHeight > r && i > Ht; )
|
|
1662
1658
|
i -= 1, t.style.fontSize = `${i}px`;
|
|
1663
1659
|
}
|
|
@@ -1665,7 +1661,7 @@ function qt({ block: t, ctx: e }) {
|
|
|
1665
1661
|
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 = O(null), o = r === 1 && !!e.bootstrap.settings.title_auto_fit;
|
|
1666
1662
|
return j(() => {
|
|
1667
1663
|
if (!o || !s.current) return;
|
|
1668
|
-
const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) ||
|
|
1664
|
+
const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) || Fe * 1.5;
|
|
1669
1665
|
Vt(s.current, l);
|
|
1670
1666
|
}, [o, t.text]), /* @__PURE__ */ a(i, { ref: s, class: n, children: t.text });
|
|
1671
1667
|
}
|
|
@@ -1708,7 +1704,7 @@ function le(t, e) {
|
|
|
1708
1704
|
originalAmount: `${o.currency}${o.amount}`
|
|
1709
1705
|
};
|
|
1710
1706
|
}
|
|
1711
|
-
function
|
|
1707
|
+
function Re(t, e) {
|
|
1712
1708
|
if (t.label) return t.label.toUpperCase();
|
|
1713
1709
|
if (!t.interval || t.interval === "lifetime")
|
|
1714
1710
|
return e("pricing.plan_label.lifetime", "LIFETIME");
|
|
@@ -1850,7 +1846,7 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1850
1846
|
),
|
|
1851
1847
|
/* @__PURE__ */ d("div", { class: "flex flex-1 flex-col gap-0.5", children: [
|
|
1852
1848
|
/* @__PURE__ */ d("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
1853
|
-
/* @__PURE__ */ a("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children:
|
|
1849
|
+
/* @__PURE__ */ a("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Re(o, r) }),
|
|
1854
1850
|
h ? (
|
|
1855
1851
|
// opacity-60 приглушает strike: глаз сначала ловит label
|
|
1856
1852
|
// и discount-badge, потом main price; original «бывшая цена»
|
|
@@ -2024,7 +2020,7 @@ function Yt({
|
|
|
2024
2020
|
].join(" "),
|
|
2025
2021
|
style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
|
|
2026
2022
|
children: [
|
|
2027
|
-
/* @__PURE__ */ a("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children:
|
|
2023
|
+
/* @__PURE__ */ a("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Re(t, c) }),
|
|
2028
2024
|
n ? /* @__PURE__ */ d("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
|
|
2029
2025
|
f ? /* @__PURE__ */ a("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: f }) : null,
|
|
2030
2026
|
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: [
|
|
@@ -2122,7 +2118,7 @@ const tr = {
|
|
|
2122
2118
|
offer_banner: St
|
|
2123
2119
|
};
|
|
2124
2120
|
function rr({ layout: t, bootstrap: e, onAction: r, auth: i, authSession: n, hasTopBanner: s }) {
|
|
2125
|
-
const o =
|
|
2121
|
+
const o = Ge(() => {
|
|
2126
2122
|
for (const k of t.blocks)
|
|
2127
2123
|
if (k.type === "price_grid" && k.popular_price_id && e.prices.some((w) => w.id === k.popular_price_id))
|
|
2128
2124
|
return k.popular_price_id;
|
|
@@ -2225,7 +2221,7 @@ function ar({
|
|
|
2225
2221
|
}), () => {
|
|
2226
2222
|
x = !0;
|
|
2227
2223
|
};
|
|
2228
|
-
}, [e, t]),
|
|
2224
|
+
}, [e, t]), We(() => {
|
|
2229
2225
|
if (!e) {
|
|
2230
2226
|
m({ kind: "layout" }), I.current = !1;
|
|
2231
2227
|
return;
|
|
@@ -2337,14 +2333,14 @@ function ar({
|
|
|
2337
2333
|
i("error", new L("no_price", "No price selected"));
|
|
2338
2334
|
return;
|
|
2339
2335
|
}
|
|
2340
|
-
const E = h.data.settings.checkout_mode ?? "guest", $ = t.auth?.getCachedSession() ?? null,
|
|
2341
|
-
if (E === "preauth" && !!t.auth && !
|
|
2336
|
+
const E = h.data.settings.checkout_mode ?? "guest", $ = t.auth?.getCachedSession() ?? null, Ue = !!$ && !$.user.is_anonymous;
|
|
2337
|
+
if (E === "preauth" && !!t.auth && !Ue) {
|
|
2342
2338
|
m({ kind: "auth_gate", pendingCheckout: { priceId: y } });
|
|
2343
2339
|
return;
|
|
2344
2340
|
}
|
|
2345
2341
|
await M(y);
|
|
2346
2342
|
}
|
|
2347
|
-
}, U = h.status === "ready" ? h.data.settings.brand_color : null, P = h.status === "ready" ? h.data.settings.allow_close !== !1 : !0, D = b.kind === "layout" && h.status === "ready" ?
|
|
2343
|
+
}, U = h.status === "ready" ? h.data.settings.brand_color : null, P = h.status === "ready" ? h.data.settings.allow_close !== !1 : !0, D = b.kind === "layout" && h.status === "ready" ? je(h.data.offers) : null, B = D ? /* @__PURE__ */ a(Ct, { offer: D }) : null, Z = {
|
|
2348
2344
|
type: "auth_panel",
|
|
2349
2345
|
// Заголовок не задаём — AuthGate сам решит по intent'у (restore →
|
|
2350
2346
|
// "Restore Purchases", остальные → дефолтный "Welcome back!").
|
|
@@ -2365,8 +2361,8 @@ function ar({
|
|
|
2365
2361
|
}
|
|
2366
2362
|
}
|
|
2367
2363
|
) : null, K = b.kind === "auth_gate" && b.origin !== "standalone" || b.kind === "support", Y = h.status === "ready" ? h.data : null;
|
|
2368
|
-
return /* @__PURE__ */ a(
|
|
2369
|
-
|
|
2364
|
+
return /* @__PURE__ */ a(it, { bootstrap: Y, forceLocale: _, children: /* @__PURE__ */ a(
|
|
2365
|
+
nt,
|
|
2370
2366
|
{
|
|
2371
2367
|
open: e,
|
|
2372
2368
|
onClose: r,
|
|
@@ -2377,7 +2373,7 @@ function ar({
|
|
|
2377
2373
|
inline: f,
|
|
2378
2374
|
labelledBy: "pw-title",
|
|
2379
2375
|
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(or, { verifying: b.kind === "verifying" }) : h.status === "error" ? /* @__PURE__ */ a(sr, { message: h.error.message }) : b.kind === "auth_gate" && t.auth ? /* @__PURE__ */ a(
|
|
2380
|
-
|
|
2376
|
+
yt,
|
|
2381
2377
|
{
|
|
2382
2378
|
block: Z,
|
|
2383
2379
|
bootstrap: h.data,
|
|
@@ -2720,7 +2716,7 @@ class Ir {
|
|
|
2720
2716
|
constructor(e) {
|
|
2721
2717
|
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();
|
|
2722
2718
|
const { auth: r, ownsAuth: i } = fr(e);
|
|
2723
|
-
this.auth = r, this.ownsAuth = i, this.billing = e.client ?? new
|
|
2719
|
+
this.auth = r, this.ownsAuth = i, this.billing = e.client ?? new De({ ...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) => {
|
|
2724
2720
|
this.emit("userChange", n);
|
|
2725
2721
|
}), this.auth && (this.authUnsub = this.auth.onAuthChange((n, s) => {
|
|
2726
2722
|
this.emit("authChange", { event: n, session: s });
|
|
@@ -2731,7 +2727,7 @@ class Ir {
|
|
|
2731
2727
|
const r = typeof e == "object" && e !== null ? e : {};
|
|
2732
2728
|
if (r.enabled === !1) return;
|
|
2733
2729
|
const i = r.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
|
|
2734
|
-
this.tracker = new
|
|
2730
|
+
this.tracker = new Ne({
|
|
2735
2731
|
endpoint: i,
|
|
2736
2732
|
paywallId: this.billing.paywallId,
|
|
2737
2733
|
capabilities: this.billing.capabilities,
|
|
@@ -3217,7 +3213,7 @@ class Ir {
|
|
|
3217
3213
|
return this.trialStore;
|
|
3218
3214
|
this.trialStoreConfig = e;
|
|
3219
3215
|
const r = this.billing.createTrialStore;
|
|
3220
|
-
return this.trialStore = typeof r == "function" ? r.call(this.billing, e) :
|
|
3216
|
+
return this.trialStore = typeof r == "function" ? r.call(this.billing, e) : Ke(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
|
|
3221
3217
|
}
|
|
3222
3218
|
mountAndShow(e, r = {}) {
|
|
3223
3219
|
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;
|
|
@@ -3233,7 +3229,7 @@ class Ir {
|
|
|
3233
3229
|
}), this.emit("open");
|
|
3234
3230
|
return;
|
|
3235
3231
|
}
|
|
3236
|
-
this.isOpen = !0, this.handle =
|
|
3232
|
+
this.isOpen = !0, this.handle = Xe(
|
|
3237
3233
|
ar,
|
|
3238
3234
|
{
|
|
3239
3235
|
client: this.billing,
|
|
@@ -3359,9 +3355,9 @@ class Ir {
|
|
|
3359
3355
|
const r = this.billing.getCachedOffers();
|
|
3360
3356
|
if (!r) return null;
|
|
3361
3357
|
const i = N(r, e);
|
|
3362
|
-
return i ?
|
|
3358
|
+
return i ? He(i, {
|
|
3363
3359
|
now: Date.now(),
|
|
3364
|
-
readStart:
|
|
3360
|
+
readStart: $e
|
|
3365
3361
|
}) : null;
|
|
3366
3362
|
}
|
|
3367
3363
|
/** Снимок текущего «языка юзера» — proxy над `billing.getUserLanguage()`.
|
|
@@ -3556,4 +3552,4 @@ export {
|
|
|
3556
3552
|
Ir as P,
|
|
3557
3553
|
tr as b
|
|
3558
3554
|
};
|
|
3559
|
-
//# sourceMappingURL=PaywallUI-
|
|
3555
|
+
//# sourceMappingURL=PaywallUI-BXEOgPTK.js.map
|