:: index[noSave noVersionUpdate]
<!--
	This is the first passage that's presented to the player.
	Note that it is include in the passage Start when the player opens it for the first time.
-->
<<debug>>
	<h2>Important: Debug-Mode</h2>
	<p>
		You are viewing this game in debug-mode.
		As the name implies, it is meant for developers and displays additional game data.
	</p>
	<p>
		In case you are not a developer, there are the following reasons why you might not want the debug-mode to be enabled:
		<ol>
			<li>The information might include major spoilers.</li>
			<li>The information will clog up your console. You will notice this by the game slowing down.</li>
			<li>You will be presented with otherwise hidden options that lead to broken and/or incomplete storylines.</li>
		</ol>
	</p>
	<<actCLA 'Click here to deactivate Debug-Mode' 1>>
		<<set $DEBUGGING to false>>
		<<gt 'index'>>
	<</actCLA>>
<</debug>>

<<set $version = Config.saves.version>>
<center>Version <b><<version>></b></center>
<<image "misc/index/#.webp" 1 1>>
<center>
	<p>
	<font color="red">
		<b>Children under 18 years are strictly forbidden to play</b>
	</font>
	</p>
	<p>
		<<checkbox "$DEBUGGING" false true autocheck>> Enable Debugging
	</p>

	<<act '<b>Start</b>'>>
		<<include 'init_pre_intro'>>
		<<gt 'content_warning'>>
	<</act>>

	<<act 'Image Settings'>>
		<<gt 'ImageSetting'>>
	<</act>>

	<<act 'Mod Manager'>>
		<<gt 'ModManager'>>
	<</act>>

</center>
<!-- ! WD: Set variable to store Image needed HTML code-->
<<set $ImageNeededPlacholder = '<center>IMAGE MISSING</center>'>>

:: ImageSetting[noSave]
<<done>>
<<replace "#imageTestArea">>
	<<include 'ImageTestImage'>>
<</replace>>
<</done>>
<<act "Confirm">>
	<<run memorize('media_path', $media_path)>>
	<<goto "index">>
<</act>>
<h2>Image Settings</h2>
<p>You need an official image-pack to see any images and videos.</p>
<p>Download and unzip it to any place on any of your drives. Then enter the relative path from the html-file to the image-folder inside the image-pack below.</p>
<p>Image path: <<textbox "$media_path" $media_path>></p>
<p>
	<<button "Test">>
		<<replace "#imageTestArea">>
			<<include 'ImageTestImage'>>
		<</replace>>
	<</button>>
</p>
<div id="imageTestArea">
</div>

:: ImageTestImage[noSave]
<p><b style="color:red;">If you see an image below your settings are correct.</b></p>
<<image "misc/index/#.webp" 1 1>>

:: ModManager[menu]
	<<set _modPaths = JSON.parse(localStorage.getItem('modPaths') || '[]')>>
	<<set _modPathsDisplay = _modPaths.join('\n')>>

	<<textarea "_modPathsDisplay" _modPathsDisplay>>

	<<button 'Apply'>>
		<<set _modPaths = _modPathsDisplay.split(/\r?\n|\r|\n/g)>>
		<<set _modPaths = _modPaths.map((raw)=>raw.trim()).filter((path)=>path!='')>>
		<<if _modPaths.length>>
			<<run localStorage.setItem('modPaths',JSON.stringify(_modPaths))>>
		<<else>>
			<<run localStorage.setItem('modPaths',"[]")>>
		<</if>>
		<<run location.reload()>>
	<</button>>

	<<link "Back">><<goto "index">><</link>>