text: webpackJsonp([3],{
  
  /***/ "../../../../raw-loader/index.js!../../../../hammerjs/hammer.min.js":
  /***/ (function(module, exports) {
  
  module.exports = "/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n!function(a,b,c,d){\"use strict\";function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function h(b,c,d){var e=\"DEPRECATED METHOD: \"+c+\"\\n\"+d+\" AT \\n\";return function(){var c=new Error(\"get-stack-trace\"),d=c&&c.stack?c.stack.replace(/^[^\\(]+?[\\n$]/gm,\"\").replace(/^\\s+at\\s+/gm,\"\").replace(/^Object.<anonymous>\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&la(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==oa?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function s(a){return Array.prototype.slice.call(a,0)}function t(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];r(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ma.length;){if(c=ma[g],e=c?c+f:b,e in a)return e;g++}return d}function v(){return ua++}function w(b){var c=b.ownerDocument||b;return c.defaultView||c.parentWindow||a}function x(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){k(a.options.enable,[a])&&c.handler(b)},this.init()}function y(a){var b,c=a.options.inputClass;return new(b=c?c:xa?M:ya?P:wa?R:L)(a,z)}function z(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&Ea&&d-e===0,g=b&(Ga|Ha)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,A(a,c),a.emit(\"hammer.input\",c),a.recognize(c),a.session.prevInput=c}function A(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=D(b)),e>1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=ra(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=qa(j.x)>qa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ha&&(i>Da||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=qa(l.x)>qa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:pa(a.pointers[c].clientX),clientY:pa(a.pointers[c].clientY)},c++;return{timeStamp:ra(),pointers:b,center:E(b),deltaX:a.deltaX,deltaY:a.deltaY}}function E(a){var b=a.length;if(1===b)return{x:pa(a[0].clientX),y:pa(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:pa(c/b),y:pa(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Ia:qa(a)>=qa(b)?0>a?Ja:Ka:0>b?La:Ma}function H(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ra)+I(a[1],a[0],Ra)}function K(a,b){return H(b[0],b[1],Ra)/H(a[0],a[1],Ra)}function L(){this.evEl=Ta,this.evWin=Ua,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Xa,this.evWin=Ya,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=$a,this.evWin=_a,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ga|Ha)&&(c=t(c.concat(d),\"identifier\",!0)),[c,d]}function P(){this.evTarget=bb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ea|Fa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===Ea)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ga|Ha)&&delete d[g[e].identifier],e++;return h.length?[t(f.concat(h),\"identifier\",!0),h]:void 0}function R(){x.apply(this,arguments);var a=j(this.handler,this);this.touch=new P(this.manager,a),this.mouse=new L(this.manager,a),this.primaryTouch=null,this.lastTouches=[]}function S(a,b){a&Ea?(this.primaryTouch=b.changedPointers[0].identifier,T.call(this,b)):a&(Ga|Ha)&&T.call(this,b)}function T(a){var b=a.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches,e=function(){var a=d.indexOf(c);a>-1&&d.splice(a,1)};setTimeout(e,cb)}}function U(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d<this.lastTouches.length;d++){var e=this.lastTouches[d],f=Math.abs(b-e.x),g=Math.abs(c-e.y);if(db>=f&&db>=g)return!0}return!1}function V(a,b){this.manager=a,this.set(b)}function W(a){if(p(a,jb))return jb;var b=p(a,kb),c=p(a,lb);return b&&c?jb:b||c?b?kb:lb:p(a,ib)?ib:hb}function X(){if(!fb)return!1;var b={},c=a.CSS&&a.CSS.supports;return[\"auto\",\"manipulation\",\"pan-y\",\"pan-x\",\"pan-x pan-y\",\"none\"].forEach(function(d){b[d]=c?a.CSS.supports(\"touch-action\",d):!0}),b}function Y(a){this.options=la({},this.defaults,a||{}),this.id=v(),this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=nb,this.simultaneous={},this.requireFail=[]}function Z(a){return a&sb?\"cancel\":a&qb?\"end\":a&pb?\"move\":a&ob?\"start\":\"\"}function $(a){return a==Ma?\"down\":a==La?\"up\":a==Ja?\"left\":a==Ka?\"right\":\"\"}function _(a,b){var c=b.manager;return c?c.get(a):a}function aa(){Y.apply(this,arguments)}function ba(){aa.apply(this,arguments),this.pX=null,this.pY=null}function ca(){aa.apply(this,arguments)}function da(){Y.apply(this,arguments),this._timer=null,this._input=null}function ea(){aa.apply(this,arguments)}function fa(){aa.apply(this,arguments)}function ga(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ha(a,b){return b=b||{},b.recognizers=l(b.recognizers,ha.defaults.preset),new ia(a,b)}function ia(a,b){this.options=la({},ha.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,this.input=y(this),this.touchAction=new V(this,this.options.touchAction),ja(this,!0),g(this.options.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function ja(a,b){var c=a.element;if(c.style){var d;g(a.options.cssProps,function(e,f){d=u(c.style,f),b?(a.oldCssProps[d]=c.style[d],c.style[d]=e):c.style[d]=a.oldCssProps[d]||\"\"}),b||(a.oldCssProps={})}}function ka(a,c){var d=b.createEvent(\"Event\");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var la,ma=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],na=b.createElement(\"div\"),oa=\"function\",pa=Math.round,qa=Math.abs,ra=Date.now;la=\"function\"!=typeof Object.assign?function(a){if(a===d||null===a)throw new TypeError(\"Cannot convert undefined or null to object\");for(var b=Object(a),c=1;c<arguments.length;c++){var e=arguments[c];if(e!==d&&null!==e)for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}:Object.assign;var sa=h(function(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a},\"extend\",\"Use `assign`.\"),ta=h(function(a,b){return sa(a,b,!0)},\"merge\",\"Use `assign`.\"),ua=1,va=/mobile|tablet|ip(ad|hone|od)|android/i,wa=\"ontouchstart\"in a,xa=u(a,\"PointerEvent\")!==d,ya=wa&&va.test(navigator.userAgent),za=\"touch\",Aa=\"pen\",Ba=\"mouse\",Ca=\"kinect\",Da=25,Ea=1,Fa=2,Ga=4,Ha=8,Ia=1,Ja=2,Ka=4,La=8,Ma=16,Na=Ja|Ka,Oa=La|Ma,Pa=Na|Oa,Qa=[\"x\",\"y\"],Ra=[\"clientX\",\"clientY\"];x.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(w(this.element),this.evWin,this.domHandler)}};var Sa={mousedown:Ea,mousemove:Fa,mouseup:Ga},Ta=\"mousedown\",Ua=\"mousemove mouseup\";i(L,x,{handler:function(a){var b=Sa[a.type];b&Ea&&0===a.button&&(this.pressed=!0),b&Fa&&1!==a.which&&(b=Ga),this.pressed&&(b&Ga&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:Ba,srcEvent:a}))}});var Va={pointerdown:Ea,pointermove:Fa,pointerup:Ga,pointercancel:Ha,pointerout:Ha},Wa={2:za,3:Aa,4:Ba,5:Ca},Xa=\"pointerdown\",Ya=\"pointermove pointerup pointercancel\";a.MSPointerEvent&&!a.PointerEvent&&(Xa=\"MSPointerDown\",Ya=\"MSPointerMove MSPointerUp MSPointerCancel\"),i(M,x,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace(\"ms\",\"\"),e=Va[d],f=Wa[a.pointerType]||a.pointerType,g=f==za,h=r(b,a.pointerId,\"pointerId\");e&Ea&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ga|Ha)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Za={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},$a=\"touchstart\",_a=\"touchstart touchmove touchend touchcancel\";i(N,x,{handler:function(a){var b=Za[a.type];if(b===Ea&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Ga|Ha)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}}});var ab={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},bb=\"touchstart touchmove touchend touchcancel\";i(P,x,{handler:function(a){var b=ab[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}});var cb=2500,db=25;i(R,x,{handler:function(a,b,c){var d=c.pointerType==za,e=c.pointerType==Ba;if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)S.call(this,b,c);else if(e&&U.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var eb=u(na.style,\"touchAction\"),fb=eb!==d,gb=\"compute\",hb=\"auto\",ib=\"manipulation\",jb=\"none\",kb=\"pan-x\",lb=\"pan-y\",mb=X();V.prototype={set:function(a){a==gb&&(a=this.compute()),fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),W(a.join(\" \"))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,jb)&&!mb[jb],f=p(d,lb)&&!mb[lb],g=p(d,kb)&&!mb[kb];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}return g&&f?void 0:e||f&&c&Na||g&&c&Oa?this.preventSrc(b):void 0},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var nb=1,ob=2,pb=4,qb=8,rb=qb,sb=16,tb=32;Y.prototype={defaults:{},set:function(a){return la(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,\"recognizeWith\",this))return this;var b=this.simultaneous;return a=_(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,\"dropRecognizeWith\",this)?this:(a=_(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,\"requireFailure\",this))return this;var b=this.requireFail;return a=_(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,\"dropRequireFailure\",this))return this;a=_(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;qb>d&&b(c.options.event+Z(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=qb&&b(c.options.event+Z(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=tb)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(tb|nb)))return!1;a++}return!0},recognize:function(a){var b=la({},a);return k(this.options.enable,[this,b])?(this.state&(rb|sb|tb)&&(this.state=nb),this.state=this.process(b),void(this.state&(ob|pb|qb|sb)&&this.tryEmit(b))):(this.reset(),void(this.state=tb))},process:function(a){},getTouchAction:function(){},reset:function(){}},i(aa,Y,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(ob|pb),e=this.attrTest(a);return d&&(c&Ha||!e)?b|sb:d||e?c&Ga?b|qb:b&ob?b|pb:ob:tb}}),i(ba,aa,{defaults:{event:\"pan\",threshold:10,pointers:1,direction:Pa},getTouchAction:function(){var a=this.options.direction,b=[];return a&Na&&b.push(lb),a&Oa&&b.push(kb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&Na?(e=0===f?Ia:0>f?Ja:Ka,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Ia:0>g?La:Ma,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return aa.prototype.attrTest.call(this,a)&&(this.state&ob||!(this.state&ob)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ca,aa,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ob)},emit:function(a){if(1!==a.scale){var b=a.scale<1?\"in\":\"out\";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(da,Y,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[hb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ga|Ha)&&!f)this.reset();else if(a.eventType&Ea)this.reset(),this._timer=e(function(){this.state=rb,this.tryEmit()},b.time,this);else if(a.eventType&Ga)return rb;return tb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===rb&&(a&&a.eventType&Ga?this.manager.emit(this.options.event+\"up\",a):(this._input.timeStamp=ra(),this.manager.emit(this.options.event,this._input)))}}),i(ea,aa,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ob)}}),i(fa,aa,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Na|Oa,pointers:1},getTouchAction:function(){return ba.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Na|Oa)?b=a.overallVelocity:c&Na?b=a.overallVelocityX:c&Oa&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b)>this.options.velocity&&a.eventType&Ga},emit:function(a){var b=$(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(ga,Y,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ib]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&Ea&&0===this.count)return this.failTimeout();if(d&&f&&c){if(a.eventType!=Ga)return this.failTimeout();var g=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||H(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;var i=this.count%b.taps;if(0===i)return this.hasRequireFailures()?(this._timer=e(function(){this.state=rb,this.tryEmit()},b.interval,this),ob):rb}return tb},failTimeout:function(){return this._timer=e(function(){this.state=tb},this.options.interval,this),tb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==rb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ha.VERSION=\"2.0.7\",ha.defaults={domEvents:!1,touchAction:gb,enable:!0,inputTarget:null,inputClass:null,preset:[[ea,{enable:!1}],[ca,{enable:!1},[\"rotate\"]],[fa,{direction:Na}],[ba,{direction:Na},[\"swipe\"]],[ga],[ga,{event:\"doubletap\",taps:2},[\"tap\"]],[da]],cssProps:{userSelect:\"none\",touchSelect:\"none\",touchCallout:\"none\",contentZooming:\"none\",userDrag:\"none\",tapHighlightColor:\"rgba(0,0,0,0)\"}};var ub=1,vb=2;ia.prototype={set:function(a){return la(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?vb:ub},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&rb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(ob|pb|qb)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Y)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(f(a,\"add\",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,\"remove\",this))return this;if(a=this.get(a)){var b=this.recognizers,c=r(b,a);-1!==c&&(b.splice(c,1),this.touchAction.update())}return this},on:function(a,b){if(a!==d&&b!==d){var c=this.handlers;return g(q(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this}},off:function(a,b){if(a!==d){var c=this.handlers;return g(q(a),function(a){b?c[a]&&c[a].splice(r(c[a],b),1):delete c[a]}),this}},emit:function(a,b){this.options.domEvents&&ka(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&ja(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},la(ha,{INPUT_START:Ea,INPUT_MOVE:Fa,INPUT_END:Ga,INPUT_CANCEL:Ha,STATE_POSSIBLE:nb,STATE_BEGAN:ob,STATE_CHANGED:pb,STATE_ENDED:qb,STATE_RECOGNIZED:rb,STATE_CANCELLED:sb,STATE_FAILED:tb,DIRECTION_NONE:Ia,DIRECTION_LEFT:Ja,DIRECTION_RIGHT:Ka,DIRECTION_UP:La,DIRECTION_DOWN:Ma,DIRECTION_HORIZONTAL:Na,DIRECTION_VERTICAL:Oa,DIRECTION_ALL:Pa,Manager:ia,Input:x,TouchAction:V,TouchInput:P,MouseInput:L,PointerEventInput:M,TouchMouseInput:R,SingleTouchInput:N,Recognizer:Y,AttrRecognizer:aa,Tap:ga,Pan:ba,Swipe:fa,Pinch:ca,Rotate:ea,Press:da,on:m,off:n,each:g,merge:ta,extend:sa,assign:la,inherit:i,bindFn:j,prefixed:u});var wb=\"undefined\"!=typeof a?a:\"undefined\"!=typeof self?self:{};wb.Hammer=ha,\"function\"==typeof define&&define.amd?define(function(){return ha}):\"undefined\"!=typeof module&&module.exports?module.exports=ha:a[c]=ha}(window,document,\"Hammer\");\n//# sourceMappingURL=hammer.min.js.map"
  
  /***/ }),
  
  /***/ "../../../../raw-loader/index.js!../../../../showdown/dist/showdown.js":
  /***/ (function(module, exports) {
  
  module.exports = ";/*! showdown v 1.7.4 - 08-09-2017 */\r\n(function(){\r\n/**\n * Created by Tivie on 13-07-2015.\n */\n\nfunction getDefaultOpts (simple) {\n  'use strict';\n\n  var defaultOptions = {\n    omitExtraWLInCodeBlocks: {\n      defaultValue: false,\n      describe: 'Omit the default extra whiteline added to code blocks',\n      type: 'boolean'\n    },\n    noHeaderId: {\n      defaultValue: false,\n      describe: 'Turn on/off generated header id',\n      type: 'boolean'\n    },\n    prefixHeaderId: {\n      defaultValue: false,\n      describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n      type: 'string'\n    },\n    rawPrefixHeaderId: {\n      defaultValue: false,\n      describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n      type: 'boolean'\n    },\n    ghCompatibleHeaderId: {\n      defaultValue: false,\n      describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n      type: 'boolean'\n    },\n    rawHeaderId: {\n      defaultValue: false,\n      describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n      type: 'boolean'\n    },\n    headerLevelStart: {\n      defaultValue: false,\n      describe: 'The header blocks level start',\n      type: 'integer'\n    },\n    parseImgDimensions: {\n      defaultValue: false,\n      describe: 'Turn on/off image dimension parsing',\n      type: 'boolean'\n    },\n    simplifiedAutoLink: {\n      defaultValue: false,\n      describe: 'Turn on/off GFM autolink style',\n      type: 'boolean'\n    },\n    excludeTrailingPunctuationFromURLs: {\n      defaultValue: false,\n      describe: 'Excludes trailing punctuation from links generated with autoLinking',\n      type: 'boolean'\n    },\n    literalMidWordUnderscores: {\n      defaultValue: false,\n      describe: 'Parse midword underscores as literal underscores',\n      type: 'boolean'\n    },\n    literalMidWordAsterisks: {\n      defaultValue: false,\n      describe: 'Parse midword asterisks as literal asterisks',\n      type: 'boolean'\n    },\n    strikethrough: {\n      defaultValue: false,\n      describe: 'Turn on/off strikethrough support',\n      type: 'boolean'\n    },\n    tables: {\n      defaultValue: false,\n      describe: 'Turn on/off tables support',\n      type: 'boolean'\n    },\n    tablesHeaderId: {\n      defaultValue: false,\n      describe: 'Add an id to table headers',\n      type: 'boolean'\n    },\n    ghCodeBlocks: {\n      defaultValue: true,\n      describe: 'Turn on/off GFM fenced code blocks support',\n      type: 'boolean'\n    },\n    tasklists: {\n      defaultValue: false,\n      describe: 'Turn on/off GFM tasklist support',\n      type: 'boolean'\n    },\n    smoothLivePreview: {\n      defaultValue: false,\n      describe: 'Prevents weird effects in live previews due to incomplete input',\n      type: 'boolean'\n    },\n    smartIndentationFix: {\n      defaultValue: false,\n      description: 'Tries to smartly fix indentation in es6 strings',\n      type: 'boolean'\n    },\n    disableForced4SpacesIndentedSublists: {\n      defaultValue: false,\n      description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n      type: 'boolean'\n    },\n    simpleLineBreaks: {\n      defaultValue: false,\n      description: 'Parses simple line breaks as <br> (GFM Style)',\n      type: 'boolean'\n    },\n    requireSpaceBeforeHeadingText: {\n      defaultValue: false,\n      description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n      type: 'boolean'\n    },\n    ghMentions: {\n      defaultValue: false,\n      description: 'Enables github @mentions',\n      type: 'boolean'\n    },\n    ghMentionsLink: {\n      defaultValue: 'https://github.com/{u}',\n      description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n      type: 'string'\n    },\n    encodeEmails: {\n      defaultValue: true,\n      description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n      type: 'boolean'\n    },\n    openLinksInNewWindow: {\n      defaultValue: false,\n      description: 'Open all links in new windows',\n      type: 'boolean'\n    },\n    backslashEscapesHTMLTags: {\n      defaultValue: false,\n      description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n      type: 'boolean'\n    }\n  };\n  if (simple === false) {\n    return JSON.parse(JSON.stringify(defaultOptions));\n  }\n  var ret = {};\n  for (var opt in defaultOptions) {\n    if (defaultOptions.hasOwnProperty(opt)) {\n      ret[opt] = defaultOptions[opt].defaultValue;\n    }\n  }\n  return ret;\n}\n\nfunction allOptionsOn () {\n  'use strict';\n  var options = getDefaultOpts(true),\n      ret = {};\n  for (var opt in options) {\n    if (options.hasOwnProperty(opt)) {\n      ret[opt] = true;\n    }\n  }\n  return ret;\n}\n\r\n/**\n * Created by Tivie on 06-01-2015.\n */\n\n// Private properties\nvar showdown = {},\n    parsers = {},\n    extensions = {},\n    globalOptions = getDefaultOpts(true),\n    setFlavor = 'vanilla',\n    flavor = {\n      github: {\n        omitExtraWLInCodeBlocks:              true,\n        simplifiedAutoLink:                   true,\n        excludeTrailingPunctuationFromURLs:   true,\n        literalMidWordUnderscores:            true,\n        strikethrough:                        true,\n        tables:                               true,\n        tablesHeaderId:                       true,\n        ghCodeBlocks:                         true,\n        tasklists:                            true,\n        disableForced4SpacesIndentedSublists: true,\n        simpleLineBreaks:                     true,\n        requireSpaceBeforeHeadingText:        true,\n        ghCompatibleHeaderId:                 true,\n        ghMentions:                           true,\n        backslashEscapesHTMLTags:             true\n      },\n      original: {\n        noHeaderId:                           true,\n        ghCodeBlocks:                         false\n      },\n      ghost: {\n        omitExtraWLInCodeBlocks:              true,\n        parseImgDimensions:                   true,\n        simplifiedAutoLink:                   true,\n        excludeTrailingPunctuationFromURLs:   true,\n        literalMidWordUnderscores:            true,\n        strikethrough:                        true,\n        tables:                               true,\n        tablesHeaderId:                       true,\n        ghCodeBlocks:                         true,\n        tasklists:                            true,\n        smoothLivePreview:                    true,\n        simpleLineBreaks:                     true,\n        requireSpaceBeforeHeadingText:        true,\n        ghMentions:                           false,\n        encodeEmails:                         true\n      },\n      vanilla: getDefaultOpts(true),\n      allOn: allOptionsOn()\n    };\n\n/**\n * helper namespace\n * @type {{}}\n */\nshowdown.helper = {};\n\n/**\n * TODO LEGACY SUPPORT CODE\n * @type {{}}\n */\nshowdown.extensions = {};\n\n/**\n * Set a global option\n * @static\n * @param {string} key\n * @param {*} value\n * @returns {showdown}\n */\nshowdown.setOption = function (key, value) {\n  'use strict';\n  globalOptions[key] = value;\n  return this;\n};\n\n/**\n * Get a global option\n * @static\n * @param {string} key\n * @returns {*}\n */\nshowdown.getOption = function (key) {\n  'use strict';\n  return globalOptions[key];\n};\n\n/**\n * Get the global options\n * @static\n * @returns {{}}\n */\nshowdown.getOptions = function () {\n  'use strict';\n  return globalOptions;\n};\n\n/**\n * Reset global options to the default values\n * @static\n */\nshowdown.resetOptions = function () {\n  'use strict';\n  globalOptions = getDefaultOpts(true);\n};\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function (name) {\n  'use strict';\n  if (!flavor.hasOwnProperty(name)) {\n    throw Error(name + ' flavor was not found');\n  }\n  showdown.resetOptions();\n  var preset = flavor[name];\n  setFlavor = name;\n  for (var option in preset) {\n    if (preset.hasOwnProperty(option)) {\n      globalOptions[option] = preset[option];\n    }\n  }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function () {\n  'use strict';\n  return setFlavor;\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function (name) {\n  'use strict';\n  if (flavor.hasOwnProperty(name)) {\n    return flavor[name];\n  }\n};\n\n/**\n * Get the default options\n * @static\n * @param {boolean} [simple=true]\n * @returns {{}}\n */\nshowdown.getDefaultOptions = function (simple) {\n  'use strict';\n  return getDefaultOpts(simple);\n};\n\n/**\n * Get or set a subParser\n *\n * subParser(name)       - Get a registered subParser\n * subParser(name, func) - Register a subParser\n * @static\n * @param {string} name\n * @param {function} [func]\n * @returns {*}\n */\nshowdown.subParser = function (name, func) {\n  'use strict';\n  if (showdown.helper.isString(name)) {\n    if (typeof func !== 'undefined') {\n      parsers[name] = func;\n    } else {\n      if (parsers.hasOwnProperty(name)) {\n        return parsers[name];\n      } else {\n        throw Error('SubParser named ' + name + ' not registered!');\n      }\n    }\n  }\n};\n\n/**\n * Gets or registers an extension\n * @static\n * @param {string} name\n * @param {object|function=} ext\n * @returns {*}\n */\nshowdown.extension = function (name, ext) {\n  'use strict';\n\n  if (!showdown.helper.isString(name)) {\n    throw Error('Extension \\'name\\' must be a string');\n  }\n\n  name = showdown.helper.stdExtName(name);\n\n  // Getter\n  if (showdown.helper.isUndefined(ext)) {\n    if (!extensions.hasOwnProperty(name)) {\n      throw Error('Extension named ' + name + ' is not registered!');\n    }\n    return extensions[name];\n\n    // Setter\n  } else {\n    // Expand extension if it's wrapped in a function\n    if (typeof ext === 'function') {\n      ext = ext();\n    }\n\n    // Ensure extension is an array\n    if (!showdown.helper.isArray(ext)) {\n      ext = [ext];\n    }\n\n    var validExtension = validate(ext, name);\n\n    if (validExtension.valid) {\n      extensions[name] = ext;\n    } else {\n      throw Error(validExtension.error);\n    }\n  }\n};\n\n/**\n * Gets all extensions registered\n * @returns {{}}\n */\nshowdown.getAllExtensions = function () {\n  'use strict';\n  return extensions;\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function (name) {\n  'use strict';\n  delete extensions[name];\n};\n\n/**\n * Removes all extensions\n */\nshowdown.resetExtensions = function () {\n  'use strict';\n  extensions = {};\n};\n\n/**\n * Validate extension\n * @param {array} extension\n * @param {string} name\n * @returns {{valid: boolean, error: string}}\n */\nfunction validate (extension, name) {\n  'use strict';\n\n  var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',\n      ret = {\n        valid: true,\n        error: ''\n      };\n\n  if (!showdown.helper.isArray(extension)) {\n    extension = [extension];\n  }\n\n  for (var i = 0; i < extension.length; ++i) {\n    var baseMsg = errMsg + ' sub-extension ' + i + ': ',\n        ext = extension[i];\n    if (typeof ext !== 'object') {\n      ret.valid = false;\n      ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';\n      return ret;\n    }\n\n    if (!showdown.helper.isString(ext.type)) {\n      ret.valid = false;\n      ret.error = baseMsg + 'property \"type\" must be a string, but ' + typeof ext.type + ' given';\n      return ret;\n    }\n\n    var type = ext.type = ext.type.toLowerCase();\n\n    // normalize extension type\n    if (type === 'language') {\n      type = ext.type = 'lang';\n    }\n\n    if (type === 'html') {\n      type = ext.type = 'output';\n    }\n\n    if (type !== 'lang' && type !== 'output' && type !== 'listener') {\n      ret.valid = false;\n      ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: \"lang/language\", \"output/html\" or \"listener\"';\n      return ret;\n    }\n\n    if (type === 'listener') {\n      if (showdown.helper.isUndefined(ext.listeners)) {\n        ret.valid = false;\n        ret.error = baseMsg + '. Extensions of type \"listener\" must have a property called \"listeners\"';\n        return ret;\n      }\n    } else {\n      if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {\n        ret.valid = false;\n        ret.error = baseMsg + type + ' extensions must define either a \"regex\" property or a \"filter\" method';\n        return ret;\n      }\n    }\n\n    if (ext.listeners) {\n      if (typeof ext.listeners !== 'object') {\n        ret.valid = false;\n        ret.error = baseMsg + '\"listeners\" property must be an object but ' + typeof ext.listeners + ' given';\n        return ret;\n      }\n      for (var ln in ext.listeners) {\n        if (ext.listeners.hasOwnProperty(ln)) {\n          if (typeof ext.listeners[ln] !== 'function') {\n            ret.valid = false;\n            ret.error = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback]. listeners.' + ln +\n              ' must be a function but ' + typeof ext.listeners[ln] + ' given';\n            return ret;\n          }\n        }\n      }\n    }\n\n    if (ext.filter) {\n      if (typeof ext.filter !== 'function') {\n        ret.valid = false;\n        ret.error = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + ' given';\n        return ret;\n      }\n    } else if (ext.regex) {\n      if (showdown.helper.isString(ext.regex)) {\n        ext.regex = new RegExp(ext.regex, 'g');\n      }\n      if (!(ext.regex instanceof RegExp)) {\n        ret.valid = false;\n        ret.error = baseMsg + '\"regex\" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';\n        return ret;\n      }\n      if (showdown.helper.isUndefined(ext.replace)) {\n        ret.valid = false;\n        ret.error = baseMsg + '\"regex\" extensions must implement a replace string or function';\n        return ret;\n      }\n    }\n  }\n  return ret;\n}\n\n/**\n * Validate extension\n * @param {object} ext\n * @returns {boolean}\n */\nshowdown.validateExtension = function (ext) {\n  'use strict';\n\n  var validateExtension = validate(ext, null);\n  if (!validateExtension.valid) {\n    console.warn(validateExtension.error);\n    return false;\n  }\n  return true;\n};\n\r\n/**\n * showdownjs helper functions\n */\n\nif (!showdown.hasOwnProperty('helper')) {\n  showdown.helper = {};\n}\n\n/**\n * Check if var is string\n * @static\n * @param {string} a\n * @returns {boolean}\n */\nshowdown.helper.isString = function (a) {\n  'use strict';\n  return (typeof a === 'string' || a instanceof String);\n};\n\n/**\n * Check if var is a function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isFunction = function (a) {\n  'use strict';\n  var getType = {};\n  return a && getType.toString.call(a) === '[object Function]';\n};\n\n/**\n * isArray helper function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isArray = function (a) {\n  'use strict';\n  return Array.isArray(a);\n};\n\n/**\n * Check if value is undefined\n * @static\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n */\nshowdown.helper.isUndefined = function (value) {\n  'use strict';\n  return typeof value === 'undefined';\n};\n\n/**\n * ForEach helper function\n * Iterates over Arrays and Objects (own properties only)\n * @static\n * @param {*} obj\n * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object\n */\nshowdown.helper.forEach = function (obj, callback) {\n  'use strict';\n  // check if obj is defined\n  if (showdown.helper.isUndefined(obj)) {\n    throw new Error('obj param is required');\n  }\n\n  if (showdown.helper.isUndefined(callback)) {\n    throw new Error('callback param is required');\n  }\n\n  if (!showdown.helper.isFunction(callback)) {\n    throw new Error('callback param must be a function/closure');\n  }\n\n  if (typeof obj.forEach === 'function') {\n    obj.forEach(callback);\n  } else if (showdown.helper.isArray(obj)) {\n    for (var i = 0; i < obj.length; i++) {\n      callback(obj[i], i, obj);\n    }\n  } else if (typeof (obj) === 'object') {\n    for (var prop in obj) {\n      if (obj.hasOwnProperty(prop)) {\n        callback(obj[prop], prop, obj);\n      }\n    }\n  } else {\n    throw new Error('obj does not seem to be an array or an iterable object');\n  }\n};\n\n/**\n * Standardidize extension name\n * @static\n * @param {string} s extension name\n * @returns {string}\n */\nshowdown.helper.stdExtName = function (s) {\n  'use strict';\n  return s.replace(/[_?*+\\/\\\\.^-]/g, '').replace(/\\s/g, '').toLowerCase();\n};\n\nfunction escapeCharactersCallback (wholeMatch, m1) {\n  'use strict';\n  var charCodeToEscape = m1.charCodeAt(0);\n  return '¨E' + charCodeToEscape + 'E';\n}\n\n/**\n * Callback used to escape characters when passing through String.replace\n * @static\n * @param {string} wholeMatch\n * @param {string} m1\n * @returns {string}\n */\nshowdown.helper.escapeCharactersCallback = escapeCharactersCallback;\n\n/**\n * Escape characters in a string\n * @static\n * @param {string} text\n * @param {string} charsToEscape\n * @param {boolean} afterBackslash\n * @returns {XML|string|void|*}\n */\nshowdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {\n  'use strict';\n  // First we have to escape the escape characters so that\n  // we can build a character class out of them\n  var regexString = '([' + charsToEscape.replace(/([\\[\\]\\\\])/g, '\\\\$1') + '])';\n\n  if (afterBackslash) {\n    regexString = '\\\\\\\\' + regexString;\n  }\n\n  var regex = new RegExp(regexString, 'g');\n  text = text.replace(regex, escapeCharactersCallback);\n\n  return text;\n};\n\nvar rgxFindMatchPos = function (str, left, right, flags) {\n  'use strict';\n  var f = flags || '',\n      g = f.indexOf('g') > -1,\n      x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),\n      l = new RegExp(left, f.replace(/g/g, '')),\n      pos = [],\n      t, s, m, start, end;\n\n  do {\n    t = 0;\n    while ((m = x.exec(str))) {\n      if (l.test(m[0])) {\n        if (!(t++)) {\n          s = x.lastIndex;\n          start = s - m[0].length;\n        }\n      } else if (t) {\n        if (!--t) {\n          end = m.index + m[0].length;\n          var obj = {\n            left: {start: start, end: s},\n            match: {start: s, end: m.index},\n            right: {start: m.index, end: end},\n            wholeMatch: {start: start, end: end}\n          };\n          pos.push(obj);\n          if (!g) {\n            return pos;\n          }\n        }\n      }\n    }\n  } while (t && (x.lastIndex = s));\n\n  return pos;\n};\n\n/**\n * matchRecursiveRegExp\n *\n * (c) 2007 Steven Levithan <stevenlevithan.com>\n * MIT License\n *\n * Accepts a string to search, a left and right format delimiter\n * as regex patterns, and optional regex flags. Returns an array\n * of matches, allowing nested instances of left/right delimiters.\n * Use the \"g\" flag to return all matches, otherwise only the\n * first is returned. Be careful to ensure that the left and\n * right format delimiters produce mutually exclusive matches.\n * Backreferences are not supported within the right delimiter\n * due to how it is internally combined with the left delimiter.\n * When matching strings whose format delimiters are unbalanced\n * to the left or right, the output is intentionally as a\n * conventional regex library with recursion support would\n * produce, e.g. \"<<x>\" and \"<x>>\" both produce [\"x\"] when using\n * \"<\" and \">\" as the delimiters (both strings contain a single,\n * balanced instance of \"<x>\").\n *\n * examples:\n * matchRecursiveRegExp(\"test\", \"\\\\(\", \"\\\\)\")\n * returns: []\n * matchRecursiveRegExp(\"<t<<e>><s>>t<>\", \"<\", \">\", \"g\")\n * returns: [\"t<<e>><s>\", \"\"]\n * matchRecursiveRegExp(\"<div id=\\\"x\\\">test</div>\", \"<div\\\\b[^>]*>\", \"</div>\", \"gi\")\n * returns: [\"test\"]\n */\nshowdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {\n  'use strict';\n\n  var matchPos = rgxFindMatchPos (str, left, right, flags),\n      results = [];\n\n  for (var i = 0; i < matchPos.length; ++i) {\n    results.push([\n      str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n      str.slice(matchPos[i].match.start, matchPos[i].match.end),\n      str.slice(matchPos[i].left.start, matchPos[i].left.end),\n      str.slice(matchPos[i].right.start, matchPos[i].right.end)\n    ]);\n  }\n  return results;\n};\n\n/**\n *\n * @param {string} str\n * @param {string|function} replacement\n * @param {string} left\n * @param {string} right\n * @param {string} flags\n * @returns {string}\n */\nshowdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {\n  'use strict';\n\n  if (!showdown.helper.isFunction(replacement)) {\n    var repStr = replacement;\n    replacement = function () {\n      return repStr;\n    };\n  }\n\n  var matchPos = rgxFindMatchPos(str, left, right, flags),\n      finalStr = str,\n      lng = matchPos.length;\n\n  if (lng > 0) {\n    var bits = [];\n    if (matchPos[0].wholeMatch.start !== 0) {\n      bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n    }\n    for (var i = 0; i < lng; ++i) {\n      bits.push(\n        replacement(\n          str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n          str.slice(matchPos[i].match.start, matchPos[i].match.end),\n          str.slice(matchPos[i].left.start, matchPos[i].left.end),\n          str.slice(matchPos[i].right.start, matchPos[i].right.end)\n        )\n      );\n      if (i < lng - 1) {\n        bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));\n      }\n    }\n    if (matchPos[lng - 1].wholeMatch.end < str.length) {\n      bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));\n    }\n    finalStr = bits.join('');\n  }\n  return finalStr;\n};\n\n/**\n * Returns the index within the passed String object of the first occurrence of the specified regex,\n * starting the search at fromIndex. Returns -1 if the value is not found.\n *\n * @param {string} str string to search\n * @param {RegExp} regex Regular expression to search\n * @param {int} [fromIndex = 0] Index to start the search\n * @returns {Number}\n * @throws InvalidArgumentError\n */\nshowdown.helper.regexIndexOf = function (str, regex, fromIndex) {\n  'use strict';\n  if (!showdown.helper.isString(str)) {\n    throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n  }\n  if (regex instanceof RegExp === false) {\n    throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';\n  }\n  var indexOf = str.substring(fromIndex || 0).search(regex);\n  return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;\n};\n\n/**\n * Splits the passed string object at the defined index, and returns an array composed of the two substrings\n * @param {string} str string to split\n * @param {int} index index to split string at\n * @returns {[string,string]}\n * @throws InvalidArgumentError\n */\nshowdown.helper.splitAtIndex = function (str, index) {\n  'use strict';\n  if (!showdown.helper.isString(str)) {\n    throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n  }\n  return [str.substring(0, index), str.substring(index)];\n};\n\n/**\n * Obfuscate an e-mail address through the use of Character Entities,\n * transforming ASCII characters into their equivalent decimal or hex entities.\n *\n * Since it has a random component, subsequent calls to this function produce different results\n *\n * @param {string} mail\n * @returns {string}\n */\nshowdown.helper.encodeEmailAddress = function (mail) {\n  'use strict';\n  var encode = [\n    function (ch) {\n      return '&#' + ch.charCodeAt(0) + ';';\n    },\n    function (ch) {\n      return '&#x' + ch.charCodeAt(0).toString(16) + ';';\n    },\n    function (ch) {\n      return ch;\n    }\n  ];\n\n  mail = mail.replace(/./g, function (ch) {\n    if (ch === '@') {\n      // this *must* be encoded. I insist.\n      ch = encode[Math.floor(Math.random() * 2)](ch);\n    } else {\n      var r = Math.random();\n      // roughly 10% raw, 45% hex, 45% dec\n      ch = (\n        r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)\n      );\n    }\n    return ch;\n  });\n\n  return mail;\n};\n\n/**\n * POLYFILLS\n */\n// use this instead of builtin is undefined for IE8 compatibility\nif (typeof(console) === 'undefined') {\n  console = {\n    warn: function (msg) {\n      'use strict';\n      alert(msg);\n    },\n    log: function (msg) {\n      'use strict';\n      alert(msg);\n    },\n    error: function (msg) {\n      'use strict';\n      throw msg;\n    }\n  };\n}\n\n/**\n * Common regexes.\n * We declare some common regexes to improve performance\n */\nshowdown.helper.regexes = {\n  asteriskAndDash: /([*_])/g\n};\n\r\n/**\n * Created by Estevao on 31-05-2015.\n */\n\n/**\n * Showdown Converter class\n * @class\n * @param {object} [converterOptions]\n * @returns {Converter}\n */\nshowdown.Converter = function (converterOptions) {\n  'use strict';\n\n  var\n      /**\n       * Options used by this converter\n       * @private\n       * @type {{}}\n       */\n      options = {},\n\n      /**\n       * Language extensions used by this converter\n       * @private\n       * @type {Array}\n       */\n      langExtensions = [],\n\n      /**\n       * Output modifiers extensions used by this converter\n       * @private\n       * @type {Array}\n       */\n      outputModifiers = [],\n\n      /**\n       * Event listeners\n       * @private\n       * @type {{}}\n       */\n      listeners = {},\n\n      /**\n       * The flavor set in this converter\n       */\n      setConvFlavor = setFlavor;\n\n  _constructor();\n\n  /**\n   * Converter constructor\n   * @private\n   */\n  function _constructor () {\n    converterOptions = converterOptions || {};\n\n    for (var gOpt in globalOptions) {\n      if (globalOptions.hasOwnProperty(gOpt)) {\n        options[gOpt] = globalOptions[gOpt];\n      }\n    }\n\n    // Merge options\n    if (typeof converterOptions === 'object') {\n      for (var opt in converterOptions) {\n        if (converterOptions.hasOwnProperty(opt)) {\n          options[opt] = converterOptions[opt];\n        }\n      }\n    } else {\n      throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +\n      ' was passed instead.');\n    }\n\n    if (options.extensions) {\n      showdown.helper.forEach(options.extensions, _parseExtension);\n    }\n  }\n\n  /**\n   * Parse extension\n   * @param {*} ext\n   * @param {string} [name='']\n   * @private\n   */\n  function _parseExtension (ext, name) {\n\n    name = name || null;\n    // If it's a string, the extension was previously loaded\n    if (showdown.helper.isString(ext)) {\n      ext = showdown.helper.stdExtName(ext);\n      name = ext;\n\n      // LEGACY_SUPPORT CODE\n      if (showdown.extensions[ext]) {\n        console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +\n          'Please inform the developer that the extension should be updated!');\n        legacyExtensionLoading(showdown.extensions[ext], ext);\n        return;\n      // END LEGACY SUPPORT CODE\n\n      } else if (!showdown.helper.isUndefined(extensions[ext])) {\n        ext = extensions[ext];\n\n      } else {\n        throw Error('Extension \"' + ext + '\" could not be loaded. It was either not found or is not a valid extension.');\n      }\n    }\n\n    if (typeof ext === 'function') {\n      ext = ext();\n    }\n\n    if (!showdown.helper.isArray(ext)) {\n      ext = [ext];\n    }\n\n    var validExt = validate(ext, name);\n    if (!validExt.valid) {\n      throw Error(validExt.error);\n    }\n\n    for (var i = 0; i < ext.length; ++i) {\n      switch (ext[i].type) {\n\n        case 'lang':\n          langExtensions.push(ext[i]);\n          break;\n\n        case 'output':\n          outputModifiers.push(ext[i]);\n          break;\n      }\n      if (ext[i].hasOwnProperty('listeners')) {\n        for (var ln in ext[i].listeners) {\n          if (ext[i].listeners.hasOwnProperty(ln)) {\n            listen(ln, ext[i].listeners[ln]);\n          }\n        }\n      }\n    }\n\n  }\n\n  /**\n   * LEGACY_SUPPORT\n   * @param {*} ext\n   * @param {string} name\n   */\n  function legacyExtensionLoading (ext, name) {\n    if (typeof ext === 'function') {\n      ext = ext(new showdown.Converter());\n    }\n    if (!showdown.helper.isArray(ext)) {\n      ext = [ext];\n    }\n    var valid = validate(ext, name);\n\n    if (!valid.valid) {\n      throw Error(valid.error);\n    }\n\n    for (var i = 0; i < ext.length; ++i) {\n      switch (ext[i].type) {\n        case 'lang':\n          langExtensions.push(ext[i]);\n          break;\n        case 'output':\n          outputModifiers.push(ext[i]);\n          break;\n        default:// should never reach here\n          throw Error('Extension loader error: Type unrecognized!!!');\n      }\n    }\n  }\n\n  /**\n   * Listen to an event\n   * @param {string} name\n   * @param {function} callback\n   */\n  function listen (name, callback) {\n    if (!showdown.helper.isString(name)) {\n      throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');\n    }\n\n    if (typeof callback !== 'function') {\n      throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');\n    }\n\n    if (!listeners.hasOwnProperty(name)) {\n      listeners[name] = [];\n    }\n    listeners[name].push(callback);\n  }\n\n  function rTrimInputText (text) {\n    var rsp = text.match(/^\\s*/)[0].length,\n        rgx = new RegExp('^\\\\s{0,' + rsp + '}', 'gm');\n    return text.replace(rgx, '');\n  }\n\n  /**\n   * Dispatch an event\n   * @private\n   * @param {string} evtName Event name\n   * @param {string} text Text\n   * @param {{}} options Converter Options\n   * @param {{}} globals\n   * @returns {string}\n   */\n  this._dispatch = function dispatch (evtName, text, options, globals) {\n    if (listeners.hasOwnProperty(evtName)) {\n      for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n        var nText = listeners[evtName][ei](evtName, text, this, options, globals);\n        if (nText && typeof nText !== 'undefined') {\n          text = nText;\n        }\n      }\n    }\n    return text;\n  };\n\n  /**\n   * Listen to an event\n   * @param {string} name\n   * @param {function} callback\n   * @returns {showdown.Converter}\n   */\n  this.listen = function (name, callback) {\n    listen(name, callback);\n    return this;\n  };\n\n  /**\n   * Converts a markdown string into HTML\n   * @param {string} text\n   * @returns {*}\n   */\n  this.makeHtml = function (text) {\n    //check if text is not falsy\n    if (!text) {\n      return text;\n    }\n\n    var globals = {\n      gHtmlBlocks:     [],\n      gHtmlMdBlocks:   [],\n      gHtmlSpans:      [],\n      gUrls:           {},\n      gTitles:         {},\n      gDimensions:     {},\n      gListLevel:      0,\n      hashLinkCounts:  {},\n      langExtensions:  langExtensions,\n      outputModifiers: outputModifiers,\n      converter:       this,\n      ghCodeBlocks:    []\n    };\n\n    // This lets us use ¨ trema as an escape char to avoid md5 hashes\n    // The choice of character is arbitrary; anything that isn't\n    // magic in Markdown will work.\n    text = text.replace(/¨/g, '¨T');\n\n    // Replace $ with ¨D\n    // RegExp interprets $ as a special character\n    // when it's in a replacement string\n    text = text.replace(/\\$/g, '¨D');\n\n    // Standardize line endings\n    text = text.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n    text = text.replace(/\\r/g, '\\n'); // Mac to Unix\n\n    // Stardardize line spaces (nbsp causes trouble in older browsers and some regex flavors)\n    text = text.replace(/\\u00A0/g, ' ');\n\n    if (options.smartIndentationFix) {\n      text = rTrimInputText(text);\n    }\n\n    // Make sure text begins and ends with a couple of newlines:\n    text = '\\n\\n' + text + '\\n\\n';\n\n    // detab\n    text = showdown.subParser('detab')(text, options, globals);\n\n    /**\n     * Strip any lines consisting only of spaces and tabs.\n     * This makes subsequent regexs easier to write, because we can\n     * match consecutive blank lines with /\\n+/ instead of something\n     * contorted like /[ \\t]*\\n+/\n     */\n    text = text.replace(/^[ \\t]+$/mg, '');\n\n    //run languageExtensions\n    showdown.helper.forEach(langExtensions, function (ext) {\n      text = showdown.subParser('runExtension')(ext, text, options, globals);\n    });\n\n    // run the sub parsers\n    text = showdown.subParser('hashPreCodeTags')(text, options, globals);\n    text = showdown.subParser('githubCodeBlocks')(text, options, globals);\n    text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n    text = showdown.subParser('hashCodeTags')(text, options, globals);\n    text = showdown.subParser('stripLinkDefinitions')(text, options, globals);\n    text = showdown.subParser('blockGamut')(text, options, globals);\n    text = showdown.subParser('unhashHTMLSpans')(text, options, globals);\n    text = showdown.subParser('unescapeSpecialChars')(text, options, globals);\n\n    // attacklab: Restore dollar signs\n    text = text.replace(/¨D/g, '$$');\n\n    // attacklab: Restore tremas\n    text = text.replace(/¨T/g, '¨');\n\n    // Run output modifiers\n    showdown.helper.forEach(outputModifiers, function (ext) {\n      text = showdown.subParser('runExtension')(ext, text, options, globals);\n    });\n\n    return text;\n  };\n\n  /**\n   * Set an option of this Converter instance\n   * @param {string} key\n   * @param {*} value\n   */\n  this.setOption = function (key, value) {\n    options[key] = value;\n  };\n\n  /**\n   * Get the option of this Converter instance\n   * @param {string} key\n   * @returns {*}\n   */\n  this.getOption = function (key) {\n    return options[key];\n  };\n\n  /**\n   * Get the options of this Converter instance\n   * @returns {{}}\n   */\n  this.getOptions = function () {\n    return options;\n  };\n\n  /**\n   * Add extension to THIS converter\n   * @param {{}} extension\n   * @param {string} [name=null]\n   */\n  this.addExtension = function (extension, name) {\n    name = name || null;\n    _parseExtension(extension, name);\n  };\n\n  /**\n   * Use a global registered extension with THIS converter\n   * @param {string} extensionName Name of the previously registered extension\n   */\n  this.useExtension = function (extensionName) {\n    _parseExtension(extensionName);\n  };\n\n  /**\n   * Set the flavor THIS converter should use\n   * @param {string} name\n   */\n  this.setFlavor = function (name) {\n    if (!flavor.hasOwnProperty(name)) {\n      throw Error(name + ' flavor was not found');\n    }\n    var preset = flavor[name];\n    setConvFlavor = name;\n    for (var option in preset) {\n      if (preset.hasOwnProperty(option)) {\n        options[option] = preset[option];\n      }\n    }\n  };\n\n  /**\n   * Get the currently set flavor of this converter\n   * @returns {string}\n   */\n  this.getFlavor = function () {\n    return setConvFlavor;\n  };\n\n  /**\n   * Remove an extension from THIS converter.\n   * Note: This is a costly operation. It's better to initialize a new converter\n   * and specify the extensions you wish to use\n   * @param {Array} extension\n   */\n  this.removeExtension = function (extension) {\n    if (!showdown.helper.isArray(extension)) {\n      extension = [extension];\n    }\n    for (var a = 0; a < extension.length; ++a) {\n      var ext = extension[a];\n      for (var i = 0; i < langExtensions.length; ++i) {\n        if (langExtensions[i] === ext) {\n          langExtensions[i].splice(i, 1);\n        }\n      }\n      for (var ii = 0; ii < outputModifiers.length; ++i) {\n        if (outputModifiers[ii] === ext) {\n          outputModifiers[ii].splice(i, 1);\n        }\n      }\n    }\n  };\n\n  /**\n   * Get all extension of THIS converter\n   * @returns {{language: Array, output: Array}}\n   */\n  this.getAllExtensions = function () {\n    return {\n      language: langExtensions,\n      output: outputModifiers\n    };\n  };\n};\n\r\n/**\n * Turn Markdown link shortcuts into XHTML <a> tags.\n */\nshowdown.subParser('anchors', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('anchors.before', text, options, globals);\n\n  var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {\n    if (showdown.helper.isUndefined(title)) {\n      title = '';\n    }\n    linkId = linkId.toLowerCase();\n\n    // Special case for explicit empty url\n    if (wholeMatch.search(/\\(<?\\s*>? ?(['\"].*['\"])?\\)$/m) > -1) {\n      url = '';\n    } else if (!url) {\n      if (!linkId) {\n        // lower-case and turn embedded newlines into spaces\n        linkId = linkText.toLowerCase().replace(/ ?\\n/g, ' ');\n      }\n      url = '#' + linkId;\n\n      if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {\n        url = globals.gUrls[linkId];\n        if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {\n          title = globals.gTitles[linkId];\n        }\n      } else {\n        return wholeMatch;\n      }\n    }\n\n    //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance\n    url = url.replace(showdown.helper.regexes.asteriskAndDash, showdown.helper.escapeCharactersCallback);\n\n    var result = '<a href=\"' + url + '\"';\n\n    if (title !== '' && title !== null) {\n      title = title.replace(/\"/g, '&quot;');\n      //title = showdown.helper.escapeCharacters(title, '*_', false); // replaced line to improve performance\n      title = title.replace(showdown.helper.regexes.asteriskAndDash, showdown.helper.escapeCharactersCallback);\n      result += ' title=\"' + title + '\"';\n    }\n\n    if (options.openLinksInNewWindow) {\n      // escaped _\n      result += ' target=\"¨E95Eblank\"';\n    }\n\n    result += '>' + linkText + '</a>';\n\n    return result;\n  };\n\n  // First, handle reference-style links: [link text] [id]\n  text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)] ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n\n  // Next, inline-style links: [link text](url \"optional title\")\n  // cases with crazy urls like ./image/cat1).png\n  text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n    writeAnchorTag);\n\n  // normal cases\n  text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<?([\\S]+?(?:\\([\\S]*?\\)[\\S]*?)?)>?(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n                      writeAnchorTag);\n\n  // handle reference-style shortcuts: [link text]\n  // These must come last in case you've also got [link test][1]\n  // or [link test](/foo)\n  text = text.replace(/\\[([^\\[\\]]+)]()()()()()/g, writeAnchorTag);\n\n  // Lastly handle GithubMentions if option is enabled\n  if (options.ghMentions) {\n    text = text.replace(/(^|\\s)(\\\\)?(@([a-z\\d\\-]+))(?=[.!?;,[\\]()]|\\s|$)/gmi, function (wm, st, escape, mentions, username) {\n      if (escape === '\\\\') {\n        return st + mentions;\n      }\n\n      //check if options.ghMentionsLink is a string\n      if (!showdown.helper.isString(options.ghMentionsLink)) {\n        throw new Error('ghMentionsLink option must be a string');\n      }\n      var lnk = options.ghMentionsLink.replace(/\\{u}/g, username),\n          target = '';\n      if (options.openLinksInNewWindow) {\n        target = ' target=\"¨E95Eblank\"';\n      }\n      return st + '<a href=\"' + lnk + '\"' + target + '>' + mentions + '</a>';\n    });\n  }\n\n  text = globals.converter._dispatch('anchors.after', text, options, globals);\n  return text;\n});\n\r\n// url allowed chars [a-z\\d_.~:/?#[]@!$&'()*+,;=-]\n\nvar simpleURLRegex  = /\\b(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+)()(?=\\s|$)(?![\"<>])/gi,\n    simpleURLRegex2 = /\\b(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]]?)(?=\\s|$)(?![\"<>])/gi,\n    //simpleURLRegex3 = /\\b(((https?|ftp):\\/\\/|www\\.)[a-z\\d.-]+\\.[a-z\\d_.~:/?#\\[\\]@!$&'()*+,;=-]+?)([.!?()]?)(?=\\s|$)(?![\"<>])/gi,\n    delimUrlRegex   = /<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>/gi,\n    simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,\n    delimMailRegex  = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,\n\n    replaceLink = function (options) {\n      'use strict';\n\n      return function (wm, link, m2, m3, trailingPunctuation) {\n        var lnkTxt = link,\n            append = '',\n            target = '';\n        if (/^www\\./i.test(link)) {\n          link = link.replace(/^www\\./i, 'http://www.');\n        }\n        if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {\n          append = trailingPunctuation;\n        }\n        if (options.openLinksInNewWindow) {\n          target = ' target=\"¨E95Eblank\"';\n        }\n        return '<a href=\"' + link + '\"' + target + '>' + lnkTxt + '</a>' + append;\n      };\n    },\n\n    replaceMail = function (options, globals) {\n      'use strict';\n      return function (wholeMatch, b, mail) {\n        var href = 'mailto:';\n        b = b || '';\n        mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);\n        if (options.encodeEmails) {\n          href = showdown.helper.encodeEmailAddress(href + mail);\n          mail = showdown.helper.encodeEmailAddress(mail);\n        } else {\n          href = href + mail;\n        }\n        return b + '<a href=\"' + href + '\">' + mail + '</a>';\n      };\n    };\n\nshowdown.subParser('autoLinks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('autoLinks.before', text, options, globals);\n\n  text = text.replace(delimUrlRegex, replaceLink(options));\n  text = text.replace(delimMailRegex, replaceMail(options, globals));\n\n  text = globals.converter._dispatch('autoLinks.after', text, options, globals);\n\n  return text;\n});\n\nshowdown.subParser('simplifiedAutoLinks', function (text, options, globals) {\n  'use strict';\n\n  if (!options.simplifiedAutoLink) {\n    return text;\n  }\n\n  text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);\n\n  if (options.excludeTrailingPunctuationFromURLs) {\n    text = text.replace(simpleURLRegex2, replaceLink(options));\n  } else {\n    text = text.replace(simpleURLRegex, replaceLink(options));\n  }\n  text = text.replace(simpleMailRegex, replaceMail(options, globals));\n\n  text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);\n\n  return text;\n});\n\r\n/**\n * These are all the transformations that form block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('blockGamut', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('blockGamut.before', text, options, globals);\n\n  // we parse blockquotes first so that we can have headings and hrs\n  // inside blockquotes\n  text = showdown.subParser('blockQuotes')(text, options, globals);\n  text = showdown.subParser('headers')(text, options, globals);\n\n  // Do Horizontal Rules:\n  text = showdown.subParser('horizontalRule')(text, options, globals);\n\n  text = showdown.subParser('lists')(text, options, globals);\n  text = showdown.subParser('codeBlocks')(text, options, globals);\n  text = showdown.subParser('tables')(text, options, globals);\n\n  // We already ran _HashHTMLBlocks() before, in Markdown(), but that\n  // was to escape raw HTML in the original Markdown source. This time,\n  // we're escaping the markup we've just created, so that we don't wrap\n  // <p> tags around block-level tags.\n  text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n  text = showdown.subParser('paragraphs')(text, options, globals);\n\n  text = globals.converter._dispatch('blockGamut.after', text, options, globals);\n\n  return text;\n});\n\r\nshowdown.subParser('blockQuotes', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('blockQuotes.before', text, options, globals);\n\n  text = text.replace(/((^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+)/gm, function (wholeMatch, m1) {\n    var bq = m1;\n\n    // attacklab: hack around Konqueror 3.5.4 bug:\n    // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n    bq = bq.replace(/^[ \\t]*>[ \\t]?/gm, '¨0'); // trim one level of quoting\n\n    // attacklab: clean up hack\n    bq = bq.replace(/¨0/g, '');\n\n    bq = bq.replace(/^[ \\t]+$/gm, ''); // trim whitespace-only lines\n    bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);\n    bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse\n\n    bq = bq.replace(/(^|\\n)/g, '$1  ');\n    // These leading spaces screw with <pre> content, so we need to fix that:\n    bq = bq.replace(/(\\s*<pre>[^\\r]+?<\\/pre>)/gm, function (wholeMatch, m1) {\n      var pre = m1;\n      // attacklab: hack around Konqueror 3.5.4 bug:\n      pre = pre.replace(/^  /mg, '¨0');\n      pre = pre.replace(/¨0/g, '');\n      return pre;\n    });\n\n    return showdown.subParser('hashBlock')('<blockquote>\\n' + bq + '\\n</blockquote>', options, globals);\n  });\n\n  text = globals.converter._dispatch('blockQuotes.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Process Markdown `<pre><code>` blocks.\n */\nshowdown.subParser('codeBlocks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);\n\n  // sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var pattern = /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n  text = text.replace(pattern, function (wholeMatch, m1, m2) {\n    var codeblock = m1,\n        nextChar = m2,\n        end = '\\n';\n\n    codeblock = showdown.subParser('outdent')(codeblock, options, globals);\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing newlines\n\n    if (options.omitExtraWLInCodeBlocks) {\n      end = '';\n    }\n\n    codeblock = '<pre><code>' + codeblock + end + '</code></pre>';\n\n    return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;\n  });\n\n  // strip sentinel\n  text = text.replace(/¨0/, '');\n\n  text = globals.converter._dispatch('codeBlocks.after', text, options, globals);\n  return text;\n});\n\r\n/**\n *\n *   *  Backtick quotes are used for <code></code> spans.\n *\n *   *  You can use multiple backticks as the delimiters if you want to\n *     include literal backticks in the code span. So, this input:\n *\n *         Just type ``foo `bar` baz`` at the prompt.\n *\n *       Will translate to:\n *\n *         <p>Just type <code>foo `bar` baz</code> at the prompt.</p>\n *\n *    There's no arbitrary limit to the number of backticks you\n *    can use as delimters. If you need three consecutive backticks\n *    in your code, use four for delimiters, etc.\n *\n *  *  You can use spaces to get literal backticks at the edges:\n *\n *         ... type `` `bar` `` ...\n *\n *       Turns to:\n *\n *         ... type <code>`bar`</code> ...\n */\nshowdown.subParser('codeSpans', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeSpans.before', text, options, globals);\n\n  if (typeof(text) === 'undefined') {\n    text = '';\n  }\n  text = text.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n    function (wholeMatch, m1, m2, m3) {\n      var c = m3;\n      c = c.replace(/^([ \\t]*)/g, '');\t// leading whitespace\n      c = c.replace(/[ \\t]*$/g, '');\t// trailing whitespace\n      c = showdown.subParser('encodeCode')(c, options, globals);\n      return m1 + '<code>' + c + '</code>';\n    }\n  );\n\n  text = globals.converter._dispatch('codeSpans.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Convert all tabs to spaces\n */\nshowdown.subParser('detab', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('detab.before', text, options, globals);\n\n  // expand first n-1 tabs\n  text = text.replace(/\\t(?=\\t)/g, '    '); // g_tab_width\n\n  // replace the nth with two sentinels\n  text = text.replace(/\\t/g, '¨A¨B');\n\n  // use the sentinel to anchor our regex so it doesn't explode\n  text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {\n    var leadingText = m1,\n        numSpaces = 4 - leadingText.length % 4;  // g_tab_width\n\n    // there *must* be a better way to do this:\n    for (var i = 0; i < numSpaces; i++) {\n      leadingText += ' ';\n    }\n\n    return leadingText;\n  });\n\n  // clean up sentinels\n  text = text.replace(/¨A/g, '    ');  // g_tab_width\n  text = text.replace(/¨B/g, '');\n\n  text = globals.converter._dispatch('detab.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Smart processing for ampersands and angle brackets that need to be encoded.\n */\nshowdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);\n\n  // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:\n  // http://bumppo.net/projects/amputator/\n  text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g, '&amp;');\n\n  // Encode naked <'s\n  text = text.replace(/<(?![a-z\\/?$!])/gi, '&lt;');\n\n  // Encode <\n  text = text.replace(/</g, '&lt;');\n\n  // Encode >\n  text = text.replace(/>/g, '&gt;');\n\n  text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Returns the string, with after processing the following backslash escape sequences.\n *\n * attacklab: The polite way to do this is with the new escapeCharacters() function:\n *\n *    text = escapeCharacters(text,\"\\\\\",true);\n *    text = escapeCharacters(text,\"`*_{}[]()>#+-.!\",true);\n *\n * ...but we're sidestepping its use of the (slow) RegExp constructor\n * as an optimization for Firefox.  This function gets called a LOT.\n */\nshowdown.subParser('encodeBackslashEscapes', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);\n\n  text = text.replace(/\\\\(\\\\)/g, showdown.helper.escapeCharactersCallback);\n  text = text.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);\n\n  text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Encode/escape certain characters inside Markdown code runs.\n * The point is that in code, these characters are literals,\n * and lose their special Markdown meanings.\n */\nshowdown.subParser('encodeCode', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('encodeCode.before', text, options, globals);\n\n  // Encode all ampersands; HTML entities are not\n  // entities within a Markdown code span.\n  text = text\n    .replace(/&/g, '&amp;')\n  // Do the angle bracket song and dance:\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n  // Now, escape characters that are magic in Markdown:\n    .replace(/([*_{}\\[\\]\\\\=~-])/g, showdown.helper.escapeCharactersCallback);\n\n  text = globals.converter._dispatch('encodeCode.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Within tags -- meaning between < and > -- encode [\\ ` * _ ~ =] so they\n * don't conflict with their use in Markdown for code, italics and strong.\n */\nshowdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);\n\n  // Build a regex to find HTML tags and comments.  See Friedl's\n  // \"Mastering Regular Expressions\", 2nd Ed., pp. 200-201.\n  var regex = /(<[a-z\\/!$](\"[^\"]*\"|'[^']*'|[^'\">])*>|<!(--.*?--\\s*)+>)/gi;\n\n  text = text.replace(regex, function (wholeMatch) {\n    return wholeMatch\n      .replace(/(.)<\\/?code>(?=.)/g, '$1`')\n      .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n  });\n\n  text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Handle github codeblocks prior to running HashHTML so that\n * HTML contained within the codeblock gets escaped properly\n * Example:\n * ```ruby\n *     def hello_world(x)\n *       puts \"Hello, #{x}\"\n *     end\n * ```\n */\nshowdown.subParser('githubCodeBlocks', function (text, options, globals) {\n  'use strict';\n\n  // early exit if option is not enabled\n  if (!options.ghCodeBlocks) {\n    return text;\n  }\n\n  text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n  text += '¨0';\n\n  text = text.replace(/(?:^|\\n)```(.*)\\n([\\s\\S]*?)\\n```/g, function (wholeMatch, language, codeblock) {\n    var end = (options.omitExtraWLInCodeBlocks) ? '' : '\\n';\n\n    // First parse the github code block\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n    codeblock = '<pre><code' + (language ? ' class=\"' + language + ' language-' + language + '\"' : '') + '>' + codeblock + end + '</code></pre>';\n\n    codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n    // Since GHCodeblocks can be false positives, we need to\n    // store the primitive text and the parsed text in a global var,\n    // and then return a token\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  });\n\n  // attacklab: strip sentinel\n  text = text.replace(/¨0/, '');\n\n  return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n\r\nshowdown.subParser('hashBlock', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashBlock.before', text, options, globals);\n  text = text.replace(/(^\\n+|\\n+$)/g, '');\n  text = '\\n\\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\\n\\n';\n  text = globals.converter._dispatch('hashBlock.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Hash and escape <code> elements that should not be parsed as markdown\n */\nshowdown.subParser('hashCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';\n  };\n\n  // Hash naked <code>\n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '<code\\\\b[^>]*>', '</code>', 'gim');\n\n  text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);\n  return text;\n});\n\r\nshowdown.subParser('hashElement', function (text, options, globals) {\n  'use strict';\n\n  return function (wholeMatch, m1) {\n    var blockText = m1;\n\n    // Undo double lines\n    blockText = blockText.replace(/\\n\\n/g, '\\n');\n    blockText = blockText.replace(/^\\n/, '');\n\n    // strip trailing blank lines\n    blockText = blockText.replace(/\\n+$/g, '');\n\n    // Replace the element text with a marker (\"¨KxK\" where x is its key)\n    blockText = '\\n\\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\\n\\n';\n\n    return blockText;\n  };\n});\n\r\nshowdown.subParser('hashHTMLBlocks', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);\n\n  var blockTags = [\n        'pre',\n        'div',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'blockquote',\n        'table',\n        'dl',\n        'ol',\n        'ul',\n        'script',\n        'noscript',\n        'form',\n        'fieldset',\n        'iframe',\n        'math',\n        'style',\n        'section',\n        'header',\n        'footer',\n        'nav',\n        'article',\n        'aside',\n        'address',\n        'audio',\n        'canvas',\n        'figure',\n        'hgroup',\n        'output',\n        'video',\n        'p'\n      ],\n      repFunc = function (wholeMatch, match, left, right) {\n        var txt = wholeMatch;\n        // check if this html element is marked as markdown\n        // if so, it's contents should be parsed as markdown\n        if (left.search(/\\bmarkdown\\b/) !== -1) {\n          txt = left + globals.converter.makeHtml(match) + right;\n        }\n        return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n      };\n\n  if (options.backslashEscapesHTMLTags) {\n    // encode backslash escaped HTML tags\n    text = text.replace(/\\\\<(\\/?[^>]+?)>/g, function (wm, inside) {\n      return '&lt;' + inside + '&gt;';\n    });\n  }\n\n  // hash HTML Blocks\n  for (var i = 0; i < blockTags.length; ++i) {\n\n    var opTagPos,\n        rgx1     = new RegExp('^ {0,3}(<' + blockTags[i] + '\\\\b[^>]*>)', 'im'),\n        patLeft  = '<' + blockTags[i] + '\\\\b[^>]*>',\n        patRight = '</' + blockTags[i] + '>';\n    // 1. Look for the first position of the first opening HTML tag in the text\n    while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {\n\n      // if the HTML tag is \\ escaped, we need to escape it and break\n\n\n      //2. Split the text in that position\n      var subTexts = showdown.helper.splitAtIndex(text, opTagPos),\n      //3. Match recursively\n          newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');\n\n      // prevent an infinite loop\n      if (newSubText1 === subTexts[1]) {\n        break;\n      }\n      text = subTexts[0].concat(newSubText1);\n    }\n  }\n  // HR SPECIAL CASE\n  text = text.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,\n    showdown.subParser('hashElement')(text, options, globals));\n\n  // Special case for standalone HTML comments\n  text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {\n    return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n  }, '^ {0,3}<!--', '-->', 'gm');\n\n  // PHP and ASP-style processor instructions (<?...?> and <%...%>)\n  text = text.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n    showdown.subParser('hashElement')(text, options, globals));\n\n  text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Hash span elements that should not be parsed as markdown\n */\nshowdown.subParser('hashHTMLSpans', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);\n\n  function hashHTMLSpan (html) {\n    return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';\n  }\n\n  // Hash Self Closing tags\n  text = text.replace(/<[^>]+?\\/>/gi, function (wm) {\n    return hashHTMLSpan(wm);\n  });\n\n  // Hash tags without properties\n  text = text.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n    return hashHTMLSpan(wm);\n  });\n\n  // Hash tags with properties\n  text = text.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n    return hashHTMLSpan(wm);\n  });\n\n  // Hash self closing tags without />\n  text = text.replace(/<[^>]+?>/gi, function (wm) {\n    return hashHTMLSpan(wm);\n  });\n\n  /*showdown.helper.matchRecursiveRegExp(text, '<code\\\\b[^>]*>', '</code>', 'gi');*/\n\n  text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);\n  return text;\n});\n\n/**\n * Unhash HTML spans\n */\nshowdown.subParser('unhashHTMLSpans', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);\n\n  for (var i = 0; i < globals.gHtmlSpans.length; ++i) {\n    var repText = globals.gHtmlSpans[i],\n        // limiter to prevent infinite loop (assume 10 as limit for recurse)\n        limit = 0;\n\n    while (/¨C(\\d+)C/.test(repText)) {\n      var num = RegExp.$1;\n      repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);\n      if (limit === 10) {\n        break;\n      }\n      ++limit;\n    }\n    text = text.replace('¨C' + i + 'C', repText);\n  }\n\n  text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Hash and escape <pre><code> elements that should not be parsed as markdown\n */\nshowdown.subParser('hashPreCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    // encode html entities\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  };\n\n  // Hash <pre><code>\n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}<pre\\\\b[^>]*>\\\\s*<code\\\\b[^>]*>', '^ {0,3}</code>\\\\s*</pre>', 'gim');\n\n  text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);\n  return text;\n});\n\r\nshowdown.subParser('headers', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('headers.before', text, options, globals);\n\n  var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),\n\n  // Set text-style headers:\n  //\tHeader 1\n  //\t========\n  //\n  //\tHeader 2\n  //\t--------\n  //\n      setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,\n      setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n\n  text = text.replace(setextRegexH1, function (wholeMatch, m1) {\n\n    var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n        hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n        hLevel = headerLevelStart,\n        hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';\n    return showdown.subParser('hashBlock')(hashBlock, options, globals);\n  });\n\n  text = text.replace(setextRegexH2, function (matchFound, m1) {\n    var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n        hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n        hLevel = headerLevelStart + 1,\n        hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';\n    return showdown.subParser('hashBlock')(hashBlock, options, globals);\n  });\n\n  // atx-style headers:\n  //  # Header 1\n  //  ## Header 2\n  //  ## Header 2 with closing hashes ##\n  //  ...\n  //  ###### Header 6\n  //\n  var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n\n  text = text.replace(atxStyle, function (wholeMatch, m1, m2) {\n    var hText = m2;\n    if (options.customizedHeaderId) {\n      hText = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, '');\n    }\n\n    var span = showdown.subParser('spanGamut')(hText, options, globals),\n        hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m2) + '\"',\n        hLevel = headerLevelStart - 1 + m1.length,\n        header = '<h' + hLevel + hID + '>' + span + '</h' + hLevel + '>';\n\n    return showdown.subParser('hashBlock')(header, options, globals);\n  });\n\n  function headerId (m) {\n    var title,\n        prefix;\n\n    // It is separate from other options to allow combining prefix and customized\n    if (options.customizedHeaderId) {\n      var match = m.match(/\\{([^{]+?)}\\s*$/);\n      if (match && match[1]) {\n        m = match[1];\n      }\n    }\n\n    title = m;\n\n    // Prefix id to prevent causing inadvertent pre-existing style matches.\n    if (showdown.helper.isString(options.prefixHeaderId)) {\n      prefix = options.prefixHeaderId;\n    } else if (options.prefixHeaderId === true) {\n      prefix = 'section-';\n    } else {\n      prefix = '';\n    }\n\n    if (!options.rawPrefixHeaderId) {\n      title = prefix + title;\n    }\n\n    if (options.ghCompatibleHeaderId) {\n      title = title\n        .replace(/ /g, '-')\n        // replace previously escaped chars (&, ¨ and $)\n        .replace(/&amp;/g, '')\n        .replace(/¨T/g, '')\n        .replace(/¨D/g, '')\n        // replace rest of the chars (&~$ are repeated as they might have been escaped)\n        // borrowed from github's redcarpet (some they should produce similar results)\n        .replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g, '')\n        .toLowerCase();\n    } else if (options.rawHeaderId) {\n      title = title\n        .replace(/ /g, '-')\n        // replace previously escaped chars (&, ¨ and $)\n        .replace(/&amp;/g, '&')\n        .replace(/¨T/g, '¨')\n        .replace(/¨D/g, '$')\n        // replace \" and '\n        .replace(/[\"']/g, '-')\n        .toLowerCase();\n    } else {\n      title = title\n        .replace(/[^\\w]/g, '')\n        .toLowerCase();\n    }\n\n    if (options.rawPrefixHeaderId) {\n      title = prefix + title;\n    }\n\n    if (globals.hashLinkCounts[title]) {\n      title = title + '-' + (globals.hashLinkCounts[title]++);\n    } else {\n      globals.hashLinkCounts[title] = 1;\n    }\n    return title;\n  }\n\n  text = globals.converter._dispatch('headers.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Turn Markdown link shortcuts into XHTML <a> tags.\n */\nshowdown.subParser('horizontalRule', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('horizontalRule.before', text, options, globals);\n\n  var key = showdown.subParser('hashBlock')('<hr />', options, globals);\n  text = text.replace(/^ {0,2}( ?-){3,}[ \\t]*$/gm, key);\n  text = text.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm, key);\n  text = text.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n\n  text = globals.converter._dispatch('horizontalRule.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Turn Markdown image shortcuts into <img> tags.\n */\nshowdown.subParser('images', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('images.before', text, options, globals);\n\n  var inlineRegExp      = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<?([\\S]+?(?:\\([\\S]*?\\)[\\S]*?)?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n      crazyRegExp       = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g,\n      base64RegExp      = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<?(data:.+?\\/.+?;base64,[A-Za-z0-9+/=\\n]+?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n      referenceRegExp   = /!\\[([^\\]]*?)] ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g,\n      refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n\n  function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {\n    url = url.replace(/\\s/g, '');\n    return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);\n  }\n\n  function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {\n\n    var gUrls   = globals.gUrls,\n        gTitles = globals.gTitles,\n        gDims   = globals.gDimensions;\n\n    linkId = linkId.toLowerCase();\n\n    if (!title) {\n      title = '';\n    }\n    // Special case for explicit empty url\n    if (wholeMatch.search(/\\(<?\\s*>? ?(['\"].*['\"])?\\)$/m) > -1) {\n      url = '';\n\n    } else if (url === '' || url === null) {\n      if (linkId === '' || linkId === null) {\n        // lower-case and turn embedded newlines into spaces\n        linkId = altText.toLowerCase().replace(/ ?\\n/g, ' ');\n      }\n      url = '#' + linkId;\n\n      if (!showdown.helper.isUndefined(gUrls[linkId])) {\n        url = gUrls[linkId];\n        if (!showdown.helper.isUndefined(gTitles[linkId])) {\n          title = gTitles[linkId];\n        }\n        if (!showdown.helper.isUndefined(gDims[linkId])) {\n          width = gDims[linkId].width;\n          height = gDims[linkId].height;\n        }\n      } else {\n        return wholeMatch;\n      }\n    }\n\n    altText = altText\n      .replace(/\"/g, '&quot;')\n    //altText = showdown.helper.escapeCharacters(altText, '*_', false);\n      .replace(showdown.helper.regexes.asteriskAndDash, showdown.helper.escapeCharactersCallback);\n    //url = showdown.helper.escapeCharacters(url, '*_', false);\n    url = url.replace(showdown.helper.regexes.asteriskAndDash, showdown.helper.escapeCharactersCallback);\n    var result = '<img src=\"' + url + '\" alt=\"' + altText + '\"';\n\n    if (title) {\n      title = title\n        .replace(/\"/g, '&quot;')\n      //title = showdown.helper.escapeCharacters(title, '*_', false);\n        .replace(showdown.helper.regexes.asteriskAndDash, showdown.helper.escapeCharactersCallback);\n      result += ' title=\"' + title + '\"';\n    }\n\n    if (width && height) {\n      width  = (width === '*') ? 'auto' : width;\n      height = (height === '*') ? 'auto' : height;\n\n      result += ' width=\"' + width + '\"';\n      result += ' height=\"' + height + '\"';\n    }\n\n    result += ' />';\n\n    return result;\n  }\n\n  // First, handle reference-style labeled images: ![alt text][id]\n  text = text.replace(referenceRegExp, writeImageTag);\n\n  // Next, handle inline images:  ![alt text](url =<width>x<height> \"optional title\")\n\n  // base64 encoded images\n  text = text.replace(base64RegExp, writeImageTagBase64);\n\n  // cases with crazy urls like ./image/cat1).png\n  text = text.replace(crazyRegExp, writeImageTag);\n\n  // normal cases\n  text = text.replace(inlineRegExp, writeImageTag);\n\n  // handle reference-style shortcuts: ![img text]\n  text = text.replace(refShortcutRegExp, writeImageTag);\n\n  text = globals.converter._dispatch('images.after', text, options, globals);\n  return text;\n});\n\r\nshowdown.subParser('italicsAndBold', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);\n\n  // it's faster to have 3 separate regexes for each case than have just one\n  // because of backtracing, in some cases, it could lead to an exponential effect\n  // called \"catastrophic backtrace\". Ominous!\n\n  function parseInside (txt, left, right) {\n    if (options.simplifiedAutoLink) {\n      txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n    }\n    return left + txt + right;\n  }\n\n  // Parse underscores\n  if (options.literalMidWordUnderscores) {\n    text = text.replace(/\\b___(\\S[\\s\\S]*)___\\b/g, function (wm, txt) {\n      return parseInside (txt, '<strong><em>', '</em></strong>');\n    });\n    text = text.replace(/\\b__(\\S[\\s\\S]*)__\\b/g, function (wm, txt) {\n      return parseInside (txt, '<strong>', '</strong>');\n    });\n    text = text.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g, function (wm, txt) {\n      return parseInside (txt, '<em>', '</em>');\n    });\n  } else {\n    text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n      return (/\\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;\n    });\n    text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n      return (/\\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;\n    });\n    text = text.replace(/_([^\\s_][\\s\\S]*?)_/g, function (wm, m) {\n      // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)\n      return (/\\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;\n    });\n  }\n\n  // Now parse asterisks\n  if (options.literalMidWordAsterisks) {\n    text = text.trim().replace(/(^| )\\*{3}(\\S[\\s\\S]*?)\\*{3}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {\n      return parseInside (txt, lead + '<strong><em>', '</em></strong>' + trail);\n    });\n    text = text.trim().replace(/(^| )\\*{2}(\\S[\\s\\S]*?)\\*{2}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {\n      return parseInside (txt, lead + '<strong>', '</strong>' + trail);\n    });\n    text = text.trim().replace(/(^| )\\*(\\S[\\s\\S]*?)\\*([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {\n      return parseInside (txt, lead + '<em>', '</em>' + trail);\n    });\n  } else {\n    text = text.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g, function (wm, m) {\n      return (/\\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;\n    });\n    text = text.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g, function (wm, m) {\n      return (/\\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;\n    });\n    text = text.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g, function (wm, m) {\n      // !/^\\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)\n      return (/\\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;\n    });\n  }\n\n\n  text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Form HTML ordered (numbered) and unordered (bulleted) lists.\n */\nshowdown.subParser('lists', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('lists.before', text, options, globals);\n\n  /**\n   * Process the contents of a single ordered or unordered list, splitting it\n   * into individual list items.\n   * @param {string} listStr\n   * @param {boolean} trimTrailing\n   * @returns {string}\n   */\n  function processListItems (listStr, trimTrailing) {\n    // The $g_list_level global keeps track of when we're inside a list.\n    // Each time we enter a list, we increment it; when we leave a list,\n    // we decrement. If it's zero, we're not in a list anymore.\n    //\n    // We do this because when we're not inside a list, we want to treat\n    // something like this:\n    //\n    //    I recommend upgrading to version\n    //    8. Oops, now this line is treated\n    //    as a sub-list.\n    //\n    // As a single paragraph, despite the fact that the second line starts\n    // with a digit-period-space sequence.\n    //\n    // Whereas when we're inside a list (or sub-list), that line will be\n    // treated as the start of a sub-list. What a kludge, huh? This is\n    // an aspect of Markdown's syntax that's hard to parse perfectly\n    // without resorting to mind-reading. Perhaps the solution is to\n    // change the syntax rules such that sub-lists must start with a\n    // starting cardinal number; e.g. \"1.\" or \"a.\".\n    globals.gListLevel++;\n\n    // trim trailing blank lines:\n    listStr = listStr.replace(/\\n{2,}$/, '\\n');\n\n    // attacklab: add sentinel to emulate \\z\n    listStr += '¨0';\n\n    var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[ \\t]+))/gm,\n        isParagraphed = (/\\n[ \\t]*\\n(?!¨0)/.test(listStr));\n\n    // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,\n    // which is a syntax breaking change\n    // activating this option reverts to old behavior\n    if (options.disableForced4SpacesIndentedSublists) {\n      rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[ \\t]+))/gm;\n    }\n\n    listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {\n      checked = (checked && checked.trim() !== '');\n\n      var item = showdown.subParser('outdent')(m4, options, globals),\n          bulletStyle = '';\n\n      // Support for github tasklists\n      if (taskbtn && options.tasklists) {\n        bulletStyle = ' class=\"task-list-item\" style=\"list-style-type: none;\"';\n        item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function () {\n          var otp = '<input type=\"checkbox\" disabled style=\"margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;\"';\n          if (checked) {\n            otp += ' checked';\n          }\n          otp += '>';\n          return otp;\n        });\n      }\n\n      // ISSUE #312\n      // This input: - - - a\n      // causes trouble to the parser, since it interprets it as:\n      // <ul><li><li><li>a</li></li></li></ul>\n      // instead of:\n      // <ul><li>- - a</li></ul>\n      // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n      // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n      item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n        return '¨A' + wm2;\n      });\n\n      // m1 - Leading line or\n      // Has a double return (multi paragraph) or\n      // Has sublist\n      if (m1 || (item.search(/\\n{2,}/) > -1)) {\n        item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n        item = showdown.subParser('blockGamut')(item, options, globals);\n      } else {\n        // Recursion for sub-lists:\n        item = showdown.subParser('lists')(item, options, globals);\n        item = item.replace(/\\n$/, ''); // chomp(item)\n        item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n        // Colapse double linebreaks\n        item = item.replace(/\\n\\n+/g, '\\n\\n');\n        if (isParagraphed) {\n          item = showdown.subParser('paragraphs')(item, options, globals);\n        } else {\n          item = showdown.subParser('spanGamut')(item, options, globals);\n        }\n      }\n\n      // now we need to remove the marker (¨A)\n      item = item.replace('¨A', '');\n      // we can finally wrap the line in list item tags\n      item =  '<li' + bulletStyle + '>' + item + '</li>\\n';\n\n      return item;\n    });\n\n    // attacklab: strip sentinel\n    listStr = listStr.replace(/¨0/g, '');\n\n    globals.gListLevel--;\n\n    if (trimTrailing) {\n      listStr = listStr.replace(/\\s+$/, '');\n    }\n\n    return listStr;\n  }\n\n  /**\n   * Check and parse consecutive lists (better fix for issue #142)\n   * @param {string} list\n   * @param {string} listType\n   * @param {boolean} trimTrailing\n   * @returns {string}\n   */\n  function parseConsecutiveLists (list, listType, trimTrailing) {\n    // check if we caught 2 or more consecutive lists by mistake\n    // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n    var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n        ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n        counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n        result = '';\n\n    if (list.search(counterRxg) !== -1) {\n      (function parseCL (txt) {\n        var pos = txt.search(counterRxg);\n        if (pos !== -1) {\n          // slice\n          result += '\\n<' + listType + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\\n';\n\n          // invert counterType and listType\n          listType = (listType === 'ul') ? 'ol' : 'ul';\n          counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n          //recurse\n          parseCL(txt.slice(pos));\n        } else {\n          result += '\\n<' + listType + '>\\n' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\\n';\n        }\n      })(list);\n    } else {\n      result = '\\n<' + listType + '>\\n' + processListItems(list, !!trimTrailing) + '</' + listType + '>\\n';\n    }\n\n    return result;\n  }\n\n  // add sentinel to hack around khtml/safari bug:\n  // http://bugs.webkit.org/show_bug.cgi?id=11231\n  text += '¨0';\n\n  if (globals.gListLevel) {\n    text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n      function (wholeMatch, list, m2) {\n        var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n        return parseConsecutiveLists(list, listType, true);\n      }\n    );\n  } else {\n    text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n      function (wholeMatch, m1, list, m3) {\n        var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n        return parseConsecutiveLists(list, listType, false);\n      }\n    );\n  }\n\n  // strip sentinel\n  text = text.replace(/¨0/, '');\n  text = globals.converter._dispatch('lists.after', text, options, globals);\n  return text;\n});\n\r\n/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n  // attacklab: hack around Konqueror 3.5.4 bug:\n  // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n  text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n  // attacklab: clean up hack\n  text = text.replace(/¨0/g, '');\n\n  text = globals.converter._dispatch('outdent.after', text, options, globals);\n  return text;\n});\n\r\n/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n  // Strip leading and trailing lines:\n  text = text.replace(/^\\n+/g, '');\n  text = text.replace(/\\n+$/g, '');\n\n  var grafs = text.split(/\\n{2,}/g),\n      grafsOut = [],\n      end = grafs.length; // Wrap <p> tags\n\n  for (var i = 0; i < end; i++) {\n    var str = grafs[i];\n    // if this is an HTML marker, copy it\n    if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n      grafsOut.push(str);\n\n    // test for presence of characters to prevent empty lines being parsed\n    // as paragraphs (resulting in undesired extra empty paragraphs)\n    } else if (str.search(/\\S/) >= 0) {\n      str = showdown.subParser('spanGamut')(str, options, globals);\n      str = str.replace(/^([ \\t]*)/g, '<p>');\n      str += '</p>';\n      grafsOut.push(str);\n    }\n  }\n\n  /** Unhashify HTML blocks */\n  end = grafsOut.length;\n  for (i = 0; i < end; i++) {\n    var blockText = '',\n        grafsOutIt = grafsOut[i],\n        codeFlag = false;\n    // if this is a marker for an html block...\n    // use RegExp.test instead of string.search because of QML bug\n    while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n      var delim = RegExp.$1,\n          num   = RegExp.$2;\n\n      if (delim === 'K') {\n        blockText = globals.gHtmlBlocks[num];\n      } else {\n        // we need to check if ghBlock is a false positive\n        if (codeFlag) {\n          // use encoded version of all text\n          blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n        } else {\n          blockText = globals.ghCodeBlocks[num].codeblock;\n        }\n      }\n      blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n      grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n      // Check if grafsOutIt is a pre->code\n      if (/^<pre\\b[^>]*>\\s*<code\\b[^>]*>/.test(grafsOutIt)) {\n        codeFlag = true;\n      }\n    }\n    grafsOut[i] = grafsOutIt;\n  }\n  text = grafsOut.join('\\n');\n  // Strip leading and trailing lines:\n  text = text.replace(/^\\n+/g, '');\n  text = text.replace(/\\n+$/g, '');\n  return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n\r\n/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n  'use strict';\n\n  if (ext.filter) {\n    text = ext.filter(text, globals.converter, options);\n\n  } else if (ext.regex) {\n    // TODO remove this when old extension loading mechanism is deprecated\n    var re = ext.regex;\n    if (!(re instanceof RegExp)) {\n      re = new RegExp(re, 'g');\n    }\n    text = text.replace(re, ext.replace);\n  }\n\n  return text;\n});\n\r\n/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n  text = showdown.subParser('codeSpans')(text, options, globals);\n  text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n  text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n  // Process anchor and image tags. Images must come first,\n  // because ![foo][f] looks like an anchor.\n  text = showdown.subParser('images')(text, options, globals);\n  text = showdown.subParser('anchors')(text, options, globals);\n\n  // Make links out of things like `<http://example.com/>`\n  // Must come after anchors, because you can use < and >\n  // delimiters in inline links like [this](<url>).\n  text = showdown.subParser('autoLinks')(text, options, globals);\n  text = showdown.subParser('italicsAndBold')(text, options, globals);\n  text = showdown.subParser('strikethrough')(text, options, globals);\n  text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n\n  // we need to hash HTML tags inside spans\n  text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n  // now we encode amps and angles\n  text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n  // Do hard breaks\n  if (options.simpleLineBreaks) {\n    // GFM style hard breaks\n    // only add line breaks if the text does not contain a block (special case for lists)\n    if (!/\\n\\n¨K/.test(text)) {\n      text = text.replace(/\\n+/g, '<br />\\n');\n    }\n  } else {\n    // Vanilla hard breaks\n    text = text.replace(/  +\\n/g, '<br />\\n');\n  }\n\n  text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n  return text;\n});\n\r\nshowdown.subParser('strikethrough', function (text, options, globals) {\n  'use strict';\n\n  function parseInside (txt) {\n    if (options.simplifiedAutoLink) {\n      txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n    }\n    return '<del>' + txt + '</del>';\n  }\n\n  if (options.strikethrough) {\n    text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n    text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n    text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n  }\n\n  return text;\n});\n\r\n/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n  'use strict';\n\n  var regex       = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*<?([^>\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n      base64Regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*<?(data:.+?\\/.+?;base64,[A-Za-z0-9+/=\\n]+?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n  // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n    linkId = linkId.toLowerCase();\n    if (url.match(/^data:.+?\\/.+?;base64,/)) {\n      // remove newlines\n      globals.gUrls[linkId] = url.replace(/\\s/g, '');\n    } else {\n      globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals);  // Link IDs are case-insensitive\n    }\n\n    if (blankLines) {\n      // Oops, found blank lines, so it's not a title.\n      // Put back the parenthetical statement we stole.\n      return blankLines + title;\n\n    } else {\n      if (title) {\n        globals.gTitles[linkId] = title.replace(/\"|'/g, '&quot;');\n      }\n      if (options.parseImgDimensions && width && height) {\n        globals.gDimensions[linkId] = {\n          width:  width,\n          height: height\n        };\n      }\n    }\n    // Completely remove the definition from the text\n    return '';\n  };\n\n  // first we try to find base64 link references\n  text = text.replace(base64Regex, replaceFunc);\n\n  text = text.replace(regex, replaceFunc);\n\n  // attacklab: strip sentinel\n  text = text.replace(/¨0/, '');\n\n  return text;\n});\n\r\nshowdown.subParser('tables', function (text, options, globals) {\n  'use strict';\n\n  if (!options.tables) {\n    return text;\n  }\n\n  var tableRgx       = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n    //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n      singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|\\n( {0,3}\\|.+\\|\\n)*(?:\\n|¨0)/gm;\n\n  function parseStyles (sLine) {\n    if (/^:[ \\t]*--*$/.test(sLine)) {\n      return ' style=\"text-align:left;\"';\n    } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n      return ' style=\"text-align:right;\"';\n    } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n      return ' style=\"text-align:center;\"';\n    } else {\n      return '';\n    }\n  }\n\n  function parseHeaders (header, style) {\n    var id = '';\n    header = header.trim();\n    // support both tablesHeaderId and tableHeaderId due to error in documention so we don't break backwards compatibility\n    if (options.tablesHeaderId || options.tableHeaderId) {\n      id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n    }\n    header = showdown.subParser('spanGamut')(header, options, globals);\n\n    return '<th' + id + style + '>' + header + '</th>\\n';\n  }\n\n  function parseCells (cell, style) {\n    var subText = showdown.subParser('spanGamut')(cell, options, globals);\n    return '<td' + style + '>' + subText + '</td>\\n';\n  }\n\n  function buildTable (headers, cells) {\n    var tb = '<table>\\n<thead>\\n<tr>\\n',\n        tblLgn = headers.length;\n\n    for (var i = 0; i < tblLgn; ++i) {\n      tb += headers[i];\n    }\n    tb += '</tr>\\n</thead>\\n<tbody>\\n';\n\n    for (i = 0; i < cells.length; ++i) {\n      tb += '<tr>\\n';\n      for (var ii = 0; ii < tblLgn; ++ii) {\n        tb += cells[i][ii];\n      }\n      tb += '</tr>\\n';\n    }\n    tb += '</tbody>\\n</table>\\n';\n    return tb;\n  }\n\n  function parseTable (rawTable) {\n    var i, tableLines = rawTable.split('\\n');\n\n    // strip wrong first and last column if wrapped tables are used\n    for (i = 0; i < tableLines.length; ++i) {\n      if (/^ {0,3}\\|/.test(tableLines[i])) {\n        tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n      }\n      if (/\\|[ \\t]*$/.test(tableLines[i])) {\n        tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n      }\n    }\n\n    var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n        rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n        rawCells = [],\n        headers = [],\n        styles = [],\n        cells = [];\n\n    tableLines.shift();\n    tableLines.shift();\n\n    for (i = 0; i < tableLines.length; ++i) {\n      if (tableLines[i].trim() === '') {\n        continue;\n      }\n      rawCells.push(\n        tableLines[i]\n          .split('|')\n          .map(function (s) {\n            return s.trim();\n          })\n      );\n    }\n\n    if (rawHeaders.length < rawStyles.length) {\n      return rawTable;\n    }\n\n    for (i = 0; i < rawStyles.length; ++i) {\n      styles.push(parseStyles(rawStyles[i]));\n    }\n\n    for (i = 0; i < rawHeaders.length; ++i) {\n      if (showdown.helper.isUndefined(styles[i])) {\n        styles[i] = '';\n      }\n      headers.push(parseHeaders(rawHeaders[i], styles[i]));\n    }\n\n    for (i = 0; i < rawCells.length; ++i) {\n      var row = [];\n      for (var ii = 0; ii < headers.length; ++ii) {\n        if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n        }\n        row.push(parseCells(rawCells[i][ii], styles[ii]));\n      }\n      cells.push(row);\n    }\n\n    return buildTable(headers, cells);\n  }\n\n  text = globals.converter._dispatch('tables.before', text, options, globals);\n\n  // find escaped pipe characters\n  text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n  // parse multi column tables\n  text = text.replace(tableRgx, parseTable);\n\n  // parse one column tables\n  text = text.replace(singeColTblRgx, parseTable);\n\n  text = globals.converter._dispatch('tables.after', text, options, globals);\n\n  return text;\n});\n\r\n/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n  text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n    var charCodeToReplace = parseInt(m1);\n    return String.fromCharCode(charCodeToReplace);\n  });\n\n  text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n  return text;\n});\n\r\nvar root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n  define(function () {\n    'use strict';\n    return showdown;\n  });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n  module.exports = showdown;\n\n// Regular Browser loader\n} else {\n  root.showdown = showdown;\n}\n}).call(this);\r\n\n//# sourceMappingURL=showdown.js.map\r\n"
  
  /***/ }),
  
  /***/ "../../../../script-loader/addScript.js":
  /***/ (function(module, exports) {
  
  /*
  	MIT License http://www.opensource.org/licenses/mit-license.php
  	Author Tobias Koppers @sokra
  */
  module.exports = function(src) {
  	if (typeof execScript !== "undefined")
  		execScript(src);
  	else
  		eval.call(null, src);
  }
  
  
  /***/ }),
  
  /***/ "../../../../script-loader/index.js!../../../../hammerjs/hammer.min.js":
  /***/ (function(module, exports, __webpack_require__) {
  
  __webpack_require__("../../../../script-loader/addScript.js")(__webpack_require__("../../../../raw-loader/index.js!../../../../hammerjs/hammer.min.js"))
  
  /***/ }),
  
  /***/ "../../../../script-loader/index.js!../../../../showdown/dist/showdown.js":
  /***/ (function(module, exports, __webpack_require__) {
  
  __webpack_require__("../../../../script-loader/addScript.js")(__webpack_require__("../../../../raw-loader/index.js!../../../../showdown/dist/showdown.js"))
  
  /***/ }),
  
  /***/ 4:
  /***/ (function(module, exports, __webpack_require__) {
  
  __webpack_require__("../../../../script-loader/index.js!../../../../hammerjs/hammer.min.js");
  module.exports = __webpack_require__("../../../../script-loader/index.js!../../../../showdown/dist/showdown.js");
  
  
  /***/ })
  
  },[4]);
  //# sourceMappingURL=scripts.bundle.js.map