{"release_id":"01a1c502-4ad1-0000-ec62-adc54d3c69aa","chunk_id":"01a1c502-4c36-7000-b8db-407b44886bfe","file":"DS708y1o.mjs","mappings":"sfAAA,eAgBOA,EAAK,CACV,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAGKC,EAAOC,EAAA,KAENC,EAAA,KAAA,MAAM,WAAA,gBAAA,GAAc,KAAI,CAAC,GAAK,KAAK,aAAW,EAG/CC,EAAIF,EAAA,IAAqB,CAC1B,IAAAG,EAAI,EACC,QAAAC,EAAI,EAAGA,EAACH,EAAA,KAAQ,OAAQG,IAAKD,EAAKA,EAAI,GAAEF,EAAA,KAAQ,WAAWG,CAAC,IAAO,EACrE,OAAAN,EAAMK,EAAIL,EAAM,MAAM,CAC9B,CAAC,MAGDO,EAAIC,EAAA,gBAAJD,EAAI,EAAA,IAAJA,CAAI,SAAJE,EAAAC,EAAAH,6BAA0CH,CAAI,EAAA,QAAsBH,CAAO,CAAA,QAA3EM,CAAI,KAFG","names":["TONES","initial","$.derived","$$props","tone","h","i","span","root","styles","$.set_style"],"sources":["../../../../../../src/lib/components/roleplay/RpMonogram.svelte"],"sourcesContent":["<script lang=\"ts\">\n\t/**\n\t * Placeholder tile for a character with no artwork — 270 of 312 published\n\t * characters (87%) have none, and neither does `cover_path` help: every\n\t * template with a cover already has a card image.\n\t *\n\t * The inbox used to fall back to one shared castle graphic, so a list of\n\t * eight different characters was eight identical blue castles — unreadable,\n\t * and branding from the multiplayer engine we retired. A letter on a colour\n\t * picked from the slug at least differs per character, which is all a\n\t * 40px tile has to do.\n\t */\n\tlet { name, seed }: { name: string; seed: string } = $props();\n\n\t// Muted, dark-surface tones. No saturated ring or glow — this is a filled\n\t// block, which is how this site is meant to draw attention.\n\tconst TONES = [\n\t\t'#4c3a6e',\n\t\t'#2f4858',\n\t\t'#5a3a48',\n\t\t'#3d5245',\n\t\t'#5b4a2e',\n\t\t'#43395e',\n\t\t'#334b63',\n\t\t'#563b3b'\n\t];\n\n\tconst initial = $derived(\n\t\t// Titles start with quotes, emoji and punctuation often enough to matter.\n\t\t(name.match(/\\p{L}|\\p{N}/u)?.[0] ?? '?').toUpperCase()\n\t);\n\n\tconst tone = $derived.by(() => {\n\t\tlet h = 0;\n\t\tfor (let i = 0; i < seed.length; i++) h = (h * 31 + seed.charCodeAt(i)) >>> 0;\n\t\treturn TONES[h % TONES.length];\n\t});\n</script>\n\n<span class=\"mono\" style:background-color={tone} aria-hidden=\"true\">{initial}</span>\n\n<style>\n\t.mono {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tfont-family: var(--font-display);\n\t\tfont-size: 0.95rem;\n\t\tfont-weight: 700;\n\t\tline-height: 1;\n\t\tcolor: rgba(255, 255, 255, 0.82);\n\t}\n</style>\n"],"version":3}