{"release_id":"01a2309f-d47d-0000-29bc-a17a97e31fa5","chunk_id":"01a2309f-d5ef-7de3-8aad-8946a04a94e3","file":"cDYs9HPE.mjs","mappings":"ybAuEO,MAAMA,EAAa,CACzB,QACA,QACA,OACA,SACA,SACA,SACA,MACD,EAGaC,EAAkB,CAAC,OAAQ,QAAS,MAAM,EAE1CC,EAAuB,CACnC,KAAM,aACN,MAAO,cACP,KAAM,YACP,EAKaC,EAA0C,CAAC,SAAU,QAAQ,EAE7DC,EAAiB,EAEjBC,EAAoB,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,EAAe,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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,EACD,KACJ,OAAOC,GAAK,OAAS,QAAUM,EAAoBN,CAAG,EAAIa,EAAqBd,CAAK,CACrF,CAQO,SAASe,EAAaxB,EAAgC,CAC5D,OAAKD,EAAQC,CAAC,EACP,CACN,GAAGuB,EAAqB,CAAA,CAAE,EAC1B,KAAMvB,EAAE,KACR,MAAOA,EAAE,MACT,KAAMA,EAAE,KACR,KAAMA,EAAE,KACR,QAASA,EAAE,QACX,SAAU,QACV,QAAS,IACT,KAAM,EACN,IAAKA,EAAE,IACP,QAASA,EAAE,QACX,QAASA,EAAE,QACX,QAASA,EAAE,QACX,OAAQA,EAAE,OACV,KAAMA,EAAE,KACR,IAAKA,EAAE,GAAA,EAjBgBA,CAmBzB","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","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","sanitizeAnySculpt","sanitizeSculptParams","skinParamsOf"],"sources":["../../../../../../src/lib/sculpt/vulva-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 {\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}\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' | 'hair' | 'hairCol' | 'tat' | 'tatText' | 'tatSpot' | 'gear' | 'mat' | 'play'\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};\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\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"],"version":3}