{"release_id":"01a247c3-a6b6-0000-74b2-4a83f2c91090","chunk_id":"01a247c3-a8d0-7470-94a7-4aac6c412e36","file":"DKkz3r0H.mjs","mappings":"oaA4EO,MAAMA,EAAa,CACzB,QACA,QACA,OACA,SACA,SACA,SACA,MACD,EAGaC,EAAkB,CAAC,OAAQ,QAAS,MAAM,EAE1CC,GAAuB,CACnC,KAAM,aACN,MAAO,cACP,KAAM,YACP,EAKaC,EAA0C,CAAC,SAAU,QAAQ,EAE7DC,EAAiB,EAEjBC,GAAoB,WAEpBC,EAAe,CAACC,EAAaC,IACzCA,IAAS,QAAU,CAAEL,EAAsC,SAASI,CAAG,EAE3DE,EAAe,CAACF,EAAoBG,IAChDH,IAAQ,OAAS,KAAK,IAAIH,EAAgBM,CAAI,EAAIA,EAKtCC,EAAQ,CAAC,OAAQ,SAAU,MAAM,EACjCC,EAAa,CAAC,QAAS,QAAS,UAAW,KAAK,EAEhDC,EAAa,CAAC,GAAGD,EAAY,KAAK,EAClCE,EAAY,CAAC,MAAO,SAAU,MAAM,EACpCC,EAAa,CAAC,UAAW,MAAO,QAAQ,EACxCC,EAAY,CAAC,QAAS,SAAU,SAAS,EAEzCC,EAAa,CACzB,QACA,MACA,UACA,QACA,QACA,OACA,OACD,EAKaC,EAAWC,GACvBA,IAAM,OAASN,EAAaD,EAmBhBQ,EAA0B,CACtC,KAAM,GACN,KAAM,SACN,MAAO,CACN,MAAO,UACP,IAAK,UACL,QAAS,UACT,MAAO,UACP,MAAO,UACP,KAAM,MACN,MAAO,SAAA,EAER,SAAU,SACV,KAAM,MACN,MAAO,QACR,EAGaC,GAAe,CAC3B,IAAK,CACJ,MAAO,MACP,KAAM,CACL,KAAM,GACN,KAAM,OACN,MAAO,CACN,MAAO,QACP,IAAK,QACL,QAAS,QACT,MAAO,MACP,MAAO,UACP,KAAM,MACN,MAAO,KAAA,EAER,SAAU,OACV,KAAM,UACN,MAAO,OAAA,CACR,EAED,KAAM,CACL,MAAO,OACP,KAAM,CACL,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,EAAmBK,EAAe,IAAI,EAChEd,EAAI,QAAUX,EAAKI,EAAI,QAASS,EAAaY,EAAe,OAAO,EACnEd,EAAI,SAAWX,EAAKI,EAAI,SAAUiB,EAAYI,EAAe,QAAQ,EACjE,OAAOrB,EAAI,WAAc,UAAY,OAAO,SAASA,EAAI,SAAS,IAErEO,EAAI,UAAY,KAAK,MAAM,KAAK,IAAIqB,EAAe,KAAK,IAAI,EAAG5B,EAAI,SAAS,CAAC,EAAI,GAAI,EAAI,IACzFO,EAAI,SAAWuB,EAAWvB,EAAI,SAAS,GAExCA,EAAI,QAAUF,EAAaL,EAAI,OAAO,EACtCO,EAAI,OAASmC,EAAY1C,EAAI,MAAM,EACnCO,EAAI,IAAMoC,EAAS3C,EAAI,GAAG,EAAIA,EAAI,IAAM,MAEnCO,EAAI,MAAQ,QAAU,CAACA,EAAI,SAAaA,EAAI,MAAQ,UAAY,CAACA,EAAI,YAAa,IAAM,MAC7FA,EAAI,KAAOG,EAAaV,EAAI,IAAI,EAChCO,EAAI,IAAMI,EAAYX,EAAI,GAAG,EAC7BO,EAAI,IAAMX,EAAKI,EAAI,IAAKmB,EAAWE,EAAe,GAAG,EACrDd,EAAI,OAASK,EAAeZ,EAAI,OAAQ,QAASO,EAAI,GAAG,EAExDA,EAAI,KAAOP,EAAI,MAAQ,OAAOA,EAAI,MAAS,SAAWF,EAAaE,EAAI,IAAI,EAAI,KAC3EA,EAAI,OAAS,KAAMO,EAAI,KAAO,IAC3BA,CACR","names":["VULVA_INKS","VULVA_INK_SPOTS","VULVA_INK_SPOT_LABEL","VULVA_INK_BANDS","VULVA_TEXT_MIN","VULVA_TEXT_SAMPLE","vulvaInkFits","tat","spot","vulvaInkSize","size","PACES","MOVE_PREFS","BACK_PREFS","CLIT_SENS","SIZE_PREFS","TIGHTNESS","PLAY_MOVES","prefsOf","k","DEFAULT_PLAY","PLAY_PRESETS","V_RANGES","DEFAULT_VULVA","VULVA_WHO","isVulva","p","clampNum","v","r","fallback","c","pick","allowed","sanitizePlay","input","src","pr","prefs","cleanVulvaInk","tatText","cleanTatText","sanitizeVulvaParams","out","HAIR_STYLES","HAIR_COLORS","sanitizeGear","sanitizeMat","sanitizeAvatar","sanitizeAnySculpt","sanitizeSculptParams","skinParamsOf","PENIS_HAIR_STYLES","BALL_HAIRS","FREE_TATTOOS","PENIS_WHO","RANGES","DEFAULT_SCULPT","AVERAGE_SIZE","BUILTIN_OPPONENTS","DELETED_SNAPSHOT","isDeletedSnapshot","raw","BALL_HAIR_AMOUNT","BALL_HAIR_MAX","ballHairAmount","ballHairOf","n","cageMinLength","girth","cageFits","caged","isSoft","hardOf","g","rest","ng","ballTight","cleanTatImg","isInkKey"],"sources":["../../../../../../src/lib/sculpt/vulva-params.ts","../../../../../../src/lib/sculpt/params.ts"],"sourcesContent":["// Vulva sculpt parameters (params.body = 'vulva'). Shared by the client editor and the server, like\n// params.ts: every value that reaches the database or another user's screen goes through\n// sanitizeVulvaParams. One sculpt per user: the body type lives inside params (an old row without\n// `body` is a penis), mirrored to the generated column sculpt.body (20261213000011_sculpt_body.sql).\n// No sizes in cm and no percentiles for a vulva: the sliders are unitless.\n\nimport type { DuetMove } from './duet-game';\nimport { sanitizeGear, type SculptGear } from './gear';\nimport { cleanTatText, type InkKey } from './ink';\nimport { sanitizeMat, type MaterialId } from './material';\nimport { sanitizeAvatar, type AvatarParams } from './avatar/params';\nimport {\n\tHAIR_COLORS,\n\tHAIR_STYLES,\n\tsanitizeSculptParams,\n\ttype HairColor,\n\ttype HairStyle,\n\ttype SculptParams\n} from './params';\n\nexport interface VulvaParams {\n\tbody: 'vulva';\n\t/** labia majora size */\n\touter: number;\n\t/** labia majora puffiness (0 flat .. 1 full) */\n\touterFull: number;\n\t/** mons fullness */\n\tmound: number;\n\t/** labia minora size */\n\tinner: number;\n\t/** how far the inner lips reach past the outer (0 tucked .. 1 long) */\n\tinnerOut: number;\n\t/** left / right difference of the inner lips */\n\tinnerAsym: number;\n\t/** waviness of the inner lips' edge */\n\tinnerRuffle: number;\n\t/** pigment of the inner skin (0 like the body .. 1 deep) */\n\tinnerShade: number;\n\t/** clitoral glans size */\n\tclit: number;\n\t/** how much of the glans the hood covers */\n\thood: number;\n\t/** 0 closed .. 1 parted */\n\topen: number;\n\t/** anus size (1 typical) */\n\tanus: number;\n\t/** pigment of the anus (0 like the body .. 1 deep) */\n\tanusTone: number;\n\ttone: number;\n\tgloss: number;\n\tseed: number;\n\thair: HairStyle;\n\thairCol: HairColor;\n\t/** One of VULVA_INKS, null = none. Ownership of a paid one is checked on save, not here. */\n\ttat: VulvaInkKey | null;\n\t/** The word of the 'text' tattoo (cleanTatText), kept when another design is picked. */\n\ttatText: string | null;\n\ttatSpot: VulvaInkSpot;\n\t/** the design's long side, cm */\n\ttatSize: number;\n\t/** degrees, clockwise as seen from behind her */\n\ttatRot: number;\n\t/** materials + stands / pedestal only (sanitizeGear with body 'vulva') */\n\tgear: SculptGear | null;\n\tmat: MaterialId | null;\n\t/** how she plays in a duet (duet-game.ts DuetProfile); never shown to the partner upfront */\n\tplay: VulvaPlay;\n\t/** The full body and face around it (Body and Face tabs), null until they are touched. */\n\tavatar: AvatarParams | null;\n\t/** Who she is (RAT-698): a woman, or a trans man (a vulva on a masculine body). */\n\twho: VulvaWho;\n}\n\n/** The designs she can wear (ink.ts keys, the same unlocks as his): the placed ones and the two bands\n *  (a lower back piece). Not the ruler (it measures a shaft), the sleeves (made to wrap a shaft: laid\n *  flat their art is cut at the seams) or the upload (not built). Her text is free (isFreeInk). */\nexport const VULVA_INKS = [\n\t'heart',\n\t'stars',\n\t'bolt',\n\t'flames',\n\t'tribal',\n\t'barbed',\n\t'text'\n] as const satisfies readonly InkKey[];\n/** Where her tattoo sits, as seen from behind her: her left cheek, her right cheek, or her lower back\n *  (the top of the cleft). render/model.ts places it on her anchors (engine/vulva-anchors.ts). */\nexport const VULVA_INK_SPOTS = ['left', 'right', 'back'] as const;\n/** The spots' names in the UI (the word \"vulva\" never shows to users). */\nexport const VULVA_INK_SPOT_LABEL = {\n\tleft: 'Left cheek',\n\tright: 'Right cheek',\n\tback: 'Lower back'\n} as const satisfies Record<(typeof VULVA_INK_SPOTS)[number], string>;\n/** Her ink is on: the server checks it on save (server/sculpt-ink.ts enforceShopOwnership: a paid\n *  design needs its unlock, her text is free). Off, the sanitizer drops it and the Ink tab hides. */\nexport const VULVA_INK_LIVE = true;\n/** The bands, made to run round a shaft: laid flat they read as a strip, so only across her lower back. */\nexport const VULVA_INK_BANDS: readonly VulvaInkKey[] = ['tribal', 'barbed'];\n/** Her text's smallest size (cm, its long side): below it a word is hard to read on her. */\nexport const VULVA_TEXT_MIN = 8;\n/** Her text tattoo's sample word until she writes her own (his is 'Big Boss'). */\nexport const VULVA_TEXT_SAMPLE = 'Bad Girl';\n/** Whether a design may sit on a spot (the editor offers only these). */\nexport const vulvaInkFits = (tat: string, spot: VulvaInkSpot) =>\n\tspot === 'back' || !(VULVA_INK_BANDS as readonly string[]).includes(tat);\n/** Her tattoo's size, with the text floor. */\nexport const vulvaInkSize = (tat: string | null, size: number) =>\n\ttat === 'text' ? Math.max(VULVA_TEXT_MIN, size) : size;\n\nexport type VulvaInkKey = (typeof VULVA_INKS)[number];\nexport type VulvaInkSpot = (typeof VULVA_INK_SPOTS)[number];\n\nexport const PACES = ['slow', 'steady', 'fast'] as const;\nexport const MOVE_PREFS = ['loves', 'likes', 'neutral', 'not'] as const;\n/** Back door has one more: 'off' (never offered), its default. */\nexport const BACK_PREFS = [...MOVE_PREFS, 'off'] as const;\nexport const CLIT_SENS = ['low', 'normal', 'high'] as const;\nexport const SIZE_PREFS = ['smaller', 'any', 'bigger'] as const;\nexport const TIGHTNESS = ['tight', 'normal', 'relaxed'] as const;\n/** The duet's quick moves, in the order the Play tab lists them (the HUD's row order). */\nexport const PLAY_MOVES = [\n\t'tease',\n\t'rub',\n\t'between',\n\t'spank',\n\t'balls',\n\t'back',\n\t'pound'\n] as const satisfies readonly DuetMove[];\n\nexport type DuetPace = (typeof PACES)[number];\nexport type MovePref = (typeof BACK_PREFS)[number];\n/** The values a move's row offers (Back door: also 'off'). */\nexport const prefsOf = (k: DuetMove): readonly MovePref[] =>\n\tk === 'back' ? BACK_PREFS : MOVE_PREFS;\nexport type ClitSens = (typeof CLIT_SENS)[number];\nexport type SizePref = (typeof SIZE_PREFS)[number];\nexport type Tightness = (typeof TIGHTNESS)[number];\n\n/** Her duet settings (the editor's Play tab). The defaults play exactly like a duet without a profile. */\nexport interface VulvaPlay {\n\t/** 0 hard to please .. 1 hair trigger: her arousal gain and how wide her sweet spot is */\n\tsens: number;\n\t/** shifts her tempo band: slow / steady / fast */\n\tpace: DuetPace;\n\t/** per quick move */\n\tprefs: Record<DuetMove, MovePref>;\n\t/** clit tap / rub strength */\n\tclitSens: ClitSens;\n\tsize: SizePref;\n\ttight: Tightness;\n}\n\nexport const DEFAULT_PLAY: VulvaPlay = {\n\tsens: 0.5,\n\tpace: 'steady',\n\tprefs: {\n\t\ttease: 'neutral',\n\t\trub: 'neutral',\n\t\tbetween: 'neutral',\n\t\tspank: 'neutral',\n\t\tballs: 'neutral',\n\t\tback: 'off',\n\t\tpound: 'neutral'\n\t},\n\tclitSens: 'normal',\n\tsize: 'any',\n\ttight: 'normal'\n};\n\n/** One-tap starting points for the Play tab. */\nexport const PLAY_PRESETS = {\n\tshy: {\n\t\tlabel: 'Shy',\n\t\tplay: {\n\t\t\tsens: 0.3,\n\t\t\tpace: 'slow',\n\t\t\tprefs: {\n\t\t\t\ttease: 'loves',\n\t\t\t\trub: 'likes',\n\t\t\t\tbetween: 'likes',\n\t\t\t\tspank: 'not',\n\t\t\t\tballs: 'neutral',\n\t\t\t\tback: 'off',\n\t\t\t\tpound: 'not'\n\t\t\t},\n\t\t\tclitSens: 'high',\n\t\t\tsize: 'smaller',\n\t\t\ttight: 'tight'\n\t\t}\n\t},\n\teasy: {\n\t\tlabel: 'Easy',\n\t\tplay: {\n\t\t\tsens: 0.85,\n\t\t\tpace: 'steady',\n\t\t\tprefs: {\n\t\t\t\ttease: 'likes',\n\t\t\t\trub: 'likes',\n\t\t\t\tbetween: 'likes',\n\t\t\t\tspank: 'likes',\n\t\t\t\tballs: 'loves',\n\t\t\t\tback: 'off',\n\t\t\t\tpound: 'likes'\n\t\t\t},\n\t\t\tclitSens: 'normal',\n\t\t\tsize: 'any',\n\t\t\ttight: 'relaxed'\n\t\t}\n\t},\n\tdemanding: {\n\t\tlabel: 'Demanding',\n\t\tplay: {\n\t\t\tsens: 0.15,\n\t\t\tpace: 'fast',\n\t\t\tprefs: {\n\t\t\t\ttease: 'not',\n\t\t\t\trub: 'neutral',\n\t\t\t\tbetween: 'neutral',\n\t\t\t\tspank: 'loves',\n\t\t\t\tballs: 'likes',\n\t\t\t\tback: 'off',\n\t\t\t\tpound: 'loves'\n\t\t\t},\n\t\t\tclitSens: 'low',\n\t\t\tsize: 'bigger',\n\t\t\ttight: 'normal'\n\t\t}\n\t}\n} as const satisfies Record<string, { label: string; play: VulvaPlay }>;\nexport type PlayPreset = keyof typeof PLAY_PRESETS;\n\ntype Range = { min: number; max: number; int?: boolean };\nexport const V_RANGES: Record<\n\tExclude<\n\t\tkeyof VulvaParams,\n\t\t| 'body'\n\t\t| 'hair'\n\t\t| 'hairCol'\n\t\t| 'tat'\n\t\t| 'tatText'\n\t\t| 'tatSpot'\n\t\t| 'gear'\n\t\t| 'mat'\n\t\t| 'play'\n\t\t| 'avatar'\n\t\t| 'who'\n\t>,\n\tRange\n> = {\n\touter: { min: 0.6, max: 1.5 },\n\touterFull: { min: 0, max: 1 },\n\tmound: { min: 0, max: 1 },\n\tinner: { min: 0.5, max: 1.6 },\n\tinnerOut: { min: 0, max: 1 },\n\tinnerAsym: { min: 0, max: 1 },\n\tinnerRuffle: { min: 0, max: 1 },\n\tinnerShade: { min: 0, max: 1 },\n\tclit: { min: 0.5, max: 1.6 },\n\thood: { min: 0, max: 1 },\n\topen: { min: 0, max: 1 },\n\tanus: { min: 0.6, max: 1.5 },\n\tanusTone: { min: 0, max: 1 },\n\ttone: { min: 0, max: 7, int: true },\n\tgloss: { min: 0, max: 1 },\n\tseed: { min: 1, max: 9999, int: true },\n\t// (a cheek takes ~10 cm before it turns away; never upside down)\n\ttatSize: { min: 3, max: 10 },\n\ttatRot: { min: -90, max: 90 }\n};\n\nexport const DEFAULT_VULVA: VulvaParams = {\n\tbody: 'vulva',\n\touter: 1,\n\touterFull: 0.5,\n\tmound: 0.5,\n\tinner: 1,\n\tinnerOut: 0.45,\n\tinnerAsym: 0.35,\n\tinnerRuffle: 0.4,\n\tinnerShade: 0.45,\n\tclit: 1,\n\thood: 0.5,\n\topen: 0.2,\n\tanus: 1,\n\tanusTone: 0.5,\n\ttone: 2,\n\tgloss: 0.4,\n\tseed: 5,\n\t// none: the rear form shows her from behind, where a pubic patch only reads as a dark blotch\n\thair: 'none',\n\thairCol: 'dark',\n\ttat: null,\n\ttatText: null,\n\ttatSpot: 'right',\n\ttatSize: 6,\n\ttatRot: 0,\n\tgear: null,\n\tmat: null,\n\tplay: DEFAULT_PLAY,\n\tavatar: null,\n\twho: 'woman'\n};\n\n/** Who a vulva sculpt can be. */\nexport const VULVA_WHO = ['woman', 'trans'] as const;\nexport type VulvaWho = (typeof VULVA_WHO)[number];\n\nexport type SculptBody = 'penis' | 'vulva';\nexport type AnySculptParams = SculptParams | VulvaParams;\n\nexport const isVulva = (p: { body?: unknown } | null | undefined): p is VulvaParams =>\n\tp?.body === 'vulva';\n\nconst clampNum = (v: unknown, r: Range, fallback: number) => {\n\tconst n = typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\tconst c = Math.min(r.max, Math.max(r.min, n));\n\treturn r.int ? Math.round(c) : Math.round(c * 1000) / 1000;\n};\nconst pick = <T extends string>(v: unknown, allowed: readonly T[], fallback: T): T =>\n\ttypeof v === 'string' && (allowed as readonly string[]).includes(v) ? (v as T) : fallback;\n\n/** Coerce anything into valid play settings (a fresh object: never DEFAULT_PLAY itself). Never throws. */\nexport function sanitizePlay(input: unknown): VulvaPlay {\n\tconst src =\n\t\tinput && typeof input === 'object' && !Array.isArray(input)\n\t\t\t? (input as Record<string, unknown>)\n\t\t\t: {};\n\tconst pr =\n\t\tsrc.prefs && typeof src.prefs === 'object' && !Array.isArray(src.prefs)\n\t\t\t? (src.prefs as Record<string, unknown>)\n\t\t\t: {};\n\tconst prefs = { ...DEFAULT_PLAY.prefs };\n\tfor (const k of PLAY_MOVES) prefs[k] = pick(pr[k], prefsOf(k), DEFAULT_PLAY.prefs[k]);\n\treturn {\n\t\tsens: clampNum(src.sens, { min: 0, max: 1 }, DEFAULT_PLAY.sens),\n\t\tpace: pick(src.pace, PACES, DEFAULT_PLAY.pace),\n\t\tprefs,\n\t\tclitSens: pick(src.clitSens, CLIT_SENS, DEFAULT_PLAY.clitSens),\n\t\tsize: pick(src.size, SIZE_PREFS, DEFAULT_PLAY.size),\n\t\ttight: pick(src.tight, TIGHTNESS, DEFAULT_PLAY.tight)\n\t};\n}\n\n/** Her design and word from raw input: a design she can't wear, one that doesn't fit its spot (a band\n *  on a cheek), or a text one with no word, is none. */\nexport function cleanVulvaInk(\n\tsrc: { tat?: unknown; tatText?: unknown },\n\tspot: VulvaInkSpot\n): Pick<VulvaParams, 'tat' | 'tatText'> {\n\tconst tatText = cleanTatText(src.tatText),\n\t\ttat = pick<VulvaInkKey | 'none'>(src.tat, VULVA_INKS, 'none');\n\tconst none = tat === 'none' || (tat === 'text' && !tatText) || !vulvaInkFits(tat, spot);\n\treturn { tat: none ? null : tat, tatText };\n}\n\n/** Coerce anything into valid vulva params. Unknown keys (penis ones too) are dropped. Never throws. */\nexport function sanitizeVulvaParams(input: unknown): VulvaParams {\n\tconst src =\n\t\tinput && typeof input === 'object' && !Array.isArray(input)\n\t\t\t? (input as Record<string, unknown>)\n\t\t\t: {};\n\tconst out = { ...DEFAULT_VULVA };\n\tfor (const k of Object.keys(V_RANGES) as (keyof typeof V_RANGES)[])\n\t\tout[k] = clampNum(src[k], V_RANGES[k], DEFAULT_VULVA[k]);\n\tout.hair = pick(src.hair, HAIR_STYLES, DEFAULT_VULVA.hair);\n\tout.hairCol = pick(src.hairCol, HAIR_COLORS, DEFAULT_VULVA.hairCol);\n\tout.tatSpot = pick(src.tatSpot, VULVA_INK_SPOTS, DEFAULT_VULVA.tatSpot);\n\t// (none kept while VULVA_INK_LIVE is off)\n\tif (VULVA_INK_LIVE) Object.assign(out, cleanVulvaInk(src, out.tatSpot));\n\tout.tatSize = vulvaInkSize(out.tat, out.tatSize);\n\tout.gear = sanitizeGear(src.gear, 'vulva');\n\tout.mat = sanitizeMat(src.mat);\n\t// old rows have no play settings: the defaults\n\tout.play = sanitizePlay(src.play);\n\tout.who = pick(src.who, VULVA_WHO, DEFAULT_VULVA.who);\n\tout.avatar = sanitizeAvatar(src.avatar, 'vulva', out.who);\n\treturn out;\n}\n\n/** Either body: `body: 'vulva'` reads as a vulva, anything else (old rows have no body) as a penis. */\nexport function sanitizeAnySculpt(input: unknown): AnySculptParams {\n\tconst src =\n\t\tinput && typeof input === 'object' && !Array.isArray(input)\n\t\t\t? (input as { body?: unknown })\n\t\t\t: null;\n\treturn src?.body === 'vulva' ? sanitizeVulvaParams(src) : sanitizeSculptParams(input);\n}\n\n/** What the skin material, hair builder and model view read: SculptParams, plus where a vulva's\n *  tattoo sits (a penis has no tatSpot; its tatS / tatA place it on the shaft). */\nexport type SkinParams = SculptParams & { tatSpot?: VulvaInkSpot };\n\n/** A vulva's look in the SkinParams shape ('light' ball hair = the style's own strays; her tattoo with\n *  its spot, tatS / tatA unused). A penis passes through unchanged. */\nexport function skinParamsOf(p: AnySculptParams): SkinParams {\n\tif (!isVulva(p)) return p;\n\treturn {\n\t\t...sanitizeSculptParams({}),\n\t\ttone: p.tone,\n\t\tgloss: p.gloss,\n\t\tseed: p.seed,\n\t\thair: p.hair,\n\t\thairCol: p.hairCol,\n\t\tballHair: 'light',\n\t\twrinkle: 0.35,\n\t\thang: 0,\n\t\ttat: p.tat,\n\t\ttatText: p.tatText,\n\t\ttatSpot: p.tatSpot,\n\t\ttatSize: p.tatSize,\n\t\ttatRot: p.tatRot,\n\t\tgear: p.gear,\n\t\tmat: p.mat\n\t};\n}\n","// Sculpt parameters: the only data a sculpt is made of. Shared by the client editor and the server,\n// so every value that reaches the database or another user's screen goes through sanitizeSculptParams.\n\nimport { sanitizeGear, type SculptGear } from './gear';\nimport { cleanTatImg, cleanTatText, isInkKey, type InkKey } from './ink';\nimport { sanitizeMat, type MaterialId } from './material';\nimport { sanitizeAvatar, type AvatarParams } from './avatar/params';\nimport { sanitizePlay, type VulvaPlay } from './vulva-params';\n\nexport const HAIR_STYLES = ['none', 'trimmed', 'natural', 'bush', 'hairy'] as const;\n/** A penis's styles: the same, and one more past 'hairy' (RAT-739: really hairy, denser and on up the\n *  shaft further). A vulva keeps HAIR_STYLES. */\nexport const PENIS_HAIR_STYLES = [...HAIR_STYLES, 'wild'] as const;\n/** Hair on the sac, on top of the pubic style ('light' = the style's own few strays). */\nexport const BALL_HAIRS = ['none', 'light', 'hairy'] as const;\nexport const HAIR_COLORS = ['black', 'dark', 'brown', 'blond', 'red', 'grey'] as const;\n/** Tattoos that cost nothing. The full catalog with prices is INK_CATALOG ($lib/sculpt/ink). */\nexport const FREE_TATTOOS = ['heart', 'stars'] as const satisfies readonly InkKey[];\n\nexport type HairStyle = (typeof PENIS_HAIR_STYLES)[number];\nexport type HairColor = (typeof HAIR_COLORS)[number];\nexport type BallHair = (typeof BALL_HAIRS)[number];\n/** A free tattoo. Any catalog key is InkKey; params.tat can hold any of them. */\nexport type TattooId = (typeof FREE_TATTOOS)[number];\n\nexport interface SculptParams {\n\t/** Body type. The penis sanitizer always sets 'penis'; vulva params live in vulva-params.ts. */\n\tbody: 'penis';\n\tlength: number; // cm, erect, bone-pressed not assumed\n\tgirth: number; // cm around\n\tcurveUp: number;\n\tcurveSide: number;\n\ttaper: number;\n\tglans: number; // head width\n\tglansL: number; // head length\n\tgShape: number; // 0 blunt .. 1 pointed\n\tflare: number; // base thickness\n\tcut: boolean;\n\tforeskin: number;\n\toverhang: number;\n\tballs: number;\n\t/** 0..1 how low the sac hangs; below 0 it pulls up tight (ballTight). */\n\thang: number;\n\tasym: number;\n\t/** 0..1 loose sac skin below the testes: a fuller, pear-shaped bottom that hangs past them (RAT-733). */\n\tsag: number;\n\t/** 0..1 how clearly the two testes show apart: the cleft up the sac's middle (RAT-733). */\n\tsplit: number;\n\twrinkle: number;\n\tveins: number;\n\tveinSize: number;\n\ttone: number; // index into SKIN_TONES\n\tgloss: number;\n\tseed: number;\n\thair: HairStyle;\n\thairCol: HairColor;\n\tballHair: BallHair;\n\t/** RAT-733: how much hair on the sac, 0 (smooth) .. 1 (covered); set by the editor's slider. Absent\n\t *  (old rows, built-in casts) it follows ballHair (ballHairAmount). */\n\tballHairN?: number;\n\t/** Any catalog key. Ownership of a paid one is checked on save (server/sculpt-ink.ts), not here. */\n\ttat: InkKey | null;\n\t/** The word of the 'text' tattoo (cleanTatText), kept when another tattoo is picked. */\n\ttatText: string | null;\n\t/** Storage path of the 'upload' tattoo's image (cleanTatImg). The upload itself is not built yet. */\n\ttatImg: string | null;\n\ttatS: number;\n\ttatA: number;\n\ttatSize: number;\n\ttatRot: number;\n\t/** Paid gear (hair styles, piercings, jewellery, charms, fun wear, hats): sanitizeGear, null when none.\n\t *  Ownership is checked on save (server/sculpt-ink.ts), not here. */\n\tgear: SculptGear | null;\n\t/** Whole-model material (material.ts), null = skin. Ownership is checked on save, not here. */\n\tmat: MaterialId | null;\n\t/** The full body and face around it (Body and Face tabs), null until they are touched. */\n\tavatar: AvatarParams | null;\n\t/** Who the character is (RAT-698): a man, or a trans woman (a penis on a feminine body). */\n\twho: PenisWho;\n\t/** How they play as the bottom in a duet (RAT-700), like a vulva's `play`; null = the defaults.\n\t *  Private: public-params strips it like hers. */\n\tplay: VulvaPlay | null;\n\t/** RAT-739: shown soft (flaccid) in the editor and on the profile; absent = hard. The sliders stay\n\t *  the erect sizes; the duet and the clash always play hard (softless). */\n\tsoft?: boolean;\n\t/** A strap-on (RAT-713): built by the duet's cast for a woman who gives, never saved on a sculpt\n\t *  (the sanitizer drops it). The mesh has no sac. */\n\tstrap?: boolean;\n}\n\n/** Who a penis sculpt can be. */\nexport const PENIS_WHO = ['man', 'trans'] as const;\nexport type PenisWho = (typeof PENIS_WHO)[number];\n\ntype Range = { min: number; max: number; int?: boolean };\nexport const RANGES: Record<\n\tExclude<\n\t\tkeyof SculptParams,\n\t\t| 'body'\n\t\t| 'cut'\n\t\t| 'hair'\n\t\t| 'hairCol'\n\t\t| 'ballHair'\n\t\t| 'ballHairN'\n\t\t| 'tat'\n\t\t| 'tatText'\n\t\t| 'tatImg'\n\t\t| 'gear'\n\t\t| 'mat'\n\t\t| 'avatar'\n\t\t| 'who'\n\t\t| 'play'\n\t\t| 'strap'\n\t\t| 'soft'\n\t>,\n\tRange\n> = {\n\t// (RAT-739: down to a small one, 5 cm long and 6.5 around)\n\tlength: { min: 5, max: 26 },\n\tgirth: { min: 6.5, max: 18 },\n\t// the shaft's frame (engine/sdf.ts) projects world up up to ±1.6 (as it always did; it would flip\n\t// past ~1.68), and past it is carried along the curve (RAT-739: a banana). Side bend twists the\n\t// head's frame (~32° at 1.6 / 1)\n\tcurveUp: { min: -2.4, max: 2.4 },\n\tcurveSide: { min: -1, max: 1 },\n\ttaper: { min: 0, max: 1 },\n\tglans: { min: 0.8, max: 1.35 },\n\tglansL: { min: 0.7, max: 1.35 },\n\tgShape: { min: 0, max: 1 },\n\tflare: { min: 0, max: 1 },\n\tforeskin: { min: 0.1, max: 1 },\n\toverhang: { min: 0, max: 1 },\n\tballs: { min: 0.6, max: 1.5 },\n\thang: { min: -1, max: 1 },\n\tasym: { min: 0, max: 1 },\n\tsag: { min: 0, max: 1 },\n\tsplit: { min: 0, max: 1 },\n\twrinkle: { min: 0, max: 1 },\n\tveins: { min: 0, max: 8, int: true },\n\tveinSize: { min: 0, max: 1 },\n\ttone: { min: 0, max: 7, int: true },\n\tgloss: { min: 0, max: 1 },\n\tseed: { min: 1, max: 9999, int: true },\n\ttatS: { min: 0.15, max: 0.85 },\n\ttatA: { min: -180, max: 180 },\n\ttatSize: { min: 2, max: 8 },\n\ttatRot: { min: -180, max: 180 }\n};\n\nexport const DEFAULT_SCULPT: SculptParams = {\n\tbody: 'penis',\n\tmat: null,\n\tlength: 16, girth: 12.5, curveUp: 0.1, curveSide: 0, taper: 0.35, glans: 1, glansL: 1, gShape: 0.4, flare: 0.5,\n\tcut: true, foreskin: 0.9, overhang: 0.3, balls: 1, hang: 0.4, asym: 0.35, sag: 0.35, split: 0.3, wrinkle: 0.7, veins: 4, veinSize: 0.5,\n\ttone: 2, gloss: 0.35, seed: 11, hair: 'natural', hairCol: 'dark', ballHair: 'light', tat: null, tatS: 0.5, tatA: 90, tatSize: 4.5, tatRot: 0,\n\ttatText: null, tatImg: null, gear: null, avatar: null, who: 'man', play: null\n};\n\n/** Erect means, Veale et al., BJU International 2015 (15,521 men). */\nexport const AVERAGE_SIZE = { length: 13.1, girth: 11.7 } as const;\n\n/** Built-in opponents for a clash: no account behind them. */\nexport const BUILTIN_OPPONENTS = {\n\tavg: { name: 'Average guy', params: { ...DEFAULT_SCULPT, ...AVERAGE_SIZE, tone: 3, veins: 2, seed: 7, hair: 'natural', hairCol: 'brown' } },\n\tgiant: { name: 'The Giant', params: { ...DEFAULT_SCULPT, length: 24, girth: 16.5, tone: 6, curveUp: 0.15, veins: 6, veinSize: 0.8, seed: 21, hair: 'trimmed', hairCol: 'black' } },\n\t// RAT-719: the Trans tab's practice partner, a trans woman (she; her body's default feminine avatar)\n\ttrans: { name: 'Sasha', params: { ...DEFAULT_SCULPT, length: 14.2, girth: 11.6, tone: 2, curveUp: 0.12, veins: 2, veinSize: 0.35, cut: false, foreskin: 0.85, seed: 31, hair: 'trimmed', hairCol: 'brown', ballHair: 'none', who: 'trans' } }\n} satisfies Record<string, { name: string; params: SculptParams }>;\nexport type BuiltinOpponent = keyof typeof BUILTIN_OPPONENTS;\n\n/** A clash side whose owner deleted their sculpt: its snapshot is overwritten with this marker\n *  (src/lib/server/sculpt-delete.ts), so the measurements leave the clash as well. */\nexport const DELETED_SNAPSHOT = { deleted: true } as const;\nexport const isDeletedSnapshot = (raw: unknown): boolean =>\n\t!!raw && typeof raw === 'object' && (raw as { deleted?: unknown }).deleted === true;\n\n/** Where each ball hair look sits on the amount slider (ballHairN). */\nexport const BALL_HAIR_AMOUNT: Record<BallHair, number> = { none: 0, light: 0.35, hairy: 1 };\n/** The amount slider's top: past 'hairy' (1), really hairy (RAT-739). */\nexport const BALL_HAIR_MAX = 1.5;\n/** How much hair on the sac, 0..1: the slider's value, else the look's (BALL_HAIR_AMOUNT). */\nexport const ballHairAmount = (p: Pick<SculptParams, 'ballHair' | 'ballHairN'>) =>\n\tp.ballHairN ?? BALL_HAIR_AMOUNT[p.ballHair];\n/** The look nearest an amount (kept in step with ballHairN for whatever reads the look). */\nexport const ballHairOf = (n: number): BallHair => (n < 0.15 ? 'none' : n < 0.65 ? 'light' : 'hairy');\n\n/** RAT-741: the shortest sculpt a chastity cage fits, at a girth (whole cm, up). Shorter, the cage in\n *  the full-body view fell apart (a short soft one is shorter than its cage is wide): measured on a\n *  grid of 5-18 cm long by 9.5-18 around, the shortest where it held its shape (a slightly uneven\n *  bottom above it is the cage as it is). Stands until a short one has a cage of its own (a ticket of\n *  its own). */\nexport const cageMinLength = (girth: number) => Math.max(8, Math.ceil(0.55 * girth + 4));\n/** RAT-741: a chastity cage fits this sculpt (cageMinLength). */\nexport const cageFits = (p: { length: number; girth: number }) => p.length >= cageMinLength(p.girth);\n/** RAT-741: the cage as worn: switched on and it fits. A saved cage on one too short is kept as it was\n *  saved, only not shown (nor shown soft for it). */\nexport const caged = (p: { length: number; girth: number; gear?: { cage?: true } | null }) =>\n\t!!p.gear?.cage && cageFits(p);\n\n/** Shown soft: the switch, or a chastity cage on (RAT-741, as it fits: caged); a strap-on never. */\nexport const isSoft = (p: {\n\tsoft?: boolean;\n\tstrap?: boolean;\n\tlength: number;\n\tgirth: number;\n\tgear?: { cage?: true } | null;\n}) => !!(p.soft || caged(p)) && !p.strap;\n\n/** The erect sizes as they play: soft and the cage dropped (the duet, the clash, sizes compared). */\nexport const hardOf = <T extends { soft?: boolean; gear?: unknown }>(p: T): T => {\n\tconst g = p.gear as { cage?: true } | null | undefined;\n\tif (!p.soft && !g?.cage) return p;\n\tconst rest = { ...p };\n\tdelete rest.soft;\n\tif (g?.cage) {\n\t\tconst ng = { ...g };\n\t\tdelete ng.cage;\n\t\trest.gear = (Object.keys(ng).length ? ng : null) as T['gear'];\n\t}\n\treturn rest;\n};\n\n/** How tight the sac is pulled up, 0 (relaxed or hanging) .. 1 (tight): the hang slider below 0. */\nexport const ballTight = (p: Pick<SculptParams, 'hang'>) => Math.max(0, -p.hang);\n\nconst clampNum = (v: unknown, r: Range, fallback: number) => {\n\tconst n = typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\tconst c = Math.min(r.max, Math.max(r.min, n));\n\treturn r.int ? Math.round(c) : Math.round(c * 1000) / 1000;\n};\nconst pick = <T extends string>(v: unknown, allowed: readonly T[], fallback: T): T =>\n\ttypeof v === 'string' && (allowed as readonly string[]).includes(v) ? (v as T) : fallback;\n\n/** Coerce anything (client JSON, old rows) into valid params. Unknown keys are dropped. Never throws. */\nexport function sanitizeSculptParams(input: unknown): SculptParams {\n\t// arrays are objects too, and [].length would read as the `length` param\n\tconst src = input && typeof input === 'object' && !Array.isArray(input) ? (input as Record<string, unknown>) : {};\n\tconst out = { ...DEFAULT_SCULPT };\n\tfor (const k of Object.keys(RANGES) as (keyof typeof RANGES)[]) out[k] = clampNum(src[k], RANGES[k], DEFAULT_SCULPT[k]);\n\tout.cut = typeof src.cut === 'boolean' ? src.cut : DEFAULT_SCULPT.cut;\n\tout.hair = pick(src.hair, PENIS_HAIR_STYLES, DEFAULT_SCULPT.hair);\n\tout.hairCol = pick(src.hairCol, HAIR_COLORS, DEFAULT_SCULPT.hairCol);\n\tout.ballHair = pick(src.ballHair, BALL_HAIRS, DEFAULT_SCULPT.ballHair);\n\tif (typeof src.ballHairN === 'number' && Number.isFinite(src.ballHairN)) {\n\t\t// (RAT-739: past 1, really hairy)\n\t\tout.ballHairN = Math.round(Math.min(BALL_HAIR_MAX, Math.max(0, src.ballHairN)) * 1000) / 1000;\n\t\tout.ballHair = ballHairOf(out.ballHairN);\n\t}\n\tout.tatText = cleanTatText(src.tatText);\n\tout.tatImg = cleanTatImg(src.tatImg);\n\tout.tat = isInkKey(src.tat) ? src.tat : null;\n\t// a text / upload tattoo with nothing to show is no tattoo\n\tif ((out.tat === 'text' && !out.tatText) || (out.tat === 'upload' && !out.tatImg)) out.tat = null;\n\tout.gear = sanitizeGear(src.gear);\n\tout.mat = sanitizeMat(src.mat);\n\tout.who = pick(src.who, PENIS_WHO, DEFAULT_SCULPT.who);\n\tout.avatar = sanitizeAvatar(src.avatar, 'penis', out.who);\n\t// (old rows and sculpts that never opened the bottom settings: none, the defaults play)\n\tout.play = src.play && typeof src.play === 'object' ? sanitizePlay(src.play) : null;\n\tif (src.soft === true) out.soft = true;\n\treturn out;\n}\n"],"version":3}