It has been three weeks since this whole fucking mess started. In that time you've had to do plenty of unsavory things just to stay alive. This time though... you fucked up. you were scavenging for food in the gas station about 4 blocks from the ramshackle apartment you've called home for the past week. Someone got the jump on you as you were to hungry to notice that someone else was in the store with you, that is until you felt that someone hit you in the back of the head with something. But now it's time to head home, before it gets too dark as that is a death sentence.

exit out the front

exit out the back

The hoard closes in on you and you have no escape. It's mere seconds before they are on you, tearing into you with their rotten maw's. you feel every second of it as they devour you, the adrenaline preventing you from passing out. you're body is in shambles when you finally start to lose consciousness. but there is one thing present in the back of your mind.

you burst into the alley way behind the gas station and it's relatively quiet considering what has been going on the past three weeks. Just as your starting to enjoy the little piece of mind BANG!!! You hear a loud gun shot come from the alley that is just a little ways away from you. Your sure that this will attract all the unwanted attention you need so you

head towards the front of the gas station

Head towards the gunshot

You stumble onto the sidewalk in front of the gas station and the smell hits you before the sound does. About Thirty feet to your left you see a hoard of the things just absolutely eviscerating what you assume was a family. No one has wanted to call them Zombies but three weeks ago that's exactly what everyone would have called them, you guess naming the things would make it a little too real for most people.

One looks up from it's meal and notices you, and it starts to shamble it's rotting corpse towards you as the rest of the hoard follows you...

head to the back of the alley

run for your apartment

you burst into the alley way behind the gas station and it's relatively quiet considering what has been going on the past three weeks. Just as your starting to enjoy the little piece of mind BANG!!! You hear a loud gun shot come from the alley that is just a little ways away from you. Your sure that this will attract all the unwanted attention you need so you

head towards the gunshot

You stumble onto the sidewalk in front of the gas station and the smell hits you before the sound does. About Thirty feet to your left you see a hoard of the things just absolutely eviscerating what you assume was a family. No one has wanted to call them Zombies but three weeks ago that's exactly what everyone would have called them, you guess naming the things would make it a little too real for most people.

One looks up from it's meal and notices you, and it starts to shamble it's rotting corpse towards you as the rest of the hoard follows you...

run for your apartment

you run for towards the sound of the gunshot, it's only about half a block away at best. When you arrive you see why it was just the one gunshot. lying in the middle of the hoard is a man, unmoving and making no sound. Your sure he probably took the easy way out, you can't blame him really it has to be better than being eaten alive. As you are thinking the hoard notices you and starts to shamble towards you. As you turn the corner to make a break for it your eyes are met with a wall of flesh.

end

You head for your apartment and make it about a block before you turn the corner and see a wall of corpses shambling your way. You go to turn back the way you came but the same sight lies before your eyes

end

you run for towards the sound of the gunshot, it's only about half a block away at best. When you arrive you see why it was just the one gunshot. lying in the middle of the hoard is a man, unmoving and making no sound. Your sure he probably took the easy way out, you can't blame him really it has to be better than being eaten alive. As you are thinking the hoard notices you and starts to shamble towards you. As you turn the corner to make a break for it your eyes are met with a wall of flesh.

end

function e(t,r){Array.call(this),r&&Object.defineProperty(this,'delimiter',{writable:!0,value:r}),Object.defineProperty(this,'length',{writable:!0,value:0}),i(this,t,this.delimiter||n)}(exports.array=e).prototype=Object.create(Array.prototype);var n='.';function t(t,r){Object.defineProperty(e.prototype,t,{enumerable:!1,writable:!0,value:r})}function i(t,r,e){if(r){for(var n='',i=!1,o=!1,a=0;a<r.length;a++){var l=r.charAt(a);i?(n+=l,i=!(o=!0)):'~'==l?i=!0:l==e?(t.push(n),n=''):(o=!0,n+=l)}o&&t.push(n)}return t}e.parse=function(t,r){return i([],t,r||n)},e.stringify=function(t,r){return e.prototype.toString.call(t,r)},t('toString',function(r){r=r||this.delimiter||n;var e=!1,t=this.map(function(t){t=t.toString();return e=e||0<t.length,function(t,r){for(var e='',n=0;n<t.length;n++){var i=t.charAt(n);'~'==i||i==r?e=e+'~'+i:e+=i}return e}(t,r)}).join(r);return!e&&0<this.length&&(t+=r),t}),t('toArray',function(){return Array.prototype.slice.call(this)}),t('empty',function(){return 0==this.length}),t('last',function(){return this[this.length-1]}),t('add',function(){var t=Array.prototype.filter.call(arguments,function(t){return t&&this.indexOf(t)<0},this);Array.prototype.push.apply(this,t)}),t('remove',function(){for(var t=0;t<arguments.length;t++){var r=arguments[t],r=this.indexOf(r);0<=r&&this.splice(r,1)}});
var n='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_!';exports.to64=function(r,e){r=r||0;for(var a='',o=(1<<(e=e||6))-1;0<r;)a=n[r&o]+a,r>>=e;return a||'0'},exports.parse64=function(r,e){var a=0;e=e||6;for(var o=0;o<r.length;o++){a<<=e;var t=n.indexOf(r[o]);if(t<0)throw new Error('base64 error: Illegal character: \''+r[o]+'\'');a+=t}return a};
function a(t,e){this.codeArray=this.unpack(t),e&&((this.data=e).tree||(e.tree=function(s,t,e){var o=new Array(t),f=i.generateDownTree(s);for(var r=0,a=0;a<t;a++){var n;void 0===s[a]&&(n=function(t){var e=0;for(;1024<=t;)t/=1024,e+=10;for(;1<t;)t/=2,e+=1;return e}(function t(e){var r=1,a=f[e];if(a)for(var n=0;n<a.length;n++){var i=t(a[n]);o[a[n]].siblingStates=r,r*=i}if(r++,o[e]={states:r,siblingStates:1},s[e]&&(o[e].parent=s[e][0]),r>=Number.MAX_SAFE_INTEGER/2+2)throw'State tree is just too large';return r}(a)),o[a].offset=r,o[a].width=n,void 0!==e[a]&&(o[a].bridges=e[a]),r+=n)}return o}(e.up,e.count,e.bridges),e.exMap=i.generateExclusiveMap(e.exList)))}var e=require('./base64'),i=require('./utils'),t=(exports.bitfield=a).prototype;function d(t,e){if(null==t)return[{offset:e,width:1,states:2,siblingStates:1}];for(var r=t[e],a=[r];void 0!==r.parent;)r=t[r.parent],a.push(r);return a.reverse(),a}t.data={exMap:Object.create(null),bridges:Object.create(null)},t.unpack=function(t){for(var e=t||'0',r=[];5<e.length;){var a=e.length-5,n=e.substr(a);r.push(this.numberfyChunk(n)),e=e.substr(0,a)}return r.push(this.numberfyChunk(e)),r},t.toString=function(){for(var t='',e=this.codeArray.length-1;0<=e;--e){var r=this.stringifyChunk(this.codeArray[e]);e!=this.codeArray.length-1&&(r=a.pad_number(r,5)),t+=r}return t.replace(/^0+/,'')},t.has=function(t){for(var e=d(this.data.tree,t),r=e[0],a=this.getRange(r.offset,r.width),n=0;n<e.length;n++)r=e[n],a=Math.floor(a/r.siblingStates)%r.states,a--;return 0<=a},t.add=function(t){var e=d(this.data.tree,t),r=e[0];!function(t,e){if(void 0!==t.data.tree)for(;void 0!==e;){var r=t.data.tree[e],a=t.data.exMap[e];if(a)for(var n=0;n<a.length;n++)a[n]!=e&&t.remove(a[n]);e=r.parent}}(this,t);for(var a=o=this.getRange(r.offset,r.width),n=1,i=0;i<e.length;i++){var s=e[i],o=Math.floor(o/s.siblingStates)%s.states;n*=s.siblingStates,o<=0&&(a+=n),o--}this.setRange(r.offset,r.width,a);var f=e[0].bridges;if(void 0!==f)for(i=0;i<f.length;i++)this.add(f[i])},t.remove=function(t){for(var e=this.data.tree,r=d(e,t),a=r[0],n=f=this.getRange(a.offset,a.width),i=1,s=0;s<r.length;s++){var o=r[s],f=Math.floor(f/o.siblingStates)%o.states;f--,i*=o.siblingStates}if(0<=f)for(var h in n-=(f+1)*i,this.data.bridges)for(var u=this.data.bridges[h];void 0!==u;){if(u==t){this.remove(h);break}u=e[u].parent}this.setRange(a.offset,a.width,n)},t.getRange=function(t,e){var r=0,a=(o=t+e-1)-o%30;do{var n=Math.max(a,t),i=a/30,s=n-a,n=2<<o-n,r=r*n+((this.codeArray[i]||0)>>s&n-1),o=a-1}while(a-=30,t<=o);return r},t.setRange=function(t,e,r){for(var a=t;a<t+e;a++){var n=Math.floor(a/30),i=a%30;1&r?this.codeArray[n]|=1<<i:this.codeArray[n]&=~(1<<i),r=Math.floor(r/2)}},t.stringifyChunk=function(t){return e.to64(t,6)},t.numberfyChunk=function(t){return e.parse64(t,6)},a.range=function(t,e){return new Array(e+1).join(t)},a.pad_number=function(t,e){return(t+='').length>=e?t:a.range('0',e-t.length)+t};
var i=require('./utils'),o=require('./page'),l=require('./link');function e(e){this.document=e,this.headers=c(this,'cyoa-header'),this.footers=c(this,'cyoa-footer');var t=this.document.getElementsByClassName('cyoa-page');this.pages=Object.create(null);for(var a=0;a<t.length;a++){var i=new o(this,t[a]);(this.pages[i.id]=i).isDefault()&&(this.defaultPage=i)}this.onlinkclick=void 0;function s(e){var t,a;t=this,a=e,(e=r).onlinkclick&&e.onlinkclick(new l(e,t),a)}for(var n=this.document.getElementsByClassName('tc-tiddlylink'),r=this,a=0;a<n.length;a++)n[a].onclick=s}function c(e,t){for(var a=e.document.getElementsByClassName(t),i=[],s=0;s<a.length;s++)i.push(new o(e,a[s]));return i}(module.exports=e).prototype.getPage=function(e){return this.pages[e]},e.prototype.getPageOrDefault=function(e){return this.getPage(e)||this.defaultPage},e.prototype.getStartPage=function(){var e=this.document.getElementsByClassName('cyoa-start');if(0==e.length)throw'No starting page exists.';if(1<e.length){for(var t=[],a=0;a<e.length;a++)t.push(e[a].id);i.warn('There are multiple starting pages: '+t)}return this.getPage(i.decodePage(e[0].id))},e.prototype.closeAll=function(){for(var e=this.document.getElementsByClassName('cyoa-active'),t=Array.prototype.slice.call(e,0),a=0;a<t.length;a++)t[a].classList.toggle('cyoa-active',!1)};
exports.parseString=function(r,t,e){var n='',a=!1,o=!1;r=r||'';for(var h=0;h<r.length;h++){var i=r.charAt(h);a?(n+=i,a=!(o=!0)):'~'==i?a=!0:i==t?(e(n),n=''):(o=!0,n+=i)}o&&e(n)},exports.stringify=function(r,t){for(var e=!1,n=[],a=0;a<r.length;a++){var o=r[a].toString(),e=e||0<o.length;n.push(this.escapeValue(o,t))}var h=n.join(t);return!e&&0<r.length&&(h+=t),h},exports.escapeValue=function(r,t){for(var e='',n=0;n<r.length;n++){var a=r.charAt(n);'~'==a||a==t?e=e+'~'+a:e+=a}return e};
var a=require('./utils'),i=(require('./page'),require('./book'));function t(t,e,o){this.document=t,this.book=new i(t),this.topPage=void 0,this.manager=o,this.state=e,this.afterPageCallback;var s=this;this.manager.onpageturn=function(){s.focus_on_page()},this.book.onlinkclick=function(t,e){s.clicked_link(t,e)},this.document.addEventListener('keydown',function(t){var e=[];t.altKey&&e.push('alt'),t.ctrlKey&&e.push('ctrl'),t.metaKey&&e.push('meta'),t.shiftKey&&e.push('shift'),e.push(t.key);var o=e.join('-');void 0!==s.loadedLinks[o]&&s.loadedLinks[o].element.onclick(t),e.pop(),e.push(t.code),o=e.join('-'),void 0!==s.loadedLinks[o]&&s.loadedLinks[o].element.onclick(t)})}(module.exports=t).prototype.openBook=function(t){this.book.closeAll(),this.focus_on_page(t)},t.prototype.focus_on_page=function(t){var e=this;a.clearErrors(this.document),this.unpack_state(),this.book.closeAll(),this.loadedLinks=[void 0];var o=(o=t||this.manager.getPage())||this.book.getStartPage().title;this.topPage=o,this.openPages=[],a.log('Page: '+o),this.processExtraPages(this.book.headers);for(var s,t=this.book.getPageOrDefault(o);t;)t.active&&(s='\''+t.title+'\' is already loaded',a.error(new Error(s))),t.execute(this.cyoa.vars),t.eachActiveLink(function(t){e.registerHotkeys(t,t.hotkey||e.loadedLinks.length)}),this.openPages.push(t.title),t=t.selectAppend(this.cyoa.vars),this.afterPageCallback&&this.afterPageCallback();this.processExtraPages(this.book.footers),this.document.body.scrollTop=this.document.documentElement.scrollTop=0},t.prototype.processExtraPages=function(t){for(var e=this,o=0;o<t.length;o++){var s=t[o];s.test(this.cyoa.vars)&&(s.execute(this.cyoa.vars),s.eachActiveLink(function(t){e.registerHotkeys(t,t.hotkey)}))}},t.prototype.registerHotkeys=function(t,e){if(e)for(var o,s,a=e.toString().split(' '),i=0;i<a.length;i++)a[i]&&(s=(o=a[i].split('-')).pop(),o.sort(),o.push(s),this.loadedLinks[o.join('-')]=t)},t.prototype.afterPage=function(t){this.afterPageCallback=t},t.prototype.unpack_state=function(){var t=this;a.safeCall(null,this.document,function(){t.state.deserialize(t.manager.getState())})},t.prototype.clicked_link=function(o,t){var e=!1;o.replaces&&this.unpack_state();try{o.executeOnclick(this.cyoa.vars)}catch(t){e=!0}e||a.safeCall(this,this.document,function(){var t,e=this.resolveNextPage(o,this.cyoa.vars);e&&(t=this.state.serialize(),this.manager.pushState(t,e))}),t.preventDefault()},t.prototype.resolveNextPage=function(t,e){var o=void 0;return t.returns&&(o=e.cyoaS.pop()),(o=(o=o||t.to)||this.topPage)||void 0};
exports.UriManager=require('./uriManager'),exports.State=require('./state'),exports.Array=require('./array').array,exports.Set=require('./set').set,exports.Map=require('./map'),exports.Core=require('./core'),exports.Book=require('./book'),exports.Page=require('./page'),exports.Node=require('./node'),exports.Link=require('./link'),exports.Version=require('./version'),exports.utils=require('./utils'),exports.scriptor=require('./scriptor');
var e=require('./hash');exports.shuffle=function(u,i){return function(r){i=i.toString()+Math.floor(u/r).toString();for(var t=[],n=0;n<r;n++)t.push(n);for(var a=Math.min(r-2,u%r),n=0;n<=a;n++){var o=(i=Math.abs(e.hash(i.toString())))%(r-n)+n,h=t[n];t[n]=t[o],t[o]=h}return t[u%r]}},exports.cap=function(t,r){return function(r){return Math.max(0,Math.min(r-1,t))}};
function n(t){return e[t%e.length]}var e=[56369,34231,64063,14197,32911,61861,28411,263,56569,5749,41659,9649,46499,12853,45343,26513,24481];function h(t,e){return(t.charCodeAt(e)<<8)+t.charCodeAt(e+1)}exports.hash=function(t){if(t.length<=0)return 0;for(var e=t.length,r=0;r<=t.length-4;)e+=h(t,r),e=(e^=n(e)*n(e>>5))<<16^(h(t,r+2)<<11^e),e+=e>>11,r+=4;switch(t.length-r){case 3:e+=h(t,r),e^=e<<16,e^=t.charCodeAt(r+2)<<18,e+=e>>11;case 2:e+=h(t,r),e^=e<<11,e+=e>>17;case 1:e+=t.charCodeAt(r),e^=e<<10,e+=e>>1}return e^=e<<3,e+=e>>5,e^=e<<4,e+=e>>17,e^=e<<25,e+=e>>6};
var o=require('./container');function t(t,r){var e=void 0,i=this;if(r)for(var n=0;n<r.length;n++)this[r[n]]=0;o.parseString(t,'.',function(t){e=void 0===e?t:void(i[e]=parseInt(t))})}t.prototype=Object.create(null),Object.defineProperty(t.prototype,'toString',{enumerable:!1,writable:!0,value:function(){var t,r=[];for(t in this)this[t]&&r.push(t,this[t]);return o.stringify(r,'.')}}),exports.intmap=t;
function e(e,t){r.apply(this,arguments)}var r=require('./node'),t=require('./utils');(module.exports=e).prototype=Object.create(r.prototype),Object.defineProperty(e.prototype,'to',{get:function(){var e=this.element.getAttribute('href');if(e=e&&t.stripHash(e))return decodeURIComponent(e)}}),Object.defineProperty(e.prototype,'replaces',{get:function(){return this.element.classList.contains('cyoa-replace')}}),Object.defineProperty(e.prototype,'returns',{get:function(){return this.element.classList.contains('cyoa-return')}});
var n=require('./container');function t(t,r){var e=void 0,i=this;n.parseString(t,'.',function(t){e=void 0===e?t:void(i[e]=t)})}t.prototype=Object.create(null),Object.defineProperty(t.prototype,'toString',{enumerable:!1,writable:!0,value:function(){var t,r=[];for(t in this)void 0!==this[t]&&(r.push(t),r.push(this[t]));return n.stringify(r,'.')}}),exports.map=t;
function i(t,e){this.book=t,this.element=e}var s=require('./utils'),o=require('./scriptor'),a=require('./hash');function t(t,e){Object.defineProperty(i.prototype,t,{get:e})}function r(t,e,i){this.root=e,this.ptr=e.firstElementChild,this.book=t,this.state=i,this.skipElse=!1}module.exports=i,t('id',function(){return s.decodePage(this.element.id)}),t('dependList',function(){return this.getPageList('data-depend')}),t('weight',function(){var t=parseInt(this.element.getAttribute('data-weight')||1);return t<0?0:t}),t('hotkey',function(){return this.element.getAttribute('data-hotkey')}),t('isElse',function(){return this.element.classList.contains('cyoa-else')}),t('isLink',function(){return this.element.classList.contains('tc-tiddlylink')}),t('isOnclick',function(){return this.element.classList.contains('cyoa-onclick')}),t('isStateful',function(){return this.element.classList.contains('cyoa-state')}),t('parent',function(){var t=this.element.parentNode;if(t&&t.classList)return t.classList.contains('cyoa-page')?this.book.getPage(t.id):new i(this.book,t)}),Object.defineProperty(i.prototype,'active',{get:function(){return this.element.classList.contains('cyoa-active')||!this.isStateful},set:function(t){this.element.classList.toggle('cyoa-active',t)}}),Object.defineProperty(i.prototype,'to',{get:function(){var t=this.element.href;return t?s.decodePage(t.substr(t.indexOf('#')+1)):null},set:function(t){this.element.setAttribute('href','#'+t)}}),i.prototype.getIndex=function(t){return this.evalSnippet('index',{arguments:t})},i.prototype.eachActiveLink=function(t){if(this.active){this.isLink&&t(this);for(var e=this.element.firstElementChild;e;e=e.nextElementSibling)new i(this.book,e).eachActiveLink(t)}},i.prototype.execute=function(t){var e,i;this.isStateful&&(this.active=!0,e={arguments:Object.assign({value:this.evalSnippet('set')},t)},this.isOnclick||this.evalSnippet('do',e),this.element.hasAttribute('data-write')?(i=this.evalSnippet('write',e),this.element.innerHTML=i):this.executeChildren(t),this.isOnclick||this.evalSnippet('done',e))},i.prototype.executeChildren=function(t){var e,i=this.getIndex(t),n=new r(this.book,this.element,t);if(void 0!==i){i=this.selectFromList(i,n);i&&i.execute(t)}else for(;e=n.next();)e.execute(t)},i.prototype.executeOnclick=function(t){for(var e=[],i=this;i;i=i.parent)i.isStateful&&i.isOnclick&&e.push(i);for(var n=e.length-1;0<=n;n--)e[n].evalSnippet('do',{rethrow:!0,arguments:t});for(n=0;n<e.length;n++)e[n].evalSnippet('done',{rethrow:!0,arguments:t})},i.prototype.selectFromList=function(t,e){var i,n=[],r=0;switch(typeof(t=t||0)){case'string':t=Math.abs(a.hash(t));case'number':if(t<0)throw new Error('index cannot be less than zero ('+t+')');for(;i=e.next();){if(t<(r+=i.weight))return i;n.push(i)}break;default:for(;i=e.next();)r+=i.weight,n.push(i);t=t(r)}t%=r;for(var s=0,o=0;o<n.length;o++)if(t<(s+=n[o].weight))return n[o];return null},i.prototype.test=function(t){return function t(e,i,n){if(!e.evalSnippet('if',{default:!0,arguments:i}))return!1;var r=e.dependList;if(0<r.length){n[e.title]=!0;for(var s=0;s<r.length;s++){var o=r[s];if(!n[o]){var o=e.book.getPage(o);if(t(o,i,n))return!0}}return!1}return!0}(this,t,{})},i.prototype.evalSnippet=function(e,i){i=i||{};try{var t=i.default,n=this.element.getAttribute('data-'+e);return n&&(t=o.evalAll(n,i.arguments,this),s.log('Evaluating: '+e+' ('+t+') ['+n+']')),t}catch(t){var r=t.message||t.toString();if(t.message='<i>'+e+'</i> attribute failed ('+n+'): '+r,s.error(t,this.book.document),i.rethrow)throw t;return!1}},i.prototype.getPageList=function(t){t=this.element.getAttribute(t);return t?t.split(' ').map(s.decodePage):[]},r.prototype.next=function(){for(;null!==this.ptr;){var t=new i(this.book,this.ptr);if(t.isStateful){if(this.ptr=this.nextSibling(this.ptr),!this.skipElse||!t.isElse){if(t.test(this.state))return this.skipElse=!0,t;this.skipElse=!1}}else this.ptr=this.ptr.firstElementChild||this.nextSibling(this.ptr)}return null},r.prototype.nextSibling=function(t){for(;null===t.nextElementSibling;)if((t=t.parentNode)===this.root)return null;return t.nextElementSibling};
function n(t,e){o.apply(this,arguments)}var i=require('./utils'),o=require('./node');function t(t,e){Object.defineProperty(n.prototype,t,{get:e})}function r(t,e,n){this.list=e,this.book=t,this.state=n,this.index=0}(module.exports=n).prototype=Object.create(o.prototype),t('title',function(){return i.decodePage(this.element.id)}),t('appendList',function(){return this.getPageList('data-append')}),t('isLink',function(){return!1}),t('isStateful',function(){return!0}),t('parent',function(){}),n.prototype.isDefault=function(){return this.element.classList.contains('cyoa-default')},n.prototype.getAppendIndex=o.prototype.getIndex,n.prototype.getIndex=function(){},n.prototype.selectAppend=function(t,e){var n=this.appendList,i=t.cyoaS&&t.cyoaS.last();if(i&&0<=n.indexOf(i))return t.cyoaS.pop(),this.book.getPage(i);n=new r(this.book,n,t);return void 0===e&&(e=this.getAppendIndex(t)),this.selectFromList(e,n)},r.prototype.next=function(){for(;this.index<this.list.length;){var t=this.list[this.index];this.index++;var e=this.book.getPage(t);if(e){if(e.test(this.state))return e}else{t='append page \''+t+'\' does not exist.';i.error(new Error(t))}}return null};
var t=require('./array').array;exports.pack=function(r){'string'==typeof r&&(r=[r]);r=r.filter(function(r){return r});return 0==r.length?null:t.stringify(r,';')},exports.unpack=function(r){return t.parse(r,';')},exports.eval=function(r,t,n){t=t||{};var e=Object.keys(t);e.unshift('__script__'),e.push('return eval(__script__)');var u,p=Function.apply(Object.create(Function.prototype),e),a=exports.unpack(r),o=[null];for(u in t)o.push(t[u]);for(var c=[],i=0;i<a.length;i++)o[0]=a[i],c.push(p.apply(n,o));return c},exports.evalAll=function(r,t,n){return exports.eval(r,t,n).reduce(function(r,t){return r&&t},!0)};
var a=require('./container'),n=require('./utils');exports.set=function(t,e,i){e&&(void 0===e.down&&(e.down=n.generateDownTree(e.up),e.exMap=n.generateExclusiveMap(e.exList)),this.data=e),i&&(this.delimiter=i);var r=Object.create(null);a.parseString(t,this.delimiter,function(t){r[t]=!0}),this.set=r};var s=exports.set.prototype;function h(t,e){var i=t.data.exMap[e];i&&s.remove.apply(t,i.filter(t=>t!==e))}s.delimiter='.',s.data={up:Object.create(null),down:Object.create(null),exMap:Object.create(null)},s.toString=function(t){return a.stringify(Object.keys(this.set),t||this.delimiter)},s.has=function(t){if(this.set[t])return!0;var e=this.data.down[t];if(e)for(var i=0;i<e.length;i++)if(this.has(e[i]))return!0;return!1},s.add=function(){this.data.up;for(var t=0;t<arguments.length;t++){var e=arguments[t];this.has(e)||(this.set[e]=!0,h(this,e),function t(e,i){var r=e.data.up[i];if(r)for(var a=0;a<r.length;a++){var i=r[a];e.set[i]?delete e.set[i]:(h(e,i),t(e,i))}}(this,e))}},s.remove=function(){for(var t=0;t<arguments.length;t++){var e=arguments[t],i=deleteNodeAndChildren(this,e),e=this.data.up[e];i&&e&&s.add.apply(this,e)}},s.remove=function(){for(var t=0;t<arguments.length;t++){var e=arguments[t],i=this.data.down[e];if(i&&s.remove.apply(this,i),this.set[e]){delete this.set[e];var r=this.data.up[e];if(r)for(var a=0;a<r.length;a++)this.has(r[a])||(this.set[r[a]]=!0)}}},s.clear=function(){this.set=Object.create(null)};
var n=require('./array').array,s=require('./utils');function r(){this.registry={}}function t(r){for(var e=r?r.split('&'):[],t={},n=0;n<e.length;n++){var a=e[n],i=a.indexOf('='),o=s.decodePage(a.substring(0,i)),i=s.decodePage(a.substring(i+1));t[o]=i}return t}function a(r){var e,t=[];for(e in r){var n=s.encodePage(e),a=s.encodePage(r[e]);t.push(n+'='+a)}return t.join('&')}function i(r,e){return Array.isArray(r)?n.stringify(r):Boolean!==e?r.toString():u(r)?'yes':'no'}(module.exports=r).prototype.declare=function(r,e,t,n){switch(n=n||{},(t=t||String).name){case'Number':t=Number;break;case'Boolean':t=Boolean;break;case'Array':t=Array;break;case'String':t=String}var a=i(a=void 0!==n.default?n.default:o(t),t);this.registry[e]={dest:r,type:t,def:a,data:n.data}},r.prototype.amend=function(r,e){r=t(r);return a(r=Object.assign(r,e))},r.prototype.deserialize=function(r){r=t(r);this.unpack(r)},r.prototype.unpack=function(r){for(var e in this.registry){var t=this.registry[e],n=r[e];void 0===n&&(n=t.def),t.dest[e]=c(n,t.type,t.data)}},r.prototype.serialize=function(){return a(this.pack())},r.prototype.pack=function(){var r,e={};for(r in this.registry){var t=this.registry[r],n=t.dest[r];void 0!==n&&(n=i(n,t.type))!==t.def&&(e[r]=n.toString())}return e};var o=function(r){switch(r){case Boolean:return!1;case Number:return'0';case Array:return[];default:return''}};function u(r){if('string'!=typeof r)return!!r;r=r.toLowerCase();return 0<r.length&&'false'!=r&&'0'!=r&&'no'!=r}var c=function(r,e,t){switch(e){case String:return r||'';case Boolean:return u(r);case Number:return parseFloat(r||'0');case Array:return new n.parse(r);default:return new e(r,t)}};
var i=require('./utils');function t(t){this.window=t||{},this.html5=!(!t.history||!t.history.pushState),this.onpageturn=null;var o=this;this.popstate=this.window.onpopstate=function(){o.onpageturn&&o.onpageturn()}}Object.defineProperty(t.prototype,'location',{get:function(){return this.window.location}}),t.prototype.pushState=function(t,o){if(o=i.encodePage(o),this.html5){var e=this.currentUrl()+this.createHtml5Component(o,t),n=!1;try{this.window.history.pushState({path:e},'',e),n=!0}catch(t){console.error(t),console.log('Error occurred using history.pushState. Switching to compatability mode.'),this.html5=!1}n&&this.popstate()}this.html5||(e=this.createHtml4Anchor(o,t),this.location.hash=e)},t.prototype.getPage=function(){var t,o=this.location.hash;return 0==o.indexOf('#?')&&(o=0<=(t=o.indexOf('?',2))?o.substr(t):''),o&&(o=o.substring(1),o=i.decodePage(o)),o},t.prototype.getState=function(){var t,o;return(0==this.location.hash.indexOf('#?')?0<=(o=(t=this.location.hash).indexOf('?',2))?t.slice(1,o):t.substr(1):this.location.search).substr(1)},t.prototype.createHtml5Component=function(t,o){return 0<o.length&&(o='?'+o),o+'#'+t},t.prototype.createHtml4Anchor=function(t,o){var e='#';return 0<o.length?(o='#?'+o,e='?'):0<this.location.search.length&&(o='#?',e='?'),0<t.length&&(t=e+t),o+t},t.prototype.currentUrl=function(){return this.location.protocol+'//'+this.location.host+this.location.pathname},module.exports=t;
function t(e){var t,r={'/':'%2F'},o=encodeURIComponent(e);for(t in r)var n=r[t],o=o.split(n).join(t);return o}exports.getSubpages=function(e,t){e=exports.encodePageForID(e),e=t.getElementById(e).getAttribute('data-append');return e?e.split(' ').map(decodeURIComponent):[]},exports.getMetaContent=function(e,t){for(var r=(t=t||document).getElementsByTagName('meta'),o=0;o<r.length;o++){var n=r[o];if(n.getAttribute('name')==e)return n.getAttribute('content')}return null},exports.stripHash=function(e){return'#'==e[0]?e.slice(1):e},exports.error=function(e,t){console.error(e),!t||(t=t.getElementsByClassName('cyoa-error')[0])&&(e='<li class=\'cyoa-error-item\'>'+e+'</li>',t.innerHTML+=e)},exports.encodePage=function(e){return'string'==typeof e?t(e):e.map(t).join(' ')},exports.encodePageForID=exports.encodePage,exports.decodePage=function(e){return decodeURIComponent(e)},exports.hop=function(e,t){return!!e&&Object.prototype.hasOwnProperty.call(e,t)},exports.clearErrors=function(e){for(var t=e.getElementById('cyoa-error');t&&t.lastChild;)t.removeChild(t.lastChild)},exports.log=function(e){},exports.safeCall=function(e,t,r,o){var n=o;try{n=r.call(e)}catch(e){if(exports.error(e,t),void 0===o)throw e}return n},exports.generateExclusiveMap=function(e){for(var t=Object.create(null),r=0;r<e.length;r++)for(var o=e[r],n=0;n<o.length;n++){var a=o[n];t[a]?t[a]=t[a].concat(o):t[a]=o}return t},exports.generateDownTree=function(e){var t,r=Object.create(null);for(t in e)for(var o=e[t],n=0;n<o.length;n++){var a=o[n];r[a]=r[a]||[],r[a].push(t)}return r};
exports.value=function(t,e){t&&(this.value=t),e&&(this.tree=e)};var t=exports.value.prototype;t.tree=Object.create(null),t.toString=function(){return void 0===this.value?'':this.value},t.is=function(t){return function t(e,i,n){if(i===n)return!0;var r=e[i];if(r)for(var u=0;u<r.length;u++)if(t(e,r[u],n))return!0;return!1}(this.tree,this.value,t.toString())},t.set=function(t){this.value=t.toString()},t.unset=function(t){this.value===t.toString()&&(this.value=void 0)},t.clear=function(){this.value=void 0},t.any=function(){return void 0!==this.value};
function n(t){t=t||this.default;this.digits=t.split('.').map(function(t){return parseInt(t)})}n.prototype.default='0',n.prototype.isDefault=function(){return this.toString()===this.default},n.prototype.toString=function(){for(var t=[],i=!0,e=this.digits.length-1;0<=e;e--){var n=this.digits[e];(n&&'0'!=n||!i||0==e)&&(t.unshift(n||'0'),i=!1)}return t.join('.')},n.prototype.isCompatibleWith=function(t){t=new n(t);return this.major==t.major},n.prototype.equals=function(t){t=new n(t);return this.toString()==t.toString()},n.prototype.split=function(){return this.digits.slice()},n.prototype.gt=function(t){var i=new n(t);if(this.equals(i))return!1;for(var e=0;e<this.digits.length;e++){if(i.digits.length===e)return!0;if(this.digits[e]<i.digits[e])return!1;if(this.digits[e]>i.digits[e])return!0}return!1},n.prototype.gte=function(t){t=new n(t);return this.equals(t)||this.gt(t)},n.prototype.lt=function(t){return new n(t).gt(this)},n.prototype.lte=function(t){return new n(t).gte(this)},Object.defineProperty(n.prototype,'major',{get:function(){return this.digits[0]||0},set:function(t){this.digits[0]=t}}),Object.defineProperty(n.prototype,'minor',{get:function(){return this.digits[1]||0},set:function(t){this.digits[1]=t}}),Object.defineProperty(n.prototype,'patch',{get:function(){return this.digits[2]||0},set:function(t){this.digits[2]=t}}),module.exports=n;
var types = cyoa.stateClasses;
cyoa.vars = Object.create(null);var data={"default":{"bridges":{},"up":{},"count":0,"exList":[]}};

declare(cyoa.vars, "cyoaT", types.bitfield, {data: data.default});

declare(cyoa.vars, "cyoaS", types.array, {data: data.stack});