code:
'use strict';

// Copied from https://github.com/tcql/node-yesno/blob/master/yesno.js
// as to not have it as a node dependency
// reformated to pass our ESLint linting

// const readline = require('readline');
// @ts-ignore
import readline from "readline";

const options = {
	yes: [ 'yes', 'y' ],
	no:  [ 'no', 'n' ]
};

function defaultInvalidHandler({question, defaultValue, yesValues, noValues}) {
	let yValues = (yesValues || options.yes);
	let nValues  = (noValues || options.no);

	process.stdout.write('\nInvalid Response.\n');
	process.stdout.write('Answer either yes : (' + yValues.join(', ') + ') \n');
	process.stdout.write('Or no: (' + nValues.join(', ') + ') \n\n');
}

async function ask({question, defaultValue, yesValues, noValues, invalid}) {
	if (!invalid || typeof invalid !== 'function') { invalid = defaultInvalidHandler; }

	let yValues = (yesValues || options.yes).map((v) => v.toLowerCase());
	let nValues  = (noValues || options.no).map((v) => v.toLowerCase());

	const rl = readline.createInterface({
		input: process.stdin,
		output: process.stdout
	});

	return new Promise(function(resolve, reject) {
		rl.question(question + ' ', async function(answer) {
			rl.close();

			const cleaned = answer.trim().toLowerCase();

			if (cleaned === '' && defaultValue != null) { return resolve(defaultValue); }

			if (yValues.indexOf(cleaned) >= 0) { return resolve(true); }

			if (nValues.indexOf(cleaned) >= 0) { return resolve(false); }

			invalid({
				question, defaultValue, yesValues, noValues
			});
			const result = await ask({
				question, defaultValue, yesValues, noValues, invalid
			});
			resolve(result);
		});
	});
}

// module.exports = ask;
export {ask};


code:
#!/bin/bash
# git push --set-upstream origin origin/pregmod-master / git checkout -b pregmod-master --track origin/pregmod-master
mainBranch="pregmod-master"
previousBranch="Not found"

function displayHelp() {
cat <<HelpText
Usage: $0 [OPTION]...
Always pushes commit(s) / the current branch
Order of operation: new (if enabled) -> push (if not closed after creating a new branch) -> sync (if enabled) -> change branch (if enabled)
 -> delete previous branch (if enabled)

Options:
 -s, --sync      : Sync upstream/$mainBranch
 -d, --delete    : Delete previous branch
 -m, --move      : Change current branch to either;
  supplied / previous, the choice currently
  follows the flow as written i.e supplied -> previous
 -b, --branch X  : Set supplied branch to X
 -c, --create Y  : Create the new branch Y
 -h, --help      : Show this help text

 e.g.
 Before:
  git status
  On branch XYZ
  Your branch is ahead of 'origin/XYZ' by 5 commits.

  git branch --list
  * XYZ
  $mainBranch
  .....

 During:
  $0 -b $mainBranch -c -d
  Branches: Supplied ($mainBranch) / previous (XYZ)
  Sync Master? Y/N: N

 After:
  git branch --list
  * $mainBranch
  .....

  All five new commits for branch XYZ were pushed prior to the switch over and
   then afterwards the local copy of branch XYZ was deleted.
HelpText
}

if [[ $(git rev-parse --quiet --abbrev-ref @{-1} 2>/dev/null) && $? -eq 0 ]]; then
	previousBranch=$(git rev-parse --abbrev-ref @{-1})
fi

if [[ "$#" -eq 0 ]]; then echo "For more options see $0 -h."; fi
while [[ "$1" ]]; do
	case $1 in
	-s | --sync)
		sync="true"
		;;
	-d | --delete)
		delete="true"
		;;
	-m | --move)
		change="true"
		;;
	-b | --branch)
		tgtBranch=$2
		shift
		;;
	-c | --create)
		newBranch=$2
		shift
		;;
	-h | --help)
		displayHelp
		exit 0
		;;
	*)
		echo "Unknown argument $1."
		displayHelp
		exit 1
		;;
	esac
	shift
done

if [[ "$newBranch" ]]; then
	if [[ $(git stash show 2>/dev/null | echo $?) -gt 0 ]]; then git stash save *; fi
	git checkout -qb $newBranch
	if [[ $(git stash show 2>/dev/null | echo $?) -gt 0 ]];then
		git stash show
		read -p "Pop the latest stash? (y/n): " stash
		[ "$stash" == "y" ] && git stash pop;
	fi
	read -p "Exit? (y/n): " exit
	[ "$exit" == "y" ] && exit;
fi

git push -q 2>/dev/null || git push -qu "origin" HEAD 1>/dev/null
echo "Branches: Supplied ($tgtBranch) / previous ($previousBranch)"

if [[ "$sync" ]]; then
	if [[ $(git stash show 2>/dev/null | echo $?) -gt 0 ]]; then git stash save *; fi
	git checkout -q origin/$mainBranch && git reset --hard upstream/$mainBranch -q && git push -q && git checkout -q @{-1}
	if [[ $(git stash show 2>/dev/null | echo $?) -gt 0 ]]; then git stash pop; fi
fi
if [[ "$change" ]]; then
	if [[ "$tgtBranch" ]]; then git checkout -q origin/$tgtBranch; else git checkout -q @{-1}; fi
fi
if [[ "$delete" ]]; then git branch -qD @{-1}; fi

repo_name: Nithhogg/fc

license: mit


code:
declare namespace FC {
	namespace RA {

		interface GenericNumericTarget<T> {
			cond: "==" | ">=" | "<=" | ">" | "<";
			val: T;
		}
		type NumericTarget = GenericNumericTarget<number>;
		type ExpressiveNumericTarget = GenericNumericTarget<number | string>;

		interface RuleConditionEditorArguments {
			activation: PostFixRule;
			advancedMode: boolean;
		}

		interface RuleConditions extends RuleConditionEditorArguments{
			selectedSlaves: number[];
			excludedSlaves: number[];
			applyRuleOnce: boolean;
		}

		interface RuleSurgerySettings {
			voice: number;
			eyes: number;
			heels: number;
			hears: number;
			smells: number;
			tastes: number;
			lactation: number;
			prostate: number;
			ovaImplant: number;
			ovaImplantAllowReplacing: boolean;
			cosmetic: number;
			accent: number;
			shoulders: number;
			shouldersImplant: number;
			boobs: NumericRange;
			boobsImplantTypes: SizingImplantType[];
			boobsImplantAllowReplacing: boolean;
			hips: number;
			hipsImplant: number;
			butt: NumericRange;
			buttImplantTypes: SizingImplantType[];
			buttImplantAllowReplacing: boolean;
			faceShape: FaceShape;
			lips: NumericRange;
			holes: number;
			hair: number;
			bodyhair: number;
			vasectomy: boolean;
			bellyImplant: string;
			tummy: number;
			earShape: number;
			horn: number;
			genes: RuleGenesSettings;
			areolae: number;
			areolaeShape: string;
		}

		interface RuleGenesSettings {
			NCS: number,
			rapidCellGrowth: number,
			immortality: number,
			flavoring: number,
			aggressiveSperm: number,
			livestock: number,
			progenitor: number,
			macromastia: number,
			gigantomastia: number,
			potent: number,
			fertility: number,
			hyperFertility: number,
			superfetation: number,
			polyhydramnios: number,
			uterineHypersensitivity: number,
			galactorrhea: number,
			gigantism: number,
			dwarfism: number,
			neoteny: number,
			progeria: number,
			albinism: number,
			rearLipedema: number,
			wellHung: number,
			wGain: number,
			wLoss: number,
			androgyny: number,
			mGain: number,
			mLoss: number,
		}

		interface RuleGrowthSetters {
			boobs: ExpressiveNumericTarget;
			butt: ExpressiveNumericTarget;
			lips: ExpressiveNumericTarget;
			dick: ExpressiveNumericTarget;
			balls: ExpressiveNumericTarget;
			clit: ExpressiveNumericTarget;
			nipples: NippleShape[];
			intensity: number;
		}

		interface RuleReleaseSetters {
			masturbation: number;
			partner: number;
			facilityLeader: number;
			family: number;
			slaves: number;
			master: number;
		}

		//type Piercings = ;

		interface RuleSetters {
			releaseRules: RuleReleaseSetters;
			lactationRules: WithNone<"induce" | "maintain"> | null;
			mobilityRules: Rules.Mobility;
			restRules: FC.Rules.Rest;
			toyHole: FC.ToyHole;
			clitSetting: SmartPiercingSetting;
			clitSettingXY: number;
			clitSettingXX: number;
			clitSettingEnergy: number;
			speechRules: Rules.Speech;
			clothes: FC.Clothes;
			collar: FC.Collar;
			faceAccessory: string;
			mouthAccessory: WithNone<MouthAccessory>;
			shoes: WithNone<Shoes>;
			armAccessory: string;
			legAccessory: string;
			chastityVagina: 0 | 1 | 2;
			chastityAnus: 0 | 1 | 2;
			chastityPenis: number;
			virginAccessory: string;
			aVirginAccessory: string;
			vaginalAccessory: string;
			aVirginDickAccessory: string;
			dickAccessory: string;
			bellyAccessory: FC.BellyAccessory;
			buttplug: string;
			aVirginButtplug: string;
			vaginalAttachment: string;
			buttplugAttachment: string;
			iris: string;
			pupil: string;
			sclera: string;
			makeup: number;
			nails: number;
			hColor: string;
			hLength: number;
			haircuts: number;
			hStyle: FC.HairStyle;
			eyebrowHColor: string;
			eyebrowHStyle: string;
			eyebrowFullness: FC.EyebrowThickness;
			markings: "remove beauty marks" | "remove birthmarks" | "remove both";
			pubicHColor: string;
			pubicHStyle: string;
			piercing: InstanceType<typeof App.Entity.completePiercingStateRA>;
			vaginaLube: number;
			boobsTat: string | number;
			buttTat: string | number;
			vaginaTat: string | number;
			dickTat: string | number;
			lipsTat: string | number;
			anusTat: string | number;
			shouldersTat: string | number;
			armsTat: string | number;
			legsTat: string | number;
			backTat: string | number;
			stampTat: string | number;
			birthsTat: string | number;
			abortionTat: string | number;
			pitRules: number;
			arenaRules: number;
			curatives: number;
			livingRules: Rules.Living;
			relationshipRules: Rules.Relationship;
			standardPunishment: Rules.Punishment;
			standardReward: Rules.Reward;
			weight: NumericRange;
			diet: string;
			dietCum: 0 | 1 | 2;
			dietMilk: FC.dietMilkType;
			onDiet: number;
			muscles: NumericTarget;
			XY: number;
			XX: number;
			gelding: number;
			preg: boolean;
			abortion: string[];
			growth: RuleGrowthSetters;
			hyper_drugs: number;
			aphrodisiacs: number;
			autoBrand: number;
			pornFeed: number;
			pornFameSpending: number;
			dietGrowthSupport: number;
			eyewear: string;
			earwear: string;
			setAssignment: Assignment;
			facilityRemove: boolean;
			removalAssignment: Assignment;
			surgery: RuleSurgerySettings;
			underArmHColor: string;
			underArmHStyle: string;
			drug: FC.Drug;
			eyes: string;
			pregSpeed: string;
			bellyImplantVol: number;
			teeth: string;
			label: string;
			removeLabel: string;
			skinColor: string;
			inflationType: FC.InflationLiquid;
			brandTarget: string;
			brandDesign: string;
			scarTarget: string;
			scarDesign: string;
			hornColor: string;
			labelTagsClear: boolean;
			choosesOwnClothes: 0 | 1;
			pronoun: App.Data.Pronouns.Kind;
			posePrompt: string;
			expressionPositivePrompt: string;
			expressionNegativePrompt: string;
			positivePrompt: string;
			negativePrompt: string;
			overridePrompts: boolean;
			openPoseType: "Library" | "JSON" | "PNG";
			openPoseName: string;
			aiAutoRegenExclude: FC.Bool;
		}

		interface Rule {
			ID: string;
			name: string;
			condition: RuleConditions;
			set: RuleSetters;
		}

		type PostFixRule = Array<string | number | boolean>

		interface SlaveActions {
			sizingDrug?: Drug;
		}

		interface Actions {
			slaves: Record<number, SlaveActions>;
		}
	}
}


code:
declare namespace FC {

    type ColorHex = {
        amaranth: "#E52B50";
        amethyst: "#9966CC";
        aquamarine: "#7FFFD4";
        azure: "#007FFF";
        citrine: "#e4d00a";
        crimson: "#DC143C";
        emerald: "#50C878";
        gold: "#ffd700";
        ivory: "#fffff0";
        jade: "#00a86b";
        platinum: "#e5e4e2";
        onyx: "#0f0f0f";
        ruby: "#cc1057";
        sapphire: "#0f52ba";
        silver: "#c0c0c0";
   }

    type PatternColor = "black" | "blue" | "brown" | "green" | "grey" | "orange" | "pink" | "purple" | "red" | "white" | "yellow"
    type PatternedEars = "leopard" | "tiger" | "jaguar"
    type PatternedTails = "leopard" | "tiger" | "jaguar" | "tanuki" | "raccoon" | "gazelle"
    type PatternedAppendages = "moth"

}


code:
declare namespace FC {
	namespace SecExp {

		interface UnitData {
			troops: number,
			maxTroops: number,
			equip: number
		}

		interface PlayerUnitData extends UnitData {
			active: number,
			ID: number,
		}

		interface PlayerHumanUnitData extends PlayerUnitData {
			platoonName: string,
			training: number,
			loyalty: number,
			cyber: number,
			medics: number,
			SF: number,
			commissars: number,
			battlesFought: number,
		}

		type PlayerHumanUnitType = "bots" | "slaves" | "militia" | "mercs" | "SF";
		type PlayerHumanUnitTypeMod = "bots" | "slaves" | "militia" | "mercs";
		type PlayerHumanUnitTypeModHuman = "slaves" | "militia" | "mercs";
		type EnemyUnitType = "raiders" | "free city" | "old world" | "freedom fighters";
	}
}


code:
declare namespace FC {
	namespace UI {
		namespace DOM {
			namespace Widgets {}
		}
		namespace Hotkeys {}
		namespace View {}
		namespace SlaveSummary {
			type AppendRenderer = (slave: FC.SlaveState, parentNode: Node) => void;

			interface AbbreviationState {
				clothes: number;
				devotion: number;
				beauty: number;
				diet: number;
				drugs: number;
				genitalia: number;
				health: number;
				hormoneBalance: number;
				mental: number;
				nationality: number;
				origins: number;
				physicals: number;
				race: number;
				rules: number;
				rulesets: number;
				skills: number;
			}

			interface State {
				abbreviation: AbbreviationState;
			}
		}
	}
}

declare type PassageLinkMap = Pick<HTMLElementTagNameMap, 'a' | 'audio' | 'img' | 'source' | 'video'>


code:
declare namespace FC {
	/**
	 * This interface defines all (almost, see ArcologyStateFSPeculiarities below) the FS-related
	 * arcology properties.
	 * * `research`: FS provides -Research property [Bool], otherwise has to be set to `undefined`
	 * * `SMR`: FS provides SMR policy, [Bool], otherwise has to be set to `undefined`
	 * * `policy`: string union of boolean laws and other policies, otherwise has to be set to `undefined`
	 * * `choice`: string union of numeric laws and choices, that may have other values except `0` and `1`.
	 */
	interface FutureSocietyIdMap {
		FSSupremacist: {
			noun: "Racial Supremacism", adj: "Supremacist", deco: "Supremacist",
			research: undefined, SMR: true, policy: "LawME", choice: undefined
		};
		FSSubjugationist: {
			noun: "Racial Subjugationism", adj: "Subjugationist", deco: "Subjugationist",
			research: undefined, SMR: true, policy: "LawME", choice: undefined
		};
		FSGenderRadicalist: {
			noun: "Gender Radicalism", adj: "Gender Radicalist", deco: "Gender Radicalist",
			research: true, SMR: undefined, policy: "LawBeauty", choice: "LawFuta"
		};
		FSGenderFundamentalist: {
			noun: "Gender Fundamentalism", adj: "Gender Fundamentalist", deco: "Gender Fundamentalist",
			research: true, SMR: true, policy: "LawBimbo" | "LawBeauty", choice: undefined
		};
		FSDegradationist: {
			noun: "Degradationism", adj: "Degradationist", deco: "Degradationist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSPaternalist: {
			noun: "Paternalism", adj: "Paternalist", deco: "Paternalist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSBodyPurist: {
			noun: "Body Purism", adj: "Body Purist", deco: "Body Purist",
			research: true, SMR: true, policy: "Law" | "CatLaw", choice: undefined
		};
		FSTransformationFetishist: {
			noun: "Transformation Fetishism", adj: "Transformation Fetishist", deco: "Transformation Fetishist",
			research: true, SMR: true, policy: undefined, choice: undefined
		};
		FSYouthPreferentialist: {
			noun: "Youth Preferentialism", adj: "Youth Preferentialist", deco: "Youth Preferentialist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSMaturityPreferentialist: {
			noun: "Maturity Preferentialism", adj: "Maturity Preferentialist", deco: "Maturity Preferentialist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSSlimnessEnthusiast: {
			noun: "Slimness Enthusiasm", adj: "Slimness Enthusiast", deco: "Slimness Enthusiast",
			research: true, SMR: true, policy: "Law" | "FoodLaw", choice: undefined
		};
		FSAssetExpansionist: {
			noun: "Asset Expansionism", adj: "Asset Expansionist", deco: "Asset Expansionist",
			research: true, SMR: true, policy: undefined, choice: undefined
		};
		FSPastoralist: {
			noun: "Pastoralism", adj: "Pastoralist", deco: "Pastoralist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSCummunism: {
			noun: "Cummunism", adj: "Cummunist", deco: undefined,
			research: true, SMR: undefined, policy: undefined, choice: undefined
		};
		FSPhysicalIdealist: {
			noun: "Physical Idealism", adj: "Physical Idealist", deco: "Physical Idealist",
			research: true, SMR: true, policy:	"Law" | "StrongFat", choice: undefined
		};
		FSHedonisticDecadence: {
			noun: "Decadent Hedonism", adj: "Decadent Hedonist", deco: "Hedonistic",
			research: "" | "Diet", SMR: true, policy: "Law" | "Law2", choice: "StrongFat"
		};
		FSChattelReligionist: {
			noun: "Chattel Religionism", adj: "Chattel Religionist", deco: "Chattel Religionist",
			research: undefined, SMR: true, policy: "Law" | "Law2", choice: undefined
		};
		FSNull: {
			noun: "Multiculturalism", adj: "Multiculturalist", deco: undefined,
			research: undefined, SMR: undefined, policy: undefined, choice: undefined
		};
		FSIncestFetishist: {
			noun: "Incest Fetishism", adj: "Incest Fetishist", deco: undefined,
			research: true, SMR: undefined, policy: undefined, choice: undefined
		};
		FSRomanRevivalist: {
			noun: "Roman Revivalism", adj: "Roman Revivalist", deco: "Roman Revivalist",
			research: undefined, SMR: true, policy: "Law", choice: undefined
		};
		FSNeoImperialist: {
			noun: "Neo-Imperialism", adj: "Neo-Imperialist", deco: "Neo-Imperialist",
			research: undefined, SMR: true, policy: "Law1" | "Law2", choice: undefined
		};
		FSEgyptianRevivalist: {
			noun: "Egyptian Revivalism", adj: "Egyptian Revivalist", deco: "Egyptian Revivalist",
			research: undefined, SMR: true, policy: "Law" | "IncestPolicy", choice: undefined
		};
		FSEdoRevivalist: {
			noun: "Edo Revivalism", adj: "Edo Revivalist", deco: "Edo Revivalist",
			research: undefined, SMR: true, policy: "Law", choice: undefined
		};
		FSArabianRevivalist: {
			noun: "Arabian Revivalism", adj: "Arabian Revivalist", deco: "Arabian Revivalist",
			research: undefined, SMR: true, policy: "Law", choice: undefined
		};
		FSChineseRevivalist: {
			noun: "Chinese Revivalism", adj: "Chinese Revivalist", deco: "Chinese Revivalist",
			research: undefined, SMR: true, policy: "Law", choice: undefined
		};
		FSAztecRevivalist: {
			noun: "Aztec Revivalism", adj: "Aztec Revivalist", deco: "Aztec Revivalist",
			research: undefined, SMR: true, policy: "Law", choice: undefined
		};
		FSAntebellumRevivalist: {
			noun: "Antebellum Revivalism", adj: "Antebellum Revivalist", deco: "Antebellum Revivalist",
			research: undefined, SMR: true, policy: "Law1" | "Law2", choice: undefined
		};
		FSRepopulationFocus: {
			noun: "Repopulation Focus", adj: "Repopulationist", deco: "Repopulationist",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSRestart: {
			noun: "Eugenics", adj: "Eugenics", deco: "Eugenics",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSIntellectualDependency: {
			noun: "Intellectual Dependency", adj: "Intellectual Dependency", deco: "Intellectual Dependency",
			research: true, SMR: true, policy: "Law" | "LawBeauty", choice: undefined
		};
		FSSlaveProfessionalism: {
			noun: "Slave Professionalism", adj: "Slave Professional", deco: "Slave Professionalism",
			research: true, SMR: true, policy: "Law", choice: undefined
		};
		FSPetiteAdmiration: {
			noun: "Petite Admiration", adj: "Petite Admiration", deco: "Petite Admiration",
			research: true, SMR: true, policy: "Law" | "Law2", choice: undefined
		};
		FSStatuesqueGlorification: {
			noun: "Statuesque Glorification", adj: "Statuesque Glorification", deco: "Statuesque Glorification",
			research: true, SMR: true, policy: "Law" | "Law2", choice: undefined
		}
	}

	type FutureSociety = keyof FutureSocietyIdMap;
	type FutureSocietyNoun = FutureSocietyIdMap[keyof FutureSocietyIdMap]["noun"];
	type FutureSocietyAdj = FutureSocietyIdMap[keyof FutureSocietyIdMap]["adj"];
	type FutureSocietyDeco = FutureSocietyIdMap[keyof FutureSocietyIdMap]["deco"] | "standard";

	type FutureSocietyWithResearchMap = {
		[K in keyof FutureSocietyIdMap]: FutureSocietyIdMap[K]["research"] extends true ? `${K}Research`
		: FutureSocietyIdMap[K]["research"] extends string ? `${K}${FutureSocietyIdMap[K]["research"]}Research`
		: never;
	}

	type FutureSocietyPolicy = {
		[K in keyof FutureSocietyIdMap]: FutureSocietyIdMap[K]["policy"] extends string ?
		`${K}${FutureSocietyIdMap[K]["policy"]}` : never;
	}

	type FutureSocietyChoice = {
		[K in keyof FutureSocietyIdMap]: FutureSocietyIdMap[K]["choice"] extends string ?
		`${K}${FutureSocietyIdMap[K]["choice"]}` : never;
	}

	type FutureSocietyHasResearchAny = FutureSocietyWithResearchMap[FutureSociety];
	type FutureSocietyPolicyAny = FutureSocietyPolicy[FutureSociety];
	type FutureSocietyChoiceAny = FutureSocietyChoice[FutureSociety];

	type FSDecoName<T extends FutureSociety> = FutureSocietyIdMap[T]["deco"] extends undefined ? never : `${T}Decoration`
	type FSSMRName<T extends FutureSociety> = FutureSocietyIdMap[T]["SMR"] extends undefined ? never : `${T}SMR`

	type FSPolicyValue = number | null;

	type FSName<T extends string> = T extends `FS${infer Name}` ? Name : never;

	// direction with respect to the player's arcology
	type ArcologyDirection = 0 /* player */ | "east" | "north" | "northeast" | "northwest" | "south" | "southeast" | "southwest" | "west";

	type ArcologyStateBase = {
		name: string;
		direction: ArcologyDirection;
		government: string;
		leaderID: number;
		honeymoon: number;
		prosperity: number;
		ownership: number;
		minority: number;
		PCminority: number;
		demandFactor: number;
		embargo: number;
		embargoTarget: -1|ArcologyDirection;
		influenceTarget: -1|ArcologyDirection;
		influenceBonus: number;
		CyberEconomic: number;
		CyberEconomicTarget: -1|ArcologyDirection;
		CyberReputation: number;
		CyberReputationTarget: -1|ArcologyDirection;
		rival: number;
		childhoodFertilityInducedNCSResearch: Bool;
		weeks: number;
	}

	type ArcologyStateFSPeculiarities = {
		FSSupremacistRace: Zeroable<Race>;
		FSSubjugationistRace: Zeroable<Race>;

		FSEgyptianRevivalistInterest: number;

		FSRepopulationFocusPregPolicy: number;
		FSRepopulationFocusMilfPolicy: number;
		FSRepopulationFocusInterest: number;

		FSEugenicsChastityPolicy: number;
		FSEugenicsSterilizationPolicy: number;
		FSEugenicsInterest: number;

		FSChattelReligionistCreed: number;
	}

	type ArcologyStateFS = ArcologyStateFSPeculiarities &
		Record<FutureSociety, FSPolicyValue> &
		Record<FutureSocietyHasResearchAny, Bool> &
		Record<FSDecoName<FutureSociety>, number> &
		Record<FSSMRName<FutureSociety>, Bool> &
		Record<FutureSocietyPolicyAny, number> &
		Record<FutureSocietyChoiceAny, number>;

	type ArcologyState = ArcologyStateBase & ArcologyStateFS;

	const enum RevivalSocietyFreezeValue {
		Antebellum,
		Arabian,
		Aztec,
		Chinese,
		Edo,
		Egyptian,
		NeoImperial,
		Roman,
	}
	interface RevivalSocietyFreeze extends Record<string, RevivalSocietyFreezeValue> {
		ANTEBELLUM: RevivalSocietyFreezeValue.Antebellum,
		ARABIAN: RevivalSocietyFreezeValue.Arabian,
		AZTEC: RevivalSocietyFreezeValue.Aztec,
		CHINESE: RevivalSocietyFreezeValue.Chinese,
		EDO: RevivalSocietyFreezeValue.Edo,
		EGYPTIAN: RevivalSocietyFreezeValue.Egyptian,
		NEO_IMPERIAL: RevivalSocietyFreezeValue.NeoImperial,
		ROMAN: RevivalSocietyFreezeValue.Roman,
	}

	const enum FSHumanDevelopmentVector {
		/** Positive for mature preference, negative for young */
		Age,
		/** Positive for statuesque preference, negative for petite */
		Height,
		/** Positive for decadence preference negative for physical idealist */
		Weight,
		/** Positive for transformation preference, negative for body purism */
		Modifications,
		/** Positive for expansionist preference, negative for slim */
		Assets,
		/** Positive for professionalism, negative for intellectual dependency */
		Intelligence,
		/** Positive for radicalism, negative for fundamentalism */
		Gender,
		/** Positive for repopulation, negative for eugenics */
		Breeding,
		/** Positive for paternalism, negative for degradationism */
		LifeQuality,
	}

	interface FSHumanDevelopmentVectorFreeze extends Record<string, FSHumanDevelopmentVector> {
		AGE: FSHumanDevelopmentVector.Age,
		HEIGHT: FSHumanDevelopmentVector.Height,
		WEIGHT: FSHumanDevelopmentVector.Weight,
		MODIFICATIONS: FSHumanDevelopmentVector.Modifications,
		ASSETS: FSHumanDevelopmentVector.Assets,
		INTELLIGENCE: FSHumanDevelopmentVector.Intelligence,
		GENDER: FSHumanDevelopmentVector.Gender,
		BREEDING: FSHumanDevelopmentVector.Breeding,
		LIFE_QUALITY: FSHumanDevelopmentVector.LifeQuality,
	}

	interface SlaveSocialEffect {
		/** FS */
		FS: FutureSocietyDeco | "";
		/** positive or negative value (a small integer, or a fraction between -1 and 1) */
		magnitude: number;
		/** for compact/list mode (plain text string) */
		shortDesc: string;
		/** for expanded mode (HTML string) */
		longDesc: string;
		/** true if the effect is only due to the facility she's assigned to */
		creditFacility?: boolean;
	}
}


code:
declare namespace FC {
	type WithNone<T> = T | "none";

	const enum Bool {
		False = 0,
		True = 1
	}

	const enum NoObject {
		Value = 0
	}

	type Zeroable<T> = T | NoObject;
}

type WidenLiterals<T> =
  T extends boolean ? boolean :
  T extends string ? string :
  T extends number ? number :
  T;


code:
declare namespace FC {
	namespace Data {

		namespace Wardrobe {
			interface ClothingOptionBase {
				name: string;
				fs?: string; // FSPolicy;
			}
			interface ClothingOption extends ClothingOptionBase {
				value: string;
			}

			interface UpdatingClothingOption extends ClothingOptionBase {
				updateSlave: DeepPartialSlaveState;
			}
		}
		namespace Pronouns {
			interface Definition {
				pronoun: string;
				possessive: string;
				possessivePronoun: string;
				object: string;
				objectReflexive: string;
				noun: string;
			}
		}

		interface JobDesc {
			position: string;
			assignment: Assignment;
			publicSexUse: boolean;
			fuckdollAccepted: boolean;
			broodmotherAccepted?: boolean;
			/** workers can take part time jobs in addition to their main (full-time) one */
			partTime?: boolean;
		}

		interface ManagerJobDesc extends JobDesc {
			shouldWalk: boolean;
			shouldHold: boolean;
			shouldSee: boolean;
			shouldHear: boolean;
			shouldTalk: boolean;
			shouldThink: boolean;
			requiredDevotion: number;
			/** Applicable careers */
			careers: string[];
			/** Applicable skill name */
			skill: string;
			positionAbbreviation?: string;
		}

		interface FacilityDesc {
			/** Base name for state variables */
			baseName: string;
			/** Generic name for UI (Brothel, Club, etc.)
			 * If null, baseName is used instead
			 */
			genericName: string | null;
			jobs: Record<string, JobDesc>;
			defaultJob: string;
			manager: ManagerJobDesc | null;
			decorated: boolean;
		}

		namespace SlaveSummary {
			interface SmartVibrator {
				setting: {
					off: string,
					submissive: string,
					lesbian: string,
					oral: string,
					humiliation: string,
					anal: string,
					boobs: string,
					sadist: string,
					masochist: string,
					dom: string,
					pregnancy: string,
					vanilla: string,
					all: string,
					none: string,
					monitoring: string,
					men: string,
					women: string,
					"anti-men": string,
					"anti-women": string,
				},
				system: {
					"piercing": string,
					"bullet": string,
					"vibe": string
				}
			}
		}
	}
}


code:
declare namespace FC {
	namespace Desc {
		interface LongSlaveOptions {
			descType?: DescType;
			market?: Zeroable<SlaveMarketName | SpecialMarketName | "starting">;
			marketText?: string; /* extra text to be appended to the first line of the description, dependent on the original market */
			noArt?: boolean;
			/** Allow linking to other passages, for example to other slaves */
			links?:boolean;
		}
	}
}


code:
declare namespace FC {

    namespace EndWeek {
        interface FacilityReport {
            before: Node,
            slaves: Array<SlaveReport>,
            after: Node,
        }

        interface SlaveReport {
            id: number,
            report: Node,
        }
    }

}


code:
declare namespace FC {
	export type Upgrade = InstanceType<typeof App.Upgrade>;

	interface IUpgrade {
		/** The variable name of the upgrade. */
		property: string;
		/** Properties pertaining to any tiers available. */
		tiers: IUpgradeTier[];
		/** Any object the upgrade property is part of, if not the default `V`. */
		object?: Object;
	}

	interface IUpgradeTier {
		/** The value `property` must be set to in order to display this tier. */
		value: any;
		/** The value to set `property` to upon purchase of the upgrade, if any. */
		upgraded?: any;
		/** The link text. */
		link?: string;
		/** The text to display for the current tier of the upgrade. */
		text: string;
		/**
		 * How much the upgrade costs.
		 *
		 * If one is not provided, the upgrade will be free.
		 */
		cost?: number;
		/** Any handler to run upon purchase. */
		handler?: () => void;
		/** Any additional information to display upon hover on the link. */
		notes?: string[];
		/**
		 * Any prerequisites that must be met before the upgrade is available.
		 *
		 * If none are given, the upgrade will always be available.
		 */
		prereqs?: boolean[];
		/** Any additional nodes to attach. */
		nodes?: Array<string|HTMLElement|DocumentFragment>;
	}

	interface IFacilityAssignment {
		/** The name of the assignment. */
		position: string;
		/** The assignment type. */
		assignment: Assignment;
		/** Whether the assigned slaves engage in sex with the public. */
		publicSexUse: boolean;
		/** Whether fuckdolls can work here. */
		fuckdollAccepted: boolean;
		/** Whether slaves assigned here can work at another assignment at the same time. */
		partTime?: boolean;
	}

	interface IManagerAssignment {
		/** The name of the assignment. */
		position: string;
		/** The assignment name's abbreviated form, if any. */
		positionAbbreviation?: string;
		/** The assignment type. */
		assignment: Assignment;
		/** A list of careers that count towards past experience. */
		careers: string[];
		/** Which of a slave's manager skills is affected. */
		skill: string;
		/** Whether the assigned slaves engage in sex with the public. */
		publicSexUse: boolean;
		/** Whether fuckdolls can work here. */
		fuckdollAccepted: boolean;
		/** Whether broodmothers can work here. */
		broodmotherAccepted: boolean;
		/** If slaves assigned here must be able to walk. */
		shouldWalk: boolean;
		/** If slaves assigned here must be able to hold items. */
		shouldHold: boolean;
		/** If slaves assigned here must be able to see. */
		shouldSee: boolean;
		/** If slaves assigned here must be able to hear. */
		shouldHear: boolean;
		/** If slaves assigned here must be able to talk. */
		shouldTalk: boolean;
		/** If slaves assigned here must have cognitive function. */
		shouldThink: boolean;
		/** The minimum required devotion level to be assigned here. */
		requiredDevotion: number;
	}

	interface FacilityFramework {
		/** The variable name of the facility. */
		baseName: string;
		/** The generic form of the facility. */
		genericName: string|null;
		/** An object listing all the available positions in the facility. */
		jobs: Record<string, IFacilityAssignment>;
		/** The default job in the facility. */
		defaultJob: string;
		/** Properties pertaining to the facility's manager. */
		manager: IManagerAssignment;
		/** Whether the facility can use FS decorations. */
		decorated: boolean;
		/** Whether the facility is located within the penthouse or in the broader arcology */
		penthouseFacility: boolean
	}

	namespace Facilities {
		export type Facility = InstanceType<typeof App.Facilities.Facility>;
		export type Animal = InstanceType<typeof App.Entity.Animal>;

		interface Decoration extends Record<FC.FutureSocietyDeco, string> {}

		interface Rule {
			/** The variable name of the rule. */
			property: string;
			/** Any prerequisites that must be met for the rule to be displayed. */
			prereqs: boolean[];
			/** Properties pertaining to any options available. */
			options: Array<{
				/** The text displayed when the rule is active. */
				text: string;
				/** The link text to set the rule to active. */
				link: string;
				/** The value to set `property` to when the rule is active. */
				value: any;
				/** Any handler to run upon setting the value. */
				handler?: (value: any) => void;
				/** Any additional information to display with on the link. */
				note?: string;
				/** Any prerequisites that must be met for the option to be displayed. */
				prereqs?: boolean[];
			}>;
			/** Any additional nodes to attach. */
			nodes?: Array<string|HTMLElement|DocumentFragment>;
			/** Any object the rule property is part of, if not the default `V`. */
			object?: Object;
		}

		interface Expand {
			/**
			 * The number of spots to add per expansion.
			 *
			 * Defaults to 5.
			 */
			amount?: number;
			/**
			 * How much expanding the facility costs.
			 *
			 * Defaults to 1000 times the number of slaves the facility can currently support.
			 */
			cost?: number;
			/**
			 * A short description of how many slaves are in the facility out of how many possible.
			 *
			 * Defaults to `"${facilityName} can support ${possible} slaves. It currently has ${current} slaves."`.
			 */
			desc?: string;
			/** The maximum number of times the facility can be expanded, if any. */
			maximum?: number;
			/** Any link to remove all slaves from the facility, if not the default. */
			removeAll?: HTMLDivElement;
			/**
			 * The assignment to assign the facility's manager to upon decommission.
			 *
			 * Defaults to `"rest"`.
			 */
			removeManager?: FC.Assignment;
			/**
			 * The assignment to assign the facility's employees to upon decommission.
			 *
			 * Defaults to `"rest"`.
			 */
			removeSlave?: FC.Assignment;
			/**
			 * Whether the facility cannot be expanded.
			 *
			 * Defaults to `false`.
			 */
			unexpandable?: boolean;
		}

		interface Pit {
			/** Defaults to "the Pit" if not otherwise set. */
			name: string;
			// Arena section
			trainingIDs: number[];

			// Pit section
			/**
			 * If there is a fight event at the end of the week.
			 */
			active: boolean
			/** The type of audience the Pit has. */
			audience: "none" | "free" | "paid";
			/** The type of decoration the Pit is using. */
			decoration: FC.FutureSocietyDeco;
			/** An array of the IDs of slaves assigned to the Pit. */
			fighterIDs: number[];
			/** Whether or not a fight has taken place during the week. */
			fought: boolean;
			/**
			 * Base for the max number of fights that can be held each week.
			 * fightNum = 3 + 2 * fightsBase
			 */
			fightsBase: 0 | 1 | 2
			/**
			 * How many can watch the fight. Influences rep/cash generation
			 */
			seats: 0 | 1 | 2
			/**
			 * * 0: no lethal fights allowed
			 * * 1: lethal and nonlethal fights allowed
			 * * 2: only lethal fights allowed
			 */
			lethal: 0 | 1 | 2
			/**
			 * Which virginities will be respected
			 */
			virginities: "none" | "vaginal" | "anal" | "all"
			/**
			 * Whether slaves fighting must be in somewhat fair health and generally able to do combat.
			 */
			minimumHealth: boolean
			/**
			 * Schedule a slave to fight the BG
			 */
			slaveFightingBodyguard: number
			/**
			 * Schedule two slaves to fight each other
			 */
			slavesFighting: [number, number]
		}
	}
}


code:
declare namespace FC {
    interface Loan {
		/** The lender's name. */
		name: 'bank' | 'shark';
		/** The amount they've lent. */
		principal: number;
		/** The week on which repayment is due. */
		deadline: number;
		/** The number of installments remaining until the full amount is paid. */
		installments: number;
		/** The Annual Percentage Rate. */
		apr: number;
		/** The amount of interest the loan will accumulate. */
		interest: number;
		/** The full amount that will be paid. */
		full: number;
	}

	interface SlaveStatisticData {
		/** ID of relevant slave */
		ID: number,
		slaveName: string,
		customLabel: string,
		income: number,
		adsIncome: number,
		rep: number,
		food: number,
		cost: number,
		customers: number,

		milk?:number,
		cum?:number,
		fluid?:number,
	}
}


code:
declare namespace FC {
	/**@deprecated */
	type SlaveStateOrZero = Zeroable<SlaveState>;
	/**@deprecated */
	type HumanStateOrZero = Zeroable<HumanState>;

	type DefaultGameStateVariables = typeof App.Data.defaultGameStateVariables;
	type ResetOnNGPVariables = typeof App.Data.resetOnNGPlus;

	interface Enunciation {
		title: string;
		say: string;
	}

	interface Rival {
		/**
		- 0: Init
		- 1: Not established
		- 2: Established
		- 3: Captured
		- 4: Killed / Accepted offer
		- 5: Enslaved
		 */
		state: number;
		duration: number;
		prosperity: number;
		power: number;
		race?: FC.Race;
		/**
		- 1: Female
		- 2: Male
		 */
		gender?: number;
		ID?: number;
		FS: {
			name: string;
			race?: FC.Race;
			adopted?: number;
		}
		/**
			- 0: Unknown / Gone
			- 1: Announced
			- 2: Rescued
			- 3: Given in. Currently unused, is checked but commented out within src/endWeek/saDevotion.js
			*/
		hostageState: number,
	}

	interface Peacekeepers {
		/**
		- 0: Gone
		- 1: Not established
		- 2: Established
		- 3: Independent
		 */
		state: number;
		generalName?: string;
		strength?: number;
		attitude?: number;
		undermining?: number;
		influenceAnnounced?: number;
		tastes?: string;
	}

	export type RecruiterTarget = "desperate whores" | "young migrants" | "recent divorcees" |
		"expectant mothers" | "dissolute sissies" | "reassignment candidates" | "other arcologies";

	interface DeprecatedGameVariables {
		/** @deprecated */
		surgeryType: string;

		/** @deprecated */
		relationLinks?: Record<number, {father: number, mother: number}>;

		/** @deprecated */
		spire: number;
		/** @deprecated */
		customPronouns?: Record<number, Data.Pronouns.Definition>;
		/** @deprecated */
		returnTo: string;
	}

	export type HeadGirlTraining = "health" | "paraphilia" | "soften" | "flaw" | "obedience" |
		"entertain skill" | "oral skill" | "fuck skill" | "penetrative skill" | "anal skill" | "whore skill";

	export interface HeadGirlTrainee {
		ID: number;
		training: HeadGirlTraining;
	}

	export interface ReminderEntry {
		message: string | Node;
		week: number;
		category: string;
		slaveID?: number;
	}

	export interface SlaveTrinketData {
		name: string,
		id?: number | null
		extra?: string,
		napkinShape?: string,
	}

	export interface TrinketData {
		slaveTrinket: boolean,
		/** if slaveTrinket is false this is used to keep track of how many of the given trinket the player has */
		count? : number,
		data? : Set<SlaveTrinketData>,
	}

	/**
	 * These variables shall not be in the game state and there is a hope they will be exterminated in the future
	 */
	interface TemporaryVariablesInTheGameState {
		brothelSpots?: number;
		clubSpots?: number;
		dairySpots?: number;
		brothelSlavesGettingHelp?: number;
		clubSlavesGettingHelp?: number;

		milkmaidDevotionThreshold?: number;
		milkmaidDevotionBonus?: number;
		milkmaidTrustThreshold?: number;
		milkmaidTrustBonus?: number;
		milkmaidHealthBonus?: number;

		event?: InstanceType<typeof App.Events.BaseEvent>;

		arcadeDemandDegResult?: 1 | 2 | 3 | 4 | 5;

		heroSlaves: HeroSlaveTemplate[]; // TODO: leave this here until custom hero slave are reworked
	}

	export interface TransitionObject {
		[key: string]: any; // lets anything be stored in here while also allowing some properties to be typed without TSC screaming at us

		// Starting Passages
		/** if true then we will pick 3-6 random heros from the hero slave database instead of using the normal cheat slaves */
		newCheatGirls?: boolean;
		/** allows the player to change the amount of cash they start with. Doesn't change V.cheater. Deleted after the starting girls passage */
		limitedCheatStart?: boolean;

		// Misc
		/** a slave ID for the active slave */
		AS?: HumanID;
		/**
		 * use V.temp.AS instead if the actor exists on the game state.
		 * use this if the data doesn't exist on the game state yet and needs to traverse passages.
		 */
		activeSlave?: Zeroable<SlaveState>;
		/** the index of the active fetus in V.AS's womb */
		activeFetus?: number;
		/** a slave ID */
		swappingSlave?: HumanID;
		gameover?:
			"idiot ball" | "debt" | "birth complications" | "ownership" |
			"sisters" | "major battle defeat" | "Rebellion defeat" |
			"Idiot Ball 2 The Dumbassening" |
			"Idiot Ball 3 Totally Not Idiot Ball 2 Again" |
			"starving citizens" | "loanshark" | "no slaves";
		prostheticsConfig?:
			"main" | "hearing" | "voice" | "detachTail" | "attachTail" |
			"detachAppendages" | "attachAppendages" |
			"attachWings";
		/** how many slaves can the player import into their new game when using New Game Plus */
		slavesToImportMax?: number;
		/** the currently selected arcology; used for neighbor interaction */
		activeArcologyIdx?: number;
		showEmptyBudgetEntries?: {
			cash?: Bool;
			rep?: Bool;
		};
		/** Used in the cheat editor; The edited actor */
		cheatActor?: FC.HumanState;
		applyCareerBonus?: Bool;
		careerBonusNeeded?: HumanID[];

		customLanguage?: string;

		/** track impreg actions made to slaves */
		slaveIdsImpregnanted?: Set<number>
	}

	export interface GameVariables extends DefaultGameStateVariables, ResetOnNGPVariables,
		DeprecatedGameVariables, TemporaryVariablesInTheGameState {}
}


code:
declare global {
	// extensions
	interface Array<T> {
		includes(needle: any): boolean; // because we use silly unions with 0
	}

	// like Readonly<>, but recursive
	type ReadonlyDeep<T> = {
		readonly [P in keyof T]: ReadonlyDeep<T[P]>;
	}

	interface Window {
		storyProxy?: object;
	}

	const V: FC.GameVariables;
	function createReadonlyProxy<T>(target: T): Readonly<T>;
	function createCheatProxy<T>(target: T): T;
}

export {}


code:
import {DeepPartial} from "ts-essentials";
declare global {
	export namespace FC {
		export type HumanID = number;
		/** See {@link SID} */
		export type SpecialID = 0|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10;
		export type GenePoolRecord = InstanceType<typeof App.Entity.GenePoolRecord>;

		/** These states extend GenePoolRecord */

		export type HumanState = InstanceType<typeof App.Entity.HumanState>;

		/** end of states that extend GenePoolRecord */

		/** These states extend HumanState */

		export interface SlaveHistory {
			week: GameVariables["week"],
			lastAssignment: SlaveState["assignment"],
			devotion: SlaveState["devotion"],
			trust: SlaveState["trust"],
			health: SlaveState["health"]["condition"],
			energy: SlaveState["energy"],
			income: SlaveState["lastWeeksCashIncome"],
			expenses: number, // via  getSlaveCost(slave)
			reputation: SlaveState["lastWeeksRepIncome"],
			reputation_loss: SlaveState["lastWeeksRepExpenses"],
			weight: SlaveState["weight"],
			boobs: SlaveState["boobs"],
			muscles: SlaveState["muscles"],
		}

		export type SlaveState = InstanceType<typeof App.Entity.SlaveState>;
		export type PlayerState = InstanceType<typeof App.Entity.PlayerState>;

		export type MissingParentRecordOptionalParams = {yours?: boolean, dead?: boolean, traitor?: boolean};
		export type MissingParentRecord = Pick<HumanState, "ID" | "slaveName" | "slaveSurname" | "dick" | "vagina" | "mother" | "father" | "inbreedingCoeff"> & {fullName: string} & MissingParentRecordOptionalParams;

		/** end of states that extend HumanState */

		/** These states extend SlaveState */

		export type TankSlaveState = InstanceType<typeof App.Entity.TankSlaveState>;
		export type ChildState = InstanceType<typeof App.Entity.ChildState>;
		export type InfantState = InstanceType<typeof App.Entity.InfantState>;

		/** end of states that extend SlaveState */

		export type Fetus = InstanceType<typeof App.Entity.Fetus>;

		export type CustomSlaveOrder = InstanceType<typeof App.Entity.CustomSlaveOrder>;

		export type AnimalState = InstanceType<typeof App.Entity.Animal>;

		export type DeepPartialSlaveState = DeepPartial<SlaveState>;

		type SlaveStateRequiredAttributes = "ID" | "slaveName";
		export interface HeroSlaveTemplate extends
			DeepPartial<Omit<SlaveState, SlaveStateRequiredAttributes>>,
			Pick<SlaveState, SlaveStateRequiredAttributes> {
				/**
				 * [left arm, right arm, left leg, right leg].
				 * When 0 remove the limb, when 1+ sets the limb to the given LimbType.
				 * [0, 0, 1, 1] would remove both arms, but keep the legs as normal.
				 * [6, 6, 0, 1] would make both arms cybernetic prostetics and remove the left leg.
				 */
				_limbs?: [0 | LimbType, 0 | LimbType, 0 | LimbType, 0 | LimbType];
			}

		export interface GingeredSlave extends SlaveState {
			// note that all members are optional...GingeredSlave and SlaveState are bidirectionally interchangeable
			gingering?: InstanceType<typeof App.Entity.GingeringParameters>;
			beforeGingering?: SlaveState;
		}

		export interface ReportSlave extends SlaveState {
			paraphiliaSatisfied: number;
			pornFameBonus: number;
			inappropriateLactation: number;
			fetishChanged: number;
			slaveUsedRest: number;
		}

		export type SlaveUpdate = DeepPartialSlaveState;

		//#region SlaveState types
		namespace Rules {
			type Living = "spare" | "normal" | "luxurious";
			interface LivingFreezed extends Record<string, Living> {
				LUXURIOUS: 'luxurious';
				NORMAL: 'normal';
				SPARE: 'spare';
			}

			type Rest = "none" | "cruel" | "restrictive" | "permissive" | "mandatory";
			interface RestFreezed extends Record<string, Rest> {
				NONE: "none";
				MIN: "cruel";
				MID: "restrictive";
				MAX: "permissive";
				MANDATORY: "mandatory";
			}

			type Mobility = "restrictive" | "permissive";
			type Speech = "restrictive" | "permissive" | "accent elimination" | "language lessons";
			type Relationship = "restrictive" | "just friends" | "permissive";
			type Lactation = "none" | "induce" | "maintain" | "sell"; // `sell` only used for the PC in managePersonalAffairs.js
			type Punishment = "confinement" | "whipping" | "chastity" | "situational";
			type Reward = "relaxation" | "drugs" | "orgasm" | "situational" | "confinement";
		}

		type Assignment =
			// Penthouse Assignments
			'rest' | 'please you' | 'take classes' | 'be a servant' | 'whore' | 'serve the public' | 'be a subordinate slave' |
			'get milked' | 'work a glory hole' | 'stay confined' |
			// Leadership Assignments
			'guard you' | 'be your Head Girl' | 'recruit girls' | 'be your agent' | 'live with your agent' |
			// Facility Assignments
			'be confined in the arcade' | 'be the Madam' | 'work in the brothel' | 'be the Wardeness' | 'be confined in the cellblock' |
			'be the DJ' | 'serve in the club' | 'be the Nurse' | 'get treatment in the clinic' | 'be the Milkmaid' | 'work in the dairy' |
			'be the Farmer' | 'work as a farmhand' | 'live with your Head Girl' | 'be your Concubine' | 'serve in the master suite' |
			'be the Matron' | 'work as a nanny' | 'be the Schoolteacher' | 'learn in the schoolroom' | 'be the Stewardess' |
			'work as a servant' | 'be the Attendant' | 'rest in the spa' |
			// Does this one exist?
			'labor in the production line' |
			// Other
			'choose her own job' |
			// Pseudo-jobs
			'@Lurcher' | '@Pit' | "@Arena" | '@be imported' | '@lay in tank';
		interface AssignmentFreeze extends Record<string, Assignment> {
			// Penthouse Assignments
			REST: 'rest';
			FUCKTOY: 'please you';
			CLASSES: 'take classes';
			HOUSE: 'be a servant';
			WHORE: 'whore';
			PUBLIC: 'serve the public';
			SUBORDINATE: 'be a subordinate slave';
			MILKED: 'get milked';
			GLORYHOLE: 'work a glory hole';
			CONFINEMENT: 'stay confined';
			// Leadership Assignments
			BODYGUARD: 'guard you';
			HEADGIRL: 'be your Head Girl';
			RECRUITER: 'recruit girls';
			AGENT: 'be your agent';
			AGENTPARTNER: 'live with your agent';
			// Facility Assignments
			ARCADE: 'be confined in the arcade';
			MADAM: 'be the Madam';
			BROTHEL: 'work in the brothel';
			WARDEN: 'be the Wardeness';
			CELLBLOCK: 'be confined in the cellblock';
			DJ: 'be the DJ';
			CLUB: 'serve in the club';
			NURSE: 'be the Nurse';
			CLINIC: 'get treatment in the clinic';
			MILKMAID: 'be the Milkmaid';
			DAIRY: 'work in the dairy';
			FARMER: 'be the Farmer';
			FARMYARD: 'work as a farmhand';
			HEADGIRLSUITE: 'live with your Head Girl';
			CONCUBINE: 'be your Concubine';
			MASTERSUITE: 'serve in the master suite';
			MATRON: 'be the Matron';
			NURSERY: 'work as a nanny';
			TEACHER: 'be the Schoolteacher';
			SCHOOL: 'learn in the schoolroom';
			STEWARD: 'be the Stewardess';
			QUARTER: 'work as a servant';
			ATTENDANT: 'be the Attendant';
			SPA: 'rest in the spa';
			// Does this one exist?
			BABY_FACTORY: 'labor in the production line';
			// Other
			CHOICE: 'choose her own job';
			// Pseudo-jobs
			LURCHER: '@Lurcher';
			PIT: '@Pit';
			ARENA: "@Arena";
			IMPORTED: '@be imported';
			TANK: '@lay in tank';
		}

		type Fetish = WithNone<"mindbroken" | "submissive" | "cumslut" | "humiliation" | "buttslut" | "boobs" | "sadist" |
			"masochist" | "dom" | "pregnancy" | "bestiality">;
		interface FetishFreeze extends Record<string, Fetish> {
			NONE: "none";
			MINDBROKEN: "mindbroken";
			SUBMISSIVE: "submissive";
			CUMSLUT: "cumslut";
			HUMILIATION: "humiliation";
			BUTTSLUT: "buttslut";
			BOOBS: "boobs";
			SADIST: "sadist";
			MASOCHIST: "masochist";
			DOM: "dom";
			PREGNANCY: "pregnancy";
			BESTIALITY: "bestiality";
		}

		type BehavioralFlaw = WithNone<
			| "arrogant" // clings to her dignity, thinks slavery is beneath her
			| "bitchy" // : can 't keep her opinions to herself
			| "odd" // says and does odd things
			| "hates men" // hates men
			/** hates women */
			| "hates women"
			| "gluttonous" // likes eating, gains weight
			| "anorexic" // dislikes eating and being forced to eat, loses weight
			| "devout" // resistance through religious faith
			| "liberated" // believes slavery is wrong
		>;

		type BehavioralQuirk = WithNone<
			/** believes she has value as a slave */
			| "confident"
			/** often has as witty or cunning remark ready, knows when to say it */
			| "cutting"
			/** is funny */
			| "funny"
			/** loves working out */
			| "fitness"
			/** likes spending time with women */
			| "adores women"
			/** likes spending time with men */
			| "adores men"
			/** defines herself on the thoughts of others */
			| "insecure"
			/** breaks cultural norms */
			| "sinful"
			/** advocates slavery */
			| "advocate">;
		interface BehavioralQuirkFreeze extends Record<string, BehavioralQuirk> {
			NONE: "none";
			CONFIDENT: "confident";
			CUTTING: "cutting";
			FUNNY: "funny";
			FITNESS: "fitness";
			ADORESWOMEN: "adores women";
			ADORESMEN: "adores men";
			INSECURE: "insecure";
			SINFUL: "sinful";
			ADVOCATE: "advocate";
		}

		type SexualFlaw = WithNone<
			/** hates oral sex */
			| "hates oral"
			/** hates anal sex */
			| "hates anal"
			/** dislikes penetrative sex */
			| "hates penetration"
			/** nervous when naked */
			| "shamefast"
			/** believes sex should be based on love and consent */
			| "idealistic"
			/** dislikes sex */
			| "repressed"
			/** inert during sex */
			| "apathetic"
			/** sexually crude and has little sense of what partners find disgusting during sex */
			| "crude"
			/** sexually judgemental and often judges her sexual partners' performance */
			| "judgemental"
			/** disregards herself in sex */
			| "neglectful"
			/** addicted to cum */
			| "cum addict"
			/** addicted to anal */
			| "anal addict"
			/** addicted to being the center of attention */
			| "attention whore"
			/** addicted to her own breasts */
			| "breast growth"
			/** sexually abusive */
			| "abusive"
			/** loves causing pain and suffering */
			| "malicious"
			/** hates herself */
			| "self hating"
			/** addicted to being pregnant */
			| "breeder"
			/** addicted to fucking animals */
			| "animal lover">;

		type SexualQuirk = WithNone<
			/** can take a facefucking */
			"gagfuck queen"
			/** knows how far she can go without getting hurt */
			| "painal queen"
			/** knows how much resistance her partners want */
			| "strugglefuck queen"
			/** is a tease */
			| "tease"
			/** enjoys the closeness of sex */
			| "romantic"
			/** enjoys breaking sexual boundaries */
			| "perverted"
			/** enjoys bring her partners to orgasm */
			| "caring"
			/** willing to do anything */
			| "unflinching"
			/** prefers big cocks */
			| "size queen">;
		interface SexualQuirkFreeze extends Record<string, SexualQuirk> {
			NONE: "none";
			GAGFUCK: "gagfuck queen";
			PAINAL: "painal queen";
			STRUGGLE: "strugglefuck queen";
			TEASE: "tease";
			ROMANTIC: "romantic";
			PERVERT: "perverted";
			CARING: "caring";
			UNFLINCHING: "unflinching";
			SIZEQUEEN: "size queen";
		}

		type BreastShape = "normal" | "perky" | "saggy" | "torpedo-shaped" | "downward-facing" | "wide-set" | "spherical";
		interface BreastShapeFreeze extends Record<string, BreastShape> {
			NORMAL: "normal";
			PERKY: "perky";
			SAGGY: "saggy";
			TORPEDO: "torpedo-shaped";
			DOWNWARD: "downward-facing";
			WIDE: "wide-set";
			SPHERICAL: "spherical";
		}

		type Clothes = "a ball gown" | "a bimbo outfit" | "a biyelgee costume" | "a bra" | "a bunny outfit" | "a burkini" |
			"a burqa" | "a button-up shirt" | "a button-up shirt and panties" | "a chattel habit" | "a cheerleader outfit" | "a comfortable bodysuit" |
			"a courtesan dress" | "a cybersuit" | "a dirndl" | "a fallen nuns habit" | "a Fuckdoll suit" | "a gothic lolita dress" | "a halter top dress" |
			"a hanbok" | "a hijab and abaya" | "a hijab and blouse" | "a huipil" | "a kimono" | "a klan robe" | "a latex catsuit" | "a leotard" |
			"a long qipao" | "a maternity dress" | "a military uniform" | "a mini dress" | "a monokini" | "a mounty outfit" | "a nice maid outfit" |
			"a nice nurse outfit" | "a nice pony outfit" | "a niqab and abaya" | "a one-piece swimsuit" | "a penitent nuns habit" | "a police uniform" |
			"a red army uniform" | "a Santa dress" | "a scalemail bikini" | "a schoolgirl outfit" | "a schutzstaffel uniform" | "a skimpy loincloth" |
			"a slave gown" | "a slutty klan robe" | "a slutty maid outfit" | "a slutty nurse outfit" | "a slutty outfit" | "a slutty pony outfit" |
			"a slutty qipao" | "a slutty schutzstaffel uniform" | "a sports bra" | "a string bikini" | "a striped bra" | "a succubus outfit" |
			"a sweater" | "a sweater and cutoffs" | "a sweater and panties" | "a t-shirt" | "a t-shirt and jeans" | "a t-shirt and panties" |
			"a t-shirt and thong" | "a tank-top" | "a tank-top and panties" | "a thong" | "a toga" | "a tube top" | "a tube top and thong" |
			"an apron" | "an oversized t-shirt" | "an oversized t-shirt and boyshorts" | "attractive lingerie" | "attractive lingerie for a pregnant woman" |
			"battlearmor" | "Imperial Plate" | "a tight Imperial bodysuit" | "battledress" | "body oil" | "boyshorts" | "chains" | "choosing her own clothes" |
			"clubslut netting" | "conservative clothing" | "cutoffs" | "cutoffs and a t-shirt" | "harem gauze" | "jeans" | "kitty lingerie" |
			"leather pants" | "leather pants and a tube top" | "leather pants and pasties" | "lederhosen" | "nice business attire" | "no clothing" |
			"overalls" | "panties" | "panties and pasties" | "pasties" | "restrictive latex" | "shibari ropes" | "slutty business attire" |
			"slutty jewelry" | "spats and a tank top" | "sport shorts" | "sport shorts and a sports bra" | "sport shorts and a t-shirt" |
			"stretch pants and a crop-top" | "striped panties" | "striped underwear" | "uncomfortable straps" |	"Western clothing" |
			"a confederate army uniform" | "an evening dress" | "a nipple bikini"
			/** AI clothing */
			"a superhero outfit" | "a cardigan" | "a streetwear outfit" | "a country outfit" |
			"a leather outfit" | "a turtleneck and miniskirt" | "a red priestess outfit" | "an eastern european outfit" | "a samba outfit" | "a tribal outfit" | "a tropical outfit" |
			"a valkyrie outfit" | "a baroque dress" | "a cocktail dress" | "an ice queen outfit" | "a magical girl costume" | "a sundress" | "a wedding dress" |
			"an armored dress" | "a babydoll" | "a coat and corset" | "a frilly bikini";
		type BellyAccessory = WithNone<"a small empathy belly" | "a medium empathy belly" | "a large empathy belly" | "a huge empathy belly" |
			"a corset" | "an extreme corset" | "a support band">;
		type Collar = WithNone<"ancient Egyptian" | "cruel retirement counter" | "uncomfortable leather" | "tight steel" | "shock punishment" |
			"heavy gold" | "pretty jewelry" | "nice retirement counter" | "bell collar" | "leather with cowbell" | "bowtie" | "neck tie" |
			"neck corset" | "stylish leather" | "satin choker" | "preg biometrics" | "silk ribbon">;
		type HairStyle = "afro"| "braided" | "cornrows" | "curled" | "dreadlocks" | "eary" | "bun" | "messy bun" | "ponytail" | "tails" |
			"drills" | "luxurious" | "messy" | "neat" | "permed" | "bangs" | "hime" | "strip" | "up" | "shaved" | "trimmed" | "buzzcut" | "bald" | "undercut" |
			"double buns" | "chignon" | "french twist" | "crown braid" | "dutch braid" | "double dutch braid" | "pixie cut" | "bob cut";
		type Shoes = "heels" | "pumps" | "extreme heels" | "boots" | "flats" | "platform heels" | "extreme heels" | "extreme platform heels" | "platform shoes";
		type MouthAccessory = "dildo gag" | "massive dildo gag" | "ball gag" | "bit gag" | "ring gag";

		type Tattoo = FC.NoObject | "tribal patterns" | "flowers" | "scenes" | "Asian art" |
			"degradation" | "counting" | "advertisements" | "rude words" |
			"bovine patterns" | "sacrament" | "sacrilege" | "possessive" |
			"paternalist";
		type TattooAnus = Tattoo | "bleached";
		type TattooBelly = FC.NoObject | "a heart" | "a star" | "a butterfly";
		type TattooVagina = Tattoo | "lewd crest";
		type TattooLip = Tattoo | "permanent makeup";
		type TattooAll = Tattoo | TattooAnus | TattooBelly | TattooVagina | TattooLip;

		type SlaveDiet = "healthy" | "restricted" | "corrective" | "muscle building" | "fattening" | "slimming" | "XX" | "XY" | "XXY" |
			"cum production" | "cleansing" | "fertility" | "high caloric";
		interface SlaveDietFreeze extends Record<string, SlaveDiet> {
			HEALTHY: "healthy";
			RESTRICTED: "restricted";
			CORRECTIVE: "corrective";
			MUSCLE: "muscle building";
			FATTEN: "fattening";
			SLIM: "slimming";
			FEMALE: "XX";
			MALE: "XY";
			FUTA: "XXY";
			CUM: "cum production";
			CLEANSE: "cleansing";
			FERTILITY: "fertility";
			CALORIC: "high caloric";
		}

		type PCExclusiveDiet = "exotic" | "medicinal" | "weaning";

		type Diet = SlaveDiet | PCExclusiveDiet;
		interface DietFreeze extends Record<string, Diet> {
			HEALTHY: "healthy";
			RESTRICTED: "restricted";
			CORRECTIVE: "corrective";
			MUSCLE: "muscle building";
			FATTEN: "fattening";
			SLIM: "slimming";
			FEMALE: "XX";
			MALE: "XY";
			FUTA: "XXY";
			CUM: "cum production";
			CLEANSE: "cleansing";
			FERTILITY: "fertility";
			CALORIC: "high caloric";
			EXOTIC: "exotic";
			MEDICINAL: "medicinal";
			WEANING: "weaning";
		}

		type Drug = "no drugs" |
			"breast injections" | "butt injections" | "clitoris enhancement" | "lip injections" | "nipple enhancers" | "penis enhancement" | "testicle enhancement" |
			"intensive breast injections" | "intensive butt injections" | "intensive clitoris enhancement" | "intensive penis enhancement" | "intensive testicle enhancement" |
			"fertility drugs" | "super fertility drugs" |
			"psychosuppressants" | "psychostimulants" | "steroids" |
			"hyper breast injections" | "hyper butt injections" | "hyper penis enhancement" | "hyper testicle enhancement" |
			"female hormone injections" | "male hormone injections" | "priapism agents" |
			"anti-aging cream" | "appetite suppressors" | "hormone enhancers" | "hormone blockers" |
			"penis atrophiers" | "testicle atrophiers" | "clitoris atrophiers" | "labia atrophiers" | "nipple atrophiers" | "lip atrophiers" |
			"breast redistributors" | "butt redistributors" | "sag-B-gone" | "growth stimulants" | "stimulants";
		interface DrugFreeze extends Record<string, Drug> {
			NONE: "no drugs";
			GROWBREAST: "breast injections";
			GROWBUTT: "butt injections";
			GROWCLIT: "clitoris enhancement";
			GROWLIP: "lip injections";
			GROWNIPPLE: "nipple enhancers";
			GROWPENIS: "penis enhancement";
			GROWTESTICLE: "testicle enhancement";
			INTENSIVEBREAST: "intensive breast injections";
			INTENSIVEBUTT: "intensive butt injections";
			INTENSIVECLIT: "intensive clitoris enhancement";
			INTENSIVEPENIS: "intensive penis enhancement";
			INTENSIVETESTICLE: "intensive testicle enhancement";
			FERTILITY: "fertility drugs";
			SUPERFERTILITY: "super fertility drugs";
			PSYCHOSUPP: "psychosuppressants";
			PSYCHOSTIM: "psychostimulants";
			STEROID: "steroids";
			HYPERBREAST: "hyper breast injections";
			HYPERBUTT: "hyper butt injections";
			HYPERPENIS: "hyper penis enhancement";
			HYPERTESTICLE: "hyper testicle enhancement";
			HORMONEFEMALE: "female hormone injections";
			HORMONEMALE: "male hormone injections";
			PRIAPISM: "priapism agents";
			ANTIAGE: "anti-aging cream";
			APPETITESUPP: "appetite suppressors";
			HORMONEENHANCE: "hormone enhancers";
			HORMONEBLOCK: "hormone blockers";
			ATROPHYPENIS: "penis atrophiers";
			ATROPHYTESTICLE: "testicle atrophiers";
			ATROPHYCLIT: "clitoris atrophiers";
			ATROPHYLABIA: "labia atrophiers";
			ATROPHYNIPPLE: "nipple atrophiers";
			ATROPHYLIP: "lip atrophiers";
			REDISTBREAST: "breast redistributors";
			REDISTBUTT: "butt redistributors";
			SAGBGONE: "sag-B-gone";
			GROWTHSTIM: "growth stimulants";
			STIM: "stimulants";
		}

		type ConsumerDrug = "lip enhancers" | "breast enhancers" | "butt enhancers" | "hip wideners" | "penis enlargers" | "clitoris enlargers" | "testicle enlargers" |
			"lip reducers" | "breast reducers" | "butt reducers" | "penis reducers" | "clitoris reducers" | "testicle reducers" |
			"stamina enhancers" | "fertility supplements" | "detox pills";
		interface ConsumerDrugFreeze extends Record<string, ConsumerDrug> {
			GROW_LIP: "lip enhancers";
			GROW_BREAST: "breast enhancers";
			GROW_BUTT: "butt enhancers";
			GROW_HIP: "hip wideners";
			GROW_PENIS: "penis enlargers";
			GROW_CLIT: "clitoris enlargers";
			GROW_TESTICLE: "testicle enlargers";
			REDUCE_LIP: "lip reducers";
			REDUCE_BREAST: "breast reducers";
			REDUCE_BUTT: "butt reducers";
			REDUCE_PENIS: "penis reducers";
			REDUCE_CLIT: "clitoris reducers";
			REDUCE_TESTICLE: "testicle reducers";
			ENHANCE_STAMINA: "stamina enhancers";
			ENHANCE_FERTILITY: "fertility supplements";
			DETOX: "detox pills";
		}

		type PCDrug = Drug | ConsumerDrug;

		type EarWear = WithNone<"hearing aids" | "muffling ear plugs" | "deafening ear plugs">;
		type EarShape = WithNone<"holes" | "damaged" | "normal" | "pointy" | "elven" | "cow" | "robot" | "orcish" | "sheep" | "deer" | "gazelle" | "bird" | "dragon">;
		type EarTopType = WithNone<"normal" | "cat" | "leopard" | "tiger" | "jaguar" | "lion" | "dog" | "wolf" | "jackal" | "round hyena" | "pointy hyena" | "fox" | "raccoon" | "rabbit" | "squirrel" | "rat" | "mouse" | "horse">;
		type EyebrowStyle = "bald" | "curved" | "elongated" | "high-arched" | "natural" | "rounded" | "shaved" | "shortened" |
			"slanted inwards" | "slanted outwards" | "straight";
		type EyebrowThickness = "pencil-thin" | "thin" | "threaded" | "natural" | "tapered" | "thick" | "bushy";
		type EyeWear = WithNone<"glasses" | "blurring glasses" | "corrective glasses" | "blurring contacts" | "corrective contacts">;

		type FaceShape = "masculine" | "androgynous" | "normal" | "cute" | "sensual" | "exotic" | "feline";
		interface FaceShapeFreeze extends Record<string, FaceShape> {
			MASC: "masculine";
			ANDRO: "androgynous";
			NORMAL: "normal";
			CUTE: "cute";
			SENSUAL: "sensual";
			EXOTIC: "exotic";
			FELINE: "feline";
		}

		type GenderGenes =
			/** female */
			"XX"
			/** Triple X syndrome female */
			| "XXX"
			/** male */
			| "XY"
			/** Klinefelter syndrome male */
			| "XXY"
			/** XYY syndrome male */
			| "XYY"
			| "X0"
			| "X"
			| "YY";
		interface GenderGenesFreeze extends Record<string, GenderGenes> {
			FEMALE: "XX";
			MALE: "XY";
			INVIABLE: "YY";
		}

		type GestationDrug = "slow gestation" | "speed up" | "labor suppressors";
		interface GestationDrugFreeze extends Record<string, GestationDrug> {
			SLOW: "slow gestation";
			FAST: "speed up";
			LABOR: "labor suppressors";
		}

		type HornType = WithNone<"curved succubus horns" | "backswept horns" | "cow horns" | "one long oni horn" |
			"two long oni horns" | "small horns">;

		type InflationLiquid = WithNone<"water" | "cum" | "milk" | "food" | "aphrodisiac" | "curative" | "tightener" | "urine" | "stimulant">;
		interface InflationLiquidFreeze extends Record<string, InflationLiquid> {
			NONE: "none";
			WATER: "water";
			CUM: "cum";
			MILK: "milk";
			FOOD: "food";
			APHRO: "aphrodisiac";
			CURATIVE: "curative";
			TIGHTEN: "tightener";
			URINE: "urine";
			STIM: "stimulant";
		}

		type TailType = WithNone<"mod" | "combat" | "sex"| "stinger">;
		type AppendagesType = WithNone<"mod" | "flight" | "sex" | "falcon" | "arachnid" | "kraken">;
		type Markings = WithNone<"beauty mark" | "birthmark" | "freckles" | "heavily freckled">;
		type TailShape = WithNone<"cat" | "leopard" | "tiger" | "jaguar" | "lion" | "dog" | "wolf" | "jackal" | "hyenaspotted" | "hyenastriped" | "fox" | "kitsune" | "tanuki" | "raccoon" | "rabbit" | "squirrel" | "rat" | "mouse" | "horse" | "bird" | "phoenix" | "peacock" | "raven" | "swan" | "sheep" | "cow" | "gazelle" | "deer" | "succubus" | "dragon" >;
		type WingsShape = WithNone<"angel" | "seraph" | "demon"| "dragon" | "phoenix" | "bird"| "fairy" | "butterfly" | "moth" | "insect" | "evil" >;

		type ToyHole = "all her holes" | "mouth" | "boobs" | "pussy" | "ass" | "dick";
		interface ToyHoleFreeze extends Record<string, ToyHole> {
			ALL: "all her holes";
			MOUTH: "mouth";
			BOOBS: "boobs";
			PUSSY: "pussy";
			ASS: "ass";
			DICK: "dick";
		}

		type OvaryImplantType = 0 | "fertility" | "sympathy" | "asexual";
		interface OvaryImplantTypeFreeze extends Record<string, OvaryImplantType> {
			NONE: 0;
			FERTILITY: "fertility";
			SYMPATHY: "sympathy";
			ASEXUAL: "asexual";
		}

		type NippleShape = "huge" | "puffy" | "inverted" | "tiny" | "cute" | "partially inverted" | "fuckable" | "flat";
		interface NippleShapeFreeze extends Record<string, NippleShape> {
			INVERTED: "inverted";
			PARTIAL: "partially inverted";
			FLAT: "flat";
			TINY: "tiny";
			CUTE: "cute";
			PUFFY: "puffy";
			HUGE: "huge";
			FUCKABLE: "fuckable";
		}

		type LactationType = 0 | 1 | 2;
		type VaginaLubeType = 0 | 1 | 2;
		type WombImplantType = WithNone<"restraint">;
		type LabiaType = 0 | 1 | 2 | 3;
		type ClitType = 0 | 1 | 2 | 3 | 4 | 5;
		type AnusType = 0 | 1 | 2 | 3 | 4;
		type ProstateType = 0 | 1 | 2 | 3;
		type dietCumType = 0 | 1 | 2;
		type dietMilkType = 0 | 1 | 2;
		/**
		 * 0: no; 1: yes; 2: heavy
		 */
		type PiercingType = 0 | 1 | 2;
		type Piercing = "ear" | "nose" | "eyebrow" | "lips" | "tongue" | "nipple" | "areola" | "navel" | "corset" | "genitals" | "vagina" | "dick" | "anus";
		type Race = "amerindian" | "asian" | "black" | "indo-aryan" | "latina" | "malay" | "middle eastern" | "mixed race" |
			"pacific islander" | "catgirl" | "semitic" | "southern european" | "white";

		type SizingImplantType = "normal" | "string" | "fillable" | "advanced fillable" | "hyper fillable";
		interface SizingImplantTypeFreeze extends Record<string, SizingImplantType> {
			NORMAL: "normal";
			STRING: "string";
			FILLABLE: "fillable";
			ADVANCED: "advanced fillable";
			HYPER: "hyper fillable";
		}

		type LipsImplantType = "normal";
		type InstalledSizingImplantType = WithNone<SizingImplantType>;
		type InstalledLipsImplantType = WithNone<LipsImplantType>;
		type SizableBodyPart = "lips" | "boobs" | "butt" | "clit" | "dick" | "balls";
		type SizingImplantTarget = "boobs" | "butt" | "lips";

		interface BodyPartImplantTypeMap {
			lips: LipsImplantType;
			boobs: SizingImplantType;
			butt: SizingImplantType;
		}

		type BodyPartInstalledImplantType<Target extends SizingImplantTarget> = WithNone<BodyPartImplantTypeMap[Target]>;

		type SmartPiercingSetting = WithNone<
			"off" | "all" | "no default setting" | "random" | "women" | "men" |
			"vanilla" | "oral" | "anal" | "boobs" | "submissive" | "bestiality" |
			"humiliation" | "pregnancy" | "dom" | "masochist" | "sadist" |
			"anti-women" | "anti-men"
		>;
		interface SmartPiercingSettingFreeze extends Record<string, SmartPiercingSetting> {
			NONE: "none";
			OFF: "off";
			ALL: "all";
			NODEFAULT: "no default setting";
			RANDOM: "random";
			WOMEN: "women";
			MEN: "men";
			VANILLA: "vanilla";
			ORAL: "oral";
			ANAL: "anal";
			BOOBS: "boobs";
			SUBMISSIVE: "submissive";
			HUMILIATION: "humiliation";
			PREGNANCY: "pregnancy";
			DOM: "dom";
			MASOCHIST: "masochist";
			SADIST: "sadist";
			ANTIWOMEN: "anti-women";
			ANTIMEN: "anti-men";
			BESTIALITY: "bestiality";
		}

		type PersonalAttention =
			"trading" | "warfare" | "slaving" | "engineering" | "medicine" |
			"upkeep" | "hacking" | "HG" | "whoring" | "business" | "smuggling" |
			"defensive survey" | "development project" | "technical accidents" |
			"fighting" | "sex" | "rest and relaxation" | "proclamation" |
			"slave training" | "popularity" | "education" | "degree" |
			"advanced education" | "advanced degree";

		type PersonalAttentionTrainingObjective =
			"health" | "ravish" | "ravished" | "torture" | "build devotion" |
			"spar" | "soften behavioral flaw" | "break will" |
			"soften sexual flaw" | "learn skills" | "combat training" |
			"harshly break will" | "explore sexuality" | "fix behavioral flaw" |
			"fix sexual flaw" | "induce arrogance" | "induce bitchiness" |
			"induce odd behavior" | "induce hatred of men" |
			"induce hatred of women" | "induce gluttony" | "induce anorexia" |
			"induce religious devotion" | "induce liberation" |
			"induce hatred of oral" | "induce hatred of anal" |
			"induce hatred of penetration" | "induce shame" |
			"induce sexual idealism" | "induce sexual repression" |
			"induce sexual apathy" | "induce crudity" | "induce judgement" |
			"induce cum addiction" | "induce anal addiction" |
			"induce attention whoring" | "induce breast growth obsession" |
			"induce abusiveness" | "induce maliciousness" | "induce self hatred" |
			"induce sexual self neglect" | "induce breeding obsession" | "training";

		type TeethType = "normal" | "crooked" | "gapped" | "straightening braces" | "cosmetic braces" | "removable" | "pointy" |
			"fangs" | "fang" | "baby" | "mixed";
		type MinorInjury = Zeroable<"black eye" | "bad bruise" | "split lip" | "sore ass">;

		type RelationShipKind =
			/** married to you */
			-3
			/** emotionally bound to you */
			| -2
			/** emotional slut */
			| -1
			| 0
			/** friends with relationshipTarget */
			| 1
			/** best friends with relationshipTarget */
			| 2
			/** friends with benefits with relationshipTarget */
			| 3
			/** lover with relationshipTarget */
			| 4
			/** relationshipTarget 's slave wife */
			| 5;
		type RivalryType =
			/** None */
			0
			/** dislikes rivalryTarget */
			| 1
			/** rival of rivalryTarget */
			| 2
			/** bitterly hates rivalryTarget */
			| 3;
		type IndentureType =
			/** complete protection */
			2
			/** some protection */
			| 1
			/** no protection */
			| 0;

		type HeightImplant = -1 | 0 | 1;
		type Hearing = -2 | -1 | 0;

		type AnimalType = "human" | "dog" | "pig" | "horse" | "cow";
		type ReproductiveSystem = AnimalType | "sterile";

		type GeneticQuirk = 0 | 1 | 2;

		interface GeneticQuirks {
			/** Oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced. */
			macromastia: GeneticQuirk | 3;
			/** Greatly oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced.
			 *
			 * **macromastia + gigantomastia** - Breasts never stop growing. Increased growth rate, no shrink rate. */
			gigantomastia: GeneticQuirk | 3;
			/** sperm is much more likely to knock someone up */
			potent: GeneticQuirk;
			/** is prone to having twins, shorter pregnancy recovery rate */
			fertility: GeneticQuirk;
			/** is prone to having multiples, even shorter pregnancy recovery rate
			 *
			 * **fertility + hyperFertility** - will have multiples, even shorter pregnancy recovery rate */
			hyperFertility: GeneticQuirk;
			/** pregnancy does not block ovulation, slave can become pregnant even while pregnant */
			superfetation: GeneticQuirk;
			/** Pleasurable pregnancy and orgasmic birth. Wider hips, looser and wetter vagina. High pregadaptation and low birth damage. */
			uterineHypersensitivity: GeneticQuirk;
			/** is abnormally tall. gigantism + dwarfism - is very average*/
			gigantism: GeneticQuirk;
			/** is abnormally short. gigantism + dwarfism - is very average*/
			dwarfism: GeneticQuirk;
			/** has a flawless face. pFace + uFace - Depends on carrier status, may swing between average and above/below depending on it
			 * Any code that sets this to a positive value _must_ also set "face" to 100--this will not occur automatically, except when
			 * positive "pFace" is generated randomly in "generateNewSlave" and "generateGenetics".
			 */
			pFace: GeneticQuirk;
			/** has a hideous face. pFace + uFace - Depends on carrier status, may swing between average and above/below depending on it
			* Any code that sets this to a positive value _must_ also set "face" to -100--this will not occur automatically, except when
			* positive "uFace" is generated randomly in "generateNewSlave" and "generateGenetics".
			*/
		   uFace: GeneticQuirk;
			/** has pale skin, white hair and red eyes */
			albinism: GeneticQuirk;
			/** may have mismatched eyes, the eye color stored here is always the left eye */
			heterochromia: GeneticQuirk | string;
			/** ass never stops growing. Increased growth rate, reduced shrink rate. */
			rearLipedema: GeneticQuirk;
			/** has (or will have) a huge dong */
			wellHung: GeneticQuirk;
			/** constantly gains weight unless dieting, easier to gain weight. wGain + wLoss - weight gain/loss fluctuates randomly */
			wGain: GeneticQuirk;
			/** constantly loses weight unless gaining, easier to lose weight. wGain + wLoss - weight gain/loss fluctuates randomly */
			wLoss: GeneticQuirk;
			/** body attempts to normalize to an androgynous state */
			androgyny: GeneticQuirk;
			/** constantly gains muscle mass, easier to gain muscle. mGain + mLoss - muscle gain/loss amplified, passively lose muscle unless building */
			mGain: GeneticQuirk;
			/** constantly loses muscle mass, easier to gain muscle. mGain + mLoss - muscle gain/loss amplified, passively lose muscle unless building */
			mLoss: GeneticQuirk;
			/** ova will split if room is available
			 *  only affects fetuses */
			twinning: GeneticQuirk;
			/** slave can only ever birth girls */
			girlsOnly: GeneticQuirk;
			/** abnormal production of amniotic fluid
			 * only affects fetuses */
			polyhydramnios: GeneticQuirk;
			/** inappropriate lactation*/
			galactorrhea: GeneticQuirk | 3;
			/** retains childlike characteristics*/
			neoteny: GeneticQuirk | 3;
			/** rapid aging
			 *
			 * **neoteny + progeria** - progeria wins, not that she'll make it to the point that neoteny really kicks in */
			progeria: GeneticQuirk | 3,
		}
		interface FetusGenetics {
			gender: GenderGenes;
			name: string;
			surname: Zeroable<string>;
			mother: number;
			motherName: string;
			father: number;
			fatherName: string;
			nationality: string;
			race: Race;
			intelligence: number;
			face: number;
			faceShape: FaceShape;
			eyeColor: string
			hColor: string;
			skin: string;
			markings: Markings;
			behavioralFlaw: BehavioralFlaw;
			sexualFlaw: SexualFlaw;
			pubicHStyle: string;
			underArmHStyle: string;
			clone: Zeroable<string>;
			cloneID: number;
			geneticQuirks: Partial<GeneticQuirks>;
			fetish: Fetish;
			spermY: number;
			inbreedingCoeff?: number;
			adultHeight: number;
			boobPotential: number;
			artSeed: number;
		}
		//#endregion

		type LimbType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

		type ArmState = InstanceType<typeof App.Entity.ArmState>;
		type LegState = InstanceType<typeof App.Entity.LegState>;

		interface LimbsState {
			arm: {
				left: ArmState;
				right: ArmState;
			};
			leg: {
				left: LegState,
				right: LegState;
			};
			PLimb: 0 | 1 | 2 | 3;
		}

		interface PregnancyData {
			type: string;
			normalOvaMin: number;
			normalOvaMax: number;
			normalBirth: number;
			minLiveBirth: number;
			drugsEffect: number;
			fetusWeek: number[];
			fetusSize: number[];
			fetusRate: number[];
			sizeType: number;
		}

		type ImageFormat = "png"|"jpg"|"gif"|"webp"|"webm"|"mp4";
		export interface CustomImage {
			filename?: string;
			format?: ImageFormat;
		}
	}
}

export {}


code:
declare namespace FC {
	namespace UseSlave {
		interface Option {
			/** The link text. */
			link: string;
			/** The text that appears when the option is selected. */
			desc: string;
			/** The link tooltip. */
			tooltip: string;
			/** Any prerequisites required for the option to appear. */
			prereq: () => boolean;
			/** Any effects the option has. */
			effect: () => void;
			/** The partner's reaction to the action. */
			reaction: string;
		}
	}
}


code:
declare namespace FC {
	type prostheticID = "interfaceP1" | "interfaceP2" | "interfaceP3" | "basicL" | "sexL" | "beautyL" | "combatL" | "felidaeL" | "canidaeL" | "felidaeCL" | "canidaeCL" | "cyberneticL"
		| "ocular" | "cochlear" | "electrolarynx" | "interfaceTail" | "modT" | "sexT" | "combatT" | "combatT2" |/* "erectile" |*/ "interfaceBack" | "modW" | "flightW"
		| "sexA" | "combatW" | "combatA1" | "combatA2";

	type prostheticName = "basic prosthetic interface" | "advanced prosthetic interface" | "quadrupedal prosthetic interface" | "set of basic prosthetic limbs" | "set of advanced sex limbs"
		| "set of advanced beauty limbs" | "set of advanced combat limbs" | "set of quadruped feline limbs" | "set of quadruped canine limbs" | "set of feline combat limbs"
		| "set of canine combat limbs" | "set of cybernetic limbs" | "ocular implant" | "cochlear implant" | "electrolarynx" | "prosthetic tail interface" | "modular tail"
		| "pleasure tail" | "combat tail" | `combat tail, type "Stinger"` | "prosthetic back interface" | "modular pair of wings" | "pair of flight capable wings"
		| "set of pleasure appendages" | `"set of combat appendages, type "Falcon"` | `set of combat appendages, type "Arachnid"` | `set of combat appendages, type "Kraken"`;

	type LimbArgument = "left arm" | "right arm" | "left leg" | "right leg"
	type LimbArgumentAll = "all" | LimbArgument

	type BodySide = "left" | "right"
	type BodySideAll = "both" | BodySide

	interface AdjustProsthetics {
		id: prostheticID;
		workLeft: number;
		slaveID: number;
	}

	type TaskType = "research" | "craft" | "craftFit";

	interface Tasks {
		type: TaskType;
		id: prostheticID;
		workLeft: number;
		craftFit?: number;
	}

	interface ResearchLab {
		level: number;
		aiModule: number;
		tasks: Tasks;
		maxSpace: number;
		hired: number;
		menials: number;
	}

	namespace Data.Medicine.SizingImplants {
		type DynamicName = (volume: number) => string;
		type DynamicCostFactor = (volume: number) => number;

		interface FillDrainData {
			limit: number;
			step: number[];
			healthCost: number;
			materialCostFactor: number;
		}
		interface ImplantType {
			name: string | DynamicName;
			specificMaterialCost: number | DynamicCostFactor;
			workCostFactor: {
				installation: number;
				removal: number;
			}
			healthCostFactor: {
				installation: number;
				removal: number;
			},
			availableSizes: number[] | (() => number[]);
			/** If defined the implant is fillable and can be filled up to the given size */
			fill?: FillDrainData;
			/** If defined the implant is drainable and can be drained down to the given size */
			drain?: FillDrainData;
		}

		type SizingImplantDatabase = {
			[K in SizingImplantTarget]: Record<BodyPartImplantTypeMap[K], FC.Data.Medicine.SizingImplants.ImplantType>;
		}
	}

	namespace Medicine {

		type ProcedureInstance = InstanceType<typeof App.Medicine.Surgery.Procedure>;
		type SizingImplantProcedure = InstanceType<typeof App.Medicine.Surgery.Procedures.SizingImplantProcedure>;

		type SizingImplantProcedureConstructor<T extends SizingImplantProcedure = SizingImplantProcedure> = new (...args: any[]) => T;

		interface ImplantProcedureCreators {
			install: (slave: FC.SlaveState, implantType: SizingImplantType, volume: number, fleshExcess: number) => ProcedureInstance;
			remove: (slave: FC.SlaveState) => ProcedureInstance;
			replace: (slave: FC.SlaveState, implantType: SizingImplantType, volume: number, fleshExcess: number) => ProcedureInstance;

			fill: (slave: FC.SlaveState, amount: number) => ProcedureInstance;
			drain: (slave: FC.SlaveState, amount: number) => ProcedureInstance;
		}

		type ImplantInfo<Target extends SizingImplantTarget> = {
			type: BodyPartInstalledImplantType<Target>;
			volume: number;
		}

		interface AssetSizingProcedureSet extends ImplantProcedureCreators {
			reduce: (slave: SlaveState, name: string, amount: number) => ProcedureInstance;
		}

		namespace Surgery {
			/**
			 * Describes surgical procedure
			 */
			interface Procedure {
				/**
				 * Type code that identifies this kind of procedure.
				 * Currently unused, but planned for future use by RA for prioritizing procedures
				 */
				typeId: string;
				/**
				 * Short label for the procedure. Can be used as a link text.
				 */
				label: string;
				/**
				 * If procedure is targeted at changing object characteristic, this is the net change (signed)
				 */
				targetEffect: number;
				/**
				 * Description of the procedure, more or less detailed
				 */
				description: string;
				/**
				 * Money costs (positive when you pay for it)
				 */
				costs: number;
				/**
				 * Projected health loss (positive when health decreases)
				 */
				healthCosts: number;
				/**
				 * Function to perform the procedure
				 * If action is undefined, the procedure can't be applied (and .description contains the reason)
				 */
				action: slaveOperation;
				/**
				 * surgery type for passages like "Surgery Degradation"
				 */
				surgeryType: string;
			}

			type SizingOptions<Target extends SizingImplantTarget> = {
				targetSize?: NumericRange;
				/**
				 * Allowed procedures for given implant type
				 */
				allowedTypes?: Set<BodyPartInstalledImplantType<Target>>;
				/** include options with implant change */
				replace?: boolean;
			}

			type DefinitiveSizedOptions<Target extends SizingImplantTarget> = Required<SizingOptions<Target>>;

			type Type =
				"skinTone" | "skinMarkings" |
				"restoreFace" | "faceUp" |
				"ageDown" | "ageUp" |
				"bracesOn" | "bracesOff" | "teeth" |
				"earShape" |
				"hornOn" | "hornOff" |
				"restoreVoice" | "voiceFeminine" | "voiceLessGirly" |
				"lipEnlargementImplant" | "lipEnlargement" | "lipReduction" |
				"lipoFull" | "lipoSuck" |
				"shouldersUp" | "shouldersDown" |
				"bellyUp" | "bellyDown" | "bellyDownHuge" |
				"bellyOut" |
				"waistUp" | "waistDown" |
				"hipsUp" | "hipsDown" |
				"fixHeels" |
				"breastReductionImplant" | "breastShrinkage" |
				"breastEnlargementImplant" | "breastEnlargement" |
				"breastImplantSwap" | "breastReconstruction" |
				"nippleReconstruction" | "areolae" | "breastMesh" |
				"flatChest" | "breasts" |
				"buttReductionImplant" | "buttShrinkage" |
				"buttEnlargementImplant" | "buttEnlargement" |
				"buttImplantSwap" |
				"ballEnlargement" | "ballShrinkage" |
				"ballEnlargementHorm" | "ballShrinkageHorm" |
				"ballBigShrinkage" |
				"internalBalls" | "removeBalls" | "replaceBalls" | "newBalls" |
				"scrotum" | "prostate" |
				"foreskinDown" | "circumcision" | "foreskinRestore" |
				"dickGone" | "newDick" |
				"vaginaGone" | "newVagina" |
				"analCleanup" | "rectum" |
				"tightPussy" | "reVirgin" | "replaceOvaries" |
				"clitDown" | "clitHood" |
				"labia" |
				"cervix" |
				"vasectomy" |
				"herm2female" | "herm2male" |
				"herm2truefemale" | "herm2truemale" |
				"male2female" | "male2herm" | "male2truefemale" |
				"male2hermfemale" |
				"female2male" | "female2herm" | "female2truemale" |
				"female2hermmale" |
				"tummyTuck" | "ovulationRestart";
		}
		namespace OrganFarm {
			interface GrowingOrgan {
				type: string;
				weeksToCompletion: number;
				ID: number;
			}
			namespace Organs {
			}
		}
	}
}


code:
declare namespace FC {
	type SlaveSchoolName = "GRI" | "HA" | "NUL" | "SCP" | "TCR" | "TFS" | "TGA" | "TSS" | "LDE" | "TUO";
	type LawlessMarkets = "generic" | "gangs and smugglers" | "heap" | "indentures" | "low tier criminals" | "military prison" | "juvenile detention" |
		"neighbor" | "wetware" | "white collar" | SlaveSchoolName;
	type OrdinaryMarkets = "kidnappers" | "trainers" | "hunters" | "raiders" | "underage raiders" | "corporate";
	type SlaveMarketName = LawlessMarkets | OrdinaryMarkets;
	type SpecialMarketName = "Elite Slave" | "Household Liquidator" | "Custom Slave" | "Husk Slave" | "Slave Shelter" | "JobFulfillmentCenterOrder" | "Prestigious Slave" | "Special Slave";
	type Gingering = Zeroable<"antidepressant" | "depressant" | "stimulant" | "vasoconstrictor" | "vasodilator" | "aphrodisiac" | "ginger">;
	type GingeringDetection = Zeroable<"slaver" | "mercenary" | "force">;
	type SlaveActs = "PCChildrenFathered" | "PCKnockedUp" | "anal" | "births" | "birthsTotal" | "cum" | "laborCount" | "mammary" | "milk" | "oral" | "penetrative" | "pitKills" | "miscarriages" | "publicUse" | "slavesFathered" | "slavesKnockedUp" | "vaginal" | "abortions" | "birth" | "bestiality";

	interface SlaveSchool {
		title: string,
		nickname: string,
		branchName: string,
		slaveNoun: string,
		readonly requirements: boolean,
	}

	namespace SlaveSummary {
		interface SmartPiercing {
			setting: {
				off: string,
				submissive: string,
				lesbian: string,
				oral: string,
				humiliation: string,
				anal: string,
				boobs: string,
				sadist: string,
				masochist: string,
				dom: string,
				pregnancy: string,
				vanilla: string,
				all: string,
				none: string,
				monitoring: string,
				men: string,
				women: string,
				"anti-men": string,
				"anti-women": string,
			};
		}
	}
}


code:
declare namespace FC {
	namespace Mods {
		/** The base mod interface, from which all mod interfaces inherit. */
		interface Base {
			/** Whether the mod is enabled. */
			enabled: boolean;
		}

		/** Properties relating to the food system mod. */
		interface Food extends Base {
			/** How much food the arcology has, in kg. */
			amount: number;
			/** The base price of 1kg of food. */
			cost: number;
			/** How much food the arcology had at the end of last week, in kg. */
			lastWeek: number;
			/** Whether the food market has been established. */
			market: boolean;
			/** The amount of food that needed to be bought this week to to stop people from starving */
			deficit: number,
			/** The amount of food that had to be sold this week because there was not enough storage space */
			overstocked: number,
			/** The amount of food each class consumes in a week. */
			rate: {
				/** The amount of food a slave consumes in a week, in kg. */
				slave: 8,
				/** The amount of food the lower class consumes in a week, in kg. */
				lower: 14.5,
				/** The amount of food the middle class consumes in a week, in kg. */
				middle: 16,
				/** The amount of food the upper class consumes in a week, in kg. */
				upper: 17.5,
				/** The amount of food the elite class consumes in a week, in kg. */
				top: 19,
			},
			/**
			 * How much food you are providing your citizens weekly.
			 *
			 * Not in kg.
			 */
			rations: 0 | 1 | 2 | 3 | 4 | 5;
			/** How much food the arcology has produced in total, in kg. */
			total: number;
			/** Whether the player has received a warning about a lack of food. */
			warned: boolean;
		}
	}
}


code:
declare namespace FC {
  namespace SlaveBot {
    // Spec from https://github.com/malfoyslastname/character-card-spec-v2/blob/main/spec_v2.md
    type TavernCardV2 = {
      spec: "chara_card_v2";
      spec_version: "2.0"; // May 8th addition
      data: {
        name: string;
        description: string;
        personality: string;
        scenario: string;
        first_mes: string;
        mes_example: string;

        // New fields start here
        creator_notes: string;
        system_prompt: string;
        post_history_instructions: string;
        alternate_greetings: Array<string>;
        character_book?: CharacterBook;

        // May 8th additions
        tags: Array<string>;
        creator: string;
        character_version: string;
        extensions: Record<string, any>;
      };
    };

    /**
     * For FC, we will choose to support SillyTavern for compatibility. All other frontends will be best effort.
     *
     * ? as in `name?: string` means the `name` property may be absent from the JSON
     * (aka this property is optional)
     * OPTIONAL PROPERTIES ARE ALLOWED TO BE UNSUPPORTED BY EDITORS AND DISREGARDED BY
     * FRONTENDS, however they must never be destroyed if already in the data.
     *
     * the `extensions` properties may contain arbitrary key-value pairs, but you are encouraged
     * to namespace the keys to prevent conflicts, and you must never destroy
     * unknown key-value pairs from the data. `extensions` is mandatory and must
     * default to `{}`. `extensions` exists for the character book itself, and for
     * each entry.
     **/
    type CharacterBook = {
      name?: string;
      description?: string;
      scan_depth?: number; // agnai: "Memory: Chat History Depth"
      token_budget?: number; // agnai: "Memory: Context Limit"
      recursive_scanning?: boolean; // no agnai equivalent. whether entry content can trigger other entries
      extensions: Record<string, any>;
      entries: Array<CharacterBookEntry>;
    };

    type CharacterBookEntry = {
      keys: Array<string>;
      content: string;
      extensions: Record<string, any>;
      enabled: boolean;
      insertion_order: number; // if two entries inserted, lower "insertion order" = inserted higher
      case_sensitive?: boolean;

      // FIELDS WITH NO CURRENT EQUIVALENT IN SILLY
      name?: string; // not used in prompt engineering
      priority?: number; // if token budget reached, lower priority value = discarded first

      // FIELDS WITH NO CURRENT EQUIVALENT IN AGNAI
      id?: number; // not used in prompt engineering
      comment?: string; // not used in prompt engineering
      selective?: boolean; // if `true`, require a key from both `keys` and `secondary_keys` to trigger the entry
      secondary_keys?: Array<string>; // see field `selective`. ignored if selective == false
      constant?: boolean; // if true, always inserted in the prompt (within budget limit)
      position?: "before_char" | "after_char"; // whether the entry is placed before or after the character defs
    };
  }
}


code:
declare namespace FC {
    namespace Util {
        interface DiffBase<T> {
            /**
             * The original object
             */
            diffOriginal: T
            /**
             * The changes applied to the object
             */
            diffChange: Partial<T>
        }

        type DiffRecorder<T> = T & DiffBase<T>
	}

	interface NumericRange {
		min: number;
		max: number;
	}

	type PromiseWithProgress<T> = Promise<T> & {
		onProgress: (fn: (progress: number) => void) => PromiseWithProgress<T>
	}
}


code:
declare namespace App.UI.DOM {
	function makeElementTS<K extends keyof HTMLElementTagNameMap>(
		tag: K, content?: string | Node, classNames?: string[]): HTMLElementTagNameMap[K];
	/** @deprecated */
	function makeElementTS<K extends keyof HTMLElementTagNameMap>(
		tag: K, content?: string | Node, classNames?: string): HTMLElementTagNameMap[K];

	function appendNewElementTS<K extends keyof HTMLElementTagNameMap>(
		tag: K, parent: ParentNode, content?: string | Node, classNames?: string[]): HTMLElementTagNameMap[K];
	/** @deprecated */
	function appendNewElementTS<K extends keyof HTMLElementTagNameMap>(
		tag: K, parent: ParentNode, content?: string | Node, className?: string): HTMLElementTagNameMap[K];
}


code:
import {StoryMoment, Passage} from "twine-sugarcube";

declare module "twine-sugarcube" {
	interface SugarCubeStoryVariables extends FC.GameVariables {
	}

	interface SugarCubeSetupObject {
		// Any usages of the global setup object should be replaced by App.Data.misc
	}

	// These are SugarCube private APIs used in the project
	interface StateAPI {
		expired: StoryMoment[];
		clearTemporary(): void;
		/**
		 * Restores the game state to the last state it was in.
		 * Usually the state that it was in when the latest passage was loaded
		 */
		restore(): void;
	}

	interface UIBarAPI {
		update(): void;
	}

	interface SerialAPI {
		/**
		 * Converts a JavaScript Object Notation (JSON) string with custom revival methods into an object.
		 * @param text A valid JSON string created using Serial.stringify().
		 * @param reviver A function that transforms the results. This function is called for each member of the object.
		 * If a member contains nested objects, the nested objects are transformed before the parent object is.
		 */
		parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
		/**
		 * Converts a JavaScript value to a JavaScript Object Notation (JSON) string with custom revival methods.
		 * @param value A JavaScript value, usually an object or array, to be converted.
		 * @param replacer A function that transforms the results.
		 * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
		 */
		stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
	}
}

export {};


code:
type assistantAppearance = "normal" | "monstergirl" | "shemale" | "amazon" | "businesswoman" | "goddess" | "hypergoddess" | "schoolgirl" | "loli" | "preggololi" | "fairy" | "pregnant fairy" | "slimegirl" | "cowgirl"| "harpygirl" | "kitsunegirl" | "lamiagirl" | "spidergirl" | "angel" | "cherub" | "imp" | "witch" | "ERROR_1606_APPEARANCE_FILE_CORRUPT" | "incubus" | "succubus";

type fsAssistantAppearance = "default" | "paternalist" | "degradationist" | "supremacist" | "subjugationist" | "roman revivalist" | "aztec revivalist" | "egyptian revivalist" | "edo revivalist" | "arabian revivalist" | "chinese revivalist" | "chattel religionist" | "repopulation focus" | "eugenics" | "physical idealist" | "hedonistic decadence" | "gender radicalist" | "gender fundamentalist" | "asset expansionist" | "transformation fetishist" | "pastoralist" | "maturity preferentialist" | "youth preferentialist" | "slimness enthusiast" | "body purist" | "intellectual dependency" | "slave professionalism" | "petite admiration" | "statuesque glorification" | "neoimperialist" | "antebellum revivalist";
interface assistant {
	appearance: assistantAppearance;
	fsAppearance: fsAssistantAppearance
	personality: -1 | 0 | 1;
	name: string;
	power: number;
	fsOptions: FC.Bool;
	options: FC.Bool;
	market: {
		relationship: "nonconsensual" | "incestuous" | "cute" | "romantic";
		limit: number;
		aggressiveness: number;
	};
	main: number;
	Extra1: FC.Bool;
	Extra2: FC.Bool;
	announcedName: FC.Bool;
	customImage: FC.CustomImage;
}

type appearance = Record<assistantAppearance, fsAppearance>;

type fsAppearance = Record<fsAssistantAppearance, string>;


code:
export {};

declare global {
  const CRC32: any;
}