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A,EAAA,YAKiBjC,EAAI,IAAK,OAAS,kCAAoC,EAAE,IAAGE,EAAQ,GAAA,EAAA,GAAA,gBAAA,IALpFY,EAAAC,EAAAkB,CAAA,qDAUAE,EAAIC,EAAA,EACHC,IADDF,CAAI,MACHE,EAAI,EAAA,IAAJA,CAAI,IADLF,CAAI,EACiBf,EAAAC,GAAAC,EAAAgB,EAAAjB,CAAA,EAAA,CAAA,IAAAG,EAAE,6BAA6B,CAAA,CAAA,MADpDW,CAAI,WADDnC,EAAI,IAAK,QAAMyB,EAAAc,CAAA,MAXpBR,CAAG,EAAHX,EAAA,IAAAQ,EAAAG,aAAkB9B,KAAK,EAAA,GAAA,gBAAA,CAAA,MAAvB8B,CAAG,oBAvBS,OAAMN,EAAAe,CAAA,EAAAf,EAAAgB,EAAA,EAAA,cAFZ","names":["size","klass","imgClass","tap","e","openAgeGate","$$props","button","root_1","node_1","$.child","img","root_2","$.set_attribute","$.append","$$anchor","span","$.sibling","span_1","root_3","$.template_effect","$0","$.set_text","text","t","$$render","consequent_1","$.reset","$.set_class","classes","$.delegated","div","root_4","img_1","root_5","span_2","root_6","span_3","text_1","consequent_4","consequent_2","alternate"],"sources":["../../../../../../src/lib/components/GatedMedia.svelte"],"sourcesContent":["<script lang=\"ts\">\n\t/**\n\t * RAT-641: someone else's photo or video, for a viewer who hasn't passed\n\t * the age check. `src` is the server-made blurred stand-in (or null for a\n\t * plain tile); the original never reaches this browser. A tap opens the\n\t * check in place. With gate 'uploader' the viewer has nothing to do: the\n\t * photo opens once its uploader takes the check.\n\t *\n\t * The stand-in is already blurred on the server, so a list of tiles needs\n\t * no CSS blur (phones drop it anyway, see `.gate-blur`); only the single\n\t * large view adds a soft one on top.\n\t */\n\timport { t } from '$lib/i18n';\n\timport { openAgeGate } from '$lib/stores/ageGate';\n\timport type { AgeGateSurface } from '$lib/age-gate';\n\n\tinterface Props {\n\t\tsrc: string | null;\n\t\tgate: 'blur' | 'uploader';\n\t\tsurface: AgeGateSurface;\n\t\t/** 'tile' for grids and rows, 'hero' for one large view. */\n\t\tsize?: 'tile' | 'hero';\n\t\tclass?: string;\n\t\timgClass?: string;\n\t}\n\n\tlet {\n\t\tsrc,\n\t\tgate,\n\t\tsurface,\n\t\tsize = 'tile',\n\t\tclass: klass = '',\n\t\timgClass = ''\n\t}: Props = $props();\n\n\tfunction tap(e: MouseEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\topenAgeGate({ surface });\n\t}\n</script>\n\n{#if gate === 'blur'}\n\t<button\n\t\ttype=\"button\"\n\t\tclass=\"gated {klass}\"\n\t\tonclick={tap}\n\t\taria-label={t('18+ content. tap to view.')}\n\t>\n\t\t{#if src}\n\t\t\t<img\n\t\t\t\t{src}\n\t\t\t\talt=\"\"\n\t\t\t\tloading=\"lazy\"\n\t\t\t\tdecoding=\"async\"\n\t\t\t\tclass=\"stand-in {size === 'hero' ? 'gate-blur blur-[10px] scale-110' : ''} {imgClass}\"\n\t\t\t/>\n\t\t{/if}\n\t\t<span class=\"veil\" aria-hidden=\"true\"></span>\n\t\t<span class=\"badge\" class:hero={size === 'hero'} aria-hidden=\"true\">\n\t\t\t<span class=\"pill\">18+</span>\n\t\t\t{#if size === 'hero'}<span class=\"label\">{t('tap to view')}</span>{/if}\n\t\t</span>\n\t</button>\n{:else}\n\t<div class=\"gated {klass}\">\n\t\t{#if src}\n\t\t\t<img\n\t\t\t\t{src}\n\t\t\t\talt=\"\"\n\t\t\t\tloading=\"lazy\"\n\t\t\t\tdecoding=\"async\"\n\t\t\t\tclass=\"stand-in {size === 'hero' ? 'gate-blur blur-[10px] scale-110' : ''} {imgClass}\"\n\t\t\t/>\n\t\t{/if}\n\t\t<span class=\"veil\" aria-hidden=\"true\"></span>\n\t\t{#if size === 'hero'}\n\t\t\t<span class=\"badge hero\">\n\t\t\t\t<span class=\"label\">{t('waiting for their age check')}</span>\n\t\t\t</span>\n\t\t{/if}\n\t</div>\n{/if}\n\n<style>\n\t/* In the components layer, so size and position utilities passed through\n\t   `class` (absolute inset-0, h-40, rounded-*) win over these defaults. */\n\t@layer components {\n\t\t.gated {\n\t\t\tposition: relative;\n\t\t\tdisplay: block;\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 0;\n\t\t\tpadding: 0;\n\t\t\tbackground: var(--color-surface-2, #1a1a1a);\n\t\t\tcursor: pointer;\n\t\t}\n\t\tdiv.gated {\n\t\t\tcursor: default;\n\t\t}\n\t\t.stand-in {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tobject-fit: cover;\n\t\t}\n\t\t.veil {\n\t\t\tposition: absolute;\n\t\t\tinset: 0;\n\t\t\tbackground: rgba(10, 10, 12, 0.28);\n\t\t}\n\t\t.badge {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pill {\n\t\t\tborder-radius: 999px;\n\t\t\tbackground: rgba(12, 12, 12, 0.72);\n\t\t\tpadding: 4px 9px;\n\t\t\tfont-family: var(--font-display);\n\t\t\tfont-size: 11px;\n\t\t\tfont-weight: 700;\n\t\t\tletter-spacing: 0.04em;\n\t\t\tcolor: #f0f0f0;\n\t\t}\n\t\t.badge.hero .pill {\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.label {\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: rgba(240, 240, 240, 0.92);\n\t\t\ttext-shadow: none;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n</style>\n"],"version":3}