{"release_id":"01a2309f-d47d-0000-29bc-a17a97e31fa5","chunk_id":"01a2309f-d494-7e30-9e68-4f89b6e42b7a","file":"B9VzyAaV.mjs","mappings":"qTAUO,SAASA,EAAUC,EAAyBC,EAA6B,CAC/E,OAAID,IAAS,QAAgBC,EAAS,CAAC,QAAS,MAAM,EAAI,CAAC,OAAO,EAC3DA,EAAS,CAAC,OAAQ,SAAS,EAAI,CAAC,SAAS,CACjD,CAKO,SAASC,EAAUC,EAAgBC,EAAoC,CAC7E,GAAI,CAACA,EAAM,OAAQ,OAAO,KAC1B,GAAIA,EAAM,SAAW,EAAG,OAAOA,EAAM,CAAC,EACtC,MAAMC,EAAM,CAAE,MAAO,UAAW,QAAS,OAAA,EACnCC,EAAIH,IAAS,QAAUA,IAAS,QAAU,CAACC,EAAM,SAASD,CAAI,EAAIE,EAAIF,CAAI,EAAIA,EACpF,OAAOG,IAAM,QAAUF,EAAM,SAASE,CAAC,EAAIA,EAAI,MAChD,CAKO,SAASC,EACfC,EACAC,EACAC,EACkB,CAClB,OAAIF,EAAE,IAAI,WAAW,IAAM,KAAOC,GAAQ,IAAI,WAAW,IAAM,IAAY,OACvED,EAAE,IAAI,OAAO,IAAM,KAAO,CAACE,EAAW,QACnC,IACR,CAQO,SAASC,EAAQC,EAOZ,CACX,KAAM,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,SAAAC,GAAaJ,EAC1C,OAAKE,EAiBDD,IAAUC,EACN,CACN,KAAMD,IAAU,QAAU,QAAU,UACpC,IAAK,mBAAmBG,CAAQ,EAAA,EAE3BD,EAAO,CAAE,KAAM,OAAQ,IAAK,oBAAoBC,CAAQ,MAAS,KArBnEH,IAAU,QACN,CACN,KAAM,QACN,IAAKD,EAAE,SACJ,oCACA,4CAAA,EAEEG,EACJ,CACA,KAAM,OACN,IAAKH,EAAE,SACJ,4BAA4BI,CAAQ,GACpC,oCAAA,EAEH,IAQL","names":["playGames","body","duetOn","playStart","want","games","kin","w","playLinkStep","q","handed","vs","cardCta","o","owner","viewer","open","nickname"],"sources":["../../../../../../src/lib/sculpt/play.ts"],"sourcesContent":["// The editor's Play entry (fleet tasks/2026-11-29-sculpt-play-button): which games a sculpt can play,\n// where the Play sheet opens, and the deep links that open it (the play mock's table). Pure, so the\n// editor, the sheet and the tests share one reading.\n\nexport type PlayGame = 'clash' | 'duet' | 'scissor';\n/** 'menu': the games (step 1); a game: its picker (step 2) */\nexport type PlayStep = 'menu' | PlayGame;\n\n/** Clash is dick vs dick, Scissor (RAT-678) pussy vs pussy; Duet needs one of each and the duet switch\n *  on. A dick's Clash comes first (RAT-653), a pussy's Duet: that is who there is to play with. */\nexport function playGames(body: 'penis' | 'vulva', duetOn: boolean): PlayGame[] {\n\tif (body === 'penis') return duetOn ? ['clash', 'duet'] : ['clash'];\n\treturn duetOn ? ['duet', 'scissor'] : ['scissor'];\n}\n\n/** The step the sheet opens on for a wanted one: a single game opens straight (no menu, no Back), a\n *  game this sculpt can't play shows what it can. Clash and Scissor are one link (?clash=1: the game\n *  between two of a kind), so each stands in for the other. Null: nothing to play. */\nexport function playStart(want: PlayStep, games: PlayGame[]): PlayStep | null {\n\tif (!games.length) return null;\n\tif (games.length === 1) return games[0];\n\tconst kin = { clash: 'scissor', scissor: 'clash' } as const;\n\tconst w = want !== 'menu' && want !== 'duet' && !games.includes(want) ? kin[want] : want;\n\treturn w !== 'menu' && games.includes(w) ? w : 'menu';\n}\n\n/** ?clash=1 (the /p \"clash someone\" / \"scissor someone\" row) and ?duet-pick=1 (the duet page's Change\n *  partner, also handed over in sessionStorage): the step they ask for. ?clash=1 means nothing next to\n *  ?vs (that one is the direct \"Clash @nick\"). The caller strips them with replaceState. */\nexport function playLinkStep(\n\tq: URLSearchParams,\n\thanded: URLSearchParams | null,\n\tvs: string | null\n): PlayGame | null {\n\tif (q.get('duet-pick') === '1' || handed?.get('duet-pick') === '1') return 'duet';\n\tif (q.get('clash') === '1' && !vs) return 'clash';\n\treturn null;\n}\n\nexport type CardCta = { mode: PlayGame; sub: string } | null;\n\n/** The sculpt card's one CTA (profile + share page), chosen by the two bodies (the play mock's table):\n *  dick and dick is Clash; pussy and pussy is Scissor (RAT-678); different bodies with the owner open\n *  for duets is Duet, closed nothing. Signed out or without a sculpt only the owner's body is known:\n *  his is Clash (play first, RAT-653), hers is Duet while she's open. */\nexport function cardCta(o: {\n\towner: 'penis' | 'vulva';\n\tviewer: 'penis' | 'vulva' | null;\n\tloggedIn: boolean;\n\t/** duets on and the owner open for them */\n\topen: boolean;\n\tnickname: string;\n}): CardCta {\n\tconst { owner, viewer, open, nickname } = o;\n\tif (!viewer) {\n\t\tif (owner === 'penis')\n\t\t\treturn {\n\t\t\t\tmode: 'clash',\n\t\t\t\tsub: o.loggedIn\n\t\t\t\t\t? \"Make yours, then see who's bigger\"\n\t\t\t\t\t: \"Build yours. See who's bigger, no account.\"\n\t\t\t};\n\t\treturn open\n\t\t\t? {\n\t\t\t\t\tmode: 'duet',\n\t\t\t\t\tsub: o.loggedIn\n\t\t\t\t\t\t? `Sculpt yours, then duet @${nickname}`\n\t\t\t\t\t\t: 'One round, 45 seconds, no account.'\n\t\t\t\t}\n\t\t\t: null;\n\t}\n\tif (owner === viewer)\n\t\treturn {\n\t\t\tmode: owner === 'penis' ? 'clash' : 'scissor',\n\t\t\tsub: `Your sculpt vs @${nickname}`\n\t\t};\n\treturn open ? { mode: 'duet', sub: `Your sculpt and @${nickname}'s` } : null;\n}\n"],"version":3}