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D,CAAA,UAVRP,EAAA,SAAA1E,EAGUM,CAAS,IAAK,cAGvB,IAAAN,EAAAM,CAAA,EACE,IACAwB,EAAE,2BAA0B,CAAI,EAAG/B,EAAKC,EAACI,CAAQ,CAAA,EAAG,MAAOoE,KAAUpE,CAAQ,CAAA,CAAA,CAAA,cARhFsE,EAAA,IAEe/D,KAAIP,CAAQ,CAAA,CAAA,mBAHxBJ,EAAAC,CAAQ,KAAIG,CAAQ,GAAA2B,EAAAmD,EAAA,QAexBC,EAAGjE,EAAAkE,GAAA,CAAA,EACFC,IADDF,CAAG,OACFE,EAAI,EAAA,IAAJA,CAAI,EAEJ,IAAAC,IAFAD,EAAI,CAAA,OAEJC,EAAI,EAAA,IAAJA,CAAI,EAEJ,IAAAC,KAFAD,EAAI,CAAA,OAEJC,GAAI,EAAA,IAAJA,EAAI,IALLJ,CAAG,EAOH,IAAAK,IAPAL,EAAG,CAAA,OAOHK,EAAM,EAAA,IAANA,CAAM,IAvBPf,EAAG,IAhGJzD,EAAG,IAHJH,CAAG,wBACFE,EAAM,aAAAY,CAAA,EAML2C,EAAArD,EAAA,aAAAwE,CAAA,UA0BCnB,EAAAnC,EAAG,OAAAnC,EAAqCC,CAAQ,EAAG,aAAe,MAAS,oCAhCc,IAAA6B,EAAE,OAAO,EASvF,IAAAA,EAAE,OAAO,EAa4C,IAAAA,EAAE,aAAa,EA6FxE,IAAAA,EAAE,mBAAmB,EAErB,IAAAA,EAAE,gBAAgB,EAElB,IAAAA,EAAE,qBAAqB,EAG7B,IAAAA,EAAE,aAAa,cA1HlBf,EAAM,YAAA2E,EAAA,4BAMLC,EAAA,QAAA1E,EAAA,YAAAyE,EAAA,sCAmHCF,EAAM,YAAAE,EAAA,gCA1HT7E,CAAG,wCAJG","names":["startTokenCheckout","pkg","trackPurchaseClick","withPlusBonus","packUsdPrice","res","j","reason","source","need","note","$.prop","$$props","isPlus","$.derived","devPreviewTier","page","shown","$.get","choosing","selectedId","coveringPackage","selected","TOKEN_PACKAGES","loadingId","$.state","wasOpen","$.user_effect","trackBuyTokensModalOpen","buy","$.set","div","root_1","button","div_1","button_1","$.sibling","$.child","div_2","h3","p_1","root_2","p_2","root_3","$.template_effect","$0","$.set_text","text_2","t","$$render","consequent","alternate","div_3","div_4","$$anchor","picked","button_2","root_4","node_2","span","root_5","text_3","span_1","root_6","text_4","consequent_1","consequent_2","div_5","div_6","div_7","div_8","root_7","consequent_3","div_9","node_3","div_10","div_11","div_12","div_13","span_2","root_8","node_5","svg","root_9","consequent_4","$.reset","$.append","consequent_5","$.set_attribute","text_7","packPrice","div_14","button_3","$.first_child","fragment_1","text_10","node_7","p_3","root_11","consequent_6","consequent_7","div_15","node_6","span_3","span_4","span_5","button_4","$1","$$args","$.delegated"],"sources":["../../../../../../src/lib/token-checkout.ts","../../../../../../src/lib/components/BuyTokensModal.svelte"],"sourcesContent":["// Start a Stripe checkout for one token pack: the shared body of BuyTokensModal's buy() and the sculpt\n// unlock sheet's one-tap pack. A navigation, so no user activation is needed after the await (iOS ok).\nimport { trackPurchaseClick } from '$lib/analytics';\nimport { packUsdPrice } from '$lib/pricing-display';\nimport { withPlusBonus } from '$lib/pro-plan';\nimport type { TokenPackage } from '$lib/token-packages';\n\nexport interface TokenCheckoutOptions {\n\t/** where Stripe returns on success (the server falls back to the profile balance) */\n\tsuccessPath?: string;\n\t/** Stripe's back button; defaults to this page with ?canceled=true */\n\tcancelPath?: string;\n\t/** the surface, forwarded to checkout and analytics */\n\tsource: string;\n\t/** Plus members get the bonus server-side: track the granted count */\n\tisPlus?: boolean;\n}\n\n/** Fetch the checkout url and go there. Resolves false when it could not start (the caller re-enables\n *  its button); on success the page is already navigating away. */\nexport async function startTokenCheckout(pkg: TokenPackage, o: TokenCheckoutOptions): Promise<boolean> {\n\ttrackPurchaseClick(withPlusBonus(pkg.tokens, !!o.isPlus), packUsdPrice(pkg), `tokens_${pkg.id}_${o.source}`);\n\ttry {\n\t\tconst res = await fetch('/api/checkout/tokens', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\tbody: JSON.stringify({\n\t\t\t\tpackageId: pkg.id,\n\t\t\t\tsuccessPath: o.successPath,\n\t\t\t\tcancelPath: o.cancelPath ?? `${location.pathname}?canceled=true`,\n\t\t\t\tsource: o.source\n\t\t\t})\n\t\t});\n\t\tconst j = await res.json();\n\t\tif (res.ok && j.url) {\n\t\t\twindow.location.href = j.url;\n\t\t\treturn true;\n\t\t}\n\t} catch {\n\t\t/* fall through */\n\t}\n\treturn false;\n}\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport { packPrice } from '$lib/pricing-display';\n\timport { coveringPackage, TOKEN_PACKAGES, type TokenPackage } from '$lib/token-packages';\n\timport { withPlusBonus } from '$lib/pro-plan';\n\timport { page } from '$app/state';\n\timport { devPreviewTier } from '$lib/dev-preview';\n\timport { trackBuyTokensModalOpen } from '$lib/analytics';\n\timport { startTokenCheckout } from '$lib/token-checkout';\n\n\tinterface Props {\n\t\topen: boolean;\n\t\tonclose: () => void;\n\t\t/** optional context line, e.g. \"you're 30 tokens short to tip\". */\n\t\treason?: string | null;\n\t\t/** where Stripe returns on success (defaults to the profile balance). */\n\t\tsuccessPath?: string;\n\t\tsource?: string;\n\t\t/** tokens still missing for what the buyer came to do: the sheet opens\n\t\t *  with the smallest pack that covers it picked, and one button buys it. */\n\t\tneed?: number | null;\n\t\t/** one line under that button, e.g. what happens once they're back. */\n\t\tnote?: string | null;\n\t}\n\n\tlet {\n\t\topen,\n\t\tonclose,\n\t\treason = null,\n\t\tsuccessPath,\n\t\tsource = 'buy_tokens_modal',\n\t\tneed = null,\n\t\tnote = null\n\t}: Props = $props();\n\n\t// Plus members are granted the bonus server-side, so the count shown here has\n\t// to match /pricing — this is the impulse surface, and a modal that promises\n\t// 400 while checkout hands over 500 reads as a bug either way round.\n\tconst isPlus = $derived(\n\t\t(devPreviewTier(page.url) ?? page.data.subscriptionTier) === 'plus'\n\t);\n\tconst shown = (pkg: TokenPackage) => withPlusBonus(pkg.tokens, isPlus);\n\n\t// With a need, the packs are a choice with the right one already picked; a\n\t// tap picks another (the pick starts over each time the sheet opens).\n\tconst choosing = $derived(!!need && need > 0);\n\tlet selectedId = $derived(open && need && need > 0 ? coveringPackage(need, isPlus).id : null);\n\tconst selected = $derived(TOKEN_PACKAGES.find((p) => p.id === selectedId) ?? null);\n\n\tlet loadingId = $state<string | null>(null);\n\n\t// Fire once on each closed → open transition (not on every reactive re-run),\n\t// so the buy-tokens funnel is measurable from wherever the modal is raised —\n\t// `source` carries the surface, the same value forwarded to checkout.\n\tlet wasOpen = false;\n\t$effect(() => {\n\t\tif (open && !wasOpen) trackBuyTokensModalOpen(source);\n\t\twasOpen = open;\n\t});\n\n\tasync function buy(pkg: TokenPackage) {\n\t\tif (loadingId) return;\n\t\tloadingId = pkg.id;\n\t\t// Closes the wall → modal-open → purchase funnel (begin_checkout + purchase_click, the\n\t\t// `product_surface` pack convention, the granted count): startTokenCheckout tracks it, so\n\t\t// every mount site stays splittable by `source`. Stripe's back button returns to the page\n\t\t// the modal was opened on, not the server's /p fallback.\n\t\tif (!(await startTokenCheckout(pkg, { successPath, source, isPlus }))) loadingId = null;\n\t}\n</script>\n\n{#if open}\n\t<!-- svelte-ignore a11y_no_static_element_interactions -->\n\t<div class=\"fixed inset-0 z-[100] flex items-end justify-center sm:items-center\" role=\"dialog\" aria-modal=\"true\">\n\t\t<button class=\"absolute inset-0 bg-black/70 backdrop-blur-sm\" onclick={onclose} aria-label={t('Close')}></button>\n\n\t\t<div class=\"relative flex max-h-[92dvh] w-full max-w-[440px] flex-col rounded-t-3xl border border-border bg-bg sm:mx-4 sm:rounded-3xl\">\n\t\t\t<div class=\"flex justify-center pt-3 sm:hidden\">\n\t\t\t\t<div class=\"h-1 w-10 rounded-full bg-muted/20\"></div>\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\tclass=\"absolute top-4 right-4 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-surface text-muted/40 transition-colors hover:text-muted\"\n\t\t\t\tonclick={onclose}\n\t\t\t\taria-label={t('Close')}\n\t\t\t>\n\t\t\t\t<svg class=\"h-4 w-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" /><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" /></svg>\n\t\t\t</button>\n\n\t\t\t<!-- header -->\n\t\t\t<div class=\"shrink-0 px-5 pt-7 text-center sm:px-7 sm:pt-8\">\n\t\t\t\t<div class=\"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl\" style=\"background: rgba(245,181,10,.14);\">\n\t\t\t\t\t<svg class=\"h-7 w-7\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n\t\t\t\t\t\t<defs><radialGradient id=\"btCoin\" cx=\"38%\" cy=\"32%\" r=\"78%\"><stop offset=\"0%\" stop-color=\"#ffe9a8\" /><stop offset=\"48%\" stop-color=\"#f5b50a\" /><stop offset=\"100%\" stop-color=\"#b9800a\" /></radialGradient></defs>\n\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"url(#btCoin)\" stroke=\"#a06f06\" stroke-width=\"0.75\" /><circle cx=\"12\" cy=\"12\" r=\"7.6\" fill=\"none\" stroke=\"#fff3d0\" stroke-width=\"1\" opacity=\"0.5\" /><ellipse cx=\"9.2\" cy=\"8\" rx=\"3.1\" ry=\"1.9\" fill=\"#fff\" opacity=\"0.4\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"mt-4 font-display text-3xl font-bold tracking-tight\">{t('get tokens.')}</h3>\n\t\t\t\t{#if reason}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-muted\">{reason}</p>\n\t\t\t\t{:else}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-muted\">{t('spend them on live tips, ratings, boosts & more.')}</p>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<!-- packages -->\n\t\t\t<div class=\"min-h-0 flex-1 overflow-y-auto px-5 pt-5 pb-2 sm:px-7\">\n\t\t\t\t<div class=\"flex flex-col gap-2.5\" role={choosing ? 'radiogroup' : undefined}>\n\t\t\t\t\t{#each TOKEN_PACKAGES as pkg (pkg.id)}\n\t\t\t\t\t\t{@const picked = choosing && selectedId === pkg.id}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\trole={choosing ? 'radio' : undefined}\n\t\t\t\t\t\t\taria-checked={choosing ? picked : undefined}\n\t\t\t\t\t\t\tonclick={() => (choosing ? (selectedId = pkg.id) : buy(pkg))}\n\t\t\t\t\t\t\tdisabled={loadingId !== null}\n\t\t\t\t\t\t\tclass=\"group relative flex items-center justify-between rounded-2xl border p-4 text-left transition-colors disabled:opacity-60 {choosing\n\t\t\t\t\t\t\t\t? picked\n\t\t\t\t\t\t\t\t\t? 'border-text bg-surface'\n\t\t\t\t\t\t\t\t\t: 'border-border bg-surface/40 hover:border-muted/40'\n\t\t\t\t\t\t\t\t: pkg.popular\n\t\t\t\t\t\t\t\t\t? 'border-[#f5b50a]/60 bg-[#f5b50a]/[.06]'\n\t\t\t\t\t\t\t\t\t: pkg.whale\n\t\t\t\t\t\t\t\t\t\t? 'border-purple/50 bg-purple/[.06]'\n\t\t\t\t\t\t\t\t\t\t: 'border-border bg-surface/40 hover:border-muted/40'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if pkg.popular}\n\t\t\t\t\t\t\t\t<span class=\"absolute -top-2 left-4 rounded-full bg-[#f5b50a] px-2 py-0.5 font-display text-[9px] font-bold tracking-wide text-[#241a04] uppercase\">{t('most popular')}</span>\n\t\t\t\t\t\t\t{:else if pkg.whale}\n\t\t\t\t\t\t\t\t<span class=\"absolute -top-2 left-4 rounded-full bg-purple px-2 py-0.5 font-display text-[9px] font-bold tracking-wide text-white uppercase\">{t('best value')}</span>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t<svg class=\"h-8 w-8 shrink-0\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"url(#btCoin)\" stroke=\"#a06f06\" stroke-width=\"0.75\" /><circle cx=\"12\" cy=\"12\" r=\"7.6\" fill=\"none\" stroke=\"#fff3d0\" stroke-width=\"1\" opacity=\"0.5\" /><ellipse cx=\"9.2\" cy=\"8\" rx=\"3.1\" ry=\"1.9\" fill=\"#fff\" opacity=\"0.4\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-display text-lg font-bold tracking-tight\">{shown(pkg)} tokens</div>\n\t\t\t\t\t\t\t\t\t{#if isPlus}\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-[11px] font-semibold text-purple\">\n\t\t\t\t\t\t\t\t\t\t\t{pkg.tokens} + {shown(pkg) - pkg.tokens} plus bonus\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t<div class=\"text-[11px] text-muted\">“{pkg.label}” · {pkg.blurb}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t<div class=\"text-right\">\n\t\t\t\t\t\t\t\t\t<div class=\"font-display text-xl font-bold tracking-tight\">\n\t\t\t\t\t\t\t\t\t\t{loadingId === pkg.id && !choosing ? '…' : packPrice(pkg)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-[10px] text-muted/70\">{t('one-time')}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{#if choosing}\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"grid h-6 w-6 shrink-0 place-items-center rounded-full border-2 transition-colors {picked\n\t\t\t\t\t\t\t\t\t\t\t? 'border-text bg-text text-bg'\n\t\t\t\t\t\t\t\t\t\t\t: 'border-muted/50'}\"\n\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{#if picked}\n\t\t\t\t\t\t\t\t\t\t\t<svg class=\"h-3.5 w-3.5\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t><path d=\"M20 6 9 17l-5-5\" /></svg\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{/each}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- footer -->\n\t\t\t<div class=\"shrink-0 border-t border-border px-5 pt-4 pb-7 sm:px-7 sm:pb-8\">\n\t\t\t\t{#if choosing && selected}\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonclick={() => buy(selected)}\n\t\t\t\t\t\tdisabled={loadingId !== null}\n\t\t\t\t\t\tclass=\"mb-2 flex min-h-13 w-full items-center justify-center rounded-2xl bg-yellow px-5 py-4 font-display text-[16px] font-bold tracking-tight text-black transition-colors hover:bg-yellow/85 disabled:opacity-60\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{loadingId\n\t\t\t\t\t\t\t? '…'\n\t\t\t\t\t\t\t: t('buy {n} tokens · {price}', { n: shown(selected), price: packPrice(selected) })}\n\t\t\t\t\t</button>\n\t\t\t\t\t{#if note}\n\t\t\t\t\t\t<p class=\"mb-3 text-center text-[12px] text-muted\">{note}</p>\n\t\t\t\t\t{/if}\n\t\t\t\t{/if}\n\t\t\t\t<div class=\"flex items-center justify-center gap-3 text-[10px] text-muted/30\">\n\t\t\t\t\t<span>{t('secure via stripe')}</span>\n\t\t\t\t\t<span class=\"h-2.5 w-px bg-border\"></span>\n\t\t\t\t\t<span>{t('instant top-up')}</span>\n\t\t\t\t\t<span class=\"h-2.5 w-px bg-border\"></span>\n\t\t\t\t\t<span>{t('tokens never expire')}</span>\n\t\t\t\t</div>\n\t\t\t\t<button class=\"mt-3 block w-full text-center text-xs font-medium text-muted/30 transition-colors hover:text-muted\" onclick={onclose}>\n\t\t\t\t\t{t('maybe later')}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{/if}\n"],"version":3}