From 4e69b29917c37575eb224aa1028bbab69b96f60c Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Mon, 6 Oct 2014 14:34:53 +0200 Subject: [PATCH] Remark 0.5.6 for https://github.com/gnab/remark/issues/50 --- remarkable/templates/remark/index.html | 2 +- remarkable/templates/remark/js/remark-0.5.6.min.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 remarkable/templates/remark/js/remark-0.5.6.min.js diff --git a/remarkable/templates/remark/index.html b/remarkable/templates/remark/index.html index 3f68bc0..817c5af 100644 --- a/remarkable/templates/remark/index.html +++ b/remarkable/templates/remark/index.html @@ -121,7 +121,7 @@ - + diff --git a/remarkable/templates/remark/js/remark-0.5.6.min.js b/remarkable/templates/remark/js/remark-0.5.6.min.js new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/remarkable/templates/remark/js/remark-0.5.6.min.js @@ -0,0 +1,5 @@ +!function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s/gm,">")}function findCode(pre){for(var node=pre.firstChild;node;node=node.nextSibling){if(node.nodeName=="CODE")return node;if(!(node.nodeType==3&&node.nodeValue.match(/\s+/)))break}}function blockText(block,ignoreNewLines){return Array.prototype.map.call(block.childNodes,function(node){if(node.nodeType==3){return ignoreNewLines?node.nodeValue.replace(/\n/g,""):node.nodeValue}if(node.nodeName=="BR"){return"\n"}return blockText(node,ignoreNewLines)}).join("")}function blockLanguage(block){var classes=(block.className+" "+(block.parentNode?block.parentNode.className:"")).split(/\s+/);classes=classes.map(function(c){return c.replace(/^language-/,"")});for(var i=0;i"}while(stream1.length||stream2.length){var current=selectStream().splice(0,1)[0];result+=escape(value.substr(processed,current.offset-processed));processed=current.offset;if(current.event=="start"){result+=open(current.node);nodeStack.push(current.node)}else if(current.event=="stop"){var node,i=nodeStack.length;do{i--;node=nodeStack[i];result+=""}while(node!=current.node);nodeStack.splice(i,1);while(i'+match[0]+""}else{result+=match[0]}last_index=top.lexemsRe.lastIndex;match=top.lexemsRe.exec(buffer)}return result+buffer.substr(last_index)}function processSubLanguage(){if(top.subLanguage&&!languages[top.subLanguage]){return escape(mode_buffer)}var result=top.subLanguage?highlight(top.subLanguage,mode_buffer):highlightAuto(mode_buffer);if(top.relevance>0){keyword_count+=result.keyword_count;relevance+=result.relevance}return''+result.value+""}function processBuffer(){return top.subLanguage!==undefined?processSubLanguage():processKeywords()}function startNewMode(mode,lexem){var markup=mode.className?'':"";if(mode.returnBegin){result+=markup;mode_buffer=""}else if(mode.excludeBegin){result+=escape(lexem)+markup;mode_buffer=""}else{result+=markup;mode_buffer=lexem}top=Object.create(mode,{parent:{value:top}})}function processLexem(buffer,lexem){mode_buffer+=buffer;if(lexem===undefined){result+=processBuffer();return 0}var new_mode=subMode(lexem,top);if(new_mode){result+=processBuffer();startNewMode(new_mode,lexem);return new_mode.returnBegin?0:lexem.length}var end_mode=endOfMode(top,lexem);if(end_mode){var origin=top;if(!(origin.returnEnd||origin.excludeEnd)){mode_buffer+=lexem}result+=processBuffer();do{if(top.className){result+=""}relevance+=top.relevance;top=top.parent}while(top!=end_mode.parent);if(origin.excludeEnd){result+=escape(lexem)}mode_buffer="";if(end_mode.starts){startNewMode(end_mode.starts,"")}return origin.returnEnd?0:lexem.length}if(isIllegal(lexem,top))throw new Error('Illegal lexem "'+lexem+'" for mode "'+(top.className||"")+'"');mode_buffer+=lexem;return lexem.length||1}var language=languages[language_name];compileLanguage(language);var top=language;var mode_buffer="";var relevance=0;var keyword_count=0;var result="";try{var match,count,index=0;while(true){top.terminators.lastIndex=index;match=top.terminators.exec(value);if(!match)break;count=processLexem(value.substr(index,match.index-index),match[0]);index=match.index+count}processLexem(value.substr(index));return{relevance:relevance,keyword_count:keyword_count,value:result,language:language_name}}catch(e){if(e.message.indexOf("Illegal")!=-1){return{relevance:0,keyword_count:0,value:escape(value)}}else{throw e}}}function highlightAuto(text){var result={keyword_count:0,relevance:0,value:escape(text)};var second_best=result;for(var key in languages){if(!languages.hasOwnProperty(key))continue;var current=highlight(key,text,false);current.language=key;if(current.keyword_count+current.relevance>second_best.keyword_count+second_best.relevance){second_best=current}if(current.keyword_count+current.relevance>result.keyword_count+result.relevance){second_best=result;result=current}}if(second_best.language){result.second_best=second_best}return result}function fixMarkup(value,tabReplace,useBR){if(tabReplace){value=value.replace(/^((<[^>]+>|\t)+)/gm,function(match,p1,offset,s){return p1.replace(/\t/g,tabReplace)})}if(useBR){value=value.replace(/\n/g,"
")}return value}function highlightBlock(block,tabReplace,useBR){var text=blockText(block,useBR);var language=blockLanguage(block);if(language=="no-highlight")return;var result=language?highlight(language,text,true):highlightAuto(text);language=result.language;var original=nodeStream(block);if(original.length){var pre=document.createElement("pre");pre.innerHTML=result.value;result.value=mergeStreams(original,nodeStream(pre),text)}result.value=fixMarkup(result.value,tabReplace,useBR);var class_name=block.className;if(!class_name.match("(\\s|^)(language-)?"+language+"(\\s|$)")){class_name=class_name?class_name+" "+language:language}block.innerHTML=result.value;block.className=class_name;block.result={language:language,kw:result.keyword_count,re:result.relevance};if(result.second_best){block.second_best={language:result.second_best.language,kw:result.second_best.keyword_count,re:result.second_best.relevance}}}function initHighlighting(){if(initHighlighting.called)return;initHighlighting.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),findCode).filter(Boolean).forEach(function(code){highlightBlock(code,hljs.tabReplace)})}function initHighlightingOnLoad(){window.addEventListener("DOMContentLoaded",initHighlighting,false);window.addEventListener("load",initHighlighting,false)}var languages={};this.LANGUAGES=languages;this.highlight=highlight;this.highlightAuto=highlightAuto;this.fixMarkup=fixMarkup;this.highlightBlock=highlightBlock;this.initHighlighting=initHighlighting;this.initHighlightingOnLoad=initHighlightingOnLoad;this.IDENT_RE="[a-zA-Z][a-zA-Z0-9_]*";this.UNDERSCORE_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_]*";this.NUMBER_RE="\\b\\d+(\\.\\d+)?";this.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BINARY_NUMBER_RE="\\b(0b[01]+)";this.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0};this.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[this.BACKSLASH_ESCAPE],relevance:0};this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE],relevance:0};this.C_LINE_COMMENT_MODE={className:"comment",begin:"//",end:"$"};this.C_BLOCK_COMMENT_MODE={className:"comment",begin:"/\\*",end:"\\*/"};this.HASH_COMMENT_MODE={className:"comment",begin:"#",end:"$"};this.NUMBER_MODE={className:"number",begin:this.NUMBER_RE,relevance:0};this.C_NUMBER_MODE={className:"number",begin:this.C_NUMBER_RE,relevance:0};this.BINARY_NUMBER_MODE={className:"number",begin:this.BINARY_NUMBER_RE,relevance:0};this.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gim]*/,illegal:/\n/,contains:[this.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[this.BACKSLASH_ESCAPE]}]};this.inherit=function(parent,obj){var result={};for(var key in parent)result[key]=parent[key];if(obj)for(var key in obj)result[key]=obj[key];return result}},languages=[{name:"javascript",create:function(hljs){return{keywords:{keyword:"in if for while finally var new function do return void else break catch "+"instanceof with throw case default try this switch continue typeof delete "+"let yield const",literal:"true false null undefined NaN Infinity"},contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{begin:/;/,subLanguage:"xml"}],relevance:0},{className:"function",beginWithKeyword:true,end:/{/,keywords:"function",contains:[{className:"title",begin:/[A-Za-z$_][0-9A-Za-z$_]*/},{className:"params",begin:/\(/,end:/\)/,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/}]}}},{name:"ruby",create:function(hljs){var RUBY_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var RUBY_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var RUBY_KEYWORDS={keyword:"and false then defined module in return redo if BEGIN retry end for true self when "+"next until do begin unless END rescue nil else break undef not super class case "+"require yield alias while ensure elsif or include"};var YARDOCTAG={className:"yardoctag",begin:"@[A-Za-z]+"};var COMMENTS=[{className:"comment",begin:"#",end:"$",contains:[YARDOCTAG]},{className:"comment",begin:"^\\=begin",end:"^\\=end",contains:[YARDOCTAG],relevance:10},{className:"comment",begin:"^__END__",end:"\\n$"}];var SUBST={className:"subst",begin:"#\\{",end:"}",lexems:RUBY_IDENT_RE,keywords:RUBY_KEYWORDS};var STR_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST];var STRINGS=[{className:"string",begin:"'",end:"'",contains:STR_CONTAINS,relevance:0},{className:"string",begin:'"',end:'"',contains:STR_CONTAINS,relevance:0},{className:"string",begin:"%[qw]?\\(",end:"\\)",contains:STR_CONTAINS},{className:"string",begin:"%[qw]?\\[",end:"\\]",contains:STR_CONTAINS},{className:"string",begin:"%[qw]?{",end:"}",contains:STR_CONTAINS},{className:"string",begin:"%[qw]?<",end:">",contains:STR_CONTAINS,relevance:10},{className:"string",begin:"%[qw]?/",end:"/",contains:STR_CONTAINS,relevance:10},{className:"string",begin:"%[qw]?%",end:"%",contains:STR_CONTAINS,relevance:10},{className:"string",begin:"%[qw]?-",end:"-",contains:STR_CONTAINS,relevance:10},{className:"string",begin:"%[qw]?\\|",end:"\\|",contains:STR_CONTAINS,relevance:10}];var FUNCTION={className:"function",beginWithKeyword:true,end:" |$|;",keywords:"def",contains:[{className:"title",begin:RUBY_METHOD_RE,lexems:RUBY_IDENT_RE,keywords:RUBY_KEYWORDS},{className:"params",begin:"\\(",end:"\\)",lexems:RUBY_IDENT_RE,keywords:RUBY_KEYWORDS}].concat(COMMENTS)};var RUBY_DEFAULT_CONTAINS=COMMENTS.concat(STRINGS.concat([{className:"class",beginWithKeyword:true,end:"$|;",keywords:"class module",contains:[{className:"title",begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",relevance:0},{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+hljs.IDENT_RE+"::)?"+hljs.IDENT_RE}]}].concat(COMMENTS)},FUNCTION,{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:":",contains:STRINGS.concat([{begin:RUBY_METHOD_RE}]),relevance:0},{className:"symbol",begin:RUBY_IDENT_RE+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"number",begin:"\\?\\w"},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+hljs.RE_STARTERS_RE+")\\s*",contains:COMMENTS.concat([{className:"regexp",begin:"/",end:"/[a-z]*",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]),relevance:0}]));SUBST.contains=RUBY_DEFAULT_CONTAINS;FUNCTION.contains[1].contains=RUBY_DEFAULT_CONTAINS;return{lexems:RUBY_IDENT_RE,keywords:RUBY_KEYWORDS,contains:RUBY_DEFAULT_CONTAINS}}},{name:"python",create:function(hljs){var PROMPT={className:"prompt",begin:/^(>>>|\.\.\.) /};var STRINGS=[{className:"string",begin:/(u|b)?r?'''/,end:/'''/,contains:[PROMPT],relevance:10},{className:"string",begin:/(u|b)?r?"""/,end:/"""/,contains:[PROMPT],relevance:10},{className:"string",begin:/(u|r|ur)'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE],relevance:10},{className:"string",begin:/(u|r|ur)"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE],relevance:10},{className:"string",begin:/(b|br)'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:/(b|br)"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]}].concat([hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]);var TITLE={className:"title",begin:hljs.UNDERSCORE_IDENT_RE};var PARAMS={className:"params",begin:/\(/,end:/\)/,contains:["self",hljs.C_NUMBER_MODE,PROMPT].concat(STRINGS)};var FUNC_CLASS_PROTO={beginWithKeyword:true,end:/:/,illegal:/[${=;\n]/,contains:[TITLE,PARAMS],relevance:10};return{keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return "+"exec else break not with class assert yield try while continue del or def lambda "+"nonlocal|10",built_in:"None True False Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:STRINGS.concat([PROMPT,hljs.HASH_COMMENT_MODE,hljs.inherit(FUNC_CLASS_PROTO,{className:"function",keywords:"def"}),hljs.inherit(FUNC_CLASS_PROTO,{className:"class",keywords:"class"}),hljs.C_NUMBER_MODE,{className:"decorator",begin:/@/,end:/$/},{begin:/\b(print|exec)\(/}])}}},{name:"bash",create:function(hljs){var VAR1={className:"variable",begin:/\$[\w\d#@][\w\d_]*/};var VAR2={className:"variable",begin:/\$\{(.*?)\}/};var QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR1,VAR2,{className:"variable",begin:/\$\(/,end:/\)/,contains:hljs.BACKSLASH_ESCAPE}],relevance:0};var APOS_STRING={className:"string",begin:/'/,end:/'/,relevance:0};return{lexems:/-?[a-z]+/,keywords:{keyword:"if then else elif fi for break continue while in do done exit return set "+"declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly "+"getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:true,contains:[{className:"title",begin:/\w[\w\d_]*/}],relevance:0},hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,VAR1,VAR2]}}},{name:"java",create:function(hljs){return{keywords:"false synchronized int abstract float private char boolean static null if const "+"for true while long throw strictfp finally protected import native final return void "+"enum else break transient new catch instanceof byte super volatile case assert short "+"package default double public try this switch continue throws",contains:[{className:"javadoc",begin:"/\\*\\*",end:"\\*/",contains:[{className:"javadoctag",begin:"(^|\\s)@[A-Za-z]+"}],relevance:10},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",beginWithKeyword:true,end:"{",keywords:"class interface",excludeEnd:true,illegal:":",contains:[{beginWithKeyword:true,keywords:"extends implements",relevance:10},{className:"title",begin:hljs.UNDERSCORE_IDENT_RE}]},hljs.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}},{name:"php",create:function(hljs){var VARIABLE={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"};var STRINGS=[hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:'b"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:"b'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]}];var NUMBERS=[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE];var TITLE={className:"title",begin:hljs.UNDERSCORE_IDENT_RE};return{case_insensitive:true,keywords:"and include_once list abstract global private echo interface as static endswitch "+"array null if endwhile or const for endforeach self var while isset public "+"protected exit foreach throw elseif include __FILE__ empty require_once do xor "+"return implements parent clone use __CLASS__ __LINE__ else break print eval new "+"catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ "+"enddeclare final try this switch continue endfor endif declare unset true false "+"namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",contains:[hljs.C_LINE_COMMENT_MODE,hljs.HASH_COMMENT_MODE,{className:"comment",begin:"/\\*",end:"\\*/",contains:[{className:"phpdoc",begin:"\\s@[A-Za-z]+"}]},{className:"comment",excludeBegin:true,begin:"__halt_compiler.+?;",endsWithParent:true},{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[hljs.BACKSLASH_ESCAPE]},{className:"preprocessor",begin:"<\\?php",relevance:10},{className:"preprocessor",begin:"\\?>"},VARIABLE,{className:"function",beginWithKeyword:true,end:"{",keywords:"function",illegal:"\\$|\\[|%",contains:[TITLE,{className:"params",begin:"\\(",end:"\\)",contains:["self",VARIABLE,hljs.C_BLOCK_COMMENT_MODE].concat(STRINGS).concat(NUMBERS)}]},{className:"class",beginWithKeyword:true,end:"{",keywords:"class",illegal:"[:\\(\\$]",contains:[{beginWithKeyword:true,endsWithParent:true,keywords:"extends",contains:[TITLE]},TITLE]},{begin:"=>"}].concat(STRINGS).concat(NUMBERS)}}},{name:"perl",create:function(hljs){var PERL_KEYWORDS="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc "+"ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime "+"readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq"+"fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent "+"shutdown dump chomp connect getsockname die socketpair close flock exists index shmget"+"sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr "+"unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 "+"getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline "+"endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand "+"mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink "+"getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr "+"untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link "+"getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller "+"lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and "+"sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 "+"chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach "+"tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir"+"ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe "+"atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var SUBST={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:PERL_KEYWORDS,relevance:10};var VAR1={className:"variable",begin:"\\$\\d"};var VAR2={className:"variable",begin:"[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)"};var STRING_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST,VAR1,VAR2];var METHOD={begin:"->",contains:[{begin:hljs.IDENT_RE},{begin:"{",end:"}"}]};var COMMENT={className:"comment",begin:"^(__END__|__DATA__)",end:"\\n$",relevance:5};var PERL_DEFAULT_CONTAINS=[VAR1,VAR2,hljs.HASH_COMMENT_MODE,COMMENT,{className:"comment",begin:"^\\=\\w",end:"\\=cut",endsWithParent:true},METHOD,{className:"string",begin:"q[qwxr]?\\s*\\(",end:"\\)",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"q[qwxr]?\\s*\\[",end:"\\]",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"q[qwxr]?\\s*\\{",end:"\\}",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"q[qwxr]?\\s*\\|",end:"\\|",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"q[qwxr]?\\s*\\<",end:"\\>",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"qw\\s+q",end:"q",contains:STRING_CONTAINS,relevance:5},{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"',end:'"',contains:STRING_CONTAINS,relevance:0},{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:"{\\w+}",relevance:0},{className:"string",begin:"-?\\w+\\s*\\=\\>",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[hljs.HASH_COMMENT_MODE,COMMENT,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[hljs.BACKSLASH_ESCAPE],relevance:0}]},{className:"sub",beginWithKeyword:true,end:"(\\s*\\(.*?\\))?[;{]",keywords:"sub",relevance:5},{className:"operator",begin:"-\\w\\b",relevance:0}];SUBST.contains=PERL_DEFAULT_CONTAINS;METHOD.contains[1].contains=PERL_DEFAULT_CONTAINS;return{keywords:PERL_KEYWORDS,contains:PERL_DEFAULT_CONTAINS}}},{name:"cpp",create:function(hljs){var CPP_KEYWORDS={keyword:"false int float while private char catch export virtual operator sizeof "+"dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace "+"unsigned long throw volatile static protected bool template mutable if public friend "+"do return goto auto void enum else break new extern using true class asm case typeid "+"short reinterpret_cast|10 default double register explicit signed typename try this "+"switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype "+"noexcept nullptr static_assert thread_local restrict _Bool complex",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap array shared_ptr"};return{keywords:CPP_KEYWORDS,illegal:"",illegal:"\\n"},hljs.C_LINE_COMMENT_MODE]},{className:"stl_container",begin:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:CPP_KEYWORDS,relevance:10,contains:["self"]}]}}},{name:"objectivec",create:function(hljs){var OBJC_KEYWORDS={keyword:"int float while private char catch export sizeof typedef const struct for union "+"unsigned long volatile static protected bool mutable if public do return goto void "+"enum else break extern asm case short default double throw register explicit "+"signed typename try this switch continue wchar_t inline readonly assign property "+"self synchronized end synthesize id optional required "+"nonatomic super unichar finally dynamic IBOutlet IBAction selector strong "+"weak readonly",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView "+"UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread "+"UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool "+"UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray "+"NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController "+"UINavigationBar UINavigationController UITabBarController UIPopoverController "+"UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController "+"NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor "+"UIFont UIApplication NSNotFound NSNotificationCenter NSNotification "+"UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar "+"NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection "+"UIInterfaceOrientation MPMoviePlayerController dispatch_once_t "+"dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};return{keywords:OBJC_KEYWORDS,illegal:""}]},{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginWithKeyword:true,end:"({|$)",keywords:"interface class protocol implementation",contains:[{className:"id",begin:hljs.UNDERSCORE_IDENT_RE}]},{className:"variable",begin:"\\."+hljs.UNDERSCORE_IDENT_RE,relevance:0}]}}},{name:"cs",create:function(hljs){return{keywords:"abstract as base bool break byte case catch char checked class const continue decimal "+"default delegate do double else enum event explicit extern false finally fixed float "+"for foreach goto if implicit in int interface internal is lock long namespace new null "+"object operator out override params private protected public readonly ref return sbyte "+"sealed short sizeof stackalloc static string struct switch this throw true try typeof "+"uint ulong unchecked unsafe ushort using virtual volatile void while async await "+"ascending descending from get group into join let orderby partial select set value var "+"where yield",contains:[{className:"comment",begin:"///",end:"$",returnBegin:true,contains:[{className:"xmlDocTag",begin:"///|"},{className:"xmlDocTag",begin:""}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}},{name:"sql",create:function(hljs){return{case_insensitive:true,contains:[{className:"operator",begin:"(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",end:";",endsWithParent:true,keywords:{keyword:"all partial global month current_timestamp using go revoke smallint "+"indicator end-exec disconnect zone with character assertion to add current_user "+"usage input local alter match collate real then rollback get read timestamp "+"session_user not integer bit unique day minute desc insert execute like ilike|2 "+"level decimal drop continue isolation found where constraints domain right "+"national some module transaction relative second connect escape close system_user "+"for deferred section cast current sqlstate allocate intersect deallocate numeric "+"public preserve full goto initially asc no key output collation group by union "+"session both last language constraint column of space foreign deferrable prior "+"connection unknown action commit view or first into float year primary cascaded "+"except restrict set references names table outer open select size are rows from "+"prepare distinct leading create only next inner authorization schema "+"corresponding option declare precision immediate else timezone_minute external "+"varying translation true case exception join hour default double scroll value "+"cursor descriptor values dec fetch procedure delete and false int is describe "+"char as at in varchar null trailing any absolute current_time end grant "+"privileges when cross check write current_date pad begin temporary exec time "+"update catalog user sql date on identity timezone_hour natural whenever interval "+"work order cascade diagnostics nchar having left call do handler load replace "+"truncate start lock show pragma exists number trigger if before after each row",aggregate:"count sum min max avg"},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE,{begin:"''"}],relevance:0},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE,{begin:'""'}],relevance:0},{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},hljs.C_NUMBER_MODE]},hljs.C_BLOCK_COMMENT_MODE,{className:"comment",begin:"--",end:"$"}]} +}},{name:"xml",create:function(hljs){var XML_IDENT_RE="[A-Za-z0-9\\._:-]+";var TAG_INTERNALS={endsWithParent:true,relevance:0,contains:[{className:"attribute",begin:XML_IDENT_RE,relevance:0},{begin:'="',returnBegin:true,end:'"',contains:[{className:"value",begin:'"',endsWithParent:true}]},{begin:"='",returnBegin:true,end:"'",contains:[{className:"value",begin:"'",endsWithParent:true}]},{begin:"=",contains:[{className:"value",begin:"[^\\s/>]+"}]}]};return{case_insensitive:true,contains:[{className:"pi",begin:"<\\?",end:"\\?>",relevance:10},{className:"doctype",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},{className:"comment",begin:"",relevance:10},{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"|$)",end:">",keywords:{title:"style"},contains:[TAG_INTERNALS],starts:{end:"",returnEnd:true,subLanguage:"css"}},{className:"tag",begin:"|$)",end:">",keywords:{title:"script"},contains:[TAG_INTERNALS],starts:{end:"",returnEnd:true,subLanguage:"javascript"}},{begin:"<%",end:"%>",subLanguage:"vbscript"},{className:"tag",begin:"",relevance:0,contains:[{className:"title",begin:"[^ /><]+"},TAG_INTERNALS]}]}}},{name:"css",create:function(hljs){var IDENT_RE="[a-zA-Z-][a-zA-Z0-9_-]*";var FUNCTION={className:"function",begin:IDENT_RE+"\\(",end:"\\)",contains:["self",hljs.NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{case_insensitive:true,illegal:"[=/|']",contains:[hljs.C_BLOCK_COMMENT_MODE,{className:"id",begin:"\\#[A-Za-z0-9_-]+"},{className:"class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"pseudo",begin:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{className:"at_rule",begin:"@(font-face|page)",lexems:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:true,excludeEnd:true,relevance:0,contains:[FUNCTION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}]},{className:"tag",begin:IDENT_RE,relevance:0},{className:"rules",begin:"{",end:"}",illegal:"[^\\s]",relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,{className:"rule",begin:"[^\\s]",returnBegin:true,end:";",endsWithParent:true,contains:[{className:"attribute",begin:"[A-Z\\_\\.\\-]+",end:":",excludeEnd:true,illegal:"[^\\s]",starts:{className:"value",endsWithParent:true,excludeEnd:true,contains:[FUNCTION,hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]}]}]}}},{name:"scala",create:function(hljs){var ANNOTATION={className:"annotation",begin:"@[A-Za-z]+"};var STRING={className:"string",begin:'u?r?"""',end:'"""',relevance:10};return{keywords:"type yield lazy override def with val var false true sealed abstract private trait "+"object null if for while throw finally protected extends import final return else "+"break new catch super class case package default try this match continue throws",contains:[{className:"javadoc",begin:"/\\*\\*",end:"\\*/",contains:[{className:"javadoctag",begin:"@[A-Za-z]+"}],relevance:10},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",begin:"((case )?class |object |trait )",end:"({|$)",illegal:":",keywords:"case class trait object",contains:[{beginWithKeyword:true,keywords:"extends with",relevance:10},{className:"title",begin:hljs.UNDERSCORE_IDENT_RE},{className:"params",begin:"\\(",end:"\\)",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,STRING,ANNOTATION]}]},hljs.C_NUMBER_MODE,ANNOTATION]}}},{name:"coffeescript",create:function(hljs){var KEYWORDS={keyword:"in if for while finally new do return else break catch instanceof throw try this "+"switch continue typeof delete debugger super "+"then unless until loop of by when and or is isnt not",literal:"true false null undefined "+"yes no on off",reserved:"case default function var void with const let enum export import native "+"__hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*";var TITLE={className:"title",begin:JS_IDENT_RE};var SUBST={className:"subst",begin:"#\\{",end:"}",keywords:KEYWORDS};var EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",begin:"'''",end:"'''",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""',contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE,SUBST],relevance:0},{className:"regexp",begin:"///",end:"///",contains:[hljs.HASH_COMMENT_MODE]},{className:"regexp",begin:"//[gim]*",relevance:0},{className:"regexp",begin:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"},{className:"property",begin:"@"+JS_IDENT_RE},{begin:"`",end:"`",excludeBegin:true,excludeEnd:true,subLanguage:"javascript"}];SUBST.contains=EXPRESSIONS;return{keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\s*[-=]>",end:"[-=]>",returnBegin:true,contains:[TITLE,{className:"params",begin:"\\(",returnBegin:true,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS,contains:["self"].concat(EXPRESSIONS)}]}]},{className:"class",beginWithKeyword:true,keywords:"class",end:"$",illegal:"[:\\[\\]]",contains:[{beginWithKeyword:true,keywords:"extends",endsWithParent:true,illegal:":",contains:[TITLE]},TITLE]},{className:"attribute",begin:JS_IDENT_RE+":",end:":",returnBegin:true,excludeEnd:true}])}}},{name:"lisp",create:function(hljs){var LISP_IDENT_RE="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*";var LISP_SIMPLE_NUMBER_RE="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?";var SHEBANG={className:"shebang",begin:"^#!",end:"$"};var LITERAL={className:"literal",begin:"\\b(t{1}|nil)\\b"};var NUMBERS=[{className:"number",begin:LISP_SIMPLE_NUMBER_RE},{className:"number",begin:"#b[0-1]+(/[0-1]+)?"},{className:"number",begin:"#o[0-7]+(/[0-7]+)?"},{className:"number",begin:"#x[0-9a-f]+(/[0-9a-f]+)?"},{className:"number",begin:"#c\\("+LISP_SIMPLE_NUMBER_RE+" +"+LISP_SIMPLE_NUMBER_RE,end:"\\)"}];var STRING={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0};var COMMENT={className:"comment",begin:";",end:"$"};var VARIABLE={className:"variable",begin:"\\*",end:"\\*"};var KEYWORD={className:"keyword",begin:"[:&]"+LISP_IDENT_RE};var QUOTED_LIST={begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING].concat(NUMBERS)};var QUOTED1={className:"quoted",begin:"['`]\\(",end:"\\)",contains:NUMBERS.concat([STRING,VARIABLE,KEYWORD,QUOTED_LIST])};var QUOTED2={className:"quoted",begin:"\\(quote ",end:"\\)",keywords:{title:"quote"},contains:NUMBERS.concat([STRING,VARIABLE,KEYWORD,QUOTED_LIST])};var LIST={className:"list",begin:"\\(",end:"\\)"};var BODY={endsWithParent:true,relevance:0};LIST.contains=[{className:"title",begin:LISP_IDENT_RE},BODY];BODY.contains=[QUOTED1,QUOTED2,LIST,LITERAL].concat(NUMBERS).concat([STRING,COMMENT,VARIABLE,KEYWORD]);return{illegal:"[^\\s]",contains:NUMBERS.concat([SHEBANG,LITERAL,STRING,COMMENT,QUOTED1,QUOTED2,LIST])}}},{name:"clojure",create:function(hljs){var keywords={built_in:"def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem "+"quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? "+"set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? "+"class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? "+"string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . "+"inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last "+"drop-while while intern condp case reduced cycle split-at split-with repeat replicate "+"iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext "+"nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends "+"add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler "+"set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter "+"monitor-exit defmacro defn defn- macroexpand macroexpand-1 for doseq dosync dotimes and or "+"when when-not when-let comp juxt partial sequence memoize constantly complement identity assert "+"peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast "+"sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import "+"intern refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! "+"assoc! dissoc! pop! disj! import use class type num float double short byte boolean bigint biginteger "+"bigdec print-method print-dup throw-if throw printf format load compile get-in update-in pr pr-on newline "+"flush read slurp read-line subvec with-open memfn time ns assert re-find re-groups rand-int rand mod locking "+"assert-valid-fdecl alias namespace resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! "+"reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! "+"new next conj set! memfn to-array future future-call into-array aset gen-class reduce merge map filter find empty "+"hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list "+"disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer "+"chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate "+"unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta "+"lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"};var CLJ_IDENT_RE="[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+";var SIMPLE_NUMBER_RE="[\\s:\\(\\{]+\\d+(\\.\\d+)?";var NUMBER={className:"number",begin:SIMPLE_NUMBER_RE,relevance:0};var STRING={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0};var COMMENT={className:"comment",begin:";",end:"$",relevance:0};var COLLECTION={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"};var HINT={className:"comment",begin:"\\^"+CLJ_IDENT_RE};var HINT_COL={className:"comment",begin:"\\^\\{",end:"\\}"};var KEY={className:"attribute",begin:"[:]"+CLJ_IDENT_RE};var LIST={className:"list",begin:"\\(",end:"\\)"};var BODY={endsWithParent:true,keywords:{literal:"true false nil"},relevance:0};var TITLE={keywords:keywords,lexems:CLJ_IDENT_RE,className:"title",begin:CLJ_IDENT_RE,starts:BODY};LIST.contains=[{className:"comment",begin:"comment"},TITLE];BODY.contains=[LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER];COLLECTION.contains=[LIST,STRING,HINT,COMMENT,KEY,COLLECTION,NUMBER];return{illegal:"\\S",contains:[COMMENT,LIST]}}},{name:"http",create:function(hljs){return{illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:true,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:true,excludeEnd:true}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:true,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:"",endsWithParent:true}}]}}}];for(var i=0;i.left{text-align:left;}.remark-slide>.center{text-align:center;}.remark-slide>.right{text-align:right;}.remark-slide>.top{vertical-align:top;}.remark-slide>.middle{vertical-align:middle;}.remark-slide>.bottom{vertical-align:bottom;}.remark-slide .remark-slide-content{background-position:center;background-repeat:no-repeat;display:table-cell;padding:1em 4em 1em 4em;}.remark-slide .remark-slide-content .left{display:block;text-align:left;}.remark-slide .remark-slide-content .center{display:block;text-align:center;}.remark-slide .remark-slide-content .right{display:block;text-align:right;}.remark-slide .remark-slide-number{bottom:12px;opacity:0.5;position:absolute;right:20px;}.remark-visible{display:block;}@media print{.remark-slide-container{display:block;}}.remark-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;display:none;opacity:0.95;background:#000;}.remark-help{bottom:0;top:0;right:0;left:0;display:none;position:absolute;z-index:1000;-webkit-transform-origin:top left;-moz-transform-origin:top left;transform-origin:top-left;}.remark-help .remark-help-content{color:white;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:12pt;position:absolute;top:10%;bottom:10%;left:10%;height:10%;}.remark-help .remark-help-content td{color:white;font-size:12pt;padding:10px;}.remark-help .remark-help-content td:first-child{padding-left:0;}.remark-help .remark-help-content .key{background:white;color:black;min-width:1em;display:inline-block;padding:3px 6px;text-align:center;border-radius:4px;}.remark-help .dismiss{top:85%;}.remark-container.remark-help-mode .remark-help{display:block;}.remark-container.remark-help-mode .remark-backdrop{display:block;}.remark-preview-area{bottom:2%;left:2%;display:none;opacity:0.5;position:absolute;height:47.25%;width:48%;}.remark-preview-area .remark-slide-container{display:block;}.remark-notes-area{background:#e7e8e2;bottom:0;display:none;left:52%;overflow:hidden;padding:1.5em;position:absolute;right:0;top:0;}.remark-toolbar{color:#979892;padding-bottom:1em;}.remark-toolbar .remark-toolbar-link{border:2px solid #d7d8d2;color:#979892;display:inline-block;padding:2px 2px;text-decoration:none;text-align:center;min-width:20px;}.remark-toolbar .remark-toolbar-link:hover{border-color:#979892;color:#676862;}.remark-container.remark-presenter-mode .remark-slides-area{top:2%;left:2%;height:47.25%;width:48%;}.remark-container.remark-presenter-mode .remark-preview-area{display:block;}.remark-container.remark-presenter-mode .remark-notes-area{display:block;}",containerLayout:'
\n
\n +\n -\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n

Help

\n

Keyboard shortcuts

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n ,\n ,\n Pg Up,\n K\n Go to previous slide
\n ,\n ,\n Pg Dn,\n Space,\n J\n Go to next slide
\n Home\n Go to first slide
\n End\n Go to last slide
\n F\n Toggle fullscreen mode
\n C\n Clone slideshow
\n P\n Toggle presenter mode
\n ?\n Toggle this help
\n
\n
\n \n \n \n \n \n
\n Esc\n Back to slideshow
\n
\n
\n'}},{}],5:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}if(canPost){var queue=[];window.addEventListener("message",function(ev){if(ev.source===window&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],6:[function(require,module,exports){!function(process){if(!process.EventEmitter)process.EventEmitter=function(){};var EventEmitter=exports.EventEmitter=process.EventEmitter;var isArray=typeof Array.isArray==="function"?Array.isArray:function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);console.trace()}}this._events[type].push(listener)}else{this._events[type]=[this._events[type],listener]}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){var self=this;self.on(type,function g(){self.removeListener(type,g);listener.apply(this,arguments)});return this};EventEmitter.prototype.removeListener=function(type,listener){if("function"!==typeof listener){throw new Error("removeListener only takes instances of Function")}if(!this._events||!this._events[type])return this;var list=this._events[type];if(isArray(list)){var i=indexOf(list,listener);if(i<0)return this;list.splice(i,1);if(list.length==0)delete this._events[type]}else if(this._events[type]===listener){delete this._events[type]}return this};EventEmitter.prototype.removeAllListeners=function(type){if(arguments.length===0){this._events={};return this}if(type&&this._events&&this._events[type])this._events[type]=null;return this};EventEmitter.prototype.listeners=function(type){if(!this._events)this._events={};if(!this._events[type])this._events[type]=[];if(!isArray(this._events[type])){this._events[type]=[this._events[type]]}return this._events[type]}}(require("__browserify_process"))},{__browserify_process:5}],2:[function(require,module,exports){var EventEmitter=require("events").EventEmitter,highlighter=require("./highlighter"),Slideshow=require("./models/slideshow"),SlideshowView=require("./views/slideshowView"),Controller=require("./controller");module.exports.highlighter=highlighter;module.exports.create=function(options){var events,slideshow,slideshowView,controller;options=applyDefaults(options);events=new EventEmitter;events.setMaxListeners(0);slideshow=new Slideshow(events,options);slideshowView=new SlideshowView(events,options.container,slideshow);controller=new Controller(events,slideshowView);return slideshow};function applyDefaults(options){var sourceElement;options=options||{};if(!options.hasOwnProperty("source")){sourceElement=document.getElementById("source");if(sourceElement){options.source=sourceElement.innerHTML;sourceElement.style.display="none"}}if(!(options.container instanceof window.HTMLElement)){options.container=document.body}return options}},{events:6,"./highlighter":3,"./models/slideshow":7,"./views/slideshowView":8,"./controller":9}],9:[function(require,module,exports){module.exports=Controller;function Controller(events,slideshowView){addApiEventListeners(events,slideshowView);addNavigationEventListeners(events,slideshowView);addKeyboardEventListeners(events);addMouseEventListeners(events);addTouchEventListeners(events)}function addApiEventListeners(events,slideshowView){events.on("pause",function(event){removeKeyboardEventListeners(events);removeMouseEventListeners(events);removeTouchEventListeners(events)});events.on("resume",function(event){addKeyboardEventListeners(events);addMouseEventListeners(events);addTouchEventListeners(events)})}function addNavigationEventListeners(events,slideshowView){if(slideshowView.isEmbedded()){events.emit("gotoSlide",1)}else{events.on("hashchange",navigateByHash);events.on("slideChanged",updateHash);navigateByHash()}events.on("message",navigateByMessage);function navigateByHash(){var slideNoOrName=(window.location.hash||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){window.location.hash="#"+slideNoOrName}function navigateByMessage(message){var cap;if((cap=/^gotoSlide:(\d+)$/.exec(message.data))!==null){events.emit("gotoSlide",parseInt(cap[1],10))}}}function removeKeyboardEventListeners(events){events.removeAllListeners("keydown");events.removeAllListeners("keypress")}function addKeyboardEventListeners(events){events.on("keydown",function(event){switch(event.keyCode){case 33:case 37:case 38:events.emit("gotoPreviousSlide");break;case 32:case 34:case 39:case 40:events.emit("gotoNextSlide");break;case 36:events.emit("gotoFirstSlide");break;case 35:events.emit("gotoLastSlide");break;case 27:events.emit("hideOverlay");break}});events.on("keypress",function(event){switch(String.fromCharCode(event.which)){case"j":events.emit("gotoNextSlide");break;case"k":events.emit("gotoPreviousSlide");break;case"c":events.emit("createClone");break;case"p":events.emit("togglePresenterMode");break;case"f":events.emit("toggleFullscreen");break;case"?":events.emit("toggleHelp");break}})}function removeMouseEventListeners(events){events.removeAllListeners("mousewheel")}function addMouseEventListeners(events){events.on("mousewheel",function(event){if(event.wheelDeltaY>0){events.emit("gotoPreviousSlide")}else if(event.wheelDeltaY<0){events.emit("gotoNextSlide")}})}function removeTouchEventListeners(events){events.removeAllListeners("touchstart");events.removeAllListeners("touchend");events.removeAllListeners("touchmove")}function addTouchEventListeners(events){var touch,startX,endX;var isTap=function(){return Math.abs(startX-endX)<10};var handleTap=function(){events.emit("tap",endX)};var handleSwipe=function(){if(startX>endX){events.emit("gotoNextSlide")}else{events.emit("gotoPreviousSlide")}};events.on("touchstart",function(event){touch=event.touches[0];startX=touch.clientX});events.on("touchend",function(event){if(event.target.nodeName.toUpperCase()==="A"){return}touch=event.changedTouches[0];endX=touch.clientX;if(isTap()){handleTap()}else{handleSwipe()}});events.on("touchmove",function(event){event.preventDefault()})}},{}],7:[function(require,module,exports){var Navigation=require("./slideshow/navigation"),Events=require("./slideshow/events"),utils=require("../utils"),Slide=require("./slide"),Parser=require("../parser");module.exports=Slideshow;function Slideshow(events,options){var self=this,slides=[];options=options||{};Events.call(self,events);Navigation.call(self,events);self.loadFromString=loadFromString;self.getSlides=getSlides;self.getSlideCount=getSlideCount;self.getSlideByName=getSlideByName;self.getRatio=getOrDefault("ratio","4:3");self.getHighlightStyle=getOrDefault("highlightStyle","default");self.getHighlightLanguage=getOrDefault("highlightLanguage","");loadFromString(options.source);function loadFromString(source){source=source||"";slides=createSlides(source);expandVariables(slides);events.emit("slidesChanged")}function getSlides(){return slides.map(function(slide){return slide})}function getSlideCount(){return slides.length}function getSlideByName(name){return slides.byName[name]}function getOrDefault(key,defaultValue){return function(){if(options[key]===undefined){return defaultValue}return options[key]}}}function createSlides(slideshowSource){var parser=new Parser,parsedSlides=parser.parse(slideshowSource),slides=[],byName={},layoutSlide;slides.byName={};parsedSlides.forEach(function(slide,i){var template,slideViewModel;if(slide.properties.continued==="true"&&i>0){template=slides[slides.length-1]}else if(byName[slide.properties.template]){template=byName[slide.properties.template]}else if(slide.properties.layout==="false"){layoutSlide=undefined}else if(layoutSlide&&slide.properties.layout!=="true"){template=layoutSlide}slideViewModel=new Slide(slides.length+1,slide,template);if(slide.properties.layout==="true"){layoutSlide=slideViewModel}if(slide.properties.name){byName[slide.properties.name]=slideViewModel}if(slide.properties.layout!=="true"){slides.push(slideViewModel);if(slide.properties.name){slides.byName[slide.properties.name]=slideViewModel}}});return slides}function expandVariables(slides){slides.forEach(function(slide){slide.expandVariables()})}},{"./slideshow/navigation":10,"./slideshow/events":11,"../utils":12,"./slide":13,"../parser":14}],8:[function(require,module,exports){var SlideView=require("./slideView"),Scaler=require("../scaler"),resources=require("../resources"),addClass=require("../utils").addClass,toggleClass=require("../utils").toggleClass,getPrefixedProperty=require("../utils").getPrefixedProperty;module.exports=SlideshowView;function SlideshowView(events,containerElement,slideshow){var self=this;self.events=events;self.slideshow=slideshow;self.scaler=new Scaler(events,slideshow);self.slideViews=[];self.configureContainerElement(containerElement);self.configureChildElements();self.updateDimensions();self.scaleElements();self.updateSlideViews();events.on("slidesChanged",function(){self.updateSlideViews()});events.on("hideSlide",function(slideIndex){self.hideSlide(slideIndex)});events.on("showSlide",function(slideIndex){self.showSlide(slideIndex)});events.on("togglePresenterMode",function(){toggleClass(self.containerElement,"remark-presenter-mode");self.scaleElements()});events.on("toggleHelp",function(){toggleClass(self.containerElement,"remark-help-mode")});handleFullscreen(self)}function handleFullscreen(self){var requestFullscreen=getPrefixedProperty(self.containerElement,"requestFullScreen"),cancelFullscreen=getPrefixedProperty(document,"cancelFullScreen");self.events.on("toggleFullscreen",function(){var fullscreenElement=getPrefixedProperty(document,"fullscreenElement")||getPrefixedProperty(document,"fullScreenElement");if(!fullscreenElement&&requestFullscreen){requestFullscreen.call(self.containerElement,Element.ALLOW_KEYBOARD_INPUT)}else if(cancelFullscreen){cancelFullscreen.call(document)}self.scaleElements()})}SlideshowView.prototype.isEmbedded=function(){return this.containerElement!==document.body};SlideshowView.prototype.configureContainerElement=function(element){var self=this;self.containerElement=element;addClass(element,"remark-container");if(element===document.body){addClass(document.getElementsByTagName("html")[0],"remark-container");forwardEvents(self.events,window,["hashchange","resize","keydown","keypress","mousewheel","message"]);forwardEvents(self.events,document,["touchstart","touchmove","touchend"])}else{element.style.position="absolute";element.tabIndex=-1;forwardEvents(self.events,window,["resize"]);forwardEvents(self.events,element,["keydown","keypress","mousewheel","touchstart","touchmove","touchend"])}self.events.on("tap",function(endX){if(endX0){self.showSlide(self.slideshow.getCurrentSlideNo()-1)}};SlideshowView.prototype.scaleSlideBackgroundImages=function(dimensions){var self=this;self.slideViews.forEach(function(slideView){slideView.scaleBackgroundImage(dimensions)})};SlideshowView.prototype.showSlide=function(slideIndex){var self=this,slideView=self.slideViews[slideIndex],nextSlideView=self.slideViews[slideIndex+1];self.events.emit("beforeShowSlide",slideIndex);slideView.show();self.notesElement.innerHTML=slideView.notesMarkup;if(nextSlideView){self.previewArea.innerHTML=nextSlideView.containerElement.outerHTML}else{self.previewArea.innerHTML=""}self.events.emit("afterShowSlide",slideIndex)};SlideshowView.prototype.hideSlide=function(slideIndex){var self=this,slideView=self.slideViews[slideIndex];self.events.emit("beforeHideSlide",slideIndex);slideView.hide();self.events.emit("afterHideSlide",slideIndex)};SlideshowView.prototype.updateDimensions=function(){var self=this,dimensions=self.scaler.dimensions;self.helpElement.style.width=dimensions.width+"px";self.helpElement.style.height=dimensions.height+"px";self.scaleSlideBackgroundImages(dimensions);self.scaleElements()};SlideshowView.prototype.scaleElements=function(){var self=this;self.slideViews.forEach(function(slideView){slideView.scale(self.elementArea)});if(self.previewArea.children.length){self.scaler.scaleToFit(self.previewArea.children[0].children[0],self.previewArea)}self.scaler.scaleToFit(self.helpElement,self.containerElement)}},{"./slideView":15,"../scaler":16,"../resources":4,"../utils":12}],10:[function(require,module,exports){module.exports=Navigation;function Navigation(events){var self=this,currentSlideNo=0;self.getCurrentSlideNo=getCurrentSlideNo;self.gotoSlide=gotoSlide;self.gotoPreviousSlide=gotoPreviousSlide;self.gotoNextSlide=gotoNextSlide;self.gotoFirstSlide=gotoFirstSlide;self.gotoLastSlide=gotoLastSlide;self.pause=pause;self.resume=resume;events.on("gotoSlide",gotoSlide);events.on("gotoPreviousSlide",gotoPreviousSlide);events.on("gotoNextSlide",gotoNextSlide);events.on("gotoFirstSlide",gotoFirstSlide);events.on("gotoLastSlide",gotoLastSlide);events.on("slidesChanged",function(){if(currentSlideNo>self.getSlideCount()){currentSlideNo=self.getSlideCount()}});events.on("createClone",function(){if(!self.clone||self.clone.closed){self.clone=window.open(location.href,"_blank","location=no")}else{self.clone.focus()}});function pause(){events.emit("pause")}function resume(){events.emit("resume")}function getCurrentSlideNo(){return currentSlideNo}function gotoSlide(slideNoOrName){var slideNo=getSlideNo(slideNoOrName),alreadyOnSlide=slideNo===currentSlideNo,slideOutOfRange=slideNo<1||slideNo>self.getSlideCount();if(alreadyOnSlide||slideOutOfRange){return}if(currentSlideNo!==0){events.emit("hideSlide",currentSlideNo-1)}events.emit("showSlide",slideNo-1);currentSlideNo=slideNo;events.emit("slideChanged",slideNoOrName||slideNo);if(self.clone&&!self.clone.closed){self.clone.postMessage("gotoSlide:"+currentSlideNo,"*")}if(window.opener){window.opener.postMessage("gotoSlide:"+currentSlideNo,"*")}}function gotoPreviousSlide(){self.gotoSlide(currentSlideNo-1)}function gotoNextSlide(){self.gotoSlide(currentSlideNo+1)}function gotoFirstSlide(){self.gotoSlide(1)}function gotoLastSlide(){self.gotoSlide(self.getSlideCount())}function getSlideNo(slideNoOrName){var slideNo,slide;if(typeof slideNoOrName==="number"){return slideNoOrName}slideNo=parseInt(slideNoOrName,10);if(slideNo.toString()===slideNoOrName){return slideNo}slide=self.getSlideByName(slideNoOrName);if(slide){return slide.getSlideNo()}return 1}}},{}],11:[function(require,module,exports){var EventEmitter=require("events").EventEmitter;module.exports=Events;function Events(events){var self=this,externalEvents=new EventEmitter;externalEvents.setMaxListeners(0);self.on=function(){externalEvents.on.apply(externalEvents,arguments);return self};["showSlide","hideSlide","beforeShowSlide","afterShowSlide","beforeHideSlide","afterHideSlide"].map(function(eventName){events.on(eventName,function(slideIndex){var slide=self.getSlides()[slideIndex];externalEvents.emit(eventName,slide)})})}},{events:6}],12:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasses(element).filter(function(klass){return klass!==className}).join(" ")};exports.toggleClass=function(element,className){var classes=exports.getClasses(element),index=classes.indexOf(className);if(index!==-1){classes.splice(index,1)}else{classes.push(className)}element.className=classes.join(" ")};exports.getClasses=function(element){return element.className.split(" ").filter(function(s){return s!==""})};exports.getPrefixedProperty=function(element,propertyName){var capitalizedPropertName=propertyName[0].toUpperCase()+propertyName.slice(1);return element[propertyName]||element["moz"+capitalizedPropertName]||element["webkit"+capitalizedPropertName]};forEach([Array,window.NodeList,window.HTMLCollection],extend);function extend(object){var prototype=object&&object.prototype;if(!prototype){return}prototype.forEach=prototype.forEach||function(f){forEach(this,f)};prototype.filter=prototype.filter||function(f){var result=[];this.forEach(function(element){if(f(element,result.length)){result.push(element)}});return result};prototype.map=prototype.map||function(f){var result=[];this.forEach(function(element){result.push(f(element,result.length))});return result}}function forEach(list,f){var i;for(i=0;icontainerHeight/ratio.height){scale=containerHeight/dimensions.height}else{scale=containerWidth/dimensions.width}scaledWidth=dimensions.width*scale;scaledHeight=dimensions.height*scale;left=(containerWidth-scaledWidth)/2;top=(containerHeight-scaledHeight)/2;element.style["-webkit-transform"]="scale("+scale+")";element.style.MozTransform="scale("+scale+")";element.style.left=Math.max(left,0)+"px";element.style.top=Math.max(top,0)+"px"};function getRatio(slideshow){var ratioComponents=slideshow.getRatio().split(":"),ratio;ratio={width:parseInt(ratioComponents[0],10),height:parseInt(ratioComponents[1],10)};ratio.ratio=ratio.width/ratio.height;return ratio}function getDimensions(ratio){return{width:Math.floor(referenceWidth/referenceRatio*ratio.ratio),height:referenceHeight}}},{}],14:[function(require,module,exports){var Lexer=require("./lexer"),converter=require("./converter");module.exports=Parser;function Parser(){}Parser.prototype.parse=function(src){var lexer=new Lexer,tokens=lexer.lex(src),slides=[],slide=createSlide(),tag,classes;tokens.forEach(function(token){switch(token.type){case"text":case"code":case"fences":appendTo(slide,token.text);break;case"content_start":tag=token.block?"div":"span";classes=token.classes.join(" ");appendTo(slide,"<"+tag+' class="'+classes+'">');break;case"content_end":tag=token.block?"div":"span";appendTo(slide,"</"+tag+">");break;case"separator":slides.push(slide);slide=createSlide();slide.properties.continued=(token.text==="--").toString();break;case"notes_separator":slide.notes="";break}});slides.push(slide);slides.forEach(function(slide){slide.source=extractProperties(slide.source,slide.properties)});return slides};function createSlide(){return{source:"",properties:{continued:"false"}}}function appendTo(slide,content){if(slide.notes!==undefined){slide.notes+=content}else{slide.source+=content}}function extractProperties(source,properties){var propertyFinder=/^\n*([-\w]+):([^$\n]*)/i,match;while((match=propertyFinder.exec(source))!==null){source=source.substr(0,match.index)+source.substr(match.index+match[0].length);properties[match[1].trim()]=match[2].trim();propertyFinder.lastIndex=match.index}return source}},{"./lexer":17,"./converter":18}],15:[function(require,module,exports){var converter=require("../converter"),highlighter=require("../highlighter"),utils=require("../utils");module.exports=SlideView;function SlideView(events,slideshow,scaler,slide){var self=this;self.events=events;self.slideshow=slideshow;self.scaler=scaler;self.slide=slide;self.notesMarkup=createNotesMarkup(slideshow,slide.notes);self.configureElements();self.updateDimensions();self.events.on("propertiesChanged",function(changes){if(changes.hasOwnProperty("ratio")){self.updateDimensions()}})}SlideView.prototype.updateDimensions=function(){var self=this,dimensions=self.scaler.dimensions; +self.scalingElement.style.width=dimensions.width+"px";self.scalingElement.style.height=dimensions.height+"px"};SlideView.prototype.scale=function(containerElement){var self=this;self.scaler.scaleToFit(self.scalingElement,containerElement)};SlideView.prototype.show=function(){utils.addClass(this.containerElement,"remark-visible")};SlideView.prototype.hide=function(){utils.removeClass(this.containerElement,"remark-visible")};SlideView.prototype.configureElements=function(){var self=this;self.containerElement=document.createElement("div");self.containerElement.className="remark-slide-container";self.scalingElement=document.createElement("div");self.scalingElement.className="remark-slide-scaler";self.element=document.createElement("div");self.element.className="remark-slide";self.contentElement=createContentElement(self.events,self.slideshow,self.slide);self.numberElement=document.createElement("div");self.numberElement.className="remark-slide-number";self.numberElement.innerHTML=self.slide.number+" / "+self.slideshow.getSlides().length;self.contentElement.appendChild(self.numberElement);self.element.appendChild(self.contentElement);self.scalingElement.appendChild(self.element);self.containerElement.appendChild(self.scalingElement)};SlideView.prototype.scaleBackgroundImage=function(dimensions){var self=this,styles=window.getComputedStyle(this.contentElement),backgroundImage=styles.backgroundImage,match,image;if((match=/^url\(("?)([^\)]+?)\1\)/.exec(backgroundImage))!==null){image=new Image;image.onload=function(){if(image.width>dimensions.width||image.height>dimensions.height){if(!self.originalBackgroundSize){self.originalBackgroundSize=self.contentElement.style.backgroundSize;self.backgroundSizeSet=true;self.contentElement.style.backgroundSize="contain"}}else{if(self.backgroundSizeSet){self.contentElement.style.backgroundSize=self.originalBackgroundSize;self.backgroundSizeSet=false}}};image.src=match[2]}};function createContentElement(events,slideshow,slide){var element=document.createElement("div");if(slide.properties.name){element.id="slide-"+slide.properties.name}styleContentElement(slideshow,element,slide.properties);element.innerHTML=converter.convertMarkdown(slide.source);element.innerHTML=element.innerHTML.replace(/

\s*<\/p>/g,"");highlightCodeBlocks(element,slideshow);return element}function styleContentElement(slideshow,element,properties){element.className="";setClassFromProperties(element,properties);setHighlightStyleFromProperties(element,properties,slideshow);setBackgroundFromProperties(element,properties)}function createNotesMarkup(slideshow,notes){var element=document.createElement("div");element.innerHTML=converter.convertMarkdown(notes);element.innerHTML=element.innerHTML.replace(/

\s*<\/p>/g,"");highlightCodeBlocks(element,slideshow);return element.innerHTML}function setBackgroundFromProperties(element,properties){var backgroundImage=properties["background-image"];if(backgroundImage){element.style.backgroundImage=backgroundImage}}function setHighlightStyleFromProperties(element,properties,slideshow){var highlightStyle=properties["highlight-style"]||slideshow.getHighlightStyle();if(highlightStyle){utils.addClass(element,"hljs-"+highlightStyle)}}function setClassFromProperties(element,properties){utils.addClass(element,"remark-slide-content");(properties["class"]||"").split(/,| /).filter(function(s){return s!==""}).forEach(function(c){utils.addClass(element,c)})}function highlightCodeBlocks(content,slideshow){var codeBlocks=content.getElementsByTagName("code");codeBlocks.forEach(function(block){if(block.className===""){block.className=slideshow.getHighlightLanguage()}if(block.className!==""){highlighter.engine.highlightBlock(block," ")}utils.addClass(block,"remark-code")})}},{"../converter":18,"../highlighter":3,"../utils":12}],17:[function(require,module,exports){module.exports=Lexer;var CODE=1,CONTENT=2,FENCES=3,SEPARATOR=4,NOTES_SEPARATOR=5;var regexByName={CODE:/(?:^|\n)( {4}[^\n]+\n*)+/,CONTENT:/(?:\\)?((?:\.[a-zA-Z_\-][a-zA-Z\-_0-9]*)+)\[/,FENCES:/(?:^|\n) *(`{3,}|~{3,}) *(?:\S+)? *\n(?:[\s\S]+?)\s*\3 *(?:\n+|$)/,SEPARATOR:/(?:^|\n)(---?)(?:\n|$)/,NOTES_SEPARATOR:/(?:^|\n)(\?{3})(?:\n|$)/};var block=replace(/CODE|CONTENT|FENCES|SEPARATOR|NOTES_SEPARATOR/,regexByName),inline=replace(/CODE|CONTENT|FENCES/,regexByName);function Lexer(){}Lexer.prototype.lex=function(src){var tokens=lex(src,block),i;for(i=tokens.length-2;i>=0;i--){if(tokens[i].type==="text"&&tokens[i+1].type==="text"){tokens[i].text+=tokens[i+1].text;tokens.splice(i+1,1)}}return tokens};function lex(src,regex,tokens){var cap,text;tokens=tokens||[];while((cap=regex.exec(src))!==null){if(cap.index>0){tokens.push({type:"text",text:src.substring(0,cap.index)})}if(cap[CODE]){tokens.push({type:"code",text:cap[0]})}else if(cap[FENCES]){tokens.push({type:"fences",text:cap[0]})}else if(cap[SEPARATOR]){tokens.push({type:"separator",text:cap[SEPARATOR]})}else if(cap[NOTES_SEPARATOR]){tokens.push({type:"notes_separator",text:cap[NOTES_SEPARATOR]})}else if(cap[CONTENT]){text=getTextInBrackets(src,cap.index+cap[0].length);if(text!==undefined){src=src.substring(text.length+1);tokens.push({type:"content_start",classes:cap[CONTENT].substring(1).split("."),block:text.indexOf("\n")!==-1});lex(text,inline,tokens);tokens.push({type:"content_end",block:text.indexOf("\n")!==-1})}else{tokens.push({type:"text",text:cap[0]})}}src=src.substring(cap.index+cap[0].length)}if(src||!src&&tokens.length===0){tokens.push({type:"text",text:src})}return tokens}function replace(regex,replacements){return new RegExp(regex.source.replace(/\w{2,}/g,function(key){return replacements[key].source}))}function getTextInBrackets(src,offset){var depth=1,pos=offset,chr;while(depth>0&&pos");source=marked(source.replace(/^\s+/,""));source=source.replace(/&[l|g]t;/g,function(match){return match==="<"?"<":">"});source=source.replace(/&/g,"&");source=source.replace(/"/g,'"');return source}},{marked:19}],19:[function(require,module,exports){!function(global){!function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){3,} *\n*/,blockquote:/^( *>[^\n]+(\n[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr",/\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\w+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"list_start",ordered:isFinite(cap[2])});cap=cap[0].match(this.rules.item);if(this.options.smartLists){bull=block.bullet.exec(cap[0])[0]}next=false;l=cap.length;i=0;for(;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1][6]===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=''+text+"";continue}if(cap=this.rules.url.exec(src)){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=''+text+"";continue}if(cap=this.rules.tag.exec(src)){src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);out+=this.outputLink(cap,{href:cap[2],title:cap[3]});continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0][0];src=cap[0].substring(1)+src;continue}out+=this.outputLink(cap,link);continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=""+this.output(cap[2]||cap[1])+"";continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=""+this.output(cap[2]||cap[1])+"";continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=""+escape(cap[2],true)+"";continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+="
";continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=""+this.output(cap[1])+"";continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(cap[0]);continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){if(cap[0][0]!=="!"){return'"+this.output(cap[1])+""}else{return''+escape(cap[1])+'"}};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults}Parser.parse=function(src,options){var parser=new Parser(options);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return"


\n"}case"heading":{return""+this.inline.output(this.token.text)+"\n"}case"code":{if(this.options.highlight){var code=this.options.highlight(this.token.text,this.token.lang);if(code!=null&&code!==this.token.text){this.token.escaped=true;this.token.text=code}}if(!this.token.escaped){this.token.text=escape(this.token.text,true)}return"
"+this.token.text+"
\n"}case"table":{var body="",heading,i,row,cell,j;body+="\n\n";for(i=0;i'+heading+"\n":""+heading+"\n"}body+="\n\n";body+="\n";for(i=0;i\n";for(j=0;j'+cell+"\n":""+cell+"\n"}body+="\n"}body+="\n";return"\n"+body+"
\n"}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return"
\n"+body+"
\n"}case"list_start":{var type=this.token.ordered?"ol":"ul",body="";while(this.next().type!=="list_end"){body+=this.tok()}return"<"+type+">\n"+body+"\n"}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return"
  • "+body+"
  • \n"}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return"
  • "+body+"
  • \n"}case"html":{return!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text}case"paragraph":{return"

    "+this.inline.output(this.token.text)+"

    \n"}case"text":{return"

    "+this.parseText()+"

    \n"}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-"};marked.Parser=Parser;marked.parser=Parser.parse;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}.call(function(){return this||(typeof window!=="undefined"?window:global)}())}(window)},{}]},{},[1]); +