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A,QAAQ,0BAA2B,OAAAA,EAAA,MAAA,QAAQ,6BAA8B,OAAAA,EAAA,MAAA,QAAQ,mBAAoB,OAH7JiD,CAAG,wBAEmD,QAAQ,UAAY,WAAS,EAAA,EAAA,CAAA,MAFnFA,CAAG,cAMHO,EAAGC,GAAA,MAAHD,CAAG,iBAEDE,EAAIC,GAAA,EAAEC,IAANF,CAAI,MAAEE,EAAC,EAAA,IAADA,CAAC,QAAPF,CAAI,oBAA2C,WAAW,CAAA,MAA1DA,CAAI,aAEJG,EAAIC,GAAA,MAAJD,EAAI,EAAA,IAAJA,CAAI,mBAAEE,GAAe/D,EAAA,KAAA,CAAA,CAAA,MAArB6D,CAAI,WAHK7D,EAAA,MAAA,YAAc,EAACwB,EAAAwC,CAAA,EAAAxC,EAAAyC,EAAA,EAAA,MAD1BT,CAAG,MAAHA,CAAG,YAPAhE,EAAW,EAAAgC,EAAA0C,EAAA,EAAA1C,EAAA2C,GAAA,EAAA,MAHhBpB,CAAG,EAlFJZ,EAAAtB,CAAA,KAAAA,EAAA,CAAAuD,EAAAC,IAAAC,KAAAF,EAAAC,CAAA,EAAA,IAAA9D,EAGqBN,CAAO,GAAIH,EAAS,EAAK,CAAA,QAAOE,EAAA,MAAQ,GAAI,QAASH,EAAO,CAAA,EAAM,MAAS,SAHhG0E,GAAA1D,EAAA,OAAAN,EACMD,CAAM,CAAA,EADZiB,EAAAV,EAAA,EAAA,mIAAAN,EAIwII,CAAe,GAAA,EAAA,EAAA,EAkBrJY,EAAAI,EAAA,EAAA,6IAAApB,EACkJG,CAAQ,GAAA,EAAA,6BAAA,kBAsDlJ,YAAU,EAAA,EAAA,eAMuD,KAAK,IAnFhF8D,GAAA,QAAA3D,EAESL,CAAW,EAFpB4B,EAAAlB,EAAAL,CAAA,MAFO","names":["showCreator","owner","href","onclick","tint","surface","trackView","$.prop","$$props","tracked","$.derived","avatarUrl","getAvatarUrl","locked","target","$.get","handleClick","recordAlbumClick","tintText","tintHoverBorder","tintGrad","a","root","div","$.child","AlbumCoverMedia","$$anchor","div_1","$.first_child","fragment_1","$.template_effect","$.set_class","$$render","consequent","alternate","span","$.sibling","node","div_2","node_1","span_1","root_3","text","$.reset","$.append","span_2","root_4","node_2","TokenCoin","span_3","root_5","consequent_2","alternate_1","span_4","text_2","div_3","div_4","div_5","root_6","DuelAvatar","node_4","span_5","UserBadge","node_5","div_6","root_7","span_6","root_8","b","span_7","root_9","albumCountLabel","consequent_4","alternate_2","consequent_3","alternate_3","$$node","$$action_arg","albumImpression","$.set_attribute","$.delegated"],"sources":["../../../../../../src/lib/components/album/AlbumCard.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport type { AlbumCard } from '$lib/types/album';\n\timport { albumCountLabel } from '$lib/types/album';\n\timport { getAvatarUrl } from '$lib/avatar';\n\timport DuelAvatar from '$lib/components/duel/DuelAvatar.svelte';\n\timport TokenCoin from '$lib/components/TokenCoin.svelte';\n\timport UserBadge from '$lib/components/UserBadge.svelte';\n\timport AlbumCoverMedia from '$lib/components/album/AlbumCoverMedia.svelte';\n\timport { albumImpression, recordAlbumClick, type AlbumSurface } from '$lib/album-impressions';\n\n\tinterface Props {\n\t\talbum: AlbumCard;\n\t\t/** Show the creator row (used on /r + feed where albums aren't already\n\t\t *  under a creator's profile). Off on the owner's own profile grid. */\n\t\tshowCreator?: boolean;\n\t\t/** Owner studio mode: show the album status (draft/published) instead of\n\t\t *  the unlock/price badge, and link to the editor by default. */\n\t\towner?: boolean;\n\t\t/** Link target override (studio points cards at the editor). */\n\t\thref?: string | undefined;\n\t\tonclick?: (() => void) | undefined;\n\t\t/** Chrome tint. Defaults to the fuchsia album brand; pass 'accent' to\n\t\t *  follow the host page's themed accent (e.g. green on /r raters), or\n\t\t *  'neutral' for no hue at all (the signup-first landing keeps to two\n\t\t *  accents, coral and token gold). */\n\t\ttint?: 'fuchsia' | 'accent' | 'neutral';\n\t\t/** RAT-449: funnel tracking. When set, the card carries ?src=<surface> into\n\t\t *  the album link + records a click. `trackView` also counts a real-visibility\n\t\t *  impression (off where the page records impressions itself, e.g. profile\n\t\t *  counts every visit rather than card-scroll). No tracking in owner mode. */\n\t\tsurface?: AlbumSurface | undefined;\n\t\ttrackView?: boolean;\n\t}\n\n\tlet {\n\t\talbum,\n\t\tshowCreator = false,\n\t\towner = false,\n\t\thref = undefined,\n\t\tonclick = undefined,\n\t\ttint = 'fuchsia',\n\t\tsurface = undefined,\n\t\ttrackView = true\n\t}: Props = $props();\n\n\tconst tracked = $derived(!!surface && !owner);\n\n\tconst avatarUrl = $derived(getAvatarUrl(album.creator.avatarPath));\n\t// Locked = priced content the viewer hasn't unlocked (and isn't the owner).\n\tconst locked = $derived(!album.unlocked);\n\tconst target = $derived(\n\t\thref ??\n\t\t\t(owner\n\t\t\t\t? `/album/${album.id}/edit`\n\t\t\t\t: `/album/${album.id}${tracked ? `?src=${surface}` : ''}`)\n\t);\n\tfunction handleClick() {\n\t\tif (tracked) recordAlbumClick(album.id, surface!);\n\t\tonclick?.();\n\t}\n\n\t// Tint class fragments — full literal strings so Tailwind's scanner keeps them.\n\tconst tintText = $derived(\n\t\ttint === 'accent' ? 'text-accent' : tint === 'neutral' ? 'text-text' : 'text-fuchsia'\n\t);\n\tconst tintHoverBorder = $derived(\n\t\ttint === 'accent'\n\t\t\t? 'hover:border-accent/45'\n\t\t\t: tint === 'neutral'\n\t\t\t\t? 'hover:border-muted/60'\n\t\t\t\t: 'hover:border-fuchsia/40'\n\t);\n\tconst tintGrad = $derived(\n\t\ttint === 'accent' ? 'from-accent/25' : tint === 'neutral' ? 'from-white/5' : 'from-fuchsia/25'\n\t);\n</script>\n\n<a\n\thref={target}\n\tonclick={handleClick}\n\tuse:albumImpression={tracked && trackView ? { albumId: album.id, surface: surface! } : undefined}\n\tclass=\"album-card group flex h-full flex-col overflow-hidden rounded-xl border border-border bg-surface no-underline transition-colors {tintHoverBorder}\"\n>\n\t<div class=\"relative aspect-square shrink-0 overflow-hidden bg-bg\">\n\t\t{#if album.coverUrl}\n\t\t\t<AlbumCoverMedia\n\t\t\t\turl={album.coverUrl}\n\t\t\t\tkind={album.coverKind}\n\t\t\t\tposterUrl={album.coverPosterUrl}\n\t\t\t\timgClass=\"absolute inset-0 h-full w-full object-cover transition-transform duration-700 group-hover:scale-[1.04]\"\n\t\t\t/>\n\t\t{:else}\n\t\t\t<div class=\"absolute inset-0 bg-gradient-to-br {tintGrad} to-bg/0\"></div>\n\t\t\t<div\n\t\t\t\tclass=\"absolute inset-0 bg-[radial-gradient(circle_at_30%_25%,rgba(255,255,255,0.05),transparent_55%)]\"\n\t\t\t></div>\n\t\t{/if}\n\n\t\t<!-- top-left: ALBUM type tag -->\n\t\t<span\n\t\t\tclass=\"absolute top-2 left-2 inline-flex items-center gap-1 rounded bg-black/70 px-1.5 py-0.5 font-display text-[9px] font-bold tracking-[0.5px] {tintText} uppercase backdrop-blur-sm\"\n\t\t>\n\t\t\talbum\n\t\t</span>\n\n\t\t<!-- bottom overlay: price (locked) or unlocked badge -->\n\t\t<div\n\t\t\tclass=\"absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 bg-gradient-to-t from-black/65 to-transparent p-2\"\n\t\t>\n\t\t\t{#if owner}\n\t\t\t\t<span\n\t\t\t\t\tclass=\"inline-flex items-center gap-1 rounded bg-black/75 px-1.5 py-1 font-display text-[10px] font-bold tracking-tight backdrop-blur-sm {album.status ===\n\t\t\t\t\t'published'\n\t\t\t\t\t\t? tintText\n\t\t\t\t\t\t: album.status === 'draft'\n\t\t\t\t\t\t\t? 'text-yellow'\n\t\t\t\t\t\t\t: 'text-muted'}\"\n\t\t\t\t>\n\t\t\t\t\t{album.status}\n\t\t\t\t</span>\n\t\t\t{:else if locked}\n\t\t\t\t<span\n\t\t\t\t\tclass=\"inline-flex items-center gap-1 rounded bg-black/40 px-1.5 py-1 font-display text-[10px] font-bold tracking-tight text-text backdrop-blur-md\"\n\t\t\t\t>\n\t\t\t\t\t<TokenCoin size={12} />\n\t\t\t\t\t{album.priceTokens}\n\t\t\t\t</span>\n\t\t\t{:else}\n\t\t\t\t<span\n\t\t\t\t\tclass=\"inline-flex items-center gap-1 rounded bg-black/40 px-1.5 py-1 font-display text-[10px] font-bold tracking-tight {tintText} backdrop-blur-md\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclass=\"h-3 w-3\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"3\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path d=\"M20 6 9 17l-5-5\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tunlocked\n\t\t\t\t</span>\n\t\t\t{/if}\n\t\t\t<span\n\t\t\t\tclass=\"inline-flex items-center gap-1 rounded bg-black/40 px-1.5 py-1 font-display text-[10px] font-semibold text-text/90 tabular-nums backdrop-blur-md\"\n\t\t\t>\n\t\t\t\t<svg class=\"h-3 w-3\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M21 3H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm-1 14.59-3.29-3.3a1 1 0 0 0-1.42 0L13 17.59l-4.29-4.3a1 1 0 0 0-1.42 0L4 16.59V5h16zM8 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t{album.photoCount}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\n\t<div class=\"flex flex-1 flex-col px-3 pt-2 pb-3\">\n\t\t<div class=\"truncate font-display text-sm font-semibold text-text\">{album.title}</div>\n\n\t\t{#if showCreator}\n\t\t\t<div class=\"mt-2 flex items-center gap-1.5\">\n\t\t\t\t<DuelAvatar nickname={album.creator.nickname} {avatarUrl} size={18} link={false} />\n\t\t\t\t<span class=\"truncate text-[11px] text-muted\">@{album.creator.nickname ?? 'creator'}</span>\n\t\t\t\t<UserBadge rater={album.creator.isRater} creator={album.creator.isCreator} verified={album.creator.isVerified} subscriber={album.creator.isSubscriber} size={12} />\n\t\t\t</div>\n\t\t{:else}\n\t\t\t<div class=\"mt-auto pt-2 text-[10.5px] text-muted\">\n\t\t\t\t{#if album.unlockCount > 0}\n\t\t\t\t\t<span><b class=\"font-semibold text-text\">{album.unlockCount}</b> unlocked</span>\n\t\t\t\t{:else}\n\t\t\t\t\t<span>{albumCountLabel(album)}</span>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t{/if}\n\t</div>\n</a>\n"],"version":3}