narrat 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version: 1.3.0 - June 25, 2022 18:05:43
1
+ // Version: 1.3.1 - June 25, 2022 22:52:46
2
2
  import 'es6-promise/auto';
3
3
  import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, normalizeClass, createBlock, Transition, withCtx, renderSlot, createTextVNode, computed, resolveComponent, withDirectives, vModelText, toDisplayString, TransitionGroup, createVNode, createApp } from 'vue';
4
4
  import { defineStore, mapState, createPinia } from 'pinia';
@@ -30,7 +30,7 @@ function styleInject(css, ref) {
30
30
  }
31
31
  }
32
32
 
33
- var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n --quest-title-color: yellow;\n --completed-quest-title-color: grey;\n --objective-in-progress-color: white;\n --objective-completed-color: grey;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\r\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\r\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\r\nh2,\r\nh3,\r\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\r\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\r\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\r\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\r\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\r\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\r\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\r\n 0% {\r\n width: 0;\r\n }\r\n 100% {\r\n width: 100%;\r\n }\r\n}\r\n.strike-anim {\r\n position: relative;\r\n}\r\n.strike-anim::after {\r\n content: ' ';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background: var(--text-color);\r\n animation-name: strike-anim;\r\n animation-duration: 0.5s;\r\n animation-timing-function: linear;\r\n animation-iteration-count: 1;\r\n animation-fill-mode: forwards;\r\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\r\n";
33
+ var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n --quest-title-color: yellow;\n --completed-quest-title-color: grey;\n --objective-in-progress-color: white;\n --objective-completed-color: grey;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\r\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.disabled {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n\n.button.disabled {\n box-shadow: unset;\n color: grey;\n background: var(--border-color);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\r\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\r\nh2,\r\nh3,\r\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\r\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\r\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\r\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\r\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\r\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\r\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\r\n 0% {\r\n width: 0;\r\n }\r\n 100% {\r\n width: 100%;\r\n }\r\n}\r\n.strike-anim {\r\n position: relative;\r\n}\r\n.strike-anim::after {\r\n content: ' ';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background: var(--text-color);\r\n animation-name: strike-anim;\r\n animation-duration: 0.5s;\r\n animation-timing-function: linear;\r\n animation-iteration-count: 1;\r\n animation-fill-mode: forwards;\r\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\r\n";
34
34
  styleInject(css_248z);
35
35
 
36
36
  const f=ref([]),v=ref(null),m=ref(null),g=ref(null),h=reactive({current:""}),y=[],b=ref(!1),k=readonly(f),w=readonly(v),M=readonly(m),q=readonly(g),x=readonly(h),$=(e=w.value)=>{h.current=e;const t=k.value.findIndex((t=>t.name===e)),n=k.value.map((e=>e.name));for(let a=0;a<n.length;a++){if(a>0&&a<n.length-1){const e=n[a]+"Minus",r=n[a]+"Plus";h[e]=t<=a,h[r]=t>=a;}h[n[a]]=n[a]===e;}},V=(e=M.value)=>{h.orientation=e,h.isLandscape="landscape"===e,h.isPortrait="portrait"===e;},O=(e=q.value||"light")=>{h.theme=e,h.isDark="dark"===e,h.isLight="light"===e;};function j(e,t){if("undefined"==typeof window||!window.matchMedia)return !1;if("undefined"!=typeof window&&!window.matchMedia)return console.error("Vue3 Mq: No MatchMedia support detected in this browser. Responsive breakpoints not available."),!1;{b.value=!0;const n=window.matchMedia(e),a=({matches:e})=>{e&&t();};y.push({mql:n,cb:a});n.addEventListener&&"function"==typeof n.addEventListener?n.addEventListener("change",a):n.addListener(a),a(n);}}var L=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bootstrap5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},bootstrap4:{xs:0,sm:576,md:768,lg:992,xl:1200},bootstrap3:{xs:0,sm:768,md:992,lg:1200},vuetify:{xs:0,sm:600,md:960,lg:1264,xl:1904},tailwind:{xs:0,sm:640,md:768,lg:1024,xl:1280,xxl:1536},devices:{phone:0,tablet:768,laptop:1370,desktop:1906}});const T=e=>{if(!e||"object"!=typeof e)return !1;const t=[];for(let n in e){const a=parseFloat(e[n]);n&&"string"==typeof n?/^[^a-z]/i.test(n)||/[^a-zA-Z0-9_]/.test(n)?console.warn(`Vue3 Mq: "${n}" is an invalid breakpoint key. Breakpoint keys must start with a letter and contain only alphanumeric characters and underscores. Skipping.`):!a&&0!==a||isNaN(a)||a<0?console.warn(`Vue3 Mq: "${n}: ${e[n]}" is not a valid breakpoint. Breakpoints should be a number of zero or above. Skipping.`):t.push({name:n,min:a}):console.warn(`Vue3 Mq: Invalid or missing breakpoint key (${JSON.stringify(n)}). Skipping.`);}t.some((e=>0===e.min))||console.warn("Vue3 Mq: You have not declared a breakpoint with a minimum value of 0. There may be screen sizes to which Vue3Mq does not respond.");return new Set(t.map((e=>e.min))).size<t.length&&console.warn("Vue3 Mq: Your breakpoint configuration contains duplicate values. Behaviour may be unpredictable."),0!==t.length&&t.sort(((e,t)=>e.min-t.min))};function R({breakpoints:e,preset:t}){const n=(e=>{if("string"==typeof e&&L[e])return L[e];{const t=Object.keys(L);return console.error(`Vue3 Mq: "${e}" is not a valid preset. Available options are: ${t.join(", ")}`),!1}})(t),a=T(e);if(!1===n&&!a)throw new TypeError("Vue3 Mq: You must provide a valid preset, or valid breakpoint settings.");var r;r=a||T(n),f.value=r,function(){for(;y.length>0;){const e=y.shift();if(e&&"object"==typeof e){const{mql:t,cb:n}=e;t.addEventListener&&"function"==typeof t.addEventListener?t.removeEventListener("change",n):t.removeListener(n);}}}(),(()=>{const e=Object.keys(h);for(let t of e)delete h[t];$(),V(),O();})();const o=k.value.reduce(((e,t,n,a)=>{const r=`(min-width: ${t.min}px)`,o=n<a.length-1?`(max-width: ${a[n+1].min-1}px)`:null,i=r+(o?" and "+o:"");return Object.assign(e,{[t.name]:i})}),{});for(const i in o){j(o[i],(()=>{$(i);}));}["portrait","landscape"].forEach((e=>{j(`(orientation: ${e})`,(()=>{V(e);}));})),["light","dark"].forEach((e=>{j(`(prefers-color-scheme: ${e})`,(()=>{O(e);}));}));}var N={install:(e,{preset:t="bootstrap5",breakpoints:n,defaultBreakpoint:a,defaultOrientation:r="landscape",defaultTheme:o}={})=>{try{const l=!1===["landscape","portrait"].includes(s=r)?(console.error(`Vue3 Mq: "${s}" is not a valid default orientation. Reverting to unset value.`),null):s,u=((e=null)=>!1===["dark","light"].includes(e)&&null!==e?(console.error(`Vue3 Mq: "${e}" is not a valid default theme. Reverting to unset value.`),null):e)(o);i=a,v.value=i,(e=>{m.value=e;})(l),(e=>{g.value=e;})(u),e.provide("mq",x),e.provide("updateBreakpoints",R),R({breakpoints:n,preset:t});}catch(l){console.error(l);}var i,s;}};
@@ -98,6 +98,11 @@ const defaultConfig = {
98
98
  },
99
99
  hudStats: {},
100
100
  items: {},
101
+ interactionTags: {
102
+ default: {
103
+ onlyInteractOutsideOfScripts: true,
104
+ },
105
+ },
101
106
  quests: {},
102
107
  };
103
108
 
@@ -3588,15 +3593,18 @@ const useNotifications = defineStore('notifications', {
3588
3593
  const useInventory = defineStore('inventory', {
3589
3594
  state: () => ({
3590
3595
  items: {},
3596
+ interactionTags: {},
3591
3597
  }),
3592
3598
  actions: {
3593
3599
  generateSaveData() {
3594
3600
  return {
3595
3601
  items: this.items,
3602
+ interactionTags: this.interactionTags,
3596
3603
  };
3597
3604
  },
3598
3605
  loadSaveData(save) {
3599
3606
  this.items = { ...this.items, ...save.items };
3607
+ this.interactionTags = { ...save.interactionTags };
3600
3608
  },
3601
3609
  setupItems(items) {
3602
3610
  Object.keys(items).forEach((key) => {
@@ -3622,6 +3630,49 @@ const useInventory = defineStore('inventory', {
3622
3630
  }
3623
3631
  useNotifications().addNotification(`Received item: ${getItemConfig(item.id).name} x ${item.amount}`);
3624
3632
  },
3633
+ enableInteraction(tag) {
3634
+ if (!tag) {
3635
+ tag = 'default';
3636
+ }
3637
+ this.interactionTags[tag] = {
3638
+ blockedInteraction: false,
3639
+ };
3640
+ },
3641
+ disableInteraction(tag) {
3642
+ if (!tag) {
3643
+ tag = 'default';
3644
+ }
3645
+ this.interactionTags[tag] = {
3646
+ blockedInteraction: true,
3647
+ };
3648
+ },
3649
+ onScriptStart() {
3650
+ const tags = getConfig().interactionTags;
3651
+ Object.keys(tags).forEach((tag) => {
3652
+ const conf = tags[tag];
3653
+ if (conf.onlyInteractOutsideOfScripts) {
3654
+ this.disableInteraction(tag);
3655
+ }
3656
+ });
3657
+ },
3658
+ onScriptEnd() {
3659
+ const tags = getConfig().interactionTags;
3660
+ Object.keys(tags).forEach((tag) => {
3661
+ const conf = tags[tag];
3662
+ if (conf.onlyInteractOutsideOfScripts) {
3663
+ this.enableInteraction(tag);
3664
+ }
3665
+ });
3666
+ },
3667
+ isInteractionTagBlocked(tag) {
3668
+ if (!tag) {
3669
+ tag = 'default';
3670
+ }
3671
+ if (this.interactionTags[tag]) {
3672
+ return this.interactionTags[tag].blockedInteraction;
3673
+ }
3674
+ return false;
3675
+ },
3625
3676
  remove(item) {
3626
3677
  const existingItem = this.getExistingItem(item.id);
3627
3678
  if (existingItem) {
@@ -4326,6 +4377,7 @@ const useVM = defineStore('vm', {
4326
4377
  newStack.label = this.currentStack.label;
4327
4378
  }
4328
4379
  this.stack.push(newStack);
4380
+ return this.runLine();
4329
4381
  },
4330
4382
  async nextLine() {
4331
4383
  if (this.stack.length === 0) {
@@ -4353,6 +4405,7 @@ const useVM = defineStore('vm', {
4353
4405
  this.stack.splice(this.stack.length - 1, 1);
4354
4406
  },
4355
4407
  finishGame() {
4408
+ useInventory().onScriptEnd();
4356
4409
  const mainStore = useMain();
4357
4410
  if (mainStore.options.debug) {
4358
4411
  const dialogStore = useDialogStore();
@@ -4364,9 +4417,13 @@ const useVM = defineStore('vm', {
4364
4417
  },
4365
4418
  async runLine() {
4366
4419
  const cmd = this.currentLine;
4420
+ useInventory().onScriptStart();
4367
4421
  await runCommand(cmd);
4368
4422
  },
4369
- async runLabelFunction(label) {
4423
+ async runLabelFunction(label, comeBackToSameLine) {
4424
+ if (comeBackToSameLine) {
4425
+ this.currentStack.currentIndex--;
4426
+ }
4370
4427
  const branch = this.script[label];
4371
4428
  if (!branch) {
4372
4429
  console.error(`Label ${branch} doesn't exist`);
@@ -4376,8 +4433,7 @@ const useVM = defineStore('vm', {
4376
4433
  branch: branch,
4377
4434
  label,
4378
4435
  };
4379
- this.addStack(stack);
4380
- await this.runLine();
4436
+ await this.addStack(stack);
4381
4437
  },
4382
4438
  runLabel(label) {
4383
4439
  const branch = this.script[label];
@@ -4452,6 +4508,11 @@ const useDialogStore = defineStore('dialog', {
4452
4508
  this.dialog = [];
4453
4509
  },
4454
4510
  },
4511
+ getters: {
4512
+ currentDialog() {
4513
+ return this.dialog[this.dialog.length - 1];
4514
+ },
4515
+ },
4455
4516
  });
4456
4517
 
4457
4518
  // Create a pinia store named hud with a state using the type HudState, and save type HudSave, with actions:
@@ -4762,8 +4823,7 @@ async function playerAnswered(choiceIndex) {
4762
4823
  branch: newBranch,
4763
4824
  };
4764
4825
  const vmStore = useVM();
4765
- vmStore.addStack(newStack);
4766
- vmStore.runLine();
4826
+ return vmStore.addStack(newStack);
4767
4827
  }
4768
4828
  else {
4769
4829
  vmStore.nextLine();
@@ -4908,7 +4968,12 @@ const useMain = defineStore('main', {
4908
4968
  this.modal = false;
4909
4969
  },
4910
4970
  toggleMenu() {
4911
- this.flowState = this.flowState === 'menu' ? 'playing' : 'menu';
4971
+ if (this.modal) {
4972
+ this.modal = false;
4973
+ }
4974
+ else {
4975
+ this.modal = 'menu';
4976
+ }
4912
4977
  },
4913
4978
  pause() {
4914
4979
  this.paused = true;
@@ -7970,7 +8035,9 @@ var script$9 = defineComponent({
7970
8035
  Modal: script$2,
7971
8036
  VolumeControls: script$4,
7972
8037
  },
7973
- props: {},
8038
+ props: {
8039
+ close: Function,
8040
+ },
7974
8041
  data() { },
7975
8042
  mounted() { },
7976
8043
  methods: {
@@ -7978,9 +8045,6 @@ var script$9 = defineComponent({
7978
8045
  window.close();
7979
8046
  // quit
7980
8047
  },
7981
- close() {
7982
- this.$emit('close');
7983
- },
7984
8048
  mainMenu() {
7985
8049
  useMain().menuReturn();
7986
8050
  this.close();
@@ -8044,7 +8108,7 @@ var script$a = defineComponent({
8044
8108
  VolumeControls: script$4,
8045
8109
  },
8046
8110
  props: {
8047
- close: (() => { }),
8111
+ close: Function,
8048
8112
  },
8049
8113
  data() {
8050
8114
  return {
@@ -8095,20 +8159,17 @@ var script$a = defineComponent({
8095
8159
  });
8096
8160
 
8097
8161
  const _hoisted_1$9 = /*#__PURE__*/createElementVNode("h3", { class: "title" }, "Skills", -1);
8098
- const _hoisted_2$7 = { class: "menu-content" };
8099
- const _hoisted_3$4 = {
8162
+ const _hoisted_2$7 = {
8100
8163
  key: 0,
8101
8164
  class: "skills-container"
8102
8165
  };
8103
- const _hoisted_4$3 = ["onClick"];
8104
- const _hoisted_5$3 = { class: "skill-title" };
8105
- const _hoisted_6$3 = { class: "skill-xp-container" };
8106
- const _hoisted_7$2 = { class: "skill-xp-text" };
8107
- const _hoisted_8$1 = { class: "skill-level" };
8108
- const _hoisted_9$1 = {
8109
- key: 1,
8110
- class: "flex flex-row skill-description-container"
8111
- };
8166
+ const _hoisted_3$4 = ["onClick"];
8167
+ const _hoisted_4$3 = { class: "skill-title" };
8168
+ const _hoisted_5$3 = { class: "skill-xp-container" };
8169
+ const _hoisted_6$3 = { class: "skill-xp-text" };
8170
+ const _hoisted_7$2 = { class: "skill-level" };
8171
+ const _hoisted_8$1 = { key: 1 };
8172
+ const _hoisted_9$1 = { class: "flex flex-row skill-description-container" };
8112
8173
  const _hoisted_10$1 = { class: "flex skill-left" };
8113
8174
  const _hoisted_11$1 = { class: "flex skill-right" };
8114
8175
  const _hoisted_12$1 = /*#__PURE__*/createElementVNode("hr", { class: "hr-solid" }, null, -1);
@@ -8125,35 +8186,31 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
8125
8186
  _hoisted_1$9
8126
8187
  ]),
8127
8188
  body: withCtx(() => [
8128
- createElementVNode("div", _hoisted_2$7, [
8129
- (!_ctx.chosenSkill)
8130
- ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
8131
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skillsToDisplay, (skill, key) => {
8132
- return (openBlock(), createElementBlock("button", {
8133
- onClick: () => _ctx.clickSkill(key),
8134
- class: "skill-display",
8135
- style: normalizeStyle(_ctx.getSkillStyle(key)),
8136
- key: key
8137
- }, [
8138
- createElementVNode("h3", _hoisted_5$3, toDisplayString(_ctx.getSkillName(key)), 1),
8139
- createElementVNode("div", _hoisted_6$3, [
8140
- createElementVNode("div", {
8141
- class: "skill-xp-bar",
8142
- style: normalizeStyle(_ctx.xpBarWidth(skill.xp))
8143
- }, null, 4),
8144
- createElementVNode("h3", _hoisted_7$2, toDisplayString(skill.xp) + " / " + toDisplayString(_ctx.xpPerLevel) + " XP ", 1)
8145
- ]),
8146
- createElementVNode("h3", _hoisted_8$1, toDisplayString(skill.level), 1)
8147
- ], 12, _hoisted_4$3))
8148
- }), 128))
8149
- ]))
8150
- : (typeof _ctx.chosenSkill === 'string')
8151
- ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
8189
+ (!_ctx.chosenSkill)
8190
+ ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
8191
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skillsToDisplay, (skill, key) => {
8192
+ return (openBlock(), createElementBlock("button", {
8193
+ onClick: () => _ctx.clickSkill(key),
8194
+ class: "skill-display",
8195
+ style: normalizeStyle(_ctx.getSkillStyle(key)),
8196
+ key: key
8197
+ }, [
8198
+ createElementVNode("h3", _hoisted_4$3, toDisplayString(_ctx.getSkillName(key)), 1),
8199
+ createElementVNode("div", _hoisted_5$3, [
8200
+ createElementVNode("div", {
8201
+ class: "skill-xp-bar",
8202
+ style: normalizeStyle(_ctx.xpBarWidth(skill.xp))
8203
+ }, null, 4),
8204
+ createElementVNode("h3", _hoisted_6$3, toDisplayString(skill.xp) + " / " + toDisplayString(_ctx.xpPerLevel) + " XP", 1)
8205
+ ]),
8206
+ createElementVNode("h3", _hoisted_7$2, toDisplayString(skill.level), 1)
8207
+ ], 12, _hoisted_3$4))
8208
+ }), 128))
8209
+ ]))
8210
+ : (typeof _ctx.chosenSkill === 'string')
8211
+ ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
8212
+ createElementVNode("div", _hoisted_9$1, [
8152
8213
  createElementVNode("div", _hoisted_10$1, [
8153
- createElementVNode("button", {
8154
- class: "button",
8155
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeSkill && _ctx.closeSkill(...args)))
8156
- }, "Back"),
8157
8214
  createElementVNode("div", {
8158
8215
  class: "skill-display",
8159
8216
  style: normalizeStyle(_ctx.getSkillStyle(_ctx.chosenSkill))
@@ -8165,15 +8222,19 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
8165
8222
  createElementVNode("h3", null, "Level: " + toDisplayString(_ctx.skills[_ctx.chosenSkill].level), 1),
8166
8223
  createElementVNode("p", null, toDisplayString(_ctx.skillConf[_ctx.chosenSkill].description), 1)
8167
8224
  ])
8168
- ]))
8169
- : createCommentVNode("", true)
8170
- ])
8225
+ ]),
8226
+ createElementVNode("button", {
8227
+ class: "button",
8228
+ onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeSkill && _ctx.closeSkill(...args)))
8229
+ }, toDisplayString('<--'))
8230
+ ]))
8231
+ : createCommentVNode("", true)
8171
8232
  ]),
8172
8233
  _: 1
8173
8234
  }, 8, ["onClose"]))
8174
8235
  }
8175
8236
 
8176
- var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.skill-left {\n flex-direction: column;\n}\n\n.skill-right {\n flex-direction: column;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\r\n";
8237
+ var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: stretch;\n}\n\n.skill-left {\n flex-direction: column;\n border: 1px dashed white;\n padding: 10px;\n justify-content: center;\n}\n\n.skill-right {\n border: 1px dashed white;\n flex-direction: column;\n align-items: baseline;\n flex-grow: 2;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\r\n";
8177
8238
  styleInject(css_248z$b);
8178
8239
 
8179
8240
  script$a.render = render$a;
@@ -8181,14 +8242,16 @@ script$a.render = render$a;
8181
8242
  var script$b = defineComponent({
8182
8243
  setup() {
8183
8244
  const store = useInventory();
8245
+ const dialogStore = useDialogStore();
8184
8246
  const items = computed(() => store.items);
8185
- return { items };
8247
+ const currentlyChoosing = computed(() => dialogStore.currentDialog.choices);
8248
+ return { items, currentlyChoosing };
8186
8249
  },
8187
8250
  components: {
8188
8251
  Modal: script$2,
8189
8252
  },
8190
8253
  props: {
8191
- close: (() => { }),
8254
+ close: Function,
8192
8255
  },
8193
8256
  data() {
8194
8257
  return {
@@ -8205,12 +8268,40 @@ var script$b = defineComponent({
8205
8268
  getItemName(item) {
8206
8269
  return this.itemConf[item].name;
8207
8270
  },
8271
+ getItemConf(item) {
8272
+ return this.itemConf[item];
8273
+ },
8208
8274
  clickItem(item) {
8209
8275
  this.chosenId = item;
8210
8276
  },
8211
8277
  closeItem() {
8212
8278
  this.chosenId = false;
8213
8279
  },
8280
+ useItem() {
8281
+ if (this.canUseChosenItem) {
8282
+ const onUse = this.chosenItemConf.onUse;
8283
+ this.close();
8284
+ if (onUse.action === 'jump') {
8285
+ useVM().runLabel(onUse.label);
8286
+ }
8287
+ else if (onUse.action === 'run_label') {
8288
+ useVM().runLabelFunction(onUse.label, true);
8289
+ }
8290
+ else {
8291
+ error(`Unknown action ${onUse.action}`);
8292
+ }
8293
+ }
8294
+ },
8295
+ canUseItem(item) {
8296
+ const conf = this.itemConf[item.id];
8297
+ if (conf &&
8298
+ conf.onUse &&
8299
+ !useInventory().isInteractionTagBlocked(conf.tag) &&
8300
+ !this.currentlyChoosing) {
8301
+ return true;
8302
+ }
8303
+ return false;
8304
+ },
8214
8305
  },
8215
8306
  computed: {
8216
8307
  itemsToDisplay() {
@@ -8228,6 +8319,9 @@ var script$b = defineComponent({
8228
8319
  }
8229
8320
  return null;
8230
8321
  },
8322
+ canUseChosenItem() {
8323
+ return this.canUseItem(this.chosenItem);
8324
+ },
8231
8325
  chosenItemConf() {
8232
8326
  if (this.chosenId) {
8233
8327
  return this.itemConf[this.chosenId];
@@ -8241,18 +8335,15 @@ var script$b = defineComponent({
8241
8335
  });
8242
8336
 
8243
8337
  const _hoisted_1$a = /*#__PURE__*/createElementVNode("h3", { class: "title" }, "Inventory", -1);
8244
- const _hoisted_2$8 = { class: "menu-content" };
8245
- const _hoisted_3$5 = {
8338
+ const _hoisted_2$8 = {
8246
8339
  key: 0,
8247
8340
  class: "inventory-container"
8248
8341
  };
8249
- const _hoisted_4$4 = ["onClick"];
8250
- const _hoisted_5$4 = { class: "item-title" };
8251
- const _hoisted_6$4 = { class: "item-amount" };
8252
- const _hoisted_7$3 = {
8253
- key: 1,
8254
- class: "flex flex-row item-description-container"
8255
- };
8342
+ const _hoisted_3$5 = ["onClick"];
8343
+ const _hoisted_4$4 = { class: "item-title" };
8344
+ const _hoisted_5$4 = { class: "item-amount" };
8345
+ const _hoisted_6$4 = { key: 1 };
8346
+ const _hoisted_7$3 = { class: "flex flex-row item-description-container" };
8256
8347
  const _hoisted_8$2 = { class: "flex item-left" };
8257
8348
  const _hoisted_9$2 = { class: "flex item-right" };
8258
8349
  const _hoisted_10$2 = /*#__PURE__*/createElementVNode("hr", { class: "hr-solid" }, null, -1);
@@ -8274,28 +8365,24 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
8274
8365
  _hoisted_1$a
8275
8366
  ]),
8276
8367
  body: withCtx(() => [
8277
- createElementVNode("div", _hoisted_2$8, [
8278
- (!_ctx.chosenItem && Object.keys(_ctx.itemsToDisplay).length > 0)
8279
- ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
8280
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.itemsToDisplay, (item) => {
8281
- return (openBlock(), createElementBlock("button", {
8282
- onClick: () => _ctx.clickItem(item.id),
8283
- class: "item-display",
8284
- style: normalizeStyle(_ctx.getItemStyle(item.id)),
8285
- key: item.id
8286
- }, [
8287
- createElementVNode("h3", _hoisted_5$4, toDisplayString(_ctx.getItemName(item.id)), 1),
8288
- createElementVNode("h3", _hoisted_6$4, toDisplayString(item.amount), 1)
8289
- ], 12, _hoisted_4$4))
8290
- }), 128))
8291
- ]))
8292
- : (typeof _ctx.chosenId === 'string')
8293
- ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
8368
+ (!_ctx.chosenItem && Object.keys(_ctx.itemsToDisplay).length > 0)
8369
+ ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
8370
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.itemsToDisplay, (item) => {
8371
+ return (openBlock(), createElementBlock("button", {
8372
+ onClick: () => _ctx.clickItem(item.id),
8373
+ class: "item-display",
8374
+ style: normalizeStyle(_ctx.getItemStyle(item.id)),
8375
+ key: item.id
8376
+ }, [
8377
+ createElementVNode("h3", _hoisted_4$4, toDisplayString(_ctx.getItemName(item.id)), 1),
8378
+ createElementVNode("h3", _hoisted_5$4, toDisplayString(item.amount), 1)
8379
+ ], 12, _hoisted_3$5))
8380
+ }), 128))
8381
+ ]))
8382
+ : (typeof _ctx.chosenId === 'string')
8383
+ ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
8384
+ createElementVNode("div", _hoisted_7$3, [
8294
8385
  createElementVNode("div", _hoisted_8$2, [
8295
- createElementVNode("button", {
8296
- class: "button",
8297
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeItem && _ctx.closeItem(...args)))
8298
- }, "Back"),
8299
8386
  createElementVNode("div", {
8300
8387
  class: "item-display",
8301
8388
  style: normalizeStyle(_ctx.getItemStyle(_ctx.chosenId))
@@ -8305,17 +8392,25 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
8305
8392
  createElementVNode("h2", null, toDisplayString(_ctx.getItemName(_ctx.chosenId)), 1),
8306
8393
  _hoisted_10$2,
8307
8394
  createElementVNode("h3", null, "Amount: " + toDisplayString(_ctx.chosenItem.amount), 1),
8308
- createElementVNode("p", null, toDisplayString(_ctx.chosenItemConf.description), 1)
8395
+ createElementVNode("p", null, toDisplayString(_ctx.chosenItemConf.description), 1),
8396
+ createElementVNode("button", {
8397
+ onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.useItem && _ctx.useItem(...args))),
8398
+ class: normalizeClass(["button", _ctx.canUseChosenItem ? '' : 'disabled'])
8399
+ }, " Use ", 2)
8309
8400
  ])
8310
- ]))
8311
- : (openBlock(), createElementBlock("div", _hoisted_11$2, _hoisted_13$1))
8312
- ])
8401
+ ]),
8402
+ createElementVNode("button", {
8403
+ class: "button",
8404
+ onClick: _cache[1] || (_cache[1] = (...args) => (_ctx.closeItem && _ctx.closeItem(...args)))
8405
+ }, toDisplayString('<--'))
8406
+ ]))
8407
+ : (openBlock(), createElementBlock("div", _hoisted_11$2, _hoisted_13$1))
8313
8408
  ]),
8314
8409
  _: 1
8315
8410
  }, 8, ["onClose"]))
8316
8411
  }
8317
8412
 
8318
- var css_248z$c = ".inventory-modal {\n width: 800px;\n min-height: 50%;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.item-left {\n flex-direction: column;\n}\n\n.item-right {\n flex-direction: column;\n align-items: baseline;\n}\r\n";
8413
+ var css_248z$c = ".inventory-modal {\n width: 800px;\n min-height: 50%;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items: stretch;\n}\n\n.item-left {\n border: 1px dashed white;\n flex-direction: column;\n padding: 10px;\n justify-content: center;\n}\n\n.item-right {\n border: 1px dashed white;\n flex-direction: column;\n flex-grow: 2;\n align-items: baseline;\n padding: 10px;\n}\r\n";
8319
8414
  styleInject(css_248z$c);
8320
8415
 
8321
8416
  script$b.render = render$b;
@@ -8332,7 +8427,7 @@ var script$c = defineComponent({
8332
8427
  },
8333
8428
  },
8334
8429
  props: {
8335
- close: (() => { }),
8430
+ close: Function,
8336
8431
  },
8337
8432
  methods: {
8338
8433
  getQuestData(questId) {
@@ -8789,26 +8884,26 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
8789
8884
  (_ctx.modal === 'skills')
8790
8885
  ? (openBlock(), createBlock(_component_Skills, {
8791
8886
  key: 0,
8792
- onClose: _ctx.closeModal
8793
- }, null, 8, ["onClose"]))
8887
+ close: _ctx.closeModal
8888
+ }, null, 8, ["close"]))
8794
8889
  : createCommentVNode("", true),
8795
8890
  (_ctx.modal === 'inventory')
8796
8891
  ? (openBlock(), createBlock(_component_Inventory, {
8797
8892
  key: 1,
8798
- onClose: _ctx.closeModal
8799
- }, null, 8, ["onClose"]))
8893
+ close: _ctx.closeModal
8894
+ }, null, 8, ["close"]))
8800
8895
  : createCommentVNode("", true),
8801
8896
  (_ctx.modal === 'quests')
8802
8897
  ? (openBlock(), createBlock(_component_Quests, {
8803
8898
  key: 2,
8804
- onClose: _ctx.closeModal
8805
- }, null, 8, ["onClose"]))
8899
+ close: _ctx.closeModal
8900
+ }, null, 8, ["close"]))
8806
8901
  : createCommentVNode("", true),
8807
8902
  (_ctx.modal === 'menu')
8808
8903
  ? (openBlock(), createBlock(_component_MainMenu, {
8809
8904
  key: 3,
8810
- onClose: _ctx.closeModal
8811
- }, null, 8, ["onClose"]))
8905
+ close: _ctx.closeModal
8906
+ }, null, 8, ["close"]))
8812
8907
  : createCommentVNode("", true),
8813
8908
  createVNode(Transition, { name: "fade" }, {
8814
8909
  default: withCtx(() => [
@@ -9182,8 +9277,7 @@ const ifFunction = async (cmd) => {
9182
9277
  branch: newBranch,
9183
9278
  currentIndex: 0,
9184
9279
  };
9185
- vmStore.addStack(newStack);
9186
- return vmStore.runLine();
9280
+ return vmStore.addStack(newStack);
9187
9281
  }
9188
9282
  return vmStore.nextLine();
9189
9283
  };
@@ -9408,8 +9502,7 @@ const addItemPlugin = new CommandPlugin('add_item', async (cmd) => {
9408
9502
  amount,
9409
9503
  });
9410
9504
  return useVM().nextLine();
9411
- }, generateParser('add_item'));
9412
-
9505
+ }, generateParser('add_item'));
9413
9506
  // Write a CommandPlugin for removeing items to the inventory store
9414
9507
  const removeItemPlugin = new CommandPlugin('remove_item', async (cmd) => {
9415
9508
  const id = cmd.args[0];
@@ -9420,7 +9513,21 @@ const removeItemPlugin = new CommandPlugin('remove_item', async (cmd) => {
9420
9513
  amount,
9421
9514
  });
9422
9515
  return useVM().nextLine();
9423
- }, generateParser('remove_item'));
9516
+ }, generateParser('remove_item'));
9517
+ // Write a CommandPlugin for enabling an interactiongTag in the inventory store
9518
+ const enableInteractionPlugin = new CommandPlugin('enable_interaction', async (cmd) => {
9519
+ const tag = cmd.args[0];
9520
+ const inventory = useInventory();
9521
+ inventory.enableInteraction(tag);
9522
+ return useVM().nextLine();
9523
+ }, generateParser('enable_interaction'));
9524
+ // Write a CommandPlugin for disabling an interactiongTag in the inventory store
9525
+ const disableInteractionPlugin = new CommandPlugin('disable_interaction', async (cmd) => {
9526
+ const tag = cmd.args[0];
9527
+ const inventory = useInventory();
9528
+ inventory.disableInteraction(tag);
9529
+ return useVM().nextLine();
9530
+ }, generateParser('disable_interaction'));
9424
9531
 
9425
9532
  // Write a CommandPlugin for starting a quest with the useQuests quests store
9426
9533
  const startQuestPlugin = new CommandPlugin('start_quest', async (cmd) => {
@@ -9467,7 +9574,6 @@ const runLabelPlugin = new CommandPlugin('run_label', async (cmd) => {
9467
9574
  }, generateParser('run_label'));
9468
9575
 
9469
9576
  function registerBaseCommands(vm) {
9470
- vm.addCommand(addItemPlugin);
9471
9577
  vm.addCommand(addLevelPlugin);
9472
9578
  vm.addCommand(addStatPlugin);
9473
9579
  vm.addCommand(addXpPlugin);
@@ -9479,7 +9585,6 @@ function registerBaseCommands(vm) {
9479
9585
  vm.addCommand(notifyPlugin);
9480
9586
  vm.addCommand(pauseCommand);
9481
9587
  vm.addCommand(playCommand);
9482
- vm.addCommand(removeItemPlugin);
9483
9588
  vm.addCommand(setButtonCommand);
9484
9589
  vm.addCommand(setScreenCommand);
9485
9590
  vm.addCommand(setStatCommand);
@@ -9496,6 +9601,11 @@ function registerBaseCommands(vm) {
9496
9601
  vm.addCommand(startObjectivePlugin);
9497
9602
  vm.addCommand(completeObjectivePlugin);
9498
9603
  vm.addCommand(completeQuestPlugin);
9604
+ // Inventory
9605
+ vm.addCommand(addItemPlugin);
9606
+ vm.addCommand(removeItemPlugin);
9607
+ vm.addCommand(enableInteractionPlugin);
9608
+ vm.addCommand(disableInteractionPlugin);
9499
9609
  }
9500
9610
 
9501
9611
  class NarratPlugin {
@@ -9538,7 +9648,7 @@ async function startApp(config, options) {
9538
9648
  });
9539
9649
  registerBaseCommands(vm);
9540
9650
  logManager.setupDebugger(options.debug);
9541
- console.log('%c Narrat game engine – 1.3.0 - June 25, 2022 18:05:43', 'background: #222; color: #bada55');
9651
+ console.log('%c Narrat game engine – 1.3.1 - June 25, 2022 22:52:46', 'background: #222; color: #bada55');
9542
9652
  vm.callHook('onNarratSetup');
9543
9653
  app.mount('#game-holder');
9544
9654
  if (options.debug) {