Guest User

Untitled

a guest
Oct 24th, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 392.56 KB | None | 0 0
  1. window.storyFormat({"name":"Harlowe","version":"2.0.1","author":"Leon Arnott","description":"The default story format for Twine 2. See its <a href='http://twine2.neocities.org/' target='_blank' rel='noopener noreferrer'>documentation</a>.","image":"icon.svg","url":"http://twinery.org/","license":"Zlib","proofing":false,"source":"<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>{{STORY_NAME}}</title>\n<style title=\"Twine CSS\"></style>\n</head>\n\n<body>\n\n<tw-story></tw-story>\n\n{{STORY_DATA}}\n\n<script title=\"Twine engine code\" data-main=\"harlowe\">\"use strict\";var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i[\"return\"])_i[\"return\"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i)}else{throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}}();var _typeof=typeof Symbol===\"function\"&&typeof Symbol.iterator===\"symbol\"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol===\"function\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\"symbol\":typeof obj};function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i]}return arr2}else{return Array.from(arr)}}(function(){var requirejs,require,define;(function(undef){var main,_req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split(\"/\"),map=config.map,starMap=map&&map[\"*\"]||{};if(name){name=name.split(\"/\");lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,\"\")}if(name[0].charAt(0)===\".\"&&baseParts){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=normalizedBaseParts.concat(name)}for(i=0;i<name.length;i++){part=name[i];if(part===\".\"){name.splice(i,1);i-=1}else if(part===\"..\"){if(i===0||i===1&&name[2]===\"..\"||name[i-1]===\"..\"){continue}else if(i>0){name.splice(i-1,2);i-=2}}}name=name.join(\"/\")}if((baseParts||starMap)&&map){nameParts=name.split(\"/\");for(i=nameParts.length;i>0;i-=1){nameSegment=nameParts.slice(0,i).join(\"/\");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join(\"/\")];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i;break}}}}if(foundMap){break}if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i}}if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI}if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join(\"/\")}}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!==\"string\"&&args.length===1){args.push(null)}return _req.apply(undef,args.concat([relName,forceSync]))}}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];defining[name]=true;main.apply(undef,args)}if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error(\"No \"+name)}return defined[name]}function splitPrefix(name){var prefix,index=name?name.indexOf(\"!\"):-1;if(index>-1){prefix=name.substring(0,index);name=name.substring(index+1,name.length)}return[prefix,name]}function makeRelParts(relName){return relName?splitPrefix(relName):[]}makeMap=function makeMap(name,relParts){var plugin,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];name=parts[1];if(prefix){prefix=normalize(prefix,relResourceName);plugin=callDep(prefix)}if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relResourceName))}else{name=normalize(name,relResourceName)}}else{name=normalize(name,relResourceName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix)}}return{f:prefix?prefix+\"!\"+name:name,n:name,pr:prefix,p:plugin}};function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}handlers={require:function require(name){return makeRequire(name)},exports:function exports(name){var e=defined[name];if(typeof e!==\"undefined\"){return e}else{return defined[name]={}}},module:function module(name){return{id:name,uri:\"\",exports:defined[name],config:makeConfig(name)}}};main=function main(name,deps,callback,relName){var cjsModule,depName,ret,map,i,relParts,args=[],callbackType=typeof callback===\"undefined\"?\"undefined\":_typeof(callback),usingExports;relName=relName||name;relParts=makeRelParts(relName);if(callbackType===\"undefined\"||callbackType===\"function\"){deps=!deps.length&&callback.length?[\"require\",\"exports\",\"module\"]:deps;for(i=0;i<deps.length;i+=1){map=makeMap(deps[i],relParts);depName=map.f;if(depName===\"require\"){args[i]=handlers.require(name)}else if(depName===\"exports\"){args[i]=handlers.exports(name);usingExports=true}else if(depName===\"module\"){cjsModule=args[i]=handlers.module(name)}else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName)){args[i]=callDep(depName)}else if(map.p){map.p.load(map.n,makeRequire(relName,true),makeLoad(depName),{});args[i]=defined[depName]}else{throw new Error(name+\" missing \"+depName)}}ret=callback?callback.apply(defined[name],args):undefined;if(name){if(cjsModule&&cjsModule.exports!==undef&&cjsModule.exports!==defined[name]){defined[name]=cjsModule.exports}else if(ret!==undef||!usingExports){defined[name]=ret}}}else if(name){defined[name]=callback}};requirejs=require=_req=function req(deps,callback,relName,forceSync,alt){if(typeof deps===\"string\"){if(handlers[deps]){return handlers[deps](callback)}return callDep(makeMap(deps,makeRelParts(callback)).f)}else if(!deps.splice){config=deps;if(config.deps){_req(config.deps,config.callback)}if(!callback){return}if(callback.splice){deps=callback;callback=relName;relName=null}else{deps=undef}}callback=callback||function(){};if(typeof relName===\"function\"){relName=forceSync;forceSync=alt}if(forceSync){main(undef,deps,callback,relName)}else{setTimeout(function(){main(undef,deps,callback,relName)},4)}return _req};_req.config=function(cfg){return _req(cfg)};requirejs._defined=defined;define=function define(name,deps,callback){if(typeof name!==\"string\"){throw new Error(\"See almond README: incorrect module build, no module name\")}if(!deps.splice){callback=deps;deps=[]}if(!hasProp(defined,name)&&!hasProp(waiting,name)){waiting[name]=[name,deps,callback]}};define.amd={jQuery:true}})();define(\"almond\",function(){});(function(global,factory){\"use strict\";if((typeof module===\"undefined\"?\"undefined\":_typeof(module))===\"object\"&&_typeof(module.exports)===\"object\"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error(\"jQuery requires a window with a document\")}return factory(w)}}else{factory(global)}})(typeof window!==\"undefined\"?window:this,function(window,noGlobal){\"use strict\";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var _slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};function DOMEval(code,doc){doc=doc||document;var script=doc.createElement(\"script\");script.text=code;doc.head.appendChild(script).parentNode.removeChild(script)}var version=\"3.2.1\",jQuery=function jQuery(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g,fcamelCase=function fcamelCase(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function toArray(){return _slice.call(this)},get:function get(num){if(num==null){return _slice.call(this)}return num<0?this[num+this.length]:this[num]},pushStack:function pushStack(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret},each:function each(callback){return jQuery.each(this,callback)},map:function map(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function slice(){return this.pushStack(_slice.apply(this,arguments))},first:function first(){return this.eq(0)},last:function last(){return this.eq(-1)},eq:function eq(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function end(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target===\"boolean\"){deep=target;target=arguments[i]||{};i++}if((typeof target===\"undefined\"?\"undefined\":_typeof(target))!==\"object\"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};jQuery.extend({expando:\"jQuery\"+(version+Math.random()).replace(/\\D/g,\"\"),isReady:true,error:function error(msg){throw new Error(msg)},noop:function noop(){},isFunction:function isFunction(obj){return jQuery.type(obj)===\"function\"},isWindow:function isWindow(obj){return obj!=null&&obj===obj.window},isNumeric:function isNumeric(obj){var type=jQuery.type(obj);return(type===\"number\"||type===\"string\")&&!isNaN(obj-parseFloat(obj))},isPlainObject:function isPlainObject(obj){var proto,Ctor;if(!obj||toString.call(obj)!==\"[object Object]\"){return false}proto=getProto(obj);if(!proto){return true}Ctor=hasOwn.call(proto,\"constructor\")&&proto.constructor;return typeof Ctor===\"function\"&&fnToString.call(Ctor)===ObjectFunctionString},isEmptyObject:function isEmptyObject(obj){var name;for(name in obj){return false}return true},type:function type(obj){if(obj==null){return obj+\"\"}return(typeof obj===\"undefined\"?\"undefined\":_typeof(obj))===\"object\"||typeof obj===\"function\"?class2type[toString.call(obj)]||\"object\":typeof obj===\"undefined\"?\"undefined\":_typeof(obj)},globalEval:function globalEval(code){DOMEval(code)},camelCase:function camelCase(string){return string.replace(rmsPrefix,\"ms-\").replace(rdashAlpha,fcamelCase)},each:function each(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break}}}return obj},trim:function trim(text){return text==null?\"\":(text+\"\").replace(rtrim,\"\")},makeArray:function makeArray(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr===\"string\"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function inArray(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function merge(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function grep(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function map(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return concat.apply([],ret)},guid:1,proxy:function proxy(fn,context){var tmp,args,proxy;if(typeof context===\"string\"){tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn)){return undefined}args=_slice.call(arguments,2);proxy=function proxy(){return fn.apply(context||this,args.concat(_slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});if(typeof Symbol===\"function\"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]}jQuery.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(i,name){class2type[\"[object \"+name+\"]\"]=name.toLowerCase()});function isArrayLike(obj){var length=!!obj&&\"length\"in obj&&obj.length,type=jQuery.type(obj);if(type===\"function\"||jQuery.isWindow(obj)){return false}return type===\"array\"||length===0||typeof length===\"number\"&&length>0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando=\"sizzle\"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function sortOrder(a,b){if(a===b){hasDuplicate=true}return 0},hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function indexOf(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return-1},booleans=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",whitespace=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",identifier=\"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",attributes=\"\\\\[\"+whitespace+\"*(\"+identifier+\")(?:\"+whitespace+\"*([*^$|!~]?=)\"+whitespace+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+identifier+\"))|)\"+whitespace+\"*\\\\]\",pseudos=\":(\"+identifier+\")(?:\\\\((\"+\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\"+\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+attributes+\")*)|\"+\".*\"+\")\\\\)|)\",rwhitespace=new RegExp(whitespace+\"+\",\"g\"),rtrim=new RegExp(\"^\"+whitespace+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+whitespace+\"+$\",\"g\"),rcomma=new RegExp(\"^\"+whitespace+\"*,\"+whitespace+\"*\"),rcombinators=new RegExp(\"^\"+whitespace+\"*([>+~]|\"+whitespace+\")\"+whitespace+\"*\"),rattributeQuotes=new RegExp(\"=\"+whitespace+\"*([^\\\\]'\\\"]*?)\"+whitespace+\"*\\\\]\",\"g\"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp(\"^\"+identifier+\"$\"),matchExpr={ID:new RegExp(\"^#(\"+identifier+\")\"),CLASS:new RegExp(\"^\\\\.(\"+identifier+\")\"),TAG:new RegExp(\"^(\"+identifier+\"|[*])\"),ATTR:new RegExp(\"^\"+attributes),PSEUDO:new RegExp(\"^\"+pseudos),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+whitespace+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+whitespace+\"*(?:([+-]|)\"+whitespace+\"*(\\\\d+)|))\"+whitespace+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+booleans+\")$\",\"i\"),needsContext:new RegExp(\"^\"+whitespace+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+whitespace+\"*((?:-\\\\d)?\\\\d*)\"+whitespace+\"*\\\\)|)(?=[^-]|$)\",\"i\")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\\d$/i,rnative=/^[^{]+\\{\\s*\\[native \\w/,rquickExpr=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+whitespace+\"?|(\"+whitespace+\")|.)\",\"ig\"),funescape=function funescape(_,escaped,escapedWhitespace){var high=\"0x\"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},rcssescape=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,fcssescape=function fcssescape(ch,asCodePoint){if(asCodePoint){if(ch===\"\\0\"){return\"�\"}return ch.slice(0,-1)+\"\\\\\"+ch.charCodeAt(ch.length-1).toString(16)+\" \"}return\"\\\\\"+ch},unloadHandler=function unloadHandler(){setDocument()},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&(\"form\"in elem||\"label\"in elem)},{dir:\"parentNode\",next:\"legend\"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!==\"string\"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&!compilerCache[selector+\" \"]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector}else if(context.nodeName.toLowerCase()!==\"object\"){if(nid=context.getAttribute(\"id\")){nid=nid.replace(rcssescape,fcssescape)}else{context.setAttribute(\"id\",nid=expando)}groups=tokenize(selector);i=groups.length;while(i--){groups[i]=\"#\"+nid+\" \"+toSelector(groups[i])}newSelector=groups.join(\",\");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(nid===expando){context.removeAttribute(\"id\")}}}}}}return select(selector.replace(rtrim,\"$1\"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+\" \")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+\" \"]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var el=document.createElement(\"fieldset\");try{return!!fn(el)}catch(e){return false}finally{if(el.parentNode){el.parentNode.removeChild(el)}el=null}}function addHandle(attrs,handler){var arr=attrs.split(\"|\"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name===\"input\"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name===\"input\"||name===\"button\")&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){if(\"form\"in elem){if(elem.parentNode&&elem.disabled===false){if(\"label\"in elem){if(\"label\"in elem.parentNode){return elem.parentNode.disabled===disabled}else{return elem.disabled===disabled}}return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled}return elem.disabled===disabled}else if(\"label\"in elem){return elem.disabled===disabled}return false}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!==\"undefined\"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!==\"HTML\":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener(\"unload\",unloadHandler,false)}else if(subWindow.attachEvent){subWindow.attachEvent(\"onunload\",unloadHandler)}}support.attributes=assert(function(el){el.className=\"i\";return!el.getAttribute(\"className\")});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(\"\"));return!el.getElementsByTagName(\"*\").length});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length});if(support.getById){Expr.filter[\"ID\"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute(\"id\")===attrId}};Expr.find[\"ID\"]=function(id,context){if(typeof context.getElementById!==\"undefined\"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}}else{Expr.filter[\"ID\"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==\"undefined\"&&elem.getAttributeNode(\"id\");return node&&node.value===attrId}};Expr.find[\"ID\"]=function(id,context){if(typeof context.getElementById!==\"undefined\"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode(\"id\");if(node&&node.value===id){return[elem]}elems=context.getElementsByName(id);i=0;while(elem=elems[i++]){node=elem.getAttributeNode(\"id\");if(node&&node.value===id){return[elem]}}}return[]}}}Expr.find[\"TAG\"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!==\"undefined\"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag===\"*\"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find[\"CLASS\"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==\"undefined\"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(document.querySelectorAll)){assert(function(el){docElem.appendChild(el).innerHTML=\"<a id='\"+expando+\"'></a>\"+\"<select id='\"+expando+\"-\\r\\\\' msallowcapture=''>\"+\"<option selected=''></option></select>\";if(el.querySelectorAll(\"[msallowcapture^='']\").length){rbuggyQSA.push(\"[*^$]=\"+whitespace+\"*(?:''|\\\"\\\")\")}if(!el.querySelectorAll(\"[selected]\").length){rbuggyQSA.push(\"\\\\[\"+whitespace+\"*(?:value|\"+booleans+\")\")}if(!el.querySelectorAll(\"[id~=\"+expando+\"-]\").length){rbuggyQSA.push(\"~=\")}if(!el.querySelectorAll(\":checked\").length){rbuggyQSA.push(\":checked\")}if(!el.querySelectorAll(\"a#\"+expando+\"+*\").length){rbuggyQSA.push(\".#.+[+~]\")}});assert(function(el){el.innerHTML=\"<a href='' disabled='disabled'></a>\"+\"<select disabled='disabled'><option/></select>\";var input=document.createElement(\"input\");input.setAttribute(\"type\",\"hidden\");el.appendChild(input).setAttribute(\"name\",\"D\");if(el.querySelectorAll(\"[name=d]\").length){rbuggyQSA.push(\"name\"+whitespace+\"*[*^$|!~]?=\")}if(el.querySelectorAll(\":enabled\").length!==2){rbuggyQSA.push(\":enabled\",\":disabled\")}docElem.appendChild(el).disabled=true;if(el.querySelectorAll(\":disabled\").length!==2){rbuggyQSA.push(\":enabled\",\":disabled\")}el.querySelectorAll(\"*,:x\");rbuggyQSA.push(\",.*:\")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(el){support.disconnectedMatch=matches.call(el,\"*\");matches.call(el,\"[s!='']:x\");rbuggyMatches.push(\"!=\",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join(\"|\"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join(\"|\"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,\"='$1']\");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+\" \"]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.escape=function(sel){return(sel+\"\").replace(rcssescape,fcssescape)};Sizzle.error=function(msg){throw new Error(\"Syntax error, unrecognized expression: \"+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret=\"\",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent===\"string\"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:true},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:true},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function ATTR(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||\"\").replace(runescape,funescape);if(match[2]===\"~=\"){match[3]=\" \"+match[3]+\" \"}return match.slice(0,4)},CHILD:function CHILD(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)===\"nth\"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]===\"even\"||match[3]===\"odd\"));match[5]=+(match[7]+match[8]||match[3]===\"odd\")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function PSEUDO(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr[\"CHILD\"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||\"\"}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(\")\",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function TAG(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector===\"*\"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function CLASS(className){var pattern=classCache[className+\" \"];return pattern||(pattern=new RegExp(\"(^|\"+whitespace+\")\"+className+\"(\"+whitespace+\"|$)\"))&&classCache(className,function(elem){return pattern.test(typeof elem.className===\"string\"&&elem.className||typeof elem.getAttribute!==\"undefined\"&&elem.getAttribute(\"class\")||\"\")})},ATTR:function ATTR(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator===\"!=\"}if(!operator){return true}result+=\"\";return operator===\"=\"?result===check:operator===\"!=\"?result!==check:operator===\"^=\"?check&&result.indexOf(check)===0:operator===\"*=\"?check&&result.indexOf(check)>-1:operator===\"$=\"?check&&result.slice(-check.length)===check:operator===\"~=\"?(\" \"+result.replace(rwhitespace,\" \")+\" \").indexOf(check)>-1:operator===\"|=\"?result===check||result.slice(0,check.length+1)===check+\"-\":false}},CHILD:function CHILD(type,what,argument,first,last){var simple=type.slice(0,3)!==\"nth\",forward=type.slice(-4)!==\"last\",ofType=what===\"of-type\";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?\"nextSibling\":\"previousSibling\",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type===\"only\"&&!start&&\"nextSibling\"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function PSEUDO(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error(\"unsupported pseudo: \"+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,\"\",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,\"$1\"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||\"\")){Sizzle.error(\"unsupported lang: \"+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute(\"xml:lang\")||elem.getAttribute(\"lang\")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+\"-\")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function target(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function root(elem){return elem===docElem},focus:function focus(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function checked(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName===\"input\"&&!!elem.checked||nodeName===\"option\"&&!!elem.selected},selected:function selected(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function empty(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function parent(elem){return!Expr.pseudos[\"empty\"](elem)},header:function header(elem){return rheader.test(elem.nodeName)},input:function input(elem){return rinputs.test(elem.nodeName)},button:function button(elem){var name=elem.nodeName.toLowerCase();return name===\"input\"&&elem.type===\"button\"||name===\"button\"},text:function text(elem){var attr;return elem.nodeName.toLowerCase()===\"input\"&&elem.type===\"text\"&&((attr=elem.getAttribute(\"type\"))==null||attr.toLowerCase()===\"text\")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos[\"nth\"]=Expr.pseudos[\"eq\"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+\" \"];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim,\" \")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};function toSelector(tokens){var i=0,len=tokens.length,selector=\"\";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key===\"parentNode\",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}return false}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{uniqueCache[key]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}return false}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||\"*\",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml)}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){temp.push(matcherIn[i]=elem)}}postFinder(null,matcherOut=[],temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[\" \"],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===\" \"?\"*\":\"\"})).replace(rtrim,\"$1\"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function superMatcher(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i=\"0\",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find[\"TAG\"](\"*\",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context===document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+\" \"];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector===\"function\"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type===\"ID\"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find[\"ID\"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr[\"needsContext\"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split(\"\").sort(sortOrder).join(\"\")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement(\"fieldset\"))&1});if(!assert(function(el){el.innerHTML=\"<a href='#'></a>\";return el.firstChild.getAttribute(\"href\")===\"#\"})){addHandle(\"type|href|height|width\",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()===\"type\"?1:2)}})}if(!support.attributes||!assert(function(el){el.innerHTML=\"<input/>\";el.firstChild.setAttribute(\"value\",\"\");return el.firstChild.getAttribute(\"value\")===\"\"})){addHandle(\"value\",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()===\"input\"){return elem.defaultValue}})}if(!assert(function(el){return el.getAttribute(\"disabled\")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[\":\"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function dir(elem,_dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[_dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var _siblings=function _siblings(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var rsingleTag=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;var risSimple=/^.[^:#\\[\\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier!==\"string\"){return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not})}if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements);return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not&&elem.nodeType===1})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=\":not(\"+expr+\")\"}if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[]}return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function find(selector){var i,ret,len=this.length,self=this;if(typeof selector!==\"string\"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}return len>1?jQuery.uniqueSort(ret):ret},filter:function filter(selector){return this.pushStack(winnow(this,selector||[],false))},not:function not(selector){return this.pushStack(winnow(this,selector||[],true))},is:function is(selector){return!!winnow(this,typeof selector===\"string\"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector===\"string\"){if(selector[0]===\"<\"&&selector[selector.length-1]===\">\"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1}return this}}else if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery)}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function has(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function closest(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!==\"string\"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function index(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem===\"string\"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function add(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function addBack(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function parent(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function parents(elem){return dir(elem,\"parentNode\")},parentsUntil:function parentsUntil(elem,i,until){return dir(elem,\"parentNode\",until)},next:function next(elem){return sibling(elem,\"nextSibling\")},prev:function prev(elem){return sibling(elem,\"previousSibling\")},nextAll:function nextAll(elem){return dir(elem,\"nextSibling\")},prevAll:function prevAll(elem){return dir(elem,\"previousSibling\")},nextUntil:function nextUntil(elem,i,until){return dir(elem,\"nextSibling\",until)},prevUntil:function prevUntil(elem,i,until){return dir(elem,\"previousSibling\",until)},siblings:function siblings(elem){return _siblings((elem.parentNode||{}).firstChild,elem)},children:function children(elem){return _siblings(elem.firstChild)},contents:function contents(elem){if(nodeName(elem,\"iframe\")){return elem.contentDocument}if(nodeName(elem,\"template\")){elem=elem.content||elem}return jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!==\"Until\"){selector=until}if(selector&&typeof selector===\"string\"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnothtmlwhite=/[^\\x20\\t\\r\\n\\f]+/g;function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options===\"string\"?createOptions(options):jQuery.extend({},options);var firing,memory,_fired,_locked,list=[],queue=[],firingIndex=-1,fire=function fire(){_locked=_locked||options.once;_fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false}}}if(!options.memory){memory=false}firing=false;if(_locked){if(memory){list=[]}else{list=\"\"}}},self={add:function add(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory)}(function add(args){jQuery.each(args,function(_,arg){if(jQuery.isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg)}}else if(arg&&arg.length&&jQuery.type(arg)!==\"string\"){add(arg)}})})(arguments);if(memory&&!firing){fire()}}return this},remove:function remove(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--}}});return this},has:function has(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function empty(){if(list){list=[]}return this},disable:function disable(){_locked=queue=[];list=memory=\"\";return this},disabled:function disabled(){return!list},lock:function lock(){_locked=queue=[];if(!memory&&!firing){list=memory=\"\"}return this},locked:function locked(){return!!_locked},fireWith:function fireWith(context,args){if(!_locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function fire(){self.fireWith(this,arguments);return this},fired:function fired(){return!!_fired}};return self};function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&jQuery.isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject)}else if(value&&jQuery.isFunction(method=value.then)){method.call(value,resolve,reject)}else{resolve.apply(undefined,[value].slice(noValue))}}catch(value){reject.apply(undefined,[value])}}jQuery.extend({Deferred:function Deferred(func){var tuples=[[\"notify\",\"progress\",jQuery.Callbacks(\"memory\"),jQuery.Callbacks(\"memory\"),2],[\"resolve\",\"done\",jQuery.Callbacks(\"once memory\"),jQuery.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",jQuery.Callbacks(\"once memory\"),jQuery.Callbacks(\"once memory\"),1,\"rejected\"]],_state=\"pending\",_promise2={state:function state(){return _state},always:function always(){deferred.done(arguments).fail(arguments);return this},catch:function _catch(fn){return _promise2.then(null,fn)},pipe:function pipe(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+\"With\"](this,fn?[returned]:arguments)}})});fns=null}).promise()},then:function then(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function mightThrow(){var returned,then;if(depth<maxDepth){return}returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError(\"Thenable self-resolution\")}then=returned&&((typeof returned===\"undefined\"?\"undefined\":_typeof(returned))===\"object\"||typeof returned===\"function\")&&returned.then;if(jQuery.isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special))}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith))}}else{if(handler!==Identity){that=undefined;args=[returned]}(special||deferred.resolveWith)(that,args)}},process=special?mightThrow:function(){try{mightThrow()}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace)}if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e]}deferred.rejectWith(that,args)}}};if(depth){process()}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook()}window.setTimeout(process)}}}return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,jQuery.isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,jQuery.isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,jQuery.isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function promise(obj){return obj!=null?jQuery.extend(obj,_promise2):_promise2}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];_promise2[tuple[1]]=list.add;if(stateString){list.add(function(){_state=stateString},tuples[3-i][2].disable,tuples[0][2].lock)}list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+\"With\"](this===deferred?undefined:this,arguments);return this};deferred[tuple[0]+\"With\"]=list.fireWith});_promise2.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function when(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=_slice.call(arguments),master=jQuery.Deferred(),updateFunc=function updateFunc(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?_slice.call(arguments):value;if(!--remaining){master.resolveWith(resolveContexts,resolveValues)}}};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()===\"pending\"||jQuery.isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then()}}while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject)}return master.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn(\"jQuery.Deferred exception: \"+error.message,error.stack,stack)}};jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error)});return this};jQuery.extend({isReady:false,readyWait:1,ready:function ready(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery])}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready()}if(document.readyState===\"complete\"||document.readyState!==\"loading\"&&!document.documentElement.doScroll){window.setTimeout(jQuery.ready)}else{document.addEventListener(\"DOMContentLoaded\",completed);window.addEventListener(\"load\",completed)}var access=function access(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)===\"object\"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function fn(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}if(chainable){return elems}if(bulk){return fn.call(elems)}return len?fn(elems[0],key):emptyGet};var acceptData=function acceptData(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.prototype={cache:function cache(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true})}}}return value},set:function set(owner,data,value){var prop,cache=this.cache(owner);if(typeof data===\"string\"){cache[jQuery.camelCase(data)]=value}else{for(prop in data){cache[jQuery.camelCase(prop)]=data[prop]}}return cache},get:function get(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][jQuery.camelCase(key)]},access:function access(owner,key,value){if(key===undefined||key&&typeof key===\"string\"&&value===undefined){return this.get(owner,key)}this.set(owner,key,value);return value!==undefined?value:key},remove:function remove(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return}if(key!==undefined){if(Array.isArray(key)){key=key.map(jQuery.camelCase)}else{key=jQuery.camelCase(key);key=key in cache?[key]:key.match(rnothtmlwhite)||[]}i=key.length;while(i--){delete cache[key[i]]}}if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined}else{delete owner[this.expando]}}},hasData:function hasData(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data;var dataUser=new Data;var rbrace=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data===\"true\"){return true}if(data===\"false\"){return false}if(data===\"null\"){return null}if(data===+data+\"\"){return+data}if(rbrace.test(data)){return JSON.parse(data)}return data}function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name=\"data-\"+key.replace(rmultiDash,\"-$&\").toLowerCase();data=elem.getAttribute(name);if(typeof data===\"string\"){try{data=getData(data)}catch(e){}dataUser.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function hasData(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function data(elem,name,_data){return dataUser.access(elem,name,_data)},removeData:function removeData(elem,name){dataUser.remove(elem,name)},_data:function _data(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function _removeData(elem,name){dataPriv.remove(elem,name)}});jQuery.fn.extend({data:function data(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,\"hasDataAttrs\")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf(\"data-\")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}dataPriv.set(elem,\"hasDataAttrs\",true)}}return data}if((typeof key===\"undefined\"?\"undefined\":_typeof(key))===\"object\"){return this.each(function(){dataUser.set(this,key)})}return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);if(data!==undefined){return data}data=dataAttr(elem,key);if(data!==undefined){return data}return}this.each(function(){dataUser.set(this,key,value)})},null,value,arguments.length>1,null,true)},removeData:function removeData(key){return this.each(function(){dataUser.remove(this,key)})}});jQuery.extend({queue:function queue(elem,type,data){var queue;if(elem){type=(type||\"fx\")+\"queue\";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function dequeue(elem,type){type=type||\"fx\";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function next(){jQuery.dequeue(elem,type)};if(fn===\"inprogress\"){fn=queue.shift();startLength--}if(fn){if(type===\"fx\"){queue.unshift(\"inprogress\")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function _queueHooks(elem,type){var key=type+\"queueHooks\";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks(\"once memory\").add(function(){dataPriv.remove(elem,[type+\"queue\",key])})})}});jQuery.fn.extend({queue:function queue(type,data){var setter=2;if(typeof type!==\"string\"){data=type;type=\"fx\";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type===\"fx\"&&queue[0]!==\"inprogress\"){jQuery.dequeue(this,type)}})},dequeue:function dequeue(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function clearQueue(type){return this.queue(type||\"fx\",[])},promise:function promise(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function resolve(){if(!--count){defer.resolveWith(elements,[elements])}};if(typeof type!==\"string\"){obj=type;type=undefined}type=type||\"fx\";while(i--){tmp=dataPriv.get(elements[i],type+\"queueHooks\");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;var rcssNum=new RegExp(\"^(?:([+-])=|)(\"+pnum+\")([a-z%]*)$\",\"i\");var cssExpand=[\"Top\",\"Right\",\"Bottom\",\"Left\"];var isHiddenWithinTree=function isHiddenWithinTree(elem,el){elem=el||elem;return elem.style.display===\"none\"||elem.style.display===\"\"&&jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,\"display\")===\"none\"};var swap=function swap(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale=1,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,\"\")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?\"\":\"px\"),initialInUnit=(jQuery.cssNumber[prop]||unit!==\"px\"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){unit=unit||initialInUnit[3];valueParts=valueParts||[];initialInUnit=+initial||1;do{scale=scale||\".5\";initialInUnit=initialInUnit/scale;jQuery.style(elem,prop,initialInUnit+unit)}while(scale!==(scale=currentValue()/initial)&&scale!==1&&--maxIterations)}if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted}}return adjusted}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display}temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,\"display\");temp.parentNode.removeChild(temp);if(display===\"none\"){display=\"block\"}defaultDisplayMap[nodeName]=display;return display}function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}display=elem.style.display;if(show){if(display===\"none\"){values[index]=dataPriv.get(elem,\"display\")||null;if(!values[index]){elem.style.display=\"\"}}if(elem.style.display===\"\"&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem)}}else{if(display!==\"none\"){values[index]=\"none\";dataPriv.set(elem,\"display\",display)}}}for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index]}}return elements}jQuery.fn.extend({show:function show(){return showHide(this,true)},hide:function hide(){return showHide(this)},toggle:function toggle(state){if(typeof state===\"boolean\"){return state?this.show():this.hide()}return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i;var rscriptType=/^$|\\/(?:java|ecma)script/i;var wrapMap={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!==\"undefined\"){ret=context.getElementsByTagName(tag||\"*\")}else if(typeof context.querySelectorAll!==\"undefined\"){ret=context.querySelectorAll(tag||\"*\")}else{ret=[]}if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret)}return ret}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],\"globalEval\",!refElements||dataPriv.get(refElements[i],\"globalEval\"))}}var rhtml=/<|&#?\\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)===\"object\"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement(\"div\"));tag=(rtagName.exec(elem)||[\"\",\"\"])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=\"\"}}}fragment.textContent=\"\";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),\"script\");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||\"\")){scripts.push(elem)}}}}return fragment}(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement(\"div\")),input=document.createElement(\"input\");input.setAttribute(\"type\",\"radio\");input.setAttribute(\"checked\",\"checked\");input.setAttribute(\"name\",\"t\");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML=\"<textarea>x</textarea>\";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var documentElement=document.documentElement;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}function _on(elem,types,selector,data,fn,one){var origFn,type;if((typeof types===\"undefined\"?\"undefined\":_typeof(types))===\"object\"){if(typeof selector!==\"string\"){data=data||selector;selector=undefined}for(type in types){_on(elem,type,selector,data,types[type],one)}return elem}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector===\"string\"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return elem}if(one===1){origFn=fn;fn=function fn(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}jQuery.event={global:{},add:function add(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(selector){jQuery.find.matchesSelector(documentElement,selector)}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==\"undefined\"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||\"\").match(rnothtmlwhite)||[\"\"];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||\"\").split(\".\").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(\".\")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function remove(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||\"\").match(rnothtmlwhite)||[\"\"];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||\"\").split(\".\").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp(\"(^|\\\\.)\"+namespaces.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector===\"**\"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,\"handle events\")}},dispatch:function dispatch(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,\"events\")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i]}event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function handlers(event,_handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=_handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type===\"click\"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type===\"click\"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=_handlers[i];sel=handleObj.selector+\" \";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length}if(matchedSelectors[sel]){matchedHandlers.push(handleObj)}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers})}}}}cur=this;if(delegateCount<_handlers.length){handlerQueue.push({elem:cur,handlers:_handlers.slice(delegateCount)})}return handlerQueue},addProp:function addProp(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:jQuery.isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent)}}:function(){if(this.originalEvent){return this.originalEvent[name]}},set:function set(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value})}})},fix:function fix(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent)},special:{load:{noBubble:true},focus:{trigger:function trigger(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:\"focusin\"},blur:{trigger:function trigger(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:\"focusout\"},click:{trigger:function trigger(){if(this.type===\"checkbox\"&&this.click&&nodeName(this,\"input\")){this.click();return false}},_default:function _default(event){return nodeName(event.target,\"a\")}},beforeunload:{postDispatch:function postDispatch(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function preventDefault(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault()}},stopPropagation:function stopPropagation(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation()}},stopImmediatePropagation:function stopImmediatePropagation(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation()}this.stopPropagation()}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,char:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function which(event){var button=event.button;if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode}if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1}if(button&2){return 3}if(button&4){return 2}return 0}return event.which}},jQuery.event.addProp);jQuery.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function handle(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});jQuery.fn.extend({on:function on(types,selector,data,fn){return _on(this,types,selector,data,fn)},one:function one(types,selector,data,fn){return _on(this,types,selector,data,fn,1)},off:function off(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+\".\"+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if((typeof types===\"undefined\"?\"undefined\":_typeof(types))===\"object\"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector===\"function\"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\\s*(?:[^=]|=\\s*.checked.)/i,rscriptTypeMasked=/^true\\/(.*)/,rcleanScript=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,\"table\")&&nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")){return jQuery(\">tbody\",elem)[0]||elem}return elem}function disableScript(elem){elem.type=(elem.getAttribute(\"type\")!==null)+\"/\"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute(\"type\")}return elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur)}}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName===\"input\"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName===\"input\"||nodeName===\"textarea\"){dest.defaultValue=src.defaultValue}}function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value===\"string\"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index){var self=collection.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}domManip(self,args,callback,ignored)})}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first||ignored){scripts=jQuery.map(getAll(fragment,\"script\"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,\"script\"))}}callback.call(collection[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||\"\")&&!dataPriv.access(node,\"globalEval\")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src)}}else{DOMEval(node.textContent.replace(rcleanScript,\"\"),doc)}}}}}}return collection}function _remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node))}if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,\"script\"))}node.parentNode.removeChild(node)}}return elem}jQuery.extend({htmlPrefilter:function htmlPrefilter(html){return html.replace(rxhtmlTag,\"<$1></$2>\")},clone:function clone(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,\"script\");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,\"script\"))}return clone},cleanData:function cleanData(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}elem[dataPriv.expando]=undefined}if(elem[dataUser.expando]){elem[dataUser.expando]=undefined}}}}});jQuery.fn.extend({detach:function detach(selector){return _remove(this,selector,true)},remove:function remove(selector){return _remove(this,selector)},text:function text(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function append(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function prepend(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function before(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function after(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},empty:function empty(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=\"\"}}return this},clone:function clone(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function html(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value===\"string\"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||[\"\",\"\"])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function replaceWith(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this)}}},ignored)}});jQuery.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var rmargin=/^margin/;var rnumnonpx=new RegExp(\"^(\"+pnum+\")(?!px)[a-z%]+$\",\"i\");var getStyles=function getStyles(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window}return view.getComputedStyle(elem)};(function(){function computeStyleTests(){if(!div){return}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\";div.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);div=null}var pixelPositionVal,boxSizingReliableVal,pixelMarginRightVal,reliableMarginLeftVal,container=document.createElement(\"div\"),div=document.createElement(\"div\");if(!div.style){return}div.style.backgroundClip=\"content-box\";div.cloneNode(true).style.backgroundClip=\"\";support.clearCloneStyle=div.style.backgroundClip===\"content-box\";container.style.cssText=\"border:0;width:8px;height:0;top:0;left:-9999px;\"+\"padding:0;margin-top:1px;position:absolute\";container.appendChild(div);jQuery.extend(support,{pixelPosition:function pixelPosition(){computeStyleTests();return pixelPositionVal},boxSizingReliable:function boxSizingReliable(){computeStyleTests();return boxSizingReliableVal},pixelMarginRight:function pixelMarginRight(){computeStyleTests();return pixelMarginRightVal},reliableMarginLeft:function reliableMarginLeft(){computeStyleTests();return reliableMarginLeftVal}})})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===\"\"&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(!support.pixelMarginRight()&&rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+\"\":ret}function addGetHookIf(conditionFn,hookFn){return{get:function get(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:\"absolute\",visibility:\"hidden\",display:\"block\"},cssNormalTransform={letterSpacing:\"0\",fontWeight:\"400\"},cssPrefixes=[\"Webkit\",\"Moz\",\"ms\"],emptyStyle=document.createElement(\"div\").style;function vendorPropName(name){if(name in emptyStyle){return name}var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name}}}function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name}return ret}function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||\"px\"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i,val=0;if(extra===(isBorderBox?\"border\":\"content\")){i=4}else{i=name===\"width\"?1:0}for(;i<4;i+=2){if(extra===\"margin\"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra===\"content\"){val-=jQuery.css(elem,\"padding\"+cssExpand[i],true,styles)}if(extra!==\"margin\"){val-=jQuery.css(elem,\"border\"+cssExpand[i]+\"Width\",true,styles)}}else{val+=jQuery.css(elem,\"padding\"+cssExpand[i],true,styles);if(extra!==\"padding\"){val+=jQuery.css(elem,\"border\"+cssExpand[i]+\"Width\",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox,styles=getStyles(elem),val=curCSS(elem,name,styles),isBorderBox=jQuery.css(elem,\"boxSizing\",false,styles)===\"border-box\";if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);if(val===\"auto\"){val=elem[\"offset\"+name[0].toUpperCase()+name.slice(1)]}val=parseFloat(val)||0;return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?\"border\":\"content\"),valueIsBorderBox,styles)+\"px\"}jQuery.extend({cssHooks:{opacity:{get:function get(elem,computed){if(computed){var ret=curCSS(elem,\"opacity\");return ret===\"\"?\"1\":ret}}}},cssNumber:{animationIterationCount:true,columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{float:\"cssFloat\"},style:function style(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value===\"undefined\"?\"undefined\":_typeof(value);if(type===\"string\"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type=\"number\"}if(value==null||value!==value){return}if(type===\"number\"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?\"\":\"px\")}if(!support.clearCloneStyle&&value===\"\"&&name.indexOf(\"background\")===0){style[name]=\"inherit\"}if(!hooks||!(\"set\"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value)}else{style[name]=value}}}else{if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function css(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&\"get\"in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val===\"normal\"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===\"\"||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val}return val}});jQuery.each([\"height\",\"width\"],function(i,name){jQuery.cssHooks[name]={get:function get(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,\"display\"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)}},set:function set(elem,value,extra){var matches,styles=extra&&getStyles(elem),subtract=extra&&augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,\"boxSizing\",false,styles)===\"border-box\",styles);if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||\"px\")!==\"px\"){elem.style[name]=value;value=jQuery.css(elem,name)}return setPositiveNumber(elem,value,subtract)}}});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,\"marginLeft\"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+\"px\"}});jQuery.each({margin:\"\",padding:\"\",border:\"Width\"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function expand(value){var i=0,expanded={},parts=typeof value===\"string\"?value.split(\" \"):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function css(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function init(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?\"\":\"px\")},cur:function cur(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function run(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function get(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,\"\");return!result||result===\"auto\"?0:result},set:function set(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function set(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function linear(p){return p},swing:function swing(p){return.5-Math.cos(p*Math.PI)/2},_default:\"swing\"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule)}else{window.setTimeout(schedule,jQuery.fx.interval)}jQuery.fx.tick()}}function createFxNow(){window.setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs[\"margin\"+which]=attrs[\"padding\"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners[\"*\"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox=\"width\"in props||\"height\"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,\"fxshow\");if(!opts.queue){hooks=jQuery._queueHooks(elem,\"fx\");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,\"fx\").length){hooks.empty.fire()}})})}for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value===\"toggle\";if(value===(hidden?\"hide\":\"show\")){if(value===\"show\"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}}propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return}if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,\"display\")}display=jQuery.css(elem,\"display\");if(display===\"none\"){if(restoreDisplay){display=restoreDisplay}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,\"display\");showHide([elem])}}if(display===\"inline\"||display===\"inline-block\"&&restoreDisplay!=null){if(jQuery.css(elem,\"float\")===\"none\"){if(!propTween){anim.done(function(){style.display=restoreDisplay});if(restoreDisplay==null){display=style.display;restoreDisplay=display===\"none\"?\"\":display}}style.display=\"inline-block\"}}}if(opts.overflow){style.overflow=\"hidden\";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}propTween=false;for(prop in orig){if(!propTween){if(dataShow){if(\"hidden\"in dataShow){hidden=dataShow.hidden}}else{dataShow=dataPriv.access(elem,\"fxshow\",{display:restoreDisplay})}if(toggle){dataShow.hidden=!hidden}if(hidden){showHide([elem],true)}anim.done(function(){if(!hidden){showHide([elem])}dataPriv.remove(elem,\"fxshow\");for(prop in orig){jQuery.style(elem,prop,orig[prop])}})}propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&\"expand\"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function tick(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}if(!length){deferred.notifyWith(elem,[animation,1,0])}deferred.resolveWith(elem,[animation]);return false},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function createTween(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function stop(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(jQuery.isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=jQuery.proxy(result.stop,result)}return result}}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation}jQuery.Animation=jQuery.extend(Animation,{tweeners:{\"*\":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween}]},tweener:function tweener(props,callback){if(jQuery.isFunction(props)){callback=props;props=[\"*\"]}else{props=props.match(rnothtmlwhite)}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback)}},prefilters:[defaultPrefilter],prefilter:function prefilter(callback,prepend){if(prepend){Animation.prefilters.unshift(callback)}else{Animation.prefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&(typeof speed===\"undefined\"?\"undefined\":_typeof(speed))===\"object\"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0}else{if(typeof opt.duration!==\"number\"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration]}else{opt.duration=jQuery.fx.speeds._default}}}if(opt.queue==null||opt.queue===true){opt.queue=\"fx\"}opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function fadeTo(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css(\"opacity\",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function animate(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function doAnimation(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,\"finish\")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function stop(type,clearQueue,gotoEnd){var stopQueue=function stopQueue(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!==\"string\"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false){this.queue(type||\"fx\",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+\"queueHooks\",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function finish(type){if(type!==false){type=type||\"fx\"}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+\"queue\"],hooks=data[type+\"queueHooks\"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each([\"toggle\",\"show\",\"hide\"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed===\"boolean\"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx(\"show\"),slideUp:genFx(\"hide\"),slideToggle:genFx(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start()};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return}inProgress=true;schedule()};jQuery.fx.stop=function(){inProgress=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||\"fx\";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})};(function(){var input=document.createElement(\"input\"),select=document.createElement(\"select\"),opt=select.appendChild(document.createElement(\"option\"));input.type=\"checkbox\";support.checkOn=input.value!==\"\";support.optSelected=opt.selected;input=document.createElement(\"input\");input.value=\"t\";input.type=\"radio\";support.radioValue=input.value===\"t\"})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function attr(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function removeAttr(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function attr(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===\"undefined\"){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return}if(hooks&&\"set\"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}elem.setAttribute(name,value+\"\");return value}if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret},attrHooks:{type:{set:function set(elem,value){if(!support.radioValue&&value===\"radio\"&&nodeName(elem,\"input\")){var val=elem.value;elem.setAttribute(\"type\",value);if(val){elem.value=val}return value}}}},removeAttr:function removeAttr(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){elem.removeAttribute(name)}}}});boolHook={set:function set(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function prop(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function removeProp(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({prop:function prop(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){if(hooks&&\"set\"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}return elem[name]=value}if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}return elem[name]},propHooks:{tabIndex:{get:function get(elem){var tabindex=jQuery.find.attr(elem,\"tabindex\");if(tabindex){return parseInt(tabindex,10)}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0}return-1}}},propFix:{for:\"htmlFor\",class:\"className\"}});if(!support.optSelected){jQuery.propHooks.selected={get:function get(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null},set:function set(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex}}}}}jQuery.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){jQuery.propFix[this.toLowerCase()]=this});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \")}function getClass(elem){return elem.getAttribute&&elem.getAttribute(\"class\")||\"\"}jQuery.fn.extend({addClass:function addClass(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))})}if(typeof value===\"string\"&&value){classes=value.match(rnothtmlwhite)||[];while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&\" \"+stripAndCollapse(curValue)+\" \";if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(\" \"+clazz+\" \")<0){cur+=clazz+\" \"}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute(\"class\",finalValue)}}}}return this},removeClass:function removeClass(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))})}if(!arguments.length){return this.attr(\"class\",\"\")}if(typeof value===\"string\"&&value){classes=value.match(rnothtmlwhite)||[];while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&\" \"+stripAndCollapse(curValue)+\" \";if(cur){j=0;while(clazz=classes[j++]){while(cur.indexOf(\" \"+clazz+\" \")>-1){cur=cur.replace(\" \"+clazz+\" \",\" \")}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute(\"class\",finalValue)}}}}return this},toggleClass:function toggleClass(value,stateVal){var type=typeof value===\"undefined\"?\"undefined\":_typeof(value);if(typeof stateVal===\"boolean\"&&type===\"string\"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)})}return this.each(function(){var className,i,self,classNames;if(type===\"string\"){i=0;self=jQuery(this);classNames=value.match(rnothtmlwhite)||[];while(className=classNames[i++]){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(value===undefined||type===\"boolean\"){className=getClass(this);if(className){dataPriv.set(this,\"__className__\",className)}if(this.setAttribute){this.setAttribute(\"class\",className||value===false?\"\":dataPriv.get(this,\"__className__\")||\"\")}}})},hasClass:function hasClass(selector){var className,elem,i=0;className=\" \"+selector+\" \";while(elem=this[i++]){if(elem.nodeType===1&&(\" \"+stripAndCollapse(getClass(elem))+\" \").indexOf(className)>-1){return true}}return false}});var rreturn=/\\r/g;jQuery.fn.extend({val:function val(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,\"value\"))!==undefined){return ret}ret=elem.value;if(typeof ret===\"string\"){return ret.replace(rreturn,\"\")}return ret==null?\"\":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=\"\"}else if(typeof val===\"number\"){val+=\"\"}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?\"\":value+\"\"})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!(\"set\"in hooks)||hooks.set(this,val,\"value\")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function get(elem){var val=jQuery.find.attr(elem,\"value\");return val!=null?val:stripAndCollapse(jQuery.text(elem))}},select:{get:function get(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type===\"select-one\",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max}else{i=one?index:0}for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,\"optgroup\"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function set(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each([\"radio\",\"checkbox\"],function(){jQuery.valHooks[this]={set:function set(elem,value){if(Array.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute(\"value\")===null?\"on\":elem.value}}});var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;jQuery.extend(jQuery.event,{trigger:function trigger(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,\"type\")?event.type:event,namespaces=hasOwn.call(event,\"namespace\")?event.namespace.split(\".\"):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(\".\")>-1){namespaces=type.split(\".\");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(\":\")<0&&\"on\"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,(typeof event===\"undefined\"?\"undefined\":_typeof(event))===\"object\"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(\".\");event.rnamespace=event.namespace?new RegExp(\"(^|\\\\.)\"+namespaces.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,\"events\")||{})[event.type]&&dataPriv.get(cur,\"handle\");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},simulate:function simulate(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem)}});jQuery.fn.extend({trigger:function trigger(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function triggerHandler(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});jQuery.each((\"blur focus focusin focusout resize scroll click dblclick \"+\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \"+\"change select submit keydown keypress keyup contextmenu\").split(\" \"),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function hover(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}});support.focusin=\"onfocusin\"in window;if(!support.focusin){jQuery.each({focus:\"focusin\",blur:\"focusout\"},function(orig,fix){var handler=function handler(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event))};jQuery.event.special[fix]={setup:function setup(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true)}dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function teardown(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix)}else{dataPriv.access(doc,fix,attaches)}}}})}var location=window.location;var nonce=jQuery.now();var rquery=/\\?/;jQuery.parseXML=function(data){var xml;if(!data||typeof data!==\"string\"){return null}try{xml=(new window.DOMParser).parseFromString(data,\"text/xml\")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName(\"parsererror\").length){jQuery.error(\"Invalid XML: \"+data)}return xml};var rbracket=/\\[\\]$/,rCRLF=/\\r?\\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+\"[\"+((typeof v===\"undefined\"?\"undefined\":_typeof(v))===\"object\"&&v!=null?i:\"\")+\"]\",v,traditional,add)}})}else if(!traditional&&jQuery.type(obj)===\"object\"){for(name in obj){buildParams(prefix+\"[\"+name+\"]\",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function add(key,valueOrFunction){var value=jQuery.isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+\"=\"+encodeURIComponent(value==null?\"\":value)};if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join(\"&\")};jQuery.fn.extend({serialize:function serialize(){return jQuery.param(this.serializeArray())},serializeArray:function serializeArray(){return this.map(function(){var elements=jQuery.prop(this,\"elements\");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(\":disabled\")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null}if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,\"\\r\\n\")}})}return{name:elem.name,value:val.replace(rCRLF,\"\\r\\n\")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\\/\\//,prefilters={},transports={},allTypes=\"*/\".concat(\"*\"),originAnchor=document.createElement(\"a\");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!==\"string\"){func=dataTypeExpression;dataTypeExpression=\"*\"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(jQuery.isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]===\"+\"){dataType=dataType.slice(1)||\"*\";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport===\"string\"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected[\"*\"]&&inspect(\"*\")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current===\"*\"){current=prev}else if(prev!==\"*\"&&prev!==current){conv=converters[prev+\" \"+current]||converters[\"* \"+current];if(!conv){for(conv2 in converters){tmp=conv2.split(\" \");if(tmp[1]===current){conv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s.throws){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current}}}}}}}return{state:\"success\",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:\"GET\",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":allTypes,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":true,\"text json\":JSON.parse,\"text xml\":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function ajaxSetup(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function ajax(url,options){if((typeof url===\"undefined\"?\"undefined\":_typeof(url))===\"object\"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks(\"once memory\"),_statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort=\"canceled\",jqXHR={readyState:0,getResponseHeader:function getResponseHeader(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function getAllResponseHeaders(){return completed?responseHeadersString:null},setRequestHeader:function setRequestHeader(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value}return this},overrideMimeType:function overrideMimeType(type){if(completed==null){s.mimeType=type}return this},statusCode:function statusCode(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status])}else{for(code in map){_statusCode[code]=[_statusCode[code],map[code]]}}}return this},abort:function abort(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+\"\").replace(rprotocol,location.protocol+\"//\");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||\"*\").toLowerCase().match(rnothtmlwhite)||[\"\"];if(s.crossDomain==null){urlAnchor=document.createElement(\"a\");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+\"//\"+originAnchor.host!==urlAnchor.protocol+\"//\"+urlAnchor.host}catch(e){s.crossDomain=true}}if(s.data&&s.processData&&typeof s.data!==\"string\"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger(\"ajaxStart\")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,\"\");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data){cacheURL+=(rquery.test(cacheURL)?\"&\":\"?\")+s.data;delete s.data}if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,\"$1\");uncached=(rquery.test(cacheURL)?\"&\":\"?\")+\"_=\"+nonce+++uncached}s.url=cacheURL+uncached}else if(s.data&&s.processData&&(s.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")===0){s.data=s.data.replace(r20,\"+\")}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader(\"If-Modified-Since\",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader(\"If-None-Match\",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader(\"Content-Type\",s.contentType)}jqXHR.setRequestHeader(\"Accept\",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!==\"*\"?\", \"+allTypes+\"; q=0.01\":\"\"):s.accepts[\"*\"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort()}strAbort=\"abort\";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,\"No Transport\")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger(\"ajaxSend\",[jqXHR,s])}if(completed){return jqXHR}if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort(\"timeout\")},s.timeout)}try{completed=false;transport.send(requestHeaders,done)}catch(e){if(completed){throw e}done(-1,e)}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return}completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||\"\";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader(\"Last-Modified\");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader(\"etag\");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type===\"HEAD\"){statusText=\"nocontent\"}else if(status===304){statusText=\"notmodified\"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText=\"error\";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+\"\";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(_statusCode);_statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?\"ajaxSuccess\":\"ajaxError\",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger(\"ajaxComplete\",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger(\"ajaxStop\")}}}return jqXHR},getJSON:function getJSON(url,data,callback){return jQuery.get(url,data,callback,\"json\")},getScript:function getScript(url,callback){return jQuery.get(url,undefined,callback,\"script\")}});jQuery.each([\"get\",\"post\"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:\"GET\",dataType:\"script\",cache:true,async:false,global:false,throws:true})};jQuery.fn.extend({wrapAll:function wrapAll(html){var wrap;if(this[0]){if(jQuery.isFunction(html)){html=html.call(this[0])}wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function wrapInner(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function wrap(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function unwrap(selector){this.parent(selector).not(\"body\").each(function(){jQuery(this).replaceWith(this.childNodes)});return this}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&\"withCredentials\"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var _callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function send(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers[\"X-Requested-With\"]){headers[\"X-Requested-With\"]=\"XMLHttpRequest\"}for(i in headers){xhr.setRequestHeader(i,headers[i])}_callback=function callback(type){return function(){if(_callback){_callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.onreadystatechange=null;if(type===\"abort\"){xhr.abort()}else if(type===\"error\"){if(typeof xhr.status!==\"number\"){complete(0,\"error\")}else{complete(xhr.status,xhr.statusText)}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||\"text\")!==\"text\"||typeof xhr.responseText!==\"string\"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders())}}}};xhr.onload=_callback();errorCallback=xhr.onerror=_callback(\"error\");if(xhr.onabort!==undefined){xhr.onabort=errorCallback}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(_callback){errorCallback()}})}}}_callback=_callback(\"abort\");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(_callback){throw e}}},abort:function abort(){if(_callback){_callback()}}}}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false}});jQuery.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, \"+\"application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function textScript(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter(\"script\",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type=\"GET\"}});jQuery.ajaxTransport(\"script\",function(s){if(s.crossDomain){var script,_callback2;return{send:function send(_,complete){script=jQuery(\"<script>\").prop({charset:s.scriptCharset,src:s.url}).on(\"load error\",_callback2=function callback(evt){script.remove();_callback2=null;if(evt){complete(evt.type===\"error\"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function abort(){if(_callback2){_callback2()}}}}});var oldCallbacks=[],rjsonp=/(=)\\?(?=&|$)|\\?\\?/;jQuery.ajaxSetup({jsonp:\"callback\",jsonpCallback:function jsonpCallback(){var callback=oldCallbacks.pop()||jQuery.expando+\"_\"+nonce++;this[callback]=true;return callback}});jQuery.ajaxPrefilter(\"json jsonp\",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?\"url\":typeof s.data===\"string\"&&(s.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")===0&&rjsonp.test(s.data)&&\"data\");if(jsonProp||s.dataTypes[0]===\"jsonp\"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,\"$1\"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?\"&\":\"?\")+s.jsonp+\"=\"+callbackName}s.converters[\"script json\"]=function(){if(!responseContainer){jQuery.error(callbackName+\" was not called\")}return responseContainer[0]};s.dataTypes[0]=\"json\";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName)}else{window[callbackName]=overwritten}if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return\"script\"}});support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument(\"\").body;body.innerHTML=\"<form></form><form></form>\";return body.childNodes.length===2}();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!==\"string\"){return[]}if(typeof context===\"boolean\"){keepScripts=context;context=false}var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument(\"\");base=context.createElement(\"base\");base.href=document.location.href;context.head.appendChild(base)}else{context=document}}parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(\" \");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else if(params&&(typeof params===\"undefined\"?\"undefined\":_typeof(params))===\"object\"){type=\"POST\"}if(self.length>0){jQuery.ajax({url:url,type:type||\"GET\",dataType:\"html\",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery(\"<div>\").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})})}return this};jQuery.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.offset={setOffset:function setOffset(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,\"position\"),curElem=jQuery(elem),props={};if(position===\"static\"){elem.style.position=\"relative\"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,\"top\");curCSSLeft=jQuery.css(elem,\"left\");calculatePosition=(position===\"absolute\"||position===\"fixed\")&&(curCSSTop+curCSSLeft).indexOf(\"auto\")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset))}if(options.top!=null){props.top=options.top-curOffset.top+curTop}if(options.left!=null){props.left=options.left-curOffset.left+curLeft}if(\"using\"in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function offset(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var doc,docElem,rect,win,elem=this[0];if(!elem){return}if(!elem.getClientRects().length){return{top:0,left:0}}rect=elem.getBoundingClientRect();doc=elem.ownerDocument;docElem=doc.documentElement;win=doc.defaultView;return{top:rect.top+win.pageYOffset-docElem.clientTop,left:rect.left+win.pageXOffset-docElem.clientLeft}},position:function position(){if(!this[0]){return}var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,\"position\")===\"fixed\"){offset=elem.getBoundingClientRect()}else{offsetParent=this.offsetParent();offset=this.offset();if(!nodeName(offsetParent[0],\"html\")){parentOffset=offsetParent.offset()}parentOffset={top:parentOffset.top+jQuery.css(offsetParent[0],\"borderTopWidth\",true),left:parentOffset.left+jQuery.css(offsetParent[0],\"borderLeftWidth\",true)}}return{top:offset.top-parentOffset.top-jQuery.css(elem,\"marginTop\",true),left:offset.left-parentOffset.left-jQuery.css(elem,\"marginLeft\",true)}},offsetParent:function offsetParent(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,\"position\")===\"static\"){offsetParent=offsetParent.offsetParent}return offsetParent||documentElement})}});jQuery.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(method,prop){var top=\"pageYOffset\"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(jQuery.isWindow(elem)){win=elem}else if(elem.nodeType===9){win=elem.defaultView}if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset)}else{elem[method]=val}},method,val,arguments.length)}});jQuery.each([\"top\",\"left\"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+\"px\":computed}})});jQuery.each({Height:\"height\",Width:\"width\"},function(name,type){jQuery.each({padding:\"inner\"+name,content:type,\"\":\"outer\"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!==\"boolean\"),extra=defaultExtra||(margin===true||value===true?\"margin\":\"border\");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return funcName.indexOf(\"outer\")===0?elem[\"inner\"+name]:elem.document.documentElement[\"client\"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body[\"scroll\"+name],doc[\"scroll\"+name],elem.body[\"offset\"+name],doc[\"offset\"+name],doc[\"client\"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable)}})});jQuery.fn.extend({bind:function bind(types,data,fn){return this.on(types,null,data,fn)},unbind:function unbind(types,fn){return this.off(types,null,fn)},delegate:function delegate(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function undelegate(selector,types,fn){return arguments.length===1?this.off(selector,\"**\"):this.off(types,selector||\"**\",fn)}});jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;if(typeof define===\"function\"&&define.amd){define(\"jquery\",[],function(){return jQuery})}var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(!noGlobal){window.jQuery=window.$=jQuery}return jQuery});(function(root,factory){if(typeof define===\"function\"&&define.amd){define(\"es6-shim\",factory)}else if((typeof exports===\"undefined\"?\"undefined\":_typeof(exports))===\"object\"){module.exports=factory()}else{root.returnExports=factory()}})(this,function(){\"use strict\";var _apply=Function.call.bind(Function.apply);var _call=Function.call.bind(Function.call);var isArray=Array.isArray;var keys=Object.keys;var not=function notThunker(func){return function notThunk(){return!_apply(func,this,arguments)}};var throwsError=function throwsError(func){try{func();return false}catch(e){return true}};var valueOrFalseIfThrows=function valueOrFalseIfThrows(func){try{return func()}catch(e){return false}};var isCallableWithoutNew=not(throwsError);var arePropertyDescriptorsSupported=function arePropertyDescriptorsSupported(){return!throwsError(function(){Object.defineProperty({},\"x\",{get:function get(){}})})};var supportsDescriptors=!!Object.defineProperty&&arePropertyDescriptorsSupported();var functionsHaveNames=function foo(){}.name===\"foo\";var _forEach=Function.call.bind(Array.prototype.forEach);var _reduce=Function.call.bind(Array.prototype.reduce);var _filter=Function.call.bind(Array.prototype.filter);var _some=Function.call.bind(Array.prototype.some);var defineProperty=function defineProperty(object,name,value,force){if(!force&&name in object){return}if(supportsDescriptors){Object.defineProperty(object,name,{configurable:true,enumerable:false,writable:true,value:value})}else{object[name]=value}};var defineProperties=function defineProperties(object,map,forceOverride){_forEach(keys(map),function(name){var method=map[name];defineProperty(object,name,method,!!forceOverride)})};var _toString=Function.call.bind(Object.prototype.toString);var isCallable=typeof/abc/===\"function\"?function IsCallableSlow(x){return typeof x===\"function\"&&_toString(x)===\"[object Function]\"}:function IsCallableFast(x){return typeof x===\"function\"};var Value={getter:function getter(object,name,_getter){if(!supportsDescriptors){throw new TypeError(\"getters require true ES5 support\")}Object.defineProperty(object,name,{configurable:true,enumerable:false,get:_getter})},proxy:function proxy(originalObject,key,targetObject){if(!supportsDescriptors){throw new TypeError(\"getters require true ES5 support\")}var originalDescriptor=Object.getOwnPropertyDescriptor(originalObject,key);Object.defineProperty(targetObject,key,{configurable:originalDescriptor.configurable,enumerable:originalDescriptor.enumerable,get:function getKey(){return originalObject[key]},set:function setKey(value){originalObject[key]=value}})},redefine:function redefine(object,property,newValue){if(supportsDescriptors){var descriptor=Object.getOwnPropertyDescriptor(object,property);descriptor.value=newValue;Object.defineProperty(object,property,descriptor)}else{object[property]=newValue}},defineByDescriptor:function defineByDescriptor(object,property,descriptor){if(supportsDescriptors){Object.defineProperty(object,property,descriptor)}else if(\"value\"in descriptor){object[property]=descriptor.value}},preserveToString:function preserveToString(target,source){if(source&&isCallable(source.toString)){defineProperty(target,\"toString\",source.toString.bind(source),true)}}};var create=Object.create||function(prototype,properties){var Prototype=function Prototype(){};Prototype.prototype=prototype;var object=new Prototype;if(typeof properties!==\"undefined\"){keys(properties).forEach(function(key){Value.defineByDescriptor(object,key,properties[key])})}return object};var supportsSubclassing=function supportsSubclassing(C,f){if(!Object.setPrototypeOf){return false}return valueOrFalseIfThrows(function(){var Sub=function Subclass(arg){var o=new C(arg);Object.setPrototypeOf(o,Subclass.prototype);return o};Object.setPrototypeOf(Sub,C);Sub.prototype=create(C.prototype,{constructor:{value:Sub}});return f(Sub)})};var getGlobal=function getGlobal(){if(typeof self!==\"undefined\"){return self}if(typeof window!==\"undefined\"){return window}if(typeof global!==\"undefined\"){return global}throw new Error(\"unable to locate global object\")};var globals=getGlobal();var globalIsFinite=globals.isFinite;var _indexOf=Function.call.bind(String.prototype.indexOf);var _arrayIndexOfApply=Function.apply.bind(Array.prototype.indexOf);var _concat=Function.call.bind(Array.prototype.concat);var _strSlice=Function.call.bind(String.prototype.slice);var _push=Function.call.bind(Array.prototype.push);var _pushApply=Function.apply.bind(Array.prototype.push);var _shift=Function.call.bind(Array.prototype.shift);var _max=Math.max;var _min=Math.min;var _floor=Math.floor;var _abs=Math.abs;var _exp=Math.exp;var _log=Math.log;var _sqrt=Math.sqrt;var _hasOwnProperty=Function.call.bind(Object.prototype.hasOwnProperty);var ArrayIterator;var noop=function noop(){};var OrigMap=globals.Map;var origMapDelete=OrigMap&&OrigMap.prototype[\"delete\"];var origMapGet=OrigMap&&OrigMap.prototype.get;var origMapHas=OrigMap&&OrigMap.prototype.has;var origMapSet=OrigMap&&OrigMap.prototype.set;var _Symbol=globals.Symbol||{};var symbolSpecies=_Symbol.species||\"@@species\";var numberIsNaN=Number.isNaN||function isNaN(value){return value!==value};var numberIsFinite=Number.isFinite||function isFinite(value){return typeof value===\"number\"&&globalIsFinite(value)};var _sign=isCallable(Math.sign)?Math.sign:function sign(value){var number=Number(value);if(number===0){return number}if(numberIsNaN(number)){return number}return number<0?-1:1};var isStandardArguments=function isArguments(value){return _toString(value)===\"[object Arguments]\"};var isLegacyArguments=function isArguments(value){return value!==null&&(typeof value===\"undefined\"?\"undefined\":_typeof(value))===\"object\"&&typeof value.length===\"number\"&&value.length>=0&&_toString(value)!==\"[object Array]\"&&_toString(value.callee)===\"[object Function]\"};var isArguments=isStandardArguments(arguments)?isStandardArguments:isLegacyArguments;var Type={primitive:function primitive(x){return x===null||typeof x!==\"function\"&&(typeof x===\"undefined\"?\"undefined\":_typeof(x))!==\"object\"},string:function string(x){return _toString(x)===\"[object String]\"},regex:function regex(x){return _toString(x)===\"[object RegExp]\"},symbol:function symbol(x){return typeof globals.Symbol===\"function\"&&(typeof x===\"undefined\"?\"undefined\":_typeof(x))===\"symbol\"}};var overrideNative=function overrideNative(object,property,replacement){var original=object[property];defineProperty(object,property,replacement,true);Value.preserveToString(object[property],original)};var hasSymbols=typeof _Symbol===\"function\"&&typeof _Symbol[\"for\"]===\"function\"&&Type.symbol(_Symbol());var $iterator$=Type.symbol(_Symbol.iterator)?_Symbol.iterator:\"_es6-shim iterator_\";if(globals.Set&&typeof(new globals.Set)[\"@@iterator\"]===\"function\"){$iterator$=\"@@iterator\"}if(!globals.Reflect){defineProperty(globals,\"Reflect\",{},true)}var Reflect=globals.Reflect;var $String=String;var domAll=typeof document===\"undefined\"||!document?null:document.all;var isNullOrUndefined=domAll==null?function isNullOrUndefined(x){return x==null}:function isNullOrUndefinedAndNotDocumentAll(x){return x==null&&x!==domAll};var ES={Call:function Call(F,V){var args=arguments.length>2?arguments[2]:[];if(!ES.IsCallable(F)){throw new TypeError(F+\" is not a function\")}return _apply(F,V,args)},RequireObjectCoercible:function RequireObjectCoercible(x,optMessage){if(isNullOrUndefined(x)){throw new TypeError(optMessage||\"Cannot call method on \"+x)}return x},TypeIsObject:function TypeIsObject(x){if(x===void 0||x===null||x===true||x===false){return false}return typeof x===\"function\"||(typeof x===\"undefined\"?\"undefined\":_typeof(x))===\"object\"||x===domAll},ToObject:function ToObject(o,optMessage){return Object(ES.RequireObjectCoercible(o,optMessage))},IsCallable:isCallable,IsConstructor:function IsConstructor(x){return ES.IsCallable(x)},ToInt32:function ToInt32(x){return ES.ToNumber(x)>>0},ToUint32:function ToUint32(x){return ES.ToNumber(x)>>>0},ToNumber:function ToNumber(value){if(_toString(value)===\"[object Symbol]\"){throw new TypeError(\"Cannot convert a Symbol value to a number\")}return+value},ToInteger:function ToInteger(value){var number=ES.ToNumber(value);if(numberIsNaN(number)){return 0}if(number===0||!numberIsFinite(number)){return number}return(number>0?1:-1)*_floor(_abs(number))},ToLength:function ToLength(value){var len=ES.ToInteger(value);if(len<=0){return 0}if(len>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return len},SameValue:function SameValue(a,b){if(a===b){if(a===0){return 1/a===1/b}return true}return numberIsNaN(a)&&numberIsNaN(b)},SameValueZero:function SameValueZero(a,b){return a===b||numberIsNaN(a)&&numberIsNaN(b)},IsIterable:function IsIterable(o){return ES.TypeIsObject(o)&&(typeof o[$iterator$]!==\"undefined\"||isArguments(o))},GetIterator:function GetIterator(o){if(isArguments(o)){return new ArrayIterator(o,\"value\")}var itFn=ES.GetMethod(o,$iterator$);if(!ES.IsCallable(itFn)){throw new TypeError(\"value is not an iterable\")}var it=ES.Call(itFn,o);if(!ES.TypeIsObject(it)){throw new TypeError(\"bad iterator\")}return it},GetMethod:function GetMethod(o,p){var func=ES.ToObject(o)[p];if(isNullOrUndefined(func)){return void 0}if(!ES.IsCallable(func)){throw new TypeError(\"Method not callable: \"+p)}return func},IteratorComplete:function IteratorComplete(iterResult){return!!iterResult.done},IteratorClose:function IteratorClose(iterator,completionIsThrow){var returnMethod=ES.GetMethod(iterator,\"return\");if(returnMethod===void 0){return}var innerResult,innerException;try{innerResult=ES.Call(returnMethod,iterator)}catch(e){innerException=e}if(completionIsThrow){return}if(innerException){throw innerException}if(!ES.TypeIsObject(innerResult)){throw new TypeError(\"Iterator's return method returned a non-object.\")}},IteratorNext:function IteratorNext(it){var result=arguments.length>1?it.next(arguments[1]):it.next();if(!ES.TypeIsObject(result)){throw new TypeError(\"bad iterator\")}return result},IteratorStep:function IteratorStep(it){var result=ES.IteratorNext(it);var done=ES.IteratorComplete(result);return done?false:result},Construct:function Construct(C,args,newTarget,isES6internal){var target=typeof newTarget===\"undefined\"?C:newTarget;if(!isES6internal&&Reflect.construct){return Reflect.construct(C,args,target)}var proto=target.prototype;if(!ES.TypeIsObject(proto)){proto=Object.prototype}var obj=create(proto);var result=ES.Call(C,obj,args);return ES.TypeIsObject(result)?result:obj},SpeciesConstructor:function SpeciesConstructor(O,defaultConstructor){var C=O.constructor;if(C===void 0){return defaultConstructor}if(!ES.TypeIsObject(C)){throw new TypeError(\"Bad constructor\")}var S=C[symbolSpecies];if(isNullOrUndefined(S)){return defaultConstructor}if(!ES.IsConstructor(S)){throw new TypeError(\"Bad @@species\")}return S},CreateHTML:function CreateHTML(string,tag,attribute,value){var S=ES.ToString(string);var p1=\"<\"+tag;if(attribute!==\"\"){var V=ES.ToString(value);var escapedV=V.replace(/\"/g,\"&quot;\");p1+=\" \"+attribute+'=\"'+escapedV+'\"'}var p2=p1+\">\";var p3=p2+S;return p3+\"</\"+tag+\">\"},IsRegExp:function IsRegExp(argument){if(!ES.TypeIsObject(argument)){return false}var isRegExp=argument[_Symbol.match];if(typeof isRegExp!==\"undefined\"){return!!isRegExp}return Type.regex(argument)},ToString:function ToString(string){return $String(string)}};if(supportsDescriptors&&hasSymbols){var defineWellKnownSymbol=function defineWellKnownSymbol(name){if(Type.symbol(_Symbol[name])){return _Symbol[name]}var sym=_Symbol[\"for\"](\"Symbol.\"+name);Object.defineProperty(_Symbol,name,{configurable:false,enumerable:false,writable:false,value:sym});return sym};if(!Type.symbol(_Symbol.search)){var symbolSearch=defineWellKnownSymbol(\"search\");var originalSearch=String.prototype.search;defineProperty(RegExp.prototype,symbolSearch,function search(string){return ES.Call(originalSearch,string,[this])});var searchShim=function search(regexp){var O=ES.RequireObjectCoercible(this);if(!isNullOrUndefined(regexp)){var searcher=ES.GetMethod(regexp,symbolSearch);if(typeof searcher!==\"undefined\"){return ES.Call(searcher,regexp,[O])}}return ES.Call(originalSearch,O,[ES.ToString(regexp)])};overrideNative(String.prototype,\"search\",searchShim)}if(!Type.symbol(_Symbol.replace)){var symbolReplace=defineWellKnownSymbol(\"replace\");var originalReplace=String.prototype.replace;defineProperty(RegExp.prototype,symbolReplace,function replace(string,replaceValue){return ES.Call(originalReplace,string,[this,replaceValue])});var replaceShim=function replace(searchValue,replaceValue){var O=ES.RequireObjectCoercible(this);if(!isNullOrUndefined(searchValue)){var replacer=ES.GetMethod(searchValue,symbolReplace);if(typeof replacer!==\"undefined\"){return ES.Call(replacer,searchValue,[O,replaceValue])}}return ES.Call(originalReplace,O,[ES.ToString(searchValue),replaceValue])};overrideNative(String.prototype,\"replace\",replaceShim)}if(!Type.symbol(_Symbol.split)){var symbolSplit=defineWellKnownSymbol(\"split\");var originalSplit=String.prototype.split;defineProperty(RegExp.prototype,symbolSplit,function split(string,limit){return ES.Call(originalSplit,string,[this,limit])});var splitShim=function split(separator,limit){var O=ES.RequireObjectCoercible(this);if(!isNullOrUndefined(separator)){var splitter=ES.GetMethod(separator,symbolSplit);if(typeof splitter!==\"undefined\"){return ES.Call(splitter,separator,[O,limit])}}return ES.Call(originalSplit,O,[ES.ToString(separator),limit])};overrideNative(String.prototype,\"split\",splitShim)}var symbolMatchExists=Type.symbol(_Symbol.match);var stringMatchIgnoresSymbolMatch=symbolMatchExists&&function(){var o={};o[_Symbol.match]=function(){return 42};return\"a\".match(o)!==42}();if(!symbolMatchExists||stringMatchIgnoresSymbolMatch){var symbolMatch=defineWellKnownSymbol(\"match\");var originalMatch=String.prototype.match;defineProperty(RegExp.prototype,symbolMatch,function match(string){return ES.Call(originalMatch,string,[this])});var matchShim=function match(regexp){var O=ES.RequireObjectCoercible(this);if(!isNullOrUndefined(regexp)){var matcher=ES.GetMethod(regexp,symbolMatch);if(typeof matcher!==\"undefined\"){return ES.Call(matcher,regexp,[O])}}return ES.Call(originalMatch,O,[ES.ToString(regexp)])};overrideNative(String.prototype,\"match\",matchShim)}}var wrapConstructor=function wrapConstructor(original,replacement,keysToSkip){Value.preserveToString(replacement,original);if(Object.setPrototypeOf){Object.setPrototypeOf(original,replacement)}if(supportsDescriptors){_forEach(Object.getOwnPropertyNames(original),function(key){if(key in noop||keysToSkip[key]){return}Value.proxy(original,key,replacement)})}else{_forEach(Object.keys(original),function(key){if(key in noop||keysToSkip[key]){return}replacement[key]=original[key]})}replacement.prototype=original.prototype;Value.redefine(original.prototype,\"constructor\",replacement)};var defaultSpeciesGetter=function defaultSpeciesGetter(){return this};var addDefaultSpecies=function addDefaultSpecies(C){if(supportsDescriptors&&!_hasOwnProperty(C,symbolSpecies)){Value.getter(C,symbolSpecies,defaultSpeciesGetter)}};var addIterator=function addIterator(prototype,impl){var implementation=impl||function iterator(){return this};defineProperty(prototype,$iterator$,implementation);if(!prototype[$iterator$]&&Type.symbol($iterator$)){prototype[$iterator$]=implementation}};var createDataProperty=function createDataProperty(object,name,value){if(supportsDescriptors){Object.defineProperty(object,name,{configurable:true,enumerable:true,writable:true,value:value})}else{object[name]=value}};var createDataPropertyOrThrow=function createDataPropertyOrThrow(object,name,value){createDataProperty(object,name,value);if(!ES.SameValue(object[name],value)){throw new TypeError(\"property is nonconfigurable\")}};var emulateES6construct=function emulateES6construct(o,defaultNewTarget,defaultProto,slots){if(!ES.TypeIsObject(o)){throw new TypeError(\"Constructor requires `new`: \"+defaultNewTarget.name)}var proto=defaultNewTarget.prototype;if(!ES.TypeIsObject(proto)){proto=defaultProto}var obj=create(proto);for(var name in slots){if(_hasOwnProperty(slots,name)){var value=slots[name];defineProperty(obj,name,value,true)}}return obj};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var originalFromCodePoint=String.fromCodePoint;overrideNative(String,\"fromCodePoint\",function fromCodePoint(codePoints){return ES.Call(originalFromCodePoint,this,arguments)})}var StringShims={fromCodePoint:function fromCodePoint(codePoints){var result=[];var next;for(var i=0,length=arguments.length;i<length;i++){next=Number(arguments[i]);if(!ES.SameValue(next,ES.ToInteger(next))||next<0||next>1114111){throw new RangeError(\"Invalid code point \"+next)}if(next<65536){_push(result,String.fromCharCode(next))}else{next-=65536;_push(result,String.fromCharCode((next>>10)+55296));_push(result,String.fromCharCode(next%1024+56320))}}return result.join(\"\")},raw:function raw(callSite){var cooked=ES.ToObject(callSite,\"bad callSite\");var rawString=ES.ToObject(cooked.raw,\"bad raw value\");var len=rawString.length;var literalsegments=ES.ToLength(len);if(literalsegments<=0){return\"\"}var stringElements=[];var nextIndex=0;var nextKey,next,nextSeg,nextSub;while(nextIndex<literalsegments){nextKey=ES.ToString(nextIndex);nextSeg=ES.ToString(rawString[nextKey]);_push(stringElements,nextSeg);if(nextIndex+1>=literalsegments){break}next=nextIndex+1<arguments.length?arguments[nextIndex+1]:\"\";nextSub=ES.ToString(next);_push(stringElements,nextSub);nextIndex+=1}return stringElements.join(\"\")}};if(String.raw&&String.raw({raw:{0:\"x\",1:\"y\",length:2}})!==\"xy\"){overrideNative(String,\"raw\",StringShims.raw)}defineProperties(String,StringShims);var stringRepeat=function repeat(s,times){if(times<1){return\"\"}if(times%2){return repeat(s,times-1)+s}var half=repeat(s,times/2);return half+half};var stringMaxLength=Infinity;var StringPrototypeShims={repeat:function repeat(times){var thisStr=ES.ToString(ES.RequireObjectCoercible(this));var numTimes=ES.ToInteger(times);if(numTimes<0||numTimes>=stringMaxLength){throw new RangeError(\"repeat count must be less than infinity and not overflow maximum string size\")}return stringRepeat(thisStr,numTimes)},startsWith:function startsWith(searchString){var S=ES.ToString(ES.RequireObjectCoercible(this));if(ES.IsRegExp(searchString)){throw new TypeError('Cannot call method \"startsWith\" with a regex')}var searchStr=ES.ToString(searchString);var position;if(arguments.length>1){position=arguments[1]}var start=_max(ES.ToInteger(position),0);return _strSlice(S,start,start+searchStr.length)===searchStr},endsWith:function endsWith(searchString){var S=ES.ToString(ES.RequireObjectCoercible(this));if(ES.IsRegExp(searchString)){throw new TypeError('Cannot call method \"endsWith\" with a regex')}var searchStr=ES.ToString(searchString);var len=S.length;var endPosition;if(arguments.length>1){endPosition=arguments[1]}var pos=typeof endPosition===\"undefined\"?len:ES.ToInteger(endPosition);var end=_min(_max(pos,0),len);return _strSlice(S,end-searchStr.length,end)===searchStr},includes:function includes(searchString){if(ES.IsRegExp(searchString)){throw new TypeError('\"includes\" does not accept a RegExp')}var searchStr=ES.ToString(searchString);var position;if(arguments.length>1){position=arguments[1]}return _indexOf(this,searchStr,position)!==-1},codePointAt:function codePointAt(pos){var thisStr=ES.ToString(ES.RequireObjectCoercible(this));var position=ES.ToInteger(pos);var length=thisStr.length;if(position>=0&&position<length){var first=thisStr.charCodeAt(position);var isEnd=position+1===length;if(first<55296||first>56319||isEnd){return first}var second=thisStr.charCodeAt(position+1);if(second<56320||second>57343){return first}return(first-55296)*1024+(second-56320)+65536}}};if(String.prototype.includes&&\"a\".includes(\"a\",Infinity)!==false){overrideNative(String.prototype,\"includes\",StringPrototypeShims.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var startsWithRejectsRegex=throwsError(function(){\"/a/\".startsWith(/a/)});var startsWithHandlesInfinity=valueOrFalseIfThrows(function(){return\"abc\".startsWith(\"a\",Infinity)===false});if(!startsWithRejectsRegex||!startsWithHandlesInfinity){overrideNative(String.prototype,\"startsWith\",StringPrototypeShims.startsWith);overrideNative(String.prototype,\"endsWith\",StringPrototypeShims.endsWith)}}if(hasSymbols){var startsWithSupportsSymbolMatch=valueOrFalseIfThrows(function(){var re=/a/;re[_Symbol.match]=false;return\"/a/\".startsWith(re)});if(!startsWithSupportsSymbolMatch){overrideNative(String.prototype,\"startsWith\",StringPrototypeShims.startsWith)}var endsWithSupportsSymbolMatch=valueOrFalseIfThrows(function(){var re=/a/;re[_Symbol.match]=false;return\"/a/\".endsWith(re)});if(!endsWithSupportsSymbolMatch){overrideNative(String.prototype,\"endsWith\",StringPrototypeShims.endsWith)}var includesSupportsSymbolMatch=valueOrFalseIfThrows(function(){var re=/a/;re[_Symbol.match]=false;return\"/a/\".includes(re)});if(!includesSupportsSymbolMatch){overrideNative(String.prototype,\"includes\",StringPrototypeShims.includes)}}defineProperties(String.prototype,StringPrototypeShims);var ws=[\"\\t\\n\\v\\f\\r   ᠎    \",\"          \\u2028\",\"\\u2029\\ufeff\"].join(\"\");var trimRegexp=new RegExp(\"(^[\"+ws+\"]+)|([\"+ws+\"]+$)\",\"g\");var trimShim=function trim(){return ES.ToString(ES.RequireObjectCoercible(this)).replace(trimRegexp,\"\")};var nonWS=[\"…\",\"​\",\"￾\"].join(\"\");var nonWSregex=new RegExp(\"[\"+nonWS+\"]\",\"g\");var isBadHexRegex=/^[-+]0x[0-9a-f]+$/i;var hasStringTrimBug=nonWS.trim().length!==nonWS.length;defineProperty(String.prototype,\"trim\",trimShim,hasStringTrimBug);var iteratorResult=function iteratorResult(x){return{value:x,done:arguments.length===0}};var StringIterator=function StringIterator(s){ES.RequireObjectCoercible(s);this._s=ES.ToString(s);this._i=0};StringIterator.prototype.next=function(){var s=this._s;var i=this._i;if(typeof s===\"undefined\"||i>=s.length){this._s=void 0;return iteratorResult()}var first=s.charCodeAt(i);var second,len;if(first<55296||first>56319||i+1===s.length){len=1}else{second=s.charCodeAt(i+1);len=second<56320||second>57343?1:2}this._i=i+len;return iteratorResult(s.substr(i,len))};addIterator(StringIterator.prototype);addIterator(String.prototype,function(){return new StringIterator(this)});var ArrayShims={from:function from(items){var C=this;var mapFn;if(arguments.length>1){mapFn=arguments[1]}var mapping,T;if(typeof mapFn===\"undefined\"){mapping=false}else{if(!ES.IsCallable(mapFn)){throw new TypeError(\"Array.from: when provided, the second argument must be a function\")}if(arguments.length>2){T=arguments[2]}mapping=true}var usingIterator=typeof(isArguments(items)||ES.GetMethod(items,$iterator$))!==\"undefined\";var length,result,i;if(usingIterator){result=ES.IsConstructor(C)?Object(new C):[];var iterator=ES.GetIterator(items);var next,nextValue;i=0;while(true){next=ES.IteratorStep(iterator);if(next===false){break}nextValue=next.value;try{if(mapping){nextValue=typeof T===\"undefined\"?mapFn(nextValue,i):_call(mapFn,T,nextValue,i)}result[i]=nextValue}catch(e){ES.IteratorClose(iterator,true);throw e}i+=1}length=i}else{var arrayLike=ES.ToObject(items);length=ES.ToLength(arrayLike.length);result=ES.IsConstructor(C)?Object(new C(length)):new Array(length);var value;for(i=0;i<length;++i){value=arrayLike[i];if(mapping){value=typeof T===\"undefined\"?mapFn(value,i):_call(mapFn,T,value,i)}createDataPropertyOrThrow(result,i,value)}}result.length=length;return result},of:function of(){var len=arguments.length;var C=this;var A=isArray(C)||!ES.IsCallable(C)?new Array(len):ES.Construct(C,[len]);for(var k=0;k<len;++k){createDataPropertyOrThrow(A,k,arguments[k])}A.length=len;return A}};defineProperties(Array,ArrayShims);addDefaultSpecies(Array);ArrayIterator=function ArrayIterator(array,kind){this.i=0;this.array=array;this.kind=kind};defineProperties(ArrayIterator.prototype,{next:function next(){var i=this.i;var array=this.array;if(!(this instanceof ArrayIterator)){throw new TypeError(\"Not an ArrayIterator\")}if(typeof array!==\"undefined\"){var len=ES.ToLength(array.length);for(;i<len;i++){var kind=this.kind;var retval;if(kind===\"key\"){retval=i}else if(kind===\"value\"){retval=array[i]}else if(kind===\"entry\"){retval=[i,array[i]]}this.i=i+1;return iteratorResult(retval)}}this.array=void 0;return iteratorResult()}});addIterator(ArrayIterator.prototype);var arrayOfSupportsSubclassing=Array.of===ArrayShims.of||function(){var Foo=function Foo(len){this.length=len};Foo.prototype=[];var fooArr=Array.of.apply(Foo,[1,2]);return fooArr instanceof Foo&&fooArr.length===2}();if(!arrayOfSupportsSubclassing){overrideNative(Array,\"of\",ArrayShims.of)}var ArrayPrototypeShims={copyWithin:function copyWithin(target,start){var o=ES.ToObject(this);var len=ES.ToLength(o.length);var relativeTarget=ES.ToInteger(target);var relativeStart=ES.ToInteger(start);var to=relativeTarget<0?_max(len+relativeTarget,0):_min(relativeTarget,len);var from=relativeStart<0?_max(len+relativeStart,0):_min(relativeStart,len);var end;if(arguments.length>2){end=arguments[2]}var relativeEnd=typeof end===\"undefined\"?len:ES.ToInteger(end);var finalItem=relativeEnd<0?_max(len+relativeEnd,0):_min(relativeEnd,len);var count=_min(finalItem-from,len-to);var direction=1;if(from<to&&to<from+count){direction=-1;from+=count-1;to+=count-1}while(count>0){if(from in o){o[to]=o[from]}else{delete o[to]}from+=direction;to+=direction;count-=1}return o},fill:function fill(value){var start;if(arguments.length>1){start=arguments[1]}var end;if(arguments.length>2){end=arguments[2]}var O=ES.ToObject(this);var len=ES.ToLength(O.length);start=ES.ToInteger(typeof start===\"undefined\"?0:start);end=ES.ToInteger(typeof end===\"undefined\"?len:end);var relativeStart=start<0?_max(len+start,0):_min(start,len);var relativeEnd=end<0?len+end:end;for(var i=relativeStart;i<len&&i<relativeEnd;++i){O[i]=value}return O},find:function find(predicate){var list=ES.ToObject(this);var length=ES.ToLength(list.length);if(!ES.IsCallable(predicate)){throw new TypeError(\"Array#find: predicate must be a function\")}var thisArg=arguments.length>1?arguments[1]:null;for(var i=0,value;i<length;i++){value=list[i];if(thisArg){if(_call(predicate,thisArg,value,i,list)){return value}}else if(predicate(value,i,list)){return value}}},findIndex:function findIndex(predicate){var list=ES.ToObject(this);var length=ES.ToLength(list.length);if(!ES.IsCallable(predicate)){throw new TypeError(\"Array#findIndex: predicate must be a function\")}var thisArg=arguments.length>1?arguments[1]:null;for(var i=0;i<length;i++){if(thisArg){if(_call(predicate,thisArg,list[i],i,list)){return i}}else if(predicate(list[i],i,list)){return i}}return-1},keys:function keys(){return new ArrayIterator(this,\"key\")},values:function values(){return new ArrayIterator(this,\"value\")},entries:function entries(){return new ArrayIterator(this,\"entry\")}};if(Array.prototype.keys&&!ES.IsCallable([1].keys().next)){delete Array.prototype.keys}if(Array.prototype.entries&&!ES.IsCallable([1].entries().next)){delete Array.prototype.entries}if(Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[$iterator$]){defineProperties(Array.prototype,{values:Array.prototype[$iterator$]});if(Type.symbol(_Symbol.unscopables)){Array.prototype[_Symbol.unscopables].values=true}}if(functionsHaveNames&&Array.prototype.values&&Array.prototype.values.name!==\"values\"){var originalArrayPrototypeValues=Array.prototype.values;overrideNative(Array.prototype,\"values\",function values(){return ES.Call(originalArrayPrototypeValues,this,arguments)});defineProperty(Array.prototype,$iterator$,Array.prototype.values,true)}defineProperties(Array.prototype,ArrayPrototypeShims);if(1/[true].indexOf(true,-0)<0){defineProperty(Array.prototype,\"indexOf\",function indexOf(searchElement){var value=_arrayIndexOfApply(this,arguments);if(value===0&&1/value<0){return 0}return value},true)}addIterator(Array.prototype,function(){return this.values()});if(Object.getPrototypeOf){addIterator(Object.getPrototypeOf([].values()))}var arrayFromSwallowsNegativeLengths=function(){return valueOrFalseIfThrows(function(){return Array.from({length:-1}).length===0})}();var arrayFromHandlesIterables=function(){var arr=Array.from([0].entries());return arr.length===1&&isArray(arr[0])&&arr[0][0]===0&&arr[0][1]===0}();if(!arrayFromSwallowsNegativeLengths||!arrayFromHandlesIterables){overrideNative(Array,\"from\",ArrayShims.from)}var arrayFromHandlesUndefinedMapFunction=function(){return valueOrFalseIfThrows(function(){return Array.from([0],void 0)})}();if(!arrayFromHandlesUndefinedMapFunction){var origArrayFrom=Array.from;overrideNative(Array,\"from\",function from(items){if(arguments.length>1&&typeof arguments[1]!==\"undefined\"){return ES.Call(origArrayFrom,this,arguments)}else{return _call(origArrayFrom,this,items)}})}var int32sAsOne=-(Math.pow(2,32)-1);var toLengthsCorrectly=function toLengthsCorrectly(method,reversed){var obj={length:int32sAsOne};obj[reversed?(obj.length>>>0)-1:0]=true;return valueOrFalseIfThrows(function(){_call(method,obj,function(){throw new RangeError(\"should not reach here\")},[]);return true})};if(!toLengthsCorrectly(Array.prototype.forEach)){var originalForEach=Array.prototype.forEach;overrideNative(Array.prototype,\"forEach\",function forEach(callbackFn){return ES.Call(originalForEach,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.map)){var originalMap=Array.prototype.map;overrideNative(Array.prototype,\"map\",function map(callbackFn){return ES.Call(originalMap,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.filter)){var originalFilter=Array.prototype.filter;overrideNative(Array.prototype,\"filter\",function filter(callbackFn){return ES.Call(originalFilter,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.some)){var originalSome=Array.prototype.some;overrideNative(Array.prototype,\"some\",function some(callbackFn){return ES.Call(originalSome,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.every)){var originalEvery=Array.prototype.every;overrideNative(Array.prototype,\"every\",function every(callbackFn){return ES.Call(originalEvery,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.reduce)){var originalReduce=Array.prototype.reduce;overrideNative(Array.prototype,\"reduce\",function reduce(callbackFn){return ES.Call(originalReduce,this.length>=0?this:[],arguments)},true)}if(!toLengthsCorrectly(Array.prototype.reduceRight,true)){var originalReduceRight=Array.prototype.reduceRight;overrideNative(Array.prototype,\"reduceRight\",function reduceRight(callbackFn){return ES.Call(originalReduceRight,this.length>=0?this:[],arguments)},true)}var lacksOctalSupport=Number(\"0o10\")!==8;var lacksBinarySupport=Number(\"0b10\")!==2;var trimsNonWhitespace=_some(nonWS,function(c){return Number(c+0+c)===0});if(lacksOctalSupport||lacksBinarySupport||trimsNonWhitespace){var OrigNumber=Number;var binaryRegex=/^0b[01]+$/i;var octalRegex=/^0o[0-7]+$/i;var isBinary=binaryRegex.test.bind(binaryRegex);var isOctal=octalRegex.test.bind(octalRegex);var toPrimitive=function toPrimitive(O){var result;if(typeof O.valueOf===\"function\"){result=O.valueOf();if(Type.primitive(result)){return result}}if(typeof O.toString===\"function\"){result=O.toString();if(Type.primitive(result)){return result}}throw new TypeError(\"No default value\")};var hasNonWS=nonWSregex.test.bind(nonWSregex);var isBadHex=isBadHexRegex.test.bind(isBadHexRegex);var NumberShim=function(){var NumberShim=function Number(value){var primValue;if(arguments.length>0){primValue=Type.primitive(value)?value:toPrimitive(value,\"number\")}else{primValue=0}if(typeof primValue===\"string\"){primValue=ES.Call(trimShim,primValue);if(isBinary(primValue)){primValue=parseInt(_strSlice(primValue,2),2)}else if(isOctal(primValue)){primValue=parseInt(_strSlice(primValue,2),8)}else if(hasNonWS(primValue)||isBadHex(primValue)){primValue=NaN}}var receiver=this;var valueOfSucceeds=valueOrFalseIfThrows(function(){OrigNumber.prototype.valueOf.call(receiver);return true});if(receiver instanceof NumberShim&&!valueOfSucceeds){return new OrigNumber(primValue)}return OrigNumber(primValue)};return NumberShim}();wrapConstructor(OrigNumber,NumberShim,{});defineProperties(NumberShim,{NaN:OrigNumber.NaN,MAX_VALUE:OrigNumber.MAX_VALUE,MIN_VALUE:OrigNumber.MIN_VALUE,NEGATIVE_INFINITY:OrigNumber.NEGATIVE_INFINITY,POSITIVE_INFINITY:OrigNumber.POSITIVE_INFINITY});Number=NumberShim;Value.redefine(globals,\"Number\",NumberShim)}var maxSafeInteger=Math.pow(2,53)-1;defineProperties(Number,{MAX_SAFE_INTEGER:maxSafeInteger,MIN_SAFE_INTEGER:-maxSafeInteger,EPSILON:2.220446049250313e-16,parseInt:globals.parseInt,parseFloat:globals.parseFloat,isFinite:numberIsFinite,isInteger:function isInteger(value){return numberIsFinite(value)&&ES.ToInteger(value)===value},isSafeInteger:function isSafeInteger(value){return Number.isInteger(value)&&_abs(value)<=Number.MAX_SAFE_INTEGER},isNaN:numberIsNaN});defineProperty(Number,\"parseInt\",globals.parseInt,Number.parseInt!==globals.parseInt);if([,1].find(function(){return true})===1){overrideNative(Array.prototype,\"find\",ArrayPrototypeShims.find)}if([,1].findIndex(function(){return true})!==0){overrideNative(Array.prototype,\"findIndex\",ArrayPrototypeShims.findIndex)}var isEnumerableOn=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var ensureEnumerable=function ensureEnumerable(obj,prop){if(supportsDescriptors&&isEnumerableOn(obj,prop)){Object.defineProperty(obj,prop,{enumerable:false})}};var sliceArgs=function sliceArgs(){var initial=Number(this);var len=arguments.length;var desiredArgCount=len-initial;var args=new Array(desiredArgCount<0?0:desiredArgCount);for(var i=initial;i<len;++i){args[i-initial]=arguments[i]}return args};var assignTo=function assignTo(source){return function assignToSource(target,key){target[key]=source[key];return target}};var assignReducer=function assignReducer(target,source){var sourceKeys=keys(Object(source));var symbols;if(ES.IsCallable(Object.getOwnPropertySymbols)){symbols=_filter(Object.getOwnPropertySymbols(Object(source)),isEnumerableOn(source))}return _reduce(_concat(sourceKeys,symbols||[]),assignTo(source),target)};var ObjectShims={assign:function assign(target,source){var to=ES.ToObject(target,\"Cannot convert undefined or null to object\");return _reduce(ES.Call(sliceArgs,1,arguments),assignReducer,to)},is:function is(a,b){return ES.SameValue(a,b)}};var assignHasPendingExceptions=Object.assign&&Object.preventExtensions&&function(){var thrower=Object.preventExtensions({1:2});try{Object.assign(thrower,\"xy\")}catch(e){return thrower[1]===\"y\"}}();if(assignHasPendingExceptions){overrideNative(Object,\"assign\",ObjectShims.assign)}defineProperties(Object,ObjectShims);if(supportsDescriptors){var ES5ObjectShims={setPrototypeOf:function(Object,magic){var set;var checkArgs=function checkArgs(O,proto){if(!ES.TypeIsObject(O)){throw new TypeError(\"cannot set prototype on a non-object\")}if(!(proto===null||ES.TypeIsObject(proto))){throw new TypeError(\"can only set prototype to an object or null\"+proto)}};var setPrototypeOf=function setPrototypeOf(O,proto){checkArgs(O,proto);_call(set,O,proto);return O};try{set=Object.getOwnPropertyDescriptor(Object.prototype,magic).set;_call(set,{},null)}catch(e){if(Object.prototype!=={}[magic]){return}set=function set(proto){this[magic]=proto};setPrototypeOf.polyfill=setPrototypeOf(setPrototypeOf({},null),Object.prototype)instanceof Object}return setPrototypeOf}(Object,\"__proto__\")};defineProperties(Object,ES5ObjectShims)}if(Object.setPrototypeOf&&Object.getPrototypeOf&&Object.getPrototypeOf(Object.setPrototypeOf({},null))!==null&&Object.getPrototypeOf(Object.create(null))===null){(function(){var FAKENULL=Object.create(null);var gpo=Object.getPrototypeOf;var spo=Object.setPrototypeOf;Object.getPrototypeOf=function(o){var result=gpo(o);return result===FAKENULL?null:result};Object.setPrototypeOf=function(o,p){var proto=p===null?FAKENULL:p;return spo(o,proto)};Object.setPrototypeOf.polyfill=false})()}var objectKeysAcceptsPrimitives=!throwsError(function(){Object.keys(\"foo\")});if(!objectKeysAcceptsPrimitives){var originalObjectKeys=Object.keys;overrideNative(Object,\"keys\",function keys(value){return originalObjectKeys(ES.ToObject(value))});keys=Object.keys}var objectKeysRejectsRegex=throwsError(function(){Object.keys(/a/g)});if(objectKeysRejectsRegex){var regexRejectingObjectKeys=Object.keys;overrideNative(Object,\"keys\",function keys(value){if(Type.regex(value)){var regexKeys=[];for(var k in value){if(_hasOwnProperty(value,k)){_push(regexKeys,k)}}return regexKeys}return regexRejectingObjectKeys(value)});keys=Object.keys}if(Object.getOwnPropertyNames){var objectGOPNAcceptsPrimitives=!throwsError(function(){Object.getOwnPropertyNames(\"foo\")});if(!objectGOPNAcceptsPrimitives){var cachedWindowNames=(typeof window===\"undefined\"?\"undefined\":_typeof(window))===\"object\"?Object.getOwnPropertyNames(window):[];var originalObjectGetOwnPropertyNames=Object.getOwnPropertyNames;overrideNative(Object,\"getOwnPropertyNames\",function getOwnPropertyNames(value){var val=ES.ToObject(value);if(_toString(val)===\"[object Window]\"){try{return originalObjectGetOwnPropertyNames(val)}catch(e){return _concat([],cachedWindowNames)}}return originalObjectGetOwnPropertyNames(val)})}}if(Object.getOwnPropertyDescriptor){var objectGOPDAcceptsPrimitives=!throwsError(function(){Object.getOwnPropertyDescriptor(\"foo\",\"bar\")});if(!objectGOPDAcceptsPrimitives){var originalObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;overrideNative(Object,\"getOwnPropertyDescriptor\",function getOwnPropertyDescriptor(value,property){return originalObjectGetOwnPropertyDescriptor(ES.ToObject(value),property)})}}if(Object.seal){var objectSealAcceptsPrimitives=!throwsError(function(){Object.seal(\"foo\")});if(!objectSealAcceptsPrimitives){var originalObjectSeal=Object.seal;overrideNative(Object,\"seal\",function seal(value){if(!ES.TypeIsObject(value)){return value}return originalObjectSeal(value)})}}if(Object.isSealed){var objectIsSealedAcceptsPrimitives=!throwsError(function(){Object.isSealed(\"foo\")});if(!objectIsSealedAcceptsPrimitives){var originalObjectIsSealed=Object.isSealed;overrideNative(Object,\"isSealed\",function isSealed(value){if(!ES.TypeIsObject(value)){return true}return originalObjectIsSealed(value)})}}if(Object.freeze){var objectFreezeAcceptsPrimitives=!throwsError(function(){Object.freeze(\"foo\")});if(!objectFreezeAcceptsPrimitives){var originalObjectFreeze=Object.freeze;overrideNative(Object,\"freeze\",function freeze(value){if(!ES.TypeIsObject(value)){return value}return originalObjectFreeze(value)})}}if(Object.isFrozen){var objectIsFrozenAcceptsPrimitives=!throwsError(function(){Object.isFrozen(\"foo\")});if(!objectIsFrozenAcceptsPrimitives){var originalObjectIsFrozen=Object.isFrozen;overrideNative(Object,\"isFrozen\",function isFrozen(value){if(!ES.TypeIsObject(value)){return true}return originalObjectIsFrozen(value)})}}if(Object.preventExtensions){var objectPreventExtensionsAcceptsPrimitives=!throwsError(function(){Object.preventExtensions(\"foo\")});if(!objectPreventExtensionsAcceptsPrimitives){var originalObjectPreventExtensions=Object.preventExtensions;overrideNative(Object,\"preventExtensions\",function preventExtensions(value){if(!ES.TypeIsObject(value)){return value}return originalObjectPreventExtensions(value)})}}if(Object.isExtensible){var objectIsExtensibleAcceptsPrimitives=!throwsError(function(){Object.isExtensible(\"foo\")});if(!objectIsExtensibleAcceptsPrimitives){var originalObjectIsExtensible=Object.isExtensible;overrideNative(Object,\"isExtensible\",function isExtensible(value){if(!ES.TypeIsObject(value)){return false}return originalObjectIsExtensible(value)})}}if(Object.getPrototypeOf){var objectGetProtoAcceptsPrimitives=!throwsError(function(){Object.getPrototypeOf(\"foo\")});if(!objectGetProtoAcceptsPrimitives){var originalGetProto=Object.getPrototypeOf;overrideNative(Object,\"getPrototypeOf\",function getPrototypeOf(value){return originalGetProto(ES.ToObject(value))})}}var hasFlags=supportsDescriptors&&function(){var desc=Object.getOwnPropertyDescriptor(RegExp.prototype,\"flags\");return desc&&ES.IsCallable(desc.get)}();if(supportsDescriptors&&!hasFlags){var regExpFlagsGetter=function flags(){if(!ES.TypeIsObject(this)){throw new TypeError(\"Method called on incompatible type: must be an object.\")}var result=\"\";if(this.global){result+=\"g\"}if(this.ignoreCase){result+=\"i\"}if(this.multiline){result+=\"m\"}if(this.unicode){result+=\"u\"}if(this.sticky){result+=\"y\"}return result};Value.getter(RegExp.prototype,\"flags\",regExpFlagsGetter)}var regExpSupportsFlagsWithRegex=supportsDescriptors&&valueOrFalseIfThrows(function(){return String(new RegExp(/a/g,\"i\"))===\"/a/i\"});var regExpNeedsToSupportSymbolMatch=hasSymbols&&supportsDescriptors&&function(){var regex=/./;regex[_Symbol.match]=false;return RegExp(regex)===regex}();var regexToStringIsGeneric=valueOrFalseIfThrows(function(){return RegExp.prototype.toString.call({source:\"abc\"})===\"/abc/\"});var regexToStringSupportsGenericFlags=regexToStringIsGeneric&&valueOrFalseIfThrows(function(){return RegExp.prototype.toString.call({source:\"a\",flags:\"b\"})===\"/a/b\"});if(!regexToStringIsGeneric||!regexToStringSupportsGenericFlags){var origRegExpToString=RegExp.prototype.toString;defineProperty(RegExp.prototype,\"toString\",function toString(){var R=ES.RequireObjectCoercible(this);if(Type.regex(R)){return _call(origRegExpToString,R)}var pattern=$String(R.source);var flags=$String(R.flags);return\"/\"+pattern+\"/\"+flags},true);Value.preserveToString(RegExp.prototype.toString,origRegExpToString)}if(supportsDescriptors&&(!regExpSupportsFlagsWithRegex||regExpNeedsToSupportSymbolMatch)){var flagsGetter=Object.getOwnPropertyDescriptor(RegExp.prototype,\"flags\").get;var sourceDesc=Object.getOwnPropertyDescriptor(RegExp.prototype,\"source\")||{};var legacySourceGetter=function legacySourceGetter(){return this.source};var sourceGetter=ES.IsCallable(sourceDesc.get)?sourceDesc.get:legacySourceGetter;var OrigRegExp=RegExp;var RegExpShim=function(){return function RegExp(pattern,flags){var patternIsRegExp=ES.IsRegExp(pattern);var calledWithNew=this instanceof RegExp;if(!calledWithNew&&patternIsRegExp&&typeof flags===\"undefined\"&&pattern.constructor===RegExp){return pattern}var P=pattern;var F=flags;if(Type.regex(pattern)){P=ES.Call(sourceGetter,pattern);F=typeof flags===\"undefined\"?ES.Call(flagsGetter,pattern):flags;return new RegExp(P,F)}else if(patternIsRegExp){P=pattern.source;F=typeof flags===\"undefined\"?pattern.flags:flags}return new OrigRegExp(pattern,flags)}}();wrapConstructor(OrigRegExp,RegExpShim,{$input:true});RegExp=RegExpShim;Value.redefine(globals,\"RegExp\",RegExpShim)}if(supportsDescriptors){var regexGlobals={input:\"$_\",lastMatch:\"$&\",lastParen:\"$+\",leftContext:\"$`\",rightContext:\"$'\"};_forEach(keys(regexGlobals),function(prop){if(prop in RegExp&&!(regexGlobals[prop]in RegExp)){Value.getter(RegExp,regexGlobals[prop],function get(){return RegExp[prop]})}})}addDefaultSpecies(RegExp);var inverseEpsilon=1/Number.EPSILON;var roundTiesToEven=function roundTiesToEven(n){return n+inverseEpsilon-inverseEpsilon};var BINARY_32_EPSILON=Math.pow(2,-23);var BINARY_32_MAX_VALUE=Math.pow(2,127)*(2-BINARY_32_EPSILON);var BINARY_32_MIN_VALUE=Math.pow(2,-126);var E=Math.E;var LOG2E=Math.LOG2E;var LOG10E=Math.LOG10E;var numberCLZ=Number.prototype.clz;delete Number.prototype.clz;var MathShims={acosh:function acosh(value){var x=Number(value);if(numberIsNaN(x)||value<1){return NaN}if(x===1){return 0}if(x===Infinity){return x}return _log(x/E+_sqrt(x+1)*_sqrt(x-1)/E)+1},asinh:function asinh(value){var x=Number(value);if(x===0||!globalIsFinite(x)){return x}return x<0?-asinh(-x):_log(x+_sqrt(x*x+1))},atanh:function atanh(value){var x=Number(value);if(numberIsNaN(x)||x<-1||x>1){return NaN}if(x===-1){return-Infinity}if(x===1){return Infinity}if(x===0){return x}return.5*_log((1+x)/(1-x))},cbrt:function cbrt(value){var x=Number(value);if(x===0){return x}var negate=x<0;var result;if(negate){x=-x}if(x===Infinity){result=Infinity}else{result=_exp(_log(x)/3);result=(x/(result*result)+2*result)/3}return negate?-result:result},clz32:function clz32(value){var x=Number(value);var number=ES.ToUint32(x);if(number===0){return 32}return numberCLZ?ES.Call(numberCLZ,number):31-_floor(_log(number+.5)*LOG2E)},cosh:function cosh(value){var x=Number(value);if(x===0){return 1}if(numberIsNaN(x)){return NaN}if(!globalIsFinite(x)){return Infinity}if(x<0){x=-x}if(x>21){return _exp(x)/2}return(_exp(x)+_exp(-x))/2},expm1:function expm1(value){var x=Number(value);if(x===-Infinity){return-1}if(!globalIsFinite(x)||x===0){return x}if(_abs(x)>.5){return _exp(x)-1}var t=x;var sum=0;var n=1;while(sum+t!==sum){sum+=t;n+=1;t*=x/n}return sum},hypot:function hypot(x,y){var result=0;var largest=0;for(var i=0;i<arguments.length;++i){var value=_abs(Number(arguments[i]));if(largest<value){result*=largest/value*(largest/value);result+=1;largest=value}else{result+=value>0?value/largest*(value/largest):value}}return largest===Infinity?Infinity:largest*_sqrt(result)},log2:function log2(value){return _log(value)*LOG2E},log10:function log10(value){return _log(value)*LOG10E},log1p:function log1p(value){var x=Number(value);if(x<-1||numberIsNaN(x)){return NaN}if(x===0||x===Infinity){return x}if(x===-1){return-Infinity}return 1+x-1===0?x:x*(_log(1+x)/(1+x-1))},sign:_sign,sinh:function sinh(value){var x=Number(value);if(!globalIsFinite(x)||x===0){return x}if(_abs(x)<1){return(Math.expm1(x)-Math.expm1(-x))/2}return(_exp(x-1)-_exp(-x-1))*E/2},tanh:function tanh(value){var x=Number(value);if(numberIsNaN(x)||x===0){return x}if(x>=20){return 1}if(x<=-20){return-1}return(Math.expm1(x)-Math.expm1(-x))/(_exp(x)+_exp(-x))},trunc:function trunc(value){var x=Number(value);return x<0?-_floor(-x):_floor(x)},imul:function imul(x,y){var a=ES.ToUint32(x);var b=ES.ToUint32(y);var ah=a>>>16&65535;var al=a&65535;var bh=b>>>16&65535;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16>>>0)|0},fround:function fround(x){var v=Number(x);if(v===0||v===Infinity||v===-Infinity||numberIsNaN(v)){return v}var sign=_sign(v);var abs=_abs(v);if(abs<BINARY_32_MIN_VALUE){return sign*roundTiesToEven(abs/BINARY_32_MIN_VALUE/BINARY_32_EPSILON)*BINARY_32_MIN_VALUE*BINARY_32_EPSILON}var a=(1+BINARY_32_EPSILON/Number.EPSILON)*abs;var result=a-(a-abs);if(result>BINARY_32_MAX_VALUE||numberIsNaN(result)){return sign*Infinity}return sign*result}};defineProperties(Math,MathShims);defineProperty(Math,\"log1p\",MathShims.log1p,Math.log1p(-1e-17)!==-1e-17);defineProperty(Math,\"asinh\",MathShims.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));defineProperty(Math,\"tanh\",MathShims.tanh,Math.tanh(-2e-17)!==-2e-17);defineProperty(Math,\"acosh\",MathShims.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);defineProperty(Math,\"cbrt\",MathShims.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8);defineProperty(Math,\"sinh\",MathShims.sinh,Math.sinh(-2e-17)!==-2e-17);var expm1OfTen=Math.expm1(10);defineProperty(Math,\"expm1\",MathShims.expm1,expm1OfTen>22025.465794806718||expm1OfTen<22025.465794806718);var origMathRound=Math.round;var roundHandlesBoundaryConditions=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var smallestPositiveNumberWhereRoundBreaks=inverseEpsilon+1;var largestPositiveNumberWhereRoundBreaks=2*inverseEpsilon-1;var roundDoesNotIncreaseIntegers=[smallestPositiveNumberWhereRoundBreaks,largestPositiveNumberWhereRoundBreaks].every(function(num){return Math.round(num)===num});defineProperty(Math,\"round\",function round(x){var floor=_floor(x);var ceil=floor===-1?-0:floor+1;return x-floor<.5?floor:ceil},!roundHandlesBoundaryConditions||!roundDoesNotIncreaseIntegers);Value.preserveToString(Math.round,origMathRound);var origImul=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=MathShims.imul;Value.preserveToString(Math.imul,origImul)}if(Math.imul.length!==2){overrideNative(Math,\"imul\",function imul(x,y){return ES.Call(origImul,Math,arguments)})}var PromiseShim=function(){var setTimeout=globals.setTimeout;if(typeof setTimeout!==\"function\"&&(typeof setTimeout===\"undefined\"?\"undefined\":_typeof(setTimeout))!==\"object\"){return}ES.IsPromise=function(promise){if(!ES.TypeIsObject(promise)){return false}if(typeof promise._promise===\"undefined\"){return false}return true};var PromiseCapability=function PromiseCapability(C){if(!ES.IsConstructor(C)){throw new TypeError(\"Bad promise constructor\")}var capability=this;var resolver=function resolver(resolve,reject){if(capability.resolve!==void 0||capability.reject!==void 0){throw new TypeError(\"Bad Promise implementation!\")}capability.resolve=resolve;capability.reject=reject};capability.resolve=void 0;capability.reject=void 0;capability.promise=new C(resolver);if(!(ES.IsCallable(capability.resolve)&&ES.IsCallable(capability.reject))){throw new TypeError(\"Bad promise constructor\")}};var makeZeroTimeout;if(typeof window!==\"undefined\"&&ES.IsCallable(window.postMessage)){makeZeroTimeout=function makeZeroTimeout(){var timeouts=[];var messageName=\"zero-timeout-message\";var setZeroTimeout=function setZeroTimeout(fn){_push(timeouts,fn);window.postMessage(messageName,\"*\")};var handleMessage=function handleMessage(event){if(event.source===window&&event.data===messageName){event.stopPropagation();if(timeouts.length===0){return}var fn=_shift(timeouts);fn()}};window.addEventListener(\"message\",handleMessage,true);return setZeroTimeout}}var makePromiseAsap=function makePromiseAsap(){var P=globals.Promise;var pr=P&&P.resolve&&P.resolve();return pr&&function(task){return pr.then(task)}};var enqueue=ES.IsCallable(globals.setImmediate)?globals.setImmediate:(typeof process===\"undefined\"?\"undefined\":_typeof(process))===\"object\"&&process.nextTick?process.nextTick:makePromiseAsap()||(ES.IsCallable(makeZeroTimeout)?makeZeroTimeout():function(task){setTimeout(task,0)});var PROMISE_IDENTITY=function PROMISE_IDENTITY(x){return x};var PROMISE_THROWER=function PROMISE_THROWER(e){throw e};var PROMISE_PENDING=0;var PROMISE_FULFILLED=1;var PROMISE_REJECTED=2;var PROMISE_FULFILL_OFFSET=0;var PROMISE_REJECT_OFFSET=1;var PROMISE_CAPABILITY_OFFSET=2;var PROMISE_FAKE_CAPABILITY={};var enqueuePromiseReactionJob=function enqueuePromiseReactionJob(handler,capability,argument){enqueue(function(){promiseReactionJob(handler,capability,argument)})};var promiseReactionJob=function promiseReactionJob(handler,promiseCapability,argument){var handlerResult,f;if(promiseCapability===PROMISE_FAKE_CAPABILITY){return handler(argument)}try{handlerResult=handler(argument);f=promiseCapability.resolve}catch(e){handlerResult=e;f=promiseCapability.reject}f(handlerResult)};var fulfillPromise=function fulfillPromise(promise,value){var _promise=promise._promise;var length=_promise.reactionLength;if(length>0){enqueuePromiseReactionJob(_promise.fulfillReactionHandler0,_promise.reactionCapability0,value);_promise.fulfillReactionHandler0=void 0;_promise.rejectReactions0=void 0;_promise.reactionCapability0=void 0;if(length>1){for(var i=1,idx=0;i<length;i++,idx+=3){enqueuePromiseReactionJob(_promise[idx+PROMISE_FULFILL_OFFSET],_promise[idx+PROMISE_CAPABILITY_OFFSET],value);promise[idx+PROMISE_FULFILL_OFFSET]=void 0;promise[idx+PROMISE_REJECT_OFFSET]=void 0;promise[idx+PROMISE_CAPABILITY_OFFSET]=void 0}}}_promise.result=value;_promise.state=PROMISE_FULFILLED;_promise.reactionLength=0};var rejectPromise=function rejectPromise(promise,reason){var _promise=promise._promise;var length=_promise.reactionLength;if(length>0){enqueuePromiseReactionJob(_promise.rejectReactionHandler0,_promise.reactionCapability0,reason);_promise.fulfillReactionHandler0=void 0;_promise.rejectReactions0=void 0;_promise.reactionCapability0=void 0;if(length>1){for(var i=1,idx=0;i<length;i++,idx+=3){enqueuePromiseReactionJob(_promise[idx+PROMISE_REJECT_OFFSET],_promise[idx+PROMISE_CAPABILITY_OFFSET],reason);promise[idx+PROMISE_FULFILL_OFFSET]=void 0;promise[idx+PROMISE_REJECT_OFFSET]=void 0;promise[idx+PROMISE_CAPABILITY_OFFSET]=void 0}}}_promise.result=reason;_promise.state=PROMISE_REJECTED;_promise.reactionLength=0};var createResolvingFunctions=function createResolvingFunctions(promise){var alreadyResolved=false;var resolve=function resolve(resolution){var then;if(alreadyResolved){return}alreadyResolved=true;if(resolution===promise){return rejectPromise(promise,new TypeError(\"Self resolution\"))}if(!ES.TypeIsObject(resolution)){return fulfillPromise(promise,resolution)}try{then=resolution.then}catch(e){return rejectPromise(promise,e)}if(!ES.IsCallable(then)){return fulfillPromise(promise,resolution)}enqueue(function(){promiseResolveThenableJob(promise,resolution,then)})};var reject=function reject(reason){if(alreadyResolved){return}alreadyResolved=true;return rejectPromise(promise,reason)};return{resolve:resolve,reject:reject}};var optimizedThen=function optimizedThen(then,thenable,resolve,reject){if(then===Promise$prototype$then){_call(then,thenable,resolve,reject,PROMISE_FAKE_CAPABILITY)}else{_call(then,thenable,resolve,reject)}};var promiseResolveThenableJob=function promiseResolveThenableJob(promise,thenable,then){var resolvingFunctions=createResolvingFunctions(promise);var resolve=resolvingFunctions.resolve;var reject=resolvingFunctions.reject;try{optimizedThen(then,thenable,resolve,reject)}catch(e){reject(e)}};var Promise$prototype,Promise$prototype$then;var Promise=function(){var PromiseShim=function Promise(resolver){if(!(this instanceof PromiseShim)){throw new TypeError('Constructor Promise requires \"new\"')}if(this&&this._promise){throw new TypeError(\"Bad construction\")}if(!ES.IsCallable(resolver)){throw new TypeError(\"not a valid resolver\")}var promise=emulateES6construct(this,PromiseShim,Promise$prototype,{_promise:{result:void 0,state:PROMISE_PENDING,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}});var resolvingFunctions=createResolvingFunctions(promise);var reject=resolvingFunctions.reject;try{resolver(resolvingFunctions.resolve,reject)}catch(e){reject(e)}return promise};return PromiseShim}();Promise$prototype=Promise.prototype;var _promiseAllResolver=function _promiseAllResolver(index,values,capability,remaining){var alreadyCalled=false;return function(x){if(alreadyCalled){return}alreadyCalled=true;values[index]=x;if(--remaining.count===0){var resolve=capability.resolve;resolve(values)}}};var performPromiseAll=function performPromiseAll(iteratorRecord,C,resultCapability){var it=iteratorRecord.iterator;var values=[];var remaining={count:1};var next,nextValue;var index=0;while(true){try{next=ES.IteratorStep(it);if(next===false){iteratorRecord.done=true;break}nextValue=next.value}catch(e){iteratorRecord.done=true;throw e}values[index]=void 0;var nextPromise=C.resolve(nextValue);var resolveElement=_promiseAllResolver(index,values,resultCapability,remaining);remaining.count+=1;optimizedThen(nextPromise.then,nextPromise,resolveElement,resultCapability.reject);index+=1}if(--remaining.count===0){var resolve=resultCapability.resolve;resolve(values)}return resultCapability.promise};var performPromiseRace=function performPromiseRace(iteratorRecord,C,resultCapability){var it=iteratorRecord.iterator;var next,nextValue,nextPromise;while(true){try{next=ES.IteratorStep(it);if(next===false){iteratorRecord.done=true;break}nextValue=next.value}catch(e){iteratorRecord.done=true;throw e}nextPromise=C.resolve(nextValue);optimizedThen(nextPromise.then,nextPromise,resultCapability.resolve,resultCapability.reject)}return resultCapability.promise};defineProperties(Promise,{all:function all(iterable){var C=this;if(!ES.TypeIsObject(C)){throw new TypeError(\"Promise is not object\")}var capability=new PromiseCapability(C);var iterator,iteratorRecord;try{iterator=ES.GetIterator(iterable);iteratorRecord={iterator:iterator,done:false};return performPromiseAll(iteratorRecord,C,capability)}catch(e){var exception=e;if(iteratorRecord&&!iteratorRecord.done){try{ES.IteratorClose(iterator,true)}catch(ee){exception=ee}}var reject=capability.reject;reject(exception);return capability.promise}},race:function race(iterable){var C=this;if(!ES.TypeIsObject(C)){throw new TypeError(\"Promise is not object\")}var capability=new PromiseCapability(C);var iterator,iteratorRecord;try{iterator=ES.GetIterator(iterable);iteratorRecord={iterator:iterator,done:false};return performPromiseRace(iteratorRecord,C,capability)}catch(e){var exception=e;if(iteratorRecord&&!iteratorRecord.done){try{ES.IteratorClose(iterator,true)}catch(ee){exception=ee}}var reject=capability.reject;reject(exception);return capability.promise}},reject:function reject(reason){var C=this;if(!ES.TypeIsObject(C)){throw new TypeError(\"Bad promise constructor\")}var capability=new PromiseCapability(C);var rejectFunc=capability.reject;rejectFunc(reason);return capability.promise},resolve:function resolve(v){var C=this;if(!ES.TypeIsObject(C)){throw new TypeError(\"Bad promise constructor\")}if(ES.IsPromise(v)){var constructor=v.constructor;if(constructor===C){return v}}var capability=new PromiseCapability(C);var resolveFunc=capability.resolve;resolveFunc(v);return capability.promise}});defineProperties(Promise$prototype,{catch:function _catch(onRejected){return this.then(null,onRejected)},then:function then(onFulfilled,onRejected){var promise=this;if(!ES.IsPromise(promise)){throw new TypeError(\"not a promise\")}var C=ES.SpeciesConstructor(promise,Promise);var resultCapability;var returnValueIsIgnored=arguments.length>2&&arguments[2]===PROMISE_FAKE_CAPABILITY;if(returnValueIsIgnored&&C===Promise){resultCapability=PROMISE_FAKE_CAPABILITY}else{resultCapability=new PromiseCapability(C)}var fulfillReactionHandler=ES.IsCallable(onFulfilled)?onFulfilled:PROMISE_IDENTITY;var rejectReactionHandler=ES.IsCallable(onRejected)?onRejected:PROMISE_THROWER;var _promise=promise._promise;var value;if(_promise.state===PROMISE_PENDING){if(_promise.reactionLength===0){_promise.fulfillReactionHandler0=fulfillReactionHandler;_promise.rejectReactionHandler0=rejectReactionHandler;_promise.reactionCapability0=resultCapability}else{var idx=3*(_promise.reactionLength-1);_promise[idx+PROMISE_FULFILL_OFFSET]=fulfillReactionHandler;_promise[idx+PROMISE_REJECT_OFFSET]=rejectReactionHandler;_promise[idx+PROMISE_CAPABILITY_OFFSET]=resultCapability}_promise.reactionLength+=1}else if(_promise.state===PROMISE_FULFILLED){value=_promise.result;enqueuePromiseReactionJob(fulfillReactionHandler,resultCapability,value)}else if(_promise.state===PROMISE_REJECTED){value=_promise.result;enqueuePromiseReactionJob(rejectReactionHandler,resultCapability,value)}else{throw new TypeError(\"unexpected Promise state\")}return resultCapability.promise}});PROMISE_FAKE_CAPABILITY=new PromiseCapability(Promise);Promise$prototype$then=Promise$prototype.then;return Promise}();if(globals.Promise){delete globals.Promise.accept;delete globals.Promise.defer;delete globals.Promise.prototype.chain}if(typeof PromiseShim===\"function\"){defineProperties(globals,{Promise:PromiseShim});var promiseSupportsSubclassing=supportsSubclassing(globals.Promise,function(S){return S.resolve(42).then(function(){})instanceof S});var promiseIgnoresNonFunctionThenCallbacks=!throwsError(function(){globals.Promise.reject(42).then(null,5).then(null,noop)});var promiseRequiresObjectContext=throwsError(function(){globals.Promise.call(3,noop)});var promiseResolveBroken=function(Promise){var p=Promise.resolve(5);p.constructor={};var p2=Promise.resolve(p);try{p2.then(null,noop).then(null,noop)}catch(e){return true}return p===p2}(globals.Promise);var getsThenSynchronously=supportsDescriptors&&function(){var count=0;var thenable=Object.defineProperty({},\"then\",{get:function get(){count+=1}});Promise.resolve(thenable);return count===1}();var BadResolverPromise=function BadResolverPromise(executor){var p=new Promise(executor);executor(3,function(){});this.then=p.then;this.constructor=BadResolverPromise};BadResolverPromise.prototype=Promise.prototype;BadResolverPromise.all=Promise.all;var hasBadResolverPromise=valueOrFalseIfThrows(function(){return!!BadResolverPromise.all([1,2])});if(!promiseSupportsSubclassing||!promiseIgnoresNonFunctionThenCallbacks||!promiseRequiresObjectContext||promiseResolveBroken||!getsThenSynchronously||hasBadResolverPromise){Promise=PromiseShim;overrideNative(globals,\"Promise\",PromiseShim)}if(Promise.all.length!==1){var origAll=Promise.all;overrideNative(Promise,\"all\",function all(iterable){return ES.Call(origAll,this,arguments)})}if(Promise.race.length!==1){var origRace=Promise.race;overrideNative(Promise,\"race\",function race(iterable){return ES.Call(origRace,this,arguments)})}if(Promise.resolve.length!==1){var origResolve=Promise.resolve;overrideNative(Promise,\"resolve\",function resolve(x){return ES.Call(origResolve,this,arguments)})}if(Promise.reject.length!==1){var origReject=Promise.reject;overrideNative(Promise,\"reject\",function reject(r){return ES.Call(origReject,this,arguments)})}ensureEnumerable(Promise,\"all\");ensureEnumerable(Promise,\"race\");ensureEnumerable(Promise,\"resolve\");ensureEnumerable(Promise,\"reject\");addDefaultSpecies(Promise)}var testOrder=function testOrder(a){var b=keys(_reduce(a,function(o,k){o[k]=true;return o},{}));return a.join(\":\")===b.join(\":\")};var preservesInsertionOrder=testOrder([\"z\",\"a\",\"bb\"]);var preservesNumericInsertionOrder=testOrder([\"z\",1,\"a\",\"3\",2]);if(supportsDescriptors){var fastkey=function fastkey(key,skipInsertionOrderCheck){if(!skipInsertionOrderCheck&&!preservesInsertionOrder){return null}if(isNullOrUndefined(key)){return\"^\"+ES.ToString(key)}else if(typeof key===\"string\"){return\"$\"+key}else if(typeof key===\"number\"){if(!preservesNumericInsertionOrder){return\"n\"+key}return key}else if(typeof key===\"boolean\"){return\"b\"+key}return null};var emptyObject=function emptyObject(){return Object.create?Object.create(null):{}};var addIterableToMap=function addIterableToMap(MapConstructor,map,iterable){if(isArray(iterable)||Type.string(iterable)){_forEach(iterable,function(entry){if(!ES.TypeIsObject(entry)){throw new TypeError(\"Iterator value \"+entry+\" is not an entry object\")}map.set(entry[0],entry[1])})}else if(iterable instanceof MapConstructor){_call(MapConstructor.prototype.forEach,iterable,function(value,key){map.set(key,value)})}else{var iter,adder;if(!isNullOrUndefined(iterable)){adder=map.set;if(!ES.IsCallable(adder)){throw new TypeError(\"bad map\")}iter=ES.GetIterator(iterable)}if(typeof iter!==\"undefined\"){while(true){var next=ES.IteratorStep(iter);if(next===false){break}var nextItem=next.value;try{if(!ES.TypeIsObject(nextItem)){throw new TypeError(\"Iterator value \"+nextItem+\" is not an entry object\")}_call(adder,map,nextItem[0],nextItem[1])}catch(e){ES.IteratorClose(iter,true);throw e}}}}};var addIterableToSet=function addIterableToSet(SetConstructor,set,iterable){if(isArray(iterable)||Type.string(iterable)){_forEach(iterable,function(value){set.add(value)})}else if(iterable instanceof SetConstructor){_call(SetConstructor.prototype.forEach,iterable,function(value){set.add(value)})}else{var iter,adder;if(!isNullOrUndefined(iterable)){adder=set.add;if(!ES.IsCallable(adder)){throw new TypeError(\"bad set\")}iter=ES.GetIterator(iterable)}if(typeof iter!==\"undefined\"){while(true){var next=ES.IteratorStep(iter);if(next===false){break}var nextValue=next.value;try{_call(adder,set,nextValue)}catch(e){ES.IteratorClose(iter,true);throw e}}}}};var collectionShims={Map:function(){var empty={};var MapEntry=function MapEntry(key,value){this.key=key;this.value=value;this.next=null;this.prev=null};MapEntry.prototype.isRemoved=function isRemoved(){return this.key===empty};var isMap=function isMap(map){return!!map._es6map};var requireMapSlot=function requireMapSlot(map,method){if(!ES.TypeIsObject(map)||!isMap(map)){throw new TypeError(\"Method Map.prototype.\"+method+\" called on incompatible receiver \"+ES.ToString(map))}};var MapIterator=function MapIterator(map,kind){requireMapSlot(map,\"[[MapIterator]]\");this.head=map._head;this.i=this.head;this.kind=kind};MapIterator.prototype={next:function next(){var i=this.i;var kind=this.kind;var head=this.head;if(typeof this.i===\"undefined\"){return iteratorResult()}while(i.isRemoved()&&i!==head){i=i.prev}var result;while(i.next!==head){i=i.next;if(!i.isRemoved()){if(kind===\"key\"){result=i.key}else if(kind===\"value\"){result=i.value}else{result=[i.key,i.value]}this.i=i;return iteratorResult(result)}}this.i=void 0;return iteratorResult()}};addIterator(MapIterator.prototype);var Map$prototype;var MapShim=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires \"new\"')}if(this&&this._es6map){throw new TypeError(\"Bad construction\")}var map=emulateES6construct(this,Map,Map$prototype,{_es6map:true,_head:null,_map:OrigMap?new OrigMap:null,_size:0,_storage:emptyObject()});var head=new MapEntry(null,null);head.next=head.prev=head;map._head=head;if(arguments.length>0){addIterableToMap(Map,map,arguments[0])}return map};Map$prototype=MapShim.prototype;Value.getter(Map$prototype,\"size\",function(){if(typeof this._size===\"undefined\"){throw new TypeError(\"size method called on incompatible Map\")}return this._size});defineProperties(Map$prototype,{get:function get(key){requireMapSlot(this,\"get\");var entry;var fkey=fastkey(key,true);if(fkey!==null){entry=this._storage[fkey];if(entry){return entry.value}else{return}}if(this._map){entry=origMapGet.call(this._map,key);if(entry){return entry.value}else{return}}var head=this._head;var i=head;while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){return i.value}}},has:function has(key){requireMapSlot(this,\"has\");var fkey=fastkey(key,true);if(fkey!==null){return typeof this._storage[fkey]!==\"undefined\"}if(this._map){return origMapHas.call(this._map,key)}var head=this._head;var i=head;while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){return true}}return false},set:function set(key,value){requireMapSlot(this,\"set\");var head=this._head;var i=head;var entry;var fkey=fastkey(key,true);if(fkey!==null){if(typeof this._storage[fkey]!==\"undefined\"){this._storage[fkey].value=value;return this}else{entry=this._storage[fkey]=new MapEntry(key,value);i=head.prev}}else if(this._map){if(origMapHas.call(this._map,key)){origMapGet.call(this._map,key).value=value}else{entry=new MapEntry(key,value);origMapSet.call(this._map,key,entry);i=head.prev}}while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){i.value=value;return this}}entry=entry||new MapEntry(key,value);if(ES.SameValue(-0,key)){entry.key=+0}entry.next=this._head;entry.prev=this._head.prev;entry.prev.next=entry;entry.next.prev=entry;this._size+=1;return this},delete:function _delete(key){requireMapSlot(this,\"delete\");var head=this._head;var i=head;var fkey=fastkey(key,true);if(fkey!==null){if(typeof this._storage[fkey]===\"undefined\"){return false}i=this._storage[fkey].prev;delete this._storage[fkey]}else if(this._map){if(!origMapHas.call(this._map,key)){return false}i=origMapGet.call(this._map,key).prev;origMapDelete.call(this._map,key)}while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){i.key=empty;i.value=empty;i.prev.next=i.next;i.next.prev=i.prev;this._size-=1;return true}}return false},clear:function clear(){requireMapSlot(this,\"clear\");this._map=OrigMap?new OrigMap:null;this._size=0;this._storage=emptyObject();var head=this._head;var i=head;var p=i.next;while((i=p)!==head){i.key=empty;i.value=empty;p=i.next;i.next=i.prev=head}head.next=head.prev=head},keys:function keys(){requireMapSlot(this,\"keys\");return new MapIterator(this,\"key\")},values:function values(){requireMapSlot(this,\"values\");return new MapIterator(this,\"value\")},entries:function entries(){requireMapSlot(this,\"entries\");return new MapIterator(this,\"key+value\")},forEach:function forEach(callback){requireMapSlot(this,\"forEach\");var context=arguments.length>1?arguments[1]:null;var it=this.entries();for(var entry=it.next();!entry.done;entry=it.next()){if(context){_call(callback,context,entry.value[1],entry.value[0],this)}else{callback(entry.value[1],entry.value[0],this)}}}});addIterator(Map$prototype,Map$prototype.entries);return MapShim}(),Set:function(){var isSet=function isSet(set){return set._es6set&&typeof set._storage!==\"undefined\"};var requireSetSlot=function requireSetSlot(set,method){if(!ES.TypeIsObject(set)||!isSet(set)){throw new TypeError(\"Set.prototype.\"+method+\" called on incompatible receiver \"+ES.ToString(set))}};var Set$prototype;var SetShim=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires \"new\"')}if(this&&this._es6set){throw new TypeError(\"Bad construction\")}var set=emulateES6construct(this,Set,Set$prototype,{_es6set:true,\"[[SetData]]\":null,_storage:emptyObject()});if(!set._es6set){throw new TypeError(\"bad set\")}if(arguments.length>0){addIterableToSet(Set,set,arguments[0])}return set};Set$prototype=SetShim.prototype;var decodeKey=function decodeKey(key){var k=key;if(k===\"^null\"){return null}else if(k===\"^undefined\"){return void 0}else{var first=k.charAt(0);if(first===\"$\"){return _strSlice(k,1)}else if(first===\"n\"){return+_strSlice(k,1)}else if(first===\"b\"){return k===\"btrue\"}}return+k};var ensureMap=function ensureMap(set){if(!set[\"[[SetData]]\"]){var m=new collectionShims.Map;set[\"[[SetData]]\"]=m;_forEach(keys(set._storage),function(key){var k=decodeKey(key);m.set(k,k)});set[\"[[SetData]]\"]=m}set._storage=null};Value.getter(SetShim.prototype,\"size\",function(){requireSetSlot(this,\"size\");if(this._storage){return keys(this._storage).length}ensureMap(this);return this[\"[[SetData]]\"].size});defineProperties(SetShim.prototype,{has:function has(key){requireSetSlot(this,\"has\");var fkey;if(this._storage&&(fkey=fastkey(key))!==null){return!!this._storage[fkey]}ensureMap(this);return this[\"[[SetData]]\"].has(key)},add:function add(key){requireSetSlot(this,\"add\");var fkey;if(this._storage&&(fkey=fastkey(key))!==null){this._storage[fkey]=true;return this}ensureMap(this);this[\"[[SetData]]\"].set(key,key);return this},delete:function _delete(key){requireSetSlot(this,\"delete\");var fkey;if(this._storage&&(fkey=fastkey(key))!==null){var hasFKey=_hasOwnProperty(this._storage,fkey);return delete this._storage[fkey]&&hasFKey}ensureMap(this);return this[\"[[SetData]]\"][\"delete\"](key)},clear:function clear(){requireSetSlot(this,\"clear\");if(this._storage){this._storage=emptyObject()}if(this[\"[[SetData]]\"]){this[\"[[SetData]]\"].clear()}},values:function values(){requireSetSlot(this,\"values\");ensureMap(this);return this[\"[[SetData]]\"].values()},entries:function entries(){requireSetSlot(this,\"entries\");ensureMap(this);return this[\"[[SetData]]\"].entries()},forEach:function forEach(callback){requireSetSlot(this,\"forEach\");var context=arguments.length>1?arguments[1]:null;var entireSet=this;ensureMap(entireSet);this[\"[[SetData]]\"].forEach(function(value,key){if(context){_call(callback,context,key,key,entireSet)}else{callback(key,key,entireSet)}})}});defineProperty(SetShim.prototype,\"keys\",SetShim.prototype.values,true);addIterator(SetShim.prototype,SetShim.prototype.values);return SetShim}()};if(globals.Map||globals.Set){var mapAcceptsArguments=valueOrFalseIfThrows(function(){return new Map([[1,2]]).get(1)===2});if(!mapAcceptsArguments){globals.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires \"new\"')}var m=new OrigMap;if(arguments.length>0){addIterableToMap(Map,m,arguments[0])}delete m.constructor;Object.setPrototypeOf(m,globals.Map.prototype);return m};globals.Map.prototype=create(OrigMap.prototype);defineProperty(globals.Map.prototype,\"constructor\",globals.Map,true);Value.preserveToString(globals.Map,OrigMap)}var testMap=new Map;var mapUsesSameValueZero=function(){var m=new Map([[1,0],[2,0],[3,0],[4,0]]);m.set(-0,m);return m.get(0)===m&&m.get(-0)===m&&m.has(0)&&m.has(-0)}();var mapSupportsChaining=testMap.set(1,2)===testMap;if(!mapUsesSameValueZero||!mapSupportsChaining){overrideNative(Map.prototype,\"set\",function set(k,v){_call(origMapSet,this,k===0?0:k,v);return this})}if(!mapUsesSameValueZero){defineProperties(Map.prototype,{get:function get(k){return _call(origMapGet,this,k===0?0:k)},has:function has(k){return _call(origMapHas,this,k===0?0:k)}},true);Value.preserveToString(Map.prototype.get,origMapGet);Value.preserveToString(Map.prototype.has,origMapHas)}var testSet=new Set;var setUsesSameValueZero=function(s){s[\"delete\"](0);s.add(-0);return!s.has(0)}(testSet);var setSupportsChaining=testSet.add(1)===testSet;if(!setUsesSameValueZero||!setSupportsChaining){var origSetAdd=Set.prototype.add;Set.prototype.add=function add(v){_call(origSetAdd,this,v===0?0:v);return this};Value.preserveToString(Set.prototype.add,origSetAdd)}if(!setUsesSameValueZero){var origSetHas=Set.prototype.has;Set.prototype.has=function has(v){return _call(origSetHas,this,v===0?0:v)};Value.preserveToString(Set.prototype.has,origSetHas);var origSetDel=Set.prototype[\"delete\"];Set.prototype[\"delete\"]=function SetDelete(v){return _call(origSetDel,this,v===0?0:v)};Value.preserveToString(Set.prototype[\"delete\"],origSetDel)}var mapSupportsSubclassing=supportsSubclassing(globals.Map,function(M){var m=new M([]);m.set(42,42);return m instanceof M});var mapFailsToSupportSubclassing=Object.setPrototypeOf&&!mapSupportsSubclassing;var mapRequiresNew=function(){try{return!(globals.Map()instanceof globals.Map)}catch(e){return e instanceof TypeError}}();if(globals.Map.length!==0||mapFailsToSupportSubclassing||!mapRequiresNew){globals.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires \"new\"')}var m=new OrigMap;if(arguments.length>0){addIterableToMap(Map,m,arguments[0])}delete m.constructor;Object.setPrototypeOf(m,Map.prototype);return m};globals.Map.prototype=OrigMap.prototype;defineProperty(globals.Map.prototype,\"constructor\",globals.Map,true);Value.preserveToString(globals.Map,OrigMap)}var setSupportsSubclassing=supportsSubclassing(globals.Set,function(S){var s=new S([]);s.add(42,42);return s instanceof S});var setFailsToSupportSubclassing=Object.setPrototypeOf&&!setSupportsSubclassing;var setRequiresNew=function(){try{return!(globals.Set()instanceof globals.Set)}catch(e){return e instanceof TypeError}}();if(globals.Set.length!==0||setFailsToSupportSubclassing||!setRequiresNew){var OrigSet=globals.Set;globals.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires \"new\"')}var s=new OrigSet;if(arguments.length>0){addIterableToSet(Set,s,arguments[0])}delete s.constructor;Object.setPrototypeOf(s,Set.prototype);return s};globals.Set.prototype=OrigSet.prototype;defineProperty(globals.Set.prototype,\"constructor\",globals.Set,true);Value.preserveToString(globals.Set,OrigSet)}var newMap=new globals.Map;var mapIterationThrowsStopIterator=!valueOrFalseIfThrows(function(){return newMap.keys().next().done});if(typeof globals.Map.prototype.clear!==\"function\"||(new globals.Set).size!==0||newMap.size!==0||typeof globals.Map.prototype.keys!==\"function\"||typeof globals.Set.prototype.keys!==\"function\"||typeof globals.Map.prototype.forEach!==\"function\"||typeof globals.Set.prototype.forEach!==\"function\"||isCallableWithoutNew(globals.Map)||isCallableWithoutNew(globals.Set)||typeof newMap.keys().next!==\"function\"||mapIterationThrowsStopIterator||!mapSupportsSubclassing){defineProperties(globals,{Map:collectionShims.Map,Set:collectionShims.Set},true)}if(globals.Set.prototype.keys!==globals.Set.prototype.values){defineProperty(globals.Set.prototype,\"keys\",globals.Set.prototype.values,true)}addIterator(Object.getPrototypeOf((new globals.Map).keys()));addIterator(Object.getPrototypeOf((new globals.Set).keys()));if(functionsHaveNames&&globals.Set.prototype.has.name!==\"has\"){var anonymousSetHas=globals.Set.prototype.has;overrideNative(globals.Set.prototype,\"has\",function has(key){return _call(anonymousSetHas,this,key)})}}defineProperties(globals,collectionShims);addDefaultSpecies(globals.Map);addDefaultSpecies(globals.Set)}var throwUnlessTargetIsObject=function throwUnlessTargetIsObject(target){if(!ES.TypeIsObject(target)){throw new TypeError(\"target must be an object\")}};var ReflectShims={apply:function apply(){return ES.Call(ES.Call,null,arguments)},construct:function construct(constructor,args){if(!ES.IsConstructor(constructor)){throw new TypeError(\"First argument must be a constructor.\")}var newTarget=arguments.length>2?arguments[2]:constructor;if(!ES.IsConstructor(newTarget)){throw new TypeError(\"new.target must be a constructor.\")}return ES.Construct(constructor,args,newTarget,\"internal\")},deleteProperty:function deleteProperty(target,key){throwUnlessTargetIsObject(target);if(supportsDescriptors){var desc=Object.getOwnPropertyDescriptor(target,key);if(desc&&!desc.configurable){return false}}return delete target[key]},has:function has(target,key){throwUnlessTargetIsObject(target);return key in target}};if(Object.getOwnPropertyNames){Object.assign(ReflectShims,{ownKeys:function ownKeys(target){throwUnlessTargetIsObject(target);var keys=Object.getOwnPropertyNames(target);if(ES.IsCallable(Object.getOwnPropertySymbols)){_pushApply(keys,Object.getOwnPropertySymbols(target))}return keys}})}var callAndCatchException=function ConvertExceptionToBoolean(func){return!throwsError(func)};if(Object.preventExtensions){Object.assign(ReflectShims,{isExtensible:function isExtensible(target){throwUnlessTargetIsObject(target);return Object.isExtensible(target)},preventExtensions:function preventExtensions(target){throwUnlessTargetIsObject(target);return callAndCatchException(function(){Object.preventExtensions(target)})}})}if(supportsDescriptors){var internalGet=function get(target,key,receiver){var desc=Object.getOwnPropertyDescriptor(target,key);if(!desc){var parent=Object.getPrototypeOf(target);if(parent===null){return void 0}return internalGet(parent,key,receiver)}if(\"value\"in desc){return desc.value}if(desc.get){return ES.Call(desc.get,receiver)}return void 0};var internalSet=function set(target,key,value,receiver){var desc=Object.getOwnPropertyDescriptor(target,key);if(!desc){var parent=Object.getPrototypeOf(target);if(parent!==null){return internalSet(parent,key,value,receiver)}desc={value:void 0,writable:true,enumerable:true,configurable:true}}if(\"value\"in desc){if(!desc.writable){return false}if(!ES.TypeIsObject(receiver)){return false}var existingDesc=Object.getOwnPropertyDescriptor(receiver,key);if(existingDesc){return Reflect.defineProperty(receiver,key,{value:value})}else{return Reflect.defineProperty(receiver,key,{value:value,writable:true,enumerable:true,configurable:true})}}if(desc.set){_call(desc.set,receiver,value);return true}return false};Object.assign(ReflectShims,{defineProperty:function defineProperty(target,propertyKey,attributes){throwUnlessTargetIsObject(target);return callAndCatchException(function(){Object.defineProperty(target,propertyKey,attributes)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(target,propertyKey){throwUnlessTargetIsObject(target);return Object.getOwnPropertyDescriptor(target,propertyKey)},get:function get(target,key){throwUnlessTargetIsObject(target);var receiver=arguments.length>2?arguments[2]:target;return internalGet(target,key,receiver)},set:function set(target,key,value){throwUnlessTargetIsObject(target);var receiver=arguments.length>3?arguments[3]:target;return internalSet(target,key,value,receiver)}})}if(Object.getPrototypeOf){var objectDotGetPrototypeOf=Object.getPrototypeOf;ReflectShims.getPrototypeOf=function getPrototypeOf(target){throwUnlessTargetIsObject(target);return objectDotGetPrototypeOf(target)}}if(Object.setPrototypeOf&&ReflectShims.getPrototypeOf){var willCreateCircularPrototype=function willCreateCircularPrototype(object,lastProto){var proto=lastProto;while(proto){if(object===proto){return true}proto=ReflectShims.getPrototypeOf(proto)}return false};Object.assign(ReflectShims,{setPrototypeOf:function setPrototypeOf(object,proto){throwUnlessTargetIsObject(object);if(proto!==null&&!ES.TypeIsObject(proto)){throw new TypeError(\"proto must be an object or null\")}if(proto===Reflect.getPrototypeOf(object)){return true}if(Reflect.isExtensible&&!Reflect.isExtensible(object)){return false}if(willCreateCircularPrototype(object,proto)){return false}Object.setPrototypeOf(object,proto);return true}})}var defineOrOverrideReflectProperty=function defineOrOverrideReflectProperty(key,shim){if(!ES.IsCallable(globals.Reflect[key])){defineProperty(globals.Reflect,key,shim)}else{var acceptsPrimitives=valueOrFalseIfThrows(function(){globals.Reflect[key](1);globals.Reflect[key](NaN);globals.Reflect[key](true);return true});if(acceptsPrimitives){overrideNative(globals.Reflect,key,shim)}}};Object.keys(ReflectShims).forEach(function(key){defineOrOverrideReflectProperty(key,ReflectShims[key])});var originalReflectGetProto=globals.Reflect.getPrototypeOf;if(functionsHaveNames&&originalReflectGetProto&&originalReflectGetProto.name!==\"getPrototypeOf\"){overrideNative(globals.Reflect,\"getPrototypeOf\",function getPrototypeOf(target){return _call(originalReflectGetProto,globals.Reflect,target)})}if(globals.Reflect.setPrototypeOf){if(valueOrFalseIfThrows(function(){globals.Reflect.setPrototypeOf(1,{});return true})){overrideNative(globals.Reflect,\"setPrototypeOf\",ReflectShims.setPrototypeOf)}}if(globals.Reflect.defineProperty){if(!valueOrFalseIfThrows(function(){var basic=!globals.Reflect.defineProperty(1,\"test\",{value:1});var extensible=typeof Object.preventExtensions!==\"function\"||!globals.Reflect.defineProperty(Object.preventExtensions({}),\"test\",{});return basic&&extensible})){overrideNative(globals.Reflect,\"defineProperty\",ReflectShims.defineProperty)}}if(globals.Reflect.construct){if(!valueOrFalseIfThrows(function(){var F=function F(){};return globals.Reflect.construct(function(){},[],F)instanceof F})){overrideNative(globals.Reflect,\"construct\",ReflectShims.construct)}}if(String(new Date(NaN))!==\"Invalid Date\"){var dateToString=Date.prototype.toString;var shimmedDateToString=function toString(){var valueOf=+this;if(valueOf!==valueOf){return\"Invalid Date\"}return ES.Call(dateToString,this)};overrideNative(Date.prototype,\"toString\",shimmedDateToString)}var stringHTMLshims={anchor:function anchor(name){return ES.CreateHTML(this,\"a\",\"name\",name)},big:function big(){return ES.CreateHTML(this,\"big\",\"\",\"\")},blink:function blink(){return ES.CreateHTML(this,\"blink\",\"\",\"\")},bold:function bold(){return ES.CreateHTML(this,\"b\",\"\",\"\")},fixed:function fixed(){return ES.CreateHTML(this,\"tt\",\"\",\"\")},fontcolor:function fontcolor(color){return ES.CreateHTML(this,\"font\",\"color\",color)},fontsize:function fontsize(size){return ES.CreateHTML(this,\"font\",\"size\",size)},italics:function italics(){return ES.CreateHTML(this,\"i\",\"\",\"\")},link:function link(url){return ES.CreateHTML(this,\"a\",\"href\",url)},small:function small(){return ES.CreateHTML(this,\"small\",\"\",\"\")},strike:function strike(){return ES.CreateHTML(this,\"strike\",\"\",\"\")},sub:function sub(){return ES.CreateHTML(this,\"sub\",\"\",\"\")},sup:function sub(){return ES.CreateHTML(this,\"sup\",\"\",\"\")}};_forEach(Object.keys(stringHTMLshims),function(key){var method=String.prototype[key];var shouldOverwrite=false;if(ES.IsCallable(method)){var output=_call(method,\"\",' \" ');var quotesCount=_concat([],output.match(/\"/g)).length;shouldOverwrite=output!==output.toLowerCase()||quotesCount>2}else{shouldOverwrite=true}if(shouldOverwrite){overrideNative(String.prototype,key,stringHTMLshims[key])}});var JSONstringifiesSymbols=function(){if(!hasSymbols){return false}var stringify=(typeof JSON===\"undefined\"?\"undefined\":_typeof(JSON))===\"object\"&&typeof JSON.stringify===\"function\"?JSON.stringify:null;if(!stringify){return false}if(typeof stringify(_Symbol())!==\"undefined\"){return true}if(stringify([_Symbol()])!==\"[null]\"){return true}var obj={a:_Symbol()};obj[_Symbol()]=true;if(stringify(obj)!==\"{}\"){return true}return false}();var JSONstringifyAcceptsObjectSymbol=valueOrFalseIfThrows(function(){if(!hasSymbols){return true}return JSON.stringify(Object(_Symbol()))===\"{}\"&&JSON.stringify([Object(_Symbol())])===\"[{}]\"});if(JSONstringifiesSymbols||!JSONstringifyAcceptsObjectSymbol){var origStringify=JSON.stringify;overrideNative(JSON,\"stringify\",function stringify(value){if((typeof value===\"undefined\"?\"undefined\":_typeof(value))===\"symbol\"){return}var replacer;if(arguments.length>1){replacer=arguments[1]}var args=[value];if(!isArray(replacer)){var replaceFn=ES.IsCallable(replacer)?replacer:null;var wrappedReplacer=function wrappedReplacer(key,val){var parsedValue=replaceFn?_call(replaceFn,this,key,val):val;if((typeof parsedValue===\"undefined\"?\"undefined\":_typeof(parsedValue))!==\"symbol\"){if(Type.symbol(parsedValue)){return assignTo({})(parsedValue)}else{return parsedValue}}};args.push(wrappedReplacer)}else{args.push(replacer)}if(arguments.length>2){args.push(arguments[2])}return origStringify.apply(this,args)})}return globals});\"use strict\";define(\"jqueryplugins\",[\"jquery\"],function($){$.prototype.extend({popAttr:function popAttr(attr){var ret=this.attr(attr);this.removeAttr(attr);return ret},popData:function popData(name){var ret=this.data(name);this.removeData(name);return ret},tag:function tag(){return this[0]&&this[0].tagName&&this[0].tagName.toLowerCase()},textNodes:function textNodes(){if(this.length===1&&this[0]instanceof Text){return[this[0]]}return Array.from(this.add(this.contents().add(this.find(\"*\").contents())).filter(function(){return this instanceof Text})).sort(function(left,right){return left.compareDocumentPosition(right)&2?1:-1})},findAndFilter:function findAndFilter(selector){return this.filter(selector).add(this.find(selector))}})});(function(){\"use strict\";var Lexer=void 0;var rules={};function Token(){for(var i=0;i<arguments.length;i++){for(var j in arguments[i]){this[j]=arguments[i][j]}}}function cacheChildPos(token,childToken){token.childAt=token.childAt||{};for(var i=childToken.start;i<childToken.end;i+=1){token.childAt[i]=childToken}}Token.prototype={constructor:Token,addChild:function addChild(tokenData){var index=this.lastChildEnd();var childToken=new Token({start:index,end:tokenData.text&&index+tokenData.text.length,children:[]},tokenData);if(childToken.innerText){_lex(childToken)}this.children.push(childToken);cacheChildPos(this,childToken);return childToken},lastChild:function lastChild(){return this.children?this.children[this.children.length-1]||null:null},lastChildEnd:function lastChildEnd(){var lastToken=this.lastChild();return lastToken?lastToken.end:this.start+Math.max(0,this.text.indexOf(this.innerText))},tokenAt:function tokenAt(index){if(index<this.start||index>=this.end){return null}if(this.childAt){return this.childAt[index]&&this.childAt[index].tokenAt(index)||this}if(this.children.length){for(var i=0;i<this.children.length;i+=1){var childToken=this.children[i].tokenAt(index);if(childToken){return childToken}}}return this},pathAt:function pathAt(index){if(index<this.start||index>=this.end){return[]}if(this.childAt){return(this.childAt[index]&&this.childAt[index].pathAt(index)||[]).concat(this)}var path=[];if(this.children.length){for(var i=0;i<this.children.length;i+=1){var childPath=this.children[i].pathAt(index);if(childPath.length){path.concat(childPath);break}}}return path.concat(this)},nearestTokenAt:function nearestTokenAt(index){if(index<this.start||index>=this.end){return null}if(this.children){return this.children.reduce(function(prevValue,child){return prevValue||(index>=child.start&&index<child.end?child:null)},null)}return this},everyLeaf:function everyLeaf(fn){if(!this.children||this.children.length===0){return!!fn(this)}return this.children.reduce(function(a,e){return e.everyLeaf(fn)&&a},true)},isWhitespace:function isWhitespace(){return this.everyLeaf(function(e){return e.type===\"whitespace\"||!e.text.trim()})},isFrontToken:function isFrontToken(){return this.isFront},isBackToken:function isBackToken(){return\"matches\"in this},demote:function demote(){this.type=\"text\"},error:function error(message){this.type=\"error\";this.message=message},toString:function toString(){var ret=this.type+\"(\"+this.start+\"→\"+this.end+\")\";if(this.children&&this.children.length>0){ret+=\"[\"+this.children+\"]\"}return ret}};function shouldTest(rule,text,lastToken,unmatchedLength){return(!rule.canFollow||rule.canFollow.indexOf(lastToken&&lastToken.type)>-1)&&(!rule.cannotFollow||rule.cannotFollow.indexOf(lastToken&&lastToken.type)===-1&&!(rule.cannotFollow.indexOf(\"text\")>-1&&unmatchedLength))&&(!rule.peek||rule.peek.toLowerCase()===text.slice(0,rule.peek.length).toLowerCase())}function _lex(parentToken){var src=parentToken.innerText;var frontTokenStack=[],index=0,firstUnmatchedIndex=index,endIndex=src.length,lastToken=null;while(index<endIndex){var slice=src.slice(index);var mode=(frontTokenStack.length?frontTokenStack[0]:parentToken).innerMode;var i=0,l=mode.length;for(;i<l;i+=1){var rule=rules[mode[i]];if(!(shouldTest(rule,slice,lastToken,firstUnmatchedIndex<index)&&rule.pattern.test(slice))){continue}var match=rule.pattern.exec(slice);var tokenData=rule.fn(match);var isMatchingBack=false;var ft=0;if(tokenData.matches){for(;ft<frontTokenStack.length;ft+=1){var type=frontTokenStack[ft].type;if(type in tokenData.matches){isMatchingBack=true;break}if(type.indexOf(\"verbatim\")===0){type=\"verbatimOpener\"}if(tokenData.cannotCross&&tokenData.cannotCross.indexOf(type)>-1){ft=frontTokenStack.length-1}}if(ft>=frontTokenStack.length&&!tokenData.isFront){continue}}if(firstUnmatchedIndex<index){parentToken.addChild({type:\"text\",text:src.slice(firstUnmatchedIndex,index),innerMode:mode})}lastToken=parentToken.addChild(tokenData);index+=lastToken.text.length;firstUnmatchedIndex=index;if(isMatchingBack){foldTokens(parentToken,lastToken,frontTokenStack[ft]);frontTokenStack=frontTokenStack.slice(ft+1)}if(lastToken.isFrontToken()){frontTokenStack.unshift(lastToken)}break}if(i===l){index+=1;if(lastToken===null){lastToken={type:\"text\"}}}}if(firstUnmatchedIndex<index){parentToken.addChild({type:\"text\",text:src.slice(firstUnmatchedIndex,index),innerMode:(frontTokenStack.length?frontTokenStack[0]:parentToken).innerMode})}while(frontTokenStack.length>0){frontTokenStack.shift().demote()}return parentToken}function foldTokens(parentToken,backToken,frontToken){var backTokenIndex=parentToken.children.indexOf(backToken),frontTokenIndex=parentToken.children.indexOf(frontToken);backToken.children=parentToken.children.splice(frontTokenIndex+1,backTokenIndex-(frontTokenIndex+1));backToken.children.forEach(function(token){cacheChildPos(backToken,token)});backToken.type=backToken.matches[frontToken.type];backToken.innerText=\"\";for(var i=0,l=backToken.children.length;i<l;i++){backToken.innerText+=backToken.children[i].text}backToken.start=frontToken.start;backToken.text=frontToken.text+backToken.innerText+backToken.text;Object.keys(frontToken).forEach(function(key){if(!Object.hasOwnProperty.call(backToken,key)){backToken[key]=frontToken[key]}});if(backToken.isFront){backToken.isFront=false}parentToken.children.splice(frontTokenIndex,1);cacheChildPos(parentToken,backToken)}Lexer={lex:function lex(src,initIndex){return _lex(new Token({type:\"root\",start:initIndex||0,end:src.length,text:src,innerText:src,children:[],childAt:{},innerMode:Lexer.modes.start}))},rules:rules,modes:{}};if((typeof module===\"undefined\"?\"undefined\":_typeof(module))===\"object\"){module.exports=Lexer}else if(typeof define===\"function\"&&define.amd){define(\"lexer\",[],function(){return Lexer})}else if(this&&this.loaded){this.modules||(this.modules={});this.modules.Lexer=Lexer}else{this.TwineLexer=Lexer}}).call(eval(\"this\")||(typeof global!==\"undefined\"?global:window));(function(){\"use strict\";var Patterns=void 0;function escape(str){if(str&&(typeof str===\"undefined\"?\"undefined\":_typeof(str))===\"object\"){Object.keys(str).forEach(function(e){str[e]=escape(str[e])});return str}return(str+\"\").replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\"\\\\$&\")}function notChars(){return\"[^\"+Array.apply(0,arguments).map(escape).join(\"\")+\"]*\"}function makeWrapper(starter){return function(){return\"(\"+starter+Array.apply(0,arguments).join(\"|\")+\")\"}}var either=makeWrapper(\"?:\"),notBefore=makeWrapper(\"?!\"),before=makeWrapper(\"?=\");var ws=\"[ \\\\f\\\\t\\\\v\\\\u00a0\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000]*\",mws=ws.replace(\"*\",\"+\"),wb=\"\\\\b\",escapedLine=\"\\\\\\\\\\\\n\\\\\\\\?|\\\\n\\\\\\\\\",br=\"\\\\n(?!\\\\\\\\)\",anyLetter=\"[\\\\w\\\\-\\\\u00c0-\\\\u00de\\\\u00df-\\\\u00ff\\\\u0150\\\\u0170\\\\u0151\\\\u0171\\\\uD800-\\\\uDFFF]\",anyLetterStrict=anyLetter.replace(\"\\\\-\",\"\"),eol=either(\"\\\\n\",\"$\"),noUnescapedLineBreak=\"(\"+either(escapedLine,\"[^\\\\n]\")+\"+)\",bullet=\"\\\\*\",bulleted=ws+\"(\"+bullet+\"+)\"+mws+noUnescapedLineBreak+eol,numberPoint=\"(?:0\\\\.)\",numbered=ws+\"(\"+numberPoint+\"+)\"+mws+noUnescapedLineBreak+eol,hr=ws+\"-{3,}\"+ws+eol,heading=ws+\"(#{1,6})\"+ws+noUnescapedLineBreak+eol,align=ws+\"(==+>|<=+|=+><=+|<==+>)\"+ws+eol,column=ws+\"(=+\\\\|+|\\\\|+=+|=+\\\\|+=+|\\\\|=+\\\\|)\"+ws+eol,passageLink={opener:\"\\\\[\\\\[(?!\\\\[)\",text:\"(\"+notChars(\"]\")+\")\",rightSeparator:either(\"\\\\->\",\"\\\\|\"),leftSeparator:\"<\\\\-\",closer:\"\\\\]\\\\]\",legacySeparator:\"\\\\|\",legacyText:\"(\"+either(\"[^\\\\|\\\\]]\",\"\\\\]\"+notBefore(\"\\\\]\"))+\"+)\"},validPropertyName=anyLetterStrict+\"*\"+anyLetterStrict.replace(\"\\\\w\",\"a-zA-Z\")+anyLetterStrict+\"*\",variable=\"\\\\$(\"+validPropertyName+\")\",property=\"'s\"+mws+\"(\"+validPropertyName+\")\",belongingProperty=\"(\"+validPropertyName+\")\"+mws+\"of\"+wb+notBefore(\"it\"+wb),possessiveOperator=\"'s\"+mws,belongingOperator=\"of\"+wb,identifier=either(\"it\",\"time\")+wb,itsProperty=\"its\"+mws+\"(\"+validPropertyName+\")\",itsOperator=\"its\"+mws,belongingItProperty=\"(\"+validPropertyName+\")\"+mws+\"of\"+mws+\"it\"+wb,belongingItOperator=\"of\"+wb+mws+\"it\"+wb,macro={opener:\"\\\\(\",name:\"(\"+either(anyLetter+\"+\",variable)+\"):\"+notBefore(\"\\\\/\"),closer:\"\\\\)\"},twine1Macro=\"<<[^>\\\\s]+\\\\s*(?:\\\\\\\\.|'(?:[^'\\\\\\\\]*\\\\\\\\.)*[^'\\\\\\\\]*'|\\\"(?:[^\\\"\\\\\\\\]*\\\\\\\\.)*[^\\\"\\\\\\\\]*\\\"|[^'\\\"\\\\\\\\>]|>(?!>))*>>\",incorrectOperator=either(\"=<\",\"=>\",\"[gl]te?\"+wb,\"n?eq\"+wb,\"isnot\"+wb,\"are\"+wb,\"x\"+wb),tag={name:\"[a-zA-Z][\\\\w\\\\-]*\",attrs:\"(?:\\\"[^\\\"]*\\\"|'[^']*'|[^'\\\">])*?\"},hookTagFront=\"\\\\|(\"+anyLetter+\"+)(>|\\\\))\",hookTagBack=\"(<|\\\\()(\"+anyLetter+\"+)\\\\|\",tempVariable=\"_(\"+validPropertyName+\")\"+wb,number=\"\\\\b(\\\\-?\\\\d+(?:\\\\.\\\\d+)?(?:[eE][+\\\\-]?\\\\d+)?|NaN)\"+notBefore(\"m?s\")+wb;passageLink.main=passageLink.opener+either(passageLink.text+passageLink.rightSeparator,passageLink.text.replace(\"*\",\"*?\")+passageLink.leftSeparator)+passageLink.text;Patterns={upperLetter:\"[A-Z\\\\u00c0-\\\\u00de\\\\u0150\\\\u0170]\",lowerLetter:\"[a-z0-9_\\\\-\\\\u00df-\\\\u00ff\\\\u0151\\\\u0171]\",anyLetter:anyLetter,anyLetterStrict:anyLetterStrict,whitespace:mws,escapedLine:escapedLine,br:br,commentFront:\"\\x3c!--\",commentBack:\"--\\x3e\",tag:\"<\\\\/?\"+tag.name+tag.attrs+\">\",tagPeek:\"<\",scriptStyleTag:\"<(\"+either(\"script\",\"style\")+\")\"+tag.attrs+\">\"+\"[^]*?\"+\"<\\\\/\\\\1>\",scriptStyleTagOpener:\"<\",url:\"(\"+either(\"https?\",\"mailto\",\"javascript\",\"ftp\",\"data\")+\":\\\\/\\\\/[^\\\\s<]+[^<.,:;\\\"')\\\\]\\\\s])\",bullet:bullet,hr:hr,heading:heading,align:align,column:column,bulleted:bulleted,numbered:numbered,delOpener:escape(\"~~\"),italicOpener:escape(\"//\"),boldOpener:escape(\"''\"),supOpener:escape(\"^^\"),strongFront:escape(\"**\"),strongBack:escape(\"**\"),emFront:escape(\"*\"),emBack:escape(\"*\"),verbatimOpener:\"`+\",collapsedFront:\"{\",collapsedBack:\"}\",hookAppendedFront:\"\\\\[\",hookPrependedFront:hookTagFront+\"\\\\[\",hookFront:\"\\\\[\",hookBack:\"\\\\]\"+notBefore(hookTagBack),hookAppendedBack:\"\\\\]\"+hookTagBack,passageLink:passageLink.main+passageLink.closer,passageLinkPeek:\"[[\",legacyLink:passageLink.opener+passageLink.legacyText+passageLink.legacySeparator+passageLink.legacyText+passageLink.closer,legacyLinkPeek:\"[[\",simpleLink:passageLink.opener+passageLink.legacyText+passageLink.closer,simpleLinkPeek:\"[[\",macroFront:macro.opener+before(macro.name),macroFrontPeek:\"(\",macroName:macro.name,groupingFront:\"\\\\(\"+notBefore(macro.name),groupingFrontPeek:\"(\",groupingBack:\"\\\\)\",twine1Macro:twine1Macro,twine1MacroPeek:\"<<\",property:property,propertyPeek:\"'s\",belongingProperty:belongingProperty,possessiveOperator:possessiveOperator,belongingOperator:belongingOperator,belongingOperatorPeek:\"of\",itsOperator:itsOperator,itsOperatorPeek:\"its\",belongingItOperator:belongingItOperator,belongingItOperatorPeek:\"of\",variable:variable,variablePeek:\"$\",tempVariable:tempVariable,tempVariablePeek:\"_\",hookRef:\"\\\\?(\"+anyLetter+\"+)\\\\b\",hookRefPeek:\"?\",cssTime:\"(\\\\d+\\\\.?\\\\d*|\\\\d*\\\\.?\\\\d+)(m?s)\"+wb,colour:either(either(\"Red\",\"Orange\",\"Yellow\",\"Lime\",\"Green\",\"Cyan\",\"Aqua\",\"Blue\",\"Navy\",\"Purple\",\"Fuchsia\",\"Magenta\",\"White\",\"Gray\",\"Grey\",\"Black\"),\"#[\\\\dA-Fa-f]{3}(?:[\\\\dA-Fa-f]{3})?\"),number:number,boolean:either(\"true\",\"false\")+wb,identifier:identifier,itsProperty:itsProperty,itsPropertyPeek:\"its\",belongingItProperty:belongingItProperty,escapedStringChar:\"\\\\\\\\[^\\\\n]\",singleStringOpener:\"'\",doubleStringOpener:'\"',is:\"is\"+notBefore(mws+\"not\",mws+\"in\",mws+\"<\",mws+\">\")+wb,isNot:\"is\"+mws+\"not\"+wb,and:\"and\"+wb,or:\"or\"+wb,not:\"not\"+wb,inequality:\"((?:is(?:\"+mws+\"not)?\"+ws+\")*)(\"+either(\"<(?!=)\",\"<=\",\">(?!=)\",\">=\")+\")\",isIn:\"is\"+mws+\"in\"+wb,contains:\"contains\"+wb,addition:escape(\"+\")+notBefore(\"=\"),subtraction:escape(\"-\")+notBefore(\"=\",\"\\\\d\"),multiplication:escape(\"*\")+notBefore(\"=\"),division:either(\"/\",\"%\")+notBefore(\"=\"),comma:\",\",spread:\"\\\\.\\\\.\\\\.\"+notBefore(\"\\\\.\"),to:either(\"to\"+wb,\"=\"),into:\"into\"+wb,making:\"making\"+wb,where:\"where\"+wb,via:\"via\"+wb,with:\"with\"+wb,each:\"each\"+wb,augmentedAssign:either(\"\\\\+\",\"\\\\-\",\"\\\\*\",\"\\\\/\",\"%\")+\"=\",incorrectOperator:incorrectOperator};if((typeof module===\"undefined\"?\"undefined\":_typeof(module))===\"object\"){module.exports=Patterns}else if(typeof define===\"function\"&&define.amd){define(\"patterns\",[],function(){return Patterns})}else if(this&&this.loaded){this.modules||(this.modules={});this.modules.Patterns=Patterns}else{this.Patterns=Patterns}}).call(eval(\"this\")||(typeof global!==\"undefined\"?global:window));(function(){\"use strict\";var Patterns=void 0;Object.assign=Object.assign||function polyfilledAssign(obj){for(var i=1;i<arguments.length;i++){var target=arguments[i];for(var key in target){if(Object.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj};function rules(Lexer){function textTokenFn(name){name=name||\"innerText\";return function(match){var innerText=match.reduceRight(function(a,b,index){return a||(index?b:\"\")},\"\"),data={};data[name]=innerText;return data}}function openerFn(name,foldedName){var matches={};matches[name]=foldedName;return function(){return{isFront:true,matches:matches,cannotCross:[\"verbatimOpener\"]}}}var emptyFn=Object.bind(0,null);function setupRules(mode,target){Object.keys(target).forEach(function(ruleName){var innerFn=target[ruleName].fn;target[ruleName].fn=function(match){var ret=innerFn(match);if(!ret.text){ret.text=match[0]}if(!ret.type){ret.type=ruleName}if(!ret.innerMode){ret.innerMode=mode}return ret}});return target}var markupMode=[],macroMode=[];var blockRules=setupRules(markupMode,{hr:{fn:emptyFn},bulleted:{fn:function fn(match){return{depth:match[1].length,innerText:match[2]}}},numbered:{fn:function fn(match){return{depth:match[1].length/2,innerText:match[2]}}},heading:{fn:function fn(match){return{depth:match[1].length,innerText:match[2]}}},align:{fn:function fn(match){var align=void 0;var arrow=match[1],centerIndex=arrow.indexOf(\"><\");if(~centerIndex){align=Math.round(centerIndex/(arrow.length-2)*50);if(align===25){align=\"center\"}}else if(arrow[0]===\"<\"&&arrow.slice(-1)===\">\"){align=\"justify\"}else if(arrow.indexOf(\">\")>-1){align=\"right\"}else if(arrow.indexOf(\"<\")>-1){align=\"left\"}return{align:align}}},column:{fn:function fn(match){var column=void 0;var arrow=match[1],centerIndex=arrow.indexOf(\"|\");if(centerIndex&&centerIndex<arrow.length-1){column=\"center\"}else if(arrow[0]===\"|\"&&arrow.slice(-1)===\"|\"){column=\"none\"}else if(centerIndex===arrow.length-1){column=\"right\"}else if(!centerIndex){column=\"left\"}return{column:column,width:/\\|+/.exec(arrow)[0].length,marginLeft:/^=*/.exec(arrow)[0].length,marginRight:/=*$/.exec(arrow)[0].length}}}});Object.keys(blockRules).forEach(function(key){blockRules[key].canFollow=[null,\"br\",\"hr\",\"bulleted\",\"numbered\",\"heading\",\"align\"];blockRules[key].cannotFollow=[\"text\"]});var inlineRules=setupRules(markupMode,{twine1Macro:{fn:function fn(){return{type:\"error\",message:\"Harlowe macros use a different syntax to Twine 1 and SugarCube macros.\"}}},emBack:{fn:function fn(){return{matches:{emFront:\"em\"},cannotCross:[\"verbatimOpener\"]}}},strongBack:{fn:function fn(){return{matches:{strongFront:\"strong\"},cannotCross:[\"verbatimOpener\"]}}},strongFront:{fn:function fn(){return{isFront:true}}},emFront:{fn:function fn(){return{isFront:true}}},boldOpener:{fn:openerFn(\"boldOpener\",\"bold\")},italicOpener:{fn:openerFn(\"italicOpener\",\"italic\")},delOpener:{fn:openerFn(\"delOpener\",\"del\")},supOpener:{fn:openerFn(\"supOpener\",\"sup\")},commentFront:{fn:function fn(){return{isFront:true}}},commentBack:{fn:function fn(){return{matches:{commentFront:\"comment\"}}}},scriptStyleTag:{fn:emptyFn},tag:{fn:emptyFn},url:{fn:emptyFn},hookPrependedFront:{fn:function fn(match){return{name:match[1],hidden:match[2]===\")\",isFront:true,tagPosition:\"prepended\"}}},hookFront:{fn:function fn(){return{isFront:true}}},hookBack:{fn:function fn(){return{matches:{hookPrependedFront:\"hook\",hookFront:\"hook\"},cannotCross:[\"verbatimOpener\"]}}},hookAppendedBack:{fn:function fn(match){return{name:match[2],hidden:match[1]===\"(\",tagPosition:\"appended\",matches:{hookFront:\"hook\"},cannotCross:[\"verbatimOpener\"]}}},verbatimOpener:{fn:function fn(match){var number=match[0].length,matches={};matches[\"verbatim\"+number]=\"verbatim\";return{type:\"verbatim\"+number,isFront:true,matches:matches}}},collapsedFront:{fn:function fn(){return{isFront:true}}},collapsedBack:{fn:function fn(){return{matches:{collapsedFront:\"collapsed\"},cannotCross:[\"verbatimOpener\"]}}},escapedLine:{fn:emptyFn},legacyLink:{fn:function fn(match){return{type:\"twineLink\",innerText:match[1],passage:match[2]}}},br:{fn:emptyFn}});var expressionRules=setupRules(macroMode,{macroFront:{fn:function fn(match){return{isFront:true,name:match[1]}}},groupingBack:{fn:function fn(){return{matches:{groupingFront:\"grouping\",macroFront:\"macro\"},cannotCross:[\"singleStringOpener\",\"doubleStringOpener\"]}}},passageLink:{fn:function fn(match){var p1=match[1],p2=match[2],p3=match[3];return{type:\"twineLink\",innerText:p2?p3:p1,passage:p1?p3:p2}}},simpleLink:{fn:function fn(match){return{type:\"twineLink\",innerText:match[1],passage:match[1]}}},variable:{fn:textTokenFn(\"name\")},tempVariable:{fn:textTokenFn(\"name\")}});var macroRules=setupRules(macroMode,Object.assign({macroName:{canFollow:[\"macroFront\"],fn:function fn(match){if(match[2]){return{isMethodCall:true,innerText:match[2]}}return{isMethodCall:false}}},groupingFront:{fn:function fn(){return{isFront:true}}},property:{fn:textTokenFn(\"name\"),canFollow:[\"variable\",\"hookRef\",\"property\",\"tempVariable\",\"colour\",\"itsProperty\",\"belongingItProperty\",\"macro\",\"grouping\",\"string\",\"boolean\",\"number\"]},possessiveOperator:{fn:emptyFn},itsProperty:{cannotFollow:[\"text\"],fn:textTokenFn(\"name\")},itsOperator:{cannotFollow:[\"text\"],fn:emptyFn},belongingItProperty:{cannotFollow:[\"text\"],fn:textTokenFn(\"name\")},belongingItOperator:{cannotFollow:[\"text\"],fn:emptyFn},belongingProperty:{cannotFollow:[\"text\"],fn:textTokenFn(\"name\")},belongingOperator:{cannotFollow:[\"text\"],fn:emptyFn},escapedStringChar:{fn:function fn(){return{type:\"text\"}}},singleStringOpener:{fn:function fn(){return{isFront:true,matches:{singleStringOpener:\"string\"}}}},doubleStringOpener:{fn:function fn(){return{isFront:true,matches:{doubleStringOpener:\"string\"}}}},hookRef:{fn:textTokenFn(\"name\")},cssTime:{fn:function fn(match){return{value:+match[1]*(match[2].toLowerCase()===\"s\"?1e3:1)}}},colour:{cannotFollow:[\"text\"],fn:function fn(match){var colour,m=match[0].toLowerCase(),mapping={red:\"e61919\",orange:\"e68019\",yellow:\"e5e619\",lime:\"80e619\",green:\"19e619\",cyan:\"19e5e6\",aqua:\"19e5e6\",blue:\"197fe6\",navy:\"1919e6\",purple:\"7f19e6\",fuchsia:\"e619e5\",magenta:\"e619e5\",white:\"fff\",black:\"000\",gray:\"888\",grey:\"888\"};if(Object.hasOwnProperty.call(mapping,m)){colour=\"#\"+mapping[m]}else{colour=m}return{colour:colour}}},number:{fn:function fn(match){return{value:parseFloat(match[0])}}},addition:{fn:emptyFn},subtraction:{fn:emptyFn},multiplication:{fn:emptyFn},division:{fn:emptyFn},inequality:{fn:function fn(match){return{operator:match[2],negate:match[1].indexOf(\"not\")>-1}}},augmentedAssign:{fn:function fn(match){return{operator:match[0][0]}}},identifier:{fn:textTokenFn(\"name\"),cannotFollow:[\"text\"]},whitespace:{fn:emptyFn,cannotFollow:\"text\"},incorrectOperator:{fn:function fn(match){var correction={\"=>\":\">=\",\"=<\":\"<=\",gte:\">=\",lte:\"<=\",gt:\">\",lt:\"<\",eq:\"is\",isnot:\"is not\",neq:\"is not\",are:\"is\",x:\"*\"}[match[0].toLowerCase()];return{type:\"error\",message:\"Please say \"+(correction?\"'\"+correction+\"'\":\"something else\")+\" instead of '\"+match[0]+\"'.\"}},cannotFollow:\"text\"}},[\"boolean\",\"is\",\"to\",\"into\",\"where\",\"via\",\"with\",\"making\",\"each\",\"and\",\"or\",\"not\",\"isNot\",\"contains\",\"isIn\"].reduce(function(a,e){a[e]={fn:emptyFn,cannotFollow:[\"text\"]};return a},{}),[\"comma\",\"spread\",\"addition\",\"subtraction\",\"multiplication\",\"division\"].reduce(function(a,e){a[e]={fn:emptyFn};return a},{})));markupMode.push.apply(markupMode,_toConsumableArray(Object.keys(blockRules)).concat(_toConsumableArray(Object.keys(expressionRules)),_toConsumableArray(Object.keys(inlineRules))));macroMode.push.apply(macroMode,_toConsumableArray(Object.keys(expressionRules)).concat(_toConsumableArray(Object.keys(macroRules))));var allRules=Object.assign({},blockRules,inlineRules,expressionRules,macroRules);Object.keys(allRules).forEach(function(key){var re=Patterns[key];if(typeof re!==\"string\"){allRules[key].pattern=re}else{allRules[key].pattern=new RegExp(\"^(?:\"+re+\")\",\"i\")}if(Patterns[key+\"Peek\"]){allRules[key].peek=Patterns[key+\"Peek\"]}});Object.assign(Lexer.rules,allRules);Lexer.modes.start=Lexer.modes.markup=markupMode;Lexer.modes.macro=macroMode;return Lexer}function exporter(Lexer){return Object.freeze({lex:rules(Lexer).lex,Patterns:Patterns})}if((typeof module===\"undefined\"?\"undefined\":_typeof(module))===\"object\"){Patterns=require(\"./patterns\");module.exports=exporter(require(\"./lexer\"))}else if(typeof define===\"function\"&&define.amd){define(\"markup\",[\"lexer\",\"patterns\"],function(Lexer,P){Patterns=P;return exporter(Lexer)})}else if(this&&this.loaded&&this.modules){Patterns=this.modules.Patterns;this.modules.Markup=exporter(this.modules.Lexer)}else{Patterns=this.Patterns;this.TwineMarkup=exporter(this.TwineLexer)}}).call(eval(\"this\")||(typeof global!==\"undefined\"?global:window));\"use strict\";define(\"utils/selectors\",[],function(){return Object.freeze({passage:\"tw-passage\",story:\"tw-story\",sidebar:\"tw-sidebar\",internalLink:\"tw-link\",brokenLink:\"tw-broken-link\",hook:\"tw-hook\",enchantment:\"tw-enchantment\",expression:\"tw-expression\",script:\"[role=script]\",stylesheet:\"[role=stylesheet]\",storyData:\"tw-storydata\",passageData:\"tw-passagedata\",collapsed:\"tw-collapsed\"})});\"use strict\";define(\"utils/polyfills\",[],function(){var A=Array.prototype;if(typeof A.includes!==\"function\"){A.includes=function includes(searchElement){var fromIndex=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;if(!Number.isNaN(searchElement)&&Number.isFinite(fromIndex)&&typeof searchElement!==\"undefined\"){return A.indexOf.call(this,searchElement,fromIndex)>-1}var O=Object(this),length=parseInt(O.length);if(length<=0){return false}var k=fromIndex>=0?fromIndex:Math.max(0,length+fromIndex);while(k<length){if(Object.is(searchElement,O[k])){return true}k+=1}return false}}});\"use strict\";define(\"utils\",[\"jquery\",\"markup\",\"utils/selectors\",\"utils/polyfills\"],function(_$2,TwineMarkup,Selectors){var lockDesc={configurable:0,writable:0},t8nAnimationTimes={\"transition-in\":Object.create(null),\"transition-out\":Object.create(null)},usuallyBlockElements=(\"audio,blockquote,canvas,div,h1,h2,h3,h4,h5,hr,ol,p,pre,table,ul,video,\"+\"tw-align,tw-story,tw-passage\").split(\",\"),usuallyInlineElements=(\"a,b,i,em,strong,sup,sub,abbr,acronym,s,strike,del,big,small,script,img,button,input,\"+\"tw-link,tw-broken-link,tw-verbatim,tw-collapsed,tw-error\").split(\",\"),nonDetachableElements=[\"audio\"];var Utils=void 0;function cachedTransitionTime(transIndex,className){var animClass=t8nAnimationTimes[className];if(!animClass[transIndex]){var p=_$2(\"<p>\").appendTo(document.body).attr(\"data-t8n\",transIndex).addClass(className);animClass[transIndex]=Utils.cssTimeUnit(p.css(\"animation-duration\"))+Utils.cssTimeUnit(p.css(\"animation-delay\"));p.remove()}return animClass[transIndex]}var storyElement=void 0;Utils={lockProperty:function lockProperty(obj,prop,value){var propDesc=Object.create(lockDesc);value&&(propDesc.value=value);Object.defineProperty(obj,prop,propDesc);return obj},toJSLiteral:function toJSLiteral(val){if(val instanceof Map){return\"(new Map(\"+Utils.toJSLiteral([].concat(_toConsumableArray(val.entries())))+\"))\"}if(val instanceof Set){return\"(new Set(\"+Utils.toJSLiteral([].concat(_toConsumableArray(val.values())))+\"))\"}return JSON.stringify(val)},cssTimeUnit:function cssTimeUnit(s){s=s.toLowerCase();if(s.slice(-2)===\"ms\")return+s.slice(0,-2)||0;if(s.slice(-1)===\"s\")return+s.slice(0,-1)*1e3||0;return 0},nth:function nth(num){var lastDigit=(+num+\"\").slice(-1);return num+(lastDigit===\"1\"?\"st\":lastDigit===\"2\"?\"nd\":lastDigit===\"3\"?\"rd\":\"th\")},plural:function plural(num,noun){return num+\" \"+noun+(num>1?\"s\":\"\")},andList:function andList(array){return array.length===1?array[0]:array.slice(0,-1).join(\", \")+\" and \"+array[array.length-1]},realWhitespace:\"[ \\\\n\\\\r\\\\f\\\\t\\\\v\\\\u00a0\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000]\",anyRealLetter:\"[\\\\dA-Za-z\\\\u00c0-\\\\u00de\\\\u00df-\\\\u00ff\\\\u0150\\\\u0170\\\\u0151\\\\u0171\\\\uD800-\\\\uDFFF]\",unescape:function unescape(text){return text.replace(/&(?:amp|lt|gt|quot|nbsp|zwnj|#39|#96);/g,function(e){return{\"&amp;\":\"&\",\"&gt;\":\">\",\"&lt;\":\"<\",\"&quot;\":'\"',\"&#39;\":\"'\",\"&nbsp;\":String.fromCharCode(160),\"&zwnj;\":String.fromCharCode(8204)}[e]})},escape:function escape(text){return text.replace(/[&><\"']/g,function(e){return{\"&\":\"&amp;\",\">\":\"&gt;\",\"<\":\"&lt;\",'\"':\"&quot;\",\"'\":\"&#39;\"}[e]})},insensitiveName:function insensitiveName(e){return(e+\"\").toLowerCase().replace(/-|_/g,\"\")},childrenProbablyInline:function childrenProbablyInline(jq){var unknown=[];return Array.prototype.every.call(jq.find(\"*\"),function(elem){if(elem.hidden||/none|inline/.test(elem.style.display)){return true}if(usuallyBlockElements.includes(elem.tagName.toLowerCase())||/none|inline/.test(elem.style.display)){return false}if(usuallyInlineElements.includes(elem.tagName.toLowerCase())){return true}unknown.push(elem);return true})&&unknown.every(function(elem){return/none|inline/.test(elem.style.display)})},transitionReplace:function transitionReplace(oldElem,newElem,transIndex){var closest=oldElem.closest(Selectors.hook);if(closest.length>0){oldElem=closest}var container1=_$2(\"<tw-transition-container>\").css(\"position\",\"relative\");container1.insertBefore(oldElem.first());var container2a=void 0;if(newElem){container2a=_$2(\"<tw-transition-container>\").appendTo(container1);newElem.appendTo(container2a)}var container2b=_$2(\"<tw-transition-container>\").css(\"position\",\"absolute\").prependTo(container1);oldElem.detach().appendTo(container2b);Utils.transitionOut(container2b,transIndex);if(newElem){Utils.transitionIn(container2a,transIndex,function(){container2a.unwrap().children().first().unwrap()})}},transitionOut:function transitionOut(el,transIndex,transitionTime){var childrenInline=Utils.childrenProbablyInline(el),mustWrap=el.length>1||!childrenInline||![\"tw-hook\",\"tw-passage\"].includes(el.tag());function onComplete(){el.remove()}if(mustWrap){el=el.wrapAll(\"<tw-transition-container>\").parent()}el.attr(\"data-t8n\",transIndex).addClass(\"transition-out\");if(Utils.childrenProbablyInline(el)){el.css(\"display\",\"inline-block\")}if(typeof transitionTime===\"number\"){el.css(\"animation-duration\",transitionTime+\"ms\")}var delay=transitionTime||cachedTransitionTime(transIndex,\"transition-out\");!delay?onComplete():window.setTimeout(onComplete,delay)},transitionIn:function transitionIn(el,transIndex,transitionTime){var childrenInline=Utils.childrenProbablyInline(el),mustWrap=el.length>1||!childrenInline||![\"tw-hook\",\"tw-passage\"].includes(el.tag());function onComplete(){var detachable=el.findAndFilter(nonDetachableElements.join(\",\")).length===0;if(mustWrap&&detachable){el.contents().unwrap()}else{el.removeClass(\"transition-in\").removeAttr(\"data-t8n\")}}if(mustWrap){el=el.wrapAll(\"<tw-transition-container>\").parent()}el.attr(\"data-t8n\",transIndex).addClass(\"transition-in\");if(typeof transitionTime===\"number\"){el.css(\"animation-duration\",transitionTime+\"ms\")}if(Utils.childrenProbablyInline(el)){el.css(\"display\",\"inline-block\")}var delay=transitionTime||cachedTransitionTime(transIndex,\"transition-in\");!delay?onComplete():window.setTimeout(onComplete,delay)},$:function $(str,context){return _$2(str,context||Utils.storyElement).not(\".transition-out, .transition-out *\")},impossible:function impossible(where,data){if(!window.console){return}console.error(where+\"(): \"+data)},assertMustHave:function assertMustHave(object,props){if(!window.console){return}for(var i=0;i<props.length;i+=1){if(!(props[i]in object)){console.error(\"Assertion failed: object\"+\" lacks property \"+props[i])}}},assertOnlyHas:function assertOnlyHas(object,props){if(!window.console){return}for(var i in object){if(!props.includes(i)){console.error(\"Assertion failed: object\"+\" had unexpected property '\"+i+\"'!\")}}},get storyElement(){return storyElement}};_$2(function(){return storyElement=_$2(Selectors.story)});return Object.freeze(Utils)});\"use strict\";define(\"passages\",[\"jquery\",\"utils\",\"utils/selectors\"],function($,_ref,Selectors){var unescape=_ref.unescape;function Passage(elem){return Object.assign(new Map([[\"source\",unescape(elem.html())],[\"tags\",(elem.attr(\"tags\")||\"\").split(/\\s/)||[]],[\"name\",elem.attr(\"name\")]]),{TwineScript_TypeName:\"passage datamap\",TwineScript_ObjectName:\"a passage datamap\"})}var Passages=Object.assign(new Map,{TwineScript_ObjectName:\"the Passages datamap\",getTagged:function getTagged(tag){var ret=[];this.forEach(function(v){var tags=v instanceof Map&&v.get(\"tags\");if(Array.isArray(tags)&&tags.includes(tag)){ret.push(v)}});return ret.sort(function(left,right){return left.get(\"name\")>right.get(\"name\")})},create:Passage});$(function(){Array.from($(Selectors.storyData+\" > \"+Selectors.passageData)).forEach(function(e){e=$(e);Passages.set(e.attr(\"name\"),new Passage(e))})});return Passages});\"use strict\";define(\"datatypes/hookset\",[\"jquery\",\"utils\",\"utils/selectors\",\"markup\"],function($,Utils,Selectors,_ref2){var Patterns=_ref2.Patterns;function sliceNode(node,start,end){var l=node.textContent.length;if(start>=l){return}var newNode=void 0;var ret=[newNode=start===0?node:node.splitText(start)];if(end){if(end<=0){end=l-end}if(end<l){ret.push(newNode.splitText(end-start))}}return ret}function findTextInNodes(textNodes,searchString){var examinedNodes=[],examinedText=\"\",ret=[];if(!textNodes.length||!searchString){return ret}while(textNodes.length>0){examinedNodes.push(textNodes[0]);examinedText+=textNodes[0].textContent;textNodes.shift();var index=examinedText.indexOf(searchString);if(index>-1){var _ret;var remainingLength=examinedText.length-(index+searchString.length);while(index>=examinedNodes[0].textContent.length){index-=examinedNodes[0].textContent.length;examinedNodes.shift()}if(examinedNodes.length===1){var _slices=sliceNode(examinedNodes[0],index,index+searchString.length);ret.push(_slices[0]);if(_slices[1]){textNodes.unshift(_slices[1])}break}ret.push(sliceNode(examinedNodes[0],index,examinedNodes[0].length)[0]);(_ret=ret).push.apply(_ret,_toConsumableArray(examinedNodes.slice(1,-1)));var slices=sliceNode(examinedNodes[examinedNodes.length-1],0,examinedNodes[examinedNodes.length-1].textContent.length-remainingLength);ret.push(slices[0]);if(slices[1]){textNodes.unshift(slices[1])}ret=ret.filter(Boolean);break}}return[ret].concat(_toConsumableArray(findTextInNodes(textNodes,searchString)))}function wrapTextNodes(searchString,dom,htmlTag){var nodes=findTextInNodes(dom.textNodes(),searchString);var ret=$();nodes.forEach(function(e){ret=ret.add($(e).wrapAll(htmlTag))});return ret.parent()}function hookToSelector(c){c=Utils.insensitiveName(c).replace(/\\?/g,\"\").replace(/\"/g,\"&quot;\");var ret=Selectors.hook+'[name=\"'+c+'\"]';ret+={page:\", tw-story\",passage:\", tw-passage\",sidebar:\", tw-sidebar\",link:\", tw-link, .enchantment-link\"}[c]||\"\";return ret}function hooks(_ref3){var dom=_ref3.dom;var ret=$();if(this.prev){ret=ret.add(hooks.call(this.prev,{dom:dom}))}var reducer=function reducer(elements,index){if(Array.isArray(index)){return index.reduce(function(a,i){return a.add(elements.get(i))},$())}return $(elements.get(index))};if(this.selector){var ownElements=void 0;if(!this.selector.match(\"^\"+Patterns.hookRef+\"$\")){ownElements=wrapTextNodes(this.selector,dom,\"<tw-pseudo-hook>\")}else{ownElements=dom.add(dom.parentsUntil(Utils.storyElement.parent())).findAndFilter(hookToSelector(this.selector))}if(this.properties.length){ret=ret.add(this.properties.reduce(reducer,ownElements))}else{ret=ret.add(ownElements)}}if(this.base){ret=ret.add(this.properties.reduce(reducer,hooks.call(this.base,{dom:dom})))}return ret}function cleanupPseudoHooks(_ref4){var dom=_ref4.dom;Utils.$(\"tw-pseudo-hook\",dom).contents().unwrap().parent().each(function(){this.normalize()})}function hash(hookset){if(!hookset){return[]}var selector=hookset.selector,base=hookset.base,properties=hookset.properties,prev=hookset.prev;return[JSON.stringify([Utils.insensitiveName(selector)||\"\",hash(base),[].concat(_toConsumableArray(properties)).sort()])].concat(_toConsumableArray(hash(prev))).sort()}var HookSet=Object.freeze({forEach:function forEach(section,fn){var ret=hooks.call(this,section).each(function(i){fn($(this),i)});cleanupPseudoHooks.call(this,section);return ret},get TwineScript_ObjectName(){if(this.properties.length>0||this.prev){return\"a complex hook name\"}return this.selector+\" (a hook name)\"},TwineScript_TypeName:\"a hook name (like ?this)\",TwineScript_Unstorable:true,\"TwineScript_+\":function TwineScript_(other){var clone=other.TwineScript_Clone();clone.prev=this;return clone},TwineScript_is:function TwineScript_is(other){return hash(this)+\"\"===hash(other)+\"\"},TwineScript_GetElement:function TwineScript_GetElement(index){return HookSet.create(undefined,this,[index],undefined)},TwineScript_Clone:function TwineScript_Clone(){return HookSet.create(this.selector,this.base,this.properties,this.prev)},create:function create(selector,base){var properties=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var prev=arguments.length>3&&arguments[3]!==undefined?arguments[3]:undefined;return Object.assign(Object.create(this||HookSet),{selector:selector,base:base,properties:properties,prev:prev})},from:function from(arg){return HookSet.isPrototypeOf(arg)?arg:HookSet.create(arg)}});return HookSet});\"use strict\";define(\"internaltypes/twineerror\",[\"jquery\",\"utils\"],function($,_ref5){var impossible=_ref5.impossible,escape=_ref5.escape;var errorExplanations={syntax:\"The markup seems to contain a mistake.\",saving:\"I tried to save or load the game, but I couldn't do it.\",operation:\"I tried to perform an operation on some data, but the data's type was incorrect.\",macrocall:\"I tried to use a macro, but its call wasn't written correctly.\",datatype:\"I tried to use a macro, but was given the wrong type of data to it.\",keyword:\"I was given a keyword in a way that I didn't understand.\",infinite:\"I almost ended up doing the same thing over and over, forever.\",property:\"I tried to access a value in a string/array/datamap, but I couldn't find it.\",unimplemented:\"I currently don't have this particular feature. I'm sorry.\",javascript:\"This error message was reported by your browser's Javascript engine. \"+\"I don't understand it either, but it usually means that an expression was badly written.\"},TwineError={create:function create(type,message,explanation){if(!message){impossible(\"TwineError.create\",\"called with only 1 string.\")}if(!(explanation||type in errorExplanations)){impossible(\"TwineError.create\",\"no error explanation given\")}return Object.assign(Object.create(this),{type:type,message:message,explanation:explanation})},fromError:function fromError(error){return TwineError.create(\"javascript\",\"☕ \"+error.message)},containsError:function containsError(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return args.reduce(function(last,e){return last?last:e instanceof Error?e:TwineError.isPrototypeOf(e)?e:Array.isArray(e)?TwineError.containsError.apply(TwineError,_toConsumableArray(e)):false},false)},createWarning:function createWarning(type,message){return Object.assign(this.create(type,message),{warning:true})},render:function render(titleText){titleText=titleText||\"\";var errorElement=$(\"<tw-error class='\"+(this.type===\"javascript\"?\"javascript \":\"\")+(this.warning?\"warning\":\"error\")+\"' title='\"+escape(titleText)+\"'>\"+escape(this.message)+\"</tw-error>\"),explanationElement=$(\"<tw-error-explanation>\").text(this.explanation||errorExplanations[this.type]).hide(),explanationButton=$(\"<tw-error-explanation-button tabindex=0>\").html(\"<span class='folddown-arrowhead'>&#9658;</span>\");explanationButton.on(\"click\",function(){explanationElement.toggle();explanationButton.children(\".folddown-arrowhead\").css(\"transform\",\"rotate(\"+(explanationElement.is(\":visible\")?\"90deg\":\"0deg\")+\")\")});errorElement.append(explanationButton).append(explanationElement);return errorElement}};return TwineError});\"use strict\";define(\"utils/operationutils\",[\"utils\",\"datatypes/hookset\",\"internaltypes/twineerror\"],function(_ref6,HookSet,TwineError){var impossible=_ref6.impossible,toJSLiteral=_ref6.toJSLiteral;function isObject(value){return!!value&&((typeof value===\"undefined\"?\"undefined\":_typeof(value))===\"object\"||typeof value===\"function\")}function collectionType(value){return Array.isArray(value)?\"array\":value instanceof Map?\"datamap\":value instanceof Set?\"dataset\":typeof value===\"string\"?\"string\":value&&(typeof value===\"undefined\"?\"undefined\":_typeof(value))===\"object\"?\"object\":\"\"}function isValidDatamapName(map,name){if(!(map instanceof Map)){impossible(\"isValidDatamapName\",\"called with non-Map\")}if(typeof name!==\"string\"&&typeof name!==\"number\"){return TwineError.create(\"property\",\"Only strings and numbers can be used as data names for \"+objectName(map)+\", not \"+objectName(name)+\".\")}var otherName=typeof name===\"string\"?+name:\"\"+name;if(!Number.isNaN(otherName)&&map.has(otherName)){return TwineError.create(\"property\",\"You mustn't use both \"+objectName(name)+\" and \"+objectName(otherName)+\" as data names in the same datamap.\")}return true}function singleTypeCheck(arg,type){if(type===null){return arg===undefined}if(type.innerType){if(type.pattern===\"optional\"||type.pattern===\"zero or more\"){if(arg===undefined){return true}return singleTypeCheck(arg,type.innerType)}if(type.pattern===\"either\"){return type.innerType.some(function(type){return singleTypeCheck(arg,type)})}if(type.pattern===\"lambda\"&&singleTypeCheck(arg,type.innerType)){if(typeof type.clauses!==\"string\"){impossible(\"singleTypeCheck\",\"lambda signature had non-string clauses\")}return type.clauses.includes(\"where\")===\"where\"in arg&&type.clauses.includes(\"making\")===\"making\"in arg&&type.clauses.includes(\"via\")===\"via\"in arg&&type.clauses.includes(\"with\")===\"with\"in arg}if(type.pattern===\"wrapped\"){return singleTypeCheck(arg,type.innerType)}}if(type!==undefined&&arg===undefined){return false}if(type.TwineScript_TypeName===\"anything\"&&arg!==undefined&&!arg.TwineScript_Unstorable){return true}if(type===String){return typeof arg===\"string\"}if(type===Boolean){return typeof arg===\"boolean\"}if(type===parseInt){return typeof arg===\"number\"&&!Number.isNaN(arg)&&!(arg+\"\").includes(\".\")}if(type===Number){return typeof arg===\"number\"&&!Number.isNaN(arg)}if(type===Array){return Array.isArray(arg)}if(type===Map||type===Set){return arg instanceof type}return Object.isPrototypeOf.call(type,arg)}function isSequential(value){return typeof value===\"string\"||Array.isArray(value)||HookSet.isPrototypeOf(value)}function clone(value){if(!isObject(value)){return value}if(typeof value.TwineScript_Clone===\"function\"){return value.TwineScript_Clone()}if(Array.isArray(value)){return[].concat(_toConsumableArray(value))}if(value instanceof Map){return new Map(value)}if(value instanceof Set){return new Set(value)}if(typeof value===\"function\"){return Object.assign(value.bind(),value)}switch(Object.getPrototypeOf(value)){case Object.prototype:return Object.assign({},value);case null:return Object.assign(Object.create(null),value)}impossible(\"OperationUtils.clone\",\"The value \"+(value.toSource?value.toSource():value)+\" cannot be cloned!\");return value}function coerceToString(fn,left,right){if(typeof left===\"string\"&&isObject(right)&&\"TwineScript_ToString\"in right){return fn(left,right.TwineScript_ToString())}if(typeof right===\"string\"&&isObject(left)&&\"TwineScript_ToString\"in left){return fn(left.TwineScript_ToString(),right)}return false}function objectName(obj){return isObject(obj)&&\"TwineScript_ObjectName\"in obj?obj.TwineScript_ObjectName:Array.isArray(obj)?\"an array\":obj instanceof Map?\"a datamap\":obj instanceof Set?\"a dataset\":typeof obj===\"boolean\"?\"the boolean value '\"+obj+\"'\":typeof obj===\"string\"||typeof obj===\"number\"?\"the \"+(typeof obj===\"undefined\"?\"undefined\":_typeof(obj))+\" \"+toJSLiteral(obj):obj===undefined?\"an empty variable\":\"...whatever this is\"}function typeName(obj){if(obj.innerType){if(obj.pattern===\"either\"){if(!Array.isArray(obj.innerType)){impossible(\"typeName\",'\"either\" pattern had non-array inner type')}return obj.innerType.map(typeName).join(\" or \")}else if(obj.pattern===\"optional\"){return\"(an optional) \"+typeName(obj.innerType)}return typeName(obj.innerType)}return obj===String||obj===Number||obj===Boolean?\"a \"+_typeof(obj()):obj===parseInt?\"a non-fractional number\":obj===Map?\"a datamap\":obj===Set?\"a dataset\":obj===Array?\"an array\":isObject(obj)&&\"TwineScript_TypeName\"in obj?obj.TwineScript_TypeName:objectName(obj)}function is(l,r){if((typeof l===\"undefined\"?\"undefined\":_typeof(l))!==\"object\"&&(typeof r===\"undefined\"?\"undefined\":_typeof(r))!==\"object\"){return l===r}if(Array.isArray(l)&&Array.isArray(r)){if(l.length!==r.length){return false}return l.every(function(element,index){return is(r[index],element)})}if(l instanceof Map&&r instanceof Map){return is(Array.from(l.entries()).sort(),Array.from(r.entries()).sort())}if(l instanceof Set&&r instanceof Set){return is([].concat(_toConsumableArray(l)),[].concat(_toConsumableArray(r)))}if(l&&typeof l.TwineScript_is===\"function\"){return l.TwineScript_is(r)}if(l&&(typeof l===\"undefined\"?\"undefined\":_typeof(l))===\"object\"&&r&&(typeof r===\"undefined\"?\"undefined\":_typeof(r))===\"object\"&&Object.getPrototypeOf(l)===Object.prototype&&Object.getPrototypeOf(r)===Object.prototype){return is(Object.getOwnPropertyNames(l).map(function(name){return[name,l[name]]}),Object.getOwnPropertyNames(r).map(function(name){return[name,r[name]]}))}return Object.is(l,r)}function contains(container,obj){if(container){if(typeof container===\"string\"){return container.includes(obj)}if(Array.isArray(container)){return container.some(function(e){return is(e,obj)})}if(container instanceof Set||container instanceof Map){return Array.from(container.keys()).some(function(e){return is(e,obj)})}}return TwineError.create(\"operation\",objectName(container)+\" cannot contain any values, let alone \"+objectName(obj))}function subset(sequence,a,b){if(!a||!b){return TwineError.create(\"macrocall\",\"The sub\"+collectionType(sequence)+\" index values must not be 0 or NaN.\")}if(a<0){a=sequence.length+a+1}if(b<0){b=sequence.length+b+1}if(a>b){return subset(sequence,b,a)}var isString=typeof sequence===\"string\";if(isString){sequence=Array.from(sequence)}var ret=sequence.slice(a>0?a-1:a,b).map(clone);if(isString){return ret.join(\"\")}return ret}function printBuiltinValue(value){if(TwineError.containsError(value)){return value}if(value&&typeof value.TwineScript_Print===\"function\"){return value.TwineScript_Print()}else if(value instanceof Map){value=Array.from(value.entries());if(TwineError.containsError(value)){return value}return value.reduce(function(html,_ref7){var _ref8=_slicedToArray(_ref7,2),pair1=_ref8[0],pair2=_ref8[1];return html+\"<tr><td>`\"+printBuiltinValue(pair1)+\"`</td><td>`\"+printBuiltinValue(pair2)+\"`</td></tr>\"},\"<table class=datamap>\")+\"</table>\"}else if(value instanceof Set){return Array.from(value.values()).map(printBuiltinValue)+\"\"}else if(Array.isArray(value)){return value.map(printBuiltinValue)+\"\"}else if(isObject(value)){return TwineError.create(\"unimplemented\",\"I don't know how to print this value yet.\")}else{return value+\"\"}}var OperationUtils=Object.freeze({isObject:isObject,singleTypeCheck:singleTypeCheck,isValidDatamapName:isValidDatamapName,collectionType:collectionType,isSequential:isSequential,clone:clone,coerceToString:coerceToString,objectName:objectName,typeName:typeName,is:is,contains:contains,subset:subset,printBuiltinValue:printBuiltinValue,numericIndex:/^(?:[1-9]\\d*|0)$/,unique:function unique(val1,ind,arr){return!arr.slice(ind+1).some(function(val2){return is(val1,val2)})}});return OperationUtils});\"use strict\";define(\"datatypes/changercommand\",[\"utils\",\"utils/operationutils\"],function(_ref9,_ref10){var impossible=_ref9.impossible;var is=_ref10.is;var commandRegistry={};var ChangerCommand={changer:true,TwineScript_TypeName:\"a changer command\",TwineScript_Print:function TwineScript_Print(){return\"`[A '\"+this.macroName+\"' command]`\"},create:function create(macroName){var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var next=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!Array.isArray(params)){impossible(\"ChangerCommand.create\",\"params was not an array\")}return Object.assign(Object.create(this),{macroName:macroName,params:params,next:next,TwineScript_ObjectName:\"a (\"+macroName+\":) command\"})},\"TwineScript_+\":function TwineScript_(other){var clone=this.TwineScript_Clone();var tail=clone;while(tail.next){tail=tail.next}tail.next=other;return clone},TwineScript_is:function TwineScript_is(other){if(ChangerCommand.isPrototypeOf(other)){return this.macroName===other.macroName&&is(this.params,other.params)&&is(this.next,other.next)}},TwineScript_Clone:function TwineScript_Clone(){return this.create(this.macroName,this.params,this.next)},run:function run(desc){commandRegistry[this.macroName].apply(commandRegistry,[desc].concat(_toConsumableArray(this.params)));if(this.next){this.next.run(desc)}},register:function register(name,fn){commandRegistry[name]=fn}};return Object.freeze(ChangerCommand)});\"use strict\";define(\"state\",[\"utils\",\"passages\",\"datatypes/changercommand\",\"internaltypes/twineerror\",\"utils/operationutils\"],function(_ref11,Passages,ChangerCommand,TwineError,_ref12){var impossible=_ref11.impossible;var objectName=_ref12.objectName;var SystemVariables={TwineScript_ObjectName:\"this story's variables\",TwineScript_VariableStore:true};var Moment={passage:\"\",variables:SystemVariables,create:function create(p,v){var ret=Object.create(Moment);ret.passage=p||\"\";ret.variables=Object.assign(Object.create(this.variables),v);return ret}};var timeline=[];var recent=-1;var present=Moment.create();var serialiseProblem=void 0;var eventHandlers={forward:[],back:[],load:[]};function newPresent(newPassageName){present=(timeline[recent]||Moment).create(newPassageName)}var State=Object.assign({get passage(){return present.passage},get variables(){return present.variables},get pastLength(){return recent},get futureLength(){return timeline.length-1-recent},passageNameVisited:function passageNameVisited(name){var ret=0;if(!Passages.get(name)){return 0}for(var i=0;i<=recent;i++){ret+=+(name===timeline[i].passage)}return ret},passageNameLastVisited:function passageNameLastVisited(name){if(!Passages.get(name)){return Infinity}if(name===present.passage){return 0}for(var i=recent;i>0;i--){if(timeline[i].passage===name){return recent-i+1}}return Infinity},pastPassageNames:function pastPassageNames(){var ret=[];for(var i=recent-1;i>=0;i--){ret.unshift(timeline[i].passage)}return ret},play:function play(newPassageName){if(!present){impossible(\"State.play\",\"present is undefined!\")}present.passage=newPassageName;timeline=timeline.slice(0,recent+1).concat(present);recent+=1;newPresent(newPassageName);eventHandlers.forward.forEach(function(fn){return fn(newPassageName)})},rewind:function rewind(arg){var steps=1,moved=false;if(arg){if(typeof arg===\"string\"){steps=this.passageNameLastVisited(arg);if(steps===Infinity){return}}else if(typeof arg===\"number\"){steps=arg}}for(;steps>0&&recent>0;steps--){moved=true;recent-=1}if(moved){newPresent(timeline[recent].passage);eventHandlers.back.forEach(function(fn){return fn()})}return moved},fastForward:function fastForward(arg){var steps=1,moved=false;if(typeof arg===\"number\"){steps=arg}for(;steps>0&&timeline.length>0;steps--){moved=true;recent+=1}if(moved){newPresent(timeline[recent].passage);eventHandlers.forward.forEach(function(fn){return fn(timeline[recent].passage,\"fastForward\")})}return moved},on:function on(name,fn){if(!(name in eventHandlers)){impossible(\"State.on\",\"invalid event name\");return}if(typeof fn===\"function\"&&!eventHandlers[name].includes(fn)){eventHandlers[name].push(fn)}return State},reset:function reset(){if(!window.jasmine){return}timeline=[];recent=-1;present=Moment.create();serialiseProblem=undefined;eventHandlers.load.forEach(function(fn){return fn(timeline)})}},function(){function isSerialisable(variable){return typeof variable===\"number\"||typeof variable===\"boolean\"||typeof variable===\"string\"||variable===null||Array.isArray(variable)&&variable.every(isSerialisable)||variable instanceof Set&&Array.from(variable).every(isSerialisable)||variable instanceof Map&&Array.from(variable.values()).every(isSerialisable)||ChangerCommand.isPrototypeOf(variable)}function replacer(name,variable){if(variable instanceof Set){return{\"(dataset:)\":Array.from(variable)}}if(variable instanceof Map){return{\"(datamap:)\":Array.from(variable)}}if(ChangerCommand.isPrototypeOf(variable)){return{changer:{name:variable.macroName,params:variable.params,next:variable.next}}}return variable}function reviver(name,variable){if(variable&&(typeof variable===\"undefined\"?\"undefined\":_typeof(variable))===\"object\"){if(Array.isArray(variable[\"(dataset:)\"])){return new Set(variable[\"(dataset:)\"])}if(Array.isArray(variable[\"(datamap:)\"])){return new Map(variable[\"(datamap:)\"])}if(variable.changer&&_typeof(variable.changer)===\"object\"){var _variable$changer=variable.changer,_name=_variable$changer.name,params=_variable$changer.params,next=_variable$changer.next;return ChangerCommand.create(_name,params,next)}}return variable}function serialise(){var ret=timeline.slice(0,recent+1);var serialisability=ret.map(function(moment){return Object.keys(moment.variables).filter(function(e){return moment.variables[e]&&!isSerialisable(moment.variables[e])}).map(function(e){return[e,moment.variables[e]]})});if(!serialiseProblem){serialiseProblem=serialisability.reduce(function(problem,_ref13,turn){var _ref14=_slicedToArray(_ref13,2),name=_ref14[0],value=_ref14[1];return problem||name&&[name,value,turn+1]},undefined)}if(serialiseProblem){var _serialiseProblem=serialiseProblem,_serialiseProblem2=_slicedToArray(_serialiseProblem,3),problemVar=_serialiseProblem2[0],problemValue=_serialiseProblem2[1],problemTurn=_serialiseProblem2[2];return TwineError.create(\"saving\",\"The variable $\"+problemVar+\" holds \"+objectName(problemValue)+\" (which is, or contains, a complex data value) on turn \"+problemTurn+\"; the game can no longer be saved.\")}try{return JSON.stringify(ret,replacer)}catch(e){return false}}function deserialise(str){var newTimeline=void 0,lastVariables=SystemVariables;try{newTimeline=JSON.parse(str,reviver)}catch(e){return false}if(!Array.isArray(newTimeline)){return false}if((newTimeline=newTimeline.map(function(moment){if((typeof moment===\"undefined\"?\"undefined\":_typeof(moment))!==\"object\"||!moment.hasOwnProperty(\"passage\")||!moment.hasOwnProperty(\"variables\")){return false}moment.variables=Object.assign(Object.create(lastVariables),moment.variables);lastVariables=moment.variables;return Object.assign(Object.create(Moment),moment)})).includes(false)){return false}timeline=newTimeline;eventHandlers.load.forEach(function(fn){return fn(timeline)});recent=timeline.length-1;newPresent(timeline[recent].passage)}return{serialise:serialise,deserialise:deserialise}}());Object.seal(Moment);return Object.freeze(State)});\"use strict\";define(\"datatypes/colour\",[\"jquery\"],function($){var tripleDigit=/^([\\da-fA-F])([\\da-fA-F])([\\da-fA-F])$/,sextupleDigit=/^([\\da-fA-F])([\\da-fA-F])([\\da-fA-F])([\\da-fA-F])([\\da-fA-F])([\\da-fA-F])$/,cssNameCache=Object.create(null);function css3ToRGB(colourName){if(colourName in cssNameCache){return cssNameCache[colourName]}var colour=$(\"<p>\").css(\"background-color\",colourName).css(\"background-color\");if(!colour.startsWith(\"rgb\")){colour={r:192,g:192,b:192}}else{colour=colour.match(/\\d+/g).reduce(function(colour,num,ind){colour[\"rgb\"[ind]]=+num;return colour},{})}cssNameCache[colourName]=colour;return colour}function hexToRGB(str){if(typeof str!==\"string\"){return str}str=str.replace(\"#\",\"\");str=str.replace(tripleDigit,\"$1$1$2$2$3$3\");return{r:parseInt(str.slice(0,2),16),g:parseInt(str.slice(2,4),16),b:parseInt(str.slice(4,6),16)}}function RGBToHSL(_ref15){var r=_ref15.r,g=_ref15.g,b=_ref15.b,a=_ref15.a;r/=255,g/=255,b/=255;var max=Math.max(r,g,b),min=Math.min(r,g,b),l=(max+min)/2,delta=max-min;if(max===min){return{h:0,s:0,l:l}}var h=void 0;switch(max){case r:h=(g-b)/delta+(g<b?6:0);break;case g:h=(b-r)/delta+2;break;case b:h=(r-g)/delta+4;break}h=Math.round(h*60);var s=l>.5?delta/(2-max-min):delta/(max+min);return{h:h,s:s,l:l,a:a}}function HSLToRGB(_ref16){var h=_ref16.h,s=_ref16.s,l=_ref16.l,a=_ref16.a;if(s===0){var gray=Math.floor(l*255);return{r:gray,g:gray,b:gray}}h/=360;var q=l<.5?l*(1+s):l+s-l*s,p=2*l-q;function hueToRGBComponent(t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}return{r:Math.floor(hueToRGBComponent(h+1/3)*255),g:Math.floor(hueToRGBComponent(h)*255),b:Math.floor(hueToRGBComponent(h-1/3)*255),a:a}}var Colour=Object.freeze({TwineScript_TypeName:\"a colour\",TwineScript_ObjectName:\"a colour\",\"TwineScript_+\":function TwineScript_(other){var l=this,r=other;return Colour.create({r:Math.min(Math.round((l.r+r.r)*.6),255),g:Math.min(Math.round((l.g+r.g)*.6),255),b:Math.min(Math.round((l.b+r.b)*.6),255),a:(l.a+r.a)/2})},TwineScript_Print:function TwineScript_Print(){return\"<tw-colour style='background-color:rgba(\"+[this.r,this.g,this.b,this.a].join(\",\")+\");'></span>\"},TwineScript_is:function TwineScript_is(other){return Colour.isPrototypeOf(other)&&other.r===this.r&&other.g===this.g&&other.b===this.b&&other.a===this.a},TwineScript_Clone:function TwineScript_Clone(){return Colour.create(this)},toRGBAString:function toRGBAString(){return\"rgba(\"+this.r+\", \"+this.g+\", \"+this.b+\", \"+this.a+\")\"},get h(){return RGBToHSL(this).h},get s(){return RGBToHSL(this).s},get l(){return RGBToHSL(this).l},create:function create(rgbObj){if(typeof rgbObj===\"string\"){if(Colour.isHexString(rgbObj)){return this.create(hexToRGB(rgbObj))}return this.create(css3ToRGB(rgbObj))}if(\"h\"in rgbObj&&\"s\"in rgbObj&&\"l\"in rgbObj&&!(\"r\"in rgbObj)&&!(\"g\"in rgbObj)&&!(\"b\"in rgbObj)){return this.create(HSLToRGB(rgbObj))}if(!(\"a\"in rgbObj)||typeof rgbObj.a!==\"number\"){rgbObj.a=1}return Object.assign(Object.create(this),rgbObj)},isHexString:function isHexString(str){return typeof str===\"string\"&&str[0]===\"#\"&&(str.slice(1).match(tripleDigit)||str.slice(1).match(sextupleDigit))},isCSS3Function:function isCSS3Function(str){return typeof str===\"string\"&&/^(?:rgb|hsl)a?\\(\\s*\\d+\\s*,\\s*\\d+%?\\s*,\\s*\\d+%?(?:,\\s*\\d+(?:\\.\\d+)?\\s*)?\\)$/.test(str)}});return Colour});\"use strict\";define(\"internaltypes/varref\",[\"state\",\"internaltypes/twineerror\",\"utils\",\"utils/operationutils\",\"datatypes/hookset\",\"datatypes/colour\"],function(State,TwineError,_ref17,_ref18,HookSet,Colour){var impossible=_ref17.impossible;var isObject=_ref18.isObject,isSequential=_ref18.isSequential,objectName=_ref18.objectName,typeName=_ref18.typeName,clone=_ref18.clone,numericIndex=_ref18.numericIndex,isValidDatamapName=_ref18.isValidDatamapName;var VarRefProto=void 0;var defaultValue=0;var eventHandlers={set:[],delete:[]};function compilePropertyIndex(obj,prop){var error=void 0;if(obj instanceof Map&&(error=TwineError.containsError(isValidDatamapName(obj,prop)))){return error}if(isSequential(obj)){var match=void 0;if(typeof prop===\"number\"){if(prop===0){return TwineError.create(\"property\",\"You can't access elements at position 0 of \"+objectName(obj)+\".\",\"Only positive and negative position values exist.\")}else if(prop>0){prop-=1}}else if(typeof prop===\"string\"&&(match=/(\\d+)(?:st|[nr]d|th)last/i.exec(prop))){prop=-match[1]+\"\"}else if(typeof prop===\"string\"&&(match=/(\\d+)(?:st|[nr]d|th)/i.exec(prop))){prop=match[1]-1+\"\"}else if(prop===\"last\"){prop=-1}else if(![\"length\",\"any\",\"all\"].includes(prop)||HookSet.isPrototypeOf(obj)){return TwineError.create(\"property\",\"You can only access position strings/numbers ('4th', 'last', '2ndlast', (2), etc.)\"+(HookSet.isPrototypeOf(obj)?\"\":\", 'length', 'any' and 'all'\")+\" of \"+objectName(obj)+\", not \"+objectName(prop)+\".\")}}else if(obj instanceof Set){if(![\"length\",\"any\",\"all\"].includes(prop)){return TwineError.create(\"property\",\"You can only get the 'length', 'any' and 'all' of a \"+objectName(obj)+\".\",\"To check contained values, use the 'contains' operator.\")}if(prop===\"length\"){prop=\"size\"}}else if(typeof obj===\"number\"||typeof obj===\"boolean\"){return TwineError.create(\"property\",\"You can't get data values from \"+objectName(obj)+\".\")}return prop}function compilePropertyChain(object,propertyChain){var compiledPropertyChain=propertyChain.reduce(function(arr,prop,i){if(prop.computed){prop=prop.value}if(VarRefProto.isPrototypeOf(prop)){prop=prop.get()}if(Array.isArray(prop)){prop=prop.map(function(prop){return compilePropertyIndex(object,prop)})}else{prop=compilePropertyIndex(object,prop)}var error=void 0;if(error=TwineError.containsError(arr,prop)){return error}if(i<propertyChain.length-1){object=_get(object,prop)}arr.push(prop);return arr},[]);return{compiledPropertyChain:compiledPropertyChain,deepestObject:object}}function convertNegativeProp(obj,prop){if(prop-0<0&&Math.abs(prop)<=obj.length){return obj.length+(prop-0)}return prop}function createDeterminer(obj,prop){var name={any:\"'any' value of \",all:\"'all' values of \"}[prop];return{determiner:prop,array:[].concat(_toConsumableArray(obj)),TwineScript_ObjectName:name+objectName(obj),TwineScript_TypeName:name+\"a data structure\",TwineScript_Unstorable:true,TwineScript_Print:function TwineScript_Print(){return\"`[\"+this.TwineScript_TypeName+\"]`\"}}}function objectOrMapGet(obj,prop){if(obj===undefined){return obj}else if(obj instanceof Map){return obj.get(prop)}else{if(isSequential(obj)){prop=convertNegativeProp(obj,prop)}if(prop===\"any\"||prop===\"all\"){return createDeterminer(obj,prop)}if(obj.TwineScript_GetElement&&Number.isFinite(+prop)){return obj.TwineScript_GetElement(prop)}else{var ret=obj[prop];if(typeof ret!==\"function\"){return ret}}}}function propertyDebugName(prop){if(prop.computed){if(typeof prop.value===\"string\"){return\"('\"+prop.value+\"')\"}return\"(\"+prop.value+\")\"}return\"'\"+prop+\"'\"}function canSet(obj,prop){if(Array.isArray(prop)){return prop.map(function(prop){return canSet(obj,prop)})}if(HookSet.isPrototypeOf(obj)){return TwineError.create(\"operation\",\"I can't modify \"+objectName(obj),\"You should alter hooks indirectly using macros like (replace:) or (enchant:).\")}if(obj instanceof Set){return TwineError.create(\"operation\",\"I can't modify \"+objectName(obj),\"You should use an (array:) if you need to modify the data inside this dataset.\")}if(Colour.isPrototypeOf(obj)){return TwineError.create(\"operation\",\"I can't modify the components of \"+objectName(obj))}if(obj instanceof Map){return true}if(isSequential(obj)){if([\"length\",\"any\",\"all\"].includes(prop)){return TwineError.create(\"operation\",\"I can't forcibly alter the '\"+prop+\"' of \"+objectName(obj)+\".\")}else if(+prop!==(prop|0)){return TwineError.create(\"property\",objectName(obj)+\" can only have position keys ('3rd', '1st', (5), etc.), not \"+propertyDebugName(prop)+\".\")}}if(obj.TwineScript_Identifiers&&prop in obj){return TwineError.create(\"keyword\",\"I can't alter the value of the '\"+prop+\"' identifier.\",\"You can only alter data in variables and hooks, not fixed identifiers.\")}if(typeof obj===\"number\"||typeof obj===\"boolean\"){return TwineError.create(\"operation\",\"You can't alter the data values of \"+objectName(obj)+\".\")}return true}function objectOrMapSet(obj,prop,value){var origProp=prop;if(obj instanceof Map){obj.set(prop,value)}else{if(isSequential(obj)){prop=convertNegativeProp(obj,prop)}if(obj.TwineScript_Set){obj.TwineScript_Set(prop)}else{obj[prop]=value}}eventHandlers.set.forEach(function(fn){return fn(obj,origProp,value)})}function objectOrMapDelete(obj,prop){var origProp=prop;if(isSequential(obj)){prop=convertNegativeProp(obj,prop)}if(Array.isArray(obj)&&numericIndex.exec(prop)){obj.splice(prop,1)}else if(obj instanceof Map||obj instanceof Set){obj.delete(prop)}else delete obj[prop];eventHandlers.delete.forEach(function(fn){return fn(obj,origProp)})}function wrapError(error){function self(){return error}return{get:self,set:self,delete:self,varref:true}}function _get(obj,prop,originalProp){if(Array.isArray(prop)){if(HookSet.isPrototypeOf(obj)){return obj.TwineScript_GetElement(prop)}return prop.map(function(e){return _get(obj,e,e)})[typeof obj===\"string\"?\"join\":\"valueOf\"](\"\")}if(typeof obj===\"string\"){obj=[].concat(_toConsumableArray(obj))}var result=objectOrMapGet(obj,prop);if(result===undefined){if(obj===State.variables){return defaultValue}if(obj.TwineScript_VariableStore){return TwineError.create(\"property\",\"There isn't a temp variable named _\"+originalProp+\" in this place.\",\"Temp variables only exist inside the same passage and hook in which they're (set:).\")}return TwineError.create(\"property\",\"I can't find a \"+propertyDebugName(originalProp)+\" data name in \"+objectName(obj))}return result}function mutateRight(fn,value){var _this=this;var result=this.compiledPropertyChain.reduce(function(arr,prop){var object=void 0;if(arr.length===0){object=_this.object}else{object=_get.apply(undefined,_toConsumableArray(arr[arr.length-1]))}return arr.push([object,prop])&&arr},[]).reduceRight(fn,value);return TwineError.containsError(result)?result:undefined}VarRefProto=Object.freeze({varref:true,get:function get(){return _get(this.deepestObject,this.compiledPropertyChain.slice(-1)[0],this.propertyChain.slice(-1)[0])},set:function set(value){if(this.object&&!this.object.TwineScript_VariableStore&&!this.object.TwineScript_Identifiers){return TwineError.create(\"macrocall\",\"I can't (set:) \"+objectName(this)+\", if the \"+(objectName(this.object).match(/ (.+$)/)||[\"\",\"value\"])[1]+\" isn't stored in a variable.\",\"Modifying data structures that aren't in variables won't change the game state at all.\")}return mutateRight.call(this,function(value,_ref19,i){var _ref20=_slicedToArray(_ref19,2),object=_ref20[0],property=_ref20[1];var error=void 0;if(error=TwineError.containsError(value,object,property)||TwineError.containsError(canSet(object,property))){return error}if(value&&value.TwineScript_Unstorable){return TwineError.create(\"operation\",typeName(value)+\" can't be stored.\")}if(i>0){object=clone(object)}if(typeof object===\"string\"){if(typeof value!==\"string\"||value.length!==(Array.isArray(property)?property.length:1)){return TwineError.create(\"datatype\",\"I can't put this non-string value, \"+objectName(value)+\", in a string.\")}object=[].concat(_toConsumableArray(object));var valArray=[].concat(_toConsumableArray(value));[].concat(property).forEach(function(index){if(0+index<0){index=object.length+(0+index)}object=[].concat(_toConsumableArray(object.slice(0,index)),[valArray.shift()],_toConsumableArray(object.slice(index+1)))});object=object.join(\"\")}else if(isObject(object)){if(Array.isArray(property)&&isSequential(value)){if(typeof value===\"string\"){value=[].concat(_toConsumableArray(value))}property.map(function(prop,i){return[prop,value[i]]}).forEach(function(_ref21){var _ref22=_slicedToArray(_ref21,2),e=_ref22[0],value=_ref22[1];return objectOrMapSet(object,e,value)})}else{objectOrMapSet(object,property,value)}}return object},value)},delete:function _delete(){return mutateRight.call(this,function(value,_ref23,i){var _ref24=_slicedToArray(_ref23,2),object=_ref24[0],property=_ref24[1];var error=void 0;if(error=TwineError.containsError(value,object,property)||TwineError.containsError(canSet(object,property))){return error}if(i>0){object=clone(object)}if(value===null){var isString=typeof object===\"string\";if(isString){object=[].concat(_toConsumableArray(object))}if(Array.isArray(property)){if(isSequential(object)){property=[].concat(_toConsumableArray(new Set(property)));property.sort(function(a,b){return convertNegativeProp(object,b)-convertNegativeProp(object,a)})}property.forEach(function(prop){return objectOrMapDelete(object,prop)})}else{objectOrMapDelete(object,property)}if(isString){object=object.join(\"\")}}else{objectOrMapSet(object,property,value)}return object},null)},create:function create(object,propertyChain){var error=void 0;if(error=TwineError.containsError(object)){return wrapError(error)}propertyChain=[].concat(propertyChain);if(VarRefProto.isPrototypeOf(object)){propertyChain=object.propertyChain.concat(propertyChain);object=object.object}var _compilePropertyChain=compilePropertyChain(object,propertyChain),compiledPropertyChain=_compilePropertyChain.compiledPropertyChain,deepestObject=_compilePropertyChain.deepestObject;if(error=TwineError.containsError(compiledPropertyChain,deepestObject)){return wrapError(error)}return Object.assign(Object.create(VarRefProto),{object:object,propertyChain:propertyChain,compiledPropertyChain:compiledPropertyChain,deepestObject:deepestObject})},get TwineScript_ObjectName(){return(this.object===State.variables?\"$\":objectName(this.object)+\"'s \")+(this.propertyChain.length===1?propertyDebugName(this.propertyChain[0]):this.propertyChain.reduce(function(a,e){return a+\"'s \"+propertyDebugName(e)}))},on:function on(name,fn){if(!(name in eventHandlers)){impossible(\"VarRef.on\",\"invalid event name\");return}if(typeof fn===\"function\"&&!eventHandlers[name].includes(fn)){eventHandlers[name].push(fn)}return VarRefProto}});return VarRefProto});\"use strict\";define(\"twinescript/compiler\",[\"utils\"],function(_ref25){var toJSLiteral=_ref25.toJSLiteral,impossible=_ref25.impossible;function indexOfType(array,types){for(var i=0;i<array.length;i+=1){if(types.includes(array[i].type)){return i}}return NaN}function rightAssociativeIndexOfType(array,types){return array.length-1-indexOfType.apply(undefined,[[].concat(_toConsumableArray(array)).reverse(),types])}function precedentToken(tokens,order){var ret=[];if(!tokens.length){return ret}[[\"error\"],[\"comma\"],[\"spread\"],[\"to\"],[\"into\"],{rightAssociative:[\"where\",\"via\"]},{rightAssociative:[\"with\",\"making\",\"each\"]},[\"augmentedAssign\"],[\"and\",\"or\"],[\"is\",\"isNot\"],[\"contains\",\"isIn\"],[\"inequality\"],[\"addition\",\"subtraction\"],[\"multiplication\",\"division\"],[\"not\"],[\"belongingProperty\"],[\"belongingOperator\",\"belongingItOperator\"],{rightAssociative:[\"property\"]},{rightAssociative:[\"itsProperty\"]},[\"belongingItProperty\"],{rightAssociative:[\"possessiveOperator\",\"itsOperator\"]},[\"twineLink\"],[\"macro\"],[\"grouping\"]][order===\"most\"?\"reverse\":\"valueOf\"]().some(function(types){var index=void 0;if(types.rightAssociative){index=rightAssociativeIndexOfType(tokens,types.rightAssociative)}else{index=indexOfType(tokens,types)}if(!Number.isNaN(index)&&index>-1){ret=[tokens[index],index];return true}});return ret}function compileComparisonOperator(token){if(token.type===\"inequality\"){var operation=token.operator;return token.negate?{\">\":\"<=\",\"<\":\">=\",\">=\":\"<\",\"<=\":\">\"}[operation]:operation}else{return token.type}}function invertComparisonOperator(token){var type=compileComparisonOperator(token);return{\">\":\"<\",\"<\":\">\",\">=\":\"<=\",\"<=\":\">=\",contains:\"isIn\",isIn:\"contains\",is:\"isNot\",isNot:\"is\"}[type]}function compile(tokens){var _ref26=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isVarRef=_ref26.isVarRef,elidedComparison=_ref26.elidedComparison;tokens=[].concat(tokens);if(!tokens.length){return\"\"}var token=tokens[0];if(tokens.length===1){if(token.type===\"identifier\"){if(isVarRef){return\"VarRef.create(Operations.Identifiers,\"+toJSLiteral(token.text)+\")\"}return\" Operations.Identifiers.\"+token.text.toLowerCase()+\" \"}else if(token.type===\"variable\"){return\"VarRef.create(State.variables,\"+toJSLiteral(token.name)+\")\"+(isVarRef?\"\":\".get()\")}else if(token.type===\"tempVariable\"){return\"VarRef.create(section.stack[0].tempVariables,\"+toJSLiteral(token.name)+\")\"+(isVarRef?\"\":\".get()\")}else if(token.type===\"hookRef\"){return\" HookSet.create('?\"+token.name+\"') \"}else if(token.type===\"string\"){return token.text.replace(/\\n/g,\"\\\\n\")}else if(token.type===\"colour\"){return\"Colour.create(\"+toJSLiteral(token.colour)+\")\"}else if(token.type===\"root\"){return compile(token.children)}}var i=void 0;var _precedentToken=precedentToken(tokens,\"least\");var _precedentToken2=_slicedToArray(_precedentToken,2);token=_precedentToken2[0];i=_precedentToken2[1];var type=(token||{}).type;var left=void 0,right=void 0,midString=void 0,operation=void 0,assignment=void 0,possessive=void 0,needsLeft=true,needsRight=true,implicitLeftIt=false;if(!type){}else if(type===\"error\"){return\"TwineError.create('syntax',\"+toJSLiteral(token.message)+\")\"}else if(type===\"comma\"){midString=\",\";needsRight=false}else if(type===\"spread\"){midString=\"Operations.makeSpreader(\";right=compile(tokens.slice(i+1))+\")\";needsLeft=false}else if(type===\"to\"){assignment=\"to\";right=compile(tokens.slice(i+1),{isVarRef:true});left=\"Operations.setIt(\"+compile(tokens.slice(0,i),{isVarRef:true})+\")\"}else if(type===\"into\"){assignment=\"into\";right=compile(tokens.slice(0,i),{isVarRef:true});left=\"Operations.setIt(\"+compile(tokens.slice(i+1),{isVarRef:true})+\")\"}else if(type===\"where\"||type===\"via\"){left=\"Lambda.create(\"+(compile(tokens.slice(0,i),{isVarRef:true}).trim()||\"undefined\")+\",\";midString=toJSLiteral(token.type)+\",\";right=toJSLiteral(compile(tokens.slice(i+1)))+\")\"}else if(type===\"with\"||type===\"making\"||type===\"each\"){var rightTokens=tokens.slice(i+1);if(![2,3].includes(rightTokens.length)||rightTokens[0].type!==\"whitespace\"||rightTokens[1].type!==\"tempVariable\"||rightTokens[2]&&rightTokens[2].type!==\"whitespace\"){left=\"TwineError.create('operation','I need a temporary variable to the right of \\\\'\";midString=token.type;right=\"\\\\'.')\"}else{if(type===\"each\"){left=\"Lambda.create(\";midString=compile(rightTokens,{isVarRef:true}).trim();right=\",'where','true')\"}else{left=\"Lambda.create(\"+(compile(tokens.slice(0,i),{isVarRef:true}).trim()||\"undefined\")+\",\";midString=toJSLiteral(token.type)+\",\";right=toJSLiteral(rightTokens[1].name)+\")\"}}}else if(type===\"augmentedAssign\"){assignment=token.operator;left=compile(tokens.slice(0,i),{isVarRef:true});right=\"Operations['\"+assignment+\"'](\"+(compile(tokens.slice(0,i))+\",\"+compile(tokens.slice(i+1)))+\")\"}else if(type===\"and\"||type===\"or\"){var isComparisonOp=function isComparisonOp(tokens){var _precedentToken3=precedentToken(tokens,\"least\"),_precedentToken4=_slicedToArray(_precedentToken3,2),token=_precedentToken4[0],i=_precedentToken4[1];if(!token){return}if([\"inequality\",\"is\",\"isNot\",\"isIn\",\"contains\"].includes(token.type)){return token}if([\"and\",\"or\"].includes(token.type)){return isComparisonOp(tokens.slice(0,i))||isComparisonOp(tokens.slice(i+1))}};var leftIsComparison=isComparisonOp(tokens.slice(0,i)),rightIsComparison=isComparisonOp(tokens.slice(i+1)),ambiguityError=\"TwineError.create('operation', 'This use of \\\"is not\\\" and \\\"\"+type+\"\\\" is grammatically ambiguous',\"+\"'Maybe try rewriting this as \\\"__ is not __ \"+type+\" __ is not __\\\"') \";operation=token.type;if(elidedComparison===token.type){operation=\"\";left=compile(tokens.slice(0,i),{isVarRef:isVarRef,elidedComparison:elidedComparison}).trim();midString=\",\";right=compile(tokens.slice(i+1),{elidedComparison:elidedComparison}).trim()}else if(leftIsComparison&&!rightIsComparison){var _precedentToken5=precedentToken(tokens.slice(0,i),\"least\"),_precedentToken6=_slicedToArray(_precedentToken5,1),leftSide=_precedentToken6[0],operator=toJSLiteral(compileComparisonOperator(leftSide));if(leftSide.type===\"isNot\"){return ambiguityError}right=\"Operations.elidedComparisonOperator(\"+toJSLiteral(token.type)+\",\"+operator+\",\"+compile(tokens.slice(i+1),{elidedComparison:type})+\")\"}else if(!leftIsComparison&&rightIsComparison){var rightSide=rightIsComparison,rightIndex=tokens.indexOf(rightSide),_operator=toJSLiteral(invertComparisonOperator(rightSide));if(rightSide.type===\"isNot\"){return ambiguityError}right=\"Operations.elidedComparisonOperator(\"+toJSLiteral(token.type)+\",\"+_operator+\",\"+compile(tokens.slice(0,i),{elidedComparison:type})+\")\";left=compile([].concat(_toConsumableArray(tokens.slice(rightIndex+1)),[Object.assign(Object.create(rightSide),_defineProperty({},rightSide.type===\"inequality\"?\"operator\":\"type\",invertComparisonOperator(rightSide)))],_toConsumableArray(tokens.slice(i+1,rightIndex))))}}else if(type===\"is\"||type===\"isNot\"||type===\"contains\"||type===\"isIn\"||type===\"inequality\"){implicitLeftIt=true;operation=compileComparisonOperator(token)}else if(type===\"addition\"||type===\"subtraction\"){operation=token.text;left=compile(tokens.slice(0,i));if(!left.trim()){left=\"0\"}}else if(type===\"multiplication\"||type===\"division\"){operation=token.text}else if(type===\"not\"){midString=\" \";right=\"Operations.not(\"+compile(tokens.slice(i+1))+\")\";needsLeft=false}else if(type===\"belongingProperty\"){right=\"VarRef.create(\"+compile(tokens.slice(i+1),{isVarRef:true})+\",\"+toJSLiteral(token.name)+\")\"+(isVarRef?\"\":\".get()\");midString=\" \";needsLeft=needsRight=false}else if(type===\"belongingOperator\"||type===\"belongingItOperator\"){if(token.type.includes(\"It\")){right=\"Operations.Identifiers.it\";needsRight=false}else{right=compile(tokens.slice(i+1),{isVarRef:true})}possessive=\"belonging\"}else if(type===\"property\"){left=\"VarRef.create(\"+compile(tokens.slice(0,i),{isVarRef:true})+\",\"+toJSLiteral(token.name)+\")\"+(isVarRef?\"\":\".get()\");midString=\" \";needsLeft=needsRight=false}else if(type===\"itsProperty\"||type===\"belongingItProperty\"){left=\"VarRef.create(Operations.Identifiers.it,\"+toJSLiteral(token.name)+\").get()\";midString=\" \";needsLeft=needsRight=false}else if(type===\"possessiveOperator\"||type===\"itsOperator\"){if(token.type.includes(\"it\")){left=\"Operations.Identifiers.it\";needsLeft=false}possessive=\"possessive\"}else if(type===\"twineLink\"){midString='Macros.run(\"link-goto\", [section,'+toJSLiteral(token.innerText)+\",\"+toJSLiteral(token.passage)+\"])\";needsLeft=needsRight=false}else if(type===\"macro\"){var macroNameToken=token.children[0];if(macroNameToken.type!==\"macroName\"){impossible(\"Compiler.compile\",\"macro token had no macroName child token\")}midString=\"Macros.run(\"+(macroNameToken.isMethodCall?compile(macroNameToken.children):'\"'+token.name+'\"')+\", [\"+\"section,\"+compile(token.children.slice(1))+\"])\";needsLeft=needsRight=false}else if(type===\"grouping\"){midString=\"(\"+compile(token.children,{isVarRef:isVarRef})+\")\";needsLeft=needsRight=false}if(i>-1){if(operation){isVarRef=false}left=left||compile(tokens.slice(0,i),{isVarRef:isVarRef}).trim();right=right||compile(tokens.slice(i+1)).trim();if(implicitLeftIt&&!left){left=\" Operations.Identifiers.it \"}if(needsLeft&&!left||needsRight&&!right){return\"TwineError.create('operation','I need some code to be \"+(needsLeft?\"left \":\"\")+(needsLeft&&needsRight?\"and \":\"\")+(needsRight?\"right \":\"\")+\"of \"+'\"'+token.text+'\"'+\"')\"}if(midString){return left+midString+right}else if(assignment){return\"Operations.makeAssignmentRequest(\"+[left,right,toJSLiteral(assignment)]+\")\"}else if(possessive){return\"VarRef.create(\"+(possessive===\"belonging\"?right:left)+\",{computed:true,value:\"+(possessive===\"belonging\"?left:right)+\"})\"+(isVarRef?\"\":\".get()\")}else if(operation){return\" Operations[\"+toJSLiteral(operation)+\"](\"+left+\",\"+right+\") \"}}else if(tokens.length===1){return((\"value\"in tokens[0]?tokens[0].value:tokens[0].text)+\"\").trim()||\" \"}else{return tokens.reduce(function(a,token){return a+compile(token,{isVarRef:isVarRef})},\"\")}return\"\"}return compile});\"use strict\";define(\"renderer\",[\"utils\",\"markup\",\"twinescript/compiler\",\"internaltypes/twineerror\"],function(_ref27,TwineMarkup,Compiler,TwineError){var escape=_ref27.escape,impossible=_ref27.impossible,toJSLiteral=_ref27.toJSLiteral,insensitiveName=_ref27.insensitiveName;var Renderer=void 0;function wrapHTMLTag(text,tagName){return\"<\"+tagName+\">\"+text+\"</\"+tagName+\">\"}function renderTag(token,tagName){var contents=Renderer.render(token.children);return contents&&wrapHTMLTag(contents,tagName)}var center=\"text-align: center; max-width:50%; \";Renderer={options:{},exec:function(){var cachedInput=void 0,cachedOutput=void 0;return function(src){if(typeof src!==\"string\"){impossible(\"Renderer.exec\",\"source was not a string, but \"+(typeof src===\"undefined\"?\"undefined\":_typeof(src)));return\"\"}if(src===cachedInput){return cachedOutput}cachedInput=src;cachedOutput=Renderer.render(TwineMarkup.lex(src).children);return cachedOutput}}(),render:function render(tokens){var out=\"\";var HTMLTableStack=[];if(!tokens){return out}var len=tokens.length;for(var i=0;i<len;i+=1){var token=tokens[i];switch(token.type){case\"error\":{out+=TwineError.create(\"syntax\",token.message).render(escape(token.text))[0].outerHTML;break}case\"numbered\":case\"bulleted\":{var tagName=token.type===\"numbered\"?\"ol\":\"ul\";out+=\"<\"+tagName+\">\";var depth=1;while(i<len&&tokens[i]&&tokens[i].type===token.type){out+=(\"<\"+tagName+\">\").repeat(Math.max(0,tokens[i].depth-depth));out+=(\"</\"+tagName+\">\").repeat(Math.max(0,depth-tokens[i].depth));depth=tokens[i].depth;out+=renderTag(tokens[i],\"li\");i+=1}i-=1;out+=(\"</\"+tagName+\">\").repeat(depth+1);break}case\"align\":{while(token&&token.type===\"align\"){var _token=token,align=_token.align;var j=i+=1;if(align===\"left\"){i-=1;break}while(i<len&&tokens[i]&&tokens[i].type!==\"align\"){i+=1}var body=render(tokens.slice(j,i));var style=\"\";switch(align){case\"center\":style+=center+\"margin-left: auto; margin-right: auto;\";break;case\"justify\":case\"right\":style+=\"text-align: \"+align+\";\";break;default:if(+align){style+=center+\"margin-left: \"+align+\"%;\"}}out+=\"<tw-align \"+(style?'style=\"'+style+'\"':\"\")+(Renderer.options.debug?' title=\"'+token.text+'\"':\"\")+\">\"+body+\"</tw-align>\\n\";token=tokens[i]}break}case\"column\":{var columns=[];while(token&&token.type===\"column\"){var _token2=token,columnType=_token2.column;var _j=i+=1;if(columnType===\"none\"){i-=1;break}while(i<len&&tokens[i]&&tokens[i].type!==\"column\"){i+=1}columns.push({text:token.text,type:columnType,body:render(tokens.slice(_j,i)),width:token.width,marginLeft:token.marginLeft,marginRight:token.marginRight});token=tokens[i]}if(columns.length){(function(){var totalWidth=columns.reduce(function(a,e){return a+e.width},0);out+=\"<tw-columns>\"+columns.map(function(e){return\"<tw-column type=\"+e.type+\" \"+' style=\"width:'+e.width/totalWidth*100+\"%; margin-left: \"+e.marginLeft+\"em; margin-right: \"+e.marginRight+'em;\" '+(Renderer.options.debug?' title=\"'+e.text+'\"':\"\")+\">\"+e.body+\"</tw-column>\\n\"}).join(\"\")+\"</tw-columns>\"})()}break}case\"heading\":{out+=renderTag(token,\"h\"+token.depth);break}case\"br\":{if(!HTMLTableStack.length||/td|th/.test(HTMLTableStack[0])){out+=\"<br>\"}break}case\"hr\":{out+=\"<hr>\";break}case\"escapedLine\":case\"comment\":{break}case\"inlineUrl\":{out+='<a class=\"link\" href=\"'+escape(token.text)+'\">'+token.text+\"</a>\";break}case\"scriptStyleTag\":case\"tag\":{var insensitiveText=token.text.toLowerCase();if(/^<\\/?(?:table|thead|tbody|tr|tfoot|td|th)\\b/.test(insensitiveText)){HTMLTableStack[token.text.startsWith(\"</\")?\"shift\":\"unshift\"](insensitiveText)}out+=token.text.startsWith(\"</\")?token.text:token.text.replace(/>$/,\" data-raw>\");break}case\"sub\":case\"sup\":case\"del\":case\"strong\":case\"em\":{out+=renderTag(token,token.type);break}case\"bold\":{out+=renderTag(token,\"b\");break}case\"italic\":{out+=renderTag(token,\"i\");break}case\"twineLink\":{var newTwineLinkToken=TwineMarkup.lex(\"(link-goto:\"+toJSLiteral(token.innerText)+\",\"+toJSLiteral(token.passage)+\")\");out+=render(newTwineLinkToken.children);break}case\"hook\":{out+=\"<tw-hook \"+(token.hidden?\"hidden \":\"\")+(token.name?'name=\"'+insensitiveName(token.name)+'\"':\"\")+(Renderer.options.debug&&token.name?' title=\"Hook: ?'+token.name+'\"':\"\")+' source=\"'+escape(token.innerText)+'\">'+\"</tw-hook>\";break}case\"verbatim\":{out+=wrapHTMLTag(escape(token.innerText).replace(/\\n/g,\"<br>\"),\"tw-verbatim\");break}case\"collapsed\":{out+=renderTag(token,\"tw-collapsed\");break}case\"variable\":case\"tempVariable\":case\"macro\":{out+='<tw-expression type=\"'+token.type+'\" name=\"'+escape(token.name||token.text)+'\"'+(Renderer.options.debug?' title=\"'+escape(token.text)+'\"':\"\")+' js=\"'+escape(Compiler(token))+'\">'+\"</tw-expression>\";break}default:{out+=token.children&&token.children.length?render(token.children):token.text;break}}}return out}};return Object.freeze(Renderer)});\"use strict\";define(\"utils/naturalsort\",[],function(){return function NaturalSort(locale){return function naturalSort(a,b){var re=/(^-?[0-9]+(\\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,sre=/(^[ ]*|[ ]*$)/g,dre=/(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/,hre=/^0x[0-9a-f]+$/i,ore=/^0/,i=function i(s){return naturalSort.insensitive&&(\"\"+s).toLowerCase()||\"\"+s},x=i(a).replace(sre,\"\")||\"\",y=i(b).replace(sre,\"\")||\"\",xN=x.replace(re,\"\\0$1\\0\").replace(/\\0$/,\"\").replace(/^\\0/,\"\").split(\"\\0\"),yN=y.replace(re,\"\\0$1\\0\").replace(/\\0$/,\"\").replace(/^\\0/,\"\").split(\"\\0\"),xD=parseInt(x.match(hre))||xN.length!==1&&x.match(dre)&&Date.parse(x),yD=parseInt(y.match(hre))||xD&&y.match(dre)&&Date.parse(y)||null,oFxNcL,oFyNcL,collator,colCmp;if(locale&&window.Intl&&window.Intl.Collator)collator=window.Intl.Collator(locale);if(yD)if(xD<yD)return-1;else if(xD>yD)return 1;for(var cLoc=0,numS=Math.max(xN.length,yN.length);cLoc<numS;cLoc++){oFxNcL=!(xN[cLoc]||\"\").match(ore)&&parseFloat(xN[cLoc])||xN[cLoc]||0;oFyNcL=!(yN[cLoc]||\"\").match(ore)&&parseFloat(yN[cLoc])||yN[cLoc]||0;if(isNaN(oFxNcL)!==isNaN(oFyNcL)){return isNaN(oFxNcL)?1:-1}else if((typeof oFxNcL===\"undefined\"?\"undefined\":_typeof(oFxNcL))!==(typeof oFyNcL===\"undefined\"?\"undefined\":_typeof(oFyNcL))){oFxNcL+=\"\";oFyNcL+=\"\"}else if(typeof oFxNcL===\"string\"&&collator){colCmp=collator.compare(oFxNcL,oFyNcL);if(colCmp!==0)return colCmp}if(oFxNcL<oFyNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0}}});\"use strict\";define(\"internaltypes/varscope\",[],function(){return{TwineScript_ObjectName:\"the temporary variables\",TwineScript_VariableStore:true}});\"use strict\";define(\"datatypes/lambda\",[\"utils\",\"utils/operationutils\",\"internaltypes/varscope\",\"internaltypes/twineerror\"],function(_ref28,_ref29,VarScope,TwineError){var toJSLiteral=_ref28.toJSLiteral,insensitiveName=_ref28.insensitiveName,plural=_ref28.plural;var typeName=_ref29.typeName,objectName=_ref29.objectName,singleTypeCheck=_ref29.singleTypeCheck;var Lambda=Object.freeze({lambda:true,TwineScript_TypeName:\"a lambda\",TwineScript_ObjectName:function TwineScript_ObjectName(){return'a \"'+(\"making\"in this?\"making ... \":\"\")+(\"with\"in this?\"with ... \":\"\")+(\"where\"in this?\"where ... \":\"\")+(\"via\"in this?\"via ... \":\"\")+'\" lambda'},TwineScript_Print:function TwineScript_Print(){return\"`[A lambda]`\"},TwineScript_is:function TwineScript_is(other){return other===this},TypeSignature:function TypeSignature(clauses){return{pattern:\"lambda\",innerType:Lambda,clauses:clauses}},create:function create(subject,clauseType,clause){var ret=void 0;if(TwineError.containsError(subject)){return subject}else if(Lambda.isPrototypeOf(subject)){if(clauseType in subject&&!(clauseType===\"where\"&&subject[clauseType]===\"true\")){return TwineError.create(\"syntax\",\"This lambda has two '\"+clauseType+\"' clauses.\")}ret=subject}else{if(subject!==undefined&&(!subject||!subject.varref||!VarScope.isPrototypeOf(subject.object)||subject.propertyChain.length>1)){return TwineError.create(\"syntax\",\"This lambda needs to start with a single temporary variable.\")}ret=Object.create(this);ret.loop=subject?subject.propertyChain[0]:\"\"}ret[clauseType]=clause;var nonunique=[ret.making,ret.with,ret.loop].filter(function(e,i,a){return e&&a.indexOf(insensitiveName(e))!==i});if(nonunique.length){return TwineError.create(\"syntax\",\"This lambda has two variables named '\"+nonunique[0]+\"'.\",\"Lambdas should have all-unique parameter names.\")}return ret},apply:function apply(section,_ref30){var loopArg=_ref30.loop,withArg=_ref30[\"with\"],makingArg=_ref30.making,failArg=_ref30.fail,passArg=_ref30.pass,ignoreVia=_ref30.ignoreVia;var tempVariables=Object.create(VarScope);[[this.loop,loopArg],[this.with,withArg],[this.making,makingArg]].forEach(function(_ref31){var _ref32=_slicedToArray(_ref31,2),name=_ref32[0],arg=_ref32[1];return name&&(tempVariables[name]=arg)});section.stack.unshift(Object.assign(Object.create(null),{tempVariables:tempVariables}));if(loopArg&&!this.with&&!this.making){section.eval(\"Operations\").initialiseIt(loopArg)}else{section.eval(\"Operations\").initialiseIt(TwineError.create(\"operation\",\"I can't use 'it', or an implied 'it', in \"+this.TwineScript_ObjectName()))}var via=!ignoreVia&&this.via;var ret=section.eval(\"where\"in this?\"Operations.where(\"+this.where+\",\"+(via||toJSLiteral(passArg))+\",\"+toJSLiteral(failArg)+\")\":via||toJSLiteral(passArg));section.stack.shift();return ret},filter:function filter(section,args){var _this2=this;return args.reduce(function(result,arg){var error=void 0;if(error=TwineError.containsError(result)){return error}var passedFilter=_this2.apply(section,{loop:arg,pass:true,fail:false,ignoreVia:true});if(error=TwineError.containsError(passedFilter)){return error}return result.concat(passedFilter?[arg]:[])},[])}});return Lambda});\"use strict\";define(\"macros\",[\"jquery\",\"utils/naturalsort\",\"utils\",\"utils/operationutils\",\"datatypes/changercommand\",\"datatypes/lambda\",\"datatypes/hookset\",\"internaltypes/twineerror\"],function($,NaturalSort,_ref33,_ref34,ChangerCommand,Lambda,HookSet,TwineError){var insensitiveName=_ref33.insensitiveName,nth=_ref33.nth,plural=_ref33.plural,andList=_ref33.andList,lockProperty=_ref33.lockProperty;var objectName=_ref34.objectName,typeName=_ref34.typeName,singleTypeCheck=_ref34.singleTypeCheck;var Macros=void 0;var macroRegistry={};function readArguments(fn){return function(args){args=args.reduce(function(newArgs,el){if(el&&el.spreader===true){var value=el.value;if(Array.isArray(value)||typeof value===\"string\"){for(var i=0;i<value.length;i++){newArgs.push(value[i])}}else if(value instanceof Set){newArgs.push.apply(newArgs,_toConsumableArray(Array.from(value).sort(NaturalSort(\"en\"))))}else{newArgs.push(TwineError.create(\"operation\",\"I can't spread out \"+objectName(value)+\", because it is not a string, dataset, or array.\"))}}else{newArgs.push(el)}return newArgs},[]);var error=TwineError.containsError(args);if(error){return error}return fn.apply(undefined,_toConsumableArray(args))}}function typeSignatureCheck(name,fn,typeSignature){typeSignature=[].concat(typeSignature||[]);name=\"(\"+(Array.isArray(name)&&name.length>1?name[0]:name)+\":)\";var signatureInfo=void 0;if(typeSignature.length>0){signatureInfo=\"The \"+name+\" macro must only be given \"+typeSignature.map(typeName).reduce(function(a,e,i,arr){return a+(i===0?\"\":i<arr.length-1?\", \":\", and \")+e},\"\")+(typeSignature.length>1?\", in that order\":\".\")}else{signatureInfo=\"The macro must not be given any data - just write \"+name+\".\"}return function(section){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2]}var rest=void 0;var _loop=function _loop(ind,end){var type=typeSignature[ind];var arg=args[ind];if(ind>=typeSignature.length&&!rest){return{v:TwineError.create(\"datatype\",args.length-typeSignature.length+\" too many values were given to this \"+name+\" macro.\",signatureInfo)}}type||(type=rest);if(type.innerType&&(type.pattern===\"rest\"||type.pattern===\"zero or more\")){rest=type.innerType;if(type.pattern===\"rest\"){type=type.innerType}}if(!singleTypeCheck(arg,type)){if(arg===undefined){return{v:TwineError.create(\"datatype\",\"The \"+name+\" macro needs \"+plural(typeSignature.length-ind,\"more value\")+\".\",signatureInfo)}}if(arg&&arg.TwineScript_Unstorable&&(type===Macros.TypeSignature.Any||type.innerType&&type.innerType===Macros.TypeSignature.Any)){return{v:TwineError.create(\"datatype\",name+\"'s \"+nth(ind+1)+\" value, \"+objectName(arg)+\", is not valid data for this macro.\",signatureInfo)}}if(arg&&Lambda.isPrototypeOf(arg)&&type.pattern===\"lambda\"){return{v:TwineError.create(\"datatype\",name+\"'s \"+nth(ind+1)+\" value (a lambda) should have \"+andList([\"where\",\"making\",\"via\",\"with\"].filter(function(e){return type.clauses.includes(e)}).map(function(e){return\"a '\"+e+\"' clause\"}))+\", not \"+andList([\"where\",\"making\",\"via\",\"with\"].filter(function(e){return e in arg}).map(function(e){return\"a '\"+e+\"' clause\"}))+\".\")}}return{v:TwineError.create(\"datatype\",name+\"'s \"+nth(ind+1)+\" value is \"+objectName(arg)+\", but should be \"+typeName(type)+\".\",type.message||signatureInfo)}}};for(var ind=0,end=Math.max(args.length,typeSignature.length);ind<end;ind+=1){var _ret3=_loop(ind,end);if((typeof _ret3===\"undefined\"?\"undefined\":_typeof(_ret3))===\"object\")return _ret3.v}return fn.apply(undefined,[section].concat(args))}}function privateAdd(name,fn){if(Array.isArray(name)){name.forEach(function(n){return lockProperty(macroRegistry,insensitiveName(n),fn)})}else{lockProperty(macroRegistry,insensitiveName(name),fn)}}Macros={has:function has(e){e=insensitiveName(e);return macroRegistry.hasOwnProperty(e)},get:function get(e){e=insensitiveName(e);return macroRegistry.hasOwnProperty(e)&&macroRegistry[e]},add:function add(name,fn,typeSignature){privateAdd(name,readArguments(typeSignatureCheck(name,fn,typeSignature)));return add},addChanger:function addChanger(name,fn,changerCommandFn,typeSignature){privateAdd(name,readArguments(typeSignatureCheck(name,fn,typeSignature)));ChangerCommand.register(Array.isArray(name)?name[0]:name,changerCommandFn);return addChanger},TypeSignature:{optional:function optional(type){return{pattern:\"optional\",innerType:type}},zeroOrMore:function zeroOrMore(type){return{pattern:\"zero or more\",innerType:type}},either:function either(){for(var _len3=arguments.length,innerType=Array(_len3),_key3=0;_key3<_len3;_key3++){innerType[_key3]=arguments[_key3]}return{pattern:\"either\",innerType:innerType}},rest:function rest(type){return{pattern:\"rest\",innerType:type}},wrapped:function wrapped(innerType,message){return{pattern:\"wrapped\",innerType:innerType,message:message}},Any:{TwineScript_TypeName:\"anything\"}},run:function run(name,args){if(TwineError.containsError(name)){return name}if(!Macros.has(name)){return TwineError.create(\"macrocall\",\"I can't run the macro '\"+name+\"' because it doesn't exist.\",\"Did you mean to run a macro? If you have a word written like (this:), \"+\"it is regarded as a macro name.\")}return Macros.get(name)(args)}};return Object.freeze(Macros)});\"use strict\";define(\"datatypes/assignmentrequest\",[\"utils\"],function(_ref35){var assertMustHave=_ref35.assertMustHave;var assignmentRequest=Object.freeze({assignmentRequest:true,TwineScript_TypeName:\"a 'to' or 'into' expression\",TwineScript_ObjectName:\"a 'to' or 'into' expression\",TwineScript_Unstorable:true,create:function create(dest,src,operator){assertMustHave(dest,[\"varref\"]);return Object.assign(Object.create(this),{dest:dest,src:src,operator:operator})}});return assignmentRequest});\"use strict\";define(\"twinescript/operations\",[\"state\",\"datatypes/colour\",\"datatypes/assignmentrequest\",\"utils/operationutils\",\"internaltypes/twineerror\"],function(State,Colour,AssignmentRequest,_ref36,TwineError){var isObject=_ref36.isObject,collectionType=_ref36.collectionType,coerceToString=_ref36.coerceToString,is=_ref36.is,clone=_ref36.clone,unique=_ref36.unique,contains=_ref36.contains,typeName=_ref36.typeName,objectName=_ref36.objectName;var Operations=void 0,It=0;function onlyPrimitives(type,fn,operationVerb,message){operationVerb=operationVerb||\"do this to\";return function(left,right){if(fn.length===1){right=left}var error=void 0;if(error=TwineError.containsError(left,right)){return error}if((typeof left===\"undefined\"?\"undefined\":_typeof(left))!==type||(typeof right===\"undefined\"?\"undefined\":_typeof(right))!==type){return TwineError.create(\"operation\",\"I can only \"+operationVerb+\" \"+type+\"s, not \"+objectName((typeof left===\"undefined\"?\"undefined\":_typeof(left))!==type?left:right)+\".\",message)}return fn(left,right)}}function doNotCoerce(fn){return function(left,right){var error=void 0;if(error=TwineError.containsError(left,right)){return error}if(left&&left.varref){return TwineError.create(\"operation\",\"I can't give an expression a new value.\")}if((typeof left===\"undefined\"?\"undefined\":_typeof(left))!==(typeof right===\"undefined\"?\"undefined\":_typeof(right))||collectionType(left)!==collectionType(right)){return coerceToString(fn,left,right)||TwineError.create(\"operation\",objectName(left)+\" isn't the same type of data as \"+objectName(right))}return fn(left,right)}}function comparisonOp(fn){var compare=function compare(left,right){var error=void 0;if(error=TwineError.containsError(left,right)){return error}It=left;if(left.determiner){var all=left.determiner===\"all\";return left.array.reduce(function(result,e){var error=void 0,next=compare(e,right);if(error=TwineError.containsError(result,next)){return error}return all?result&&next:result||next},all)}else if(right.determiner){var _all=right.determiner===\"all\";return right.array.reduce(function(result,e){var error=void 0,next=compare(left,e);if(error=TwineError.containsError(result,next)){return error}return _all?result&&next:result||next},_all)}return fn(left,right)};return compare}var andOrNotMessage=\"If one of these values is a number, you may want to write a check that it 'is not 0'. \"+\"Also, if one is a string, you may want to write a check that it 'is not \\\"\\\" '.\";Operations={create:function create(section){var ret=Object.create(this);ret.Identifiers={TwineScript_Identifiers:true,get it(){return It},get time(){return Date.now()-section.timestamp}};return ret},elidedComparisonOperator:function elidedComparisonOperator(logicalOp,comparisonOp){for(var _len4=arguments.length,values=Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++){values[_key4-2]=arguments[_key4]}return values.reduce(function(result,value){if(typeof value===\"boolean\"){return value}return Operations[logicalOp](result,Operations[comparisonOp](It,value))},logicalOp===\"and\")},and:onlyPrimitives(\"boolean\",doNotCoerce(function(l,r){return l&&r}),\"use 'and' to join\",andOrNotMessage),or:onlyPrimitives(\"boolean\",doNotCoerce(function(l,r){return l||r}),\"use 'or' to join\",andOrNotMessage),not:onlyPrimitives(\"boolean\",function(e){return!e},\"use 'not' to invert\",andOrNotMessage),\"+\":doNotCoerce(function(l,r){if(Array.isArray(l)){return[].concat(_toConsumableArray(l),_toConsumableArray(r))}var ret=void 0;if(l instanceof Map){ret=new Map(l);r.forEach(function(v,k){return ret.set(k,v)});return ret}if(l instanceof Set){return new Set([].concat(_toConsumableArray(l),_toConsumableArray(r)).filter(unique).map(clone))}else if(typeof l[\"TwineScript_+\"]===\"function\"){return l[\"TwineScript_+\"](r)}if(\"string|number|boolean\".includes(typeof l===\"undefined\"?\"undefined\":_typeof(l))){return l+r}return TwineError.create(\"operation\",\"I can't use + on \"+objectName(l)+\".\")}),\"-\":doNotCoerce(function(l,r){if(Array.isArray(l)){return l.filter(function(val1){return!r.some(function(val2){return is(val1,val2)})})}if(l instanceof Set){var rvals=[].concat(_toConsumableArray(r));return new Set([].concat(_toConsumableArray(l)).filter(function(val1){return!rvals.some(function(val2){return is(val1,val2)})}))}if(typeof l===\"string\"){return l.split(r).join(\"\")}if(typeof l===\"number\"){return l-r}return TwineError.create(\"operation\",\"I can't use - on \"+objectName(l)+\".\")}),\"*\":onlyPrimitives(\"number\",doNotCoerce(function(l,r){return l*r}),\"multiply\"),\"/\":onlyPrimitives(\"number\",doNotCoerce(function(l,r){if(r===0){return TwineError.create(\"operation\",\"I can't divide \"+objectName(l)+\" by zero.\")}return l/r}),\"divide\"),\"%\":onlyPrimitives(\"number\",doNotCoerce(function(l,r){if(r===0){return TwineError.create(\"operation\",\"I can't modulo \"+objectName(l)+\" by zero.\")}return l%r}),\"modulus\"),\"<\":comparisonOp(onlyPrimitives(\"number\",doNotCoerce(function(l,r){return l<r}),\"do < to\")),\">\":comparisonOp(onlyPrimitives(\"number\",doNotCoerce(function(l,r){return l>r}),\"do > to\")),\"<=\":comparisonOp(onlyPrimitives(\"number\",doNotCoerce(function(l,r){return l<=r}),\"do <= to\")),\">=\":comparisonOp(onlyPrimitives(\"number\",doNotCoerce(function(l,r){return l>=r}),\"do >= to\")),is:comparisonOp(is),isNot:comparisonOp(function(l,r){return!Operations.is(l,r)}),contains:comparisonOp(contains),isIn:comparisonOp(function(l,r){return contains(r,l)}),where:function where(bool,passVal,failVal){var err=void 0;if(err=TwineError.containsError(bool)){return err}if(typeof bool!==\"boolean\"){return TwineError.create(\"operation\",\"This lambda's 'where' clause must evaluate to true or false, not \"+objectName(bool)+\".\")}return bool?passVal:failVal},makeSpreader:function makeSpreader(val){return{value:val,spreader:true}},makeAssignmentRequest:function makeAssignmentRequest(dest,src,operator){var error=TwineError.containsError(dest,src);if(error){return error}if(!isObject(dest)||!(\"varref\"in dest)){return TwineError.create(\"operation\",\"I can't store a new value inside \"+objectName(dest)+\".\")}return AssignmentRequest.create(dest,src,operator)},setIt:function setIt(e){if(TwineError.containsError(e)){return e}if(!e.varref){return TwineError.create(\"operation\",\"I can't put a new value into \"+objectName(e)+\".\")}return It=e.get(),e},initialiseIt:function initialiseIt(e){It=e}};return Object.freeze(Operations)});\"use strict\";define(\"twinescript/environ\",[\"macros\",\"state\",\"utils\",\"datatypes/colour\",\"datatypes/hookset\",\"datatypes/lambda\",\"internaltypes/varref\",\"internaltypes/twineerror\",\"twinescript/operations\"],function(Macros,State,Utils,Colour,HookSet,Lambda,VarRef,TwineError,OperationsProto){return function(section){if((typeof section===\"undefined\"?\"undefined\":_typeof(section))!==\"object\"||!section){Utils.impossible(\"TwineScript.environ\",\"no Section argument was given!\")}var Operations=OperationsProto.create(section);Operations;section.eval=function(){try{for(var _len5=arguments.length,args=Array(_len5),_key5=0;_key5<_len5;_key5++){args[_key5]=arguments[_key5]}return eval(args.join(\"\"))}catch(e){return e}};return section}});\"use strict\";define(\"internaltypes/changedescriptor\",[\"jquery\",\"utils\",\"renderer\",\"datatypes/hookset\"],function($,_ref37,_ref38,HookSet){var assertOnlyHas=_ref37.assertOnlyHas,impossible=_ref37.impossible,transitionIn=_ref37.transitionIn;var exec=_ref38.exec;var changeDescriptorShape=void 0;var ChangeDescriptor={source:\"\",innerSource:\"\",enabled:true,target:null,append:\"append\",newTargets:null,transition:\"instant\",transitionTime:null,loopVars:null,styles:null,attr:null,data:null,section:null,summary:function summary(){var _this3=this;return[\"source\",\"innerSource\",\"enabled\",\"target\",\"append\",\"newTargets\",\"transition\",\"transitionTime\"].filter(function(e){return _this3.hasOwnProperty(e)}).concat([this.attr.length&&\"attr\",this.styles.length&&\"styles\",Object.keys(this.loopVars).length&&\"loopVars\",Object.keys(this.data).length&&\"data\"].filter(Boolean))},create:function create(properties,changer){var ret=Object.assign(Object.create(this),{attr:[].concat(this.attr||[]),styles:[].concat(this.styles||[]),loopVars:this.loopVars||{},data:this.data||{}},properties);if(changer){changer.run(ret)}return ret},update:function update(){var _this4=this;var section=this.section,newTargets=this.newTargets;var target=this.target;var forEachTarget=function forEachTarget(elem){if(Array.isArray(_this4.styles)&&_this4.styles.length>0){setTimeout(function(){return elem.css(Object.assign.apply(Object,_toConsumableArray([{}].concat(_this4.styles))))})}if(_this4.attr){_this4.attr.forEach(function(e){return elem.attr(e)})}if(_this4.data){elem.data(_this4.data)}};if(Array.isArray(newTargets)&&newTargets.length){target=newTargets.map(function(t){return t.target})}[].concat(target).forEach(function(target){if(HookSet.isPrototypeOf(target)){target.forEach(section,forEachTarget)}else{forEachTarget(target)}})},render:function render(){var _this5=this;var source=this.source,transition=this.transition,transitionTime=this.transitionTime,enabled=this.enabled,section=this.section,newTargets=this.newTargets;var target=this.target,append=this.append;assertOnlyHas(this,changeDescriptorShape);if(!enabled||target.popAttr(\"hidden\")!==undefined){ChangeDescriptor.create({target:target,data:{hiddenSource:source}}).update();return $()}if(Array.isArray(newTargets)&&newTargets.length){target=newTargets}if(!target){impossible(\"ChangeDescriptor.render\",\"ChangeDescriptor has source but not a target!\");return $()}var dom=$();var renderAll=function renderAll(append){return function(target){dom=dom.add(_this5.create({target:target,append:append,newTargets:null}).render())}};[].concat(target).forEach(function loop(target,_,__){var append_=arguments.length>3&&arguments[3]!==undefined?arguments[3]:append;if(HookSet.isPrototypeOf(target)){target.forEach(section,renderAll(append_))}else if(target.jquery&&target.length>1){Array.from(target).map($).forEach(renderAll(append_))}else if(target.target&&target.append){loop(target.target,_,__,target.append)}});if(dom.length||Array.isArray(target)||HookSet.isPrototypeOf(target)){return dom}if(!(append in target)){if(append===\"replace\"){target.empty();append=\"append\"}else{impossible(\"Section.render\",\"The target doesn't have a '\"+append+\"' method.\");return $()}}dom=$(source&&$.parseHTML(exec(source),document,true));target[append](dom.length?dom:undefined);this.update();if(transition){transitionIn(append===\"replace\"?target:dom,transition,transitionTime)}return dom}};changeDescriptorShape=Object.keys(ChangeDescriptor);return Object.seal(ChangeDescriptor)});\"use strict\";define(\"internaltypes/twinenotifier\",[\"jquery\",\"utils\"],function($,_ref39){var impossible=_ref39.impossible;var TwineNotifier={create:function create(message){if(!message){impossible(\"TwineNotifier.create\",\"called with only 1 string.\")}return Object.assign(Object.create(TwineNotifier),{message:message})},render:function render(){return $(\"<tw-notifier>\").attr(\"message\",this.message)}};return TwineNotifier});\"use strict\";define(\"section\",[\"jquery\",\"utils\",\"utils/selectors\",\"renderer\",\"twinescript/environ\",\"twinescript/operations\",\"state\",\"utils/operationutils\",\"datatypes/changercommand\",\"datatypes/hookset\",\"datatypes/colour\",\"internaltypes/changedescriptor\",\"internaltypes/varscope\",\"internaltypes/twineerror\",\"internaltypes/twinenotifier\"],function($,Utils,Selectors,Renderer,Environ,Operations,State,_ref40,ChangerCommand,HookSet,Colour,ChangeDescriptor,VarScope,TwineError,TwineNotifier){var printBuiltinValue=_ref40.printBuiltinValue,objectName=_ref40.objectName;var Section=void 0;function applyExpressionToHook(expr,result,nextHook){if(result&&(typeof result===\"undefined\"?\"undefined\":_typeof(result))===\"object\"&&result.changer){var enabled=this.renderInto(nextHook.popAttr(\"source\"),nextHook,result);if(!enabled){var name=Utils.insensitiveName(expr.attr(\"name\"));if([\"if\",\"elseif\",\"unless\",\"else\"].includes(name)){expr.addClass(\"false\");if(name!==\"elseif\"){this.stack[0].lastHookShown=false}}return}}else if(result&&(typeof result===\"undefined\"?\"undefined\":_typeof(result))===\"object\"&&result.live){runLiveHook.call(this,nextHook,result.delay,result.event)}else if(result===false){if(nextHook.attr(\"source\")){nextHook.data(\"hiddenSource\",nextHook.popAttr(\"source\"))}expr.addClass(\"false\");this.stack[0].lastHookShown=false;return}else if(result!==true){expr.replaceWith(TwineError.create(\"datatype\",objectName(result)+\" cannot be attached to this hook.\",\"Only Booleans, changer commands, and the (live:) macro can be attached to hooks.\").render(expr.attr(\"title\")))}this.stack[0].lastHookShown=true}function nextNonWhitespace(e){var _ref41=e instanceof $?e[0]:e,nextSibling=_ref41.nextSibling;if(nextSibling&&(nextSibling instanceof Text&&!nextSibling.textContent.trim()||(nextSibling.tagName||\"\").toLowerCase()===\"br\")){var _nextNonWhitespace=nextNonWhitespace(nextSibling),whitespace=_nextNonWhitespace.whitespace,nextElem=_nextNonWhitespace.nextElem;return{whitespace:$(nextSibling).add(whitespace),nextElem:nextElem}}return{whitespace:$(),nextElem:$(nextSibling)}}function runExpression(expr){var result=this.eval(expr.popAttr(\"js\")||\"\");var whitespace=void 0,nextElem=void 0,nextHook=$();nextElem=expr;while(ChangerCommand.isPrototypeOf(result)){var _nextNonWhitespace2=nextNonWhitespace(nextElem);whitespace=_nextNonWhitespace2.whitespace;nextElem=_nextNonWhitespace2.nextElem;if(nextElem[0]instanceof Text&&nextElem[0].textContent.trim()===\"+\"){var whitespaceAfter=void 0,plusMark=nextElem;var _nextNonWhitespace3=nextNonWhitespace(plusMark);whitespaceAfter=_nextNonWhitespace3.whitespace;nextElem=_nextNonWhitespace3.nextElem;if(nextElem.is(Selectors.expression)){var nextValue=this.eval(nextElem.popAttr(\"js\"));if(TwineError.containsError(nextValue)){result=nextValue;break}var newResult=Operations[\"+\"](result,nextValue);$(whitespace).add(plusMark).add(whitespaceAfter).remove();if(TwineError.containsError(newResult)){result=TwineError.create(\"operation\",\"I can't combine \"+objectName(result)+\" with \"+objectName(nextValue)+\".\")}else{result=newResult}continue}}if(nextElem.is(Selectors.hook)){whitespace.remove();nextHook=nextElem;break}expr.replaceWith(TwineError.create(\"syntax\",\"The (\"+result.macroName+\":) command should be assigned to a variable or attached to a hook.\",\"Macros like this should appear to the left of a hook: \"+expr.attr(\"title\")+\"[Some text]\").render(expr.attr(\"title\")));break}nextHook=nextHook.length?nextHook:nextNonWhitespace(expr).nextElem.filter(Selectors.hook);var error=void 0;if(error=TwineError.containsError(result)){if(error instanceof Error){error=TwineError.fromError(error)}expr.replaceWith(error.render(expr.attr(\"title\"),expr))}else if(TwineNotifier.isPrototypeOf(result)){expr.append(result.render())}else if(!nextHook.length&&(typeof result===\"string\"||typeof result===\"number\"||result instanceof Map||result instanceof Set||Array.isArray(result)||Colour.isPrototypeOf(result))||result&&result.TwineScript_Print&&!result.changer){result=printBuiltinValue(result);if(result.earlyExit){return\"earlyexit\"}else if(result instanceof $){expr.append(result)}else if(TwineError.containsError(result)){if(result instanceof Error){result=TwineError.fromError(result)}expr.replaceWith(result.render(expr.attr(\"title\"),expr))}else{this.renderInto(result,expr)}}else if(nextHook.length){applyExpressionToHook.call(this,expr,result,nextHook)}else if(!(result.changer||typeof result===\"boolean\")){Utils.impossible(\"Section.runExpression\",\"The expression evaluated to an unknown value: \"+result.toSource())}}var supportsNormalize=function(){var result=void 0;return function(){if(result!==undefined){return result}var p=$(\"<p>\");if(!p[0].normalize){return result=false}p.append(document.createTextNode(\"0-\"),document.createTextNode(\"2\"),document.createTextNode(\"\"))[0].normalize();return result=p.contents().length===1}}();function prevParentTextNode(e){var elem=e.first()[0],parent=e.parent();if(!parent.length){return null}var textNodes=parent.textNodes().filter(function(e){var pos=e.compareDocumentPosition(elem);return pos&4&&!(pos&8)});textNodes=textNodes[textNodes.length-1];return!textNodes?prevParentTextNode(parent):textNodes}function nextParentTextNode(e){var elem=e.last()[0],parent=e.parent();if(!parent.length){return null}var textNodes=parent.textNodes().filter(function(e){var pos=e.compareDocumentPosition(elem);return pos&2&&!(pos&8)})[0];return!textNodes?nextParentTextNode(parent):textNodes}function collapse(elem){function noVerbatim(e){return $(this||e).parentsUntil(\"tw-collapsed\").filter(\"tw-verbatim, tw-expression, \"+\"[collapsing=false]\").length===0}var beforeNode=prevParentTextNode(elem);if(!$(beforeNode).parents(\"tw-collapsed\").length){beforeNode=null}var afterNode=nextParentTextNode(elem);if(!$(afterNode).parents(\"tw-collapsed\").length){afterNode=null}elem.findAndFilter(\"br:not([data-raw])\").filter(noVerbatim).replaceWith(document.createTextNode(\" \"));var nodes=elem.textNodes();var finalSpaces=0;nodes.reduce(function(prevNode,node){if(!noVerbatim(node)){return document.createTextNode(\"A\")}node.textContent=node.textContent.replace(/\\s+/g,\" \");if(node.textContent[0]===\" \"&&(!prevNode||!prevNode.textContent||prevNode.textContent.search(/\\s$/)>-1)){node.textContent=node.textContent.slice(1)}return node},beforeNode);[].concat(_toConsumableArray(nodes)).reverse().every(function(node){if(!noVerbatim(node)){return false}if(!node.textContent.match(/^\\s*$/)){node.textContent=node.textContent.replace(/\\s+$/,function(substr){finalSpaces+=substr.length;return\"\"});return false}else{finalSpaces+=node.textContent.length;node.textContent=\"\";return true}});if(finalSpaces>0&&afterNode){nodes[nodes.length-1].textContent+=\" \"}elem[0]&&supportsNormalize()&&elem[0].normalize()}function runLiveHook(target,delay){var _this6=this;var source=target.popAttr(\"source\")||\"\";delay=delay===undefined?20:delay;var recursive=function recursive(){if(!_this6.inDOM()){return}_this6.renderInto(source,target,{append:\"replace\"});if(target.find(Selectors.expression+\"[name='stop']\").length){return}if(!_this6.inDOM()){return}setTimeout(recursive,delay)};setTimeout(recursive,delay)}Section={create:function create(dom){if(!(dom instanceof $&&dom.length===1)){Utils.impossible(\"Section.create\",\"called with no DOM element\")}var ret=Object.assign(Object.create(this),{timestamp:Date.now(),dom:dom||Utils.storyElement,stack:[],enchantments:[]});ret=Environ(ret);return ret},inDOM:function inDOM(){return $(Utils.storyElement).find(this.dom).length>0},evaluateTwineMarkup:function evaluateTwineMarkup(expr){var p=$(\"<p>\");this.renderInto(expr,p);var errors=void 0;if((errors=p.find(\"tw-error\")).length>0){return errors}return p.text()},renderInto:function renderInto(source,target){var _this7=this;var desc=ChangeDescriptor.create({target:target,source:source,section:this});for(var _len6=arguments.length,changers=Array(_len6>2?_len6-2:0),_key6=2;_key6<_len6;_key6++){changers[_key6-2]=arguments[_key6]}changers.forEach(function(changer){if(!changer.changer){Object.assign(desc,changer)}else{changer.run(desc)}});if(this.stack.length>=50){TwineError.create(\"infinite\",\"Printing this expression may have trapped me in an infinite loop.\").render(target.attr(\"title\")).replaceAll(target)}var renderAndExecute=function renderAndExecute(desc,stackObject){var dom=desc.render();_this7.stack.unshift(stackObject);var section=_this7;dom.findAndFilter(Selectors.hook+\",\"+Selectors.expression).each(function doExpressions(){var expr=$(this);switch(expr.tag()){case Selectors.hook:{if(expr.attr(\"hidden\")){expr.removeAttr(\"hidden\");expr.data(\"hiddenSource\",expr.popAttr(\"source\"))}if(expr.attr(\"source\")){section.renderInto(expr.popAttr(\"source\"),expr)}if(expr.find(\"[earlyexit]\").length){return false}break}case Selectors.expression:{if(expr.attr(\"js\")){var result=runExpression.call(section,expr);if(result===\"earlyexit\"){dom.attr(\"earlyexit\",true);return false}return result}}}});if(dom.length&&target instanceof $&&target.is(Selectors.hook)&&target.parents(\"tw-collapsed\").length>0){collapse(dom)}dom.findAndFilter(Selectors.collapsed).each(function(){collapse($(this))});_this7.stack.shift()};var tempVariables=Object.create(this.stack.length?this.stack[0].tempVariables:VarScope);if(Object.keys(desc.loopVars).length){(function(){var loopVars=Object.assign({},desc.loopVars);var i=Math.min.apply(Math,_toConsumableArray(Object.keys(loopVars).map(function(name){return loopVars[name].length})));for(;i>0;i-=1){renderAndExecute(desc,{tempVariables:Object.keys(loopVars).reduce(function(a,name){a[name]=loopVars[name].shift();return a},Object.create(tempVariables))})}})()}else{renderAndExecute(desc,{tempVariables:tempVariables})}if(this.stack.length===0){this.updateEnchantments()}return desc.enabled},updateEnchantments:function updateEnchantments(){this.enchantments.forEach(function(e){e.disenchant();e.enchantScope()})}};return Object.preventExtensions(Section)});\"use strict\";define(\"engine\",[\"jquery\",\"utils\",\"utils/selectors\",\"state\",\"section\",\"passages\"],function($,Utils,Selectors,State,Section,Passages){var escape=Utils.escape,impossible=Utils.impossible,passageSelector=Utils.passageSelector,transitionOut=Utils.transitionOut;var Engine=void 0;var options=Object.create(null);function createPassageElement(){var container=$(\"<tw-passage><tw-sidebar>\"),sidebar=container.children(Selectors.sidebar);if(options.permalink&&State.save){sidebar.append('<tw-icon tabindex=0 class=\"permalink\" title=\"Permanent link to this passage\"><a href=\"#'+State.save()+'\">&sect;')}var back=$('<tw-icon tabindex=0 class=\"undo\" title=\"Undo\">&#8630;</tw-icon>').click(Engine.goBack),fwd=$('<tw-icon tabindex=0 class=\"redo\" title=\"Redo\">&#8631;</tw-icon>').click(Engine.goForward);if(State.pastLength<=0){back.css(\"visibility\",\"hidden\")}if(State.futureLength<=0){fwd.css(\"visibility\",\"hidden\")}sidebar.append(back).append(fwd);return container}function setupPassageElement(tagType,setupPassage){return\"<tw-include type=\"+tagType+\" title='\"+escape(setupPassage.get(\"name\"))+\"'>\"+setupPassage.get(\"source\")+\"</tw-include>\"}function showPassage(name){var displayOptions=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Utils.assertOnlyHas(displayOptions,[\"stretch\",\"transitionIn\",\"transitionOut\"]);var passageData=Passages.get(name),story=Utils.storyElement;var parent=story.parent(),stretch=displayOptions.stretch,transitionOutName=displayOptions.transitionOut,transitionInName=displayOptions.transitionIn;transitionOutName=transitionOutName||\"instant\";if(parent.is(Selectors.enchantment)){var enchantedProperties=parent.data(\"enchantedProperties\");console.log(enchantedProperties);if(enchantedProperties){story.css(enchantedProperties.reduce(function(a,e){return a[e]=\"\",a},{}))}parent=story.unwrap().parent()}if(!passageData||!(passageData instanceof Map)||!passageData.has(\"source\")){impossible(\"Engine.showPassage\",\"There's no passage with the name \\\"\"+name+'\"!')}story.detach();var oldPassages=Utils.$(story.children(passageSelector));if(!stretch&&transitionOutName){transitionOut(oldPassages,transitionOutName);oldPassages.css(\"position\",\"absolute\")}var tags=(passageData.get(\"tags\")||[]).join(\" \");var newPassage=createPassageElement().appendTo(story).attr({tags:tags});story.attr({tags:tags});var section=Section.create(newPassage);var source=passageData.get(\"source\");source=Passages.getTagged(\"header\").map(setupPassageElement.bind(0,\"header\")).join(\"\")+(options.debug?Passages.getTagged(\"debug-header\").map(setupPassageElement.bind(0,\"debug-header\")).join(\"\"):\"\")+source+Passages.getTagged(\"footer\").map(setupPassageElement.bind(0,\"footer\")).join(\"\")+(options.debug?Passages.getTagged(\"debug-footer\").map(setupPassageElement.bind(0,\"debug-footer\")).join(\"\"):\"\");if(State.pastLength<=0){if(options.debug){source=Passages.getTagged(\"debug-startup\").map(setupPassageElement.bind(0,\"debug-startup\")).join(\"\")+source}source=Passages.getTagged(\"startup\").map(setupPassageElement.bind(0,\"startup\")).join(\"\")+source}section.renderInto(source,newPassage,{transition:transitionInName||\"dissolve\"});parent.append(story.parents().length?story.parents().last():story);scroll(0,stretch?newPassage.offset().top-$(window).height()*.05:story.offset().top)}Engine={goBack:function goBack(){if(State.rewind()){showPassage(State.passage)}},goForward:function goForward(){if(State.fastForward()){showPassage(State.passage)}},goToPassage:function goToPassage(id,stretch){State.play(id);showPassage(id,{stretch:stretch})},showPassage:showPassage,options:options};return Object.freeze(Engine)});\"use strict\";define(\"debugmode\",[\"jquery\",\"utils\",\"state\",\"internaltypes/varref\",\"utils/operationutils\",\"engine\"],function($,Utils,State,VarRef,_ref42,Engine){var objectName=_ref42.objectName,typeName=_ref42.typeName;return function(){var debugElement=$(\"<tw-debugger><div class='variables'></div>Turns: <select disabled></select><button class='show-invisibles'>&#9903; Debug View</button></tw-debugger>\");var showInvisibles=debugElement.find(\".show-invisibles\");showInvisibles.click(function(){$(document.documentElement).toggleClass(\"debug-mode\")});var turnsDropdown=debugElement.find(\"select\");turnsDropdown.change(function(_ref43){var value=_ref43.target.value;var travel=value-State.pastLength;if(travel!==0){State[travel<0?\"rewind\":\"fastForward\"](Math.abs(travel));Engine.showPassage(State.passage)}});State.on(\"forward\",function(passageName){var isFastForward=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var i=State.pastLength;if(i>1){turnsDropdown.removeAttr(\"disabled\")}if(!isFastForward){turnsDropdown.children().each(function(index,e){if(index>=i){$(e).remove()}});turnsDropdown.append(\"<option value=\"+i+\">\"+(i+1)+\": \"+passageName+\"</option>\").val(i)}}).on(\"back\",function(){if(State.pastLength<=1){turnsDropdown.attr(\"disabled\")}turnsDropdown.find(\"[selected]\").removeAttr(\"selected\");turnsDropdown.val(State.pastLength)}).on(\"load\",function(timeline){turnsDropdown.empty();turnsDropdown[timeline.length<=1?\"attr\":\"removeAttr\"](\"disabled\");timeline.forEach(function(turn,i){return turnsDropdown.append(\"<option value=\"+i+\">\"+(i+1)+\": \"+turn.passage+\"</option>\")})});var variablesTable=debugElement.find(\".variables\");function update(name,value){var row=variablesTable.children('[data-name=\"'+name+'\"]');var val=objectName(value);if(!row.length){row=$('<div class=\"variable-row\" data-name=\"'+name+'\" data-value=\"'+val+'\"></div>').appendTo(variablesTable)}row.empty().append(\"<span class='variable-name'>\"+name+\"</span><span class='variable-value'>\"+objectName(value)+\"</span>\")}function refresh(){var updated=[];variablesTable.children().each(function(_,e){e=$(e);var name=e.attr(\"data-name\"),value=e.attr(\"data-value\");if(name.startsWith(\"TwineScript\")){return}if(name in State.variables){updated.push(name);if(objectName(State.variables[name])!==value){update(name,State.variables[name])}}else{e.remove()}});for(var name in State.variables){if(!name.startsWith(\"TwineScript\")&&!updated.includes(name)){update(name,State.variables[name])}}}State.on(\"forward\",refresh).on(\"back\",refresh);VarRef.on(\"set\",function(obj,name,value){if(obj===State.variables){update(name,value)}}).on(\"delete\",function(obj,name){if(obj===State.variables){variablesTable.find('[data-name=\"'+name+'\"]').remove()}});$(document.body).append(debugElement)}});\"use strict\";define(\"macrolib/values\",[\"macros\",\"utils\",\"utils/operationutils\",\"datatypes/colour\",\"internaltypes/twineerror\"],function(Macros,_ref44,_ref45,Colour,TwineError){var realWhitespace=_ref44.realWhitespace,anyRealLetter=_ref44.anyRealLetter;var subset=_ref45.subset,objectName=_ref45.objectName;var _Macros$TypeSignature=Macros.TypeSignature,rest=_Macros$TypeSignature.rest,zeroOrMore=_Macros$TypeSignature.zeroOrMore,Any=_Macros$TypeSignature.Any;Macros.add([\"text\",\"string\"],function(_){for(var _len7=arguments.length,args=Array(_len7>1?_len7-1:0),_key7=1;_key7<_len7;_key7++){args[_key7-1]=arguments[_key7]}return args.join(\"\")},[zeroOrMore(Macros.TypeSignature.either(String,Number,Boolean,Array))])(\"substring\",function(_,string,a,b){return subset(string,a,b)},[String,parseInt,parseInt])(\"lowercase\",function(_,string){return string.toLowerCase()},[String])(\"uppercase\",function(_,string){return string.toUpperCase()},[String])(\"lowerfirst\",function(_,string){return string.replace(new RegExp(anyRealLetter+\"+\"),function(word){word=Array.from(word);return word[0].toLowerCase()+word.slice(1).join(\"\").toLowerCase()})},[String])(\"upperfirst\",function(_,string){return string.replace(new RegExp(anyRealLetter+\"+\"),function(word){word=Array.from(word);return word[0].toUpperCase()+word.slice(1).join(\"\").toLowerCase()})},[String])(\"words\",function(_,string){return string.split(new RegExp(realWhitespace+\"+\")).filter(Boolean)},[String])([\"num\",\"number\"],function(_,expr){if(Number.isNaN(+expr)){return TwineError.create(\"macrocall\",\"I couldn't convert \"+objectName(expr)+\" to a number.\")}return+expr},[String])(\"rgb\",function(_){for(var val,i=0;i<(arguments.length<=1?0:arguments.length-1);i+=1){val=arguments.length<=i+1?undefined:arguments[i+1];if(val<0||val>255){return TwineError.create(\"macrocall\",\"RGB values must be whole numbers between 0 and 255, not \"+objectName(val)+\".\")}}return Colour.create({r:arguments.length<=1?undefined:arguments[1],g:arguments.length<=2?undefined:arguments[2],b:arguments.length<=3?undefined:arguments[3]})},[parseInt,parseInt,parseInt])(\"rgba\",function(_){for(var val,i=0;i<3;i+=1){val=arguments.length<=i+1?undefined:arguments[i+1];if(val<0||val>255){return TwineError.create(\"macrocall\",\"RGB values must be whole numbers between 0 and 255, not \"+objectName(val)+\".\")}}if((arguments.length<=4?undefined:arguments[4])<0||(arguments.length<=4?undefined:arguments[4])>1){return TwineError.create(\"macrocall\",\"Alpha values must be numbers between 0 and 1 inclusive, not \"+objectName(arguments.length<=4?undefined:arguments[4])+\".\")}return Colour.create({r:arguments.length<=1?undefined:arguments[1],g:arguments.length<=2?undefined:arguments[2],b:arguments.length<=3?undefined:arguments[3],a:arguments.length<=4?undefined:arguments[4]})},[parseInt,parseInt,parseInt,Number])(\"hsl\",function(_,h,s,l){var errorMsg=\" values must be numbers between 0 and 1 inclusive, not \";if(s<0||s>1){return TwineError.create(\"macrocall\",\"Saturation\"+errorMsg+objectName(s)+\".\")}if(l<0||l>1){return TwineError.create(\"macrocall\",\"Lightness\"+errorMsg+objectName(l)+\".\")}h=Math.round(h)%360;if(h<0){h+=360}return Colour.create({h:h,s:s,l:l})},[Number,Number,Number])(\"hsla\",function(_,h,s,l,a){var errorMsg=\" values must be numbers between 0 and 1 inclusive, not \";if(s<0||s>1){return TwineError.create(\"macrocall\",\"Saturation\"+errorMsg+objectName(s)+\".\")}if(l<0||l>1){return TwineError.create(\"macrocall\",\"Lightness\"+errorMsg+objectName(l)+\".\")}if(a<0||a>1){return TwineError.create(\"macrocall\",\"Alpha\"+errorMsg+objectName(l)+\".\")}h=Math.round(h)%360;if(h<0){h+=360}return Colour.create({h:h,s:s,l:l,a:a})},[Number,Number,Number,Number]);function mathFilter(fn){return function(args){var result=fn.apply(undefined,_toConsumableArray(args));if(typeof result!==\"number\"||isNaN(result)){return TwineError.create(\"macrocall\",\"This mathematical expression doesn't compute!\")}return result}}({weekday:[function(){return[\"Sun\",\"Mon\",\"Tues\",\"Wednes\",\"Thurs\",\"Fri\",\"Satur\"][(new Date).getDay()]+\"day\"},null],monthday:[function(){return(new Date).getDate()},null],currenttime:[function(){var d=new Date,am=d.getHours()<12,hr=d.getHours()%12||12,mins=(d.getMinutes()<10?\"0\":\"\")+d.getMinutes();return hr+\":\"+mins+\" \"+(am?\"A\":\"P\")+\"M\"},null],currentdate:[function(){return(new Date).toDateString()},null],min:[Math.min,rest(Number)],max:[Math.max,rest(Number)],abs:[Math.abs,Number],sign:[Math.sign,Number],sin:[Math.sin,Number],cos:[Math.cos,Number],tan:[Math.tan,Number],floor:[Math.floor,Number],round:[Math.round,Number],ceil:[Math.ceil,Number],pow:[mathFilter(Math.pow),Number,Number],exp:[Math.exp,Number],sqrt:[mathFilter(Math.sqrt),Number],log:[mathFilter(Math.log),Number],log10:[mathFilter(Math.log10),Number],log2:[mathFilter(Math.log2),Number],random:[function(a,b){var from=void 0,to=void 0;if(!b){from=0;to=a}else{from=Math.min(a,b);to=Math.max(a,b)}to+=1;return~~(Math.random()*(to-from))+from},[parseInt,Macros.TypeSignature.optional(parseInt)]],either:[function(){var _ref46;return _ref46=~~(Math.random()*arguments.length),arguments.length<=_ref46?undefined:arguments[_ref46]},rest(Any)],\"\":function _(){var _this8=this;Object.keys(this).forEach(function(key){if(key){var fn=_this8[key][0];var typeSignature=_this8[key][1];Macros.add(key,function(_){for(var _len8=arguments.length,rest=Array(_len8>1?_len8-1:0),_key8=1;_key8<_len8;_key8++){rest[_key8-1]=arguments[_key8]}return fn.apply(undefined,rest)},typeSignature)}})}})[\"\"]()});(function(global){(function(){if(global.requestAnimationFrame){return}if(global.webkitRequestAnimationFrame){global.requestAnimationFrame=global[\"webkitRequestAnimationFrame\"];global.cancelAnimationFrame=global[\"webkitCancelAnimationFrame\"]||global[\"webkitCancelRequestAnimationFrame\"];return}var lastTime=0;global.requestAnimationFrame=function(callback){var currTime=(new Date).getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=global.setTimeout(function(){callback(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id};global.cancelAnimationFrame=function(id){clearTimeout(id)}})();if(typeof define===\"function\"){define(\"requestAnimationFrame\",[],function(){return global.requestAnimationFrame})}})(window);\"use strict\";define(\"macrolib/commands\",[\"requestAnimationFrame\",\"macros\",\"utils\",\"state\",\"passages\",\"engine\",\"internaltypes/twineerror\",\"datatypes/hookset\",\"utils/operationutils\"],function(requestAnimationFrame,Macros,_ref47,State,Passages,Engine,TwineError,HookSet,_ref48){var toJSLiteral=_ref47.toJSLiteral,unescape=_ref47.unescape;var printBuiltinValue=_ref48.printBuiltinValue;var _Macros$TypeSignature2=Macros.TypeSignature,Any=_Macros$TypeSignature2.Any,rest=_Macros$TypeSignature2.rest,optional=_Macros$TypeSignature2.optional;var hasStorage=!!localStorage&&function(){try{localStorage.setItem(\"test\",\"1\");localStorage.removeItem(\"test\");return true}catch(e){return false}}();function storagePrefix(text){return\"(\"+text+\" \"+Engine.options.ifid+\") \"}Macros.add(\"display\",function(_,name){return{TwineScript_ObjectName:\"a (display: \"+toJSLiteral(name)+\") command\",TwineScript_TypeName:\"a (display:) command\",TwineScript_Print:function TwineScript_Print(){if(!Passages.has(name)){return TwineError.create(\"macrocall\",\"I can't (display:) the passage '\"+name+\"' because it doesn't exist.\")}return unescape(Passages.get(name).get(\"source\"))}}},[String])(\"print\",function(_,expr){return{TwineScript_ObjectName:\"a (print:) command\",TwineScript_TypeName:\"a (print:) command\",TwineScript_Print:function TwineScript_Print(){return printBuiltinValue(expr)}}},[Any])(\"show\",function(section){for(var _len9=arguments.length,hooks=Array(_len9>1?_len9-1:0),_key9=1;_key9<_len9;_key9++){hooks[_key9-1]=arguments[_key9]}return{TwineScript_ObjectName:\"a (show:) command\",TwineScript_TypeName:\"a (show:) command\",TwineScript_Print:function TwineScript_Print(){hooks.forEach(function(hook){return hook.forEach(section,function(elem){var hiddenSource=elem.data(\"hiddenSource\");if(hiddenSource===undefined){return TwineError.create(\"operation\",\"I can't reveal a hook which is already visible.\")}section.renderInto(hiddenSource,elem)})});return\"\"}}},[rest(HookSet)])(\"goto\",function(_,name){return{TwineScript_ObjectName:\"a (go-to: \"+toJSLiteral(name)+\") command\",TwineScript_TypeName:\"a (go-to:) command\",TwineScript_Print:function TwineScript_Print(){if(!Passages.has(name)){return TwineError.create(\"macrocall\",\"I can't (go-to:) the passage '\"+name+\"' because it doesn't exist.\")}requestAnimationFrame(function(){return Engine.goToPassage(name)});return{earlyExit:1}}}},[String])(\"goto-transition\",function(_,passageName,transitionName){return{TwineScript_ObjectName:\"a (goto-transition: \"+toJSLiteral(passageName)+\",\"+toJSLiteral(transitionName)+\") command\",TwineScript_TypeName:\"a (goto-transition:) command\",TwineScript_Print:function TwineScript_Print(){if(!Passages.has(passageName)){return TwineError.create(\"macrocall\",\"I can't (goto-transition:) the passage '\"+transitionName+\"' because it doesn't exist.\")}requestAnimationFrame(function(){return Engine.goToPassage(passageName,{transitionIn:transitionName,transitionOut:transitionName})});return{earlyExit:1}}}},[String,String])(\"undo\",function(){return{TwineScript_ObjectName:\"a (undo:) command\",TwineScript_TypeName:\"a (undo:) command\",TwineScript_Print:function TwineScript_Print(){if(State.pastLength<1){return TwineError.create(\"macrocall\",\"I can't (undo:) on the first turn.\")}requestAnimationFrame(function(){return Engine.goBack()});return{earlyExit:1}}}},[])(\"live\",function(_,delay){return{TwineScript_ObjectName:\"a (live: \"+delay+\") command\",TwineScript_TypeName:\"a (live:) command\",live:true,delay:delay}},[optional(Number)])(\"stop\",function(){return{TwineScript_ObjectName:\"a (stop:) command\",TwineScript_TypeName:\"a (stop:) command\",TwineScript_Print:function TwineScript_Print(){return\"\"}}},[])(\"savegame\",function(_,slotName,fileName){fileName=fileName||\"\";if(!hasStorage){return false}var serialisation=State.serialise();if(TwineError.containsError(serialisation)){return serialisation}try{localStorage.setItem(storagePrefix(\"Saved Game\")+slotName,serialisation);localStorage.setItem(storagePrefix(\"Saved Game Filename\")+slotName,fileName);return true}catch(e){return false}},[String,optional(String)])(\"loadgame\",function(_,slotName){return{TwineScript_ObjectName:\"a (load-game:) command\",TwineScript_TypeName:\"a (load-game:) command\",TwineScript_Print:function TwineScript_Print(){var saveData=localStorage.getItem(storagePrefix(\"Saved Game\")+slotName);if(!saveData){return TwineError.create(\"saving\",\"I can't find a save slot named '\"+slotName+\"'!\")}State.deserialise(saveData);requestAnimationFrame(Engine.showPassage.bind(Engine,State.passage,false));return{earlyExit:1}}}},[String])(\"alert\",function(_,text){return{TwineScript_ObjectName:\"an (alert:) command\",TwineScript_TypeName:\"an (alert:) command\",TwineScript_Print:function TwineScript_Print(){window.alert(text);return\"\"}}},[String])(\"prompt\",function(_,text,value){return window.prompt(text,value)||\"\"},[String,String])(\"confirm\",function(_,text){return window.confirm(text)},[String])(\"openURL\",function(_,text){return{TwineScript_ObjectName:\"an (open-url:) command\",TwineScript_TypeName:\"an (open-url:) command\",TwineScript_Print:function TwineScript_Print(){window.open(text,\"\");return\"\"}}},[String])(\"reload\",function(){return{TwineScript_ObjectName:\"a (reload:) command\",TwineScript_TypeName:\"a (reload:) command\",TwineScript_Print:function TwineScript_Print(){if(State.pastLength<1){return TwineError.create(\"infinite\",\"I mustn't (reload:) the page in the starting passage.\")}window.location.reload();return{earlyExit:1}}}},[])(\"gotoURL\",function(_,url){return{TwineScript_ObjectName:\"a (goto-url:) command\",TwineScript_TypeName:\"a (goto-url:) command\",TwineScript_Print:function TwineScript_Print(){window.location.assign(url);return{earlyExit:1}}}},[String])(\"pageURL\",function(){return window.location.href},[])});\"use strict\";define(\"macrolib/datastructures\",[\"jquery\",\"utils/naturalsort\",\"macros\",\"utils/operationutils\",\"state\",\"engine\",\"passages\",\"datatypes/lambda\",\"datatypes/assignmentrequest\",\"internaltypes/twineerror\",\"internaltypes/twinenotifier\"],function($,NaturalSort,Macros,_ref49,State,Engine,Passages,Lambda,AssignmentRequest,TwineError,TwineNotifier){var objectName=_ref49.objectName,typeName=_ref49.typeName,subset=_ref49.subset,collectionType=_ref49.collectionType,isValidDatamapName=_ref49.isValidDatamapName,is=_ref49.is,unique=_ref49.unique,clone=_ref49.clone;var _Macros$TypeSignature3=Macros.TypeSignature,optional=_Macros$TypeSignature3.optional,rest=_Macros$TypeSignature3.rest,either=_Macros$TypeSignature3.either,zeroOrMore=_Macros$TypeSignature3.zeroOrMore,Any=_Macros$TypeSignature3.Any;Macros.add(\"set\",function(_){var debugMessage=\"\";for(var i=0;i<(arguments.length<=1?0:arguments.length-1);i+=1){var ar=arguments.length<=i+1?undefined:arguments[i+1];if(ar.operator===\"into\"){return TwineError.create(\"macrocall\",\"Please say 'to' when using the (set:) macro.\")}var result=void 0;if(ar.src&&ar.src.varref){var get=ar.src.get();var error=void 0;if(error=TwineError.containsError(get)){return error}result=ar.dest.set(get)}else{result=ar.dest.set(ar.src)}if(TwineError.isPrototypeOf(result)){return result}if(Engine.options.debug){debugMessage+=(debugMessage?\"; \":\"\")+objectName(ar.dest)+\" is now \"+objectName(ar.src)}}return{TwineScript_TypeName:\"a (set:) operation\",TwineScript_ObjectName:\"a (set:) operation\",TwineScript_Unstorable:true,TwineScript_Print:function TwineScript_Print(){return debugMessage&&TwineNotifier.create(debugMessage).render()}}},[rest(AssignmentRequest)])(\"put\",function(_){var debugMessage=\"\";for(var i=0;i<(arguments.length<=1?0:arguments.length-1);i+=1){var ar=arguments.length<=i+1?undefined:arguments[i+1];if(ar.operator!==\"into\"){return TwineError.create(\"macrocall\",\"Please say 'into' when using the (put:) macro.\")}var result=ar.dest.set(ar.src);if(TwineError.isPrototypeOf(result)){return result}if(Engine.options.debug){debugMessage+=(debugMessage?\"; \":\"\")+objectName(ar.dest)+\" is now \"+objectName(ar.src)}}return{TwineScript_TypeName:\"a (put:) operation\",TwineScript_ObjectName:\"a (put:) operation\",TwineScript_Unstorable:true,TwineScript_Print:function TwineScript_Print(){return debugMessage&&TwineNotifier.create(debugMessage).render()}}},[rest(AssignmentRequest)])(\"move\",function(_){var debugMessage=\"\";for(var i=0;i<(arguments.length<=1?0:arguments.length-1);i+=1){var ar=arguments.length<=i+1?undefined:arguments[i+1];if(ar.operator!==\"into\"){return TwineError.create(\"macrocall\",\"Please say 'into' when using the (move:) macro.\")}var result=void 0,error=void 0;if(ar.src&&ar.src.varref){var get=ar.src.get();if(error=TwineError.containsError(get)){return error}result=ar.dest.set(get);if(error=TwineError.containsError(result)){return error}ar.src.delete()}else{result=ar.dest.set(ar.src);if(error=TwineError.containsError(result)){return error}}if(Engine.options.debug){debugMessage+=(debugMessage?\"; \":\"\")+objectName(ar.dest)+\" is now \"+objectName(ar.src)}}return{TwineScript_TypeName:\"a (move:) operation\",TwineScript_ObjectName:\"a (move:) operation\",TwineScript_Unstorable:true,TwineScript_Print:function TwineScript_Print(){return debugMessage&&TwineNotifier.create(debugMessage).render()}}},[rest(AssignmentRequest)])([\"a\",\"array\"],function(_){for(var _len10=arguments.length,args=Array(_len10>1?_len10-1:0),_key10=1;_key10<_len10;_key10++){args[_key10-1]=arguments[_key10]}return args},zeroOrMore(Any))(\"range\",function range(_,a,b){if(a>b){return range(_,b,a)}var ret=[a];b-=a;while(b-- >0){ret.push(++a)}return ret},[parseInt,parseInt])(\"subarray\",function(_,array,a,b){return subset(array,a,b)},[Array,parseInt,parseInt])(\"shuffled\",function(_){for(var _len11=arguments.length,args=Array(_len11>1?_len11-1:0),_key11=1;_key11<_len11;_key11++){args[_key11-1]=arguments[_key11]}return args.reduce(function(a,e,ind){var j=Math.random()*(ind+1)|0;if(j===ind){a.push(e)}else{a.push(a[j]);a[j]=e}return a},[]).map(clone)},[Any,rest(Any)])(\"sorted\",function(_){for(var _len12=arguments.length,args=Array(_len12>1?_len12-1:0),_key12=1;_key12<_len12;_key12++){args[_key12-1]=arguments[_key12]}return args.sort(NaturalSort(\"en\"))},[either(Number,String),rest(either(Number,String))])(\"rotated\",function(_,number){for(var _len13=arguments.length,array=Array(_len13>2?_len13-2:0),_key13=2;_key13<_len13;_key13++){array[_key13-2]=arguments[_key13]}number*=-1;if(number===0){return TwineError.create(\"macrocall\",\"I can't rotate these values by 0 positions.\")}else if(Math.abs(number)>=array.length){return TwineError.create(\"macrocall\",\"I can't rotate these \"+array.length+\" values by \"+number+\" positions.\")}return array.slice(number).concat(array.slice(0,number)).map(clone)},[parseInt,Any,rest(Any)])(\"repeated\",function(_,number){for(var _len14=arguments.length,array=Array(_len14>2?_len14-2:0),_key14=2;_key14<_len14;_key14++){array[_key14-2]=arguments[_key14]}if(number<=0){return TwineError.create(\"macrocall\",\"I can't repeat these values \"+number+\" times.\")}var ret=[];while(number-- >0){ret.push.apply(ret,array)}return ret.map(clone)},[parseInt,rest(Any)])(\"interlaced\",function(_){for(var _len15=arguments.length,arrays=Array(_len15>1?_len15-1:0),_key15=1;_key15<_len15;_key15++){arrays[_key15-1]=arguments[_key15]}var len=Math.min.apply(Math,_toConsumableArray(arrays.map(function(arr){return arr.length})));var ret=[];for(var i=0;i<len;i+=1){for(var j=0;j<arrays.length;j+=1){ret.push(clone(arrays[j][i]))}}return ret},[Array,rest(Array)]);Macros.add(\"altered\",function(section,lambda){for(var _len16=arguments.length,args=Array(_len16>2?_len16-2:0),_key16=2;_key16<_len16;_key16++){args[_key16-2]=arguments[_key16]}return args.map(function(loop){return lambda.apply(section,{loop:loop})})},[Lambda.TypeSignature(\"via\"),rest(Any)])(\"find\",function(section,lambda){for(var _len17=arguments.length,args=Array(_len17>2?_len17-2:0),_key17=2;_key17<_len17;_key17++){args[_key17-2]=arguments[_key17]}return lambda.filter(section,args)},[Lambda.TypeSignature(\"where\"),rest(Any)])(\"all-pass\",function(section,lambda){for(var _len18=arguments.length,args=Array(_len18>2?_len18-2:0),_key18=2;_key18<_len18;_key18++){args[_key18-2]=arguments[_key18]}var ret=lambda.filter(section,args);return TwineError.containsError(ret)||ret.length===args.length},[Lambda.TypeSignature(\"where\"),rest(Any)])(\"some-pass\",function(section,lambda){for(var _len19=arguments.length,args=Array(_len19>2?_len19-2:0),_key19=2;_key19<_len19;_key19++){args[_key19-2]=arguments[_key19]}var ret=lambda.filter(section,args);return TwineError.containsError(ret)||ret.length>0},[Lambda.TypeSignature(\"where\"),rest(Any)])(\"none-pass\",function(section,lambda){for(var _len20=arguments.length,args=Array(_len20>2?_len20-2:0),_key20=2;_key20<_len20;_key20++){args[_key20-2]=arguments[_key20]}var ret=lambda.filter(section,args);return TwineError.containsError(ret)||ret.length===0},[Lambda.TypeSignature(\"where\"),rest(Any)])(\"folded\",function(section,lambda){for(var _len21=arguments.length,args=Array(_len21>2?_len21-2:0),_key21=2;_key21<_len21;_key21++){args[_key21-2]=arguments[_key21]}if(\"where\"in lambda){args=lambda.filter(section,args)}return TwineError.containsError(args)||args.reduce(function(making,loop){return lambda.apply(section,{making:making,loop:loop})})},[either(Lambda.TypeSignature(\"where via making\"),Lambda.TypeSignature(\"via making\")),rest(Any)]);Macros.add(\"datanames\",function(_,map){return Array.from(map.keys()).sort(NaturalSort(\"en\"))},[Map])(\"datavalues\",function(_,map){return Array.from(map.entries()).sort(function(a,b){return[a[0],b[0]].sort(NaturalSort(\"en\"))[0]===a[0]?-1:1}).map(function(e){return clone(e[1])})},[Map])(\"dataentries\",function(_,map){return Array.from(map.entries()).sort(function(a,b){return[a[0],b[0]].sort(NaturalSort(\"en\"))[0]===a[0]?-1:1}).map(function(e){return new Map([[\"name\",e[0]],[\"value\",clone(e[1])]])})},[Map])(\"history\",function(){return State.pastPassageNames()},[])(\"passage\",function(_,passageName){return clone(Passages.get(passageName||State.passage))||TwineError.create(\"macrocall\",\"There's no passage named '\"+passageName+\"' in this story.\")},[optional(String)])(\"savedgames\",function(){function storagePrefix(text){return\"(\"+text+\" \"+Engine.options.ifid+\") \"}var i=0,key=void 0;var savesMap=new Map;do{key=localStorage.key(i);i+=1;var prefix=storagePrefix(\"Saved Game\");if(key&&key.startsWith(prefix)){key=key.slice(prefix.length);savesMap.set(key,localStorage.getItem(storagePrefix(\"Saved Game Filename\")+key))}}while(key);return savesMap},[])([\"datamap\",\"dm\"],function(_){for(var _len22=arguments.length,args=Array(_len22>1?_len22-1:0),_key22=1;_key22<_len22;_key22++){args[_key22-1]=arguments[_key22]}var key=void 0;var map=new Map;var status=args.reduce(function(status,element){var error=void 0;if(TwineError.containsError(status)){return status}if(key===undefined){key=element}else if(error=TwineError.containsError(isValidDatamapName(map,key))){return error}else if(map.has(key)){return TwineError.create(\"macrocall\",\"You used the same data name (\"+objectName(key)+\") twice in the same (datamap:) call.\")}else{map.set(key,clone(element));key=undefined}return status},true);if(TwineError.containsError(status)){return status}if(key!==undefined){return TwineError.create(\"macrocall\",\"This datamap has a data name without a value.\")}return map},zeroOrMore(Any))([\"dataset\",\"ds\"],function(_){for(var _len23=arguments.length,args=Array(_len23>1?_len23-1:0),_key23=1;_key23<_len23;_key23++){args[_key23-1]=arguments[_key23]}return new Set(args.filter(unique).map(clone))},zeroOrMore(Any))(\"count\",function count(_,collection){for(var _len24=arguments.length,values=Array(_len24>2?_len24-2:0),_key24=2;_key24<_len24;_key24++){values[_key24-2]=arguments[_key24]}if(values.length>1){var error=void 0;var recur=values.map(function(value){return count(_,collection,value)});if(error=TwineError.containsError(recur)){return error}return recur.reduce(function(a,e){return a+e},0)}var value=values[0];switch(collectionType(collection)){case\"dataset\":case\"datamap\":{return TwineError.create(\"macrocall\",\"(count:) shouldn't be given a datamap or dataset.\",\"You should use the 'contains' operator instead. For instance, write: $variable contains 'value'.\")}case\"string\":{if(typeof value!==\"string\"){return TwineError.create(\"macrocall\",objectName(collection)+\" can't contain \"+objectName(value)+\" because it isn't a string.\")}return!value?0:collection.split(value).length-1}case\"array\":{return collection.reduce(function(count,e){return count+is(e,value)},0)}default:{return TwineError.create(\"macrocall\",objectName(collection)+\" can't contain values, let alone \"+objectName(value)+\".\")}}},[Any,rest(Any)])});\"use strict\";define(\"macrolib/stylechangers\",[\"jquery\",\"macros\",\"utils\",\"utils/selectors\",\"datatypes/colour\",\"datatypes/changercommand\",\"datatypes/lambda\",\"internaltypes/changedescriptor\",\"internaltypes/twineerror\"],function($,Macros,Utils,Selectors,Colour,ChangerCommand,Lambda,ChangeDescriptor,TwineError){var _Macros$TypeSignature4=Macros.TypeSignature,either=_Macros$TypeSignature4.either,wrapped=_Macros$TypeSignature4.wrapped,rest=_Macros$TypeSignature4.rest,Any=_Macros$TypeSignature4.Any,IfTypeSignature=[wrapped(Boolean,\"If you gave a number, you may instead want to check that the number is not 0. \"+'If you gave a string, you may instead want to check that the string is not \"\".')];$(function(){return $(Utils.storyElement).on(\"mouseenter.hover-macro\",\"[hover=false]\",function(){var elem=$(this),changer=elem.data(\"hoverChanger\");elem.data({mouseoutStyle:elem.attr(\"style\")||\"\"});ChangeDescriptor.create({target:elem},changer).update();elem.attr(\"hover\",true)}).on(\"mouseleave.hover-macro\",\"[hover=true]\",function(){var elem=$(this),mouseoutStyle=elem.data(\"mouseoutStyle\");elem.attr(\"style\",mouseoutStyle).removeData(\"mouseoutStyle\").attr(\"hover\",false)})});var validT8ns=[\"dissolve\",\"shudder\",\"pulse\"];Macros.addChanger(\"if\",function(_,expr){return ChangerCommand.create(\"if\",[expr])},function(d,expr){return d.enabled=d.enabled&&expr},IfTypeSignature)(\"unless\",function(_,expr){return ChangerCommand.create(\"unless\",[!expr])},function(d,expr){return d.enabled=d.enabled&&expr},IfTypeSignature)(\"elseif\",function(section,expr){if(!(\"lastHookShown\"in section.stack[0])){return TwineError.create(\"macrocall\",\"There's no (if:) or something else before this to do (else-if:) with.\")}return ChangerCommand.create(\"elseif\",[section.stack[0].lastHookShown===false&&!!expr])},function(d,expr){return d.enabled=d.enabled&&expr},IfTypeSignature)(\"else\",function(section){if(!(\"lastHookShown\"in section.stack[0])){return TwineError.create(\"macrocall\",\"There's nothing before this to do (else:) with.\")}return ChangerCommand.create(\"else\",[section.stack[0].lastHookShown===false])},function(d,expr){return d.enabled=d.enabled&&expr},null)(\"hidden\",function(){return ChangerCommand.create(\"hidden\")},function(d){return d.enabled=false},null)(\"hook\",function(_,name){return ChangerCommand.create(\"hook\",[name])},function(d,name){return d.attr.push({name:name})},[String])([\"for\",\"loop\"],function(_,lambda){for(var _len25=arguments.length,args=Array(_len25>2?_len25-2:0),_key25=2;_key25<_len25;_key25++){args[_key25-2]=arguments[_key25]}if(!lambda.loop){return TwineError.create(\"macrocall\",\"The lambda provided to (for:) must refer to a temp variable, not just 'it'.\")}return ChangerCommand.create(\"for\",[lambda,args])},function(d,lambda,args){return d.loopVars[lambda.loop]=lambda.filter(d.section,args)},[Lambda.TypeSignature(\"where\"),rest(Any)])([\"transition\",\"t8n\"],function(_,name){name=Utils.insensitiveName(name);if(validT8ns.indexOf(name)===-1){return TwineError.create(\"macrocall\",\"'\"+name+\"' is not a valid (transition:)\",\"Only the following names are recognised (capitalisation and hyphens ignored): \"+validT8ns.join(\", \"))}return ChangerCommand.create(\"transition\",[name])},function(d,name){d.transition=name;return d},[String])([\"transition-time\",\"t8n-time\"],function(_,time){if(time<=0){return TwineError.create(\"macrocall\",\"(transition-time:) should be a positive number of (milli)seconds, not \"+time)}return ChangerCommand.create(\"transition-time\",[time])},function(d,time){d.transitionTime=time;return d},[Number])(\"font\",function(_,family){return ChangerCommand.create(\"font\",[family])},function(d,family){d.styles.push({\"font-family\":family});return d},[String])(\"align\",function(_,arrow){var style=void 0,centerIndex=arrow.indexOf(\"><\");if(!/^(==+>|<=+|=+><=+|<==+>)$/.test(arrow)){return TwineError.create(\"macrocall\",\"The (align:) macro requires an alignment arrow \"+'(\"==>\", \"<==\", \"==><=\" etc.) be provided, not \"'+arrow+'\"')}if(~centerIndex){var alignPercent=Math.round(centerIndex/(arrow.length-2)*50);style=Object.assign({\"text-align\":\"center\",\"max-width\":\"50%\"},alignPercent===25?{\"margin-left\":\"auto\",\"margin-right\":\"auto\"}:{\"margin-left\":alignPercent+\"%\"})}else if(arrow[0]===\"<\"&&arrow.slice(-1)===\">\"){style={\"text-align\":\"justify\",\"max-width\":\"50%\"}}else if(arrow.includes(\">\")){style={\"text-align\":\"right\"}}else{style={\"text-align\":\"left\"}}style.display=\"block\";return ChangerCommand.create(\"align\",[style])},function(d,style){d.styles.push(style)},[String])([\"text-colour\",\"text-color\",\"color\",\"colour\"],function(_,CSScolour){if(Colour.isPrototypeOf(CSScolour)){CSScolour=CSScolour.toRGBAString(CSScolour)}return ChangerCommand.create(\"text-colour\",[CSScolour])},function(d,CSScolour){d.styles.push({color:CSScolour});return d},[either(String,Colour)])(\"text-rotate\",function(_,rotation){return ChangerCommand.create(\"text-rotate\",[rotation])},function(d,rotation){d.styles.push({display:\"inline-block\",transform:function transform(){var currentTransform=$(this).css(\"transform\")||\"\";if(currentTransform===\"none\"){currentTransform=\"\"}return currentTransform+\" rotate(\"+rotation+\"deg)\"}});return d},[Number])(\"background\",function(_,value){if(Colour.isPrototypeOf(value)){value=value.toRGBAString(value)}return ChangerCommand.create(\"background\",[value])},function(d,value){var property=void 0;if(Colour.isHexString(value)||Colour.isCSS3Function(value)){property={\"background-color\":value}}else{property={\"background-size\":\"cover\",\"background-image\":\"url(\"+value+\")\"}}d.styles.push(property,{display:function display(){return Utils.childrenProbablyInline($(this))?\"initial\":\"block\"}});return d},[either(String,Colour)]).apply(undefined,_toConsumableArray(function(){var colourTransparent={color:\"transparent\"},styleTagNames=Object.assign(Object.create(null),{none:{},bold:{\"font-weight\":\"bold\"},italic:{\"font-style\":\"italic\"},underline:{\"text-decoration\":\"underline\"},strike:{\"text-decoration\":\"line-through\"},superscript:{\"vertical-align\":\"super\",\"font-size\":\".83em\"},subscript:{\"vertical-align\":\"sub\",\"font-size\":\".83em\"},blink:{animation:\"fade-in-out 1s steps(1,end) infinite alternate\"},shudder:{animation:\"shudder linear 0.1s 0s infinite\",display:\"inline-block\"},mark:{\"background-color\":\"hsla(60, 100%, 50%, 0.6)\"},condense:{\"letter-spacing\":\"-0.08em\"},expand:{\"letter-spacing\":\"0.1em\"},outline:[{\"text-shadow\":function textShadow(){var colour=$(this).css(\"color\");return\"-1px -1px 0 \"+colour+\", 1px -1px 0 \"+colour+\",-1px 1px 0 \"+colour+\", 1px 1px 0 \"+colour}},{color:function color(){for(var elem=$(this);elem.length&&elem[0]!==document;elem=elem.parent()){var colour=elem.css(\"background-color\");if(colour!==\"transparent\"&&!colour.match(/^\\w+a\\(.+?,\\s*0\\s*\\)$/)){return colour}}return\"#fff\"}}],shadow:{\"text-shadow\":function textShadow(){return\"0.08em 0.08em 0.08em \"+$(this).css(\"color\")}},emboss:{\"text-shadow\":function textShadow(){return\"0.08em 0.08em 0em \"+$(this).css(\"color\")}},smear:[{\"text-shadow\":function textShadow(){var colour=$(this).css(\"color\");return\"0em 0em 0.02em \"+colour+\",\"+\"-0.2em 0em 0.5em \"+colour+\",\"+\" 0.2em 0em 0.5em \"+colour}},colourTransparent],blur:[{\"text-shadow\":function textShadow(){return\"0em 0em 0.08em \"+$(this).css(\"color\")}},colourTransparent],blurrier:[{\"text-shadow\":function textShadow(){return\"0em 0em 0.2em \"+$(this).css(\"color\")},\"user-select\":\"none\"},colourTransparent],mirror:{display:\"inline-block\",transform:\"scaleX(-1)\"},upsidedown:{display:\"inline-block\",transform:\"scaleY(-1)\"},fadeinout:{animation:\"fade-in-out 2s ease-in-out infinite alternate\"},rumble:{animation:\"rumble linear 0.1s 0s infinite\",display:\"inline-block\"}});return[\"text-style\",function(_,styleName){styleName=Utils.insensitiveName(styleName);if(!(styleName in styleTagNames)){return TwineError.create(\"macrocall\",\"'\"+styleName+\"' is not a valid (text-style:)\",\"Only the following names are recognised (capitalisation and hyphens ignored): \"+Object.keys(styleTagNames).join(\", \"))}return ChangerCommand.create(\"text-style\",[styleName])},function(d,styleName){Utils.assertMustHave(styleTagNames,[styleName]);if(styleName===\"none\"){d.styles=[]}else{d.styles=d.styles.concat(styleTagNames[styleName])}return d}]}()).concat([[String]]))(\"hover-style\",function(_,changer){var desc=ChangeDescriptor.create(),test=(changer.run(desc),desc.summary());if(test+\"\"!==\"styles\"){if(!(test.every(function(e){return e===\"styles\"||e===\"attr\"})&&desc.attr.every(function(elem){return Object.keys(elem)+\"\"===\"style\"}))){return TwineError.create(\"macrocall\",\"The changer given to (hover-style:) must only change the hook's style.\")}}return ChangerCommand.create(\"hover-style\",[changer])},function(d,changer){d.data.hoverChanger=changer;d.attr.push({hover:false});return d},[ChangerCommand])(\"css\",function(_,text){if(!text.trim().endsWith(\";\")){text+=\";\"}return ChangerCommand.create(\"css\",[text])},function(d,text){d.attr.push({style:function style(){return($(this).attr(\"style\")||\"\")+text}});return d},[String])});\"use strict\";define(\"internaltypes/enchantment\",[\"jquery\",\"utils\",\"internaltypes/changedescriptor\"],function($,Utils,ChangeDescriptor){var Enchantment={create:function create(descriptor){Utils.assertOnlyHas(descriptor,[\"scope\",\"section\",\"attr\",\"data\",\"changer\",\"functions\"]);return Object.assign(Object.create(this),{enchantments:$()},descriptor)},enchantScope:function enchantScope(){var _this9=this;var attr=this.attr,data=this.data,functions=this.functions,section=this.section,changer=this.changer;var scope=this.scope;if(scope instanceof $){scope=Array.prototype.map.call(scope,function(e){return $(e)})}this.enchantments=$();scope.forEach(section,function(e){var wrapping=e.wrapAll(\"<tw-enchantment>\").parent();if(attr){wrapping.attr(attr)}if(data){wrapping.data(data)}if(functions){functions.forEach(function(fn){return fn(wrapping)})}if(changer){var cd=ChangeDescriptor.create({target:wrapping});changer.run(cd);cd.update();if(e.is(Utils.storyElement)){var enchantedProperties=Object.keys(Object.assign.apply(Object,[{}].concat(_toConsumableArray(cd.styles))));e.css(enchantedProperties.reduce(function(a,e){a[e]=\"inherit\";return a},{}));wrapping.data({enchantedProperties:enchantedProperties})}}if(e.is(Utils.storyElement)){wrapping.css({width:\"100%\",height:\"100%\"})}_this9.enchantments=_this9.enchantments.add(wrapping)})},disenchant:function disenchant(){this.enchantments.each(function(){var c=$(this).contents();c.unwrap();var enchantedProperties=$(this).data(\"enchantedProperties\");if(enchantedProperties&&c.has(Utils.storyElement)){Utils.storyElement.css(enchantedProperties.reduce(function(a,e){return a[e]=\"\",a},{}))}})}};return Object.freeze(Enchantment)});\"use strict\";define(\"macrolib/enchantments\",[\"jquery\",\"utils\",\"utils/selectors\",\"utils/operationutils\",\"macros\",\"datatypes/hookset\",\"datatypes/changercommand\",\"internaltypes/enchantment\",\"internaltypes/twineerror\"],function($,Utils,Selectors,_ref50,Macros,HookSet,ChangerCommand,Enchantment,TwineError){var is=_ref50.is;var _Macros$TypeSignature5=Macros.TypeSignature,either=_Macros$TypeSignature5.either,rest=_Macros$TypeSignature5.rest;Macros.add(\"enchant\",function(section,scope,changer){return{TwineScript_ObjectName:\"an (enchant:) command\",TwineScript_TypeName:\"an (enchant:) command\",TwineScript_Print:function TwineScript_Print(){var enchantment=Enchantment.create({scope:HookSet.from(scope),changer:changer,section:section});section.enchantments.push(enchantment);enchantment.enchantScope();return\"\"}}},[either(HookSet,String),ChangerCommand]);var revisionTypes=[\"replace\",\"append\",\"prepend\"];revisionTypes.forEach(function(e){Macros.addChanger(e,function(_){for(var _len26=arguments.length,scopes=Array(_len26>1?_len26-1:0),_key26=1;_key26<_len26;_key26++){scopes[_key26-1]=arguments[_key26]}if(!scopes.every(Boolean)){return TwineError.create(\"datatype\",\"A string given to this (\"+e+\":) macro was empty.\")}return ChangerCommand.create(e,scopes.map(HookSet.from))},function(desc){var _desc$newTargets;for(var _len27=arguments.length,scopes=Array(_len27>1?_len27-1:0),_key27=1;_key27<_len27;_key27++){scopes[_key27-1]=arguments[_key27]}var collapsing=$(desc.target).parents().filter(\"tw-collapsed\").length>0;if(!collapsing){desc.attr=[].concat(_toConsumableArray(desc.attr),[{collapsing:false}])}desc.newTargets=desc.newTargets||[];(_desc$newTargets=desc.newTargets).push.apply(_desc$newTargets,_toConsumableArray(scopes.filter(function(target1){return!desc.newTargets.some(function(_ref51){var target2=_ref51.target,append=_ref51.append;return is(target1,target2)&&e===append})}).map(function(target){return{target:target,append:e}})));return desc},rest(either(HookSet,String)))});function newEnchantmentMacroFns(enchantDesc,name){$(function(){Utils.storyElement.on(enchantDesc.event+\".enchantment\",\".\"+enchantDesc.classList.replace(/ /g,\".\"),function generalEnchantmentEvent(){var enchantment=$(this),event=enchantment.data(\"enchantmentEvent\");if(event){event(enchantment)}})});return[function(_){for(var _len28=arguments.length,selectors=Array(_len28>1?_len28-1:0),_key28=1;_key28<_len28;_key28++){selectors[_key28-1]=arguments[_key28]}if(!selectors.every(Boolean)){return TwineError.create(\"datatype\",\"A string given to this (\"+name+\":) macro was empty.\")}return ChangerCommand.create(name,selectors.map(HookSet.from))},function makeEnchanter(desc,selector){desc.enabled=false;if(enchantDesc.rerender){desc.newTargets=(desc.newTargets||[]).concat({target:selector,append:enchantDesc.rerender})}var enchantData=Enchantment.create({functions:[function(target){target.attr(\"class\",target.children().is(\"tw-story, tw-sidebar, tw-passage\")?enchantDesc.blockClassList:enchantDesc.classList)}],attr:(enchantDesc.classList+\"\").match(/\\b(?:link|enchantment-clickblock)\\b/)?{tabIndex:\"0\"}:{},data:{enchantmentEvent:function enchantmentEvent(){if(enchantDesc.once){var index=desc.section.enchantments.indexOf(enchantData);desc.section.enchantments.splice(index,1);enchantData.disenchant()}desc.section.renderInto(desc.source,null,Object.assign({},desc,{enabled:true}))}},scope:selector,section:desc.section});desc.section.enchantments.push(enchantData);enchantData.enchantScope();return desc},either(HookSet,String)]}$(function(){Utils.storyElement.on(\"click.enchantment\",function(){Array.from($(this).parents(\".enchantment-clickblock\")).sort(function(left,right){return left.compareDocumentPosition(right)&8?1:-1}).forEach(function(e){var event=$(e).data(\"enchantmentEvent\");if(event){event()}})})});var interactionTypes=[{name:\"click\",enchantDesc:{event:\"click\",once:true,rerender:\"\",classList:\"link enchantment-link\",blockClassList:\"enchantment-clickblock\"}},{name:\"mouseover\",enchantDesc:{event:\"mouseenter\",once:true,rerender:\"\",classList:\"enchantment-mouseover\"}},{name:\"mouseout\",enchantDesc:{event:\"mouseleave\",once:true,rerender:\"\",classList:\"enchantment-mouseout\"}}];interactionTypes.forEach(function(e){return Macros.addChanger.apply(Macros,[e.name].concat(_toConsumableArray(newEnchantmentMacroFns(e.enchantDesc,e.name))))});revisionTypes.forEach(function(revisionType){interactionTypes.forEach(function(interactionType){var enchantDesc=Object.assign({},interactionType.enchantDesc,{rerender:revisionType}),name=interactionType.name+\"-\"+revisionType;Macros.addChanger.apply(Macros,[name].concat(_toConsumableArray(newEnchantmentMacroFns(enchantDesc,name))))})})});\"use strict\";define(\"macrolib/links\",[\"jquery\",\"macros\",\"utils\",\"utils/selectors\",\"state\",\"passages\",\"engine\",\"datatypes/changercommand\",\"internaltypes/twineerror\"],function($,Macros,Utils,Selectors,State,Passages,Engine,ChangerCommand,TwineError){var optional=Macros.TypeSignature.optional;var emptyLinkTextError=\"Links can't have empty strings for their displayed text.\";$(function(){return $(Utils.storyElement).on(\"click.passage-link\",Selectors.internalLink,function clickLinkEvent(){var link=$(this),event=link.parent().data(\"clickEvent\");if(event){event(link);return}var next=link.attr(\"passage-name\");if(next){Engine.goToPassage(next,false);return}if(link.is(\"[undo]\")){Engine.goBack();return}})});[[\"link\",\"link-replace\"],[\"link-reveal\"],[\"link-repeat\"]].forEach(function(arr){return Macros.addChanger(arr,function(_,expr){if(!expr){return TwineError.create(\"macrocall\",emptyLinkTextError)}return ChangerCommand.create(arr[0],[expr])},function(desc,text){if(!desc.innerSource){desc.innerSource=desc.source}desc.source=\"<tw-link tabindex=0>\"+text+\"</tw-link>\";desc.append=arr[0]===\"link\"?\"replace\":\"append\";desc.data.clickEvent=function(link){desc.source=desc.innerSource;desc.section.renderInto(desc.innerSource+\"\",null,desc);if(arr[0]===\"link-reveal\"){link.contents().unwrap()}}},[String])});Macros.add([\"link-goto\"],function(section,text,passage){if(!text){return TwineError.create(\"macrocall\",emptyLinkTextError)}return{TwineScript_TypeName:\"a (link-goto: \"+Utils.toJSLiteral(text)+\", \"+Utils.toJSLiteral(passage)+\") command\",TwineScript_ObjectName:\"a (link-goto:) command\",TwineScript_Print:function TwineScript_Print(){var passageName=section.evaluateTwineMarkup(Utils.unescape(passage||text));if(passageName instanceof $){return passageName}if(!Passages.has(passageName)){return'<tw-broken-link passage-name=\"'+Utils.escape(passageName)+'\">'+(text||passage)+\"</tw-broken-link>\"}var visited=State.passageNameVisited(passageName);return\"<tw-link tabindex=0 \"+(visited>0?'class=\"visited\" ':\"\")+'passage-name=\"'+Utils.escape(passageName)+'\">'+(text||passage)+\"</tw-link>\"}}},[String,optional(String)])(\"link-undo\",function(section,text){if(!text){return TwineError.create(\"macrocall\",emptyLinkTextError)}return{TwineScript_ObjectName:\"a (link-undo:\"+Utils.toJSLiteral(text)+\") command\",TwineScript_TypeName:\"a (link-undo:) command\",TwineScript_Print:function TwineScript_Print(){if(State.pastLength<1){return TwineError.create(\"macrocall\",\"I can't use (link-undo:) on the first turn.\")}return\"<tw-link tabindex=0 undo>\"+text+\"</tw-link>\"}}},[String])});\"use strict\";define(\"repl\",[\"utils\",\"markup\",\"twinescript/compiler\",\"twinescript/environ\"],function(Utils,TwineMarkup,Compiler,Environ){window.REPL=function(a){var r=Compiler(TwineMarkup.lex(\"(print:\"+a+\")\"));console.log(r);var result=Environ({}).eval(r);return result.TwineScript_Print?result.TwineScript_Print():result};window.LEX=function(a){var r=TwineMarkup.lex(a);return r.length===1?r[0]:r}});\"use strict\";require.config({paths:{jquery:\"../node_modules/jquery/dist/jquery\",almond:\"../node_modules/almond/almond\",\"es6-shim\":\"../node_modules/es6-shim/es6-shim\",requestAnimationFrame:\"../node_modules/requestanimationframe/app/requestAnimationFrame\",jqueryplugins:\"utils/jqueryplugins\",markup:\"./markup/markup\",lexer:\"./markup/lexer\",patterns:\"./markup/patterns\"},deps:[\"jquery\",\"es6-shim\",\"jqueryplugins\"]});require([\"jquery\",\"debugmode\",\"renderer\",\"state\",\"engine\",\"passages\",\"utils/selectors\",\"macros\",\"macrolib/values\",\"macrolib/commands\",\"macrolib/datastructures\",\"macrolib/stylechangers\",\"macrolib/enchantments\",\"macrolib/links\",\"repl\"],function($,DebugMode,Renderer,State,Engine,Passages,Selectors){function _eval(text){return eval(text+\"\")}var _installHandlers=function installHandlers(){var html=$(document.documentElement);html.on(\"keydown\",function(event){if(event.which===13&&event.target.getAttribute(\"tabindex\")===\"0\"){$(event.target).trigger(\"click\")}});if(Engine.options.debug){DebugMode()}_installHandlers=null};(function(oldOnError){window.onerror=function(message,_,__,___,error){var stack=error&&error.stack&&\"\\n\"+error.stack.replace(/\\([^\\)]+\\)/g,\"\")+\"\\n\"||\"(\"+message+\")\\n\";alert(\"Sorry to interrupt, but this page's code has got itself in a mess. \"+stack+\"(This is probably due to a bug in the Harlowe game engine.)\");window.onerror=oldOnError;if(typeof oldOnError===\"function\"){oldOnError.apply(undefined,arguments)}}})(window.onerror);$(function(){var header=$(Selectors.storyData);if(header.length===0){return}var options=header.attr(\"options\");if(options){options.split(/\\s/).forEach(function(b){Renderer.options[b]=Engine.options[b]=true})}var startPassage=header.attr(\"startnode\");Renderer.options.ifid=Engine.options.ifid=header.attr(\"ifid\");if(!startPassage){startPassage=[].reduce.call($(Selectors.passageData),function(id,el){var pid=el.getAttribute(\"pid\");return pid<id?pid:id},Infinity)}startPassage=$(Selectors.passageData+\"[pid=\"+startPassage+\"]\").attr(\"name\");_installHandlers();$(Selectors.script).each(function(i){try{_eval($(this).html())}catch(e){alert(\"There is a problem with this story's script (#\"+(i+1)+\"):\\n\\n\"+e.message)}});$(Selectors.stylesheet).each(function(i){$(document.head).append('<style data-title=\"Story stylesheet '+(i+1)+'\">'+$(this).html())});if(window.location.hash&&!window.location.hash.includes(\"stories\")){if(State.load(window.location.hash)){Engine.showPassage(State.passage);return}}Engine.goToPassage(startPassage)})});define(\"harlowe\",function(){});require([\"harlowe\"])})();\n</script>\n\n\n</body>\n</html>\n","setup": function(){}});
Add Comment
Please, Sign In to add comment