-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheader.html
63 lines (54 loc) · 29.3 KB
/
header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Jonah 2.1 is based on:
TiddlyWiki 1.2.39 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com)
Published under a BSD open source license
Copyright (c) Osmosoft Limited 2005
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of the Osmosoft Limited nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8">
<title>Jonah</title>
<script type="text/javascript">
function $(A){if(typeof A=="string"){return document.getElementById(A)}else{return A}}function clone(A){var B={};for(property in A){B[property]=A[property]}return B}function insertElement(A,D,F,C,E){var B=document.createElement(D);if(F){B.id=F}if(C){B.className=C}if(E){insertText(B,E)}if(A){A.appendChild(B)}return B}function insertText(A,B){return A.appendChild(document.createTextNode(B))}function removeChildren(A){while(A.hasChildNodes()){A.removeChild(A.firstChild)}}function setPageElement(C,B,A){if(place=$(C)){removeChildren(place);if(tale.has(B)){new Wikifier(place,tale.get(B).text)}else{new Wikifier(place,A)}}}function addStyle(B){if(document.createStyleSheet){document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd"," <style>"+B+"</style>")}else{var A=document.createElement("style");A.type="text/css";A.appendChild(document.createTextNode(B));document.getElementsByTagName("head")[0].appendChild(A)}}function throwError(A,B){new Wikifier(A,"'' @@ "+B+" @@ ''")}Math.easeInOut=function(A){return(1-((Math.cos(A*Math.PI)+1)/2))};String.prototype.readMacroParams=function(){var C=new RegExp("(?:\\s*)(?:(?:\"([^\"]*)\")|(?:'([^']*)')|(?:\\[\\[([^\\]]*)\\]\\])|([^\"'\\s]\\S*))","mg");var B=[];do{var A=C.exec(this);if(A){if(A[1]){B.push(A[1])}else{if(A[2]){B.push(A[2])}else{if(A[3]){B.push(A[3])}else{if(A[4]){B.push(A[4])}}}}}}while(A);return B};String.prototype.readBracketedList=function(){var B="\\[\\[([^\\]]+)\\]\\]";var A="[^\\s$]+";var E="(?:"+B+")|("+A+")";var D=new RegExp(E,"mg");var F=[];do{var C=D.exec(this);if(C){if(C[1]){F.push(C[1])}else{if(C[2]){F.push(C[2])}}}}while(C);return(F)};String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};function fade(F,C){var H;var E=F.cloneNode(true);var G=(C.fade=="in")?1:-1;F.parentNode.replaceChild(E,F);if(C.fade=="in"){H=0;E.style.visibility="visible"}else{H=1}B(E,H);var A=window.setInterval(D,25);function D(){H+=0.05*G;B(E,Math.easeInOut(H));if(((G==1)&&(H>=1))||((G==-1)&&(H<=0))){F.style.visibility=(C.fade=="in")?"visible":"hidden";E.parentNode.replaceChild(F,E);delete E;window.clearInterval(A);if(C.onComplete){C.onComplete()}}}function B(J,I){var K=Math.floor(I*100);J.style.zoom=1;J.style.filter="alpha(opacity="+K+")";J.style.opacity=I}}function scrollWindowTo(E){var D=window.scrollY?window.scrollY:document.body.scrollTop;var G=J(E);var C=Math.abs(D-G);var B=0;var I=(D>G)?-1:1;var F=window.setInterval(H,25);function H(){B+=0.1;window.scrollTo(0,D+I*(C*Math.easeInOut(B)));if(B>=1){window.clearInterval(F)}}function J(N){var O=A(N);var P=O+N.offsetHeight;var K=window.scrollY?window.scrollY:document.body.scrollTop;var L=window.innerHeight?window.innerHeight:document.body.clientHeight;var M=K+L;if(O<K){return O}else{if(P>M){if(N.offsetHeight<L){return(O-(L-N.offsetHeight)+20)}else{return O}}else{return O}}}function A(K){var L=0;while(K.offsetParent){L+=K.offsetTop;K=K.offsetParent}return L}}function History(){this.history=[{passage:null,variables:{}}]}History.prototype.init=function(){if(!this.restore()){if(tale.has("StartPassages")){var B=tale.get("StartPassages").text.readBracketedList();for(var A=0;A<B.length;A++){this.display(B[A],null,"quietly")}}else{this.display("Start",null,"quietly")}}};History.prototype.close=function(B){var A=$("passage"+B.title);if(A){A.parentNode.removeChild(A)}};History.prototype.display=function(E,C,A){var B=C;while(B&&(B.className.indexOf("passage")==-1)){if(B.parentNode.className){B=B.parentNode}else{break}}if(el=$("passage"+E)){scrollWindowTo(el);return }var D=tale.get(E);this.history.unshift({passage:D,variables:clone(this.history[0].variables)});var F=D.render();if(A!="offscreen"){if(B){$("passages").insertBefore(F,B.nextSibling)}else{$("passages").appendChild(F)}if(A!="quietly"){scrollWindowTo(F);fade(F,{fade:"in"})}}if((A=="quietly")||(A=="offscreen")){F.style.visibility="visible"}return F};History.prototype.restart=function(){window.location.hash=""};History.prototype.save=function(C){var A="";for(var B=0;B<this.history.length;B++){if((this.history[B].passage)&&(this.history[B].passage.id)){A+=this.history[B].passage.id.toString(36)+".";if(this.history[B].passage.id==C.id){break}}}return"#"+A.substr(0,A.length-1)};History.prototype.restore=function(){try{if(window.location.hash==""){return false}var A=window.location.hash.replace("#","").split(".");var C=[];for(var B=A.length-1;B>=0;B--){var E=parseInt(A[B],36);if(!tale.has(E)){return false}C.unshift(this.display(E,null,"offscreen"))}$("passages").appendChild(C[0]);return true}catch(D){return false}};History.prototype.rewindTo=function(C){var B=this;fade($("passages"),{fade:"out",onComplete:A});function A(){while(B.history[0].passage.title!=C.title){B.close(B.history.shift().passage)}B.history[0].variables=clone(B.history[1].variables);C.reset();var E=$("passage"+C.title).childNodes;for(var D=0;D<E.length;D++){if(E[D].className=="body"){removeChildren(E[D]);new Wikifier(E[D],C.text)}}fade($("passages"),{fade:"in"})}};var version={major:2,minor:0,revision:0,date:new Date("July 30, 2007"),extensions:{}};var tale,state;var macros={};function main(){tale=new Tale();setPageElement("storyMenu","StoryMenu","");setPageElement("storyTitle","StoryTitle","Untitled Story");setPageElement("storySubtitle","StorySubtitle","");setPageElement("storyAuthor","StoryAuthor","");if(tale.has("StoryTitle")){document.title=tale.get("StoryTitle").text;if(tale.has("StorySubtitle")){document.title+=": "+tale.get("StorySubtitle").text}}for(macro in macros){if(typeof macro.init=="function"){macro.init()}}var styles=tale.lookup("tags","stylesheet");for(var i=0;i<styles.length;i++){addStyle(styles[i].text)}var scripts=tale.lookup("tags","script");for(var i=0;i<scripts.length;i++){try{eval(scripts[i].text)}catch(e){alert("There is a technical problem with this story ("+scripts[i].title+": "+e.message+"). You may be able to continue reading, but all parts of the story may not work properly.")}}state=new History();state.init()}version.extensions.choiceMacro={major:1,minor:2,revision:0};macros.choice={handler:function(A,C,D){var B=document.createElement("a");B.href="javascript:void(0)";B.className="internalLink choice";if(D[1]){B.innerHTML=D[1]}else{B.innerHTML=D[0]}B.onclick=function(){macros.choice.activate(B,D[0])};A.appendChild(B)},activate:function(E,A){var H=E.parentNode;while(H.className.indexOf("body")==-1){H=H.parentNode}var G=H.parentNode.id.substr(7);var B=H.getElementsByTagName("a");var F=[];for(var C=0;C<B.length;C++){if((B[C]!=E)&&(B[C].className.indexOf("choice")!=-1)){var D=document.createElement("span");D.innerHTML=B[C].innerHTML;D.className="disabled";B[C].parentNode.insertBefore(D,B[C].nextSibling);F.push(B[C])}}for(var C=0;C<F.length;C++){F[C].parentNode.removeChild(F[C])}tale.get(G).text="<html>"+H.childNodes[0].innerHTML+"</html>";state.display(A,E)}};version.extensions.displayMacro={major:1,minor:0,revision:0};macros.display={handler:function(A,B,C){new Wikifier(A,tale.get(C[0]).text)}};version.extensions.actionsMacro={major:1,minor:0,revision:0};macros.actions={clicked:new Object(),handler:function(A,F,G){var E=document.createElement("ul");for(var B=0;B<G.length;B++){if(macros.actions.clicked[G[B]]){continue}var D=document.createElement("li");macros.choice.handler(D,"choice",[G[B]]);var C=D.getElementsByTagName("a")[0];C.onclick=function(){macros.actions.clicked[this.innerHTML]=true;macros.choice.activate(this,this.innerHTML)};E.appendChild(D)}A.appendChild(E)}};version.extensions.printMacro={major:1,minor:1,revision:0};macros.print={handler:function(place,macroName,params,parser){try{var output=eval(parser.fullArgs());if(output){new Wikifier(place,output.toString())}}catch(e){throwError(place,"bad expression: "+e.message)}}};version.extensions.setMacro={major:1,minor:1,revision:0};macros.set={handler:function(A,B,C,D){macros.set.run(D.fullArgs())},run:function(expression){try{return eval(Wikifier.parse(expression))}catch(e){throwError(place,"bad expression: "+e.message)}}};version.extensions.ifMacros={major:1,minor:0,revision:0};macros["if"]={handler:function(place,macroName,params,parser){var condition=parser.fullArgs();var srcOffset=parser.source.indexOf(">>",parser.matchStart)+2;var src=parser.source.slice(srcOffset);var endPos=-1;var trueClause="";var falseClause="";for(var i=0,nesting=1,currentClause=true;i<src.length;i++){if(src.substr(i,9)=="<<endif>>"){nesting--;if(nesting==0){endPos=srcOffset+i+9;break}}if((src.substr(i,8)=="<<else>>")&&(nesting==1)){currentClause="false";i+=8}if(src.substr(i,5)=="<<if "){nesting++}if(currentClause==true){trueClause+=src.charAt(i)}else{falseClause+=src.charAt(i)}}try{if(eval(condition)){new Wikifier(place,trueClause.trim())}else{new Wikifier(place,falseClause.trim())}if(endPos!=-1){parser.nextMatch=endPos}else{throwError(place,"can't find matching endif")}}catch(e){throwError(place,"bad condition: "+e.message)}}};macros["else"]=macros.endif={handler:function(){}};version.extensions.rememberMacro={major:1,minor:1,revision:0};macros.remember={handler:function(place,macroName,params,parser){var statement=parser.fullArgs();var expire=new Date();var variable,value;macros.set.run(statement);var variableSigil=Wikifier.parse("$");variableSigil=variableSigil.replace("[","\\[");variableSigil=variableSigil.replace("]","\\]");variable=statement.match(new RegExp(variableSigil+"(\\w+)","i"))[1];value=eval(Wikifier.parse("$"+variable));switch(typeof value){case"string":value='"'+value.replace(/"/g,'\\"')+'"';break;case"number":case"boolean":break;default:throwError(place,"can't remember $"+variable+" ("+(typeof value)+")");return }expire.setYear(expire.getFullYear()+1);document.cookie=macros.remember.prefix+variable+"="+value+"; expires="+expire.toGMTString()},init:function(){if(tale.has("StoryTitle")){macros.remember.prefix=tale.get("StoryTitle").text+"_"}else{macros.remember.prefix="__jonah_"}var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var bits=cookies[i].split("=");if(bits[0].trim().indexOf(this.prefix)==0){var statement=cookies[i].replace(this.prefix,"$");eval(Wikifier.parse(statement))}}}};version.extensions.SilentlyMacro={major:1,minor:0,revision:0};macros.silently={handler:function(G,E,F,B){var H=insertElement(null,"div");var J=B.source.indexOf(">>",B.matchStart)+2;var A=B.source.slice(J);var D=-1;var C="";for(var I=0;I<A.length;I++){if(A.substr(I,15)=="<<endsilently>>"){D=J+I+15}else{C+=A.charAt(I)}}if(D!=-1){new Wikifier(H,C);B.nextMatch=D}else{throwError(G,"can't find matching endsilently")}delete H}};macros.endsilently={handler:function(){}};function Passage(C,B,A){this.title=C;if(B){this.id=A;this.initialText=this.text=Passage.unescapeLineBreaks(B.firstChild?B.firstChild.nodeValue:"");this.tags=B.getAttribute("tags");if(typeof this.tags=="string"){this.tags=this.tags.readBracketedList()}else{this.tags=[]}}else{this.initialText=this.text="@@This passage does not exist.@@";this.tags=[]}}Passage.prototype.render=function(){var E=insertElement(null,"div","passage"+this.title,"passage");E.style.visibility="hidden";var F=insertElement(E,"div","","title",this.title);var D=insertElement(F,"span","","toolbar");for(var B=0;B<Passage.toolbarItems.length;B++){var C=insertElement(D,"a");insertText(C,Passage.toolbarItems[B].label(E));C.passage=this;if(Passage.toolbarItems[B].href){C.href=Passage.toolbarItems[B].href(E)}else{C.href="javascript:void(0)"}C.title=Passage.toolbarItems[B].tooltip(E);C.onclick=Passage.toolbarItems[B].activate}var A=insertElement(E,"div","","body");new Wikifier(A,this.text);E.onmouseover=function(){E.className+=" selected"};E.onmouseout=function(){E.className=E.className.replace(" selected","")};return E};Passage.prototype.reset=function(){this.text=this.initialText};Passage.toolbarItems=[{label:function(){return"bookmark"},tooltip:function(){return"Bookmark this point in the story"},href:function(A){return(state.save(A))},activate:function(){}},{label:function(){return"rewind to here"},tooltip:function(){},activate:function(){state.rewindTo(this.passage)}}];Passage.unescapeLineBreaks=function(A){if(A&&A!=""){return A.replace(/\\n/mg,"\n").replace(/\\/mg,"\\").replace(/\r/mg,"")}else{return""}};function Tale(){this.passages={};if(document.normalize){document.normalize()}var A=$("storeArea").childNodes;for(var B=0;B<A.length;B++){var C=A[B];if(C.getAttribute&&(title=C.getAttribute("tiddler"))){this.passages[title]=new Passage(title,C,B)}}}Tale.prototype.has=function(A){if(typeof A=="string"){return(this.passages[A]!=null)}else{for(i in this.passages){if(this.passages[i].id==A){return true}}return false}};Tale.prototype.get=function(A){if(typeof A=="string"){return this.passages[A]||new Passage(A)}else{for(i in this.passages){if(this.passages[i].id==A){return this.passages[i]}}}};Tale.prototype.lookup=function(H,G,A){var D=[];for(var C in this.passages){var F=this.passages[C];var E=false;for(var B=0;B<F[H].length;B++){if(F[H][B]==G){D.push(F)}}}if(!A){A="title"}D.sort(function(J,I){if(J[A]==I[A]){return(0)}else{return(J[A]<I[A])?-1:+1}});return D};Tale.prototype.reset=function(){for(i in this.passages){this.passages[i].reset()}};function Wikifier(A,B){this.source=B;this.output=A;this.nextMatch=0;this.assembleFormatterMatches(Wikifier.formatters);this.subWikify(this.output)}Wikifier.prototype.assembleFormatterMatches=function(A){this.formatters=[];var B=[];for(var C=0;C<A.length;C++){B.push("("+A[C].match+")");this.formatters.push(A[C])}this.formatterRegExp=new RegExp(B.join("|"),"mg")};Wikifier.prototype.subWikify=function(C,B){var A=this.output;this.output=C;var F=B?new RegExp("("+B+")","mg"):null;do{this.formatterRegExp.lastIndex=this.nextMatch;if(F){F.lastIndex=this.nextMatch}var G=this.formatterRegExp.exec(this.source);var E=F?F.exec(this.source):null;if(E&&(!G||E.index<=G.index)){if(E.index>this.nextMatch){this.outputText(this.output,this.nextMatch,E.index)}this.matchStart=E.index;this.matchLength=E[1].length;this.matchText=E[1];this.nextMatch=E.index+E[1].length;this.output=A;return }else{if(G){if(G.index>this.nextMatch){this.outputText(this.output,this.nextMatch,G.index)}this.matchStart=G.index;this.matchLength=G[0].length;this.matchText=G[0];this.nextMatch=this.formatterRegExp.lastIndex;var H=-1;for(var D=1;D<G.length;D++){if(G[D]){matchingFormatter=D-1}}if(matchingFormatter!=-1){this.formatters[matchingFormatter].handler(this)}}}}while(E||G);if(this.nextMatch<this.source.length){this.outputText(this.output,this.nextMatch,this.source.length);this.nextMatch=this.source.length}this.output=A};Wikifier.prototype.outputText=function(A,C,B){insertText(A,this.source.substring(C,B))};Wikifier.prototype.fullArgs=function(){var B=this.source.indexOf(" ",this.matchStart);var A=this.source.indexOf(">>",this.matchStart);return Wikifier.parse(this.source.slice(B,A))};Wikifier.parse=function(B){var A=B.replace(/\$/g,"state.history[0].variables.");A=A.replace(/\beq\b/gi," == ");A=A.replace(/\bneq\b/gi," != ");A=A.replace(/\bgt\b/gi," > ");A=A.replace(/\beq\b/gi," == ");A=A.replace(/\bneq\b/gi," != ");A=A.replace(/\bgt\b/gi," > ");A=A.replace(/\bgte\b/gi," >= ");A=A.replace(/\blt\b/gi," < ");A=A.replace(/\blte\b/gi," <= ");A=A.replace(/\band\b/gi," && ");A=A.replace(/\bor\b/gi," || ");A=A.replace(/\bnot\b/gi," ! ");return A};Wikifier.formatHelpers={charFormatHelper:function(A){var B=insertElement(A.output,this.element);A.subWikify(B,this.terminator)},inlineCssHelper:function(F){var H=[];var A="(?:("+Wikifier.textPrimitives.anyLetter+"+)\\(([^\\)\\|\\n]+)(?:\\):))|(?:("+Wikifier.textPrimitives.anyLetter+"+):([^;\\|\\n]+);)";var B=new RegExp(A,"mg");var C=false;do{B.lastIndex=F.nextMatch;var D=B.exec(F.source);var E=D&&D.index==F.nextMatch;if(E){var I,G;C=true;if(D[1]){I=D[1].unDash();G=D[2]}else{I=D[3].unDash();G=D[4]}switch(I){case"bgcolor":I="backgroundColor";break}H.push({style:I,value:G});F.nextMatch=D.index+D[0].length}}while(E);return H},monospacedByLineHelper:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart){var E=C[1];if(navigator.userAgent.indexOf("msie")!=-1&&navigator.userAgent.indexOf("opera")==-1){E=E.replace(/\n/g,"\r")}var D=insertElement(A.output,"pre",null,null,E);A.nextMatch=C.index+C[0].length}}};Wikifier.formatters=[{name:"table",match:"^\\|(?:[^\\n]*)\\|(?:[fhc]?)$",lookahead:"^\\|([^\\n]*)\\|([fhc]?)$",rowTerminator:"\\|(?:[fhc]?)$\\n?",cellPattern:"(?:\\|([^\\n\\|]*)\\|)|(\\|[fhc]?$\\n?)",cellTerminator:"(?:\\x20*)\\|",rowTypes:{c:"caption",h:"thead","":"tbody",f:"tfoot"},handler:function(H){var J=insertElement(H.output,"table");H.nextMatch=H.matchStart;var C=new RegExp(this.lookahead,"mg");var D=null,A;var K,E;var I=[];var G=0;do{C.lastIndex=H.nextMatch;var F=C.exec(H.source);var B=F&&F.index==H.nextMatch;if(B){A=F[2];if(A!=D){K=insertElement(J,this.rowTypes[A])}D=A;if(D=="c"){if(G==0){K.setAttribute("align","top")}else{K.setAttribute("align","bottom")}H.nextMatch=H.nextMatch+1;H.subWikify(K,this.rowTerminator)}else{E=insertElement(K,"tr");this.rowHandler(H,E,I)}G++}}while(B)},rowHandler:function(G,D,K){var A=0;var I=1;var C=new RegExp(this.cellPattern,"mg");do{C.lastIndex=G.nextMatch;var E=C.exec(G.source);matched=E&&E.index==G.nextMatch;if(matched){if(E[1]=="~"){var J=K[A];if(J){J.rowCount++;J.element.setAttribute("rowSpan",J.rowCount);J.element.setAttribute("rowspan",J.rowCount);J.element.valign="center"}G.nextMatch=E.index+E[0].length-1}else{if(E[1]==">"){I++;G.nextMatch=E.index+E[0].length-1}else{if(E[2]){G.nextMatch=E.index+E[0].length;break}else{var B=false,F=false;G.nextMatch++;var M=Wikifier.formatHelpers.inlineCssHelper(G);while(G.source.substr(G.nextMatch,1)==" "){B=true;G.nextMatch++}var H;if(G.source.substr(G.nextMatch,1)=="!"){H=insertElement(D,"th");G.nextMatch++}else{H=insertElement(D,"td")}K[A]={rowCount:1,element:H};lastColCount=1;lastColElement=H;if(I>1){H.setAttribute("colSpan",I);H.setAttribute("colspan",I);I=1}for(var L=0;L<M.length;L++){H.style[M[L].style]=M[L].value}G.subWikify(H,this.cellTerminator);if(G.matchText.substr(G.matchText.length-2,1)==" "){F=true}if(B&&F){H.align="center"}else{if(B){H.align="right"}else{if(F){H.align="left"}}}G.nextMatch=G.nextMatch-1}}}A++}}while(matched)}},{name:"rule",match:"^----$\\n?",handler:function(A){insertElement(A.output,"hr")}},{name:"emdash",match:"--",handler:function(A){var B=insertElement(A.output,"span");B.innerHTML="—"}},{name:"heading",match:"^!{1,5}",terminator:"\\n",handler:function(A){var B=insertElement(A.output,"h"+A.matchLength);A.subWikify(B,this.terminator)}},{name:"monospacedByLine",match:"^\\{\\{\\{\\n",lookahead:"^\\{\\{\\{\\n((?:^[^\\n]*\\n)+?)(^\\}\\}\\}$\\n?)",handler:Wikifier.formatHelpers.monospacedByLineHelper},{name:"monospacedByLineForPlugin",match:"^//\\{\\{\\{\\n",lookahead:"^//\\{\\{\\{\\n\\n*((?:^[^\\n]*\\n)+?)(\\n*^//\\}\\}\\}$\\n?)",handler:Wikifier.formatHelpers.monospacedByLineHelper},{name:"wikifyCommentForPlugin",match:"^/\\*\\*\\*\\n",terminator:"^\\*\\*\\*/\\n",handler:function(A){A.subWikify(A.output,this.terminator)}},{name:"quoteByBlock",match:"^<<<\\n",terminator:"^<<<\\n",handler:function(A){var B=insertElement(A.output,"blockquote");A.subWikify(B,this.terminator)}},{name:"quoteByLine",match:"^>+",terminator:"\\n",element:"blockquote",handler:function(C){var E=new RegExp(this.match,"mg");var D=[C.output];var H=0;var B=C.matchLength;var G;do{if(B>H){for(G=H;G<B;G++){D.push(insertElement(D[D.length-1],this.element))}}else{if(B<H){for(G=H;G>B;G--){D.pop()}}}H=B;C.subWikify(D[D.length-1],this.terminator);insertElement(D[D.length-1],"br");E.lastIndex=C.nextMatch;var F=E.exec(C.source);var A=F&&F.index==C.nextMatch;if(A){B=F[0].length;C.nextMatch+=F[0].length}}while(A)}},{name:"list",match:"^(?:(?:\\*+)|(?:#+))",lookahead:"^(?:(\\*+)|(#+))",terminator:"\\n",outerElement:"ul",itemElement:"li",handler:function(I){var B=new RegExp(this.lookahead,"mg");I.nextMatch=I.matchStart;var E=[I.output];var J=null,C;var G=0,D;var K;do{B.lastIndex=I.nextMatch;var F=B.exec(I.source);var A=F&&F.index==I.nextMatch;if(A){if(F[1]){C="ul"}if(F[2]){C="ol"}D=F[0].length;I.nextMatch+=F[0].length;if(D>G){for(K=G;K<D;K++){E.push(insertElement(E[E.length-1],C))}}else{if(D<G){for(K=G;K>D;K--){E.pop()}}else{if(D==G&&C!=J){E.pop();E.push(insertElement(E[E.length-1],C))}}}G=D;J=C;var H=insertElement(E[E.length-1],"li");I.subWikify(H,this.terminator)}}while(A)}},{name:"prettyLink",match:"\\[\\[",lookahead:"\\[\\[([^\\|\\]]*?)(?:(\\]\\])|(\\|(.*?)\\]\\]))",terminator:"\\|",handler:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart&&C[2]){var D=Wikifier.createInternalLink(A.output,C[1]);A.outputText(D,A.nextMatch,A.nextMatch+C[1].length);A.nextMatch+=C[1].length+2}else{if(C&&C.index==A.matchStart&&C[3]){var E;if(tale.has(C[4])){E=Wikifier.createInternalLink(A.output,C[4])}else{E=Wikifier.createExternalLink(A.output,C[4])}A.outputText(E,A.nextMatch,A.nextMatch+C[1].length);A.nextMatch=C.index+C[0].length}}}},{name:"urlLink",match:"(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)",handler:function(A){var B=Wikifier.createExternalLink(A.output,A.matchText);A.outputText(B,A.matchStart,A.nextMatch)}},{name:"image",match:"\\[(?:[<]{0,1})(?:[>]{0,1})[Ii][Mm][Gg]\\[",lookahead:"\\[([<]{0,1})([>]{0,1})[Ii][Mm][Gg]\\[(?:([^\\|\\]]+)\\|)?([^\\[\\]\\|]+)\\](?:\\[([^\\]]*)\\]?)?(\\])",handler:function(A){var C=new RegExp(this.lookahead,"mg");C.lastIndex=A.matchStart;var D=C.exec(A.source);if(D&&D.index==A.matchStart){var E=A.output;if(D[5]){if(tale.has(D[5])){E=Wikifier.createInternalLink(A.output,D[5])}else{E=Wikifier.createExternalLink(A.output,D[5])}}var B=insertElement(E,"img");if(D[1]){B.align="left"}else{if(D[2]){B.align="right"}}if(D[3]){B.title=D[3]}B.src=D[4];A.nextMatch=D.index+D[0].length}}},{name:"macro",match:"<<",lookahead:"<<([^>\\s]+)(?:\\s*)([^>]*)>>",handler:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart&&C[1]){var F=C[2].readMacroParams();A.nextMatch=C.index+C[0].length;try{var D=macros[C[1]];if(D&&D.handler){D.handler(A.output,C[1],F,A)}else{insertElement(A.output,"span",null,"marked","macro not found: "+C[1])}}catch(E){throwError(A.output,"Error executing macro "+C[1]+": "+E.toString())}}}},{name:"html",match:"<[Hh][Tt][Mm][Ll]>",lookahead:"<[Hh][Tt][Mm][Ll]>((?:.|\\n)*?)</[Hh][Tt][Mm][Ll]>",handler:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart){var D=insertElement(A.output,"span");D.innerHTML=C[1];A.nextMatch=C.index+C[0].length}}},{name:"commentByBlock",match:"/%",lookahead:"/%((?:.|\\n)*?)%/",handler:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart){A.nextMatch=C.index+C[0].length}}},{name:"boldByChar",match:"''",terminator:"''",element:"strong",handler:Wikifier.formatHelpers.charFormatHelper},{name:"strikeByChar",match:"==",terminator:"==",element:"strike",handler:Wikifier.formatHelpers.charFormatHelper},{name:"underlineByChar",match:"__",terminator:"__",element:"u",handler:Wikifier.formatHelpers.charFormatHelper},{name:"italicByChar",match:"//",terminator:"//",element:"em",handler:Wikifier.formatHelpers.charFormatHelper},{name:"subscriptByChar",match:"~~",terminator:"~~",element:"sub",handler:Wikifier.formatHelpers.charFormatHelper},{name:"superscriptByChar",match:"\\^\\^",terminator:"\\^\\^",element:"sup",handler:Wikifier.formatHelpers.charFormatHelper},{name:"monospacedByChar",match:"\\{\\{\\{",lookahead:"\\{\\{\\{((?:.|\\n)*?)\\}\\}\\}",handler:function(A){var B=new RegExp(this.lookahead,"mg");B.lastIndex=A.matchStart;var C=B.exec(A.source);if(C&&C.index==A.matchStart){var D=insertElement(A.output,"code",null,null,C[1]);A.nextMatch=C.index+C[0].length}}},{name:"styleByChar",match:"@@",terminator:"@@",lookahead:"(?:([^\\(@]+)\\(([^\\)]+)(?:\\):))|(?:([^:@]+):([^;]+);)",handler:function(A){var D=insertElement(A.output,"span",null,null,null);var C=Wikifier.formatHelpers.inlineCssHelper(A);if(C.length==0){D.className="marked"}else{for(var B=0;B<C.length;B++){D.style[C[B].style]=C[B].value}}A.subWikify(D,this.terminator)}},{name:"lineBreak",match:"\\n",handler:function(A){insertElement(A.output,"br")}}];Wikifier.textPrimitives={anyDigit:"[0-9]",anyNumberChar:"[0-9\\.E]",urlPattern:"(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)"};Wikifier.createInternalLink=function(A,C){var B=insertElement(A,"a",C);B.href="javascript:void(0)";if(tale.has(C)){B.className="internalLink"}else{B.className="brokenLink"}B.onclick=function(){state.display(C,B)};if(A){A.appendChild(B)}return B};Wikifier.createExternalLink=function(A,B){var C=insertElement(A,"a");C.href=B;C.className="externalLink";C.target="_blank";if(A){A.appendChild(C)}return C};if(!((new RegExp("[\u0150\u0170]","g")).test("\u0150"))){Wikifier.textPrimitives.upperLetter="[A-Z\u00c0-\u00de]";Wikifier.textPrimitives.lowerLetter="[a-z\u00df-\u00ff_0-9\\-]";Wikifier.textPrimitives.anyLetter="[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-]"}else{Wikifier.textPrimitives.upperLetter="[A-Z\u00c0-\u00de\u0150\u0170]";Wikifier.textPrimitives.lowerLetter="[a-z\u00df-\u00ff_0-9\\-\u0151\u0171]";Wikifier.textPrimitives.anyLetter="[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-\u0150\u0170\u0151\u0171]"};
</script>
<style type="text/css">
body{background-color:#eee;color:#303030;font-family:Verdana,sans-serif;font-size:62.5%;margin:0;text-align:center;}h1,h2,h3{color:#000;font-weight:normal;text-align:center;}h1{font-size:4em;line-height:1.2em;margin-bottom:0;margin-top:1em;}h2{font-size:1.4em;font-style:italic;margin-top:1em;}h3{font-size:1.3em;margin-bottom:5em;margin-top:.8em;}.passage{background-color:#eee;font-size:1.3em;line-height:175%;margin-bottom:2em;}ul li{list-style-type:square;}.toolbar a{color:#999;text-decoration:none;}.toolbar a:hover{text-decoration:underline;color:#8ea6ff;}a.internalLink,a.externalLink{color:#4d6ad8;font-weight:bold;text-decoration:none;}a.internalLink:hover,a.externalLink:hover{text-decoration:underline;color:#8ea6ff;}a.brokenLink{background-color:red;color:black;}.title{color:#000;font:bold 1.4em Verdana,sans-serif;line-height:200%;}#footer{font-size:1.1em;font-style:italic;margin-top:5em;text-align:center;}#footer a.externalLink{border-bottom:1px solid #464646;color:#464646;font-weight:normal;}.marked{background-color:pink;margin-right:12px;}.disabled{color:#aaa;font-style:italic;}#floater{_position:absolute;_width:100px;background-color:#fff;border-left:1px solid #ddd;border-bottom:2px solid #aaa;font-size:1.1em;padding:0 20px;position:fixed;right:0;text-align:center;top:0;line-height:100%;}#floater a:link,#floater a:visited{color:#999;font-weight:bold;text-decoration:none;}#floater a:hover{color:#8ea6ff;text-decoration:underline;}#content1{margin:0 20em 1em 20em;text-align:left;}.toolbar{padding:0;visibility:hidden;font-size:.5em;}.toolbar a{margin-left:12px;}.selected .toolbar{visibility:visible;}.passage ul{margin-left:.5em;padding-left:1.5em;}.passage ol{margin-left:.5em;padding-left:1.5em;}.passage table{border-collapse:collapse;font-size:100%;margin:.8em 1.0em;}.passage th,.passage td,.passage tr,.passage caption{padding:3px;}.passage hr{height:1px;}#saveTest,.footer{display:none;}#messageArea{background-color:pink;display:none;font-weight:bold;text-align:center;}#storeArea,#copyright{display:none;}
</style>
</head>
<body onload="main()">
<div id="floater"><div class="container">
<div id="storyMenu"></div>
<p><a href="javascript:state.restart()">Restart Story</a></p>
</div></div>
<div id="content1"><div id="content2">
<div id="header"></div><div id="titleLine"></div>
<h1><span id="storyTitle"></span></h1>
<h2><span id="storySubtitle"></span></h2>
<h3><span id="storyAuthor"></span></h3>
<div id="passages"></div>
<p id="footer">
This story was created with <a class="externalLink" href="http://gimcrackd.com/etc/src/">Twee</a> and is powered by <a class="externalLink" href="http://www.tiddlywiki.com/">TiddlyWiki</a>.
</p>
</div></div>
<div id="storeArea">