code:
# Guide: Media Passages {#guide-media-passages}

Media passages are simply a way to embed media into your project—specially tagged passages that contain the [data URI](https://en.wikipedia.org/wiki/Data_URI_scheme) of a Base64-encoded media source.  Audio, image, video, and VTT passages are supported.

For example, the following is the data URI of a Base64-encoded PNG image of a red dot ():

```
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHE
lEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
```

#### History:

* `v2.0.0`: Image passages.
* `v2.24.0`: Added audio, video, and VTT passages.

## Creation {#guide-media-passages-creation}

Generally, it's expected that you will use a compiler that supports the automatic creation of media passages, however, they may be created manually.

### Automatically

Compilers supporting automatic creation of media passages:

* [Tweego](http://www.motoslave.net/tweego/) supports all media passages.
* [Twine 1](http://www.twinery.org/) supports image passages.

### Manually

Warning (Twine 2):
Due to various limitations in its design, if you're using Twine 2 as your IDE/compiler, then it is strongly recommended that you do not create more than a few media passages and definitely do not use large sources.

To manually create a media passage:

1. Create a new passage, which will only be used as a media passage—one per media source.
2. Tag it with the appropriate media passage special tag, and only that tag—see below.
3. Paste in the Base64-encoded media source as the passage's content.

See the MDN article [Media formats for HTML audio and video](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats) for more information on formats commonly supported in browsers—pay special attention to the [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility) section.

#### Media passage special tags

Note:
As with all special tags, media passage tags are case sensitive, so their spelling and capitalization must be exactly as shown.

		Passage type
		Tag

		Audio passage
		Twine.audio

		Image passage
		Twine.image

		Video passage
		Twine.video

		VTT passage
		Twine.vtt


code:
# Guide: State, Sessions, and Saving {#guide-state-sessions-and-saving}

SugarCube preserves the state of the story as it's being played in a number of ways to both prevent the loss of progress and allow players to save stories.  This guide will detail how these features work.

## Story History {#guide-state-sessions-and-saving-story-history}

The story history is a collection of **moments**.  A new moment is created whenever passage navigation occurs, and **only when passage navigation occurs**.  Each moment contains data regarding the active passage and the state of all [story variables](#twinescript-variables)—that is, the ones you use the `$` sigil to interact with—as they exist when the moment is created.  The history allows players to navigate through these moments.

The number of moments contained within the story history is, generally, limited, via the [`Config.history.maxStates` setting](#config-api-property-history-maxstates).  As new moments are added, older moments that exceed the maximum number are expired in order of age, oldest first.  Expired moments are recorded in a separate expired collection and can no longer be navigated to.  If you limit the moments within the history to `1`, via setting `Config.history.maxStates` to `1`, then there will only ever be one moment in the history, but passage navigation is still required for new moments to be created.

Note:
All user functions and macros that check for the existence of moments within the history check both the story history and expired moments, so will work as expected even if the history is limited to a single moment as described above.

Saving the story records the story's state up until the last moment that was created.  This is not necessarily the same as the current state of the story: because moment creation is tied to passage navigation, changes that occur *between* one passage navigation and the next are *not* part of the current moment and will not be preserved by a moment until the *next* navigation, when the next moment is created.

Consider the following:

```
:: one passage
<<set $var to 1>>

[[another passage]]

:: another passage
<<link "Click me!">>
	<<set $var to 2>>
<</link>>
```

In the above example, if you save the story after reaching the passage called *`another passage`*, the `$var` variable will be saved in the state as `1`, as you would expect.  If you click the link that sets the variable to `2`, and then save the story, the `$var` variable will *still* be saved as `1`, because a new moment has not yet been created.

## Playthrough Session {#guide-state-sessions-and-saving-playthrough-session}

Note:
The autosave feature is occasionally confused with the playthrough session feature, but they are in fact distinct systems.

SugarCube automatically stores the current playthrough state to the [browser's session storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage) whenever a new moment is created.  This can be thought of as a special, temporary saved story, which is automatically deleted after the player's current browsing session ends.  This temporary playthrough session is intended to prevent players from losing data.  Some browsers, particularly mobile ones, will free up memory by unloading web pages that are running in the background.  This functionally refreshes the webpage, and can cause users to lose their progress.  When SugarCube is reloaded by the browser, it checks if a playthrough session exists and loads it to prevent any inadvertent loss of progress.

This feature also prevents players from losing progress if they try to use the browser back and forward buttons to navigate, or if they refresh their browser for any reason.  The built-in *`Restart`* button, along with the methods [`UI.restart()`](#ui-api-method-restart) and [`Engine.restart()`](#engine-api-method-restart) are provided so that the story can be restarted without restoring a session.

To recap:

* When a new moment is created, SugarCube stores the playthrough state to session storage.
* If SugarCube is reloaded by the browser for whatever reason—e.g., due to a refresh, back/forward navigation, being unloaded in the background, etc.—then the session is restored.
* If SugarCube is reloaded by one of its own built-in restart methods, then the session is *not* restored.

## Autosave {#guide-state-sessions-and-saving-autosave}

Note:
The playthrough session feature is occasionally confused with the autosave feature, but they are in fact distinct systems.

SugarCube features a configurable autosave system.  The autosave is, for the most part, a normal save slot, but with a few special features built in.  You can set the autosave to save either on every passage or only on certain passages.  It can be loaded manually by the player or automatically by the autoload feature, which can be configured to, upon start up, either load the autosave automatically or prompt the player about loading it.

See:
Config.saves.autosave setting, Config.saves.autoload setting, and Save API: Autosave.

## What Happens When a Save is Loaded? {#guide-state-sessions-and-saving-what-happens-when-a-save-is-loaded}

When a saved story is loaded, the state loaded from the save *replaces* the current state.  This process is the same regardless of where the loaded state is coming from: it could be a normal save, the autosave, or the playthrough session.  The previous state is completely lost—the new state is not added to or combined with the current state, instead it **replaces it in its entirety**.  The easiest way to understand this is to look at what happens when you make some changes to [`StoryInit`](#special-passage-storyinit) and then load a saved story from before those changes were made.  For example:

```
:: StoryInit
<<set $x to 0>>

:: Start
$$x is <<if def $x>> $x <<else>> undefined <</if>>
```

If you run the above, you'll see `$x is 0`.  Create a save, then edit the code as follows:

```
:: StoryInit
<<set $x to 0>>
<<set $y to 1>>

:: Start
$$x is <<if def $x>> $x <<else>> undefined <</if>>
$$y is <<if def $y>> $y <<else>> undefined <</if>>
```

Running that, you'll see `$x is 0` and `$y is 1`.  Now, load the saved story from before the changes were made, and you'll see `$y is undefined`, since it doesn't exist at all in the loaded state.

## Refreshing and Restarting {#guide-state-sessions-and-saving-refreshing-and-restarting}

Whenever your story is first started or, *for any reason*, restarted—e.g., the browser window/tab was refreshed/reloaded—it undergoes its startup sequence.  Several things occur **each and every time startup happens**, regardless of whether or not a playthrough session will be restored, an autosave loaded, or the starting passage run.  First, the CSS, JavaScript, and Widget sections are processed.  Next, the `StoryInit` special passage is processed.  Finally, one of three things happen (in order): the existing playthrough session is restored, if it exists, else the autosave is loaded, if it exists and is configured to do so, else the starting passage is run.

Some users have the false impression that `StoryInit` is not run when the story is restarted when the playthrough session is restored or autosave is loaded.  Code like `<<set $y to 1>>` *seems* to have no effect because the startup state is replaced by the of the incoming state, **but they are still executed by the engine**.  You can see this effect by changing data *outside* the state.  For example, let's return to the example above and change it again:

```
:: StoryInit
<<set $x to 0>>
<<set setup.y to 1>>

:: Start
$$x is <<if def $x>> $x <<else>> undefined <</if>>
setup.y is <<if def setup.y>> <<= setup.y>> <<else>> undefined <</if>>
```

You'll see that `setup.y` is being set to `1` and displayed properly regardless of whether you load a saved story or not, because it is not part of the state.

When the story is restarted by SugarCube rather than refreshed via the browser, the playthrough session, if any, is not loaded.  `StoryInit` is run, as always.  If the autosave exists and the story is [configured to automatically load it](#config-api-property-saves-autoload), then the autosave is loaded and the state is replaced by the autosave's state and the active passage is rendered, just as if the user had loaded any other save.  If no autosave exists, then the starting passage is rendered.


code:
# Guide: Test Mode {#guide-test-mode}

#### History:

* `v2.2.0`: Introduced.

## Introduction {#guide-test-mode-introduction}

In test mode, SugarCube will wrap all macros, and some non-macro markup—e.g., link & image markup—within additional HTML elements, called "debug views" ("views" for short).  Views make their associated code visible, thus providing onscreen feedback—they may also be hovered over which, generally, exposes additional information about the underlying code.

Warning:
Because of the additional HTML elements added by the debug views, some nested markup and selectors may be broken.  This only affects test mode.

Tip:
In versions of SugarCube ≥v2.23.0, the debugging interface offers additional tools, namely variable watches and arbitrary history navigation.

## Enabling Test Mode {#guide-test-mode-enabling}

### Automatically

#### In Tweego

To enable test mode, use the test option (`-t`, `--test`).

#### In Twine 2 (≥v2.2)

To enable test mode from the *Stories* screen, click on the story's gear menu and select the *Test Story* menu item.

To enable test mode from the story editor/map screen, click on the *Test* menu item (right side of the bottom bar).

To enable test mode from the story editor/map screen while starting at a specific passage, hover over a passage and select the ** menu item.

#### In Twine 2 (<v2.2)

To enable test mode from the *Stories* screen, click on the story's gear menu and select the *Test Play* menu item.

To enable test mode from the story editor/map screen, click on the *Test* menu item (right side of the bottom bar).

To enable test mode from the story editor/map screen while starting at a specific passage, hover over a passage and select the ** menu item.

#### In Twine 1

To enable test mode while starting at a specific passage, right-click on a passage and select the *Test Play From Here* context menu item.

Note:
Unfortunately, due to limitations in the current release of Twine 1, the Build menu's Test Play menu item is not able to trigger test mode.  You may, however, simply use the Test Play From Here context menu item on the Start passage to achieve the same result.

### Manually

You may forcibly enable test mode manually by setting the `Config` object's `debug` property to `true`.  For example:

```
Config.debug = true; // forcibly enable test mode
```

See:
The Config.debug setting for more information.

## Debug Bar (≥v2.23.0) {#guide-test-mode-debug-bar}

The debug bar (bottom right corner of the page) allows you to: watch the values of story and temporary variables, toggle the debug views, and jump to any moment/turn within the history.

The variable watch panel may be toggled via the *Watch * button.  To add a watch for a variable, type its name into the *Add* field and then either press enter/return or click the ** button—n.b. depending on the age of your browser, you may also see a list of all current variables when interacting with the *Add* field.  To delete a watch, click the ** button next to its name in the watch panel.  To add watches for all current variables, click the ** button.  To delete all current watches, click the ** button.

The debug views may be toggled via the *Views * button.

To jump to any moment/turn within the available history, select the moment/turn from the *Turn* select field.

## Debug Views (≤v2.22.0) {#guide-test-mode-debug-views}

The debug views themselves may be toggled on and off (default: on) via the *Debug View* button (top of the UI bar).

If you've removed/hidden the UI bar, a construct like the following will allow you to toggle the views on and off:

```
<<button "Toggle Debug Views">><<script>>DebugView.toggle()<</script>><</button>>
```

Note:
That will only toggles the views, test mode must still be enabled first.


code:
# Guide: Tips {#guide-tips}

This is a collection of tips, from how-tos to best practices.

Suggestions for new entries may be submitted by [creating a new issue](https://github.com/tmedwards/sugarcube-2/issues) at SugarCube's [source code repository](https://github.com/tmedwards/sugarcube-2).

### Arbitrarily long return {#guide-tips-arbitrarily-long-return}

Warning:
Navigating back to a previous passage, for whatever reason, can be problematic.  There's no way for the system to know ahead of time whether it's safe to re-execute a passage's contents.  Even if it did know that, there's no way for it to know which operations may or may not have side-effects—e.g., changing variables.  Thus, if you allow players to return to passages, then you should either: ensure the passages contain no code that has side-effects or wrap that code in something to prevent re-execution—e.g., <<if visited() is 1>>side-effects<</if>>.

Note:
An alternative to navigating to passages to create menus, inventories, and the like would be to use the Dialog API.

When you have a situation where you're using a set of passages as some kind of menu/inventory/etc and it's possible for the player to interact with several of those passages, or even simply the same one multiple times, then returning them to the passage they were at before entering the menu can be problematic as they're possibly several passages removed from that originating passage—thus, the `<<return>>` macro and link constructs like `[[Return|previous()]]` will not work.

The most common way to resolve this arbitrarily long return issue is to use a bit of JavaScript to record the last non-menu passage the player visited into a story variable and then to create a link with that.

For example, you may use the following JavaScript code to record the last non-menu passage into the `$return` story variable: (Twine 2: the Story JavaScript, Twine 1/Twee: a `script`-tagged passage)

```
$(document).on(':passagestart', function (ev) {
	if (!ev.passage.tags.includes('noreturn')) {
		State.variables.return = ev.passage.title;
	}
});
```

You'll need to tag each and every one of your menu passages with `noreturn`—you may use any tag you wish (e.g., `menu`, `inventory`), just ensure you change the name in the code if you decide upon another.  If necessary, you may also use multiple tags by switching from [`<Array>.includes()`](#methods-array-prototype-method-includes) to [`<Array>.includesAny()`](#methods-array-prototype-method-includesany) in the above example.

In your menu passages, your long return links will simply reference the `$return` story variable, like so:

```
→ Using link markup
[[Return|$return]]

→ Using <<link>> macro (separate argument form)
<<link "Return" $return>><</link>>
```

Warning (Twine 2):
Due to how the Twine 2 automatic passage creation feature currently works, using the link markup form will cause a passage named $return to be created that will need to be deleted.  To avoid this problem, it's suggested that you use the separate argument form of the <<link>> macro in Twine 2—as shown above.

### Non-generic object types (a.k.a. classes) {#guide-tips-non-generic-object-types}

As a basic working definition, non-generic object types—a.k.a. classes—are instantiable objects whose own prototype is not `Object`—e.g., `Array` is a native non-generic object type.

Many of the commonly used native non-generic object types are already fully compatible with and supported for use within story variables—e.g., `Array`, `Date`, `Map`, and `Set`.  All other non-generic object types, on the other hand, must be made compatible to be successfully stored within story variables.

Making custom non-generic object types fully compatible requires that two methods be added to their prototype, `.clone()` and `.toJSON()`, to support cloning—i.e., deep copying—instances of the type.

* The `.clone()` method needs to return a clone of the instance.
* The `.toJSON()` method needs to return a code string that when evaluated will return a clone of the instance.

In both cases, since the end goal is roughly the same, this means creating a new instance of the base object type and populating it with clones of the original instance's data.  There is no one size fits all example for either of these methods because an instance's properties, and the data contained therein, are what determine what you need to do.

See Also:
The JSON.reviveWrapper() method for additional information on implementing the .toJSON() method.

#### Examples: *(not an exhaustive list)*

##### Config/option object parameter constructor (automatic copying of own data)

Here's a simple example whose constructor takes a single config/option object parameter:

```
window.ContactInfo = function (config) {
	// Set up our own data properties with some defaults.
	this.name    = '';
	this.address = '';
	this.phone   = '';
	this.email   = '';

	// Clone the given config object's own properties into our own properties.
	//
	// NOTE: We use the SugarCube built-in `clone()` function to make deep
	// copies of each of the properties' values.
	Object.keys(config).forEach(function (pn) {
		this[pn] = clone(config[pn]);
	}, this);
};

ContactInfo.prototype.clone = function () {
	// Return a new instance containing our own data.
	return new ContactInfo(this);
};

ContactInfo.prototype.toJSON = function () {
	// Return a code string that will create a new instance containing our
	// own data.
	//
	// NOTE: Supplying `this` directly as the `reviveData` parameter to the
	// `JSON.reviveWrapper()` call will trigger out of control recursion in
	// the serializer, so we must pass it a clone of our own data instead.
	var ownData = {};
	Object.keys(this).forEach(function (pn) {
		ownData[pn] = clone(this[pn]);
	}, this);
	return JSON.reviveWrapper('new ContactInfo($ReviveData$)', ownData);
};
```

Creating a new instance of this `ContactInfo` example would be something like:

```
<<set $Joe to new ContactInfo({
	name  : 'Joe Blow',
	phone : '1 555 555 1212',
	email : 'joe@blow.com'
})>>
```

##### Discrete parameters constructor (manual copying of own data)

Here's a simple example whose constructor takes multiple discrete parameters:

```
window.ContactInfo = function (name, addr, phone, email) {
	// Set up our own data properties with the given values or defaults.
	this.name    = name || '';
	this.address = addr || '';
	this.phone   = phone || '';
	this.email   = email || '';
};

ContactInfo.prototype.clone = function () {
	// Return a new instance containing our own data.
	return new ContactInfo(
		this.name,
		this.address,
		this.phone,
		this.email
	);
};

ContactInfo.prototype.toJSON = function () {
	// Return a code string that will create a new instance containing our
	// own data.
	return JSON.reviveWrapper(String.format(
		'new ContactInfo({0},{1},{2},{3})',
		JSON.stringify(this.name),
		JSON.stringify(this.address),
		JSON.stringify(this.phone),
		JSON.stringify(this.email)
	));
};
```

Creating a new instance of this `ContactInfo` example would be something like:

```
<<set $Joe to new ContactInfo(
	'Joe Blow',
	'',
	'1 555 555 1212',
	'joe@blow.com'
)>>
```

##### Discrete parameters constructor (automatic copying of own data)

Here's a simple example whose constructor takes multiple discrete parameters, but also includes an `._init()` helper method to allow the `.clone()` and `.toJSON()` methods to require less manual tinkering than the previous discrete parameters example by automatically copying an instance's own data:

```
window.ContactInfo = function (name, addr, phone, email) {
	// Set up our own data properties with the given values or defaults.
	this.name    = name || '';
	this.address = addr || '';
	this.phone   = phone || '';
	this.email   = email || '';
};

ContactInfo.prototype._init = function (obj) {
	// Clone the given object's own properties into our own properties.
	Object.keys(obj).forEach(function (pn) {
		this[pn] = clone(obj[pn]);
	}, this);

	// Return `this` to make usage easier.
	return this;
};

ContactInfo.prototype.clone = function () {
	// Return a new instance containing our own data.
	return (new ContactInfo())._init(this);
};

ContactInfo.prototype.toJSON = function () {
	// Return a code string that will create a new instance containing our
	// own data.
	//
	// NOTE: Supplying `this` directly as the `reviveData` parameter to the
	// `JSON.reviveWrapper()` call will trigger out of control recursion in
	// the serializer, so we must pass it a clone of our own data instead.
	var ownData = {};
	Object.keys(this).forEach(function (pn) {
		ownData[pn] = clone(this[pn]);
	}, this);
	return JSON.reviveWrapper('(new ContactInfo())._init($ReviveData$)', ownData);
};
```

Creating a new instance of this `ContactInfo` example would be something like:

```
<<set $Joe to new ContactInfo(
	'Joe Blow',
	'',
	'1 555 555 1212',
	'joe@blow.com'
)>>
```


code:
<!-- ***********************************************************************************************
	Guide: TypeScript
************************************************************************************************ -->
# Guide: TypeScript {#guide-typescript}

TypeScript bindings for SugarCube APIs can found as the [Definitely Typed](https://definitelytyped.org/) package: `@types/twine-sugarcube`.

To install the package via NPM, use the following command:

```
npm install --save-dev @types/twine-sugarcube
```


code:
# Introduction {#introduction}

This documentation is a reference for [SugarCube](http://www.motoslave.net/sugarcube/), a free (gratis and libre) story format for [Twine/Twee](http://twinery.org/).

Tip:
This document is a single page, so you may use your browser's find-in-page functionality—CTRL+F or F3—to search for specific terms.

Note:
If you believe that you've found a bug in SugarCube, or simply wish to make a suggestion, you may do so by creating a new issue at its source code repository.

----

Contributions to this documentation have been graciously made by:

* **Chapel** ([TwineLab](https://twinelab.net/), [GitHub](https://github.com/ChapelR/))


code:
SugarCube v2 Documentation

<tt>{{.VERSION}}</tt> (<time datetime="{{.ISO_DATE}}">{{.DATE}}</time>)

Find in page: CTRL+F or F3

## [Introduction](#introduction)

## [Markup](#markup)

* [Naked Variable](#markup-naked-variable)
* [Link](#markup-link)
* [Image](#markup-image)
* [HTML Attribute](#markup-html-attribute)
* [Line Continuation](#markup-line-continuation)
* [Heading](#markup-heading)
* [Style](#markup-style)
* [List](#markup-list)
* [Blockquote](#markup-blockquote)
* [Code](#markup-code)
* [Horizontal Rule](#markup-horizontal-rule)
* [Verbatim Text](#markup-verbatim-text)
* [Verbatim HTML](#markup-verbatim-html)
* [Custom Style](#markup-custom-style)
* [Template](#markup-template)
* [Comment](#markup-comment)

## [TwineScript](#twinescript)

* [Variables](#twinescript-variables)
* [Supported Types](#twinescript-supported-types)
* [Expressions](#twinescript-expressions)

## [Macros](#macros)

* [Macro Arguments](#macros-arguments)
* [Variables Macros](#macros-variables)
	* [`<<capture>>`](#macros-macro-capture)
	* [`<<set>>`](#macros-macro-set)
	* [`<<unset>>`](#macros-macro-unset)
* [Scripting Macros](#macros-scripting)
	* [`<<run>>`](#macros-macro-run)
	* [`<<script>>`](#macros-macro-script)
* [Display Macros](#macros-display)
	* [`<<=>>`](#macros-macro-equal)
	* [`<<->>`](#macros-macro-hyphen)
	* [`<<include>>`](#macros-macro-include)
	* [`<<nobr>>`](#macros-macro-nobr)
	* [`<<print>>`](#macros-macro-print)
	* [`<<silently>>`](#macros-macro-silently)
	* [`<<type>>`](#macros-macro-type)
* [Control Macros](#macros-control)
	* [`<<if>>`](#macros-macro-if)
	* [`<<for>>`](#macros-macro-for)
		* [`<<break>>`](#macros-macro-break)
		* [`<<continue>>`](#macros-macro-continue)
	* [`<<switch>>`](#macros-macro-switch)
* [Interactive Macros](#macros-interactive)
	* [`<<button>>`](#macros-macro-button)
	* [`<<checkbox>>`](#macros-macro-checkbox)
	* [`<<cycle>>`](#macros-macro-cycle)
	* [`<<link>>`](#macros-macro-link)
	* [`<<linkappend>>`](#macros-macro-linkappend)
	* [`<<linkprepend>>`](#macros-macro-linkprepend)
	* [`<<linkreplace>>`](#macros-macro-linkreplace)
	* [`<<listbox>>`](#macros-macro-listbox)
	* [`<<numberbox>>`](#macros-macro-numberbox)
	* [`<<radiobutton>>`](#macros-macro-radiobutton)
	* [`<<textarea>>`](#macros-macro-textarea)
	* [`<<textbox>>`](#macros-macro-textbox)
* [Links Macros](#macros-links)
	* [`<<actions>>`](#macros-macro-actions)
	* [`<<back>>`](#macros-macro-back)
	* [`<<choice>>`](#macros-macro-choice)
	* [`<<return>>`](#macros-macro-return)
* [DOM Macros](#macros-dom)
	* [`<<addclass>>`](#macros-macro-addclass)
	* [`<<append>>`](#macros-macro-append)
	* [`<<copy>>`](#macros-macro-copy)
	* [`<<prepend>>`](#macros-macro-prepend)
	* [`<<remove>>`](#macros-macro-remove)
	* [`<<removeclass>>`](#macros-macro-removeclass)
	* [`<<replace>>`](#macros-macro-replace)
	* [`<<toggleclass>>`](#macros-macro-toggleclass)
* [Audio Macros](#macros-audio)
	* [`<<audio>>`](#macros-macro-audio)
	* [`<<cacheaudio>>`](#macros-macro-cacheaudio)
	* [`<<createaudiogroup>>`](#macros-macro-createaudiogroup)
	* [`<<createplaylist>>`](#macros-macro-createplaylist)
	* [`<<masteraudio>>`](#macros-macro-masteraudio)
	* [`<<playlist>>`](#macros-macro-playlist)
	* [`<<removeaudiogroup>>`](#macros-macro-removeaudiogroup)
	* [`<<removeplaylist>>`](#macros-macro-removeplaylist)
	* [`<<waitforaudio>>`](#macros-macro-waitforaudio)
* [Miscellaneous Macros](#macros-miscellaneous)
	* [`<<done>>`](#macros-macro-done)
	* [`<<goto>>`](#macros-macro-goto)
	* [`<<repeat>>`](#macros-macro-repeat)
		* [`<<stop>>`](#macros-macro-stop)
	* [`<<timed>>`](#macros-macro-timed)
	* [`<<widget>>`](#macros-macro-widget)

## [Functions](#functions)

* [`clone()`](#functions-function-clone)
* [`either()`](#functions-function-either)
* [`forget()`](#functions-function-forget)
* [`hasVisited()`](#functions-function-hasvisited)
* [`lastVisited()`](#functions-function-lastvisited)
* [`importScripts()`](#functions-function-importscripts)
* [`importStyles()`](#functions-function-importstyles)
* [`memorize()`](#functions-function-memorize)
* [`passage()`](#functions-function-passage)
* [`previous()`](#functions-function-previous)
* [`random()`](#functions-function-random)
* [`randomFloat()`](#functions-function-randomfloat)
* [`recall()`](#functions-function-recall)
* [`setPageElement()`](#functions-function-setpageelement)
* [`tags()`](#functions-function-tags)
* [`temporary()`](#functions-function-temporary)
* [`time()`](#functions-function-time)
* [`turns()`](#functions-function-turns)
* [`variables()`](#functions-function-variables)
* [`visited()`](#functions-function-visited)
* [`visitedTags()`](#functions-function-visitedtags)

## [Methods](#methods)

* [Array Methods](#methods-array)
	* [`<Array>.concat()`](#methods-array-prototype-method-concat)
	* [`<Array>.concatUnique()`](#methods-array-prototype-method-concatunique)
	* [`<Array>.count()`](#methods-array-prototype-method-count)
	* [`<Array>.countWith()`](#methods-array-prototype-method-countwith)
	* [`<Array>.delete()`](#methods-array-prototype-method-delete)
	* [`<Array>.deleteAt()`](#methods-array-prototype-method-deleteat)
	* [`<Array>.deleteWith()`](#methods-array-prototype-method-deletewith)
	* [`<Array>.first()`](#methods-array-prototype-method-first)
	* [`<Array>.flat()`](#methods-array-prototype-method-flat)
	* [`<Array>.flatMap()`](#methods-array-prototype-method-flatmap)
	* [`<Array>.includes()`](#methods-array-prototype-method-includes)
	* [`<Array>.includesAll()`](#methods-array-prototype-method-includesall)
	* [`<Array>.includesAny()`](#methods-array-prototype-method-includesany)
	* [`<Array>.last()`](#methods-array-prototype-method-last)
	* [`<Array>.pluck()`](#methods-array-prototype-method-pluck)
	* [`<Array>.pluckMany()`](#methods-array-prototype-method-pluckmany)
	* [`<Array>.pop()`](#methods-array-prototype-method-pop)
	* [`<Array>.push()`](#methods-array-prototype-method-push)
	* [`<Array>.pushUnique()`](#methods-array-prototype-method-pushunique)
	* [`<Array>.random()`](#methods-array-prototype-method-random)
	* [`<Array>.randomMany()`](#methods-array-prototype-method-randommany)
	* [`<Array>.shift()`](#methods-array-prototype-method-shift)
	* [`<Array>.shuffle()`](#methods-array-prototype-method-shuffle)
	* [`<Array>.unshift()`](#methods-array-prototype-method-unshift)
	* [`<Array>.unshiftUnique()`](#methods-array-prototype-method-unshiftunique)
* [JSON Methods](#methods-json)
	* [`JSON.reviveWrapper()`](#methods-json-method-revivewrapper)
* [jQuery Methods](#methods-jquery)
	* [`<jQuery>.ariaClick()`](#methods-jquery-prototype-method-ariaclick)
	* [`<jQuery>.ariaDisabled()`](#methods-jquery-prototype-method-ariadisabled)
	* [`<jQuery>.ariaIsDisabled()`](#methods-jquery-prototype-method-ariaisdisabled)
	* [`jQuery.wiki()`](#methods-jquery-method-wiki)
	* [`<jQuery>.wiki()`](#methods-jquery-prototype-method-wiki)
* [Math Methods](#methods-math)
	* [`Math.clamp()`](#methods-math-method-clamp)
	* [`Math.trunc()`](#methods-math-method-trunc)
* [Number Methods](#methods-number)
	* [`<Number>.clamp()`](#methods-number-prototype-method-clamp)
* [RegExp Methods](#methods-regexp)
	* [`RegExp.escape()`](#methods-regexp-method-escape)
* [String Methods](#methods-string)
	* [`<String>.count()`](#methods-string-prototype-method-count)
	* [`<String>.first()`](#methods-string-prototype-method-first)
	* [`String.format()`](#methods-string-method-format)
	* [`<String>.includes()`](#methods-string-prototype-method-includes)
	* [`<String>.last()`](#methods-string-prototype-method-last)
	* [`<String>.toLocaleUpperFirst()`](#methods-string-prototype-method-tolocaleupperfirst)
	* [`<String>.toUpperFirst()`](#methods-string-prototype-method-toupperfirst)

## [Special Names](#special-names)

* [Passage Names](#special-passages)
	* [`PassageDone`](#special-passage-passagedone)
	* [`PassageFooter`](#special-passage-passagefooter)
	* [`PassageHeader`](#special-passage-passageheader)
	* [`PassageReady`](#special-passage-passageready)
	* [`Start`](#special-passage-start)
	* [`StoryAuthor`](#special-passage-storyauthor)
	* [`StoryBanner`](#special-passage-storybanner)
	* [`StoryCaption`](#special-passage-storycaption)
	* [`StoryDisplayTitle`](#special-passage-storydisplaytitle)
	* [`StoryInit`](#special-passage-storyinit)
	* [`StoryInterface`](#special-passage-storyinterface)
	* [`StoryMenu`](#special-passage-storymenu)
	* [`StorySettings`](#special-passage-storysettings)
	* [`StoryShare`](#special-passage-storyshare)
	* [`StorySubtitle`](#special-passage-storysubtitle)
	* [`StoryTitle`](#special-passage-storytitle)
* [Tag Names](#special-tags)
	* [`bookmark`](#special-tag-bookmark)
	* [`nobr`](#special-tag-nobr)
	* [`init`](#special-tag-init)
	* [`script`](#special-tag-script)
	* [`stylesheet`](#special-tag-stylesheet)
	* [`Twine.audio`](#special-tag-twine-audio)
	* [`Twine.image`](#special-tag-twine-image)
	* [`Twine.video`](#special-tag-twine-video)
	* [`Twine.vtt`](#special-tag-twine-vtt)
	* [`widget`](#special-tag-widget)
* [Variable Names](#special-variables)
	* [`$`](#special-variable-dollar)
	* [`_args`](#special-variable-underscore-args)
	* [`_contents`](#special-variable-underscore-contents)
	* [`Config`](#special-variable-config)
	* [`Dialog`](#special-variable-dialog)
	* [`Engine`](#special-variable-engine)
	* [`jQuery`](#special-variable-jquery)
	* [`l10nStrings`](#special-variable-l10nstrings)
	* [`Fullscreen`](#special-variable-fullscreen)
	* [`LoadScreen`](#special-variable-loadscreen)
	* [`Macro`](#special-variable-macro)
	* [`Passage`](#special-variable-passage)
	* [`Save`](#special-variable-save)
	* [`Setting`](#special-variable-setting)
	* [`settings`](#special-variable-settings)
	* [`setup`](#special-variable-setup)
	* [`SimpleAudio`](#special-variable-simpleaudio)
	* [`State`](#special-variable-state)
	* [`Story`](#special-variable-story)
	* [`Template`](#special-variable-template)
	* [`UI`](#special-variable-ui)
	* [`UIBar`](#special-variable-uibar)

## [CSS](#css)

* [Passage Conversions](#css-passage-conversions)
* [Example Selectors](#css-example-selectors)
* [Warnings](#css-warnings)
* [Built-in Stylesheets](#css-built-ins)

## [HTML](#html)

## [Events](#events)

* [`Dialog` Events](#events-dialog)
	* [`:dialogclosed`](#events-dialog-event-dialogclosed)
	* [`:dialogclosing`](#events-dialog-event-dialogclosing)
	* [`:dialogopened`](#events-dialog-event-dialogopened)
	* [`:dialogopening`](#events-dialog-event-dialogopening)
* [Navigation Events](#events-navigation)
	* [`:passageinit`](#events-navigation-event-passageinit)
	* [`:passagestart`](#events-navigation-event-passagestart)
	* [`:passagerender`](#events-navigation-event-passagerender)
	* [`:passagedisplay`](#events-navigation-event-passagedisplay)
	* [`:passageend`](#events-navigation-event-passageend)
* [`SimpleAudio` Events](#events-simpleaudio)
	* [`:faded`](#events-simpleaudio-event-faded)
	* [`:fading`](#events-simpleaudio-event-fading)
	* [`:stopped`](#events-simpleaudio-event-stopped)
* [System Events](#events-system)
	* [`:storyready`](#events-system-event-storyready)
	* [`:enginerestart`](#events-system-event-enginerestart)
* [`<<type>>` Events](#events-type-macro)
	* [`:typingcomplete`](#events-type-macro-event-typingcomplete)
	* [`:typingstart`](#events-type-macro-event-typingstart)
	* [`:typingstop`](#events-type-macro-event-typingstop)

----

## [`Config` API](#config-api)

* [Audio Settings](#config-api-audio)
	* [`Config.audio.pauseOnFadeToZero`](#config-api-property-audio-pauseonfadetozero)
	* [`Config.audio.preloadMetadata`](#config-api-property-audio-preloadmetadata)
* [History Settings](#config-api-history)
	* [`Config.history.controls`](#config-api-property-history-controls)
	* [`Config.history.maxStates`](#config-api-property-history-maxstates)
* [Macros Settings](#config-api-macros)
	* [`Config.macros.ifAssignmentError`](#config-api-property-macros-ifassignmenterror)
	* [`Config.macros.maxLoopIterations`](#config-api-property-macros-maxloopiterations)
	* [`Config.macros.typeSkipKey`](#config-api-property-macros-typeskipkey)
	* [`Config.macros.typeVisitedPassages`](#config-api-property-macros-typevisitedpassages)
* [Navigation Settings](#config-api-navigation)
	* [`Config.navigation.override`](#config-api-property-navigation-override)
* [Passages Settings](#config-api-passages)
	* [`Config.passages.descriptions`](#config-api-property-passages-descriptions)
	* [`Config.passages.displayTitles`](#config-api-property-passages-displaytitles)
	* [`Config.passages.nobr`](#config-api-property-passages-nobr)
	* [`Config.passages.onProcess`](#config-api-property-passages-onprocess)
	* [`Config.passages.start`](#config-api-property-passages-start)
	* [`Config.passages.transitionOut`](#config-api-property-passages-transitionout)
* [Saves Settings](#config-api-saves)
	* [`Config.saves.autoload`](#config-api-property-saves-autoload)
	* [`Config.saves.autosave`](#config-api-property-saves-autosave)
	* [`Config.saves.id`](#config-api-property-saves-id)
	* [`Config.saves.isAllowed`](#config-api-property-saves-isallowed)
	* [`Config.saves.slots`](#config-api-property-saves-slots)
	* [`Config.saves.tryDiskOnMobile`](#config-api-property-saves-trydiskonmobile)
	* [`Config.saves.version`](#config-api-property-saves-version)
* [UI Settings](#config-api-ui)
	* [`Config.ui.stowBarInitially`](#config-api-property-ui-stowbarinitially)
	* [`Config.ui.updateStoryElements`](#config-api-property-ui-updatestoryelements)
* [Miscellaneous Settings](#config-api-miscellaneous)
	* [`Config.addVisitedLinkClass`](#config-api-property-addvisitedlinkclass)
	* [`Config.cleanupWikifierOutput`](#config-api-property-cleanupwikifieroutput)
	* [`Config.debug`](#config-api-property-debug)
	* [`Config.loadDelay`](#config-api-property-loaddelay)

## [`Dialog` API](#dialog-api)

* [`Dialog.append()`](#dialog-api-method-append)
* [`Dialog.body()`](#dialog-api-method-body)
* [`Dialog.close()`](#dialog-api-method-close)
* [`Dialog.isOpen()`](#dialog-api-method-isopen)
* [`Dialog.open()`](#dialog-api-method-open)
* [`Dialog.setup()`](#dialog-api-method-setup)
* [`Dialog.wiki()`](#dialog-api-method-wiki)

## [`Engine` API](#engine-api)

* [`Engine.lastPlay`](#engine-api-getter-lastplay)
* [`Engine.state`](#engine-api-getter-state)
* [`Engine.backward()`](#engine-api-method-backward)
* [`Engine.forward()`](#engine-api-method-forward)
* [`Engine.go()`](#engine-api-method-go)
* [`Engine.goTo()`](#engine-api-method-goto)
* [`Engine.isIdle()`](#engine-api-method-isidle)
* [`Engine.isPlaying()`](#engine-api-method-isplaying)
* [`Engine.isRendering()`](#engine-api-method-isrendering)
* [`Engine.play()`](#engine-api-method-play)
* [`Engine.restart()`](#engine-api-method-restart)
* [`Engine.show()`](#engine-api-method-show)

## [`Fullscreen` API](#fullscreen-api)

* [`Fullscreen.element`](#fullscreen-api-getter-element)
* [`Fullscreen.isEnabled()`](#fullscreen-api-method-isenabled)
* [`Fullscreen.isFullscreen()`](#fullscreen-api-method-isfullscreen)
* [`Fullscreen.request()`](#fullscreen-api-method-request)
* [`Fullscreen.exit()`](#fullscreen-api-method-exit)
* [`Fullscreen.toggle()`](#fullscreen-api-method-toggle)
* [`Fullscreen.onChange()`](#fullscreen-api-method-onchange)
* [`Fullscreen.offChange()`](#fullscreen-api-method-offchange)
* [`Fullscreen.onError()`](#fullscreen-api-method-onerror)
* [`Fullscreen.offError()`](#fullscreen-api-method-offerror)

## [`LoadScreen` API](#loadscreen-api)

* [`LoadScreen.lock()`](#loadscreen-api-method-lock)
* [`LoadScreen.unlock()`](#loadscreen-api-method-unlock)

## [`Macro` API](#macro-api)

* [`Macro.add()`](#macro-api-method-add)
* [`Macro.delete()`](#macro-api-method-delete)
* [`Macro.get()`](#macro-api-method-get)
* [`Macro.has()`](#macro-api-method-has)
* [`Macro.tags.get()`](#macro-api-method-tags-get)
* [`Macro.tags.has()`](#macro-api-method-tags-has)

##  [`MacroContext` API](#macrocontext-api)

* [`<MacroContext>.args`](#macrocontext-api-prototype-property-args)
	* [`<MacroContext>.args.full`](#macrocontext-api-prototype-property-args-full)
	* [`<MacroContext>.args.raw`](#macrocontext-api-prototype-property-args-raw)
* [`<MacroContext>.name`](#macrocontext-api-prototype-property-name)
* [`<MacroContext>.output`](#macrocontext-api-prototype-property-output)
* [`<MacroContext>.parent`](#macrocontext-api-prototype-property-parent)
* [`<MacroContext>.parser`](#macrocontext-api-prototype-property-parser)
* [`<MacroContext>.payload`](#macrocontext-api-prototype-property-payload)
* [`<MacroContext>.self`](#macrocontext-api-prototype-property-self)
* [`<MacroContext>.contextHas()`](#macrocontext-api-prototype-method-contexthas)
* [`<MacroContext>.contextSelect()`](#macrocontext-api-prototype-method-contextselect)
* [`<MacroContext>.contextSelectAll()`](#macrocontext-api-prototype-method-contextselectall)
* [`<MacroContext>.createShadowWrapper()`](#macrocontext-api-prototype-method-createshadowwrapper)
* [`<MacroContext>.error()`](#macrocontext-api-prototype-method-error)

## [`Passage` API](#passage-api)

* [`<Passage>.domId`](#passage-api-prototype-getter-domid)
* [`<Passage>.tags`](#passage-api-prototype-getter-tags)
* [`<Passage>.text`](#passage-api-prototype-getter-text)
* [`<Passage>.title`](#passage-api-prototype-getter-title)
* [`<Passage>.description()`](#passage-api-prototype-method-description)
* [`<Passage>.processText()`](#passage-api-prototype-method-processtext)

## [`Save` API](#save-api)

* [Save Objects](#save-api-save-objects)
* [General](#save-api-general)
	* [`Save.clear()`](#save-api-method-clear)
	* [`Save.get()`](#save-api-method-get)
	* [`Save.ok()`](#save-api-method-ok)
* [Slots](#save-api-slots)
	* [`Save.slots.length`](#save-api-getter-slots-length)
	* [`Save.slots.count()`](#save-api-method-slots-count)
	* [`Save.slots.delete()`](#save-api-method-slots-delete)
	* [`Save.slots.get()`](#save-api-method-slots-get)
	* [`Save.slots.has()`](#save-api-method-slots-has)
	* [`Save.slots.isEmpty()`](#save-api-method-slots-isempty)
	* [`Save.slots.load()`](#save-api-method-slots-load)
	* [`Save.slots.ok()`](#save-api-method-slots-ok)
	* [`Save.slots.save()`](#save-api-method-slots-save)
* [Autosave](#save-api-autosave)
	* [`Save.autosave.delete()`](#save-api-method-autosave-delete)
	* [`Save.autosave.get()`](#save-api-method-autosave-get)
	* [`Save.autosave.has()`](#save-api-method-autosave-has)
	* [`Save.autosave.load()`](#save-api-method-autosave-load)
	* [`Save.autosave.ok()`](#save-api-method-autosave-ok)
	* [`Save.autosave.save()`](#save-api-method-autosave-save)
* [Disk](#save-api-disk)
	* [`Save.export()`](#save-api-method-export)
	* [`Save.import()`](#save-api-method-import)
* [Serialization](#save-api-serialization)
	* [`Save.serialize()`](#save-api-method-serialize)
	* [`Save.deserialize()`](#save-api-method-deserialize)
* [Events](#save-api-events)
	* [`Save.onLoad.add()`](#save-api-method-onload-add)
	* [`Save.onLoad.clear()`](#save-api-method-onload-clear)
	* [`Save.onLoad.delete()`](#save-api-method-onload-delete)
	* [`Save.onLoad.size`](#save-api-getter-onload-size)
	* [`Save.onSave.add()`](#save-api-method-onsave-add)
	* [`Save.onSave.clear()`](#save-api-method-onsave-clear)
	* [`Save.onSave.delete()`](#save-api-method-onsave-delete)
	* [`Save.onSave.size`](#save-api-getter-onsave-size)

## [`Setting` API](#setting-api)

* [`Setting.addHeader()`](#setting-api-method-addheader)
* [`Setting.addToggle()`](#setting-api-method-addtoggle)
* [`Setting.addList()`](#setting-api-method-addlist)
* [`Setting.addRange()`](#setting-api-method-addrange)
* [`Setting.load()`](#setting-api-method-load)
* [`Setting.reset()`](#setting-api-method-reset)
* [`Setting.save()`](#setting-api-method-save)
* [`settings`](#setting-api-object-settings)

## [`SimpleAudio` API](#simpleaudio-api)

* [General](#simpleaudio-api-general)
	* [`SimpleAudio.load()`](#simpleaudio-api-method-load)
	* [`SimpleAudio.loadWithScreen()`](#simpleaudio-api-method-loadwithscreen)
	* [`SimpleAudio.mute()`](#simpleaudio-api-method-mute)
	* [`SimpleAudio.muteOnHidden()`](#simpleaudio-api-method-muteonhidden)
	* [`SimpleAudio.select()`](#simpleaudio-api-method-select)
	* [`SimpleAudio.stop()`](#simpleaudio-api-method-stop)
	* [`SimpleAudio.unload()`](#simpleaudio-api-method-unload)
	* [`SimpleAudio.volume()`](#simpleaudio-api-method-volume)
* [Tracks](#simpleaudio-api-tracks)
	* [`SimpleAudio.tracks.add()`](#simpleaudio-api-method-tracks-add)
	* [`SimpleAudio.tracks.clear()`](#simpleaudio-api-method-tracks-clear)
	* [`SimpleAudio.tracks.delete()`](#simpleaudio-api-method-tracks-delete)
	* [`SimpleAudio.tracks.get()`](#simpleaudio-api-method-tracks-get)
	* [`SimpleAudio.tracks.has()`](#simpleaudio-api-method-tracks-has)
* [Groups](#simpleaudio-api-groups)
	* [`SimpleAudio.groups.add()`](#simpleaudio-api-method-groups-add)
	* [`SimpleAudio.groups.clear()`](#simpleaudio-api-method-groups-clear)
	* [`SimpleAudio.groups.delete()`](#simpleaudio-api-method-groups-delete)
	* [`SimpleAudio.groups.get()`](#simpleaudio-api-method-groups-get)
	* [`SimpleAudio.groups.has()`](#simpleaudio-api-method-groups-has)
* [Lists](#simpleaudio-api-lists)
	* [`SimpleAudio.lists.add()`](#simpleaudio-api-method-lists-add)
	* [`SimpleAudio.lists.clear()`](#simpleaudio-api-method-lists-clear)
	* [`SimpleAudio.lists.delete()`](#simpleaudio-api-method-lists-delete)
	* [`SimpleAudio.lists.get()`](#simpleaudio-api-method-lists-get)
	* [`SimpleAudio.lists.has()`](#simpleaudio-api-method-lists-has)

##  [`AudioTrack` API](#audiotrack-api)

* [`<AudioTrack>.clone()`](#audiotrack-api-prototype-method-clone)
* [`<AudioTrack>.duration()`](#audiotrack-api-prototype-method-duration)
* [`<AudioTrack>.fade()`](#audiotrack-api-prototype-method-fade)
* [`<AudioTrack>.fadeIn()`](#audiotrack-api-prototype-method-fadein)
* [`<AudioTrack>.fadeOut()`](#audiotrack-api-prototype-method-fadeout)
* [`<AudioTrack>.fadeStop()`](#audiotrack-api-prototype-method-fadestop)
* [`<AudioTrack>.hasData()`](#audiotrack-api-prototype-method-hasdata)
* [`<AudioTrack>.hasMetadata()`](#audiotrack-api-prototype-method-hasmetadata)
* [`<AudioTrack>.hasNoData()`](#audiotrack-api-prototype-method-hasnodata)
* [`<AudioTrack>.hasSomeData()`](#audiotrack-api-prototype-method-hassomedata)
* [`<AudioTrack>.hasSource()`](#audiotrack-api-prototype-method-hassource)
* [`<AudioTrack>.isEnded()`](#audiotrack-api-prototype-method-isended)
* [`<AudioTrack>.isFading()`](#audiotrack-api-prototype-method-isfading)
* [`<AudioTrack>.isFailed()`](#audiotrack-api-prototype-method-isfailed)
* [`<AudioTrack>.isLoading()`](#audiotrack-api-prototype-method-isloading)
* [`<AudioTrack>.isPaused()`](#audiotrack-api-prototype-method-ispaused)
* [`<AudioTrack>.isPlaying()`](#audiotrack-api-prototype-method-isplaying)
* [`<AudioTrack>.isSeeking()`](#audiotrack-api-prototype-method-isseeking)
* [`<AudioTrack>.isStopped()`](#audiotrack-api-prototype-method-isstopped)
* [`<AudioTrack>.isUnavailable()`](#audiotrack-api-prototype-method-isunavailable)
* [`<AudioTrack>.isUnloaded()`](#audiotrack-api-prototype-method-isunloaded)
* [`<AudioTrack>.load()`](#audiotrack-api-prototype-method-load)
* [`<AudioTrack>.loop()`](#audiotrack-api-prototype-method-loop)
* [`<AudioTrack>.mute()`](#audiotrack-api-prototype-method-mute)
* [`<AudioTrack>.off()`](#audiotrack-api-prototype-method-off)
* [`<AudioTrack>.on()`](#audiotrack-api-prototype-method-on)
* [`<AudioTrack>.one()`](#audiotrack-api-prototype-method-one)
* [`<AudioTrack>.pause()`](#audiotrack-api-prototype-method-pause)
* [`<AudioTrack>.play()`](#audiotrack-api-prototype-method-play)
* [`<AudioTrack>.playWhenAllowed()`](#audiotrack-api-prototype-method-playwhenallowed)
* [`<AudioTrack>.remaining()`](#audiotrack-api-prototype-method-remaining)
* [`<AudioTrack>.stop()`](#audiotrack-api-prototype-method-stop)
* [`<AudioTrack>.time()`](#audiotrack-api-prototype-method-time)
* [`<AudioTrack>.unload()`](#audiotrack-api-prototype-method-unload)
* [`<AudioTrack>.volume()`](#audiotrack-api-prototype-method-volume)

##  [`AudioRunner` API](#audiorunner-api)

* [`<AudioRunner>.fade()`](#audiorunner-api-prototype-method-fade)
* [`<AudioRunner>.fadeIn()`](#audiorunner-api-prototype-method-fadein)
* [`<AudioRunner>.fadeOut()`](#audiorunner-api-prototype-method-fadeout)
* [`<AudioRunner>.fadeStop()`](#audiorunner-api-prototype-method-fadestop)
* [`<AudioRunner>.load()`](#audiorunner-api-prototype-method-load)
* [`<AudioRunner>.loop()`](#audiorunner-api-prototype-method-loop)
* [`<AudioRunner>.mute()`](#audiorunner-api-prototype-method-mute)
* [`<AudioRunner>.off()`](#audiorunner-api-prototype-method-off)
* [`<AudioRunner>.on()`](#audiorunner-api-prototype-method-on)
* [`<AudioRunner>.one()`](#audiorunner-api-prototype-method-one)
* [`<AudioRunner>.pause()`](#audiorunner-api-prototype-method-pause)
* [`<AudioRunner>.play()`](#audiorunner-api-prototype-method-play)
* [`<AudioRunner>.playWhenAllowed()`](#audiorunner-api-prototype-method-playwhenallowed)
* [`<AudioRunner>.stop()`](#audiorunner-api-prototype-method-stop)
* [`<AudioRunner>.time()`](#audiorunner-api-prototype-method-time)
* [`<AudioRunner>.unload()`](#audiorunner-api-prototype-method-unload)
* [`<AudioRunner>.volume()`](#audiorunner-api-prototype-method-volume)

##  [`AudioList` API](#audiolist-api)

* [`<AudioList>.duration()`](#audiolist-api-prototype-method-duration)
* [`<AudioList>.fade()`](#audiolist-api-prototype-method-fade)
* [`<AudioList>.fadeIn()`](#audiolist-api-prototype-method-fadein)
* [`<AudioList>.fadeOut()`](#audiolist-api-prototype-method-fadeout)
* [`<AudioList>.fadeStop()`](#audiolist-api-prototype-method-fadestop)
* [`<AudioList>.isEnded()`](#audiolist-api-prototype-method-isended)
* [`<AudioList>.isFading()`](#audiolist-api-prototype-method-isfading)
* [`<AudioList>.isPaused()`](#audiolist-api-prototype-method-ispaused)
* [`<AudioList>.isPlaying()`](#audiolist-api-prototype-method-isplaying)
* [`<AudioList>.isStopped()`](#audiolist-api-prototype-method-isstopped)
* [`<AudioList>.load()`](#audiolist-api-prototype-method-load)
* [`<AudioList>.loop()`](#audiolist-api-prototype-method-loop)
* [`<AudioList>.mute()`](#audiolist-api-prototype-method-mute)
* [`<AudioList>.pause()`](#audiolist-api-prototype-method-pause)
* [`<AudioList>.play()`](#audiolist-api-prototype-method-play)
* [`<AudioList>.playWhenAllowed()`](#audiolist-api-prototype-method-playwhenallowed)
* [`<AudioList>.remaining()`](#audiolist-api-prototype-method-remaining)
* [`<AudioList>.shuffle()`](#audiolist-api-prototype-method-shuffle)
* [`<AudioList>.skip()`](#audiolist-api-prototype-method-skip)
* [`<AudioList>.stop()`](#audiolist-api-prototype-method-stop)
* [`<AudioList>.time()`](#audiolist-api-prototype-method-time)
* [`<AudioList>.unload()`](#audiolist-api-prototype-method-unload)
* [`<AudioList>.volume()`](#audiolist-api-prototype-method-volume)

## [`State` API](#state-api)

* [`State.active`](#state-api-getter-active)
* [`State.bottom`](#state-api-getter-bottom)
* [`State.current`](#state-api-getter-current)
* [`State.length`](#state-api-getter-length)
* [`State.passage`](#state-api-getter-passage)
* [`State.size`](#state-api-getter-size)
* [`State.temporary`](#state-api-getter-temporary)
* [`State.top`](#state-api-getter-top)
* [`State.turns`](#state-api-getter-turns)
* [`State.variables`](#state-api-getter-variables)
* [`State.getVar()`](#state-api-method-getvar)
* [`State.has()`](#state-api-method-has)
* [`State.hasPlayed()`](#state-api-method-hasplayed)
* [`State.index()`](#state-api-method-index)
* [`State.isEmpty()`](#state-api-method-isempty)
* [`State.peek()`](#state-api-method-peek)
* [`State.metadata.size`](#state-api-method-metadata-size)
* [`State.metadata.clear()`](#state-api-method-metadata-clear)
* [`State.metadata.delete()`](#state-api-method-metadata-delete)
* [`State.metadata.entries()`](#state-api-method-metadata-entries)
* [`State.metadata.get()`](#state-api-method-metadata-get)
* [`State.metadata.has()`](#state-api-method-metadata-has)
* [`State.metadata.keys()`](#state-api-method-metadata-keys)
* [`State.metadata.set()`](#state-api-method-metadata-set)
* [`State.prng.init()`](#state-api-method-prng-init)
* [`State.prng.isEnabled()`](#state-api-method-prng-isenabled)
* [`State.prng.pull`](#state-api-getter-prng-pull)
* [`State.prng.seed`](#state-api-getter-prng-seed)
* [`State.random()`](#state-api-method-random)
* [`State.setVar()`](#state-api-method-setvar)

## [`Story` API](#story-api)

* [`Story.domId`](#story-api-getter-domid)
* [`Story.ifId`](#story-api-getter-ifid)
* [`Story.title`](#story-api-getter-title)
* [`Story.get()`](#story-api-method-get)
* [`Story.has()`](#story-api-method-has)
* [`Story.lookup()`](#story-api-method-lookup)
* [`Story.lookupWith()`](#story-api-method-lookupwith)

## [`Template` API](#template-api)

* [`Template.size`](#template-api-getter-size)
* [`Template.add()`](#template-api-method-add)
* [`Template.delete()`](#template-api-method-delete)
* [`Template.get()`](#template-api-method-get)
* [`Template.has()`](#template-api-method-has)

## [`UI` API](#ui-api)

* [`UI.alert()`](#ui-api-method-alert)
* [`UI.jumpto()`](#ui-api-method-jumpto)
* [`UI.restart()`](#ui-api-method-restart)
* [`UI.saves()`](#ui-api-method-saves)
* [`UI.settings()`](#ui-api-method-settings)
* [`UI.share()`](#ui-api-method-share)

## [`UIBar` API](#uibar-api)

* [`UIBar.destroy()`](#uibar-api-method-destroy)
* [`UIBar.hide()`](#uibar-api-method-hide)
* [`UIBar.isHidden()`](#uibar-api-method-ishidden)
* [`UIBar.isStowed()`](#uibar-api-method-isstowed)
* [`UIBar.show()`](#uibar-api-method-show)
* [`UIBar.stow()`](#uibar-api-method-stow)
* [`UIBar.unstow()`](#uibar-api-method-unstow)
* [`UIBar.update()`](#uibar-api-method-update)

----

## [Guide: State, Sessions, and Saving](#guide-state-sessions-and-saving)

* [Story History](#guide-state-sessions-and-saving-story-history)
* [Playthrough Session](#guide-state-sessions-and-saving-playthrough-session)
* [Autosave](#guide-state-sessions-and-saving-autosave)
* [What Happens When a Save is Loaded?](#guide-state-sessions-and-saving-what-happens-when-a-save-is-loaded)
* [Refreshing and Restarting](#guide-state-sessions-and-saving-refreshing-and-restarting)

## [Guide: Tips](#guide-tips)

* [Arbitrarily long return](#guide-tips-arbitrarily-long-return)
* [Non-generic object types (a.k.a. classes)](#guide-tips-non-generic-object-types)

## [Guide: Media Passages](#guide-media-passages)

* [Creation](#guide-media-passages-creation)

## [Guide: Harlowe to SugarCube](#guide-harlowe-to-sugarcube)

* [Macro Overview](#guide-harlowe-to-sugarcube-macro-overview)
* [Specific Macros](#guide-harlowe-to-sugarcube-specific-macros)
* [User Input](#guide-harlowe-to-sugarcube-user-input)
* [Data Types](#guide-harlowe-to-sugarcube-data-types)

## [Guide: Test Mode](#guide-test-mode)

* [Introduction](#guide-test-mode-introduction)
* [Enabling Test Mode](#guide-test-mode-enabling)
* [Debug Bar](#guide-test-mode-debug-bar) (≥v2.23.0)
* [Debug Views](#guide-test-mode-debug-views) (≤v2.22.0)

## [Guide: TypeScript](#guide-typescript)

## [Guide: Installation](#guide-installation)

* [Local Install For Tweego](#guide-installation-tweego)
* [Local Install For Twine 2](#guide-installation-twine2)
* [Online Install For Twine 2](#guide-installation-twine2-online)
* [Local Install For Twine 1/Twee](#guide-installation-twine1-twee)

## [Guide: Code Updates](#guide-code-updates)

* [Upgrading to ≥2.30.0](#guide-code-updates-2.30.0)
* [Upgrading to ≥2.29.0](#guide-code-updates-2.29.0)
* [Upgrading to ≥2.28.0](#guide-code-updates-2.28.0)
* [Upgrading to ≥2.20.0](#guide-code-updates-2.20.0)
* [Upgrading to ≥2.15.0](#guide-code-updates-2.15.0)
* [Upgrading to ≥2.10.0](#guide-code-updates-2.10.0)
* [Upgrading to ≥2.8.0](#guide-code-updates-2.8.0)
* [Upgrading to ≥2.5.0](#guide-code-updates-2.5.0)
* [Upgrading to ≥2.0.0](#guide-code-updates-2.0.0)

## [Guide: Localization](#guide-localization)

* [Translation Notes](#guide-localization-translation-notes)
* [Usage](#guide-localization-usage)


code:
/*
	PAGE ENHANCEMENT
*/
/* globals SCDocs */
(function () {
	'use strict';

	if (!('SCDocs' in window)) {
		return;
	}

	// Restore user settings.
	var codeColor = SCDocs.getConfig('codeColor');
	if (codeColor === 'inherit') {
		document.documentElement.classList.add('disable-code-color');
	}

	// Outline patching.
	var outlineStyle = (function () {
		var style = document.createElement('style');
		style.setAttribute('id', 'style-aria-outlines');
		style.setAttribute('type', 'text/css');
		document.head.appendChild(style);
		return style;
	})();
	var lastOutlineEvent;
	var outlineToggleFn = function (ev) {
		if (ev.type !== lastOutlineEvent) {
			lastOutlineEvent = ev.type;
			// Clear styles for IE ≤10.
			if (outlineStyle.styleSheet) {
				outlineStyle.styleSheet.cssText = '';
			}
			// Clear styles for all other browsers (incl. IE ≥11).
			else {
				while (outlineStyle.firstChild) {
					outlineStyle.removeChild(outlineStyle.firstChild);
				}
			}
			if (ev.type === 'mousedown') {
				var rule = '*:focus{outline:none;}';
				// For IE ≤ 10.
				if (outlineStyle.styleSheet) {
					outlineStyle.styleSheet.cssText += rule;
				}
				// For all other browsers (incl. IE ≥ 11).
				else {
					outlineStyle.appendChild(document.createTextNode(rule));
				}
			}
		}
	};
	document.addEventListener('keydown', outlineToggleFn);
	document.addEventListener('mousedown', outlineToggleFn);
})();


code:
/*
	`SCDocs` SETUP
*/
(function () {
	'use strict';

	var hasWebStorage = function (storeId) {
		try {
			var store = window[storeId];
			var tid   = '_scd_' + String(Date.now());
			store.setItem(tid, tid);
			var result = store.getItem(tid) === tid;
			store.removeItem(tid);
			return result;
		}
		catch (ex) { /* no-op */ }

		return false;
	};

	if (
		   !document.head
		|| !document.addEventListener
		|| !document.querySelector
		|| !Array.prototype.indexOf
		|| !Object.defineProperties
		|| !hasWebStorage('localStorage')
	) {
		return;
	}

	var storageKey = 'sugarcube-v2-docs-cfg';
	var SCDocs = Object.freeze(Object.defineProperties(Object.create(null), {
		getConfig : {
			value : function (key) {
				var json = localStorage.getItem(storageKey);

				if (json) {
					try {
						var config = JSON.parse(json);

						if (config !== null && typeof config === 'object' && config.hasOwnProperty(key)) {
							return config[key];
						}
					}
					catch (ex) { /* no-op */ }
				}

				return undefined;
			}
		},
		setConfig : {
			value : function (key, value) {
				var config;

				try {
					config = JSON.parse(localStorage.getItem(storageKey));
				}
				catch (ex) { /* no-op */ }

				if (config === null || typeof config !== 'object') {
					config = {};
				}

				config[key] = value;

				try {
					localStorage.setItem(storageKey, JSON.stringify(config));
					return true;
				}
				catch (ex) { /* no-op */ }

				return false;
			}
		},
		removeConfig : {
			value : function (key) {
				var json = localStorage.getItem(storageKey);

				if (json) {
					try {
						var config = JSON.parse(json);

						if (config !== null && typeof config === 'object' && config.hasOwnProperty(key)) {
							delete config[key];

							if (Object.keys(config).length > 0) {
								localStorage.setItem(storageKey, JSON.stringify(config));
							}
							else {
								localStorage.removeItem(storageKey);
							}
						}

						return true;
					}
					catch (ex) { /* no-op */ }
				}

				return false;
			}
		},
		clearConfig : {
			value : function () {
				localStorage.removeItem(storageKey);
				return true;
			}
		},
		arrayFrom : {
			value : function (arrayLike) {
				return Array.prototype.slice.call(arrayLike);
			}
		}
	}));
	Object.defineProperty(window, 'SCDocs', {
		value : SCDocs
	});
})();


code:
(function (window, document, undefined) {
"use strict";


code:
/*
	NAV ENHANCEMENT
*/
/* globals SCDocs */
(function () {
	'use strict';

	if (!('SCDocs' in window)) {
		return;
	}

	var storageKey = 'navExpanded';
	var expanded   = Object.freeze(Object.defineProperties(Object.create(null), {
		_array : {
			value : SCDocs.getConfig(storageKey) || []
		},
		add : {
			value : function (listId) {
				if (this._array.indexOf(listId) === -1) {
					this._array.push(listId);
					SCDocs.setConfig(storageKey, this._array);
				}
			}
		},
		delete : {
			value : function (listId) {
				var pos = this._array.indexOf(listId);

				if (pos !== -1) {
					this._array.splice(pos, 1);

					if (this._array.length > 0) {
						SCDocs.setConfig(storageKey, this._array);
					}
					else {
						SCDocs.removeConfig(storageKey);
					}
				}
			}
		},
		has : {
			value : function (listId) {
				return this._array.indexOf(listId) !== -1;
			}
		}
	}));

	var createListToggle = function (list, isExpanded) {
		var collapseTitle = 'Collapse section';
		var expandTitle   = 'Expand section';
		var toggleFn      = function (ev) {
			if (
				   ev.type === 'click'
				|| ev.type === 'keypress' && (ev.which === 13 /* Enter/Return */ || ev.which === 32 /* Space */)
			) {
				ev.preventDefault();
				var toggle = ev.target;

				if (list.classList.contains('collapsed')) {
					list.classList.remove('collapsed');
					toggle.classList.remove('collapsed');
					toggle.setAttribute('title', collapseTitle);
					toggle.setAttribute('aria-label', collapseTitle);
					expanded.add(list.id);
				}
				else {
					list.classList.add('collapsed');
					toggle.classList.add('collapsed');
					toggle.setAttribute('title', expandTitle);
					toggle.setAttribute('aria-label', expandTitle);
					expanded.delete(list.id);
				}
			}
		};
		var toggle = document.createElement('a');
		toggle.classList.add('list-toggle');

		if (isExpanded) {
			toggle.setAttribute('title', collapseTitle);
			toggle.setAttribute('aria-label', collapseTitle);
		}
		else {
			list.classList.add('collapsed');
			toggle.classList.add('collapsed');
			toggle.setAttribute('title', expandTitle);
			toggle.setAttribute('aria-label', expandTitle);
		}

		toggle.setAttribute('tabindex', 0);
		toggle.addEventListener('click', toggleFn);
		toggle.addEventListener('keypress', toggleFn);
		return toggle;
	};
	var nav     = document.querySelector('nav');
	var lists   = SCDocs.arrayFrom(nav.querySelectorAll('nav>ul'));
	var toggles = [];
	lists.forEach(function (list) {
		var heading = list.previousSibling;

		while (heading !== null && heading.nodeType !== Node.ELEMENT_NODE && heading.nodeName !== 'H2') {
			heading = heading.previousSibling;
		}

		if (heading) {
			var anchor = heading.firstChild;

			while (anchor) {
				if (anchor.nodeType === Node.ELEMENT_NODE && anchor.nodeName === 'A') {
					break;
				}

				anchor = anchor.nextSibling;
			}

			var listId = 'nav-' + anchor.href.replace(/^.*#([^#]+)$/, '$1');
			list.setAttribute('id', listId);
			var toggle = createListToggle(list, expanded.has(listId));
			toggles.push(toggle);
			heading.appendChild(toggle);
		}
	});

	var createColorToggle = function (isDisabled) {
		var disableTitle = 'Disable code color';
		var enableTitle  = 'Enable code color';
		var toggleFn     = function (ev) {
			if (
				   ev.type === 'click'
				|| ev.type === 'keypress' && (ev.which === 13 /* Enter/Return */ || ev.which === 32 /* Space */)
			) {
				ev.preventDefault();
				var button = ev.target;

				if (button.classList.contains('disabled')) {
					button.classList.remove('disabled');
					button.setAttribute('title', disableTitle);
					button.setAttribute('aria-label', disableTitle);
					SCDocs.removeConfig('codeColor');
					document.documentElement.classList.remove('disable-code-color');
				}
				else {
					button.classList.add('disabled');
					button.setAttribute('title', enableTitle);
					button.setAttribute('aria-label', enableTitle);
					SCDocs.setConfig('codeColor', 'inherit');
					document.documentElement.classList.add('disable-code-color');
				}
			}
		};
		var button = document.createElement('button');
		button.setAttribute('id', 'color-toggle');
		button.appendChild(document.createTextNode('Code Color'));

		if (SCDocs.getConfig('codeColor') === 'inherit') {
			button.classList.add('disabled');
			button.setAttribute('title', enableTitle);
			button.setAttribute('aria-label', enableTitle);
		}
		else {
			button.setAttribute('title', disableTitle);
			button.setAttribute('aria-label', disableTitle);
		}

		button.setAttribute('tabindex', 0);
		button.addEventListener('click', toggleFn);
		button.addEventListener('keypress', toggleFn);
		return button;
	};
	var createListToggleAll = function (toggles, name, predicate) {
		var createEvent = function (type) {
			var event;

			if (typeof Event === 'function') {
				event = new Event(type);
			}
			else {
				event = document.createEvent('Event');
				event.initEvent(type);
			}

			return event;
		};
		var toggleFn = function (ev) {
			if (
				   ev.type === 'click'
				|| ev.type === 'keypress' && (ev.which === 13 /* Enter/Return */ || ev.which === 32 /* Space */)
			) {
				ev.preventDefault();

				toggles.forEach(function (toggle) {
					if (predicate(toggle)) {
						toggle.dispatchEvent(createEvent('click'));
					}
				});
			}
		};
		var title  = name + ' all';
		var toggle = document.createElement('a');
		toggle.setAttribute('id', 'lists-' + name.toLowerCase());
		toggle.setAttribute('title', title);
		toggle.setAttribute('aria-label', title);
		toggle.setAttribute('tabindex', 0);
		toggle.addEventListener('click', toggleFn);
		toggle.addEventListener('keypress', toggleFn);
		return toggle;
	};
	var header = nav.querySelector('nav>header');
	var tray   = document.createElement('div');
	tray.setAttribute('id', 'controls');
	tray.appendChild(createColorToggle());
	tray.appendChild(createListToggleAll(toggles, 'Collapse', function (toggle) {
		return !toggle.classList.contains('collapsed');
	}));
	tray.appendChild(createListToggleAll(toggles, 'Expand', function (toggle) {
		return toggle.classList.contains('collapsed');
	}));
	header.appendChild(tray);
	nav.classList.add('enhanced');
})();


code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="48" height="48" version="1.1" inkscape:version="0.48.0 r9654">
  <defs id="defs4"/>
  <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="11.313708" inkscape:cx="27.203376" inkscape:cy="26.578528" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1280" inkscape:window-height="968" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:window-maximized="1">
    <inkscape:grid type="xygrid" id="grid2985" empspacing="5" visible="true" enabled="true" snapvisiblegridlinesonly="true"/>
  </sodipodi:namedview>
  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1004.3622)">
    <g id="g3000" transform="translate(-6,1003)">
      <path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2987" d="m 30,2.3621826 -20,10.0000004 20,10 20,-10 z" style="fill:#f9f9f9;stroke:none"/>
      <path style="fill:#ececec;stroke:none" d="m 30,22.362183 0,25 20,-10 0,-25 z" id="path2989" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
      <path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2991" d="m 30,22.362183 0,25 -20,-10 0,-25 z" style="fill:#cccccc;stroke:none"/>
      <path inkscape:connector-curvature="0" id="path2993" d="M 30,2.3749996 10,12.375 l 0,25 20,10 20,-10 0,-25 L 30,2.3749996 z" style="fill:none;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
    </g>
  </g>
  <metadata>
    <rdf:RDF>
      <cc:Work>
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
        <dc:publisher>
          <cc:Agent rdf:about="http://openclipart.org/">
            <dc:title>Open Clip Art Library</dc:title>
          </cc:Agent>
        </dc:publisher>
        <dc:title>Sugar Cube icon</dc:title>
        <dc:date>2010-10-10T11:46:52</dc:date>
        <dc:description>A sugar cube.</dc:description>
        <dc:source>http://openclipart.org/detail/89407/sugar-cube-icon-by-jhnri4</dc:source>
        <dc:creator>
          <cc:Agent>
            <dc:title>jhnri4</dc:title>
          </cc:Agent>
        </dc:creator>
        <dc:subject>
          <rdf:Bag>
            <rdf:li>SVG</rdf:li>
            <rdf:li>block</rdf:li>
            <rdf:li>clip art</rdf:li>
            <rdf:li>clipart</rdf:li>
            <rdf:li>cube</rdf:li>
            <rdf:li>icon</rdf:li>
            <rdf:li>sugar</rdf:li>
            <rdf:li>white</rdf:li>
          </rdf:Bag>
        </dc:subject>
      </cc:Work>
      <cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
        <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
        <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
        <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
      </cc:License>
    </rdf:RDF>
  </metadata>
</svg>


code:
# SugarCube v2 Localizations

This directory contains a collection of localizations for SugarCube's default UI strings.  They are the source from which the packaged versions, available on [SugarCube's website](http://www.motoslave.net/sugarcube/2/#downloads) (under *Downloads > Localizations*), are built.  If you're simply looking for downloads, see the website.

For more information about the guidelines used to create these localizations, see the [*Localization* guide](http://www.motoslave.net/sugarcube/2/docs/#guide-localization).

For the template that should be used as the basis of localizations, see the `l10n-template.js` file within this directory.

## Contributors

* `ar-EG.js` – العربية (مصر), by: Mustafa Rawi.
* `chs.js` – 简体中文, by: Liyro Pen.
* `de.js` – Deutsch, by: Phil Strahl, Grausicht.
* `es-ES.js` – Español (Castellano), by: Gerardo Galán.
* `es-UNKNOWN.js` – Español (*UNKNOWN*), by: Raúl Castellano.
* `fr.js` – Français, by: Marc Cornette, Pierre Kessler.
* `it-IT.js` – Italiano (Italy), by: Karime Chehbouni.
* `nl.js` – Dutch, by: Sjoerd Hekking.
* `pl.js` – Polski, by: ciupac.
* `pt-BR.js` – Português (Brazil), by: Janos Biro.
* `pt-PT.js` – Português (Portugal), by: Magma.
* `ru.js` – Ру́сский, by: Konstantin Kitmanov.
* `tr.js` – Türkçe, by: Guena Varia.


code:
/***********************************************************************************************************************

	ar-EG.js – العربية (مصر)
	Localization by: Mustafa Rawi

	Copyright © 2021 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = 'لعبة';
	l10nStrings.aborting = 'جاري الإلغاء';
	l10nStrings.cancel   = 'إلغاء';
	l10nStrings.close    = 'إغلاق';
	l10nStrings.ok       = 'موافق';

	/* Errors. */
	l10nStrings.errorTitle              = 'خطأ';
	l10nStrings.errorToggle             = 'تبديل عرض واجهة الأخطاء';
	l10nStrings.errorNonexistentPassage = 'القطعة "{passage}" غير موجودة'; // NOTE: `passage` is supplied locally
	l10nStrings.errorSaveMissingData    = 'خاصية الحفظ لم تجد بعض البيانات. إما أن الملف المحمل ليس ملفاً خاصة بالحفظ أو أن الملف متضرر';
	l10nStrings.errorSaveIdMismatch     = 'ملف الحفظ من {identity} خاطئة';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = 'متصفحك إما يفتقر إلى أو تم تعطيل ';
	l10nStrings._warningOutroDegraded = ', لذا فهذه {identity} تعمل في وضع محدود. يمكنك المتابعة إلا أن بعض أجزاءها قد لا تعمل بشكل صحيح.';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} واجهة برمجة تطبيقات ويب للحفظ{_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} بعض الخصائص المطلوبة في {identity}{_warningOutroDegraded}';

	/* Debug bar. */
	l10nStrings.debugBarToggle      = 'تبديل عرض شريط استكشاف الأخطاء';
	l10nStrings.debugBarNoWatches   = '\u2014 لم يتم تحديد مراقبين \u2014';
	l10nStrings.debugBarAddWatch    = 'إضافة مراقب';
	l10nStrings.debugBarDeleteWatch = 'حذف مراقب';
	l10nStrings.debugBarWatchAll    = 'مراقبة الكل';
	l10nStrings.debugBarWatchNone   = 'حذف الكل';
	l10nStrings.debugBarLabelAdd    = 'إضافة';
	l10nStrings.debugBarLabelWatch  = 'مراقبة';
	l10nStrings.debugBarLabelTurn   = 'الدور'; // (noun) chance to act (in a game), moment, period
	l10nStrings.debugBarLabelViews  = 'الواجهات';
	l10nStrings.debugBarViewsToggle = 'تبديل عرض واجهات استكشاف الأخطاء';
	l10nStrings.debugBarWatchToggle = 'تبديل عرض لوحة المراقبة';

	/* UI bar. */
	l10nStrings.uiBarToggle   = 'تبديل عرض شريط الواجهة';
	l10nStrings.uiBarBackward = 'تراجع عبر تاريخ {identity}';
	l10nStrings.uiBarForward  = 'تقدم عبر تاريخ  {identity}';
	l10nStrings.uiBarJumpto   = 'قفز إلى نقطة معينة في تاريخ {identity}';

	/* Jump To. */
	l10nStrings.jumptoTitle       = 'قفز إلى';
	l10nStrings.jumptoTurn        = 'دور'; // (noun) chance to act (in a game), moment, period
	l10nStrings.jumptoUnavailable = 'لا توجد نقاط قفز متاحة حالياً\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = 'الحفظ';
	l10nStrings.savesDisallowed  = 'تم تعطيل خاصية الحفظ في هذه القطعة.';
	l10nStrings.savesIncapable   = '{_warningIntroLacking} يفتقر إلى إمكانيات مطلوبة لدعم عملية الحفظ، لذا تم تعطيلها في هذه الجلسة.';
	l10nStrings.savesLabelAuto   = 'الحفظ التلقائي';
	l10nStrings.savesLabelDelete = 'حذف';
	l10nStrings.savesLabelExport = 'حفظ إلى جهازك\u2026';
	l10nStrings.savesLabelImport = 'تحميل من جهازك\u2026';
	l10nStrings.savesLabelLoad   = 'تحميل';
	l10nStrings.savesLabelClear  = 'حذف الكل';
	l10nStrings.savesLabelSave   = 'حفظ';
	l10nStrings.savesLabelSlot   = 'حاوية';
	l10nStrings.savesUnavailable = 'لم يمكن العثور على حاويات حفظ\u2026';
	l10nStrings.savesUnknownDate = 'غير معروف';

	/* Settings. */
	l10nStrings.settingsTitle = 'الإعدادات';
	l10nStrings.settingsOff   = 'معطل';
	l10nStrings.settingsOn    = 'مفعل';
	l10nStrings.settingsReset = 'استرداد الافتراضيات';

	/* Restart. */
	l10nStrings.restartTitle  = 'إعادة تشغيل';
	l10nStrings.restartPrompt = 'هل ترغب حقاً في إعادة التشغيل من البداية؟ ستفقد أي تقدم حققته ولم تحفظه.';

	/* Share. */
	l10nStrings.shareTitle = 'مشاركة';

	/* Alert. */
	l10nStrings.alertTitle = 'تنبيه';

	/* Autoload. */
	l10nStrings.autoloadTitle  = 'تحميل تلقائي';
	l10nStrings.autoloadCancel = 'الذهاب للبداية';
	l10nStrings.autoloadOk     = 'تحميل من الحفظ التلقائي';
	l10nStrings.autoloadPrompt = 'تم العثور على حفظ تلقائي. هل ترغب في تحميله أم تريد الذهاب للبداية؟';

	/* Macros. */
	l10nStrings.macroBackText   = 'تراجع'; // (verb) rewind, revert
	l10nStrings.macroReturnText = 'عودة'; // (verb) go/send back
})();


code:
/***********************************************************************************************************************

	chs.js – 简体中文

	Localization by: Liyro Pen.

	Copyright © 2017 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = '游戏';
	l10nStrings.aborting = '终止';
	l10nStrings.cancel   = '取消';
	l10nStrings.close    = '关闭';
	l10nStrings.ok       = '确认';

	/* Errors. */
	l10nStrings.errorTitle              = '错误';
	l10nStrings.errorNonexistentPassage = '段落"{passage}"不存在';
	l10nStrings.errorSaveMissingData    = '存档缺少必须的数据，可能被读取的文件不是存档或者存档被损坏';
	l10nStrings.errorSaveIdMismatch     = '保存{identity}是错误的';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = '你的浏览器可能损坏或者被禁用';
	l10nStrings._warningOutroDegraded = '，所以{identity}在受限制模式中运行。你可以继续运行，但是一些内容可能不能正确工作。';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} Web Storage API {_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} {identity}需要的功能 {_warningOutroDegraded}';

	/* Debug View. */
	l10nStrings.debugViewTitle  = '调试模式';
	l10nStrings.debugViewToggle = '切换调试模式';

	/* UI bar. */
	l10nStrings.uiBarToggle   = '打开/关闭导航栏';
	l10nStrings.uiBarBackward = '后退';
	l10nStrings.uiBarForward  = '前进';
	l10nStrings.uiBarJumpto   = '跳到{identity}的历史记录中的某一点';

	/* Jump To. */
	l10nStrings.jumptoTitle       = '跳到';
	l10nStrings.jumptoTurn        = '转到';
	l10nStrings.jumptoUnavailable = '目前没有跳跃点\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = '存档';
	l10nStrings.savesDisallowed  = '在这个段落中不允许存档';
	l10nStrings.savesEmptySlot   = '\u2014 插槽空 \u2014';
	l10nStrings.savesIncapable   = '{_warningIntroLacking}支持存档所需的功能，因此本次游戏的存档功能已被禁用';
	l10nStrings.savesLabelAuto   = '自动存档';
	l10nStrings.savesLabelDelete = '删除';
	l10nStrings.savesLabelExport = '另存为\u2026';
	l10nStrings.savesLabelImport = '读取\u2026';
	l10nStrings.savesLabelLoad   = '读取';
	l10nStrings.savesLabelClear  = '全部删除';
	l10nStrings.savesLabelSave   = '保存';
	l10nStrings.savesLabelSlot   = '插槽';
	l10nStrings.savesSavedOn     = '保存在：';
	l10nStrings.savesUnavailable = '未找到存档插槽\u2026';
	l10nStrings.savesUnknownDate = '未知';

	/* Settings. */
	l10nStrings.settingsTitle = '设置';
	l10nStrings.settingsOff   = '关闭';
	l10nStrings.settingsOn    = '开启';
	l10nStrings.settingsReset = '重置为默认值';

	/* Restart. */
	l10nStrings.restartTitle  = '重新开始';
	l10nStrings.restartPrompt = '你确定要重新开始吗？未保存的进度将会丢失。';

	/* Share. */
	l10nStrings.shareTitle = '分享';

	/* Autoload. */
	l10nStrings.autoloadTitle  = '自动保存';
	l10nStrings.autoloadCancel = '前往最初的段落';
	l10nStrings.autoloadOk     = '读取自动存档';
	l10nStrings.autoloadPrompt = '有一个自动存档，读取它还是前往最初的段落？';

	/* Macros. */
	l10nStrings.macroBackText   = '返回';
	l10nStrings.macroReturnText = '返回';
})();


code:
/***********************************************************************************************************************

	de.js – Deutsch

	Localization by: Phil Strahl <phil@pixelprophecy.com>, Grausicht.

	Copyright © 2017–2021 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = 'spiel';
	l10nStrings.aborting = 'Vorzeitig abgebrochen';
	l10nStrings.cancel   = 'Abbrechen';
	l10nStrings.close    = 'Schließen';
	l10nStrings.ok       = 'OK';

	/* Errors. */
	l10nStrings.errorTitle              = 'Fehler';
	l10nStrings.errorToggle             = 'Fehleransicht umschalten';
	l10nStrings.errorNonexistentPassage = 'die Passage "{passage}" existiert nicht';
	l10nStrings.errorSaveMissingData    = 'Im Speicherstand fehlen benötigte Daten. Entweder ist die geladene Datei kein Speicherstand oder er ist defekt';
	l10nStrings.errorSaveIdMismatch     = 'Speicherstand ist vom falschen {identity}';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = 'Dein Browser kann folgendes nicht darstellen, oder es ist deaktiviert';
	l10nStrings._warningOutroDegraded = '; darum läuft dieses {identity} in einem heruntergesetzten Modus. Du kannst zwar fortfahren, aber manche Teile funktionieren vielleicht nicht richtig.';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} Das Web Storage API{_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} Manche Features die für dieses {identity} benötigt werden{_warningOutroDegraded}';

	/* Debug bar. */
	l10nStrings.debugBarToggle      = 'Fehlersuche-Leiste umschalten';
	l10nStrings.debugBarNoWatches   = '\u2014 kein Beobachtungswert aktiv \u2014';
	l10nStrings.debugBarAddWatch    = 'Beobachtungswert hinzufügen';
	l10nStrings.debugBarDeleteWatch = 'Beobachtungswert löschen';
	l10nStrings.debugBarWatchAll    = 'Alle beobachten';
	l10nStrings.debugBarWatchNone   = 'Alle löschen';
	l10nStrings.debugBarLabelAdd    = 'Hinzufügen';
	l10nStrings.debugBarLabelWatch  = 'Beobachten';
	l10nStrings.debugBarLabelTurn   = 'Zug';
	l10nStrings.debugBarLabelViews  = 'Ansichten';
	l10nStrings.debugBarViewsToggle = 'Fehlersuche-Ansichten umschalten';
	l10nStrings.debugBarWatchToggle = 'Beobachtungs-Feld umschalten';

	/* UI bar. */
	l10nStrings.uiBarToggle   = 'Menüleiste umschalten';
	l10nStrings.uiBarBackward = 'Einen Schritt im {identity}-Ablauf zurück';
	l10nStrings.uiBarForward  = 'Einen Schritt im {identity}-Ablauf nach vor';
	l10nStrings.uiBarJumpto   = 'Zu einem bestimmten Punkt im {identity}-Ablauf springen';

	/* Jump To. */
	l10nStrings.jumptoTitle       = 'Springe zu';
	l10nStrings.jumptoTurn        = 'Zug';
	l10nStrings.jumptoUnavailable = 'Keine Sprungmarken verfügbar\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = 'Speicherstände';
	l10nStrings.savesDisallowed  = 'Speichern ist in dieser Passage nicht erlaubt.';
	l10nStrings.savesIncapable   = '{_warningIntroLacking} Zum Speichern benötigte Features, darum ist es in dieser Sitzung nicht möglich, den Spielstand zu speichern.';
	l10nStrings.savesLabelAuto   = 'Auto-Speicherstand';
	l10nStrings.savesLabelDelete = 'Löschen';
	l10nStrings.savesLabelExport = 'Auf Datenträger speichern\u2026';
	l10nStrings.savesLabelImport = 'Von Datenträger laden\u2026';
	l10nStrings.savesLabelLoad   = 'Laden';
	l10nStrings.savesLabelClear  = 'Alle löschen';
	l10nStrings.savesLabelSave   = 'Speichern';
	l10nStrings.savesLabelSlot   = 'Slot';
	l10nStrings.savesUnavailable = 'Keine Speicherslots gefunden\u2026';
	l10nStrings.savesUnknownDate = 'unbekannt';

	/* Settings. */
	l10nStrings.settingsTitle = 'Einstellungen';
	l10nStrings.settingsOff   = 'Aus';
	l10nStrings.settingsOn    = 'Ein';
	l10nStrings.settingsReset = 'Auf Standardwerte zurücksetzen';

	/* Restart. */
	l10nStrings.restartTitle  = 'Neustart';
	l10nStrings.restartPrompt = 'Bist du sicher, dass du neu starten möchtest? Nicht gespeicherter Fortschritt ginge damit verloren.';

	/* Share. */
	l10nStrings.shareTitle = 'Teilen';

	/* Autoload. */
	l10nStrings.autoloadTitle  = 'Automatisches Laden';
	l10nStrings.autoloadCancel = 'Gehe zum Start';
	l10nStrings.autoloadOk     = 'Auto-Speicherstand laden';
	l10nStrings.autoloadPrompt = 'Ein Auto-Speicherstand existiert bereits. Laden oder zurück an den Start?';

	/* Macros. */
	l10nStrings.macroBackText   = 'Zurück';
	l10nStrings.macroReturnText = 'Zurückkehren';
})();


code:
/***********************************************************************************************************************

	es-ES.js – Español (Castellano)

	Localization by: Gerardo Galán.

	Copyright © 2020 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = 'juego';
	l10nStrings.aborting = 'Abortar';
	l10nStrings.cancel   = 'Cancelar';
	l10nStrings.close    = 'Cerrar';
	l10nStrings.ok       = 'OK';

	/* Errors. */
	l10nStrings.errorTitle              = 'Error';
	l10nStrings.errorToggle             = 'Cambiar la vista de error';
	l10nStrings.errorNonexistentPassage = 'el pasaje "{passage}" no existe'; // NOTE: `passage` is supplied locally
	l10nStrings.errorSaveMissingData    = 'La partida requiere datos no encontrados. O el archivo cargado no es una partida guardada o la partida guardada está corrupta';
	l10nStrings.errorSaveIdMismatch     = 'Partida errónea {identity}';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = 'Tu navegador carece o ha desactivado';
	l10nStrings._warningOutroDegraded = ', este {identity} está funcionando en un modo degradado. Puedes continuar, sin embargo, algunas partes pueden no funcionar correctamente';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} el Almacenamiento Web API{_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} algunas de las capacidades requeridas por este {identity}{_warningOutroDegraded}';

	/* Debug bar. */
	l10nStrings.debugBarToggle      = 'Alternar la barra de depuración';
	l10nStrings.debugBarNoWatches   = '\u2014 no hay observadores estabecidos \u2014';
	l10nStrings.debugBarAddWatch    = 'Añadir observador';
	l10nStrings.debugBarDeleteWatch = 'Borrar observador';
	l10nStrings.debugBarWatchAll    = 'Ver todo';
	l10nStrings.debugBarWatchNone   = 'Borrar todo';
	l10nStrings.debugBarLabelAdd    = 'Añadir';
	l10nStrings.debugBarLabelWatch  = 'Ver';
	l10nStrings.debugBarLabelTurn   = 'Girar'; // (noun) chance to act (in a game), moment, period
	l10nStrings.debugBarLabelViews  = 'Vistas';
	l10nStrings.debugBarViewsToggle = 'Alternar las vistas debug';
	l10nStrings.debugBarWatchToggle = 'Alternar el panel de observadores';

	/* UI bar. */
	l10nStrings.uiBarToggle   = 'Alternar la barra de UI';
	l10nStrings.uiBarBackward = 'Volver atrás en la historia del {identity}';
	l10nStrings.uiBarForward  = 'Avanzar en la historia del {identity}';
	l10nStrings.uiBarJumpto   = 'Saltar a un punto específico de la {identity} historia';

	/* Jump To. */
	l10nStrings.jumptoTitle       = 'Saltar A';
	l10nStrings.jumptoTurn        = 'Girar'; // (noun) chance to act (in a game), moment, period
	l10nStrings.jumptoUnavailable = 'No hay puntos de salto disponibles actualmente\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = 'Guardar';
	l10nStrings.savesDisallowed  = 'Guardar se ha deshabilitado en este pasaje.';
	l10nStrings.savesEmptySlot   = '\u2014 Guardado vacío \u2014';
	l10nStrings.savesIncapable   = '{_warningIntroLacking} las capacidades requeridas para proporcionar guardados, entonces los guardados han sido deshabilitados para esta sesión.';
	l10nStrings.savesLabelAuto   = 'Autoguardado';
	l10nStrings.savesLabelDelete = 'Borrar';
	l10nStrings.savesLabelExport = 'Guardar en Disco\u2026';
	l10nStrings.savesLabelImport = 'Cargar desde Disco\u2026';
	l10nStrings.savesLabelLoad   = 'Cargar';
	l10nStrings.savesLabelClear  = 'Borrar todo';
	l10nStrings.savesLabelSave   = 'Guardar';
	l10nStrings.savesLabelSlot   = 'Espacio';
	l10nStrings.savesSavedOn     = 'Guardado';
	l10nStrings.savesUnavailable = 'No se encontraron espacios de guardado\u2026';
	l10nStrings.savesUnknownDate = 'desconocido';

	/* Settings. */
	l10nStrings.settingsTitle = 'Ajustes';
	l10nStrings.settingsOff   = 'Off';
	l10nStrings.settingsOn    = 'On';
	l10nStrings.settingsReset = 'Usar predeterminados';

	/* Restart. */
	l10nStrings.restartTitle  = 'Reiniciar';
	l10nStrings.restartPrompt = '¿Estás seguro de que quieres reiniciar? Todo progreso no guardado caerá en el olvido.';

	/* Share. */
	l10nStrings.shareTitle = 'Compartir';

	/* Alert. */
	l10nStrings.alertTitle = 'Alerta';

	/* Autoload. */
	l10nStrings.autoloadTitle  = 'Autocargar';
	l10nStrings.autoloadCancel = 'Ir al Comienzo';
	l10nStrings.autoloadOk     = 'Cargar autoguardado';
	l10nStrings.autoloadPrompt = 'Un autoguardado existe ¿Cargarlo ahora o ir al comienzo?';

	/* Macros. */
	l10nStrings.macroBackText   = 'Atrás'; // (verb) rewind, revert
	l10nStrings.macroReturnText = 'Volver'; // (verb) go/send back
})();


code:
/***********************************************************************************************************************

	es-UNKNOWN.js – Español

	Localization by: Raúl Castellano.

	Copyright © 2018 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = 'juego';
	l10nStrings.aborting = 'Abortar';
	l10nStrings.cancel   = 'Cancelar';
	l10nStrings.close    = 'Cerrar';
	l10nStrings.ok       = 'OK';

	/* Errors. */
	l10nStrings.errorTitle              = 'Error';
	l10nStrings.errorToggle             = 'Cambiar la vista de error';
	l10nStrings.errorNonexistentPassage = 'el pasaje "{passage}" no existe';
	l10nStrings.errorSaveMissingData    = 'el guardado requiere datos no encontrados. O el archivo cargado no es un guardado o el guardado está corrupto';
	l10nStrings.errorSaveIdMismatch     = 'guardado erróneo {identity}';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = 'Tu navegador carece o ha desactivado';
	l10nStrings._warningOutroDegraded = ', esta {identity} está funcionando en un modo degradado. Puedes continuar, sin embargo, algunas partes pueden no funcionar correctamente';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} el Almacenamiento Web API{_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} algunas de las capacidades requeridas por esta {identity}{_warningOutroDegraded}';

	/* Debug bar. */
	l10nStrings.debugBarToggle      = 'Alternar la barra de depuración';
	l10nStrings.debugBarNoWatches   = '\u2014 no hay relojes estabecidos \u2014';
	l10nStrings.debugBarAddWatch    = 'Añadir reloj';
	l10nStrings.debugBarDeleteWatch = 'Borrar reloj';
	l10nStrings.debugBarWatchAll    = 'Ver todo';
	l10nStrings.debugBarWatchNone   = 'Borrar todo';
	l10nStrings.debugBarLabelAdd    = 'Añadir';
	l10nStrings.debugBarLabelWatch  = 'Ver';
	l10nStrings.debugBarLabelTurn   = 'Girar';
	l10nStrings.debugBarLabelViews  = 'Vistas';
	l10nStrings.debugBarViewsToggle = 'Alternar las vistas debug';
	l10nStrings.debugBarWatchToggle = 'Alternar el panel de reloj';

	/* UI bar. */
	l10nStrings.uiBarToggle   = 'Alternar la barra de UI';
	l10nStrings.uiBarBackward = 'Volver atrás en la {identity} historia';
	l10nStrings.uiBarForward  = 'Avanzar en la {identity} historia';
	l10nStrings.uiBarJumpto   = 'Saltar a un punto específico de la {identity} historia';

	/* Jump To. */
	l10nStrings.jumptoTitle       = 'Saltar A';
	l10nStrings.jumptoTurn        = 'Girar';
	l10nStrings.jumptoUnavailable = 'No hay puntos de salto actualmente disponibles\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = 'Guardados';
	l10nStrings.savesDisallowed  = 'Guardar ha sido deshabilitado en este pasaje.';
	l10nStrings.savesEmptySlot   = '\u2014 Guardado vacío \u2014';
	l10nStrings.savesIncapable   = '{_warningIntroLacking} las capacidades requeridas para proporcionar guardados, entonces los guardados han sido deshabilitados para esta sesión.';
	l10nStrings.savesLabelAuto   = 'Autoguardado';
	l10nStrings.savesLabelDelete = 'Borrar';
	l10nStrings.savesLabelExport = 'Guardar en Disco\u2026';
	l10nStrings.savesLabelImport = 'Cargar desde Disco\u2026';
	l10nStrings.savesLabelLoad   = 'Cargar';
	l10nStrings.savesLabelClear  = 'Borrar todo';
	l10nStrings.savesLabelSave   = 'Guardar';
	l10nStrings.savesLabelSlot   = 'Espacio';
	l10nStrings.savesSavedOn     = 'Guardado';
	l10nStrings.savesUnavailable = 'No es encontraron espacios de guardado\u2026';
	l10nStrings.savesUnknownDate = 'desconocido';

	/* Settings. */
	l10nStrings.settingsTitle = 'Ajustes';
	l10nStrings.settingsOff   = 'Off';
	l10nStrings.settingsOn    = 'On';
	l10nStrings.settingsReset = 'Usar predeterminados';

	/* Restart. */
	l10nStrings.restartTitle  = 'Reiniciar';
	l10nStrings.restartPrompt = '¿Estás seguro de que quieres reiniciar? Todo progreso no guardado caerá en el olvido.';

	/* Share. */
	l10nStrings.shareTitle = 'Compartir';

	/* Autoload. */
	l10nStrings.autoloadTitle  = 'Autocarga';
	l10nStrings.autoloadCancel = 'Ir al Comienzo';
	l10nStrings.autoloadOk     = 'Cargar autoguardado';
	l10nStrings.autoloadPrompt = 'Un autoguardado existe ¿Cargarlo ahora o ir al comienzo?';

	/* Macros. */
	l10nStrings.macroBackText   = 'Atrás';
	l10nStrings.macroReturnText = 'Volver';
})();


code:
/***********************************************************************************************************************

	fr.js – Français

	Localization by: Marc Cornette, Pierre Kessler.

	Copyright © 2017–2020 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
	Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.

	For more information about the guidelines used to create this localization, see:
		http://www.motoslave.net/sugarcube/2/docs/#guide-localization

***********************************************************************************************************************/
/* global l10nStrings */
/* eslint-disable strict */

(function () {
	/* General. */
	l10nStrings.identity = 'aventure';
	l10nStrings.aborting = 'Abandon';
	l10nStrings.cancel   = 'Annuler';
	l10nStrings.close    = 'Fermer';
	l10nStrings.ok       = 'OK';

	/* Errors. */
	l10nStrings.errorTitle              = 'Erreur';
	l10nStrings.errorToggle             = 'Afficher l\'erreur';
	l10nStrings.errorNonexistentPassage = 'le passage "{passage}" n\'existe pas';
	l10nStrings.errorSaveMissingData    = 'des éléments manquent dans cette sauvegarde. Soit ce fichier n\'en est pas une, soit il est corrompu';
	l10nStrings.errorSaveIdMismatch     = 'la sauvegarde ne semble pas provenir de cette {identity}';

	/* Warnings. */
	l10nStrings._warningIntroLacking  = 'Soit il manque à votre navigateur, soit il n\'autorise pas';
	l10nStrings._warningOutroDegraded = ', de ce fait l\'{identity} sera en mode dégradé. Cela n\'empechera le fonctionnement, mais vous risquez de rencontrer des erreurs.';
	l10nStrings.warningNoWebStorage   = '{_warningIntroLacking} l\'API de stockage de données{_warningOutroDegraded}';
	l10nStrings.warningDegraded       = '{_warningIntroLacking} certaines des fonctionnalités requises par l\'{identity}{_warningOutroDegraded}';

	/* Debug bar. */
	l10nStrings.debugBarToggle      = 'Afficher la barre de débogage';
	l10nStrings.debugBarNoWatches   = '\u2014 pas de surveillance active \u2014';
	l10nStrings.debugBarAddWatch    = 'Ajouter une surveillance';
	l10nStrings.debugBarDeleteWatch = 'Annuler une surveillance';
	l10nStrings.debugBarWatchAll    = 'Surveiller tout';
	l10nStrings.debugBarWatchNone   = 'Ne rien surveiller'; // if you want litteral : 'supprimer tout', but I think it's more what you want
	l10nStrings.debugBarLabelAdd    = 'Ajouter';
	l10nStrings.debugBarLabelWatch  = 'Surveillance';
	l10nStrings.debugBarLabelTurn   = 'Tournant';
	l10nStrings.debugBarLabelViews  = 'Vues';
	l10nStrings.debugBarViewsToggle = 'Basculer en mode débogage';
	l10nStrings.debugBarWatchToggle = 'Afficher la barre de surveillance';

	/* UI bar. */
	l10nStrings.uiBarToggle   = 'Afficher/cacher la barre d\'interface';
	l10nStrings.uiBarBackward = 'Revenir en arrière dans l\'histoire de l\'{identity}';
	l10nStrings.uiBarForward  = 'Avancer en arrière dans l\'histoire de l\'{identity}';
	l10nStrings.uiBarJumpto   = 'Aller à un point précis de l\'histoire de l\'{identity}';

	/* Jump To. */
	l10nStrings.jumptoTitle       = 'Aller à';
	l10nStrings.jumptoTurn        = 'Tournant';
	l10nStrings.jumptoUnavailable = 'Aucun point d\'arriver n\'est disponible\u2026';

	/* Saves. */
	l10nStrings.savesTitle       = 'Sauvegardes';
	l10nStrings.savesDisallowed  = 'Les sauvegardes sont désactivées pour ce passage.';
	l10nStrings.savesIncapable   = '{_warningIntroLacking} soit il n\'a pas la capacité pour prendre en charge les sauvegardes : elles seront désactivées pour cette session.';
	l10nStrings.savesLabelAuto   = 'Sauvegarde Auto';
	l10nStrings.savesLabelDelete = 'Effacer';
	l10nStrings.savesLabelExport = 'Enregistrer sur le disque\u2026';
	l10nStrings.savesLabelImport = 'Charger depuis le disque\u2026';
	l10nStrings.savesLabelLoad   = 'Charger';
	l10nStrings.savesLabelClear  = 'Effacer tout';
	l10nStrings.savesLabelSave   = 'Enregistrer';
	l10nStrings.savesLabelSlot   = 'Emplacement';
	l10nStrings.savesUnavailable = 'Aucun emplacement de sauvegarde n\'a été trouvé\u2026';
	l10nStrings.savesUnknownDate = 'inconnu';

	/* Settings. */
	l10nStrings.settingsTitle = 'Préférences';
	l10nStrings.settingsOff   = 'Off';
	l10nStrings.settingsOn    = 'On';
	l10nStrings.settingsReset = 'Réinitialiser';

	/* Restart. */
	l10nStrings.restartTitle  = 'Recommencer';
	l10nStrings.restartPrompt = 'Êtes vous sûr(e) de vouloir recommencer ? Tous progrès non sauvegardés seront perdus.';

	/* Share. */
	l10nStrings.shareTitle = 'Partager';

	/* Autoload. */
	l10nStrings.autoloadTitle  = 'Chargement Auto';
	l10nStrings.autoloadCancel = 'Aller au début';
	l10nStrings.autoloadOk     = 'Chargement d\'une sauvegarde automatique';
	l10nStrings.autoloadPrompt = 'Une sauvegarde automatique est disponible. La charger ou recommencer ?';

	/* Macros. */
	l10nStrings.macroBackText   = 'En arrière';
	l10nStrings.macroReturnText = 'Retour';
})();