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oBAoBH,IAAAvP,EAAA9K,EAAA,IAAApB,EAAA0D,EAAM,IAAK,SAAW,eAAiB,YAAY,EAP3DgY,GAAAC,GAAA,qBACM9a,EAAO,GACG,QAAA,IAAAF,EAAAE,GAAU,EAAK,wBACvB+D,EAAS,uBAChBD,EAAI,4EAEQE,EAAc,qCAvwB3B/F,GAAAqJ,GAAI,EAAA,4BAAAnI,EAAkC8C,EAAO,EAAG,QAAU,OAAO,oBAAA,EAqB7DhD,EAAAgJ,GAAA9I,EAAAM,CAAK,EAAC,KAAK,EAGXkL,EAAAzC,GAAA,OAAA,MAAA/I,EACUM,CAAK,EAAC,QAAQ,UAAQ,EAAA,EAAA,EAISR,EAAA8b,GAAA,IAAA5b,EAAAM,CAAK,EAAC,QAAQ,UAAY,WAAS,EAAA,EAAA,EAGtER,EAAA+b,GAAA,GAAA7b,EAAAM,CAAK,EAAC,YAAU,EAAA,IAAA4L,GAAA,EAAA,EAAA,EAmGvBpN,GAAA4N,GAAA,EAAA,2CAAA1M,EACgDM,CAAK,EAAC,QAAU,qBAAuB,EAAE,EAAA,EAyHzFxB,GAAAyQ,GAAA,EAAA,6CAAAvP,EACkDM,CAAK,EAAC,QACrD,qBACA,EAAE,EAAA,QAhOqBmB,GAASzB,EAACM,CAAK,EAAC,UAAU,CAAA,qBA5ChD","names":["BUNDLE_DISCOUNT_PCT","BUNDLE_MIN_ALBUMS","sum","xs","n","x","bundlePrice","prices","busy","hidden","error","div","root","div_1","$.child","div_2","div_3","span","div_4","root_1","div_5","root_2","$$render","consequent","alternate","button","$.sibling","node_1","consequent_1","$$props","consequent_2","alternate_1","$.reset","classes","$.set_class","$.delegated","$$args","bundleOffer","label","$.noop","$.first_child","fragment_3","p_1","p_2","b","s_1","text_4","p_3","root_5","bundleError","$.set_text","text_1","$.get","bundle","text_2","text_3","bundling","unlockBundle","album","$.state","$.proxy","tokens","$.user_effect","$.set","unlocking","showBuy","errorMsg","copied","albumUrl","avatarUrl","getAvatarUrl","visiblePhotos","$.derived","p","lockedCount","canAfford","videoCount","mediaNoun","rating","heroClip","heroRatio","spoke","sphSpokeFor","isAi","lockedClips","videoJsonLd","jsonLdScript","SITE_URL","isoDuration","redditHref","fmtDur","sec","m","s","blurFailed","SvelteSet","onMount","activeMode","showBar","boxInView","watchBoxButton","node","io","entry","unlock","surface","trackAlbumUnlockTap","hitSignInGate","RESUME_ALBUM_UNLOCK","requireAge","buyFor","src","$page","res","body","AGE_REQUIRED","openAgeGate","BLOCKED_BY_ME","blockedByMeText","gateResumed","untrack","consumeResume","trackAuthGateResumed","finishing","bundleAlbums","a","bundleDone","need","buyReason","buySuccessPath","fromTap","trackAlbumBundleTap","count","invalidateAll","q","forAlbum","forBundle","tick","clean","replaceState","done","ready","stopped","start","late","r","messageCreator","nick","saveDmPrefill","goto","resolve","shareAlbum","copyLink","justPublished","pushState","pushPermission","turnOnPush","enablePush","tips","out","lightboxIndex","lightboxPhoto","autoplayMuted","play","lightboxVideoEl","videoState","autoRecovered","resignLightboxVideo","onVideoState","state","reason","trackVideoLoadError","id","retryLightboxVideo","openLightbox","url","idx","closeLightbox","step","dir","onKey","$.head","$$anchor","main","fragment_4","header","nav","a_1","fragment_5","text_6","a_2","root_7","consequent_3","h1","text_7","a_3","node_6","DuelAvatar","span_1","span_2","root_8","text_10","$.append","span_3","root_9","$.template_effect","text_11","consequent_4","root_10","p_4","root_11","text_12","consequent_5","p_5","node_9","span_4","root_12","consequent_6","span_5","root_13","text_13","consequent_7","span_6","node_11","text_14","consequent_8","figure","root_14","div_6","root_15","node_14","GatedMedia","styles","$.set_style","video","root_16","$.set_attribute","styles_1","consequent_9","alternate_2","figcaption","span_7","button_1","root_17","node_16","text_16","$0","text_17","consequent_10","alternate_3","consequent_11","consequent_12","div_7","node_12","div_8","photo","div_9","root_21","node_18","span_8","root_22","consequent_13","button_2","root_23","node_20","img","root_25","video_1","root_26","consequent_15","alternate_4","span_9","root_27","text_18","img_1","root_28","consequent_17","alternate_5","span_10","root_29","consequent_18","div_10","root_30","node_24","img_2","fragment_10","$.event","$.replay_events","span_11","root_32","text_19","consequent_21","span_12","root_33","text_20","consequent_22","consequent_14","consequent_19","alternate_6","aside","node_27","div_11","root_34","a_4","node_28","div_12","div_13","div_14","root_35","text_22","div_15","root_36","consequent_23","alternate_7","div_16","span_13","text_23","span_14","p_6","root_37","consequent_24","div_17","root_38","button_3","root_39","node_32","alternate_8","consequent_27","$.action","$$node","consequent_25","alternate_9","p_7","root_43","consequent_28","consequent_29","p_8","root_45","b_1","consequent_30","div_18","node_35","line","div_19","root_46","span_15","div_20","root_47","span_16","b_2","button_4","consequent_31","text_21","text_24","section","root_49","p_9","button_5","button_6","text_32","node_38","div_21","root_50","button_7","p_10","root_51","text_33","consequent_33","alternate_10","payoutUsd","consequent_34","section_1","node_37","div_22","span_17","text_34","div_23","div_24","p_11","p_12","div_25","p_13","p_14","b_3","text_38","a_5","section_2","root_53","button_8","a_6","div_26","span_18","button_9","text_41","consequent_35","section_3","root_54","ul","tip","li","root_55","b_4","span_19","text_42","text_43","consequent_36","section_4","root_56","h3","p_15","a_7","text_46","text_44","consequent_37","alternate_11","text_35","text_36","div_27","root_57","p_16","root_58","text_47","consequent_39","button_10","node_42","text_48","p_17","p_18","root_60","consequent_40","alternate_12","consequent_41","div_28","root_62","div_29","p_19","a_8","div_30","a_9","root_63","div_31","img_3","root_65","consequent_42","consequent_43","p_20","text_51","consequent_44","text_49","consequent_38","consequent_45","consequent_32","div_32","root_66","ReportTrigger","node_48","consequent_46","p_21","a_10","root_67","text_52","consequent_47","a_11","root_68","consequent_48","div_33","root_69","button_11","$.key","node_53","div_34","root_71","video_2","$$value","$$action_arg","videoLoadGuard","node_54","div_35","root_72","button_12","consequent_49","img_4","root_73","consequent_50","alternate_13","button_13","fragment_19","button_14","consequent_51","button_15","node_55","consequent_52","AlbumUnlockBar","consequent_53","BuyTokensModal","node_57","text_8","text_9"],"sources":["../../../../../../src/lib/album-bundle.ts","../../../../../../src/lib/components/album/AlbumUnlockBar.svelte","../../../../../../src/routes/album/[id]/+page.svelte"],"sourcesContent":["/**\n * All of a creator's albums in one purchase: the ones a buyer hasn't unlocked\n * yet, 20% off together. Client-safe, so the album page shows exactly the\n * price the server charges (and the server refuses a price that has changed).\n */\n\nexport const BUNDLE_DISCOUNT_PCT = 20;\n/** Fewer albums than this left to unlock, and there is no bundle. */\nexport const BUNDLE_MIN_ALBUMS = 2;\n\nconst sum = (xs: number[]) => xs.reduce((n, x) => n + x, 0);\n\n/** The bundle's price: the albums' own prices together, 20% off, rounded down. */\nexport function bundlePrice(prices: number[]): number {\n\treturn Math.floor((sum(prices) * (100 - BUNDLE_DISCOUNT_PCT)) / 100);\n}\n\n/**\n * Splits `total` over the albums in proportion to their own prices, in whole\n * tokens that add up to exactly `total` (largest remainder; a tie goes to the\n * earlier album). Each album's unlock row records its share as the price paid,\n * so per-album earnings still add up to what the buyer was charged.\n */\nexport function allocateBundle(prices: number[], total: number): number[] {\n\tif (prices.length === 0) return [];\n\tconst full = sum(prices);\n\tconst exact = prices.map((p) => (full > 0 ? (p * total) / full : total / prices.length));\n\tconst out = exact.map((x) => Math.floor(x));\n\tlet left = total - sum(out);\n\tconst byRemainder = exact\n\t\t.map((x, i) => ({ i, r: x - Math.floor(x) }))\n\t\t.sort((a, b) => b.r - a.r || a.i - b.i);\n\tfor (const { i } of byRemainder) {\n\t\tif (left <= 0) break;\n\t\tout[i] += 1;\n\t\tleft -= 1;\n\t}\n\treturn out;\n}\n","<script lang=\"ts\">\n\t/**\n\t * RAT-517: the phone's unlock bar on an album page.\n\t *\n\t * A small card floating just above the bottom nav: what it costs on the\n\t * left, one action on the right. It is the buy box's own button in a place\n\t * the thumb can reach — the same `onunlock`, so signing in, the token sheet\n\t * and the purchase all behave exactly as they do there. Phones only\n\t * (md:hidden, the bottom nav's breakpoint); `hidden` slides it away while the\n\t * buy box itself is on screen, so the page never shows two of the same\n\t * button at once. A failed unlock says so here, where it was pressed.\n\t */\n\tlet {\n\t\tpriceTokens,\n\t\tcount,\n\t\tnoun,\n\t\tsignedIn,\n\t\tbusy = false,\n\t\thidden = false,\n\t\terror = null,\n\t\tonunlock\n\t}: {\n\t\tpriceTokens: number;\n\t\tcount: number;\n\t\tnoun: string;\n\t\tsignedIn: boolean;\n\t\tbusy?: boolean;\n\t\thidden?: boolean;\n\t\terror?: string | null;\n\t\tonunlock: () => void;\n\t} = $props();\n</script>\n\n<div class=\"unlock-bar fixed inset-x-0 z-40 px-3 md:hidden\" class:is-hidden={hidden} inert={hidden}>\n\t<div\n\t\tclass=\"mx-auto flex max-w-md items-center gap-3 rounded-2xl border border-border bg-surface py-2.5 pr-2.5 pl-4 shadow-[0_10px_30px_rgba(0,0,0,0.45)]\"\n\t>\n\t\t<div class=\"min-w-0 flex-1\">\n\t\t\t<div class=\"flex items-baseline gap-1.5\">\n\t\t\t\t<span class=\"font-display text-[19px] leading-none font-bold tracking-tight text-yellow\"\n\t\t\t\t\t>{priceTokens}</span\n\t\t\t\t>\n\t\t\t\t<span class=\"text-[12px] font-semibold text-muted\">tokens</span>\n\t\t\t</div>\n\t\t\t{#if error}\n\t\t\t\t<div class=\"mt-1 truncate text-[12px] font-medium text-coral\" role=\"alert\">{error}</div>\n\t\t\t{:else}\n\t\t\t\t<div class=\"mt-1 truncate text-[12px] text-muted\">all {count} {noun}, yours to keep</div>\n\t\t\t{/if}\n\t\t</div>\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tonclick={onunlock}\n\t\t\tdisabled={busy}\n\t\t\tclass=\"flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-xl bg-yellow px-5 py-3 font-display text-[15px] font-bold tracking-tight text-black transition-colors hover:bg-yellow/85 active:scale-[0.98] disabled:opacity-50\"\n\t\t>\n\t\t\t{#if busy}\n\t\t\t\tunlocking…\n\t\t\t{:else if signedIn}\n\t\t\t\t<svg class=\"h-4 w-4\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n\t\t\t\t\t><path\n\t\t\t\t\t\td=\"M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z\"\n\t\t\t\t\t/></svg\n\t\t\t\t>\n\t\t\t\tunlock\n\t\t\t{:else}\n\t\t\t\tsign in to unlock\n\t\t\t{/if}\n\t\t</button>\n\t</div>\n</div>\n\n<style>\n\t/* Sits on the bottom nav with a small breath: the nav is 68px of body plus\n\t   its 1px border plus the home-indicator inset (BottomNav.svelte). Solid, not\n\t   frosted: touch devices drop every backdrop blur (layout.css, RAT-38). */\n\t.unlock-bar {\n\t\tbottom: calc(env(safe-area-inset-bottom, 0px) + 77px);\n\t\ttransition:\n\t\t\ttransform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),\n\t\t\topacity 220ms ease;\n\t}\n\t/* Down behind the nav rather than off the page, so coming back is a short,\n\t   quiet move — and never a layout change. */\n\t.unlock-bar.is-hidden {\n\t\ttransform: translateY(calc(100% + 24px));\n\t\topacity: 0;\n\t\tpointer-events: none;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.unlock-bar {\n\t\t\ttransition: opacity 150ms linear;\n\t\t}\n\t\t.unlock-bar.is-hidden {\n\t\t\ttransform: none;\n\t\t}\n\t}\n</style>\n","<script lang=\"ts\">\n\timport { onMount, tick, untrack } from 'svelte';\n\timport { SvelteSet } from 'svelte/reactivity';\n\timport { goto, invalidateAll, replaceState } from '$app/navigation';\n\timport { resolve } from '$app/paths';\n\timport { saveDmPrefill } from '$lib/album-next';\n\timport { page } from '$app/stores';\n\timport { videoLoadGuard, type VideoLoadState } from '$lib/actions/video-load-guard';\n\timport {\n\t\ttrackAlbumBundleTap,\n\t\ttrackAlbumUnlockTap,\n\t\ttrackAuthGateResumed,\n\t\ttrackVideoLoadError\n\t} from '$lib/analytics';\n\timport { bundlePrice, BUNDLE_MIN_ALBUMS } from '$lib/album-bundle';\n\timport { hitSignInGate, RESUME_ALBUM_UNLOCK } from '$lib/contextual-sign-in';\n\timport { consumeResume } from '$lib/oauth-resume';\n\timport { activeMode } from '$lib/stores/activeMode';\n\timport { getAvatarUrl } from '$lib/avatar';\n\timport DuelAvatar from '$lib/components/duel/DuelAvatar.svelte';\n\timport BuyTokensModal from '$lib/components/BuyTokensModal.svelte';\n\timport ReportTrigger from '$lib/components/ReportTrigger.svelte';\n\timport AlbumUnlockBar from '$lib/components/album/AlbumUnlockBar.svelte';\n\timport GatedMedia from '$lib/components/GatedMedia.svelte';\n\timport { openAgeGate, requireAge } from '$lib/stores/ageGate';\n\timport { AGE_REQUIRED } from '$lib/age-gate';\n\timport { isoDuration, sphSpokeFor } from '$lib/album-watch';\n\timport { payoutUsd } from '$lib/payout-rate';\n\timport { pushPermission, enablePush, type PushPermission } from '$lib/push-client';\n\timport { jsonLdScript, SITE_URL } from '$lib/seo';\n\timport type { AlbumDetail } from '$lib/types/album';\n\timport type { PageData } from './$types';\n\timport { BLOCKED_BY_ME, blockedByMeText } from '$lib/block-refusal';\n\n\tlet { data }: { data: PageData } = $props();\n\n\t// Seed local state from data, resync on reload (Svelte 5 + invalidateAll\n\t// canonical pattern — locals decoupled from props go stale otherwise).\n\tlet album = $state<AlbumDetail>(data.album);\n\tlet tokens = $state(data.tokens);\n\t$effect(() => {\n\t\talbum = data.album;\n\t\ttokens = data.tokens;\n\t});\n\n\tlet unlocking = $state(false);\n\tlet showBuy = $state(false);\n\tlet errorMsg = $state<string | null>(null);\n\tlet copied = $state(false);\n\tlet albumUrl = $state('');\n\n\tconst avatarUrl = $derived(getAvatarUrl(album.creator.avatarPath));\n\t// The lightbox's set: what the viewer may open. An item behind the age check\n\t// (RAT-641) is shown as its stand-in and opens the check instead.\n\tconst visiblePhotos = $derived(album.photos.filter((p) => p.url && !p.gate));\n\tconst lockedCount = $derived(\n\t\talbum.photoCount - album.photos.filter((p) => p.url || p.gate).length\n\t);\n\tconst canAfford = $derived(tokens >= album.priceTokens);\n\t// Album content may be photos, video clips, or a mix — label the count so an\n\t// all-video set doesn't read as \"3 photos\".\n\tconst videoCount = $derived(album.photos.filter((p) => p.kind === 'video').length);\n\tfunction mediaNoun(n: number): string {\n\t\tif (videoCount === 0) return n === 1 ? 'photo' : 'photos';\n\t\tif (videoCount >= album.photoCount) return n === 1 ? 'clip' : 'clips';\n\t\treturn n === 1 ? 'item' : 'items';\n\t}\n\tconst rating = $derived(data.creatorRating);\n\n\t// RAT-618: the free preview clip leads the page for anyone who hasn't\n\t// unlocked, with the album's own words and the price right under it.\n\tconst heroClip = $derived(\n\t\t!album.unlocked\n\t\t\t? (album.photos.find((p) => p.kind === 'video' && (p.url || p.gate)) ?? null)\n\t\t\t: null\n\t);\n\t// The clip's own shape, at most three quarters of the screen tall: most\n\t// previews are filmed upright, and a 16:9 box shrank them to a strip.\n\tconst heroRatio = $derived(\n\t\theroClip?.width && heroClip.height ? heroClip.width / heroClip.height : 9 / 16\n\t);\n\tconst spoke = $derived(sphSpokeFor(album.tags));\n\tconst isAi = $derived(album.tags.includes('ai'));\n\tconst lockedClips = $derived(album.photos.filter((p) => p.kind === 'video' && p.locked).length);\n\t// RAT-641: with the age gate on, the poster and the clip are closed to\n\t// crawlers too, so the page doesn't claim a video.\n\tconst videoJsonLd = $derived(\n\t\tdata.watch.indexable && data.watch.hasPoster && !data.ageGate\n\t\t\t? jsonLdScript({\n\t\t\t\t\t'@context': 'https://schema.org',\n\t\t\t\t\t'@type': 'VideoObject',\n\t\t\t\t\tname: album.title,\n\t\t\t\t\tdescription: album.description,\n\t\t\t\t\tthumbnailUrl: [`${SITE_URL}/album/${album.id}/poster.jpg`],\n\t\t\t\t\tuploadDate: album.publishedAt ?? album.createdAt,\n\t\t\t\t\t...(data.watch.previewSec ? { duration: isoDuration(data.watch.previewSec) } : {}),\n\t\t\t\t\tcontentUrl: `${SITE_URL}/album/${album.id}/preview.mp4`,\n\t\t\t\t\tisFamilyFriendly: false,\n\t\t\t\t\tisAccessibleForFree: true,\n\t\t\t\t\tauthor: { '@type': 'Person', name: `@${album.creator.nickname ?? 'creator'}` }\n\t\t\t\t})\n\t\t\t: ''\n\t);\n\tconst redditHref = $derived(\n\t\t`https://www.reddit.com/submit?url=${encodeURIComponent(albumUrl)}&title=${encodeURIComponent(album.title)}`\n\t);\n\n\tfunction fmtDur(sec: number | null): string {\n\t\tif (!sec || sec < 1) return '';\n\t\tconst m = Math.floor(sec / 60);\n\t\tconst s = sec % 60;\n\t\treturn `${m}:${String(s).padStart(2, '0')}`;\n\t}\n\n\t// Locked tiles whose blurred stand-in didn't load keep the plain lock.\n\tconst blurFailed = new SvelteSet<string>();\n\n\tonMount(() => {\n\t\tactiveMode.set('albums');\n\t\talbumUrl = `${location.origin}/album/${album.id}`;\n\t\treturn () => activeMode.set(null);\n\t});\n\n\t// RAT-517: the phone's sticky unlock bar (hidden from md up by its own CSS).\n\t// It stands in for the buy box's button while that button is out of reach,\n\t// and steps aside once it has cleared the bar and the nav at the bottom of\n\t// the screen.\n\tconst showBar = $derived(!album.unlocked && !album.isOwner);\n\tlet boxInView = $state(false);\n\t/** Whether the buy box's button is on screen: above the bottom 160px, where\n\t *  the bar and the nav would cover it. */\n\tfunction watchBoxButton(node: HTMLElement) {\n\t\tif (typeof IntersectionObserver === 'undefined') return;\n\t\tconst io = new IntersectionObserver(([entry]) => (boxInView = entry.isIntersecting), {\n\t\t\trootMargin: '0px 0px -160px 0px'\n\t\t});\n\t\tio.observe(node);\n\t\treturn {\n\t\t\tdestroy() {\n\t\t\t\tio.disconnect();\n\t\t\t\tboxInView = false;\n\t\t\t}\n\t\t};\n\t}\n\n\t/** `surface` is where the tap came from; null is the unlock carried out after\n\t *  sign-in (RAT-519), whose tap was logged before it. */\n\tasync function unlock(surface: 'box' | 'bar' | 'player' | null) {\n\t\terrorMsg = null;\n\t\tif (surface) {\n\t\t\ttrackAlbumUnlockTap({\n\t\t\t\talbumId: album.id,\n\t\t\t\tsurface,\n\t\t\t\tsignedIn: data.isLoggedIn,\n\t\t\t\tcanAfford\n\t\t\t});\n\t\t}\n\t\tif (!data.isLoggedIn) {\n\t\t\t// RAT-519: sign in right here; the unlock goes through once they're in.\n\t\t\thitSignInGate({\n\t\t\t\tsurface: 'album_unlock',\n\t\t\t\tnext: `/album/${album.id}`,\n\t\t\t\tcontext: {\n\t\t\t\t\ttitle: `unlock “${album.title}”`,\n\t\t\t\t\tdetail: `${album.priceTokens} tokens · all ${album.photoCount} ${mediaNoun(album.photoCount)}, yours to keep`,\n\t\t\t\t\timageUrl: avatarUrl\n\t\t\t\t},\n\t\t\t\tresume: { key: RESUME_ALBUM_UNLOCK, payload: { albumId: album.id } }\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\t// RAT-641: the age check comes before paying (or topping up for it).\n\t\tif (!requireAge(data, { surface: 'album', mode: 'view', onPass: () => void unlock(null) }))\n\t\t\treturn;\n\t\tif (!canAfford) {\n\t\t\tbuyFor = 'album';\n\t\t\tshowBuy = true;\n\t\t\treturn;\n\t\t}\n\t\tif (unlocking) return;\n\t\tunlocking = true;\n\t\ttry {\n\t\t\t// RAT-449: carry the arrival surface (?src=feed/browse/arena from the\n\t\t\t// card link) into the purchase so revenue attributes to the right slot.\n\t\t\tconst src = $page.url.searchParams.get('src');\n\t\t\tconst res = await fetch(`/api/album/${album.id}/unlock`, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({ src })\n\t\t\t});\n\t\t\tif (res.status === 402) {\n\t\t\t\tbuyFor = 'album';\n\t\t\t\tshowBuy = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (res.status === 403) {\n\t\t\t\tconst body = (await res.json().catch(() => ({}))) as { error?: string };\n\t\t\t\tif (body.error === AGE_REQUIRED) {\n\t\t\t\t\topenAgeGate({ surface: 'album', mode: 'view', onPass: () => void unlock(null) });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// block everything: I blocked the creator (nothing was charged)\n\t\t\t\tif (body.error === BLOCKED_BY_ME) {\n\t\t\t\t\terrorMsg = blockedByMeText(album.creator.nickname);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!res.ok) {\n\t\t\t\terrorMsg = 'could not unlock — try again';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst body = (await res.json()) as { ok: boolean; album: AlbumDetail };\n\t\t\talbum = body.album;\n\t\t\ttokens = Math.max(0, tokens - body.album.priceTokens);\n\t\t} catch {\n\t\t\terrorMsg = 'network error — try again';\n\t\t} finally {\n\t\t\tunlocking = false;\n\t\t}\n\t}\n\n\t// RAT-519: back from signing in at this album's unlock gate — finish the\n\t// unlock they asked for (a new account short of tokens gets the token sheet,\n\t// as a tap would). Once per page; an entry for another album is dropped.\n\tlet gateResumed = false;\n\t$effect(() => {\n\t\tif (!data.isLoggedIn || gateResumed) return;\n\t\tgateResumed = true;\n\t\tuntrack(() => {\n\t\t\tconst r = consumeResume<{ albumId?: string }>(RESUME_ALBUM_UNLOCK);\n\t\t\tif (r?.albumId !== album.id || album.unlocked) return;\n\t\t\ttrackAuthGateResumed({ surface: 'album_unlock' });\n\t\t\tvoid unlock(null);\n\t\t});\n\t});\n\n\t// ─── RAT-534 (album-next) ─────────────────────────────────────────────────\n\t// Short on tokens, unlock opens the token packs — the same ones /pricing\n\t// lists — and the unlock finishes on the way back from checkout, no second\n\t// press. The creator bundle below works the same way.\n\tlet finishing = $state<'idle' | 'waiting' | 'late'>('idle');\n\n\t// ── Creator bundle: every album by this creator the buyer can still unlock,\n\t// 20% off together. Priced by $lib/album-bundle, the same function the\n\t// server charges with, and the server refuses a price that has changed.\n\tconst bundleAlbums = $derived(\n\t\t(data.bundle?.albums ?? []).filter((a) => !(a.id === album.id && album.unlocked))\n\t);\n\tconst bundle = $derived.by(() => {\n\t\tif (bundleAlbums.length < BUNDLE_MIN_ALBUMS) return null;\n\t\tconst prices = bundleAlbums.map((a) => a.priceTokens);\n\t\treturn {\n\t\t\tcount: bundleAlbums.length,\n\t\t\tfull: prices.reduce((n, p) => n + p, 0),\n\t\t\tprice: bundlePrice(prices),\n\t\t\twithThis: bundleAlbums.some((a) => a.id === album.id)\n\t\t};\n\t});\n\tlet bundling = $state(false);\n\tlet bundleError = $state<string | null>(null);\n\tlet bundleDone = $state(0);\n\t// what the token sheet is topping up for\n\tlet buyFor = $state<'album' | 'bundle'>('album');\n\n\tconst need = $derived(\n\t\tMath.max(0, (buyFor === 'bundle' && bundle ? bundle.price : album.priceTokens) - tokens)\n\t);\n\tconst buyReason = $derived(\n\t\tneed === 0\n\t\t\t? null\n\t\t\t: buyFor === 'bundle' && bundle\n\t\t\t\t? `you need ${need} more tokens for all ${bundle.count} albums`\n\t\t\t\t: `you need ${need} more tokens for this album`\n\t);\n\t// ?bundle= carries the price it was bought for, so the purchase never\n\t// finishes at a price the buyer wasn't shown.\n\tconst buySuccessPath = $derived(\n\t\tbuyFor === 'bundle' && bundle\n\t\t\t? `/album/${album.id}?bundle=${bundle.price}`\n\t\t\t: `/album/${album.id}?unlock=1`\n\t);\n\n\tasync function unlockBundle(fromTap: boolean) {\n\t\tif (!bundle || !data.bundle || bundling) return;\n\t\tbundleError = null;\n\t\tif (fromTap) {\n\t\t\ttrackAlbumBundleTap({\n\t\t\t\talbumId: album.id,\n\t\t\t\tcount: bundle.count,\n\t\t\t\tpriceTokens: bundle.price,\n\t\t\t\tcanAfford: tokens >= bundle.price\n\t\t\t});\n\t\t}\n\t\t// RAT-641: the age check comes before paying, as for one album.\n\t\tif (\n\t\t\t!requireAge(data, {\n\t\t\t\tsurface: 'album',\n\t\t\t\tmode: 'view',\n\t\t\t\tonPass: () => void unlockBundle(false)\n\t\t\t})\n\t\t)\n\t\t\treturn;\n\t\tif (tokens < bundle.price) {\n\t\t\tbuyFor = 'bundle';\n\t\t\tshowBuy = true;\n\t\t\treturn;\n\t\t}\n\t\tbundling = true;\n\t\tconst count = bundle.count;\n\t\ttry {\n\t\t\tconst res = await fetch('/api/album/bundle', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tcreatorId: data.bundle.creatorId,\n\t\t\t\t\texpectedTokens: bundle.price,\n\t\t\t\t\tsrc: $page.url.searchParams.get('src')\n\t\t\t\t})\n\t\t\t});\n\t\t\tif (res.status === 402) {\n\t\t\t\tbuyFor = 'bundle';\n\t\t\t\tshowBuy = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (res.status === 403) {\n\t\t\t\tconst body = (await res.json().catch(() => ({}))) as { error?: string };\n\t\t\t\tif (body.error === AGE_REQUIRED) {\n\t\t\t\t\topenAgeGate({\n\t\t\t\t\t\tsurface: 'album',\n\t\t\t\t\t\tmode: 'view',\n\t\t\t\t\t\tonPass: () => void unlockBundle(false)\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// block everything: I blocked the creator (nothing was charged)\n\t\t\t\tif (body.error === BLOCKED_BY_ME) {\n\t\t\t\t\tbundleError = blockedByMeText(album.creator.nickname);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (res.status === 409) {\n\t\t\t\tbundleError = 'the albums changed since — here’s the new price';\n\t\t\t\tawait invalidateAll();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!res.ok) {\n\t\t\t\tbundleError = 'could not unlock — try again';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait invalidateAll();\n\t\t\tbundleDone = count;\n\t\t} catch {\n\t\t\tbundleError = 'network error — try again';\n\t\t} finally {\n\t\t\tbundling = false;\n\t\t}\n\t}\n\n\t// Back from checkout: the tokens arrive by webhook a moment later, so wait\n\t// for them (up to 20 s, polling just the balance) and unlock without a\n\t// second press.\n\tonMount(() => {\n\t\tconst q = $page.url.searchParams;\n\t\tconst forAlbum = q.get('unlock') === '1';\n\t\tconst forBundle = q.has('bundle') ? Number(q.get('bundle')) : null;\n\t\tif (!data.isLoggedIn || (!forAlbum && forBundle == null)) return;\n\t\t// RAT-641: an unlock waits on the age check, which is a tap of its own;\n\t\t// polling here would keep raising it.\n\t\tif (data.ageGate && !data.ageVerified) return;\n\t\tvoid tick().then(() => {\n\t\t\tconst clean = new URL($page.url);\n\t\t\tclean.searchParams.delete('unlock');\n\t\t\tclean.searchParams.delete('bundle');\n\t\t\ttry {\n\t\t\t\t// The page's own address minus a parameter: nothing to resolve.\n\t\t\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve\n\t\t\t\treplaceState(clean, {});\n\t\t\t} catch {\n\t\t\t\t// router not ready — the parameter stays, harmlessly\n\t\t\t}\n\t\t});\n\t\tconst done = () => (forBundle != null ? bundleDone > 0 || !bundle : album.unlocked);\n\t\t// a bundle whose price moved since is left for the buyer to tap again\n\t\tif (done() || (forBundle != null && bundle?.price !== forBundle)) return;\n\t\tconst ready = () => (forBundle != null ? tokens >= forBundle : canAfford);\n\t\tlet stopped = false;\n\t\tfinishing = 'waiting';\n\t\t(async () => {\n\t\t\t// 20 s at a brisk pace, then — \"on the way\" — every 5 s for two minutes.\n\t\t\tconst start = Date.now();\n\t\t\twhile (!stopped && !done() && Date.now() - start < 140_000) {\n\t\t\t\tif (ready()) {\n\t\t\t\t\tif (forBundle != null) await unlockBundle(false);\n\t\t\t\t\telse await unlock(null);\n\t\t\t\t\tif (done() || bundleError) break;\n\t\t\t\t}\n\t\t\t\tconst late = Date.now() - start >= 20_000;\n\t\t\t\tif (late && finishing === 'waiting') finishing = 'late';\n\t\t\t\tawait new Promise((r) => setTimeout(r, late ? 5000 : 1500));\n\t\t\t\ttry {\n\t\t\t\t\tconst r = await fetch('/api/tokens/balance');\n\t\t\t\t\tif (r.ok) tokens = ((await r.json()) as { tokens: number }).tokens;\n\t\t\t\t} catch {\n\t\t\t\t\t// try again on the next round\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!stopped && (done() || bundleError)) finishing = 'idle';\n\t\t})();\n\t\treturn () => {\n\t\t\tstopped = true;\n\t\t};\n\t});\n\n\t// Unlocked: the conversation, one tap away, first line already written.\n\tfunction messageCreator() {\n\t\tconst nick = album.creator.nickname;\n\t\tif (!nick) return;\n\t\tsaveDmPrefill(nick, `just unlocked “${album.title}” 🔥`);\n\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolve()d; the query string defeats the rule\n\t\tgoto(`${resolve('/(chat)/c/[nickname]', { nickname: nick })}?from=album`);\n\t}\n\n\t// Share — navigator.share needs user activation, so it runs synchronously in\n\t// the click handler (no await before it on iOS Safari); clipboard fallback.\n\tfunction shareAlbum() {\n\t\tif (typeof navigator !== 'undefined' && navigator.share) {\n\t\t\tnavigator\n\t\t\t\t.share({ title: album.title, text: 'check out my album on ratemyd', url: albumUrl })\n\t\t\t\t.catch(() => {});\n\t\t\treturn;\n\t\t}\n\t\tcopyLink();\n\t}\n\tfunction copyLink() {\n\t\tnavigator.clipboard\n\t\t\t?.writeText(albumUrl)\n\t\t\t.then(() => {\n\t\t\t\tcopied = true;\n\t\t\t\tsetTimeout(() => (copied = false), 1800);\n\t\t\t})\n\t\t\t.catch(() => {});\n\t}\n\n\t// ── Owner ─────────────────────────────────────────────────────────────────\n\t// Straight from publishing (?published=1): the panel says it's live and\n\t// puts sharing first. Shown once; the parameter leaves the address.\n\tlet justPublished = $state(false);\n\tlet pushState = $state<PushPermission | 'asking'>('unsupported');\n\tonMount(() => {\n\t\tif (!album.isOwner || $page.url.searchParams.get('published') !== '1') return;\n\t\tjustPublished = album.status === 'published';\n\t\tpushState = pushPermission();\n\t\tvoid tick().then(() => {\n\t\t\tconst clean = new URL($page.url);\n\t\t\tclean.searchParams.delete('published');\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve\n\t\t\t\treplaceState(clean, {});\n\t\t\t} catch {\n\t\t\t\t// router not ready — the parameter stays, harmlessly\n\t\t\t}\n\t\t});\n\t});\n\t// Asks for permission inside the tap, as browsers require.\n\tasync function turnOnPush() {\n\t\tpushState = 'asking';\n\t\tpushState = await enablePush().catch((): PushPermission => 'default');\n\t}\n\n\t// Only the advice this album hasn't taken yet. Sold within 14 days of\n\t// publishing (2026-07-20..10-11): 2–3 free previews 53%, 0–1 33–39%; 15–20\n\t// tokens 60%, 10 or less 31–32% (above 30 sold less often but earned the\n\t// most per album, so pricier albums get no price advice).\n\tconst tips = $derived.by(() => {\n\t\tif (!album.isOwner) return [];\n\t\tconst out: { t: string; d: string }[] = [];\n\t\tconst free = album.photos.filter((p) => p.isPreview).length;\n\t\tif (free < 2 && album.photoCount >= 3)\n\t\t\tout.push({ t: 'Make 2–3 of them free', d: 'Albums with 2–3 free ones sold most often.' });\n\t\tif (album.priceTokens < 15)\n\t\t\tout.push({ t: 'Try 15–20 tokens', d: 'Albums at 15–20 sold twice as often as ones at 10.' });\n\t\tif (videoCount === 0)\n\t\t\tout.push({ t: 'Add a clip', d: 'Albums with a clip sell about a quarter more often.' });\n\t\treturn out;\n\t});\n\n\t// ── Lightbox ──────────────────────────────────────────────────────────────\n\tlet lightboxIndex = $state<number | null>(null);\n\tconst lightboxPhoto = $derived(\n\t\tlightboxIndex !== null ? (visiblePhotos[lightboxIndex] ?? null) : null\n\t);\n\t// Start playback the moment the lightbox opens so it's not tap-to-open then\n\t// tap-to-play. Muted-autoplay is the only kind allowed without a fresh\n\t// gesture; iOS checks the muted *attribute* (Svelte sets only the property),\n\t// so set it explicitly + retry on load events. Controls let the user unmute.\n\tfunction autoplayMuted(node: HTMLVideoElement) {\n\t\tnode.muted = true;\n\t\tnode.defaultMuted = true;\n\t\tnode.setAttribute('muted', '');\n\t\tconst play = () => node.play().catch(() => {});\n\t\tplay();\n\t\tnode.addEventListener('loadeddata', play, { once: true });\n\t\tnode.addEventListener('canplay', play, { once: true });\n\t}\n\t// Video load state — a stalled / dead clip used to sit on the native spinner\n\t// forever (this player had no error handling at all). The guard flips to\n\t// `error` on a hard error OR a load timeout; we then show an explicit retry.\n\tlet lightboxVideoEl = $state<HTMLVideoElement | null>(null);\n\tlet videoState = $state<VideoLoadState>('loading');\n\t// Auto-recover once per clip (parity with the chat player's re-sign-on-error);\n\t// bounded so a genuinely dead object doesn't loop invalidateAll forever.\n\tconst autoRecovered = new SvelteSet<string>();\n\n\tasync function resignLightboxVideo() {\n\t\t// Re-run the page load → server re-signs every visible URL; the fresh\n\t\t// signed URL lands in `data.album` and the $effect resyncs it, swapping the\n\t\t// <video> src (which reloads). Also force a reload for the transient case\n\t\t// where the URL is unchanged.\n\t\tawait invalidateAll();\n\t\tlightboxVideoEl?.load();\n\t}\n\tasync function onVideoState(state: VideoLoadState, reason?: 'error' | 'timeout') {\n\t\tvideoState = state;\n\t\tif (state !== 'error') return;\n\t\ttrackVideoLoadError('album', reason ?? 'error', 'lightbox');\n\t\tconst id = lightboxPhoto?.id;\n\t\tif (id && !autoRecovered.has(id)) {\n\t\t\tautoRecovered.add(id);\n\t\t\tawait resignLightboxVideo();\n\t\t}\n\t}\n\tasync function retryLightboxVideo() {\n\t\tvideoState = 'loading';\n\t\tawait resignLightboxVideo();\n\t}\n\n\tfunction openLightbox(url: string) {\n\t\tconst idx = visiblePhotos.findIndex((p) => p.url === url);\n\t\tif (idx >= 0) {\n\t\t\tvideoState = 'loading';\n\t\t\tlightboxIndex = idx;\n\t\t}\n\t}\n\tfunction closeLightbox() {\n\t\tlightboxIndex = null;\n\t}\n\tfunction step(dir: 1 | -1) {\n\t\tif (lightboxIndex === null) return;\n\t\tconst n = visiblePhotos.length;\n\t\tvideoState = 'loading';\n\t\tlightboxIndex = (lightboxIndex + dir + n) % n;\n\t}\n\tfunction onKey(e: KeyboardEvent) {\n\t\tif (lightboxIndex === null) return;\n\t\tif (e.key === 'Escape') closeLightbox();\n\t\telse if (e.key === 'ArrowRight') step(1);\n\t\telse if (e.key === 'ArrowLeft') step(-1);\n\t}\n</script>\n\n<!-- The title and robots tag come from data.seo (RAT-618): a watch page is\n     indexed under its own title, every other album stays noindex. -->\n<svelte:head>\n\t{#if videoJsonLd}\n\t\t{@html videoJsonLd}\n\t{/if}\n</svelte:head>\n\n<svelte:window onkeydown={onKey} />\n\n<main class=\"relative min-h-dvh pt-20 {showBar ? 'pb-44' : 'pb-28'} md:pt-24 md:pb-28\">\n\t<div class=\"mx-auto max-w-5xl px-5\">\n\t\t<!-- Header -->\n\t\t<header class=\"mb-6\">\n\t\t\t<nav aria-label=\"breadcrumb\" class=\"mb-3 font-mono text-[11px] tracking-[0.14em] text-muted uppercase\">\n\t\t\t\t{#if spoke}\n\t\t\t\t\t<a href=\"/sph\" class=\"text-muted no-underline hover:text-text\">SPH</a>\n\t\t\t\t\t<span aria-hidden=\"true\"> / </span>\n\t\t\t\t\t<a href={spoke.path} class=\"text-muted no-underline hover:text-text\">{spoke.name}</a>\n\t\t\t\t{:else}\n\t\t\t\t\t<a href=\"/albums\" class=\"text-muted no-underline hover:text-text\">albums</a>\n\t\t\t\t{/if}\n\t\t\t</nav>\n\t\t\t<p\n\t\t\t\tclass=\"mb-2.5 font-display text-[11px] font-bold tracking-[0.28em] text-fuchsia/80 uppercase\"\n\t\t\t>\n\t\t\t\tpaid album\n\t\t\t</p>\n\t\t\t<h1\n\t\t\t\tclass=\"font-display text-[clamp(2rem,6vw,3.4rem)] leading-[0.95] font-bold tracking-tighter text-text\"\n\t\t\t>\n\t\t\t\t{album.title}\n\t\t\t</h1>\n\t\t\t<div class=\"mt-3.5 flex flex-wrap items-center gap-x-3 gap-y-2 text-[13px] text-muted\">\n\t\t\t\t<a\n\t\t\t\t\thref=\"/u/{album.creator.nickname}\"\n\t\t\t\t\tclass=\"group inline-flex items-center gap-2 font-semibold text-text no-underline\"\n\t\t\t\t>\n\t\t\t\t\t<DuelAvatar nickname={album.creator.nickname} {avatarUrl} size={24} link={false} />\n\t\t\t\t\t<span class=\"group-hover:text-fuchsia\">@{album.creator.nickname ?? 'creator'}</span>\n\t\t\t\t</a>\n\t\t\t\t<span class=\"h-1 w-1 rounded-full bg-muted/40\"></span>\n\t\t\t\t<span>{album.photoCount} {mediaNoun(album.photoCount)}</span>\n\t\t\t\t<span class=\"h-1 w-1 rounded-full bg-muted/40\"></span>\n\t\t\t\t{#if album.isOwner}\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"font-semibold {album.status === 'published' ? 'text-fuchsia' : 'text-yellow'}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{album.status === 'published' ? 'live' : album.status}\n\t\t\t\t\t</span>\n\t\t\t\t{:else}\n\t\t\t\t\t<span>{album.unlockCount} unlocked</span>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t\t<!-- RAT-618: the creator's own words, shown at last (they were saved\n\t\t\t     but never displayed), with what a buyer wants to know first -->\n\t\t\t{#if album.description || isAi || data.watch.fullMinutes}\n\t\t\t\t<div class=\"mt-4 max-w-2xl\">\n\t\t\t\t\t{#if album.description}\n\t\t\t\t\t\t<p class=\"text-sm leading-relaxed whitespace-pre-line text-text/85 md:text-base\">\n\t\t\t\t\t\t\t{album.description}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t{/if}\n\t\t\t\t\t<p class=\"mt-3 flex flex-wrap gap-2 text-[11px] font-semibold\">\n\t\t\t\t\t\t{#if isAi}\n\t\t\t\t\t\t\t<span class=\"rounded-md bg-surface-2 px-2 py-1 text-text\">AI-made</span>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t{#if data.watch.fullMinutes}\n\t\t\t\t\t\t\t<span class=\"rounded-md bg-surface-2 px-2 py-1 text-text\"\n\t\t\t\t\t\t\t\t>{data.watch.fullMinutes} min</span\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t<span class=\"rounded-md bg-surface-2 px-2 py-1 text-text\">{album.priceTokens} tokens</span>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</header>\n\n\t\t{#if heroClip}\n\t\t\t<!-- RAT-618: the free preview as the page's main content: a player, not\n\t\t\t     a tile, so the clip is what the page is about (Google's rule for\n\t\t\t     showing a video result), and the price is one tap below it -->\n\t\t\t<figure class=\"mb-8\">\n\t\t\t\t<!-- `video-with-controls`: layout.css hides the native controls on every\n\t\t\t\t     other <video>, and this one has to be playable as it stands -->\n\t\t\t\t<div class=\"flex justify-center overflow-hidden rounded-2xl border border-border bg-black\">\n\t\t\t\t\t{#if heroClip.gate}\n\t\t\t\t\t\t<!-- RAT-641: behind the age check — the poster's stand-in, no clip -->\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle:aspect-ratio={heroRatio}\n\t\t\t\t\t\t\tstyle:width=\"min(100%, calc(75dvh * {heroRatio}))\"\n\t\t\t\t\t\t\tclass=\"block\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<GatedMedia src={heroClip.url} gate={heroClip.gate} surface=\"album\" size=\"hero\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tsrc={heroClip.url}\n\t\t\t\t\t\t\tposter={heroClip.posterUrl ?? undefined}\n\t\t\t\t\t\t\tcontrols\n\t\t\t\t\t\t\tplaysinline\n\t\t\t\t\t\t\tpreload=\"metadata\"\n\t\t\t\t\t\t\tstyle:aspect-ratio={heroRatio}\n\t\t\t\t\t\t\tstyle:width=\"min(100%, calc(75dvh * {heroRatio}))\"\n\t\t\t\t\t\t\tclass=\"video-with-controls block bg-black object-contain\"\n\t\t\t\t\t\t></video>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\t\t\t\t<figcaption\n\t\t\t\t\tclass=\"mt-3 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\"\n\t\t\t\t>\n\t\t\t\t\t<span class=\"text-[13px] text-muted\">\n\t\t\t\t\t\t{['free preview', fmtDur(heroClip.durationSec), isAi ? 'AI-made' : '']\n\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t.join(' · ')}\n\t\t\t\t\t</span>\n\t\t\t\t\t<!-- from md up: below it the sticky unlock bar is this button -->\n\t\t\t\t\t{#if !album.isOwner}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonclick={() => unlock('player')}\n\t\t\t\t\t\t\tdisabled={unlocking}\n\t\t\t\t\t\t\tclass=\"hidden items-center justify-center rounded-xl bg-fuchsia px-5 py-3 font-display text-[14px] font-bold text-white transition-colors hover:bg-fuchsia-dark disabled:opacity-60 md:inline-flex\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if data.watch.fullMinutes}\n\t\t\t\t\t\t\t\tunlock the full {data.watch.fullMinutes}-minute {lockedClips > 1\n\t\t\t\t\t\t\t\t\t? 'set'\n\t\t\t\t\t\t\t\t\t: 'episode'} · {album.priceTokens} tokens\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\tunlock all {album.photoCount}\n\t\t\t\t\t\t\t\t{mediaNoun(album.photoCount)} · {album.priceTokens} tokens\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{/if}\n\t\t\t\t</figcaption>\n\t\t\t</figure>\n\t\t{/if}\n\n\t\t<div class=\"grid grid-cols-1 gap-7 lg:grid-cols-[minmax(0,1fr)_360px] lg:items-start\">\n\t\t\t<!-- ───────── GALLERY ───────── -->\n\t\t\t<div\n\t\t\t\tclass=\"grid grid-cols-2 gap-2.5 sm:grid-cols-2 {album.isOwner ? 'order-2 lg:order-1' : ''}\"\n\t\t\t>\n\t\t\t\t{#each album.photos as photo, i (photo.id)}\n\t\t\t\t\t{#if photo.gate}\n\t\t\t\t\t\t<!-- RAT-641: a free item behind the age check: its stand-in, a tap\n\t\t\t\t\t\t     opens the check (never the lightbox) -->\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"relative block aspect-[3/4] overflow-hidden rounded-xl border border-border bg-bg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<GatedMedia src={photo.url} gate={photo.gate} surface=\"album\" />\n\t\t\t\t\t\t\t{#if photo.isPreview && !album.unlocked}\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"pointer-events-none absolute top-2 left-2 rounded bg-black/70 px-1.5 py-0.5 font-display text-[9px] font-bold tracking-[0.5px] text-text/90 uppercase backdrop-blur-sm\"\n\t\t\t\t\t\t\t\t\t>preview</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{:else if photo.url}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonclick={() => openLightbox(photo.url!)}\n\t\t\t\t\t\t\tclass=\"group relative block aspect-[3/4] cursor-zoom-in overflow-hidden rounded-xl border border-border bg-bg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if photo.kind === 'video'}\n\t\t\t\t\t\t\t\t{#if photo.posterUrl}\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={photo.posterUrl}\n\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t\t\tdecoding=\"async\"\n\t\t\t\t\t\t\t\t\t\tclass=\"h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t<!-- no captured poster (legacy) — #t=0.1 renders the first frame. -->\n\t\t\t\t\t\t\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\t\tsrc=\"{photo.url}#t=0.1\"\n\t\t\t\t\t\t\t\t\t\tpreload=\"metadata\"\n\t\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\t\tplaysinline\n\t\t\t\t\t\t\t\t\t\tclass=\"h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]\"\n\t\t\t\t\t\t\t\t\t></video>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"pointer-events-none absolute inset-0 grid place-items-center\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"grid h-11 w-11 place-items-center rounded-full bg-black/55 backdrop-blur-sm\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<svg class=\"ml-0.5 h-5 w-5 text-white\" viewBox=\"0 0 24 24\" fill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t><path d=\"M8 5v14l11-7z\" /></svg\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{#if fmtDur(photo.durationSec)}\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"pointer-events-none absolute right-2 bottom-2 rounded bg-black/75 px-1.5 py-0.5 font-display text-[10px] font-bold text-text/90 tabular-nums backdrop-blur-sm\"\n\t\t\t\t\t\t\t\t\t\t>{fmtDur(photo.durationSec)}</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={photo.url}\n\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t\tdecoding=\"async\"\n\t\t\t\t\t\t\t\t\tclass=\"h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if photo.isPreview && !album.unlocked}\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"absolute top-2 left-2 rounded bg-black/70 px-1.5 py-0.5 font-display text-[9px] font-bold tracking-[0.5px] text-text/90 uppercase backdrop-blur-sm\"\n\t\t\t\t\t\t\t\t\t>preview</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<!-- locked tile: a blurred stand-in drawn server-side from a 32 px\n\t\t\t\t\t\t     rendition (shape, no detail) under the lock; no file URL emitted -->\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"relative grid aspect-[3/4] place-items-center overflow-hidden rounded-xl border border-border bg-surface\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if photo.blurrable && !blurFailed.has(photo.id)}\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc=\"/album/{album.id}/blur/{photo.id}.jpg\"\n\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t\tdecoding=\"async\"\n\t\t\t\t\t\t\t\t\tonerror={() => blurFailed.add(photo.id)}\n\t\t\t\t\t\t\t\t\tclass=\"absolute inset-0 h-full w-full scale-110 object-cover\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<span class=\"absolute inset-0 bg-black/35\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<span class=\"relative grid h-11 w-11 place-items-center rounded-full bg-black/50 text-white\">\n\t\t\t\t\t\t\t\t<svg class=\"h-5 w-5\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t><path\n\t\t\t\t\t\t\t\t\t\td=\"M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z\"\n\t\t\t\t\t\t\t\t\t/></svg\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{#if photo.kind === 'video'}\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"absolute top-2 right-2 inline-flex items-center gap-1 rounded bg-black/70 px-1.5 py-0.5 font-display text-[10px] font-bold text-white tabular-nums\"\n\t\t\t\t\t\t\t\t\t><svg class=\"h-2.5 w-2.5\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t><path d=\"M8 5v14l11-7z\" /></svg\n\t\t\t\t\t\t\t\t\t>{fmtDur(photo.durationSec) || 'clip'}</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if i === album.photos.length - 1 && lockedCount > 1}\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"absolute right-0 bottom-2.5 left-0 text-center font-display text-[11px] font-bold text-white/90\"\n\t\t\t\t\t\t\t\t\t>+ {lockedCount} locked</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t{/each}\n\t\t\t</div>\n\n\t\t\t<!-- ───────── RIGHT RAIL ───────── -->\n\t\t\t<aside\n\t\t\t\tclass=\"flex flex-col gap-3.5 lg:sticky lg:top-24 {album.isOwner\n\t\t\t\t\t? 'order-1 lg:order-2'\n\t\t\t\t\t: ''}\"\n\t\t\t>\n\t\t\t\t{#if !album.unlocked}\n\t\t\t\t\t<!-- BUY BOX -->\n\t\t\t\t\t<div class=\"rounded-2xl border border-border bg-surface p-5\">\n\t\t\t\t\t\t<a href=\"/u/{album.creator.nickname}\" class=\"flex items-center gap-3 no-underline\">\n\t\t\t\t\t\t\t<DuelAvatar nickname={album.creator.nickname} {avatarUrl} size={40} link={false} />\n\t\t\t\t\t\t\t<div class=\"min-w-0\">\n\t\t\t\t\t\t\t\t<div class=\"truncate font-display text-[15px] font-bold text-text\">\n\t\t\t\t\t\t\t\t\t@{album.creator.nickname ?? 'creator'}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{#if rating.count > 0}\n\t\t\t\t\t\t\t\t\t<div class=\"text-[12px] text-muted\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"text-yellow\">★</span>\n\t\t\t\t\t\t\t\t\t\t{rating.avg.toFixed(1)} · {rating.count}\n\t\t\t\t\t\t\t\t\t\t{rating.count === 1 ? 'review' : 'reviews'}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t<div class=\"text-[12px] text-muted\">creator on ratemyd</div>\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</a>\n\n\t\t\t\t\t\t<div class=\"my-4 h-px bg-border\"></div>\n\n\t\t\t\t\t\t<div class=\"flex items-baseline gap-2\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"font-display text-[40px] leading-none font-bold tracking-tighter text-yellow\"\n\t\t\t\t\t\t\t\t>{album.priceTokens}</span\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[14px] text-muted\">tokens</span>\n\t\t\t\t\t\t\t<span class=\"ml-auto text-[12px] text-muted\"\n\t\t\t\t\t\t\t\t>one-time · unlocks all {album.photoCount}</span\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{#if finishing === 'late'}\n\t\t\t\t\t\t\t<p class=\"mt-4 text-center text-[12.5px] text-muted-2\" role=\"status\">\n\t\t\t\t\t\t\t\tyour tokens are on the way — it unlocks by itself the moment they land.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t{#if finishing === 'waiting'}\n\t\t\t\t\t\t\t<!-- RAT-534: back from checkout — the unlock finishes by itself. -->\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"mt-4 flex w-full items-center justify-center gap-2 rounded-xl bg-surface-2 px-5 py-3.5 text-[14px] font-semibold text-text\"\n\t\t\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"inline-block h-2 w-2 animate-pulse rounded-full bg-yellow\"></span>\n\t\t\t\t\t\t\t\tfinishing your purchase…\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tuse:watchBoxButton\n\t\t\t\t\t\t\tonclick={() => unlock('box')}\n\t\t\t\t\t\t\tdisabled={unlocking}\n\t\t\t\t\t\t\tclass=\"mt-4 flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl bg-yellow px-5 py-3.5 font-display text-[15px] font-bold tracking-tight text-black transition-colors hover:bg-yellow/85 disabled:opacity-50\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if unlocking}\n\t\t\t\t\t\t\t\tunlocking…\n\t\t\t\t\t\t\t{:else if !data.isLoggedIn}\n\t\t\t\t\t\t\t\tsign in to unlock\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<svg class=\"h-4 w-4\" viewBox=\"0 0 24 24\" fill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t><path\n\t\t\t\t\t\t\t\t\t\td=\"M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z\"\n\t\t\t\t\t\t\t\t\t/></svg\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tunlock the full album\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t{#if errorMsg}\n\t\t\t\t\t\t\t<p class=\"mt-2 text-center text-[12px] font-medium text-coral\">{errorMsg}</p>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t{#if bundle?.withThis && finishing === 'idle'}\n\t\t\t\t\t\t\t{@render bundleOffer(`all ${bundle.count} albums from @${album.creator.nickname ?? 'creator'}`)}\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t{#if album.unlockCount > 0}\n\t\t\t\t\t\t\t<p class=\"mt-3 text-center text-[12.5px] text-muted\">\n\t\t\t\t\t\t\t\t<b class=\"font-semibold text-text\"\n\t\t\t\t\t\t\t\t\t>{album.unlockCount} {album.unlockCount === 1 ? 'person' : 'people'}</b\n\t\t\t\t\t\t\t\t> already unlocked this\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t<div class=\"mt-4 flex flex-col gap-2.5 border-t border-border pt-4\">\n\t\t\t\t\t\t\t{#each [`all ${album.photoCount} ${mediaNoun(album.photoCount)} in full resolution`, 'yours forever — unlock once, view anytime', 'instant access, no subscription'] as line (line)}\n\t\t\t\t\t\t\t\t<div class=\"flex items-start gap-2 text-[13px] text-muted\">\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\tclass=\"mt-0.5 h-3.5 w-3.5 shrink-0 text-green\"\n\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\tstroke-width=\"3\"\n\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"><path d=\"M20 6 9 17l-5-5\" /></svg\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span>{line}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{#if data.isLoggedIn}\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"mt-4 flex items-center justify-between rounded-xl border border-border bg-bg px-3.5 py-2.5 text-[12.5px] text-muted\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t>your balance: <b class=\"font-semibold {canAfford ? 'text-text' : 'text-coral'}\"\n\t\t\t\t\t\t\t\t\t\t>{tokens} tokens</b\n\t\t\t\t\t\t\t\t\t></span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\t\t\t\tbuyFor = 'album';\n\t\t\t\t\t\t\t\t\t\tshowBuy = true;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclass=\"font-semibold text-yellow hover:underline\">get more →</button\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\t\t\t\t{:else if album.isOwner}\n\t\t\t\t\t{#if justPublished}\n\t\t\t\t\t\t<!-- Straight from publishing: the one thing left to do is share it -->\n\t\t\t\t\t\t<section aria-labelledby=\"live-h\" class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t\t<span class=\"grid h-10 w-10 place-items-center rounded-full bg-text text-bg\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<svg class=\"h-5 w-5\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n\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>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<h2 id=\"live-h\" class=\"mt-3 font-display text-[22px] font-bold tracking-tight text-text\">\n\t\t\t\t\t\t\t\tYour album is live.\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<p class=\"mt-1 text-[14px] leading-snug text-muted-2\">\n\t\t\t\t\t\t\t\tEach unlock pays you {payoutUsd(album.priceTokens)}. Albums sell when people see them: share the link.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonclick={shareAlbum}\n\t\t\t\t\t\t\t\tclass=\"mt-4 flex min-h-12 w-full items-center justify-center rounded-xl bg-fuchsia px-4 font-display text-[15px] font-bold text-white transition-colors hover:bg-fuchsia-dark\"\n\t\t\t\t\t\t\t\t>Share</button\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonclick={copyLink}\n\t\t\t\t\t\t\t\tclass=\"mt-2 flex min-h-11 w-full items-center justify-center rounded-xl bg-surface-2 px-4 text-[14px] font-semibold text-text transition-colors hover:bg-border\"\n\t\t\t\t\t\t\t\t>{copied ? 'Link copied' : 'Copy link'}</button\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if pushState === 'default' || pushState === 'asking'}\n\t\t\t\t\t\t\t\t<div class=\"mt-4 flex items-center justify-between gap-3 border-t border-border pt-4\">\n\t\t\t\t\t\t\t\t\t<p class=\"text-[13.5px] text-muted-2\">Get a notification when it sells</p>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonclick={turnOnPush}\n\t\t\t\t\t\t\t\t\t\tdisabled={pushState === 'asking'}\n\t\t\t\t\t\t\t\t\t\tclass=\"min-h-11 shrink-0 rounded-full bg-surface-2 px-4 text-[14px] font-semibold text-text transition-colors hover:bg-border disabled:opacity-60\"\n\t\t\t\t\t\t\t\t\t\t>Turn on</button\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<p class=\"mt-4 border-t border-border pt-4 text-[13px] text-muted\">\n\t\t\t\t\t\t\t\t\t{pushState === 'granted'\n\t\t\t\t\t\t\t\t\t\t? 'You’ll get a notification and an email when it sells.'\n\t\t\t\t\t\t\t\t\t\t: 'We’ll email you when it sells.'}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</section>\n\t\t\t\t\t{/if}\n\n\t\t\t\t\t<!-- CREATOR DASHBOARD: what it earned, in dollars -->\n\t\t\t\t\t<section aria-labelledby=\"owner-h\" class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t<div class=\"flex items-center justify-between gap-3\">\n\t\t\t\t\t\t\t<h2 id=\"owner-h\" class=\"text-[13px] font-medium text-muted\">Your album</h2>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"rounded-full px-2.5 py-1 text-[12px] font-semibold {album.status === 'published'\n\t\t\t\t\t\t\t\t\t? 'bg-text text-bg'\n\t\t\t\t\t\t\t\t\t: 'bg-surface-2 text-muted-2'}\"\n\t\t\t\t\t\t\t\t>{album.status === 'published' ? 'Live' : album.status === 'draft' ? 'Draft' : 'Hidden'}</span\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"mt-3 grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t<div class=\"rounded-xl bg-bg px-3.5 py-3\">\n\t\t\t\t\t\t\t\t<p class=\"font-display text-[24px] leading-none font-bold tracking-tight text-text tabular-nums\">\n\t\t\t\t\t\t\t\t\t{album.unlockCount}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p class=\"mt-1.5 text-[12px] text-muted\">{album.unlockCount === 1 ? 'Unlock' : 'Unlocks'}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"rounded-xl bg-bg px-3.5 py-3\">\n\t\t\t\t\t\t\t\t<p class=\"font-display text-[24px] leading-none font-bold tracking-tight text-text tabular-nums\">\n\t\t\t\t\t\t\t\t\t{payoutUsd(data.earnedTokens)}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p class=\"mt-1.5 text-[12px] text-muted\">Earned</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p class=\"mt-3 text-[13.5px] text-muted-2\">\n\t\t\t\t\t\t\t{album.priceTokens} tokens · each unlock pays you\n\t\t\t\t\t\t\t<b class=\"font-semibold text-text\">{payoutUsd(album.priceTokens)}</b>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref=\"/album/{album.id}/edit\"\n\t\t\t\t\t\t\tclass=\"mt-3.5 flex min-h-11 items-center justify-center rounded-xl bg-surface-2 px-4 text-[14px] font-semibold text-text no-underline transition-colors hover:bg-border\"\n\t\t\t\t\t\t\t>Edit album</a\n\t\t\t\t\t\t>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t{#if album.status === 'published'}\n\t\t\t\t\t\t{#if !justPublished}\n\t\t\t\t\t\t\t<!-- SHARE -->\n\t\t\t\t\t\t\t<section aria-labelledby=\"share-h\" class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t\t\t<h3 id=\"share-h\" class=\"font-display text-[16px] font-bold tracking-tight text-text\">Share to sell more</h3>\n\t\t\t\t\t\t\t\t<p class=\"mt-1 text-[13px] text-muted\">Albums sell when people see them.</p>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonclick={shareAlbum}\n\t\t\t\t\t\t\t\t\tclass=\"mt-3.5 flex min-h-12 w-full items-center justify-center rounded-xl bg-fuchsia px-4 font-display text-[15px] font-bold text-white transition-colors hover:bg-fuchsia-dark\"\n\t\t\t\t\t\t\t\t\t>Share</button\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\thref={redditHref}\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\trel=\"noopener\"\n\t\t\t\t\t\t\t\t\tclass=\"mt-2 flex min-h-11 items-center justify-center rounded-xl bg-surface-2 px-4 text-[14px] font-semibold text-text no-underline transition-colors hover:bg-border\"\n\t\t\t\t\t\t\t\t\t>Post on Reddit</a\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div class=\"mt-2 flex items-center gap-2 rounded-xl bg-bg py-1 pr-1 pl-3.5\">\n\t\t\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1 truncate text-[12.5px] text-muted\"\n\t\t\t\t\t\t\t\t\t\t>{albumUrl || `ratemyd.app/album/${album.id}`}</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonclick={copyLink}\n\t\t\t\t\t\t\t\t\t\tclass=\"min-h-10 shrink-0 rounded-lg px-3 text-[13px] font-semibold text-text hover:bg-surface-2\"\n\t\t\t\t\t\t\t\t\t\t>{copied ? 'Copied' : 'Copy'}</button\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t{#if tips.length > 0}\n\t\t\t\t\t\t\t<!-- SELL MORE: only the tips this album hasn't taken yet -->\n\t\t\t\t\t\t\t<section aria-labelledby=\"tips-h\" class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t\t\t<h3 id=\"tips-h\" class=\"text-[13px] font-medium text-muted\">To sell more</h3>\n\t\t\t\t\t\t\t\t<ul class=\"mt-3 flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t{#each tips as tip (tip.t)}\n\t\t\t\t\t\t\t\t\t\t<li class=\"text-[13.5px] leading-snug\">\n\t\t\t\t\t\t\t\t\t\t\t<b class=\"font-semibold text-text\">{tip.t}.</b>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-muted\">{tip.d}</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<!-- not live: one way forward -->\n\t\t\t\t\t\t<section class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t\t<h3 class=\"font-display text-[16px] font-bold tracking-tight text-text\">\n\t\t\t\t\t\t\t\t{album.status === 'draft' ? 'Buyers can’t see it yet' : 'Hidden from buyers'}\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t<p class=\"mt-1 text-[13px] text-muted\">\n\t\t\t\t\t\t\t\t{album.status === 'draft'\n\t\t\t\t\t\t\t\t\t? 'Publish it to start earning.'\n\t\t\t\t\t\t\t\t\t: 'Buyers who unlocked it keep it. Publish it again to sell it.'}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"/album/{album.id}/edit\"\n\t\t\t\t\t\t\t\tclass=\"mt-3.5 flex min-h-12 items-center justify-center rounded-xl bg-fuchsia px-4 font-display text-[15px] font-bold text-white no-underline transition-colors hover:bg-fuchsia-dark\"\n\t\t\t\t\t\t\t\t>{album.status === 'draft' ? 'Finish & publish' : 'Open the editor'}</a\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t{/if}\n\t\t\t\t{:else if data.isLoggedIn && album.creator.nickname}\n\t\t\t\t\t<!-- RAT-534: unlocked — the creator is one message away, and has more. -->\n\t\t\t\t\t<div class=\"rounded-2xl bg-surface p-5\">\n\t\t\t\t\t\t<p class=\"text-[11px] font-bold tracking-[0.18em] text-muted uppercase\">it's yours</p>\n\t\t\t\t\t\t{#if bundleDone > 1}\n\t\t\t\t\t\t\t<p class=\"mt-2 text-[15px] font-semibold text-text\" role=\"status\">\n\t\t\t\t\t\t\t\tall {bundleDone} albums by @{album.creator.nickname} are yours now.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonclick={messageCreator}\n\t\t\t\t\t\t\tclass=\"mt-3 flex w-full items-center justify-center rounded-xl bg-text px-5 py-3.5 font-display text-[15px] font-bold tracking-tight text-bg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmessage @{album.creator.nickname}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<p class=\"mt-2 text-center text-[12px] text-muted\">\n\t\t\t\t\t\t\topens your chat with “just unlocked {album.title}” ready to send\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t{#if bundle && !bundle.withThis}\n\t\t\t\t\t\t\t{#if finishing !== 'idle'}\n\t\t\t\t\t\t\t\t<p class=\"mt-4 flex items-center justify-center gap-2 rounded-xl bg-bg px-4 py-3 text-[13.5px] font-semibold text-text\" role=\"status\">\n\t\t\t\t\t\t\t\t\t<span class=\"inline-block h-2 w-2 animate-pulse rounded-full bg-yellow\"></span>\n\t\t\t\t\t\t\t\t\tfinishing your purchase…\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t{@render bundleOffer(`the other ${bundle.count} albums from @${album.creator.nickname}`)}\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t{#if data.moreAlbums.length > 0}\n\t\t\t\t\t\t\t<div class=\"mt-5 border-t border-border pt-4\">\n\t\t\t\t\t\t\t\t<div class=\"flex items-baseline justify-between\">\n\t\t\t\t\t\t\t\t\t<p class=\"text-[13px] font-semibold text-text\">more from @{album.creator.nickname}</p>\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref={resolve('/u/[nickname]', { nickname: album.creator.nickname })}\n\t\t\t\t\t\t\t\t\t\tclass=\"text-[12px] text-muted no-underline hover:text-text\">see all →</a\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"mt-3 grid grid-cols-3 gap-2\">\n\t\t\t\t\t\t\t\t\t{#each data.moreAlbums as a (a.id)}\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={resolve('/album/[id]', { id: a.id })}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"group block overflow-hidden rounded-lg bg-bg no-underline\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"aspect-[4/5] overflow-hidden bg-surface-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t{#if a.gate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GatedMedia src={a.coverUrl} gate={a.gate} surface=\"album\" />\n\t\t\t\t\t\t\t\t\t\t\t\t{:else if a.coverUrl || a.coverPosterUrl}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc={a.coverKind === 'video' ? (a.coverPosterUrl ?? '') : (a.coverUrl ?? '')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-full w-full object-cover\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"truncate px-1.5 py-1 text-[11px] text-muted group-hover:text-text\">\n\t\t\t\t\t\t\t\t\t\t\t\t{a.priceTokens} tokens\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t{/each}\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{/if}\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\n\t\t\t\t{#if !album.isOwner}\n\t\t\t\t\t<div class=\"flex justify-center pt-1\">\n\t\t\t\t\t\t<ReportTrigger entityType=\"creator_album\" entityId={album.id} label=\"report this album\" />\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\t\t\t</aside>\n\t\t</div>\n\n\t\t<!-- RAT-618: where to go next, for the buyer and for the crawler -->\n\t\t<p class=\"mt-10 flex flex-wrap gap-x-6 gap-y-2 text-sm font-semibold\">\n\t\t\t{#if spoke}\n\t\t\t\t<a href={spoke.path} class=\"text-text no-underline hover:text-fuchsia\">more {spoke.name} →</a>\n\t\t\t{/if}\n\t\t\t{#if album.creator.nickname}\n\t\t\t\t<a href=\"/u/{album.creator.nickname}\" class=\"text-muted no-underline hover:text-text\"\n\t\t\t\t\t>more from @{album.creator.nickname} →</a\n\t\t\t\t>\n\t\t\t{/if}\n\t\t\t<a href=\"/albums\" class=\"text-muted no-underline hover:text-text\">all albums →</a>\n\t\t</p>\n\t</div>\n</main>\n\n<!-- The creator bundle as one row: what's in it, the price against the full\n     one, and a single button (the buy box and the unlocked card share it). -->\n{#snippet bundleOffer(label: string)}\n\t{#if bundle}\n\t\t<div class=\"mt-3 flex items-center gap-3 rounded-xl border border-border bg-bg py-2.5 pr-2.5 pl-3.5\">\n\t\t\t<div class=\"min-w-0 flex-1\">\n\t\t\t\t<p class=\"text-[13.5px] leading-snug font-semibold text-text\">{label}</p>\n\t\t\t\t<p class=\"mt-0.5 text-[12.5px] text-muted\">\n\t\t\t\t\t<b class=\"font-semibold text-yellow\">{bundle.price} tokens</b>\n\t\t\t\t\t<s class=\"ml-1 text-muted/80\">{bundle.full}</s> · save {bundle.full - bundle.price}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={() => unlockBundle(true)}\n\t\t\t\tdisabled={bundling}\n\t\t\t\tclass=\"min-h-11 shrink-0 rounded-xl bg-text px-4 font-display text-[14px] font-bold text-bg transition-opacity hover:opacity-90 disabled:opacity-50\"\n\t\t\t\t>{bundling ? 'unlocking…' : 'get all'}</button\n\t\t\t>\n\t\t</div>\n\t\t{#if bundleError}\n\t\t\t<p class=\"mt-2 text-center text-[12px] font-medium text-coral\" role=\"alert\">{bundleError}</p>\n\t\t{/if}\n\t{/if}\n{/snippet}\n\n<!-- Lightbox -->\n{#if lightboxPhoto?.url}\n\t<div\n\t\tclass=\"fixed inset-0 z-[120] flex items-center justify-center bg-black/90 backdrop-blur-sm\"\n\t\trole=\"dialog\"\n\t\taria-modal=\"true\"\n\t>\n\t\t<button class=\"absolute inset-0 cursor-zoom-out\" onclick={closeLightbox} aria-label=\"Close\"\n\t\t></button>\n\t\t{#if lightboxPhoto.kind === 'video'}\n\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t<!-- `video-with-controls` opts back into the native UA controls (scrub,\n\t\t\t\t pause, volume, fullscreen); layout.css hides native controls on every\n\t\t\t\t other <video>. Same opt-in the rate-session viewer uses. Poster gives\n\t\t\t\t an instant frame; #key remounts when stepping between clips. -->\n\t\t\t{#key lightboxPhoto.id}\n\t\t\t\t<div class=\"relative z-[1] flex max-h-[88dvh] max-w-[92vw]\">\n\t\t\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t\t\t<video\n\t\t\t\t\t\tbind:this={lightboxVideoEl}\n\t\t\t\t\t\tuse:autoplayMuted\n\t\t\t\t\t\tuse:videoLoadGuard={{ onState: onVideoState }}\n\t\t\t\t\t\tsrc={lightboxPhoto.url}\n\t\t\t\t\t\tposter={lightboxPhoto.posterUrl}\n\t\t\t\t\t\tcontrols\n\t\t\t\t\t\tautoplay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tplaysinline\n\t\t\t\t\t\tpreload=\"auto\"\n\t\t\t\t\t\tclass=\"video-with-controls max-h-[88dvh] max-w-[92vw] object-contain\"\n\t\t\t\t\t></video>\n\t\t\t\t\t{#if videoState === 'error'}\n\t\t\t\t\t\t<!-- Explicit recovery in place of the endless native spinner. -->\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"absolute inset-0 z-[2] flex flex-col items-center justify-center gap-3.5 rounded-lg bg-black/70 p-6 text-center backdrop-blur-sm\"\n\t\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p class=\"m-0 text-[14px] text-white/85\">couldn't load this video.</p>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonclick={retryLightboxVideo}\n\t\t\t\t\t\t\t\tclass=\"rounded-[10px] bg-fuchsia px-6 py-2.5 font-display text-[14px] font-bold text-white transition-colors hover:bg-fuchsia-dark\"\n\t\t\t\t\t\t\t\t>retry</button\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\t\t\t{/key}\n\t\t{:else}\n\t\t\t<img\n\t\t\t\tsrc={lightboxPhoto.url}\n\t\t\t\talt=\"\"\n\t\t\t\tclass=\"relative z-[1] max-h-[88dvh] max-w-[92vw] object-contain\"\n\t\t\t/>\n\t\t{/if}\n\t\t{#if visiblePhotos.length > 1}\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={() => step(-1)}\n\t\t\t\taria-label=\"Previous\"\n\t\t\t\tclass=\"absolute left-3 z-[2] flex h-11 w-11 items-center justify-center rounded-full border border-white/15 bg-black/50 text-white transition-colors hover:bg-black/70 sm:left-6\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"h-5 w-5\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"><path d=\"m15 18-6-6 6-6\" /></svg\n\t\t\t\t>\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={() => step(1)}\n\t\t\t\taria-label=\"Next\"\n\t\t\t\tclass=\"absolute right-3 z-[2] flex h-11 w-11 items-center justify-center rounded-full border border-white/15 bg-black/50 text-white transition-colors hover:bg-black/70 sm:right-6\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"h-5 w-5\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"><path d=\"m9 18 6-6-6-6\" /></svg\n\t\t\t\t>\n\t\t\t</button>\n\t\t{/if}\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tonclick={closeLightbox}\n\t\t\taria-label=\"Close\"\n\t\t\tclass=\"absolute top-4 right-4 z-[2] flex h-10 w-10 items-center justify-center rounded-full border border-white/15 bg-black/50 text-white transition-colors hover:bg-black/70\"\n\t\t>\n\t\t\t<svg\n\t\t\t\tclass=\"h-5 w-5\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstroke-width=\"2\"\n\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\tstroke-linejoin=\"round\"><path d=\"M18 6 6 18M6 6l12 12\" /></svg\n\t\t\t>\n\t\t</button>\n\t</div>\n{/if}\n\n{#if showBar}\n\t<AlbumUnlockBar\n\t\tpriceTokens={album.priceTokens}\n\t\tcount={album.photoCount}\n\t\tnoun={mediaNoun(album.photoCount)}\n\t\tsignedIn={data.isLoggedIn}\n\t\tbusy={unlocking || finishing === 'waiting'}\n\t\thidden={boxInView}\n\t\terror={errorMsg}\n\t\tonunlock={() => unlock('bar')}\n\t/>\n{/if}\n\n<BuyTokensModal\n\topen={showBuy}\n\tonclose={() => (showBuy = false)}\n\treason={buyReason}\n\t{need}\n\tnote=\"it unlocks by itself once you’re back.\"\n\tsuccessPath={buySuccessPath}\n\tsource={buyFor === 'bundle' ? 'album_bundle' : 'album_next'}\n/>\n"],"version":3}