{"release_id":"01a2309f-d47d-0000-29bc-a17a97e31fa5","chunk_id":"01a2309f-d5e8-7820-a177-0ce49738ebb3","file":"TiREyncJ.mjs","mappings":"qTAIO,MAAMA,EAAgB,GAGhBC,EAAW,GAAc,GAAG,EAAE,QAAQ,CAAC,CAAC,KAG9C,SAASC,EAAcC,EAAWC,EAA6B,CACrE,OAAI,KAAK,IAAID,EAAIC,CAAC,EAAI,GAAsB,KACrCD,EAAIC,EAAI,IAAM,GACtB,CAGO,SAASC,EACfC,EACAC,EAC4D,CAC5D,MAAMC,EAAIN,EAAcI,EAAYC,CAAU,EAC9C,MAAO,CACN,OAAQC,IAAM,IAAM,SAAWA,IAAM,IAAM,YAAc,OACzD,KAAM,KAAK,IAAIF,EAAaC,CAAU,CAAA,CAExC","names":["SCISSOR_TIE_S","fmtSecs","scissorWinner","a","b","scissorOutcome","ownerLasts","theirLasts","w"],"sources":["../../../../../../src/lib/sculpt/scissor-result.ts"],"sourcesContent":["// What a scissor's result says (RAT-678): pure numbers and words, no params, so the feed and the pages\n// that only show a result stay light ($lib/sculpt/scissor works out how long each side lasts).\n\n/** Below this gap (seconds) a scissor is a draw, as CLASH_TIE_CM is for a clash. */\nexport const SCISSOR_TIE_S = 0.5;\n\n/** \"31.4 s\" */\nexport const fmtSecs = (s: number) => `${s.toFixed(1)} s`;\n\n/** Who wins: a minus b in seconds, null inside the tie line. */\nexport function scissorWinner(a: number, b: number): 'a' | 'b' | null {\n\tif (Math.abs(a - b) < SCISSOR_TIE_S) return null;\n\treturn a > b ? 'a' : 'b';\n}\n\n/** A scissor from the owner's side: they `lasted` longer, the other `outlasted` them, or `even`. */\nexport function scissorOutcome(\n\townerLasts: number,\n\ttheirLasts: number\n): { result: 'lasted' | 'outlasted' | 'even'; diff: number } {\n\tconst w = scissorWinner(ownerLasts, theirLasts);\n\treturn {\n\t\tresult: w === 'a' ? 'lasted' : w === 'b' ? 'outlasted' : 'even',\n\t\tdiff: Math.abs(ownerLasts - theirLasts)\n\t};\n}\n\n/** RAT-678: a vulva owner's scissor record, from the ones who started one against her. */\nexport type ScissorScoreboard = { tried: number; lasted: number };\nexport function scissorScoreboard(\n\trows: readonly { challengerLasts: number | null; ownerLasts: number | null; gone: boolean }[]\n): ScissorScoreboard {\n\tlet tried = 0,\n\t\tlasted = 0;\n\tfor (const r of rows) {\n\t\tif (r.gone || r.challengerLasts == null || r.ownerLasts == null) continue;\n\t\ttried++;\n\t\tif (scissorWinner(r.ownerLasts, r.challengerLasts) === 'a') lasted++;\n\t}\n\treturn { tried, lasted };\n}\n"],"version":3}