diff --git a/public/react/public/js/js_min_all.js b/public/react/public/js/js_min_all.js index bd63aebe6..79134fc55 100755 --- a/public/react/public/js/js_min_all.js +++ b/public/react/public/js/js_min_all.js @@ -91,17 +91,6 @@ function initEditormdPasteUpload(e,i,o){e.cm.getInputField().addEventListener("p // at http://marijnhaverbeke.nl/blog/#cm-internals . !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,k=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?E=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(E=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push($(Y)+" ");return Y[e]}function $(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ge(r,se(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ge(e.line,t):r<0?ge(e.line,0):e}(t,se(e,t.line).text.length)}function Se(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new ke(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;b=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ve(u.to,r)>=0:ve(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ve(u.from,n)<=0:ve(u.from,n)<0)))return!0}}}function Be(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function Ge(e,t){var r=se(e,t),n=Be(r);return r==n?t:he(n)}function Ue(e,t){if(t>e.lastLine())return t;var r,n=se(e,t);if(!Ve(e,n))return t;for(;r=ze(n);)n=r.find(1,!0).line;return he(n)+1}function Ve(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var _e=null;function $e(e,t,r){var n;_e=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:_e=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:_e=i)}return null!=n?n:_e}var qe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;pe.text.length?null:n}function Je(e,t,r){var n=Qe(e,t.ch,r);return null==n?null:new ge(t.line,n,r<0?"after":"before")}function et(e,t,r,n,i){if(e){var o=Ze(r,t.doc.direction);if(o){var l,s=i<0?$(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0){var u=Ar(t,r);l=i<0?r.text.length-1:0;var c=Dr(t,u,l).top;l=le(function(e){return Dr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Qe(r,l,1))}else l=i<0?s.to:s.from;return new ge(n,l,a)}}return new ge(n,i<0?r.text.length:0,i<0?"before":"after")}function tt(e,t,r,n){var i=Ze(t,e.doc.direction);if(!i)return Je(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=$e(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ge(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ge(r.line,a(e,1),"before"):new ge(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}var rt=[],nt=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||rt).concat(r)}};function it(e,t){return e._handlers&&e._handlers[t]||rt}function ot(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function lt(e,t){var r=it(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function ct(e){e.prototype.on=function(e,t){nt(this,e,t)},e.prototype.off=function(e,t){ot(this,e,t)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ft(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function dt(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function pt(e){ht(e),ft(e)}function gt(e){return e.target||e.srcElement}function vt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var mt,yt,bt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function wt(e){if(null==mt){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(mt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=mt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function xt(e){if(null!=yt)return yt;var t=N(e,document.createTextNode("AخA")),r=T(t,0,1).getBoundingClientRect(),n=T(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(yt=n.right-r.right<3)}var Ct,St=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Lt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Tt="oncopy"in(Ct=O("div"))||(Ct.setAttribute("oncopy","return;"),"function"==typeof Ct.oncopy),kt=null;var Mt={},Nt={};function Ot(e){if("string"==typeof e&&Nt.hasOwnProperty(e))e=Nt[e];else if(e&&"string"==typeof e.name&&Nt.hasOwnProperty(e.name)){var t=Nt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ot("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ot("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Wt(e,t){t=Ot(t);var r=Mt[t.name];if(!r)return Wt(e,"text/plain");var n=r(e,t);if(At.hasOwnProperty(t.name)){var i=At[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var At={};function Dt(e,t){I(t,At.hasOwnProperty(e)?At[e]:At[e]={})}function Ht(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Pt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Et(e,t,r){return!e.startState||e.startState(t,r)}var Ft=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};function It(e,t,r,n){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=function(r){var n=e.state.overlays[r],l=1,s=0;jt(e,t.text,n.mode,!0,function(e,t){for(var r=l;se&&i.splice(l,1,e,i[l+1],o),l+=2,s=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;re.options.maxHighlightLength?Ht(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=se(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var u=z(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}(e,t,r),l=o>n.first&&se(n,o-1).stateAfter;return l=l?Ht(n.mode,l):Et(n.mode),n.iter(o,t,function(r){Bt(e,r.text,l);var s=o==t-1||o%5==0||o>=i.viewFrom&&ot.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Vt(e,t,r,n){var i,o=function(e){return{start:h.start,end:h.pos,string:h.current(),type:i||null,state:e?Ht(l.mode,c):c}},l=e.doc,s=l.mode;t=Ce(l,t);var a,u=se(l,t.line),c=Rt(e,t.line,r),h=new Ft(u.text,e.options.tabSize);for(n&&(a=[]);(n||h.pose.options.maxHighlightLength?(s=!1,l&&Bt(e,t,n,h.pos),h.pos=t.length,a=null):a=Kt(Ut(r,h,n,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.post},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var Xt=function(e,t,r){this.text=e,De(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,Ae(e)}Xt.prototype.lineNo=function(){return he(this)},ct(Xt);var _t={},$t={};function qt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?$t:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=W("span",null,null,a?"padding-right: .1px":null),n={pre:W("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(l||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;n.pos=0,n.addToken=Jt,xt(e.display.measure)&&(s=Ze(o,e.doc.direction))&&(n.addToken=er(n.addToken,s)),n.map=[],rr(o,n,zt(e,o,t!=e.display.externalMeasured&&he(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=P(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=P(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(wt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return lt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=P(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var T=Math.min(d,m);;){if(v){var k=p+v.length;if(!f){var M=k>T?v.slice(0,T-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(k>=T){v=v.slice(T-p),p=T;break}p=k,c=""}v=i.slice(o,o=r[g++]),l=qt(r[g++],t.cm.options)}}else for(var N=1;Nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Dr(e,Ar(e,t),r,n)}function Wr(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Er(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Jr(e.display),top:p.top,bottom:p.bottom}:Pr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Ir(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,s[t].level%2!=0!=r)}var h=$e(s,a,u),f=_e,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Xr(e,t){var r=0;t=Ce(e.doc,t),e.options.lineWrapping||(r=Jr(e.display)*t.ch);var n=se(e.doc,t.line),i=je(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Yr(e,t,r,n,i){var o=ge(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function _r(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Yr(n.first,0,null,!0,-1);var i=fe(n,r),o=n.first+n.size-1;if(i>o)return Yr(n.first+n.size-1,se(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=se(n,i);;){var s=Zr(e,l,i,t,r),a=ze(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=he(l=u.to.line)}}function $r(e,t,r,n){var i=function(n){return Ur(e,t,Dr(e,r,n),"line")},o=t.text.length,l=le(function(e){return i(e-1).bottom<=n},o,0);return{begin:l,end:o=le(function(e){return i(e).top>n},l,o)}}function qr(e,t,r,n){return $r(e,t,r,Ur(e,t,Dr(e,r,n),"line").top)}function Zr(e,t,r,n,i){i-=je(t);var o,l=0,s=t.text.length,a=Ar(e,t);if(Ze(t,e.doc.direction)){var u;if(e.options.lineWrapping)l=(u=$r(e,t,a,i)).begin,s=u.end;o=new ge(r,l);var c,h,f=jr(e,o,"line",t,a).left,d=fMath.abs(c)){if(p<0==c<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var g=le(function(r){var o=Ur(e,t,Dr(e,a,r),"line");return o.top>i?(s=Math.min(r,s),!0):!(o.bottom<=i)&&(o.left>n||!(o.rightv.right?1:0,o}function Qr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function Jr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function en(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:tn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function tn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function rn(e){var t=Qr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Jr(e.display)-3);return function(i){if(Ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().linet||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}(Ze(c,i.direction),r||0,null==n?h:n,function(e,t,i){var c,d,p,g=f(e,"left");if(e==t)c=g,d=p=g.left;else{if(c=f(t-1,"right"),"rtl"==i){var v=g;g=c,c=v}d=g.left,p=c.right}null==r&&0==e&&(d=s),c.top-g.top>3&&(u(d,g.top,null,g.bottom),d=s,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),d0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function fn(e){e.state.focused||(e.display.input.focus(),dn(e))}function dn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(lt(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),hn(e))}function pn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(lt(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=tn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l.001||c<-.001)&&(ce(i.line,o),yn(i.line),i.rest))for(var h=0;h=l&&(o=fe(t,je(se(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function wn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,r||oi(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),r&&oi(e),ei(e,100))}function xn(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,gn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}var Cn=0,Sn=null;function Ln(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Tn(e){var t=Ln(e);return t.x*=Sn,t.y*=Sn,t}function kn(e,t){var n=Ln(t),i=n.x,o=n.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;pe.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Nn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},Nn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},Nn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Nn.prototype.enableZeroWidthBar=function(e,t){e.style.pointerEvents="auto",t.set(1e3,function r(){var n=e.getBoundingClientRect();document.elementFromPoint(n.left+1,n.bottom-1)!=e?e.style.pointerEvents="none":t.set(1e3,r)})},Nn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var On=function(){};function Wn(e,t){t||(t=Mn(e));var r=e.display.barWidth,n=e.display.barHeight;An(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&mn(e),An(e,Mn(e)),r=e.display.barWidth,n=e.display.barHeight}function An(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}On.prototype.update=function(){return{bottom:0,right:0}},On.prototype.setScrollLeft=function(){},On.prototype.setScrollTop=function(){},On.prototype.clear=function(){};var Dn={native:Nn,null:On};function Hn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Dn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),nt(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?xn(e,t):wn(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}function Pn(e,t){var r=e.display,n=Qr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=kr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.leftf+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function En(e,t,r){null==t&&null==r||In(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Fn(e){In(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?ge(t.line,t.ch-1):t,n=ge(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin}}function In(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Xr(e,t.from),n=Xr(e,t.to),i=Pn(e,{left:Math.min(r.left,n.left),top:Math.min(r.top,n.top)-t.margin,right:Math.max(r.right,n.right),bottom:Math.max(r.bottom,n.bottom)+t.margin});e.scrollTo(i.scrollLeft,i.scrollTop)}}var zn=0;function Rn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Bn(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ri(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Un(e){var t=e.cm,r=t.display;e.updatedDisplay&&mn(t),e.barMeasure=Mn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function Vn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0);for(var o=0;o<5;o++){var l=!1,s=jr(e,t),a=r&&r!=t?jr(e,r):s,u=Pn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(wn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(xn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Ce(n,e.scrollToPos.from),Ce(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;lt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ge(e.doc,t)i.viewFrom?Zn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Zn(e);else if(t<=i.viewFrom){var o=Qn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Zn(e)}else if(r>=i.viewTo){var l=Qn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Zn(e)}else{var s=Qn(e,t,t,-1),a=Qn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Zn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[ln(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Qn(e,t,r,n){var i,o=ln(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ge(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Jn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Ht(t.mode,Rt(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength,a=It(e,o,s?Ht(t.mode,n):n,!0);o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return ei(e,e.options.workDelay),!0}),i.length&&jn(e,function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Jn(e))return!1;vn(e)&&(Zn(e),t.dims=en(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ge(e.doc,o),l=Ue(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,ln(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=je(se(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=Jn(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=D();return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(pe(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,c&&D()!=c&&c.offsetHeight&&c.focus(),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ei(e,400)),r.updateLineNumbers=null,!0}function ii(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=kr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=bn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ni(e,t);n=!1){mn(e);var i=Mn(e);sn(e),Wn(e,i),si(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function oi(e,t){var r=new ri(e,t);if(ni(e,r)){mn(e),ii(e,r);var n=Mn(e);sn(e),Wn(e,n),si(e,n),r.finish()}}function li(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function si(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tr(e)+"px"}function ai(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ri.prototype.signal=function(e,t){ut(e,t)&&this.events.push(arguments)},ri.prototype.finish=function(){for(var e=0;e=0&&ve(e,n.to())<=0)return r}return-1};var hi=function(e,t){this.anchor=e,this.head=t};function fi(e,t){var r=e[t];e.sort(function(e,t){return ve(e.from(),t.from())}),t=B(e,r);for(var n=1;n=0){var l=we(o.from(),i.from()),s=be(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new hi(a?s:l,a?l:s))}}return new ci(e,t)}function di(e,t){return new ci([new hi(e,t||e)],0)}function pi(e){return e.text?ge(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function gi(e,t){if(ve(e,t.from)<0)return e;if(ve(e,t.to)<=0)return pi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=pi(t).ch-t.to.ch),ge(r,n)}function vi(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Ci(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;ls-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Mi(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(i,i.lastOp==n)))l=$(o.changes),0==ve(t.from,t.to)&&0==ve(t.from,l.to)?l.to=pi(t):o.changes.push(ki(e,t));else{var a=$(i.done);for(a&&a.ranges||Wi(e.sel,i.done),o={changes:[ki(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||lt(e,"historyAdded")}function Oi(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,$(i.done),t))?i.done[i.done.length-1]=t:Wi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Mi(i.undone)}function Wi(e,t){var r=$(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ai(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Di(e){if(!e)return null;for(var t,r=0;r-1&&($(s)[h]=u[h],delete u[h])}}}return n}function Ei(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=ve(r,i)<0;o!=ve(n,i)<0?(i=r,r=n):o!=ve(r,n)<0&&(r=n)}return new hi(i,r)}return new hi(n||r,r)}function Fi(e,t,r,n){Gi(e,new ci([Ei(e,e.sel.primary(),t,r)],0),n)}function Ii(e,t,r){for(var n=[],i=0;i=t.ch:s.to>t.ch))){if(i&&(lt(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=_i(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=ve(u,r))&&(n<0?c<0:c>0))return Xi(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=_i(e,h,n,h.line==t.line?o:null)),h?Xi(e,h,t,n,i):null}}return t}function Yi(e,t,r,n,i){var o=n||1,l=Xi(e,t,r,o,i)||!i&&Xi(e,t,r,o,!0)||Xi(e,t,r,-o,i)||!i&&Xi(e,t,r,-o,!0);return l||(e.cantEdit=!0,ge(e.first,0))}function _i(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ce(e,ge(t.line-1)):null:r>0&&t.ch==(n||se(e,t.line)).text.length?t.line0)){var c=[a,1],h=ve(u.from,s.from),f=ve(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Qi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Qi(e,t)}}function Qi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ve(t.from,t.to)){var r=vi(e,t);Ni(e,t,r,e.cm?e.cm.curOp.id:NaN),to(e,t,r,Oe(e,t));var n=[];Ci(e,function(e,r){r||-1!=B(n,e.history)||(oo(e.history,t),n.push(e.history)),to(e,t,null,Oe(e,t))})}}function Ji(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--f){var d=h(f);if(d)return d.v}}}}function eo(e,t){if(0!=t&&(e.first+=t,e.sel=new ci(q(e.sel.ranges,function(e){return new hi(ge(e.anchor.line+t,e.anchor.ch),ge(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){$n(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ge(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ae(e,t.from,t.to),r||(r=vi(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=he(Be(se(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&at(e);xi(n,t,r,rn(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Xe(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));n.frontier=Math.min(n.frontier,o.line),ei(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?$n(e):o.line!=l.line||1!=t.text.length||wi(e.doc,t)?$n(e,o.line,l.line+1,u):qn(e,o.line,"text");var c=ut(e,"changes"),h=ut(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&sr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):xi(e,t,n),Ui(e,r,V)}}function ro(e,t,r,n,i){if(n||(n=r),ve(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Zi(e,{from:r,to:n,text:t,origin:i})}function no(e,t,r,n){r1||!(this.children[0]instanceof so))){var s=[];this.collapse(s),this.children=[new so(s)],this.children[0].parent=this}},ao.prototype.collapse=function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},ao.prototype.iterN=function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=W("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Re(e,t.line,t,r,o)||t.line!=r.line&&Re(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Ni(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Be(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&ce(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new ke(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ve(e,t)&&ce(t,0)}),o.clearOnEnter&&nt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Le=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ho,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)$n(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)qn(u,c,"text");o.atomic&&Ki(u.doc),sr(u,"markerAdded",u,o)}return o}fo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Rn(e),ut(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&$n(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ki(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Bn(e),this.parent&&this.parent.clear()}},fo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)Zi(this,n[a]);s?Bi(this,s):this.cm&&Fn(this.cm)}),undo:_n(function(){Ji(this,"undo")}),redo:_n(function(){Ji(this,"redo")}),undoSelection:_n(function(){Ji(this,"undo",!0)}),redoSelection:_n(function(){Ji(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Ce(this,e),t=Ce(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),Ce(this,ge(r,t))},indexFromPos:function(e){var t=(e=Ce(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),Ui(t.doc,di(r,r)),h)for(var f=0;f=0;t--)ro(e.doc,"",n[t].from,n[t].to,"+delete");Fn(e)})}Ao.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ao.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ao.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ao.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ao.default=y?Ao.macDefault:Ao.pcDefault;var Ro={selectAll:$i,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return zo(e,function(t){if(t.empty()){var r=se(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ge(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ge(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=se(e.doc,i.line-1).text;l&&(i=new ge(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ge(i.line-1,l.length-1),i,"+transpose"))}r.push(new hi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return jn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ni-400&&0==ve(Yo.pos,r)?n="triple":Xo&&Xo.time>i-400&&0==ve(Xo.pos,r)?(n="double",Yo={time:i,pos:r}):(n="single",Xo={time:i,pos:r});var o,u=e.doc.sel,c=y?t.metaKey:t.ctrlKey;e.options.dragDrop&&bt&&!e.isReadOnly()&&"single"==n&&(o=u.contains(r))>-1&&(ve((o=u.ranges[o]).from(),r)<0||r.xRel>0)&&(ve(o.to(),r)>0||r.xRel<0)?function(e,t,r,n){var i=e.display,o=+new Date,u=Xn(e,function(c){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,ot(document,"mouseup",u),ot(i.scroller,"drop",u),Math.abs(t.clientX-c.clientX)+Math.abs(t.clientY-c.clientY)<10&&(ht(c),!n&&+new Date-200-1?c[a]:new hi(r,r)):(s=l.sel.primary(),a=l.sel.primIndex);if(b?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(s=new hi(r,r)),r=on(e,t,!0,!0),a=-1;else if("double"==n){var h=e.findWordAt(r);s=e.display.shift||l.extend?Ei(l,s,h.anchor,h.head):h}else if("triple"==n){var f=new hi(ge(r.line,0),Ce(l,ge(r.line+1,0)));s=e.display.shift||l.extend?Ei(l,s,f.anchor,f.head):f}else s=Ei(l,s,r);i?-1==a?(a=c.length,Gi(l,fi(c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"single"==n&&!t.shiftKey?(Gi(l,fi(c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),u=l.sel):zi(l,a,s,K):(a=0,Gi(l,new ci([s],0),K),u=l.sel);var d=r;var p=o.wrapper.getBoundingClientRect(),g=0;function v(t){var i=++g,c=on(e,t,!0,"rect"==n);if(c)if(0!=ve(c,d)){e.curOp.focus=D(),function(t){if(0==ve(d,t))return;if(d=t,"rect"==n){for(var i=[],o=e.options.tabSize,c=z(se(l,r.line).text,r.ch,o),h=z(se(l,t.line).text,t.ch,o),f=Math.min(c,h),p=Math.max(c,h),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=se(l,g).text,y=X(m,f,o);f==p?i.push(new hi(ge(g,y),ge(g,y))):m.length>y&&i.push(new hi(ge(g,y),ge(g,X(m,p,o))))}i.length||i.push(new hi(r,r)),Gi(l,fi(u.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=s,x=w.anchor,C=t;if("single"!=n)ve((b="double"==n?e.findWordAt(t):new hi(ge(t.line,0),Ce(l,ge(t.line+1,0)))).anchor,x)>0?(C=b.head,x=we(w.from(),b.anchor)):(C=b.anchor,x=be(w.to(),b.head));var S=u.ranges.slice(0);S[a]=new hi(Ce(l,x),C),Gi(l,fi(S,a),K)}}(c);var h=bn(o,l);(c.line>=h.to||c.linep.bottom?20:0;f&&setTimeout(Xn(e,function(){g==i&&(o.scroller.scrollTop+=f,v(t))}),50)}}function m(t){e.state.selectingText=!1,g=1/0,ht(t),o.input.focus(),ot(document,"mousemove",y),ot(document,"mouseup",w),l.history.lastSelOrigin=null}var y=Xn(e,function(e){vt(e)?v(e):m(e)}),w=Xn(e,m);e.state.selectingText=w,nt(document,"mousemove",y),nt(document,"mouseup",w)}(e,t,r,n,c)}(t,e,n):gt(e)==r.scroller&&ht(e);break;case 2:a&&(t.state.lastMiddleDown=+new Date),n&&Fi(t.doc,n),setTimeout(function(){return r.input.focus()},20),ht(e);break;case 3:S?tl(t,e):function(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,pn(e))},100)}(t)}}}function Jo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ht(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ut(e,r))return dt(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return lt(e,r,e,fe(e.doc,o),e.options.gutters[a],t),dt(t)}}function el(e,t){return Jo(e,t,"gutterClick",!0)}function tl(e,t){xr(e.display,t)||function(e,t){if(!ut(e,"gutterContextMenu"))return!1;return Jo(e,t,"gutterContextMenu",!1)}(e,t)||st(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}var nl={toString:function(){return"CodeMirror.Init"}},il={},ol={};function ll(e){ai(e),$n(e),gn(e)}function sl(e,t,r){if(!t!=!(r&&r!=nl)){var n=e.display.dragFunctions,i=t?nt:ot;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function al(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),Ye(e)),nn(e),$n(e),Rr(e),setTimeout(function(){return Wn(e)},100)}function ul(e,t){var n=this;if(!(this instanceof ul))return new ul(e,t);this.options=t=t?I(t):{},I(il,t,!1),ui(t);var i=t.value;"string"==typeof i&&(i=new bo(i,t.mode,null,t.lineSeparator,t.direction)),this.doc=i;var o=new ul.inputStyles[t.inputStyle](this),u=this.display=new function(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=W("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=W("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=W("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}(e,i,o);for(var c in u.wrapper.CodeMirror=this,ai(this),rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&u.input.focus(),l&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;nt(t.scroller,"mousedown",Xn(e,Qo)),nt(t.scroller,"dblclick",l&&s<11?Xn(e,function(t){if(!st(e,t)){var r=on(e,t);if(r&&!el(e,t)&&!xr(e.display,t)){ht(t);var n=e.findWordAt(r);Fi(e.doc,n.anchor,n.head)}}}):function(t){return st(e,t)||ht(t)});S||nt(t.scroller,"contextmenu",function(t){return tl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}nt(t.scroller,"touchstart",function(i){if(!st(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),nt(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),nt(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new hi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new hi(ge(s.line,0),Ce(e.doc,ge(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),ht(r)}i()}),nt(t.scroller,"touchcancel",i),nt(t.scroller,"scroll",function(){t.scroller.clientHeight&&(wn(e,t.scroller.scrollTop),xn(e,t.scroller.scrollLeft,!0),lt(e,"scroll",e))}),nt(t.scroller,"mousewheel",function(t){return kn(e,t)}),nt(t.scroller,"DOMMouseScroll",function(t){return kn(e,t)}),nt(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){st(e,t)||pt(t)},over:function(t){st(e,t)||(!function(e,t){var r=on(e,t);if(r){var n=document.createDocumentFragment();un(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),pt(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-wo<100))pt(t);else if(!st(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:Xn(e,xo),leave:function(t){st(e,t)||Co(e)}};var a=t.input.getField();nt(a,"keyup",function(t){return qo.call(e,t)}),nt(a,"keydown",Xn(e,$o)),nt(a,"keypress",Xn(e,Zo)),nt(a,"focus",function(t){return dn(e,t)}),nt(a,"blur",function(t){return pn(e,t)})}(this),To(),Rn(this),this.curOp.forceUpdate=!0,Si(this,i),t.autofocus&&!m||this.hasFocus()?setTimeout(F(dn,this),20):pn(this),ol)ol.hasOwnProperty(c)&&ol[c](n,t[c],nl);vn(this),t.finishInit&&t.finishInit(this);for(var d=0;d150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(se(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f1)if(fl&&fl.text.join("\n")==t){if(n.ranges.length%fl.text.length==0){u=[];for(var c=0;c=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ge(d.line,d.ch-r):e.state.overwrite&&!s?p=ge(p.line,Math.min(se(o,p.line).text.length,p.ch+$(a).length)):fl&&fl.lineWise&&fl.text.join("\n")==t&&(d=p=ge(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};Zi(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&vl(e,t),Fn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function gl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||jn(t,function(){return pl(t,r,0,null,"paste")}),!0}function vl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=hl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=hl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function ml(e){for(var t=[],r=[],n=0;n=e.first+e.size||(t=new ge(l,t.ch,t.sticky),!(s=se(e,l))))return!1;t=et(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=Yi(e,t,o,l,!0);return me(o,g)&&(g.hitSide=!0),g}function xl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*Qr(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=_r(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Cl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Sl(e,t){var r=Wr(e,t.line);if(!r||r.hidden)return null;var n=se(e.doc,t.line),i=Nr(r,n,t.line),o=Ze(n,e.doc.direction),l="left";o&&(l=$e(o,t.ch)%2?"right":"left");var s=Er(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Ll(e,t){return t&&(e.bad=!0),e}function Tl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Ll(e.clipPos(ge(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;in.firstLine()&&(l=ge(l.line-1,se(n.doc,l.line-1).length)),s.ch==se(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=ln(n,l.line))?(t=he(i.view[0].line),r=i.view[0].node):(t=he(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=ln(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=he(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator();function a(){l&&(o+=s,l=!1)}function u(e){e&&(a(),o+=e)}function c(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void u(r||t.textContent.replace(/\u200b/g,""));var o,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(ge(n,0),ge(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(o=f[0].find())&&u(ae(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var p=0;p1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ge(t,d),C=ge(a,f.length?$(f).length-p:0);return h.length>1||h[0]||ve(x,C)?(ro(n.doc,h,x,C,"+input"),!0):void 0},Cl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Cl.prototype.reset=function(){this.forceCompositionEnd()},Cl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Cl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Cl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||jn(this.cm,function(){return $n(e.cm)})},Cl.prototype.setUneditable=function(e){e.contentEditable="false"},Cl.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,pl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Cl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Cl.prototype.onContextMenu=function(){},Cl.prototype.resetPosition=function(){},Cl.prototype.needsContentAttribute=!0;var Ml=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ml.prototype.init=function(e){var t=this,r=this,n=this.cm,i=this.wrapper=bl(),o=this.textarea=i.firstChild;function a(e){if(!st(n,e)){if(n.somethingSelected())dl({lineWise:!1,text:n.getSelections()}),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,o.value=fl.text.join("\n"),E(o));else{if(!n.options.lineWiseCopyCut)return;var t=ml(n);dl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),E(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),nt(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),nt(o,"paste",function(e){st(n,e)||gl(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),nt(o,"cut",a),nt(o,"copy",a),nt(e.scroller,"paste",function(t){xr(e,t)||st(n,t)||(n.state.pasteIncoming=!0,r.focus())}),nt(e.lineSpace,"selectstart",function(t){xr(e,t)||ht(t)}),nt(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),nt(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ml.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=an(e);if(e.options.moveInputWithCursor){var i=jr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Ml.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ml.prototype.reset=function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary(),a=(t=Tt&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3))?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&E(this.textarea),l&&s>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Ml.prototype.getField=function(){return this.textarea},Ml.prototype.supportsTouch=function(){return!1},Ml.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ml.prototype.blur=function(){this.textarea.blur()},Ml.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ml.prototype.receivedFocus=function(){this.slowPoll()},Ml.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ml.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Ml.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Lt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ml.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ml.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ml.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=on(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Xn(r,Gi)(r.doc,di(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){pt(e);var g=function(){ot(window,"mouseup",g),setTimeout(m,20)};nt(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Xn(r,$i)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Ml.prototype.readOnlyChanged=function(e){e||this.reset()},Ml.prototype.setUneditable=function(){},Ml.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=nl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=nl,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,yi(e)},!0),r("indentUnit",2,yi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){bi(e),Rr(e),$n(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ge(n,o))}n++});for(var i=r.length-1;i>=0;i--)ro(e.doc,t,r[i],ge(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=nl&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){rl(e),ll(e)},!0),r("keyMap","default",function(e,t,r){var n=Io(t),i=r!=nl&&Io(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("lineWrapping",!1,al,!0),r("gutters",[],function(e){ui(e.options),ll(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?tn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return Wn(e)},!0),r("scrollbarStyle","native",function(e){Hn(e),Wn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){ui(e.options),ll(e)},!0),r("firstLineNumber",1,ll,!0),r("lineNumberFormatter",function(e){return e},ll,!0),r("showCursorWhenSelecting",!1,sn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("readOnly",!1,function(e,t){"nocursor"==t?(pn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,sl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,sn,!0),r("singleCursorHeightPerLine",!0,sn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,bi,!0),r("addModeClass",!1,bi,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,bi,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ul),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Xn(this,t[e])(this,r,i),lt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Io(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(hl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Fn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&zi(this.doc,n,new hi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ge(e),t,!0)},getTokenTypeAt:function(e){e=Ce(this.doc,e);var t,r=zt(this,se(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=se(this.doc,e)}else n=e;return Ur(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-je(n):0)},defaultTextHeight:function(){return Qr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=jr(this,Ce(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Pn(o,l)).scrollTop&&wn(o,s.scrollTop),null!=s.scrollLeft&&xn(o,s.scrollLeft))},triggerOnKeyDown:Yn($o),triggerOnKeyPress:Yn(Zo),triggerOnKeyUp:qo,execCommand:function(e){if(Ro.hasOwnProperty(e))return Ro[e].call(null,this)},triggerElectric:Yn(function(e){vl(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5)&&nn(this),lt(this,"refresh",this)}),swapDoc:Yn(function(e){var t=this.doc;return t.cm=null,Si(this,e),Rr(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ct(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(ul);var Nl="iter insert remove copy getEditor constructor".split(" ");for(var Ol in bo.prototype)bo.prototype.hasOwnProperty(Ol)&&B(Nl,Ol)<0&&(ul.prototype[Ol]=function(e){return function(){return e.apply(this.doc,arguments)}}(bo.prototype[Ol]));return ct(bo),ul.inputStyles={textarea:Ml,contenteditable:Cl},ul.defineMode=function(e){ul.defaults.mode||"null"==e||(ul.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Mt[e]=t}.apply(this,arguments)},ul.defineMIME=function(e,t){Nt[e]=t},ul.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ul.defineMIME("text/plain","null"),ul.defineExtension=function(e,t){ul.prototype[e]=t},ul.defineDocExtension=function(e,t){bo.prototype[e]=t},ul.fromTextArea=function(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(nt(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(ot(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=ul(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=ot,e.on=nt,e.wheelEventPixels=Tn,e.Doc=bo,e.splitLines=St,e.countColumn=z,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=lt,e.Line=Xt,e.changeEnd=pi,e.scrollbarModel=Dn,e.Pos=ge,e.cmpPos=ve,e.modes=Mt,e.mimeModes=Nt,e.resolveMode=Ot,e.getMode=Wt,e.modeExtensions=At,e.extendMode=Dt,e.copyState=Ht,e.startState=Et,e.innerMode=Pt,e.commands=Ro,e.keyMap=Ao,e.keyName=Fo,e.isModifierKey=Eo,e.lookupKey=Po,e.normalizeKeyMap=Ho,e.StringStream=Ft,e.SharedTextMarker=go,e.TextMarker=fo,e.LineWidget=uo,e.e_preventDefault=ht,e.e_stopPropagation=ft,e.e_stop=pt,e.addClass=H,e.contains=A,e.rmClass=k,e.keyNames=Mo}(ul),ul.version="5.25.0",ul}); -// ----------------------------- ----------------------------- active-line.js -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",i="CodeMirror-activeline-gutter";function r(e){for(var r=0;r!?|~^]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,r){return n=e,a=r,t}function m(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(p))return t.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=m),v("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),v("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),v("regexp","string-2")):(e.eatWhile(d),v("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n)return e.skipToEnd(),v("error","error");if(d.test(n))return e.eatWhile(d),v("operator","operator",e.current());if(f.test(n)){e.eatWhile(f);var a=e.current(),i=s.propertyIsEnumerable(a)&&s[a];return i&&"."!=t.lastType?v(i.type,i.style,a):v("variable","variable",a)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var k="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){for(var n=0,a=!1,i=r-1;i>=0;--i){var o=e.string.charAt(i),c=k.indexOf(o);if(c>=0&&c<3){if(!n){++i;break}if(0==--n)break}else if(c>=3&&c<6)++n;else if(f.test(o))a=!0;else{if(/["'\/]/.test(o))return;if(a&&!n){++i;break}}}a&&!n&&(t.fatArrowAt=i)}}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function g(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var j={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)j.cc.push(arguments[e])}function V(){return M.apply(null,arguments),!0}function E(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=j.state;if(n.context){if(j.marked="def",t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}var I={name:"this",next:{name:"arguments"}};function z(){j.state.context={prev:j.state.context,vars:j.state.localVars},j.state.localVars=I}function T(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function A(e,t){var r=function(){var r=j.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new g(n,j.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function C(){var e=j.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function $(e){return function t(r){return r==e?V():";"==e?M():V(t)}}function q(e,t){return"var"==e?V(A("vardef",t.length),te,$(";"),C):"keyword a"==e?V(A("form"),O,q,C):"keyword b"==e?V(A("form"),q,C):"{"==e?V(A("}"),Z,C):";"==e?V():"if"==e?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==C&&j.state.cc.pop()(),V(A("form"),O,q,C,oe)):"function"==e?V(de):"for"==e?V(A("form"),ce,q,C):"variable"==e?V(A("stat"),J):"switch"==e?V(A("form"),O,A("}","switch"),$("{"),Z,C,C):"case"==e?V(O,$(":")):"default"==e?V($(":")):"catch"==e?V(A("form"),z,$("("),pe,$(")"),q,C,T):"module"==e?V(A("form"),z,ke,T,C):"class"==e?V(A("form"),ve,C):"export"==e?V(A("form"),xe,C):"import"==e?V(A("form"),he,C):M(A("stat"),O,$(";"),C)}function O(e){return S(e,!1)}function P(e){return S(e,!0)}function S(e,t){if(j.state.fatArrowAt==j.stream.start){var r=t?G:F;if("("==e)return V(z,A(")"),X(re,")"),C,$("=>"),r,T);if("variable"==e)return M(z,re,$("=>"),r,T)}var n=t?U:H;return h.hasOwnProperty(e)?V(n):"function"==e?V(de,n):"keyword c"==e?V(t?N:W):"("==e?V(A(")"),W,Ve,$(")"),C,n):"operator"==e||"spread"==e?V(t?P:O):"["==e?V(A("]"),je,C,n):"{"==e?Y(L,"}",null,n):"quasi"==e?M(B,n):V()}function W(e){return e.match(/[;\}\)\],]/)?M():M(O)}function N(e){return e.match(/[;\}\)\],]/)?M():M(P)}function H(e,t){return","==e?V(O):U(e,t,!1)}function U(e,t,r){var n=0==r?H:U,a=0==r?O:P;return"=>"==e?V(z,r?G:F,T):"operator"==e?/\+\+|--/.test(t)?V(n):"?"==t?V(O,$(":"),a):V(a):"quasi"==e?M(B,n):";"!=e?"("==e?Y(P,")","call",n):"."==e?V(K,n):"["==e?V(A("]"),W,$("]"),C,n):void 0:void 0}function B(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?V(B):V(O,D)}function D(e){if("}"==e)return j.marked="string-2",j.state.tokenize=b,V(B)}function F(e){return x(j.stream,j.state),M("{"==e?q:O)}function G(e){return x(j.stream,j.state),M("{"==e?q:P)}function J(e){return":"==e?V(C,q):M(H,$(";"),C)}function K(e){if("variable"==e)return j.marked="property",V()}function L(e,t){return"variable"==e||"keyword"==j.style?(j.marked="property",V("get"==t||"set"==t?Q:R)):"number"==e||"string"==e?(j.marked=c?"property":j.style+" property",V(R)):"jsonld-keyword"==e?V(R):"["==e?V(O,$("]"),R):void 0}function Q(e){return"variable"!=e?M(R):(j.marked="property",V(de))}function R(e){return":"==e?V(P):"("==e?M(de):void 0}function X(e,t){function r(n){if(","==n){var a=j.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),V(e,r)}return n==t?V():V($(t))}return function(n){return n==t?V():M(e,r)}}function Y(e,t,r){for(var n=3;n=0;--l){var u=t.cc[l];if(u==C)c=c.prev;else if(u!=oe)break}"stat"==c.type&&"}"==a&&(c=c.prev),o&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,s=a==f;return"vardef"==f?c.indented+("operator"==t.lastType||","==t.lastType?c.info+1:0):"form"==f&&"{"==a?c.indented:"form"==f?c.indented+i:"stat"==f?c.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?o||i:0):"switch"!=c.info||s||0==r.doubleIndentSwitch?c.align?c.column+(s?0:1):c.indented+(s?0:i):c.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",helperType:l?"json":"javascript",jsonldMode:c,jsonMode:l}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}); (function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32} @@ -530,16 +519,6 @@ function repository_extend_and_zoom(){ } // end -/*CodeMirror addon hint -----------------------------------------------Start*/ -/* https://github.com/farzher/fuzzysort */ -!function(e,r){"function"==typeof define&&define.amd?define([],r):"object"==typeof module&&module.exports?module.exports=r():e.fuzzysort=r()}(this,function(){var e="undefined"!=typeof require&&"undefined"==typeof window,r=new Map,n=new Map,o=[];o.total=0;var t=[],i=[];function a(){r.clear(),n.clear(),t=[],i=[]}function l(e){for(var r=-9007199254740991,n=e.length-1;n>=0;--n){var o=e[n];if(null!==o){var t=o.score;t>r&&(r=t)}}return-9007199254740991===r?null:r}function f(e,r){var n=e[r];if(void 0!==n)return n;var o=r;Array.isArray(r)||(o=r.split("."));for(var t=o.length,i=-1;e&&++i>1]=e[n],t=1+(n<<1)}for(var a=n-1>>1;n>0&&o.score>1)e[n]=e[a];e[n]=o}return n.add=function(n){var o=r;e[r++]=n;for(var t=o-1>>1;o>0&&n.score>1)e[o]=e[t];e[o]=n},n.poll=function(){if(0!==r){var n=e[0];return e[0]=e[--r],o(),n}},n.peek=function(n){if(0!==r)return e[0]},n.replaceTop=function(r){e[0]=r,o()},n},p=s();return function d(c){var g={single:function(e,r,n){return e?(u(e)||(e=g.getPreparedSearch(e)),r?(u(r)||(r=g.getPrepared(r)),((n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo)(e,r,e[0])):null):null},go:function(e,r,n){if(!e)return o;var t=(e=g.prepareSearch(e))[0],i=n&&n.threshold||c&&c.threshold||-9007199254740991,a=n&&n.limit||c&&c.limit||9007199254740991,s=(n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,d=0,v=0,h=r.length;if(n&&n.keys)for(var w=n.scoreFn||l,x=n.keys,y=x.length,m=h-1;m>=0;--m){for(var T=r[m],k=new Array(y),b=y-1;b>=0;--b)(_=f(T,B=x[b]))?(u(_)||(_=g.getPrepared(_)),k[b]=s(e,_,t)):k[b]=null;k.obj=T;var I=w(k);null!==I&&(Ip.peek().score&&p.replaceTop(k))))}else if(n&&n.key){var B=n.key;for(m=h-1;m>=0;--m)(_=f(T=r[m],B))&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}else for(m=h-1;m>=0;--m){var _,C;(_=r[m])&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}if(0===d)return o;var A=new Array(d);for(m=d-1;m>=0;--m)A[m]=p.poll();return A.total=d+v,A},goAsync:function(r,n,t){var i=!1,a=new Promise(function(a,p){if(!r)return a(o);var d=(r=g.prepareSearch(r))[0],v=s(),h=n.length-1,w=t&&t.threshold||c&&c.threshold||-9007199254740991,x=t&&t.limit||c&&c.limit||9007199254740991,y=(t&&void 0!==t.allowTypo?t.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,m=0,T=0;function k(){if(i)return p("canceled");var s=Date.now();if(t&&t.keys)for(var c=t.scoreFn||l,b=t.keys,I=b.length;h>=0;--h){for(var B=n[h],_=new Array(I),C=I-1;C>=0;--C)(P=f(B,L=b[C]))?(u(P)||(P=g.getPrepared(P)),_[C]=y(r,P,d)):_[C]=null;_.obj=B;var A=c(_);if(null!==A&&!(Av.peek().score&&v.replaceTop(_)),h%1e3==0&&Date.now()-s>=10))return void(e?setImmediate(k):setTimeout(k))}else if(t&&t.key){for(var L=t.key;h>=0;--h)if((P=f(B=n[h],L))&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}else for(;h>=0;--h){var P,j;if((P=n[h])&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}if(0===m)return a(o);for(var N=new Array(m),S=m-1;S>=0;--S)N[S]=v.poll();N.total=m+T,a(N)}e?setImmediate(k):k()});return a.cancel=function(){i=!0},a},highlight:function(e,r,n){if(null===e)return null;void 0===r&&(r=""),void 0===n&&(n="");for(var o="",t=0,i=!1,a=e.target,l=a.length,f=e.indexes,u=0;u999)return g.prepare(e);var n=r.get(e);return void 0!==n?n:(n=g.prepare(e),r.set(e,n),n)},getPreparedSearch:function(e){if(e.length>999)return g.prepareSearch(e);var r=n.get(e);return void 0!==r?r:(r=g.prepareSearch(e),n.set(e,r),r)},algorithm:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0,p=0;;){if(n===o[u]){if(t[p++]=u,++f===a)break;n=e[0===s?f:s===f?f+1:s===f-1?f-1:f]}if(++u>=l)for(;;){if(f<=1)return null;if(0===s){if(n===e[--f])continue;s=f}else{if(1===s)return null;if((n=e[1+(f=--s)])===e[f])continue}u=t[(p=f)-1]+1;break}}f=0;var d=0,c=!1,v=0,h=r._nextBeginningIndexes;null===h&&(h=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target));var w=u=0===t[0]?0:h[t[0]-1];if(u!==l)for(;;)if(u>=l){if(f<=0){if(++d>a-2)break;if(e[d]===e[d+1])continue;u=w;continue}--f,u=h[i[--v]]}else if(e[0===d?f:d===f?f+1:d===f-1?f-1:f]===o[u]){if(i[v++]=u,++f===a){c=!0;break}++u}else u=h[u];if(c)var x=i,y=v;else x=t,y=p;for(var m=0,T=-1,k=0;k=0;--k)r.indexes[k]=x[k];return r},algorithmNoTypo:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0;;){if(n===o[u]){if(t[s++]=u,++f===a)break;n=e[f]}if(++u>=l)return null}f=0;var p=!1,d=0,c=r._nextBeginningIndexes;if(null===c&&(c=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target)),(u=0===t[0]?0:c[t[0]-1])!==l)for(;;)if(u>=l){if(f<=0)break;--f,u=c[i[--d]]}else if(e[f]===o[u]){if(i[d++]=u,++f===a){p=!0;break}++u}else u=c[u];if(p)var v=i,h=d;else v=t,h=s;for(var w=0,x=-1,y=0;y=0;--y)r.indexes[y]=v[y];return r},prepareLowerCodes:function(e){for(var r=e.length,n=[],o=e.toLowerCase(),t=0;t=65&&l<=90,u=f||l>=97&&l<=122||l>=48&&l<=57,s=f&&!t||!i||!u;t=f,i=u,s&&(n[o++]=a)}return n},prepareNextBeginningIndexes:function(e){for(var r=e.length,n=g.prepareBeginningIndexes(e),o=[],t=n[0],i=0,a=0;aa?o[a]=t:(t=n[++i],o[a]=void 0===t?r:t);return o},cleanup:a,new:d};return g}()}); -/* showHint */ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var i="CodeMirror-hint",e="CodeMirror-hint-active";function n(t,i){this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(i){i=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in a)o[s]=a[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),i);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var o=0;ol.clientHeight+1,x=h.getScrollInfo();if(C>0){var A=k.bottom-k.top;if(m.top-(m.bottom-k.top)-A>0)l.style.top=(v=m.top-A)+"px",y=!1;else if(A>H){l.style.height=H-5+"px",l.style.top=(v=m.bottom-k.top)+"px";var S=h.getCursor();o.from.ch!=S.ch&&(m=h.cursorCoords(S),l.style.left=(g=m.left)+"px",k=l.getBoundingClientRect())}}var T,M=k.right-w;if(M>0&&(k.right-k.left>w&&(l.style.width=w-5+"px",M-=k.right-k.left-w),l.style.left=(g=m.left-M)+"px"),b)for(var E=l.firstChild;E;E=E.nextSibling)E.style.paddingRight=h.display.nativeBarWidth+"px";(h.addKeyMap(this.keyMap=function(t,i){var e={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},n=t.options.customKeys,o=n?{}:e;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,i)}:e.hasOwnProperty(n)?e[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(n,{moveFocus:function(t,i){s.changeActive(s.selectedHint+t,i)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:a.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus)&&(h.on("blur",this.onBlur=function(){T=setTimeout(function(){n.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(T)}));return h.on("scroll",this.onScroll=function(){var t=h.getScrollInfo(),i=h.getWrapperElement().getBoundingClientRect(),e=v+x.top-t.top,o=e-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(y||(o+=l.offsetHeight),o<=i.top||o>=i.bottom)return n.close();l.style.top=e+"px",l.style.left=g+x.left-t.left+"px"}),t.on(l,"dblclick",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),s.pick())}),t.on(l,"click",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),n.options.completeOnSingleClick&&s.pick())}),t.on(l,"mousedown",function(){setTimeout(function(){h.focus()},20)}),t.signal(o,"select",a[0],l.firstChild),!0}function l(t,i,e,n){if(t.async)t(i,n,e);else{var o=t(i,e);o&&o.then?o.then(n):n(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(i,e){var n=i.list[e];n.hint?n.hint(this.cm,i,n):this.cm.replaceRange(c(n),n.from||i.from,n.to||i.to,"complete"),t.signal(i,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch0&&n.to.ch-n.from.ch!=o.to.ch-o.from.ch)))&&(this.data=i,i&&i.list.length))if(s&&1==i.list.length)this.pick(i,0);else{if(1==i.list.length&&i.to.ch-i.from.ch===i.list[0].length)return;this.widget=new h(this,i),t.signal(i,"shown")}}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(i,n){if(i>=this.data.list.length?i=n?this.data.list.length-1:0:i<0&&(i=n?0:this.data.list.length-1),this.selectedHint!=i){var o=this.hints.childNodes[this.selectedHint];o.className=o.className.replace(" "+e,""),(o=this.hints.childNodes[this.selectedHint=i]).className+=" "+e,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:function(i,e){var n,o=i.getHelpers(e,"hint");if(o.length){var s=function(t,i,e){var n=function(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):o(s+1)})}(0)};return s.async=!0,s.supportsSelection=!0,s}if(n=i.getHelper(i.getCursor(),"hintWords")){t.signal(i,"hinting",n);var c=i.state.myhints,r=n.slice(0);return c&&c.forEach(function(t){-1===n.indexOf(t)&&r.push(t)}),function(i){return t.hint.fromList(i,{words:r})}}return t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else c="",r=s;var h=[];if(fuzzysort&&fuzzysort.go){var l=fuzzysort.go(c,e.words);l&&l.forEach(function(t){h.push(t.target)})}else for(var a=0;a,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)}); -/* javascript-hint 注释掉,使得show-hint.js 的resolveAutoHints方法进入这个判断:} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { */ -// !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;rf.ch&&(c.end=f.ch,c.string=c.string.slice(0,f.ch-c.start)):c={start:f.ch,end:f.ch,string:"",state:c.state,type:"."==c.string?"property":null};for(var p=c;"property"==p.type;){if("."!=(p=s(i,e(f.line,p.start))).string)return;if(p=s(i,e(f.line,p.start)),!l)var l=[];l.push(p)}t.signal(i,"hinting");var u=i.state.myhints;return i.state.needToClearJSHint&&(o=[],i.state.needToClearJSHint=!1),u&&u.forEach(function(t){n(o,t)||o.push(t)}),{list:function(t,e,i,o){var s=[],a=t.string,f=o&&o.globalScope||window;function c(t){if(fuzzysort&&fuzzysort.single){var e=fuzzysort.single(a,t);e&&e.score<=0&&!n(s,t)&&s.push(t)}else 0!=t.lastIndexOf(a,0)||n(s,t)||s.push(t)}if(e&&e.length){var p,l=e.pop();for(l.type&&0===l.type.indexOf("variable")?(o&&o.additionalContext&&(p=o.additionalContext[l.string]),o&&!1===o.useGlobalScope||(p=p||f[l.string])):"string"==l.type?p="":"atom"==l.type?p=1:"function"==l.type&&(null==f.jQuery||"$"!=l.string&&"jQuery"!=l.string||"function"!=typeof f.jQuery?null!=f._&&"_"==l.string&&"function"==typeof f._&&(p=f._()):p=f.jQuery());null!=p&&e.length;)p=p[e.pop().string];null!=p&&function(t){"string"==typeof t?r(stringProps,c):t instanceof Array?r(arrayProps,c):t instanceof Function&&r(funcProps,c);!function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,c)}(p)}else{var u=fuzzysort.go(a,i);u&&u.forEach(function(t){s.push(t.target)})}return s}(c,l,o,a),from:e(f.line,c.start),to:e(f.line,c.end)}}}function o(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",function(t,e){return i(t,s,function(t,e){return t.getTokenAt(e)},e)}),t.registerHelper("hint","coffeescript",function(t,e){return i(t,coffeescriptKeywords,o,e)});var s="double float int long short null true false enum super this void auto for register static const friend mutable explicit virtual template typename printf break continue return do while if else for instanceof switch case default try catch finally throw throws assert import package boolean byte char delete private inline struct union signed unsigned export extern namespace using operator sizeof typedef typeid and del from not as elif or with pass except print exec raise is def lambda private protected public abstract class extends final implements interface native new static strictfp synchronized transient main String string System println vector bool boolean FALSE TRUE function".split(" ")}); -/* anyword-hint */ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}})}); -/*CodeMirror addon hint -----------------------------------------------End*/ // 测评的扩大与缩小 function valuation_extend_and_zoom(){ @@ -1196,12 +1175,6 @@ function _triggerEvent(eventName, data, target) { } // --------------------- --------------------- --------------------- --------------------- END -// CodeMirror python -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i)),e.defineMode("python",function(a,s){for(var c="error",l=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],f=0;fr?_(t):i0&&z(e,t)&&(a+=" "+c),a}return v(e,t)}function v(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var r=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),e.match(/^[\d_]+\.\d*/)&&(r=!0),e.match(/^\.\d+/)&&(r=!0),r)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(y))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(t,n){return t.match(e)?(n.tokenize=o,r):t.match("{")?"punctuation":t.match("}")?(n.tokenize=o,"punctuation"):v(t,n)}function o(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return a.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return a.tokenize=i,o.current()?r:(o.next(),"punctuation");if(o.match("}}"))return r;if(o.match("}"))return c;o.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return c;a.tokenize=t}return r}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var t=1==e.length,n="string";function r(r,i){for(;!r.eol();)if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),t&&r.eol())return n}else{if(r.match(e))return i.tokenize=x,n;r.eat(/['"]/)}if(t){if(s.singleLineStringErrors)return c;i.tokenize=x}return n}return r.isString=!0,r}(e.current()),t.tokenize(e,t));for(var o=0;o1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function w(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(b,!1)?"meta":h?"operator":c;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent+=1),"lambda"==r&&(t.lambda=!0),":"!=r||t.lambda||"py"!=o(t).type||_(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(o(t).type!=r)return c;t.indent=t.scopes.pop().offset-p}}return t.dedent>0&&e.eol()&&"py"==o(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}return{startState:function(e){return{tokenize:x,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=w(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+c:r},indent:function(t,n){if(t.tokenize!=x)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0);return null!=r.align?r.align-(i?1:0):r.offset-(i?p:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python");var a;e.defineMIME("text/x-cython",{name:"python",extra_keywords:(a="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",a.split(" "))})}); -// CodeMirror c-like(java) -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,L=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;function D(e,t){var n,r=e.next();if(k[r]){var o=k[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r))return c=r,null;if(T.test(r)){if(e.backUp(1),e.match(M))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=z,z(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(P.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(P););return"operator"}if(e.eatWhile(L),S)for(;e.match(S);)e.eatWhile(L);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(x,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)?(l(g,a)&&(c="newstatement"),"builtin"):l(b,a)?"atom":"variable"}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):v&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),k.token){var d=k.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,I(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0);if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(k.indent){var a=k.indent(t,r,n);if("number"==typeof a)return a}var i=o==r.type,l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||i?r.indented+(i?0:d)+(i||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(i?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",c="int long char short double float unsigned signed void size_t ptrdiff_t";function u(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=u;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function d(e,t){return"type"==t.prevToken&&"type"}function f(e){return e.eatWhile(/[\w\.']/),"number"}function p(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function m(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function y(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.types),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function e(t){return function(n,r){for(var o;o=n.next();){if("*"==o&&n.eat("/")){if(1==t){r.tokenize=null;break}return r.tokenize=e(t-1),r.tokenize(n,r)}if("/"==o&&n.eat("*"))return r.tokenize=e(t+1),r.tokenize(n,r)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,o=!1,a=!1;!e.eol();){if(!n&&!o&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!o&&"$"==r&&e.match("{")&&e.skipTo("}"),o=!o&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:i(s+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(c),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:i(s+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(c),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),y("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(c),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var x=null;y("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var o,a=!1,i=!1;!n.eol();){if(!a&&n.match('"')&&("single"==t||n.match('""'))){i=!0;break}if(!a&&n.match("``")){x=e(t),i=!0;break}o=n.next(),a="single"==t&&!a&&"\\"==o}return i&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!x||!e.match("`"))&&(t.tokenize=x,x=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}); -// CodeMirror matchbrackets -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(t,e,i){var c=t.getLineHandle(e.line),o=e.ch-1,l=i&&i.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=!l&&o>=0&&r[c.text.charAt(o)]||r[c.text.charAt(++o)];if(!h)return null;var s=">"==h.charAt(1)?1:-1;if(i&&i.strict&&s>0!=(o==e.ch))return null;var u=t.getTokenTypeAt(n(e.line,o+1)),f=a(t,n(e.line,o+(s>0?1:0)),s,u||null,i);return null==f?null:{from:n(e.line,o),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:s>0}}function a(t,e,i,a,c){for(var o=c&&c.maxScanLineLength||1e4,l=c&&c.maxScanLines||1e3,h=[],s=c&&c.bracketRegex?c.bracketRegex:/[(){}[\]]/,u=i>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),f=e.line;f!=u;f+=i){var m=t.getLine(f);if(m){var g=i>0?0:m.length-1,d=i>0?m.length:-1;if(!(m.length>o))for(f==e.line&&(g=e.ch-(i<0?1:0));g!=d;g+=i){var k=m.charAt(g);if(s.test(k)&&(void 0===a||t.getTokenTypeAt(n(f,g+1))==a))if(">"==r[k].charAt(1)==i>0)h.push(k);else{if(!h.length)return{pos:n(f,g),ch:k};h.pop()}}}}return f-i!=(i>0?t.lastLine():t.firstLine())&&null}function c(t,r,a){for(var c=t.state.matchBrackets.maxHighlightLineLength||1e3,o=[],l=t.listSelections(),h=0;h=0===n})}function c(t){var e=Ot.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function u(t,e){return t.getElementsByTagName(e)[0]||t.appendChild(t.ownerDocument.createElement(e))}function h(t,e){if(1===e.nodeType&&V.hasData(t)){var n,r,i,o=V._data(t),s=V._data(e,o),a=o.events;if(a)for(n in delete s.handle,s.events={},a)for(r=0,i=a[n].length;r").appendTo(B.body),n=e.css("display");return e.remove(),"none"!==n&&""!==n||(Kt=B.body.appendChild(Kt||V.extend(B.createElement("iframe"),{frameBorder:0,width:0,height:0})),Zt&&Kt.createElement||((Zt=(Kt.contentWindow||Kt.contentDocument).document).write(""),Zt.close()),e=Zt.body.appendChild(Zt.createElement(t)),n=Yt(e,"display"),B.body.removeChild(Kt)),se[t]=n,n}function k(t,e,n,r){var i;if(V.isArray(e))V.each(e,function(e,i){n||de.test(t)?r(t,i):k(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==V.type(e))r(t,e);else for(i in e)k(t+"["+i+"]",e[i],n,r)}function C(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i,o=e.toLowerCase().split(G),s=0,a=o.length;if(V.isFunction(n))for(;s)[^>]*$|#([\w\-]*)$)/,Z=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Q=/^[\],:{}\s]*$/,J=/(?:^|:|,)(?:\s*\[)+/g,tt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,et=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,nt=/^-ms-/,rt=/-([\da-z])/gi,it=function(t,e){return(e+"").toUpperCase()},ot=function(){B.addEventListener?(B.removeEventListener("DOMContentLoaded",ot,!1),V.ready()):"complete"===B.readyState&&(B.detachEvent("onreadystatechange",ot),V.ready())},st={};V.fn=V.prototype={constructor:V,init:function(t,n,r){var i,o,s;if(!t)return this;if(t.nodeType)return this.context=this[0]=t,this.length=1,this;if("string"==typeof t){if((i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:K.exec(t))&&(i[1]||!n)){if(i[1])return s=(n=n instanceof V?n[0]:n)&&n.nodeType?n.ownerDocument||n:B,t=V.parseHTML(i[1],s,!0),Z.test(i[1])&&V.isPlainObject(n)&&this.attr.call(t,n,!0),V.merge(this,t);if((o=B.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return r.find(t);this.length=1,this[0]=o}return this.context=B,this.selector=t,this}return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t)}return V.isFunction(t)?r.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),V.makeArray(t,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return R.call(this)},get:function(t){return null==t?this.toArray():t<0?this[this.length+t]:this[t]},pushStack:function(t,e,n){var r=V.merge(this.constructor(),t);return r.prevObject=this,r.context=this.context,"find"===e?r.selector=this.selector+(this.selector?" ":"")+n:e&&(r.selector=this.selector+"."+e+"("+n+")"),r},each:function(t,e){return V.each(this,t,e)},ready:function(t){return V.ready.promise().done(t),this},eq:function(t){return-1===(t=+t)?this.slice(t):this.slice(t,t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(t){return this.pushStack(V.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:H,sort:[].sort,splice:[].splice},V.fn.init.prototype=V.fn,V.extend=V.fn.extend=function(){var t,n,r,i,o,s,a=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),"object"!=typeof a&&!V.isFunction(a)&&(a={}),c===l&&(a=this,--l);l0||(D.resolveWith(B,[V]),V.fn.trigger&&V(B).trigger("ready").off("ready"))}},isFunction:function(t){return"function"===V.type(t)},isArray:Array.isArray||function(t){return"array"===V.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):st[z.call(t)]||"object"},isPlainObject:function(t){if(!t||"object"!==V.type(t)||t.nodeType||V.isWindow(t))return!1;try{if(t.constructor&&!$.call(t,"constructor")&&!$.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}var n;for(n in t);return n===e||$.call(t,n)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){var r;return t&&"string"==typeof t?("boolean"==typeof e&&(n=e,e=0),e=e||B,(r=Z.exec(t))?[e.createElement(r[1])]:(r=V.buildFragment([t],e,n?null:[]),V.merge([],(r.cacheable?V.clone(r.fragment):r.fragment).childNodes))):null},parseJSON:function(e){return e&&"string"==typeof e?(e=V.trim(e),t.JSON&&t.JSON.parse?t.JSON.parse(e):Q.test(e.replace(tt,"@").replace(et,"]").replace(J,""))?new Function("return "+e)():void V.error("Invalid JSON: "+e)):null},parseXML:function(n){var r;if(!n||"string"!=typeof n)return null;try{t.DOMParser?r=(new DOMParser).parseFromString(n,"text/xml"):((r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(n))}catch(t){r=e}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&V.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(e){e&&X.test(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(nt,"ms-").replace(rt,it)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,n,r){var i,o=0,s=t.length,a=s===e||V.isFunction(t);if(r)if(a){for(i in t)if(!1===n.apply(t[i],r))break}else for(;o0&&t[0]&&t[l-1]||0===l||V.isArray(t)))for(;a-1;)l.splice(n,1),i&&(n<=s&&s--,n<=a&&a--)}),this},has:function(t){return V.inArray(t,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=e,this},disabled:function(){return!l},lock:function(){return c=e,n||h.disable(),this},locked:function(){return!c},fireWith:function(t,e){return e=[t,(e=e||[]).slice?e.slice():e],l&&(!r||c)&&(i?c.push(e):u(e)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},V.extend({Deferred:function(t){var e=[["resolve","done",V.Callbacks("once memory"),"resolved"],["reject","fail",V.Callbacks("once memory"),"rejected"],["notify","progress",V.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return V.Deferred(function(n){V.each(e,function(e,r){var o=r[0],s=t[e];i[r[1]](V.isFunction(s)?function(){var t=s.apply(this,arguments);t&&V.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===i?n:this,[t])}:n[o])}),t=null}).promise()},promise:function(t){return null!=t?V.extend(t,r):r}},i={};return r.pipe=r.then,V.each(e,function(t,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),i[o[0]]=s.fire,i[o[0]+"With"]=s.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=R.call(arguments),s=o.length,a=1!==s||t&&V.isFunction(t.promise)?s:0,l=1===a?t:V.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?R.call(arguments):i,r===e?l.notifyWith(n,r):--a||l.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);i
a",n=f.getElementsByTagName("*"),r=f.getElementsByTagName("a")[0],!n||!r||!n.length)return{};o=(i=B.createElement("select")).appendChild(B.createElement("option")),s=f.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",e={leadingWhitespace:3===f.firstChild.nodeType,tbody:!f.getElementsByTagName("tbody").length,htmlSerialize:!!f.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:"on"===s.value,optSelected:o.selected,getSetAttribute:"t"!==f.className,enctype:!!B.createElement("form").enctype,html5Clone:"<:nav>"!==B.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===B.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,e.noCloneChecked=s.cloneNode(!0).checked,i.disabled=!0,e.optDisabled=!o.disabled;try{delete f.test}catch(t){e.deleteExpando=!1}if(!f.addEventListener&&f.attachEvent&&f.fireEvent&&(f.attachEvent("onclick",h=function(){e.noCloneEvent=!1}),f.cloneNode(!0).fireEvent("onclick"),f.detachEvent("onclick",h)),(s=B.createElement("input")).value="t",s.setAttribute("type","radio"),e.radioValue="t"===s.value,s.setAttribute("checked","checked"),s.setAttribute("name","t"),f.appendChild(s),(a=B.createDocumentFragment()).appendChild(f.lastChild),e.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,e.appendChecked=s.checked,a.removeChild(s),a.appendChild(f),f.attachEvent)for(c in{submit:!0,change:!0,focusin:!0})(u=(l="on"+c)in f)||(f.setAttribute(l,"return;"),u="function"==typeof f[l]),e[c+"Bubbles"]=u;return V(function(){var n,r,i,o,s="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=B.getElementsByTagName("body")[0];a&&((n=B.createElement("div")).style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=B.createElement("div"),n.appendChild(r),r.innerHTML="
t
",(i=r.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",u=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",e.reliableHiddenOffsets=u&&0===i[0].offsetHeight,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",e.boxSizing=4===r.offsetWidth,e.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(r,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(r,null)||{width:"4px"}).width,(o=B.createElement("div")).style.cssText=r.style.cssText=s,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),e.reliableMarginRight=!parseFloat((t.getComputedStyle(o,null)||{}).marginRight)),void 0!==r.style.zoom&&(r.innerHTML="",r.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",e.inlineBlockNeedsLayout=3===r.offsetWidth,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",e.shrinkWrapBlocks=3!==r.offsetWidth,n.style.zoom=1),a.removeChild(n),n=r=i=o=null)}),a.removeChild(f),n=r=i=o=s=a=f=null,e}();var lt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ct=/([A-Z])/g;V.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(V.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(t){return!!(t=t.nodeType?V.cache[t[V.expando]]:t[V.expando])&&!r(t)},data:function(t,n,r,i){if(V.acceptData(t)){var o,s,a=V.expando,l="string"==typeof n,c=t.nodeType,u=c?V.cache:t,h=c?t[a]:t[a]&&a;if(h&&u[h]&&(i||u[h].data)||!l||r!==e)return h||(c?t[a]=h=V.deletedIds.pop()||V.guid++:h=a),u[h]||(u[h]={},c||(u[h].toJSON=V.noop)),"object"!=typeof n&&"function"!=typeof n||(i?u[h]=V.extend(u[h],n):u[h].data=V.extend(u[h].data,n)),o=u[h],i||(o.data||(o.data={}),o=o.data),r!==e&&(o[V.camelCase(n)]=r),l?null==(s=o[n])&&(s=o[V.camelCase(n)]):s=o,s}},removeData:function(t,e,n){if(V.acceptData(t)){var i,o,s,a=t.nodeType,l=a?V.cache:t,c=a?t[V.expando]:V.expando;if(l[c]){if(e&&(i=n?l[c]:l[c].data)){V.isArray(e)||(e in i?e=[e]:e=(e=V.camelCase(e))in i?[e]:e.split(" "));for(o=0,s=e.length;o1,null,!1))},removeData:function(t){return this.each(function(){V.removeData(this,t)})}}),V.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=V._data(t,e),n&&(!r||V.isArray(n)?r=V._data(t,e,V.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=V.queue(t,e),r=n.length,i=n.shift(),o=V._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){V.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return V._data(t,n)||V._data(t,n,{empty:V.Callbacks("once memory").add(function(){V.removeData(t,e+"queue",!0),V.removeData(t,n,!0)})})}}),V.fn.extend({queue:function(t,n){var r=2;return"string"!=typeof t&&(n=t,t="fx",r--),arguments.length1)},removeAttr:function(t){return this.each(function(){V.removeAttr(this,t)})},prop:function(t,e){return V.access(this,V.prop,t,e,arguments.length>1)},removeProp:function(t){return t=V.propFix[t]||t,this.each(function(){try{this[t]=e,delete this[t]}catch(t){}})},addClass:function(t){var e,n,r,i,o,s,a;if(V.isFunction(t))return this.each(function(e){V(this).addClass(t.call(this,e,this.className))});if(t&&"string"==typeof t)for(e=t.split(G),n=0,r=this.length;n=0;)r=r.replace(" "+n[o]+" "," ");i.className=t?V.trim(r):""}return this},toggleClass:function(t,e){var n=typeof t,r="boolean"==typeof e;return V.isFunction(t)?this.each(function(n){V(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var i,o=0,s=V(this),a=e,l=t.split(G);i=l[o++];)s[(a=r?a:!s.hasClass(i))?"addClass":"removeClass"](i);else"undefined"!==n&&"boolean"!==n||(this.className&&V._data(this,"__className__",this.className),this.className=this.className||!1===t?"":V._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;n=0)return!0;return!1},val:function(t){var n,r,i,o=this[0];return arguments.length?(i=V.isFunction(t),this.each(function(r){var o,s=V(this);1===this.nodeType&&(null==(o=i?t.call(this,r,s.val()):t)?o="":"number"==typeof o?o+="":V.isArray(o)&&(o=V.map(o,function(t){return null==t?"":t+""})),(n=V.valHooks[this.type]||V.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))})):o?(n=V.valHooks[o.type]||V.valHooks[o.nodeName.toLowerCase()])&&"get"in n&&(r=n.get(o,"value"))!==e?r:"string"==typeof(r=o.value)?r.replace(pt,""):null==r?"":r:void 0}}),V.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||i<0,s=o?null:[],a=o?i+1:r.length,l=i<0?a:o?i:0;l=0}),n.length||(t.selectedIndex=-1),n}}},attrFn:{},attr:function(t,n,r,i){var o,s,a,l=t.nodeType;if(t&&3!==l&&8!==l&&2!==l)return i&&V.isFunction(V.fn[n])?V(t)[n](r):void 0===t.getAttribute?V.prop(t,n,r):((a=1!==l||!V.isXMLDoc(t))&&(n=n.toLowerCase(),s=V.attrHooks[n]||(yt.test(n)?ht:ut)),r!==e?null===r?void V.removeAttr(t,n):s&&"set"in s&&a&&(o=s.set(t,r,n))!==e?o:(t.setAttribute(n,r+""),r):s&&"get"in s&&a&&null!==(o=s.get(t,n))?o:null===(o=t.getAttribute(n))?e:o)},removeAttr:function(t,e){var n,r,i,o,s=0;if(e&&1===t.nodeType)for(r=e.split(G);s=0}})});var bt=/^(?:textarea|input|select)$/i,wt=/^([^\.]*|)(?:\.(.+)|)$/,kt=/(?:^|\s)hover(\.\S+|)\b/,Ct=/^key/,_t=/^(?:mouse|contextmenu)|click/,St=/^(?:focusinfocus|focusoutblur)$/,Tt=function(t){return V.event.special.hover?t:t.replace(kt,"mouseenter$1 mouseleave$1")};V.event={add:function(t,n,r,i,o){var s,a,l,c,u,h,f,d,p,v,g;if(3!==t.nodeType&&8!==t.nodeType&&n&&r&&(s=V._data(t))){for(r.handler&&(r=(p=r).handler,o=p.selector),r.guid||(r.guid=V.guid++),(l=s.events)||(s.events=l={}),(a=s.handle)||(s.handle=a=function(t){return void 0===V||t&&V.event.triggered===t.type?e:V.event.dispatch.apply(a.elem,arguments)},a.elem=t),n=V.trim(Tt(n)).split(" "),c=0;c=0&&(g=g.slice(0,-1),a=!0),g.indexOf(".")>=0&&(g=(m=g.split(".")).shift(),m.sort()),(!i||V.event.customEvent[g])&&!V.event.global[g])return;if((n="object"==typeof n?n[V.expando]?n:new V.Event(g,n):new V.Event(g)).type=g,n.isTrigger=!0,n.exclusive=a,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=g.indexOf(":")<0?"on"+g:"",!i){for(l in s=V.cache)s[l].events&&s[l].events[g]&&V.event.trigger(n,r,s[l].handle.elem,!0);return}if(n.result=e,n.target||(n.target=i),(r=null!=r?V.makeArray(r):[]).unshift(n),(f=V.event.special[g]||{}).trigger&&!1===f.trigger.apply(i,r))return;if(p=[[i,f.bindType||g]],!o&&!f.noBubble&&!V.isWindow(i)){for(v=f.delegateType||g,c=St.test(v+g)?i:i.parentNode,u=i;c;c=c.parentNode)p.push([c,v]),u=c;u===(i.ownerDocument||B)&&p.push([u.defaultView||u.parentWindow||t,v])}for(l=0;l=0:V.find(h,this,null,[o]).length),a[h]&&c.push(u);c.length&&m.push({elem:o,matches:c})}for(f.length>d&&m.push({elem:this,matches:f.slice(d)}),r=0;r0?this.on(e,null,t,n):this.trigger(e)},Ct.test(e)&&(V.event.fixHooks[e]=V.event.keyHooks),_t.test(e)&&(V.event.fixHooks[e]=V.event.mouseHooks)}),function(t,e){function n(t,e,n,r){n=n||[];var i,o,s,a,l=(e=e||E).nodeType;if(!t||"string"!=typeof t)return n;if(1!==l&&9!==l)return[];if(!(s=b(e))&&!r&&(i=tt.exec(t)))if(a=i[1]){if(9===l){if(!(o=e.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(a))&&w(e,o)&&o.id===a)return n.push(o),n}else{if(i[2])return j.apply(n,P.call(e.getElementsByTagName(t),0)),n;if((a=i[3])&&ut&&e.getElementsByClassName)return j.apply(n,P.call(e.getElementsByClassName(a),0)),n}return p(t.replace(K,"$1"),e,n,r,s)}function r(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function i(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function o(t){return I(function(e){return e=+e,I(function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function s(t,e,n){if(t===e)return n;for(var r=t.nextSibling;r;){if(r===e)return-1;r=r.nextSibling}return 1}function a(t,e){var r,i,o,s,a,l,c,u=W[M][t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=y.preFilter;a;){for(s in r&&!(i=Z.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),r=!1,(i=Q.exec(a))&&(o.push(r=new A(i.shift())),a=a.slice(r.length),r.type=i[0].replace(K," ")),y.filter)(i=ot[s].exec(a))&&(!c[s]||(i=c[s](i)))&&(o.push(r=new A(i.shift())),a=a.slice(r.length),r.type=s,r.matches=i);if(!r)break}return e?a.length:a?n.error(t):W(t,l).slice(0)}function l(t,e,n){var r=e.dir,i=n&&"parentNode"===e.dir,o=D++;return e.first?function(e,n,o){for(;e=e[r];)if(i||1===e.nodeType)return t(e,n,o)}:function(e,n,s){if(s){for(;e=e[r];)if((i||1===e.nodeType)&&t(e,n,s))return e}else for(var a,l=O+" "+o+" ",c=l+g;e=e[r];)if(i||1===e.nodeType){if((a=e[M])===c)return e.sizset;if("string"==typeof a&&0===a.indexOf(l)){if(e.sizset)return e}else{if(e[M]=c,t(e,n,s))return e.sizset=!0,e;e.sizset=!1}}}}function c(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function u(t,e,n,r,i){for(var o,s=[],a=0,l=t.length,c=null!=e;a-1&&(s[h]=!(a[h]=d))}}else x=u(x===a?x.splice(g,x.length):x),o?o(null,a,x,c):j.apply(a,x)})}function f(t){for(var e,n,r,i=t.length,o=y.relative[t[0].type],s=o||y.relative[" "],a=o?1:0,u=l(function(t){return t===e},s,!0),d=l(function(t){return F.call(e,t)>-1},s,!0),p=[function(t,n,r){return!o&&(r||n!==S)||((e=n).nodeType?u(t,n,r):d(t,n,r))}];a1&&c(p),a>1&&t.slice(0,a-1).join("").replace(K,"$1"),n,a0,i=t.length>0,o=function(s,a,l,c,h){var f,d,p,v=[],m=0,x="0",b=s&&[],w=null!=h,k=S,C=s||i&&y.find.TAG("*",h&&a.parentNode||a),_=O+=null==k?1:Math.E;for(w&&(S=a!==E&&a,g=o.el);null!=(f=C[x]);x++){if(i&&f){for(d=0;p=t[d];d++)if(p(f,a,l)){c.push(f);break}w&&(O=_,g=++o.el)}r&&((f=!p&&f)&&m--,s&&b.push(f))}if(m+=x,r&&x!==m){for(d=0;p=e[d];d++)p(b,v,a,l);if(s){if(m>0)for(;x--;)!b[x]&&!v[x]&&(v[x]=B.call(c));v=u(v)}j.apply(c,v),w&&!s&&v.length>0&&m+e.length>1&&n.uniqueSort(c)}return w&&(O=_,S=k),b};return o.el=0,r?I(o):o}function p(t,e,n,r,i){var o,s,l,c,u,h=a(t);h.length;if(!r&&1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===e.nodeType&&!i&&y.relative[s[1].type]){if(!(e=y.find.ID(l.matches[0].replace(it,""),e,i)[0]))return n;t=t.slice(s.shift().length)}for(o=ot.POS.test(t)?-1:s.length-1;o>=0&&(l=s[o],!y.relative[c=l.type]);o--)if((u=y.find[c])&&(r=u(l.matches[0].replace(it,""),et.test(s[0].type)&&e.parentNode||e,i))){if(s.splice(o,1),!(t=r.length&&s.join("")))return j.apply(n,P.call(r,0)),n;break}}return k(t,h)(r,e,i,n,et.test(t)),n}function v(){}var g,m,y,x,b,w,k,C,_,S,T,L="undefined",M=("sizcache"+Math.random()).replace(".",""),A=String,E=t.document,N=E.documentElement,O=0,D=0,B=[].pop,j=[].push,P=[].slice,F=[].indexOf||function(t){for(var e=0,n=this.length;ey.cacheLength&&delete t[e.shift()],t[n+" "]=r},t)},R=H(),W=H(),z=H(),$="[\\x20\\t\\r\\n\\f]",q="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",U=q.replace("w","w#"),X="\\["+$+"*("+q+")"+$+"*(?:([*^$|!~]?=)"+$+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)"+$+"*\\]",G=":("+q+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+X+")|[^:]|\\\\.)*|.*))\\)|)",Y=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$+"*((?:-\\d)?\\d*)"+$+"*\\)|)(?=[^-]|$)",K=new RegExp("^"+$+"+|((?:^|[^\\\\])(?:\\\\.)*)"+$+"+$","g"),Z=new RegExp("^"+$+"*,"+$+"*"),Q=new RegExp("^"+$+"*([\\x20\\t\\r\\n\\f>+~])"+$+"*"),J=new RegExp(G),tt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,et=/[\x20\t\r\n\f]*[+~]/,nt=/h\d/i,rt=/input|select|textarea|button/i,it=/\\(?!\\)/g,ot={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),NAME:new RegExp("^\\[name=['\"]?("+q+")['\"]?\\]"),TAG:new RegExp("^("+q.replace("w","w*")+")"),ATTR:new RegExp("^"+X),PSEUDO:new RegExp("^"+G),POS:new RegExp(Y,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+$+"*(even|odd|(([+-]|)(\\d*)n|)"+$+"*(?:([+-]|)"+$+"*(\\d+)|))"+$+"*\\)|)","i"),needsContext:new RegExp("^"+$+"*[>+~]|"+Y,"i")},st=function(t){var e=E.createElement("div");try{return t(e)}catch(t){return!1}finally{e=null}},at=st(function(t){return t.appendChild(E.createComment("")),!t.getElementsByTagName("*").length}),lt=st(function(t){return t.innerHTML="",t.firstChild&&typeof t.firstChild.getAttribute!==L&&"#"===t.firstChild.getAttribute("href")}),ct=st(function(t){t.innerHTML="";var e=typeof t.lastChild.getAttribute("multiple");return"boolean"!==e&&"string"!==e}),ut=st(function(t){return t.innerHTML="",!(!t.getElementsByClassName||!t.getElementsByClassName("e").length)&&(t.lastChild.className="e",2===t.getElementsByClassName("e").length)}),ht=st(function(t){t.id=M+0,t.innerHTML="
",N.insertBefore(t,N.firstChild);var e=E.getElementsByName&&E.getElementsByName(M).length===2+E.getElementsByName(M+0).length;return m=!E.getElementById(M),N.removeChild(t),e});try{P.call(N.childNodes,0)[0].nodeType}catch(t){P=function(t){for(var e,n=[];e=this[t];t++)n.push(e);return n}}n.matches=function(t,e){return n(t,null,null,e)},n.matchesSelector=function(t,e){return n(e,null,null,[t]).length>0},x=n.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=x(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r];r++)n+=x(e);return n},b=n.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},w=n.contains=N.contains?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!!(r&&1===r.nodeType&&n.contains&&n.contains(r))}:N.compareDocumentPosition?function(t,e){return e&&!!(16&t.compareDocumentPosition(e))}:function(t,e){for(;e=e.parentNode;)if(e===t)return!0;return!1},n.attr=function(t,e){var n,r=b(t);return r||(e=e.toLowerCase()),(n=y.attrHandle[e])?n(t):r||ct?t.getAttribute(e):(n=t.getAttributeNode(e))?"boolean"==typeof t[e]?t[e]?e:null:n.specified?n.value:null:null},y=n.selectors={cacheLength:50,createPseudo:I,match:ot,attrHandle:lt?{}:{href:function(t){return t.getAttribute("href",2)},type:function(t){return t.getAttribute("type")}},find:{ID:m?function(t,e,n){if(typeof e.getElementById!==L&&!n){var r=e.getElementById(t);return r&&r.parentNode?[r]:[]}}:function(t,e,n){if(typeof e.getElementById!==L&&!n){var r=e.getElementById(t);return r?r.id===t||typeof r.getAttributeNode!==L&&r.getAttributeNode("id").value===t?[r]:void 0:[]}},TAG:at?function(t,e){if(typeof e.getElementsByTagName!==L)return e.getElementsByTagName(t)}:function(t,e){var n=e.getElementsByTagName(t);if("*"===t){for(var r,i=[],o=0;r=n[o];o++)1===r.nodeType&&i.push(r);return i}return n},NAME:ht&&function(t,e){if(typeof e.getElementsByName!==L)return e.getElementsByName(name)},CLASS:ut&&function(t,e,n){if(typeof e.getElementsByClassName!==L&&!n)return e.getElementsByClassName(t)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(it,""),t[3]=(t[4]||t[5]||"").replace(it,""),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1]?(t[2]||n.error(t[0]),t[3]=+(t[3]?t[4]+(t[5]||1):2*("even"===t[2]||"odd"===t[2])),t[4]=+(t[6]+t[7]||"odd"===t[2])):t[2]&&n.error(t[0]),t},PSEUDO:function(t){var e,n;return ot.CHILD.test(t[0])?null:(t[3]?t[2]=t[3]:(e=t[4])&&(J.test(e)&&(n=a(e,!0))&&(n=e.indexOf(")",e.length-n)-e.length)&&(e=e.slice(0,n),t[0]=t[0].slice(0,n)),t[2]=e),t.slice(0,3))}},filter:{ID:m?function(t){return t=t.replace(it,""),function(e){return e.getAttribute("id")===t}}:function(t){return t=t.replace(it,""),function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}},TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(it,"").toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(t){var e=R[M][t+" "];return e||(e=new RegExp("(^|"+$+")"+t+"("+$+"|$)"))&&R(t,function(t){return e.test(t.className||typeof t.getAttribute!==L&&t.getAttribute("class")||"")})},ATTR:function(t,e,r){return function(i,o){var s=n.attr(i,t);return null==s?"!="===e:!e||(s+="","="===e?s===r:"!="===e?s!==r:"^="===e?r&&0===s.indexOf(r):"*="===e?r&&s.indexOf(r)>-1:"$="===e?r&&s.substr(s.length-r.length)===r:"~="===e?(" "+s+" ").indexOf(r)>-1:"|="===e&&(s===r||s.substr(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r){return"nth"===t?function(t){var e,i,o=t.parentNode;if(1===n&&0===r)return!0;if(o)for(i=0,e=o.firstChild;e&&(1!==e.nodeType||(i++,t!==e));e=e.nextSibling);return(i-=r)===n||i%n==0&&i/n>=0}:function(e){var n=e;switch(t){case"only":case"first":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if("first"===t)return!0;n=e;case"last":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(t,e){var r,i=y.pseudos[t]||y.setFilters[t.toLowerCase()]||n.error("unsupported pseudo: "+t);return i[M]?i(e):i.length>1?(r=[t,t,"",e],y.setFilters.hasOwnProperty(t.toLowerCase())?I(function(t,n){for(var r,o=i(t,e),s=o.length;s--;)t[r=F.call(t,o[s])]=!(n[r]=o[s])}):function(t){return i(t,0,r)}):i}},pseudos:{not:I(function(t){var e=[],n=[],r=k(t.replace(K,"$1"));return r[M]?I(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:I(function(t){return function(e){return n(t,e).length>0}}),contains:I(function(t){return function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},parent:function(t){return!y.pseudos.empty(t)},empty:function(t){var e;for(t=t.firstChild;t;){if(t.nodeName>"@"||3===(e=t.nodeType)||4===e)return!1;t=t.nextSibling}return!0},header:function(t){return nt.test(t.nodeName)},text:function(t){var e,n;return"input"===t.nodeName.toLowerCase()&&"text"===(e=t.type)&&(null==(n=t.getAttribute("type"))||n.toLowerCase()===e)},radio:r("radio"),checkbox:r("checkbox"),file:r("file"),password:r("password"),image:r("image"),submit:i("submit"),reset:i("reset"),button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},input:function(t){return rt.test(t.nodeName)},focus:function(t){var e=t.ownerDocument;return t===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},active:function(t){return t===t.ownerDocument.activeElement},first:o(function(){return[0]}),last:o(function(t,e){return[e-1]}),eq:o(function(t,e,n){return[n<0?n+e:n]}),even:o(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:o(function(t,e,n){for(var r=n<0?n+e:n;++r",t.querySelectorAll("[selected]").length||o.push("\\["+$+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),t.querySelectorAll(":checked").length||o.push(":checked")}),st(function(t){t.innerHTML="

",t.querySelectorAll("[test^='']").length&&o.push("[*^$]="+$+"*(?:\"\"|'')"),t.innerHTML="",t.querySelectorAll(":enabled").length||o.push(":enabled",":disabled")}),o=new RegExp(o.join("|")),p=function(t,n,i,s,l){if(!s&&!l&&!o.test(t)){var c,u,h=!0,f=M,d=n,p=9===n.nodeType&&t;if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){for(c=a(t),(h=n.getAttribute("id"))?f=h.replace(r,"\\$&"):n.setAttribute("id",f),f="[id='"+f+"'] ",u=c.length;u--;)c[u]=f+c[u].join("");d=et.test(t)&&n.parentNode||n,p=c.join(",")}if(p)try{return j.apply(i,P.call(d.querySelectorAll(p),0)),i}catch(t){}finally{h||n.removeAttribute("id")}}return e(t,n,i,s,l)},l&&(st(function(e){t=l.call(e,"div");try{l.call(e,"[test!='']:sizzle"),s.push("!=",G)}catch(t){}}),s=new RegExp(s.join("|")),n.matchesSelector=function(e,r){if(r=r.replace(i,"='$1']"),!b(e)&&!s.test(r)&&!o.test(r))try{var a=l.call(e,r);if(a||t||e.document&&11!==e.document.nodeType)return a}catch(t){}return n(r,null,null,[e]).length>0})}(),y.pseudos.nth=y.pseudos.eq,y.filters=v.prototype=y.pseudos,y.setFilters=new v,n.attr=V.attr,V.find=n,V.expr=n.selectors,V.expr[":"]=V.expr.pseudos,V.unique=n.uniqueSort,V.text=n.getText,V.isXMLDoc=n.isXML,V.contains=n.contains}(t);var Lt=/Until$/,Mt=/^(?:parents|prev(?:Until|All))/,At=/^.[^:#\[\.,]*$/,Et=V.expr.match.needsContext,Nt={children:!0,contents:!0,next:!0,prev:!0};V.fn.extend({find:function(t){var e,n,r,i,o,s,a=this;if("string"!=typeof t)return V(t).filter(function(){for(e=0,n=a.length;e0)for(i=r;i=0:V.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){for(var n,r=0,i=this.length,o=[],s=Et.test(t)||"string"!=typeof t?V(t,e||this.context):0;r-1:V.find.matchesSelector(n,t)){o.push(n);break}n=n.parentNode}return o=o.length>1?V.unique(o):o,this.pushStack(o,"closest",t)},index:function(t){return t?"string"==typeof t?V.inArray(this[0],V(t)):V.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(t,e){var n="string"==typeof t?V(t,e):V.makeArray(t&&t.nodeType?[t]:t),r=V.merge(this.get(),n);return this.pushStack(s(n[0])||s(r[0])?r:V.unique(r))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),V.fn.andSelf=V.fn.addBack,V.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return V.dir(t,"parentNode")},parentsUntil:function(t,e,n){return V.dir(t,"parentNode",n)},next:function(t){return a(t,"nextSibling")},prev:function(t){return a(t,"previousSibling")},nextAll:function(t){return V.dir(t,"nextSibling")},prevAll:function(t){return V.dir(t,"previousSibling")},nextUntil:function(t,e,n){return V.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return V.dir(t,"previousSibling",n)},siblings:function(t){return V.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return V.sibling(t.firstChild)},contents:function(t){return V.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:V.merge([],t.childNodes)}},function(t,e){V.fn[t]=function(n,r){var i=V.map(this,e,n);return Lt.test(t)||(r=n),r&&"string"==typeof r&&(i=V.filter(r,i)),i=this.length>1&&!Nt[t]?V.unique(i):i,this.length>1&&Mt.test(t)&&(i=i.reverse()),this.pushStack(i,t,R.call(arguments).join(","))}}),V.extend({filter:function(t,e,n){return n&&(t=":not("+t+")"),1===e.length?V.find.matchesSelector(e[0],t)?[e[0]]:[]:V.find.matches(t,e)},dir:function(t,n,r){for(var i=[],o=t[n];o&&9!==o.nodeType&&(r===e||1!==o.nodeType||!V(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var Ot="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Dt=/ jQuery\d+="(?:null|\d+)"/g,Bt=/^\s+/,jt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Pt=/<([\w:]+)/,Ft=/]","i"),zt=/^(?:checkbox|radio)$/,$t=/checked\s*(?:[^=]|=\s*.checked.)/i,qt=/\/(java|ecma)script/i,Vt=/^\s*\s*$/g,Ut={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Xt=c(B),Gt=Xt.appendChild(B.createElement("div"));Ut.optgroup=Ut.option,Ut.tbody=Ut.tfoot=Ut.colgroup=Ut.caption=Ut.thead,Ut.th=Ut.td,V.support.htmlSerialize||(Ut._default=[1,"X
","
"]),V.fn.extend({text:function(t){return V.access(this,function(t){return t===e?V.text(this):this.empty().append((this[0]&&this[0].ownerDocument||B).createTextNode(t))},null,t,arguments.length)},wrapAll:function(t){if(V.isFunction(t))return this.each(function(e){V(this).wrapAll(t.call(this,e))});if(this[0]){var e=V(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return V.isFunction(t)?this.each(function(e){V(this).wrapInner(t.call(this,e))}):this.each(function(){var e=V(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=V.isFunction(t);return this.each(function(n){V(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){V.nodeName(this,"body")||V(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(t){(1===this.nodeType||11===this.nodeType)&&this.appendChild(t)})},prepend:function(){return this.domManip(arguments,!0,function(t){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(t,this.firstChild)})},before:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(t){this.parentNode.insertBefore(t,this)});if(arguments.length){var t=V.clean(arguments);return this.pushStack(V.merge(t,this),"before",this.selector)}},after:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(t){this.parentNode.insertBefore(t,this.nextSibling)});if(arguments.length){var t=V.clean(arguments);return this.pushStack(V.merge(this,t),"after",this.selector)}},remove:function(t,e){for(var n,r=0;null!=(n=this[r]);r++)t&&!V.filter(t,[n]).length||(!e&&1===n.nodeType&&(V.cleanData(n.getElementsByTagName("*")),V.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)for(1===t.nodeType&&V.cleanData(t.getElementsByTagName("*"));t.firstChild;)t.removeChild(t.firstChild);return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return V.clone(this,t,e)})},html:function(t){return V.access(this,function(t){var n=this[0]||{},r=0,i=this.length;if(t===e)return 1===n.nodeType?n.innerHTML.replace(Dt,""):e;if("string"==typeof t&&!Ht.test(t)&&(V.support.htmlSerialize||!Wt.test(t))&&(V.support.leadingWhitespace||!Bt.test(t))&&!Ut[(Pt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(jt,"<$1>");try{for(;r1&&"string"==typeof c&&$t.test(c))return this.each(function(){V(this).domManip(t,n,r)});if(V.isFunction(c))return this.each(function(i){var o=V(this);t[0]=c.call(this,i,n?o.html():e),o.domManip(t,n,r)});if(this[0]){if(o=(s=(i=V.buildFragment(t,this,h)).fragment).firstChild,1===s.childNodes.length&&(s=o),o)for(n=n&&V.nodeName(o,"tr"),a=i.cacheable||f-1;l0?this.clone(!0):this).get(),V(s[i])[e](r),o=o.concat(r);return this.pushStack(o,t,s.selector)}}),V.extend({clone:function(t,e,n){var r,i,o,s;if(V.support.html5Clone||V.isXMLDoc(t)||!Wt.test("<"+t.nodeName+">")?s=t.cloneNode(!0):(Gt.innerHTML=t.outerHTML,Gt.removeChild(s=Gt.firstChild)),!(V.support.noCloneEvent&&V.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||V.isXMLDoc(t)))for(f(t,s),r=d(t),i=d(s),o=0;r[o];++o)i[o]&&f(r[o],i[o]);if(e&&(h(t,s),n))for(r=d(t),i=d(s),o=0;r[o];++o)h(r[o],i[o]);return r=i=null,s},clean:function(t,e,n,r){var i,o,s,a,l,u,h,f,d,v,g,m=e===B&&Xt,y=[];for(e&&void 0!==e.createDocumentFragment||(e=B),i=0;null!=(s=t[i]);i++)if("number"==typeof s&&(s+=""),s){if("string"==typeof s)if(It.test(s)){for(m=m||c(e),h=e.createElement("div"),m.appendChild(h),s=s.replace(jt,"<$1>"),a=(Pt.exec(s)||["",""])[1].toLowerCase(),u=(l=Ut[a]||Ut._default)[0],h.innerHTML=l[1]+s+l[2];u--;)h=h.lastChild;if(!V.support.tbody)for(f=Ft.test(s),o=(d="table"!==a||f?""!==l[1]||f?[]:h.childNodes:h.firstChild&&h.firstChild.childNodes).length-1;o>=0;--o)V.nodeName(d[o],"tbody")&&!d[o].childNodes.length&&d[o].parentNode.removeChild(d[o]);!V.support.leadingWhitespace&&Bt.test(s)&&h.insertBefore(e.createTextNode(Bt.exec(s)[0]),h.firstChild),s=h.childNodes,h.parentNode.removeChild(h)}else s=e.createTextNode(s);s.nodeType?y.push(s):V.merge(y,s)}if(h&&(s=h=m=null),!V.support.appendChecked)for(i=0;null!=(s=y[i]);i++)V.nodeName(s,"input")?p(s):void 0!==s.getElementsByTagName&&V.grep(s.getElementsByTagName("input"),p);if(n)for(v=function(t){if(!t.type||qt.test(t.type))return r?r.push(t.parentNode?t.parentNode.removeChild(t):t):n.appendChild(t)},i=0;null!=(s=y[i]);i++)V.nodeName(s,"script")&&v(s)||(n.appendChild(s),void 0!==s.getElementsByTagName&&(g=V.grep(V.merge([],s.getElementsByTagName("script")),v),y.splice.apply(y,[i+1,0].concat(g)),i+=g.length));return y},cleanData:function(t,e){for(var n,r,i,o,s=0,a=V.expando,l=V.cache,c=V.support.deleteExpando,u=V.event.special;null!=(i=t[s]);s++)if((e||V.acceptData(i))&&(n=(r=i[a])&&l[r])){if(n.events)for(o in n.events)u[o]?V.event.remove(i,o):V.removeEvent(i,o,n.handle);l[r]&&(delete l[r],c?delete i[a]:i.removeAttribute?i.removeAttribute(a):i[a]=null,V.deletedIds.push(r))}}}),function(){var t,e;V.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},e={},(t=V.uaMatch(P.userAgent)).browser&&(e[t.browser]=!0,e.version=t.version),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0),V.browser=e,V.sub=function(){function t(e,n){return new t.fn.init(e,n)}V.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(n,r){return r&&r instanceof V&&!(r instanceof t)&&(r=t(r)),V.fn.init.call(this,n,r,e)},t.fn.init.prototype=t.fn;var e=t(B);return t}}();var Yt,Kt,Zt,Qt=/alpha\([^)]*\)/i,Jt=/opacity=([^)]*)/,te=/^(top|right|bottom|left)$/,ee=/^(none|table(?!-c[ea]).+)/,ne=/^margin/,re=new RegExp("^("+U+")(.*)$","i"),ie=new RegExp("^("+U+")(?!px)[a-z%]+$","i"),oe=new RegExp("^([-+])=("+U+")","i"),se={BODY:"block"},ae={position:"absolute",visibility:"hidden",display:"block"},le={letterSpacing:0,fontWeight:400},ce=["Top","Right","Bottom","Left"],ue=["Webkit","O","Moz","ms"],he=V.fn.toggle;V.fn.extend({css:function(t,n){return V.access(this,function(t,n,r){return r!==e?V.style(t,n,r):V.css(t,n)},t,n,arguments.length>1)},show:function(){return m(this,!0)},hide:function(){return m(this)},toggle:function(t,e){var n="boolean"==typeof t;return V.isFunction(t)&&V.isFunction(e)?he.apply(this,arguments):this.each(function(){(n?t:g(this))?V(this).show():V(this).hide()})}}),V.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Yt(t,"opacity");return""===n?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:V.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,n,r,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,l=V.camelCase(n),c=t.style;if(n=V.cssProps[l]||(V.cssProps[l]=v(c,l)),a=V.cssHooks[n]||V.cssHooks[l],r===e)return a&&"get"in a&&(o=a.get(t,!1,i))!==e?o:c[n];if("string"===(s=typeof r)&&(o=oe.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(V.css(t,n)),s="number"),!(null==r||"number"===s&&isNaN(r)||("number"===s&&!V.cssNumber[l]&&(r+="px"),a&&"set"in a&&(r=a.set(t,r,i))===e)))try{c[n]=r}catch(t){}}},css:function(t,n,r,i){var o,s,a,l=V.camelCase(n);return n=V.cssProps[l]||(V.cssProps[l]=v(t.style,l)),(a=V.cssHooks[n]||V.cssHooks[l])&&"get"in a&&(o=a.get(t,!0,i)),o===e&&(o=Yt(t,n)),"normal"===o&&n in le&&(o=le[n]),r||i!==e?(s=parseFloat(o),r||V.isNumeric(s)?s||0:o):o},swap:function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r}}),t.getComputedStyle?Yt=function(e,n){var r,i,o,s,a=t.getComputedStyle(e,null),l=e.style;return a&&(""===(r=a.getPropertyValue(n)||a[n])&&!V.contains(e.ownerDocument,e)&&(r=V.style(e,n)),ie.test(r)&&ne.test(n)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=a.width,l.width=i,l.minWidth=o,l.maxWidth=s)),r}:B.documentElement.currentStyle&&(Yt=function(t,e){var n,r,i=t.currentStyle&&t.currentStyle[e],o=t.style;return null==i&&o&&o[e]&&(i=o[e]),ie.test(i)&&!te.test(e)&&(n=o.left,(r=t.runtimeStyle&&t.runtimeStyle.left)&&(t.runtimeStyle.left=t.currentStyle.left),o.left="fontSize"===e?"1em":i,i=o.pixelLeft+"px",o.left=n,r&&(t.runtimeStyle.left=r)),""===i?"auto":i}),V.each(["height","width"],function(t,e){V.cssHooks[e]={get:function(t,n,r){if(n)return 0===t.offsetWidth&&ee.test(Yt(t,"display"))?V.swap(t,ae,function(){return b(t,e,r)}):b(t,e,r)},set:function(t,n,r){return y(0,n,r?x(t,e,r,V.support.boxSizing&&"border-box"===V.css(t,"boxSizing")):0)}}}),V.support.opacity||(V.cssHooks.opacity={get:function(t,e){return Jt.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,r=t.currentStyle,i=V.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,e>=1&&""===V.trim(o.replace(Qt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),r&&!r.filter)||(n.filter=Qt.test(o)?o.replace(Qt,i):o+" "+i)}}),V(function(){V.support.reliableMarginRight||(V.cssHooks.marginRight={get:function(t,e){return V.swap(t,{display:"inline-block"},function(){if(e)return Yt(t,"marginRight")})}}),!V.support.pixelPosition&&V.fn.position&&V.each(["top","left"],function(t,e){V.cssHooks[e]={get:function(t,n){if(n){var r=Yt(t,e);return ie.test(r)?V(t).position()[e]+"px":r}}}})}),V.expr&&V.expr.filters&&(V.expr.filters.hidden=function(t){return 0===t.offsetWidth&&0===t.offsetHeight||!V.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||Yt(t,"display"))},V.expr.filters.visible=function(t){return!V.expr.filters.hidden(t)}),V.each({margin:"",padding:"",border:"Width"},function(t,e){V.cssHooks[t+e]={expand:function(n){var r,i="string"==typeof n?n.split(" "):[n],o={};for(r=0;r<4;r++)o[t+ce[r]+e]=i[r]||i[r-2]||i[0];return o}},ne.test(t)||(V.cssHooks[t+e].set=y)});var fe=/%20/g,de=/\[\]$/,pe=/\r?\n/g,ve=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ge=/^(?:select|textarea)/i;V.fn.extend({serialize:function(){return V.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?V.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ge.test(this.nodeName)||ve.test(this.type))}).map(function(t,e){var n=V(this).val();return null==n?null:V.isArray(n)?V.map(n,function(t,n){return{name:e.name,value:t.replace(pe,"\r\n")}}):{name:e.name,value:n.replace(pe,"\r\n")}}).get()}}),V.param=function(t,n){var r,i=[],o=function(t,e){e=V.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(n===e&&(n=V.ajaxSettings&&V.ajaxSettings.traditional),V.isArray(t)||t.jquery&&!V.isPlainObject(t))V.each(t,function(){o(this.name,this.value)});else for(r in t)k(r,t[r],n,o);return i.join("&").replace(fe,"+")};var me,ye,xe=/#.*$/,be=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,we=/^(?:GET|HEAD)$/,ke=/^\/\//,Ce=/\?/,_e=/)<[^<]*)*<\/script>/gi,Se=/([?&])_=[^&]*/,Te=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Le=V.fn.load,Me={},Ae={},Ee=["*/"]+["*"];try{ye=j.href}catch(t){(ye=B.createElement("a")).href="",ye=ye.href}me=Te.exec(ye.toLowerCase())||[],V.fn.load=function(t,n,r){if("string"!=typeof t&&Le)return Le.apply(this,arguments);if(!this.length)return this;var i,o,s,a=this,l=t.indexOf(" ");return l>=0&&(i=t.slice(l,t.length),t=t.slice(0,l)),V.isFunction(n)?(r=n,n=e):n&&"object"==typeof n&&(o="POST"),V.ajax({url:t,type:o,dataType:"html",data:n,complete:function(t,e){r&&a.each(r,s||[t.responseText,e,t])}}).done(function(t){s=arguments,a.html(i?V("
").append(t.replace(_e,"")).find(i):t)}),this},V.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(t,e){V.fn[e]=function(t){return this.on(e,t)}}),V.each(["get","post"],function(t,n){V[n]=function(t,r,i,o){return V.isFunction(r)&&(o=o||i,i=r,r=e),V.ajax({type:n,url:t,data:r,success:i,dataType:o})}}),V.extend({getScript:function(t,n){return V.get(t,e,n,"script")},getJSON:function(t,e,n){return V.get(t,e,n,"json")},ajaxSetup:function(t,e){return e?S(t,V.ajaxSettings):(e=t,t=V.ajaxSettings),S(t,e),t},ajaxSettings:{url:ye,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(me[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ee},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":t.String,"text html":!0,"text json":V.parseJSON,"text xml":V.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:C(Me),ajaxTransport:C(Ae),ajax:function(t,n){function r(t,n,r,s){var c,h,y,x,w,C=n;2!==b&&(b=2,l&&clearTimeout(l),a=e,o=s||"",k.readyState=t>0?4:0,r&&(x=function(t,n,r){var i,o,s,a,l=t.contents,c=t.dataTypes,u=t.responseFields;for(o in u)o in r&&(n[u[o]]=r[o]);for(;"*"===c[0];)c.shift(),i===e&&(i=t.mimeType||n.getResponseHeader("content-type"));if(i)for(o in l)if(l[o]&&l[o].test(i)){c.unshift(o);break}if(c[0]in r)s=c[0];else{for(o in r){if(!c[0]||t.converters[o+" "+c[0]]){s=o;break}a||(a=o)}s=s||a}if(s)return s!==c[0]&&c.unshift(s),r[s]}(f,k,r)),t>=200&&t<300||304===t?(f.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(V.lastModified[i]=w),(w=k.getResponseHeader("Etag"))&&(V.etag[i]=w)),304===t?(C="notmodified",c=!0):(C=(c=function(t,e){var n,r,i,o,s=t.dataTypes.slice(),a=s[0],l={},c=0;if(t.dataFilter&&(e=t.dataFilter(e,t.dataType)),s[1])for(n in t.converters)l[n.toLowerCase()]=t.converters[n];for(;i=s[++c];)if("*"!==i){if("*"!==a&&a!==i){if(!(n=l[a+" "+i]||l["* "+i]))for(r in l)if((o=r.split(" "))[1]===i&&(n=l[a+" "+o[0]]||l["* "+o[0]])){!0===n?n=l[r]:!0!==l[r]&&(i=o[0],s.splice(c--,0,i));break}if(!0!==n)if(n&&t.throws)e=n(e);else try{e=n(e)}catch(t){return{state:"parsererror",error:n?t:"No conversion from "+a+" to "+i}}}a=i}return{state:"success",data:e}}(f,x)).state,h=c.data,c=!(y=c.error))):(y=C,C&&!t||(C="error",t<0&&(t=0))),k.status=t,k.statusText=(n||C)+"",c?v.resolveWith(d,[h,C,k]):v.rejectWith(d,[k,C,y]),k.statusCode(m),m=e,u&&p.trigger("ajax"+(c?"Success":"Error"),[k,f,c?h:y]),g.fireWith(d,[k,C]),u&&(p.trigger("ajaxComplete",[k,f]),--V.active||V.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=e),n=n||{};var i,o,s,a,l,c,u,h,f=V.ajaxSetup({},n),d=f.context||f,p=d!==f&&(d.nodeType||d instanceof V)?V(d):V.event,v=V.Deferred(),g=V.Callbacks("once memory"),m=f.statusCode||{},y={},x={},b=0,w="canceled",k={readyState:0,setRequestHeader:function(t,e){if(!b){var n=t.toLowerCase();t=x[n]=x[n]||t,y[t]=e}return this},getAllResponseHeaders:function(){return 2===b?o:null},getResponseHeader:function(t){var n;if(2===b){if(!s)for(s={};n=be.exec(o);)s[n[1].toLowerCase()]=n[2];n=s[t.toLowerCase()]}return n===e?null:n},overrideMimeType:function(t){return b||(f.mimeType=t),this},abort:function(t){return t=t||w,a&&a.abort(t),r(0,t),this}};if(v.promise(k),k.success=k.done,k.error=k.fail,k.complete=g.add,k.statusCode=function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else e=t[k.status],k.always(e);return this},f.url=((t||f.url)+"").replace(xe,"").replace(ke,me[1]+"//"),f.dataTypes=V.trim(f.dataType||"*").toLowerCase().split(G),null==f.crossDomain&&(c=Te.exec(f.url.toLowerCase()),f.crossDomain=!(!c||c[1]===me[1]&&c[2]===me[2]&&(c[3]||("http:"===c[1]?80:443))==(me[3]||("http:"===me[1]?80:443)))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=V.param(f.data,f.traditional)),_(Me,f,n,k),2===b)return k;if(u=f.global,f.type=f.type.toUpperCase(),f.hasContent=!we.test(f.type),u&&0==V.active++&&V.event.trigger("ajaxStart"),!f.hasContent&&(f.data&&(f.url+=(Ce.test(f.url)?"&":"?")+f.data,delete f.data),i=f.url,!1===f.cache)){var C=V.now(),S=f.url.replace(Se,"$1_="+C);f.url=S+(S===f.url?(Ce.test(f.url)?"&":"?")+"_="+C:"")}for(h in(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&k.setRequestHeader("Content-Type",f.contentType),f.ifModified&&(i=i||f.url,V.lastModified[i]&&k.setRequestHeader("If-Modified-Since",V.lastModified[i]),V.etag[i]&&k.setRequestHeader("If-None-Match",V.etag[i])),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ee+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(h,f.headers[h]);if(!f.beforeSend||!1!==f.beforeSend.call(d,k,f)&&2!==b){for(h in w="abort",{success:1,error:1,complete:1})k[h](f[h]);if(a=_(Ae,f,n,k)){k.readyState=1,u&&p.trigger("ajaxSend",[k,f]),f.async&&f.timeout>0&&(l=setTimeout(function(){k.abort("timeout")},f.timeout));try{b=1,a.send(y,r)}catch(t){if(!(b<2))throw t;r(-1,t)}}else r(-1,"No Transport");return k}return k.abort()},active:0,lastModified:{},etag:{}});var Ne=[],Oe=/\?/,De=/(=)\?(?=&|$)|\?\?/,Be=V.now();V.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ne.pop()||V.expando+"_"+Be++;return this[t]=!0,t}}),V.ajaxPrefilter("json jsonp",function(n,r,i){var o,s,a,l=n.data,c=n.url,u=!1!==n.jsonp,h=u&&De.test(c),f=u&&!h&&"string"==typeof l&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&De.test(l);if("jsonp"===n.dataTypes[0]||h||f)return o=n.jsonpCallback=V.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,s=t[o],h?n.url=c.replace(De,"$1"+o):f?n.data=l.replace(De,"$1"+o):u&&(n.url+=(Oe.test(c)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return a||V.error(o+" was not called"),a[0]},n.dataTypes[0]="json",t[o]=function(){a=arguments},i.always(function(){t[o]=s,n[o]&&(n.jsonpCallback=r.jsonpCallback,Ne.push(o)),a&&V.isFunction(s)&&s(a[0]),a=s=e}),"script"}),V.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(t){return V.globalEval(t),t}}}),V.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),V.ajaxTransport("script",function(t){if(t.crossDomain){var n,r=B.head||B.getElementsByTagName("head")[0]||B.documentElement;return{send:function(i,o){(n=B.createElement("script")).async="async",t.scriptCharset&&(n.charset=t.scriptCharset),n.src=t.url,n.onload=n.onreadystatechange=function(t,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=e,i||o(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var je,Pe=!!t.ActiveXObject&&function(){for(var t in je)je[t](0,1)},Fe=0;V.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&T()||function(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:T,function(t){V.extend(V.support,{ajax:!!t,cors:!!t&&"withCredentials"in t})}(V.ajaxSettings.xhr()),V.support.ajax&&V.ajaxTransport(function(n){var r;if(!n.crossDomain||V.support.cors)return{send:function(i,o){var s,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(a in i)l.setRequestHeader(a,i[a])}catch(t){}l.send(n.hasContent&&n.data||null),r=function(t,i){var a,c,u,h,f;try{if(r&&(i||4===l.readyState))if(r=e,s&&(l.onreadystatechange=V.noop,Pe&&delete je[s]),i)4!==l.readyState&&l.abort();else{a=l.status,u=l.getAllResponseHeaders(),h={},(f=l.responseXML)&&f.documentElement&&(h.xml=f);try{h.text=l.responseText}catch(t){}try{c=l.statusText}catch(t){c=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=h.text?200:404}}catch(t){i||o(-1,t)}h&&o(a,c,h,u)},n.async?4===l.readyState?setTimeout(r,0):(s=++Fe,Pe&&(je||(je={},V(t).unload(Pe)),je[s]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}});var Ie,He,Re=/^(?:toggle|show|hide)$/,We=new RegExp("^(?:([-+])=|)("+U+")([a-z%]*)$","i"),ze=/queueHooks$/,$e=[function(t,e,n){var r,i,o,s,a,l,c,u,h,f=this,d=t.style,p={},v=[],m=t.nodeType&&g(t);for(r in n.queue||(null==(u=V._queueHooks(t,"fx")).unqueued&&(u.unqueued=0,h=u.empty.fire,u.empty.fire=function(){u.unqueued||h()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,V.queue(t,"fx").length||u.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===V.css(t,"display")&&"none"===V.css(t,"float")&&(V.support.inlineBlockNeedsLayout&&"inline"!==w(t.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",V.support.shrinkWrapBlocks||f.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),e)if(o=e[r],Re.exec(o)){if(delete e[r],l=l||"toggle"===o,o===(m?"hide":"show"))continue;v.push(r)}if(s=v.length){"hidden"in(a=V._data(t,"fxshow")||V._data(t,"fxshow",{}))&&(m=a.hidden),l&&(a.hidden=!m),m?V(t).show():f.done(function(){V(t).hide()}),f.done(function(){var e;for(e in V.removeData(t,"fxshow",!0),p)V.style(t,e,p[e])});for(r=0;r-1?(i=(h=s.position()).top,o=h.left):(i=parseFloat(l)||0,o=parseFloat(c)||0),V.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(u.top=e.top-a.top+i),null!=e.left&&(u.left=e.left-a.left+o),"using"in e?e.using.call(t,u):s.css(u)}},V.fn.extend({position:function(){if(this[0]){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Ve.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(V.css(t,"marginTop"))||0,n.left-=parseFloat(V.css(t,"marginLeft"))||0,r.top+=parseFloat(V.css(e[0],"borderTopWidth"))||0,r.left+=parseFloat(V.css(e[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||B.body;t&&!Ve.test(t.nodeName)&&"static"===V.css(t,"position");)t=t.offsetParent;return t||B.body})}}),V.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r=/Y/.test(n);V.fn[t]=function(i){return V.access(this,function(t,i,o){var s=N(t);if(o===e)return s?n in s?s[n]:s.document.documentElement[i]:t[i];s?s.scrollTo(r?V(s).scrollLeft():o,r?o:V(s).scrollTop()):t[i]=o},t,i,arguments.length,null)}}),V.each({Height:"height",Width:"width"},function(t,n){V.each({padding:"inner"+t,content:n,"":"outer"+t},function(r,i){V.fn[i]=function(i,o){var s=arguments.length&&(r||"boolean"!=typeof i),a=r||(!0===i||!0===o?"margin":"border");return V.access(this,function(n,r,i){var o;return V.isWindow(n)?n.document.documentElement["client"+t]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+t],o["scroll"+t],n.body["offset"+t],o["offset"+t],o["client"+t])):i===e?V.css(n,r,i,a):V.style(n,r,i,a)},n,s?i:e,s,null)}})}),t.jQuery=t.$=V,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return V})}(window),function(){function t(t){return function(e,n,r,i){n=y(n,i,4);var o=!k(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[a]:a],a+=t),function(e,n,r,i,o,s){for(;o>=0&&s>o;o+=t){var a=i?i[o]:o;r=n(r,e[a],a,e)}return r}(e,n,r,o,a,s)}}function e(t){return function(e,n,r){n=x(n,r);for(var i=null!=e&&e.length,o=t>0?0:i-1;o>=0&&i>o;o+=t)if(n(e[o],o,e))return o;return-1}}function n(t,e){var n=L.length,r=t.constructor,i=m.isFunction(r)&&r.prototype||s,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!m.contains(e,o)&&e.push(o)}var r=this,i=r._,o=Array.prototype,s=Object.prototype,a=Function.prototype,l=o.push,c=o.slice,u=s.toString,h=s.hasOwnProperty,f=Array.isArray,d=Object.keys,p=a.bind,v=Object.create,g=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):r._=m,m.VERSION="1.8.2";var y=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},x=function(t,e,n){return null==t?m.identity:m.isFunction(t)?y(t,e,n):m.isObject(t)?m.matcher(t):m.property(t)};m.iteratee=function(t,e){return x(t,e,1/0)};var b=function(t,e){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var o=arguments[i],s=t(o),a=s.length,l=0;a>l;l++){var c=s[l];e&&void 0!==n[c]||(n[c]=o[c])}return n}},w=Math.pow(2,53)-1,k=function(t){var e=t&&t.length;return"number"==typeof e&&e>=0&&w>=e};m.each=m.forEach=function(t,e,n){var r,i;if(e=y(e,n),k(t))for(r=0,i=t.length;i>r;r++)e(t[r],r,t);else{var o=m.keys(t);for(r=0,i=o.length;i>r;r++)e(t[o[r]],o[r],t)}return t},m.map=m.collect=function(t,e,n){e=x(e,n);for(var r=!k(t)&&m.keys(t),i=(r||t).length,o=Array(i),s=0;i>s;s++){var a=r?r[s]:s;o[s]=e(t[a],a,t)}return o},m.reduce=m.foldl=m.inject=t(1),m.reduceRight=m.foldr=t(-1),m.find=m.detect=function(t,e,n){var r;return void 0!==(r=k(t)?m.findIndex(t,e,n):m.findKey(t,e,n))&&-1!==r?t[r]:void 0},m.filter=m.select=function(t,e,n){var r=[];return e=x(e,n),m.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},m.reject=function(t,e,n){return m.filter(t,m.negate(x(e)),n)},m.every=m.all=function(t,e,n){e=x(e,n);for(var r=!k(t)&&m.keys(t),i=(r||t).length,o=0;i>o;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},m.some=m.any=function(t,e,n){e=x(e,n);for(var r=!k(t)&&m.keys(t),i=(r||t).length,o=0;i>o;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},m.contains=m.includes=m.include=function(t,e,n){return k(t)||(t=m.values(t)),m.indexOf(t,e,"number"==typeof n&&n)>=0},m.invoke=function(t,e){var n=c.call(arguments,2),r=m.isFunction(e);return m.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,l=(t=k(t)?t:m.values(t)).length;l>a;a++)(r=t[a])>o&&(o=r);else e=x(e,n),m.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},m.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,l=(t=k(t)?t:m.values(t)).length;l>a;a++)r=t[a],o>r&&(o=r);else e=x(e,n),m.each(t,function(t,n,r){i=e(t,n,r),(s>i||1/0===i&&1/0===o)&&(o=t,s=i)});return o},m.shuffle=function(t){for(var e,n=k(t)?t:m.values(t),r=n.length,i=Array(r),o=0;r>o;o++)(e=m.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},m.sample=function(t,e,n){return null==e||n?(k(t)||(t=m.values(t)),t[m.random(t.length-1)]):m.shuffle(t).slice(0,Math.max(0,e))},m.sortBy=function(t,e,n){return e=x(e,n),m.pluck(m.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=x(n,r),m.each(e,function(r,o){var s=n(r,o,e);t(i,r,s)}),i}};m.groupBy=C(function(t,e,n){m.has(t,n)?t[n].push(e):t[n]=[e]}),m.indexBy=C(function(t,e,n){t[n]=e}),m.countBy=C(function(t,e,n){m.has(t,n)?t[n]++:t[n]=1}),m.toArray=function(t){return t?m.isArray(t)?c.call(t):k(t)?m.map(t,m.identity):m.values(t):[]},m.size=function(t){return null==t?0:k(t)?t.length:m.keys(t).length},m.partition=function(t,e,n){e=x(e,n);var r=[],i=[];return m.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},m.first=m.head=m.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:m.initial(t,t.length-e)},m.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},m.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:m.rest(t,Math.max(0,t.length-e))},m.rest=m.tail=m.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},m.compact=function(t){return m.filter(t,m.identity)};var _=function(t,e,n,r){for(var i=[],o=0,s=r||0,a=t&&t.length;a>s;s++){var l=t[s];if(k(l)&&(m.isArray(l)||m.isArguments(l))){e||(l=_(l,e,n));var c=0,u=l.length;for(i.length+=u;u>c;)i[o++]=l[c++]}else n||(i[o++]=l)}return i};m.flatten=function(t,e){return _(t,e,!1)},m.without=function(t){return m.difference(t,c.call(arguments,1))},m.uniq=m.unique=function(t,e,n,r){if(null==t)return[];m.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=x(n,r));for(var i=[],o=[],s=0,a=t.length;a>s;s++){var l=t[s],c=n?n(l,s,t):l;e?(s&&o===c||i.push(l),o=c):n?m.contains(o,c)||(o.push(c),i.push(l)):m.contains(i,l)||i.push(l)}return i},m.union=function(){return m.uniq(_(arguments,!0,!0))},m.intersection=function(t){if(null==t)return[];for(var e=[],n=arguments.length,r=0,i=t.length;i>r;r++){var o=t[r];if(!m.contains(e,o)){for(var s=1;n>s&&m.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},m.difference=function(t){var e=_(arguments,!0,!0,1);return m.filter(t,function(t){return!m.contains(e,t)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(t){for(var e=t&&m.max(t,"length").length||0,n=Array(e),r=0;e>r;r++)n[r]=m.pluck(t,r);return n},m.object=function(t,e){for(var n={},r=0,i=t&&t.length;i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},m.indexOf=function(t,e,n){var r=0,i=t&&t.length;if("number"==typeof n)r=0>n?Math.max(0,i+n):n;else if(n&&i)return t[r=m.sortedIndex(t,e)]===e?r:-1;if(e!=e)return m.findIndex(c.call(t,r),m.isNaN);for(;i>r;r++)if(t[r]===e)return r;return-1},m.lastIndexOf=function(t,e,n){var r=t?t.length:0;if("number"==typeof n&&(r=0>n?r+n+1:Math.min(r,n+1)),e!=e)return m.findLastIndex(c.call(t,0,r),m.isNaN);for(;--r>=0;)if(t[r]===e)return r;return-1},m.findIndex=e(1),m.findLastIndex=e(-1),m.sortedIndex=function(t,e,n,r){for(var i=(n=x(n,r,1))(e),o=0,s=t.length;s>o;){var a=Math.floor((o+s)/2);n(t[a])o;o++,t+=n)i[o]=t;return i};var S=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=function(t){if(!m.isObject(t))return{};if(v)return v(t);g.prototype=t;var e=new g;return g.prototype=null,e}(t.prototype),s=t.apply(o,i);return m.isObject(s)?s:o};m.bind=function(t,e){if(p&&t.bind===p)return p.apply(t,c.call(arguments,1));if(!m.isFunction(t))throw new TypeError("Bind must be called on a function");var n=c.call(arguments,2),r=function(){return S(t,r,e,this,n.concat(c.call(arguments)))};return r},m.partial=function(t){var e=c.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),s=0;i>s;s++)o[s]=e[s]===m?arguments[r++]:e[s];for(;r=r)throw new Error("bindAll must be passed function names");for(e=1;r>e;e++)t[n=arguments[e]]=m.bind(t[n],t);return t},m.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return m.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},m.delay=function(t,e){var n=c.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},m.defer=m.partial(m.delay,m,1),m.throttle=function(t,e,n){var r,i,o,s=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:m.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var c=m.now();a||!1!==n.leading||(a=c);var u=e-(c-a);return r=this,i=arguments,0>=u||u>e?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}},m.debounce=function(t,e,n){var r,i,o,s,a,l=function(){var c=m.now()-s;e>c&&c>=0?r=setTimeout(l,e-c):(r=null,n||(a=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=m.now();var c=n&&!r;return r||(r=setTimeout(l,e)),c&&(a=t.apply(o,i),o=i=null),a}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},m.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}},m.once=m.partial(m.before,2);var T=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(t){if(!m.isObject(t))return[];if(d)return d(t);var e=[];for(var r in t)m.has(t,r)&&e.push(r);return T&&n(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var r in t)e.push(r);return T&&n(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=t[e[i]];return r},m.mapObject=function(t,e,n){e=x(e,n);for(var r,i=m.keys(t),o=i.length,s={},a=0;o>a;a++)s[r=i[a]]=e(t[r],r,t);return s},m.pairs=function(t){for(var e=m.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=[e[i],t[e[i]]];return r},m.invert=function(t){for(var e={},n=m.keys(t),r=0,i=n.length;i>r;r++)e[t[n[r]]]=n[r];return e},m.functions=m.methods=function(t){var e=[];for(var n in t)m.isFunction(t[n])&&e.push(n);return e.sort()},m.extend=b(m.allKeys),m.extendOwn=m.assign=b(m.keys),m.findKey=function(t,e,n){e=x(e,n);for(var r,i=m.keys(t),o=0,s=i.length;s>o;o++)if(e(t[r=i[o]],r,t))return r},m.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;m.isFunction(e)?(i=m.allKeys(s),r=y(e,n)):(i=_(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var a=0,l=i.length;l>a;a++){var c=i[a],u=s[c];r(u,c,s)&&(o[c]=u)}return o},m.omit=function(t,e,n){if(m.isFunction(e))e=m.negate(e);else{var r=m.map(_(arguments,!1,!1,1),String);e=function(t,e){return!m.contains(r,e)}}return m.pick(t,e,n)},m.defaults=b(m.allKeys,!0),m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var n=m.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;r>o;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var M=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof m&&(t=t._wrapped),e instanceof m&&(e=e._wrapped);var i=u.call(t);if(i!==u.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var s=t.constructor,a=e.constructor;if(s!==a&&!(m.isFunction(s)&&s instanceof s&&m.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return r[l]===e;if(n.push(t),r.push(e),o){if((l=t.length)!==e.length)return!1;for(;l--;)if(!M(t[l],e[l],n,r))return!1}else{var c,h=m.keys(t);if(l=h.length,m.keys(e).length!==l)return!1;for(;l--;)if(c=h[l],!m.has(e,c)||!M(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0};m.isEqual=function(t,e){return M(t,e)},m.isEmpty=function(t){return null==t||(k(t)&&(m.isArray(t)||m.isString(t)||m.isArguments(t))?0===t.length:0===m.keys(t).length)},m.isElement=function(t){return!(!t||1!==t.nodeType)},m.isArray=f||function(t){return"[object Array]"===u.call(t)},m.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){m["is"+t]=function(e){return u.call(e)==="[object "+t+"]"}}),m.isArguments(arguments)||(m.isArguments=function(t){return m.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(t){return"function"==typeof t||!1}),m.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},m.isNaN=function(t){return m.isNumber(t)&&t!==+t},m.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===u.call(t)},m.isNull=function(t){return null===t},m.isUndefined=function(t){return void 0===t},m.has=function(t,e){return null!=t&&h.call(t,e)},m.noConflict=function(){return r._=i,this},m.identity=function(t){return t},m.constant=function(t){return function(){return t}},m.noop=function(){},m.property=function(t){return function(e){return null==e?void 0:e[t]}},m.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},m.matcher=m.matches=function(t){return t=m.extendOwn({},t),function(e){return m.isMatch(e,t)}},m.times=function(t,e,n){var r=Array(Math.max(0,t));e=y(e,n,1);for(var i=0;t>i;i++)r[i]=e(i);return r},m.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},m.now=Date.now||function(){return(new Date).getTime()};var A={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},E=m.invert(A),N=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};m.escape=N(A),m.unescape=N(E),m.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),m.isFunction(r)?r.call(t):r};var O=0;m.uniqueId=function(t){var e=++O+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,P=function(t){return"\\"+B[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,a){return o+=t.slice(i,a).replace(j,P),i=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var F=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),F(this,n.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],F(this,n)}}),m.each(["concat","join","slice"],function(t){var e=o[t];m.prototype[t]=function(){return F(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}.call(this),function(){var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function e(e){this.tokens=[],this.tokens.links={},this.options=e||u.defaults,this.rules=t.normal,this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=a(t.item,"gm")(/bull/g,t.bullet)(),t.list=a(t.list)(/bull/g,t.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+t.def.source+")")(),t.blockquote=a(t.blockquote)("def",t.def)(),t._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",t.html=a(t.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,t._tag)(),t.paragraph=a(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t._tag)("def",t.def)(),t.normal=c({},t),t.gfm=c({},t.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),t.gfm.paragraph=a(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|")(),t.tables=c({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=t,e.lex=function(t,n){return new e(n).lex(t)},e.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},e.prototype.token=function(e,n,r){var i,o,s,a,l,c,u,h,f;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e))e=e.substring(s[0].length),s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?s:s.replace(/\n+$/,"")});else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2],text:s[3]});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if(n&&(s=this.rules.nptable.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/\n$/,"").split("\n")},h=0;h ?/gm,""),this.token(s,n,!0),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a=s[2],this.tokens.push({type:"list_start",ordered:a.length>1}),i=!1,f=(s=s[0].match(this.rules.item)).length,h=0;h1&&l.length>1||(e=s.slice(h+1).join("\n")+e,h=f-1)),o=i||/\n\n(?!\s*$)/.test(c),h!==f-1&&(i="\n"===c.charAt(c.length-1),o||(o=i)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(c,!1,r),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===s[1]||"script"===s[1]||"style"===s[1],text:s[0]});else if(!r&&n&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),this.tokens.links[s[1].toLowerCase()]={href:s[2],title:s[3]};else if(n&&(s=this.rules.table.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/(?: *\| *)?\n$/,"").split("\n")},h=0;h])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,e){return t=t.source,e=e||"",function n(r,i){return r?(i=(i=i.source||i).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(r,i),n):new RegExp(t,e)}}function l(){}function c(t){for(var e,n,r=1;rAn error occured:

"+s(t.message+"",!0)+"
";throw t}}n._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,n._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=a(n.link)("inside",n._inside)("href",n._href)(),n.reflink=a(n.reflink)("inside",n._inside)(),n.normal=c({},n),n.pedantic=c({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=c({},n.normal,{escape:a(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=c({},n.gfm,{br:a(n.br)("{2,}","*")(),text:a(n.gfm.text)("{2,}","*")()}),r.rules=n,r.output=function(t,e,n){return new r(e,n).output(t)},r.prototype.output=function(t){for(var e,n,r,i,o="";t;)if(i=this.rules.escape.exec(t))t=t.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(t))t=t.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):r=n=s(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(t))){if(i=this.rules.tag.exec(t))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),t=t.substring(i[0].length),o+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(t))t=t.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(t))||(i=this.rules.nolink.exec(t))){if(t=t.substring(i[0].length),e=(i[2]||i[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){o+=i[0].charAt(0),t=i[0].substring(1)+t;continue}this.inLink=!0,o+=this.outputLink(i,e),this.inLink=!1}else if(i=this.rules.strong.exec(t))t=t.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(t))t=t.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(t))t=t.substring(i[0].length),o+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(t))t=t.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(t))t=t.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(t))t=t.substring(i[0].length),o+=s(this.smartypants(i[0]));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(i[0].length),r=n=s(i[1]),o+=this.renderer.link(r,null,n);return o},r.prototype.outputLink=function(t,e){var n=s(e.href),r=e.title?s(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,r,this.output(t[1])):this.renderer.image(n,r,s(t[1]))},r.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},r.prototype.mangle=function(t){for(var e,n="",r=t.length,i=0;i.5&&(e="x"+e.toString(16)),n+="&#"+e+";";return n},i.prototype.code=function(t,e,n){if(this.options.highlight){var r=this.options.highlight(t,e);null!=r&&r!==t&&(n=!0,t=r)}return e?'
'+(n?t:s(t,!0))+"\n
\n":"
"+(n?t:s(t,!0))+"\n
"},i.prototype.blockquote=function(t){return"
\n"+t+"
\n"},i.prototype.html=function(t){return t},i.prototype.heading=function(t,e,n){return"'+t+"\n"},i.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+"\n"},i.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},i.prototype.paragraph=function(t){return"

    "+t+"

    \n"},i.prototype.table=function(t,e){return"
    \n\n"+t+"\n\n"+e+"\n
    \n"},i.prototype.tablerow=function(t){return"\n"+t+"\n"},i.prototype.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+t+"\n"},i.prototype.strong=function(t){return""+t+""},i.prototype.em=function(t){return""+t+""},i.prototype.codespan=function(t){return""+t+""},i.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},i.prototype.del=function(t){return""+t+""},i.prototype.link=function(t,e,n){if(this.options.sanitize){try{var r=decodeURIComponent((i=t,i.replace(/&([#\w]+);/g,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i,o='
    "},i.prototype.image=function(t,e,n){var r=''+n+'":">"},o.parse=function(t,e,n){return new o(e,n).parse(t)},o.prototype.parse=function(t){this.inline=new r(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,n,r,i="",o="";for(n="",t=0;t|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function C(t,e,n,r){if(e){var i={sourceCode:e,basePos:t};n(i),r.push.apply(r,i.decorations)}}var _=/\S/;function S(t){for(var e=void 0,n=t.firstChild;n;n=n.nextSibling){var r=n.nodeType;e=1===r?e?t:n:3===r&&_.test(n.nodeValue)?t:e}return e===t?void 0:e}function T(t,e){var n,r={};!function(){for(var i=t.concat(e),o=[],s={},a=0,l=i.length;a=0;)r[u.charAt(h)]=c;var f=c[1],d=""+f;s.hasOwnProperty(d)||(o.push(f),s[d]=null)}o.push(/[\0-\uffff]/),n=function(t){for(var e=0,n=!1,r=!1,i=0,o=t.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort(function(t,e){return t[0]-e[0]||e[1]-t[1]});var f=[],d=[];for(o=0;op[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(t){for(var r=t.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,o=[],s=0,a=0;s=2&&"["===f?r[s]=c(h):"\\"!==f&&(r[s]=h.replace(/[a-zA-Z]/g,function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"}))}return r.join("")}var h=[];for(i=0,o=t.length;i=5&&"lang-"===g.substring(0,5))||m&&"string"==typeof m[1]||(p=!1,g=b),p||(h[v]=g)}var k=c;if(c+=v.length,p){var _=m[1],S=v.indexOf(_),T=S+_.length;m[2]&&(S=(T=v.length-m[2].length)-_.length);var L=g.substring(5);C(a+k,v.substring(0,S),o,l),C(a+k+S,_,O(L,_),l),C(a+k+T,v.substring(T),o,l)}else l.push(a+k,g)}t.decorations=l};return o}function L(t){var e=[],n=[];t.tripleQuotedStrings?e.push([d,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push([d,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push([d,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&n.push([d,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=t.hashComments;r&&(t.cStyleComments?(r>1?e.push([v,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push([v,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([d,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push([v,/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(n.push([v,/^\/\/[^\r\n]*/,null]),n.push([v,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=t.regexLiterals;if(i){var o=i>1?"":"\n\r",s=o?".":"[\\S\\s]",a="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+s+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^"+k+"("+a+")")])}var l=t.types;l&&n.push([g,l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&n.push([p,new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push([x,/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),n.push([m,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[m,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[y,new RegExp(u),null]),T(e,n)}var M=L({keywords:[r,o,s,a,l,c,h],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function A(t,e,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=t.ownerDocument,s=o.createElement("li");t.firstChild;)s.appendChild(t.firstChild);var a=[s];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&n){var s=t.nodeValue,a=s.match(i);if(a){var u=s.substring(0,a.index);t.nodeValue=u;var h=s.substring(a.index+a[0].length);if(h)t.parentNode.insertBefore(o.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var f=t.firstChild;f;f=f.nextSibling)l(f)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,n=function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var o=t(i,1),s=e.nextSibling;o.appendChild(r);for(var a=s;a;a=s)s=a.nextSibling,o.appendChild(a)}return r}(t.nextSibling,0);(e=n.parentNode)&&1===e.nodeType;)n=e;a.push(n)}for(var u=0;u=0;){var i=n[r];E.hasOwnProperty(i)?t.console&&console.warn("cannot override language handler %s",i):E[i]=e}}function O(t,e){return t&&E.hasOwnProperty(t)||(t=/^\s*=b&&(u+=2),a>=w&&(d+=2)}}finally{y&&(y.style.display=m)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function B(t,e,n){var r=document.createElement("div");return r.innerHTML="
    "+t+"
    ",r=r.firstChild,n&&A(r,n,!0),D({langExtension:e,numberLines:n,sourceNode:r,pre:1}),r.innerHTML}function j(e,n){var r=n||document.body,i=r.ownerDocument||document;function o(t){return r.getElementsByTagName(t)}for(var s=[o("pre"),o("code"),o("xmp")],a=[],l=0;l]*(?:>|$)/],[v,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),N(T([[x,/^[\s]+/,null," \t\r\n"],[w,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),N(T([],[[w,/^[\s\S]+/]]),["uq.val"]),N(L({keywords:r,hashComments:!0,cStyleComments:!0,types:f}),["c","cc","cpp","cxx","cyc","m"]),N(L({keywords:"null,true,false"}),["json"]),N(L({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:f}),["cs"]),N(L({keywords:i,cStyleComments:!0}),["java"]),N(L({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),N(L({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),N(L({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),N(L({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),N(L({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]),N(L({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),N(L({keywords:u,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]),N(T([],[[d,/^[\s\S]+/]]),["regex"]);var P=t.PR={createSimpleLexer:T,registerLangHandler:N,sourceDecorator:L,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:w,PR_COMMENT:v,PR_DECLARATION:"dec",PR_KEYWORD:p,PR_LITERAL:m,PR_NOCODE:"nocode",PR_PLAIN:x,PR_PUNCTUATION:y,PR_SOURCE:b,PR_STRING:d,PR_TAG:"tag",PR_TYPE:g,prettyPrintOne:IN_GLOBAL_SCOPE?t.prettyPrintOne=B:prettyPrintOne=B,prettyPrint:prettyPrint=IN_GLOBAL_SCOPE?t.prettyPrint=j:prettyPrint=j};"function"==typeof define&&define.amd&&define("google-code-prettify",[],function(){return P})}(),function(t){var e,n,r="0.4.2",i="hasOwnProperty",o=/[\.\/]/,s=function(){},a=function(t,e){return t-e},l={n:{}},c=function(t,r){t=String(t);var i,o=n,s=Array.prototype.slice.call(arguments,2),l=c.listeners(t),u=0,h=[],f={},d=[],p=e;e=t,n=0;for(var v=0,g=l.length;g>v;v++)"zIndex"in l[v]&&(h.push(l[v].zIndex),l[v].zIndex<0&&(f[l[v].zIndex]=l[v]));for(h.sort(a);h[u]<0;)if(i=f[h[u++]],d.push(i.apply(r,s)),n)return n=o,d;for(v=0;g>v;v++)if("zIndex"in(i=l[v]))if(i.zIndex==h[u]){if(d.push(i.apply(r,s)),n)break;do{if((i=f[h[++u]])&&d.push(i.apply(r,s)),n)break}while(i)}else f[i.zIndex]=i;else if(d.push(i.apply(r,s)),n)break;return n=o,e=p,d.length?d:null};c._events=l,c.listeners=function(t){var e,n,r,i,s,a,c,u,h=t.split(o),f=l,d=[f],p=[];for(i=0,s=h.length;s>i;i++){for(u=[],a=0,c=d.length;c>a;a++)for(n=[(f=d[a].n)[h[i]],f["*"]],r=2;r--;)(e=n[r])&&(u.push(e),p=p.concat(e.f||[]));d=u}return p},c.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var n=t.split(o),r=l,i=0,a=n.length;a>i;i++)r=(r=r.n).hasOwnProperty(n[i])&&r[n[i]]||(r[n[i]]={n:{}});for(r.f=r.f||[],i=0,a=r.f.length;a>i;i++)if(r.f[i]==e)return s;return r.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},c.f=function(t){var e=[].slice.call(arguments,1);return function(){c.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},c.stop=function(){n=1},c.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},c.nts=function(){return e.split(o)},c.off=c.unbind=function(t,e){if(t){var n,r,s,a,u,h,f,d=t.split(o),p=[l];for(a=0,u=d.length;u>a;a++)for(h=0;ha;a++)for(n=p[a];n.n;){if(e){if(n.f){for(h=0,f=n.f.length;f>h;h++)if(n.f[h]==e){n.f.splice(h,1);break}!n.f.length&&delete n.f}for(r in n.n)if(n.n[i](r)&&n.n[r].f){var v=n.n[r].f;for(h=0,f=v.length;f>h;h++)if(v[h]==e){v.splice(h,1);break}!v.length&&delete n.n[r].f}}else for(r in delete n.f,n.n)n.n[i](r)&&n.n[r].f&&delete n.n[r].f;n=n.n}}else c._events=l={n:{}}},c.once=function(t,e){var n=function(){return c.unbind(t,n),e.apply(this,arguments)};return c.on(t,n)},c.version=r,c.toString=function(){return"You are running Eve "+r},"undefined"!=typeof module&&module.exports?module.exports=c:"undefined"!=typeof define?define("eve",[],function(){return c}):t.eve=c}(window||this),function(t,e){"function"==typeof define&&define.amd?define(["eve"],function(n){return e(t,n)}):e(t,t.eve||"function"==typeof require&&require("eve"))}(this,function(t,e){function n(t){if(n.is(t,"function"))return y?t():e.on("raphael.DOMload",t);if(n.is(t,V))return n._engine.create[L](n,t.splice(0,3+n.is(t[0],$))).add(t);var r=Array.prototype.slice.call(arguments,0);if(n.is(r[r.length-1],"function")){var i=r.pop();return y?i.call(n._engine.create[L](n,r)):e.on("raphael.DOMload",function(){i.call(n._engine.create[L](n,r))})}return n._engine.create[L](n,arguments)}function r(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[C](n)&&(e[n]=r(t[n]));return e}function i(t,e,n){return function r(){var i=Array.prototype.slice.call(arguments,0),o=i.join("␀"),s=r.cache=r.cache||{},a=r.count=r.count||[];return s[C](o)?(function(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}(a,o),n?n(s[o]):s[o]):(a.length>=1e3&&delete s[a.shift()],a.push(o),s[o]=t[L](e,i),n?n(s[o]):s[o])}}function o(){return this.hex}function s(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4==r?o[3]={x:+t[0],y:+t[1]}:i-2==r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4==r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}function a(t,e,n,r,i){return t*(t*(-3*e+9*n-9*r+3*i)+6*e-12*n+6*r)-3*e+3*n}function l(t,e,n,r,i,o,s,l,c){null==c&&(c=1);for(var u=(c=c>1?1:0>c?0:c)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;12>p;p++){var v=u*h[p]+u,g=a(v,t,n,i,s),m=a(v,e,r,o,l),y=g*g+m*m;d+=f[p]*F.sqrt(y)}return u*d}function c(t,e,n,r,i,o,s,a){if(!(I(t,n)I(i,s)||I(e,r)I(o,a))){var l=(t-n)*(o-a)-(e-r)*(i-s);if(l){var c=((t*r-e*n)*(i-s)-(t-n)*(i*a-o*s))/l,u=((t*r-e*n)*(o-a)-(e-r)*(i*a-o*s))/l,h=+c.toFixed(2),f=+u.toFixed(2);if(!(h<+H(t,n).toFixed(2)||h>+I(t,n).toFixed(2)||h<+H(i,s).toFixed(2)||h>+I(i,s).toFixed(2)||f<+H(e,r).toFixed(2)||f>+I(e,r).toFixed(2)||f<+H(o,a).toFixed(2)||f>+I(o,a).toFixed(2)))return{x:c,y:u}}}}function u(t,e,r){var i=n.bezierBBox(t),o=n.bezierBBox(e);if(!n.isBBoxIntersect(i,o))return r?0:[];for(var s=l.apply(0,t),a=l.apply(0,e),u=I(~~(s/5),1),h=I(~~(a/5),1),f=[],d=[],p={},v=r?0:[],g=0;u+1>g;g++){var m=n.findDotsAtSegment.apply(n,t.concat(g/u));f.push({x:m.x,y:m.y,t:g/u})}for(g=0;h+1>g;g++)m=n.findDotsAtSegment.apply(n,e.concat(g/h)),d.push({x:m.x,y:m.y,t:g/h});for(g=0;u>g;g++)for(var y=0;h>y;y++){var x=f[g],b=f[g+1],w=d[y],k=d[y+1],C=R(b.x-x.x)<.001?"y":"x",_=R(k.x-w.x)<.001?"y":"x",S=c(x.x,x.y,b.x,b.y,w.x,w.y,k.x,k.y);if(S){if(p[S.x.toFixed(4)]==S.y.toFixed(4))continue;p[S.x.toFixed(4)]=S.y.toFixed(4);var T=x.t+R((S[C]-x[C])/(b[C]-x[C]))*(b.t-x.t),L=w.t+R((S[_]-w[_])/(k[_]-w[_]))*(k.t-w.t);T>=0&&1.001>=T&&L>=0&&1.001>=L&&(r?v++:v.push({x:S.x,y:S.y,t1:H(T,1),t2:H(L,1)}))}}return v}function h(t,e,r){t=n._path2curve(t),e=n._path2curve(e);for(var i,o,s,a,l,c,h,f,d,p,v=r?0:[],g=0,m=t.length;m>g;g++){var y=t[g];if("M"==y[0])i=l=y[1],o=c=y[2];else{"C"==y[0]?(i=(d=[i,o].concat(y.slice(1)))[6],o=d[7]):(d=[i,o,i,o,l,c,l,c],i=l,o=c);for(var x=0,b=e.length;b>x;x++){var w=e[x];if("M"==w[0])s=h=w[1],a=f=w[2];else{"C"==w[0]?(s=(p=[s,a].concat(w.slice(1)))[6],a=p[7]):(p=[s,a,s,a,h,f,h,f],s=h,a=f);var k=u(d,p,r);if(r)v+=k;else{for(var C=0,_=k.length;_>C;C++)k[C].segment1=g,k[C].segment2=x,k[C].bez1=d,k[C].bez2=p;v=v.concat(k)}}}}}return v}function f(t,e,n,r,i,o){null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+r,this.e=+i,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function d(){return this.x+N+this.y+N+this.width+" × "+this.height}function p(t,e,n,r,i,o){function s(t){return((c*t+l)*t+a)*t}var a=3*e,l=3*(r-e)-a,c=1-a-l,u=3*n,h=3*(i-n)-u,f=1-u-h;return function(t,e){var n=function(t,e){var n,r,i,o,u,h;for(i=t,h=0;8>h;h++){if(o=s(i)-t,R(o)(i=t))return n;if(i>r)return r;for(;r>n;){if(o=s(i),R(o-t)o?n=i:r=i,i=(r-n)/2+n}return i}(t,e);return((f*n+h)*n+u)*n}(t,1/(200*o))}function v(t,e){var n=[],r={};if(this.ms=e,this.times=1,t){for(var i in t)t[C](i)&&(r[Z(i)]=t[i],n.push(Z(i)));n.sort(ct)}this.anim=r,this.top=n[n.length-1],this.percents=n}function g(t,r,i,o,s,a){i=Z(i);var l,c,u,h,d,v,g=t.ms,m={},y={},x={};if(o)for(k=0,_=ie.length;_>k;k++){var w=ie[k];if(w.el.id==r.id&&w.anim==t){w.percent!=i?(ie.splice(k,1),u=1):c=w,r.attr(w.totalOrigin);break}}else o=+y;for(var k=0,_=t.percents.length;_>k;k++){if(t.percents[k]==i||t.percents[k]>o*t.top){i=t.percents[k],d=t.percents[k-1]||0,g=g/t.top*(i-d),h=t.percents[k+1],l=t.anim[i];break}o&&r.attr(t.anim[t.percents[k]])}if(l){if(c)c.initstatus=o,c.start=new Date-c.ms*o;else{for(var S in l)if(l[C](S)&&(et[C](S)||r.paper.customAttributes[C](S)))switch(m[S]=r.attr(S),null==m[S]&&(m[S]=tt[S]),y[S]=l[S],et[S]){case $:x[S]=(y[S]-m[S])/g;break;case"colour":m[S]=n.getRGB(m[S]);var T=n.getRGB(y[S]);x[S]={r:(T.r-m[S].r)/g,g:(T.g-m[S].g)/g,b:(T.b-m[S].b)/g};break;case"path":var L=Dt(m[S],y[S]),A=L[1];for(m[S]=L[0],x[S]=[],k=0,_=m[S].length;_>k;k++){x[S][k]=[0];for(var E=1,N=m[S][k].length;N>E;E++)x[S][k][E]=(A[k][E]-m[S][k][E])/g}break;case"transform":var B=r._,j=It(B[S],y[S]);if(j)for(m[S]=j.from,y[S]=j.to,x[S]=[],x[S].real=!0,k=0,_=m[S].length;_>k;k++)for(x[S][k]=[m[S][k][0]],E=1,N=m[S][k].length;N>E;E++)x[S][k][E]=(y[S][k][E]-m[S][k][E])/g;else{var P=r.matrix||new f,F={_:{transform:B.transform},getBBox:function(){return r.getBBox(1)}};m[S]=[P.a,P.b,P.c,P.d,P.e,P.f],Pt(F,y[S]),y[S]=F._.transform,x[S]=[(F.matrix.a-P.a)/g,(F.matrix.b-P.b)/g,(F.matrix.c-P.c)/g,(F.matrix.d-P.d)/g,(F.matrix.e-P.e)/g,(F.matrix.f-P.f)/g]}break;case"csv":var I=O(l[S])[D](b),H=O(m[S])[D](b);if("clip-rect"==S)for(m[S]=H,x[S]=[],k=H.length;k--;)x[S][k]=(I[k]-m[S][k])/g;y[S]=I;break;default:for(I=[][M](l[S]),H=[][M](m[S]),x[S]=[],k=r.paper.customAttributes[S].length;k--;)x[S][k]=((I[k]||0)-(H[k]||0))/g}var R=l.easing,W=n.easing_formulas[R];if(!W)if((W=O(R).match(Y))&&5==W.length){var z=W;W=function(t){return p(t,+z[1],+z[2],+z[3],+z[4],g)}}else W=ut;if(w={anim:t,percent:i,timestamp:v=l.start||t.start||+new Date,start:v+(t.del||0),status:0,initstatus:o||0,stop:!1,ms:g,easing:W,from:m,diff:x,to:y,el:r,callback:l.callback,prev:d,next:h,repeat:a||t.times,origin:r.attr(),totalOrigin:s},ie.push(w),o&&!c&&!u&&(w.stop=!0,w.start=new Date-g*o,1==ie.length))return se();u&&(w.start=new Date-w.ms*o),1==ie.length&&oe(se)}e("raphael.anim.start."+r.id,r,t)}}function m(t){for(var e=0;ei;i++)for(o=1,a=(l=t[i]).length;a>o;o+=2)n=e.x(l[o],l[o+1]),r=e.y(l[o],l[o+1]),l[o]=n,l[o+1]=r;return t};if(n._g=_,n.type=_.win.SVGAngle||_.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==n.type){var vt,gt=_.doc.createElement("div");if(gt.innerHTML='',(vt=gt.firstChild).style.behavior="url(#default#VML)",!vt||"object"!=typeof vt.adj)return n.type=E;gt=null}n.svg=!(n.vml="VML"==n.type),n._Paper=T,n.fn=x=T.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(t,e){return"finite"==(e=P.call(e))?!G[C](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||U.call(t).slice(8,-1).toLowerCase()==e},n.angle=function(t,e,r,i,o,s){if(null==o){var a=t-r,l=e-i;return a||l?(180+180*F.atan2(-l,-a)/z+360)%360:0}return n.angle(t,e,o,s)-n.angle(r,i,o,s)},n.rad=function(t){return t%360*z/180},n.deg=function(t){return 180*t/z%360},n.snapTo=function(t,e,r){if(r=n.is(r,"finite")?r:10,n.is(t,V)){for(var i=t.length;i--;)if(R(t[i]-e)<=r)return t[i]}else{var o=e%(t=+t);if(r>o)return e-o;if(o>t-r)return e-o+t}return e},n.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*F.random()|0;return("x"==t?e:3&e|8).toString(16)}),n.setWindow=function(t){e("raphael.setWindow",n,_.win,t),_.win=t,_.doc=_.win.document,n._engine.initWin&&n._engine.initWin(_.win)};var mt=function(t){if(n.vml){var e,r=/^\s+|\s+$/g;try{var o=new ActiveXObject("htmlfile");o.write(""),o.close(),e=o.body}catch(t){e=createPopup().document.body}var s=e.createTextRange();mt=i(function(t){try{e.style.color=O(t).replace(r,E);var n=s.queryCommandValue("ForeColor");return"#"+("000000"+(n=(255&n)<<16|65280&n|(16711680&n)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=_.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",_.doc.body.appendChild(a),mt=i(function(t){return a.style.color=t,_.doc.defaultView.getComputedStyle(a,E).getPropertyValue("color")})}return mt(t)},yt=function(){return"hsb("+[this.h,this.s,this.b]+")"},xt=function(){return"hsl("+[this.h,this.s,this.l]+")"},bt=function(){return this.hex},wt=function(t,e,r){if(null==e&&n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,e=t.g,t=t.r),null==e&&n.is(t,q)){var i=n.getRGB(t);t=i.r,e=i.g,r=i.b}return(t>1||e>1||r>1)&&(t/=255,e/=255,r/=255),[t,e,r]},kt=function(t,e,r,i){var o={r:t*=255,g:e*=255,b:r*=255,hex:n.rgb(t,e,r),toString:bt};return n.is(i,"finite")&&(o.opacity=i),o};n.color=function(t){var e;return n.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):n.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(n.is(t,"string")&&(t=n.getRGB(t)),n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=bt,t},n.hsb2rgb=function(t,e,n,r){var i,o,s,a,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,r=t.o,t=t.h),a=(l=n*e)*(1-R((t=(t*=360)%360/60)%2-1)),i=o=s=n-l,kt(i+=[l,a,0,0,a,l][t=~~t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],r)},n.hsl2rgb=function(t,e,n,r){var i,o,s,a,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),a=(l=2*e*(.5>n?n:1-n))*(1-R((t=(t*=360)%360/60)%2-1)),i=o=s=n-l/2,kt(i+=[l,a,0,0,a,l][t=~~t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],r)},n.rgb2hsb=function(t,e,n){var r,i;return t=(n=wt(t,e,n))[0],e=n[1],n=n[2],{h:((0==(i=(r=I(t,e,n))-H(t,e,n))?null:r==t?(e-n)/i:r==e?(n-t)/i+2:(t-e)/i+4)+360)%6*60/360,s:0==i?0:i/r,b:r,toString:yt}},n.rgb2hsl=function(t,e,n){var r,i,o,s;return t=(n=wt(t,e,n))[0],e=n[1],n=n[2],r=((i=I(t,e,n))+(o=H(t,e,n)))/2,{h:((0==(s=i-o)?null:i==t?(e-n)/s:i==e?(n-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:.5>r?s/(2*r):s/(2-2*r),l:r,toString:xt}},n._path2string=function(){return this.join(",").replace(it,"$1")},n._preload=function(t,e){var n=_.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,_.doc.body.removeChild(this)},n.onerror=function(){_.doc.body.removeChild(this)},_.doc.body.appendChild(n),n.src=t},n.getRGB=i(function(t){if(!t||(t=O(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!rt[C](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=mt(t));var e,r,i,s,a,l,c=t.match(X);return c?(c[2]&&(i=Q(c[2].substring(5),16),r=Q(c[2].substring(3,5),16),e=Q(c[2].substring(1,3),16)),c[3]&&(i=Q((a=c[3].charAt(3))+a,16),r=Q((a=c[3].charAt(2))+a,16),e=Q((a=c[3].charAt(1))+a,16)),c[4]&&(l=c[4][D](nt),e=Z(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=Z(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=Z(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(s=Z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100)),c[5]?(l=c[5][D](nt),e=Z(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=Z(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=Z(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(s=Z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsb2rgb(e,r,i,s)):c[6]?(l=c[6][D](nt),e=Z(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),r=Z(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),i=Z(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(s=Z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsl2rgb(e,r,i,s)):((c={r:e,g:r,b:i,toString:o}).hex="#"+(16777216|i|r<<8|e<<16).toString(16).slice(1),n.is(s,"finite")&&(c.opacity=s),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},n),n.hsb=i(function(t,e,r){return n.hsb2rgb(t,e,r).hex}),n.hsl=i(function(t,e,r){return n.hsl2rgb(t,e,r).hex}),n.rgb=i(function(t,e,n){return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)}),n.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(t){if(!t)return null;var e=Ct(t);if(e.arr)return St(e.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return n.is(t,V)&&n.is(t[0],V)&&(i=St(t)),i.length||O(t).replace(ot,function(t,e,n){var o=[],s=e.toLowerCase();if(n.replace(at,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(i.push([e][M](o.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)i.push([e][M](o));else for(;o.length>=r[s]&&(i.push([e][M](o.splice(0,r[s]))),r[s]););}),i.toString=n._path2string,e.arr=St(i),i},n.parseTransformString=i(function(t){if(!t)return null;var e=[];return n.is(t,V)&&n.is(t[0],V)&&(e=St(t)),e.length||O(t).replace(st,function(t,n,r){var i=[];P.call(n),r.replace(at,function(t,e){e&&i.push(+e)}),e.push([n][M](i))}),e.toString=n._path2string,e});var Ct=function(t){var e=Ct.ps=Ct.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[C](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};n.findDotsAtSegment=function(t,e,n,r,i,o,s,a,l){var c=1-l,u=W(c,3),h=W(c,2),f=l*l,d=f*l,p=u*t+3*h*l*n+3*c*l*l*i+d*s,v=u*e+3*h*l*r+3*c*l*l*o+d*a,g=t+2*l*(n-t)+f*(i-2*n+t),m=e+2*l*(r-e)+f*(o-2*r+e),y=n+2*l*(i-n)+f*(s-2*i+n),x=r+2*l*(o-r)+f*(a-2*o+r),b=c*t+l*n,w=c*e+l*r,k=c*i+l*s,C=c*o+l*a,_=90-180*F.atan2(g-y,m-x)/z;return(g>y||x>m)&&(_+=180),{x:p,y:v,m:{x:g,y:m},n:{x:y,y:x},start:{x:b,y:w},end:{x:k,y:C},alpha:_}},n.bezierBBox=function(t,e,r,i,o,s,a,l){n.is(t,"array")||(t=[t,e,r,i,o,s,a,l]);var c=Ot.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},n.isPointInsideBBox=function(t,e,n){return e>=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},n.isBBoxIntersect=function(t,e){var r=n.isPointInsideBBox;return r(e,t.x,t.y)||r(e,t.x2,t.y)||r(e,t.x,t.y2)||r(e,t.x2,t.y2)||r(t,e.x,e.y)||r(t,e.x2,e.y)||r(t,e.x,e.y2)||r(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},n.pathIntersection=function(t,e){return h(t,e)},n.pathIntersectionNumber=function(t,e){return h(t,e,1)},n.isPointInsidePath=function(t,e,r){var i=n.pathBBox(t);return n.isPointInsideBBox(i,e,r)&&h(t,[["M",e,r],["H",i.x2+10]],1)%2==1},n._removedFactory=function(t){return function(){e("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var _t=n.pathBBox=function(t){var e=Ct(t);if(e.bbox)return r(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var n,i=0,o=0,s=[],a=[],l=0,c=(t=Dt(t)).length;c>l;l++)if("M"==(n=t[l])[0])i=n[1],o=n[2],s.push(i),a.push(o);else{var u=Ot(i,o,n[1],n[2],n[3],n[4],n[5],n[6]);s=s[M](u.min.x,u.max.x),a=a[M](u.min.y,u.max.y),i=n[5],o=n[6]}var h=H[L](0,s),f=H[L](0,a),d=I[L](0,s),p=I[L](0,a),v=d-h,g=p-f,m={x:h,y:f,x2:d,y2:p,width:v,height:g,cx:h+v/2,cy:f+g/2};return e.bbox=r(m),m},St=function(t){var e=r(t);return e.toString=n._path2string,e},Tt=n._pathToRelative=function(t){var e=Ct(t);if(e.rel)return St(e.rel);n.is(t,V)&&n.is(t&&t[0],V)||(t=n.parsePathString(t));var r=[],i=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(s=i=t[0][1],a=o=t[0][2],l++,r.push(["M",i,o]));for(var c=l,u=t.length;u>c;c++){var h=r[c]=[],f=t[c];if(f[0]!=P.call(f[0]))switch(h[0]=P.call(f[0]),h[0]){case"a":h[1]=f[1],h[2]=f[2],h[3]=f[3],h[4]=f[4],h[5]=f[5],h[6]=+(f[6]-i).toFixed(3),h[7]=+(f[7]-o).toFixed(3);break;case"v":h[1]=+(f[1]-o).toFixed(3);break;case"m":s=f[1],a=f[2];default:for(var d=1,p=f.length;p>d;d++)h[d]=+(f[d]-(d%2?i:o)).toFixed(3)}else{h=r[c]=[],"m"==f[0]&&(s=f[1]+i,a=f[2]+o);for(var v=0,g=f.length;g>v;v++)r[c][v]=f[v]}var m=r[c].length;switch(r[c][0]){case"z":i=s,o=a;break;case"h":i+=+r[c][m-1];break;case"v":o+=+r[c][m-1];break;default:i+=+r[c][m-2],o+=+r[c][m-1]}}return r.toString=n._path2string,e.rel=St(r),r},Lt=n._pathToAbsolute=function(t){var e=Ct(t);if(e.abs)return St(e.abs);if(n.is(t,V)&&n.is(t&&t[0],V)||(t=n.parsePathString(t)),!t||!t.length)return[["M",0,0]];var r=[],i=0,o=0,a=0,l=0,c=0;"M"==t[0][0]&&(a=i=+t[0][1],l=o=+t[0][2],c++,r[0]=["M",i,o]);for(var u,h,f=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),d=c,p=t.length;p>d;d++){if(r.push(u=[]),(h=t[d])[0]!=J.call(h[0]))switch(u[0]=J.call(h[0]),u[0]){case"A":u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],u[6]=+(h[6]+i),u[7]=+(h[7]+o);break;case"V":u[1]=+h[1]+o;break;case"H":u[1]=+h[1]+i;break;case"R":for(var v=[i,o][M](h.slice(1)),g=2,m=v.length;m>g;g++)v[g]=+v[g]+i,v[++g]=+v[g]+o;r.pop(),r=r[M](s(v,f));break;case"M":a=+h[1]+i,l=+h[2]+o;default:for(g=1,m=h.length;m>g;g++)u[g]=+h[g]+(g%2?i:o)}else if("R"==h[0])v=[i,o][M](h.slice(1)),r.pop(),r=r[M](s(v,f)),u=["R"][M](h.slice(-2));else for(var y=0,x=h.length;x>y;y++)u[y]=h[y];switch(u[0]){case"Z":i=a,o=l;break;case"H":i=u[1];break;case"V":o=u[1];break;case"M":a=u[u.length-2],l=u[u.length-1];default:i=u[u.length-2],o=u[u.length-1]}}return r.toString=n._path2string,e.abs=St(r),r},Mt=function(t,e,n,r){return[t,e,n,r,n,r]},At=function(t,e,n,r,i,o){var s=1/3,a=2/3;return[s*t+a*n,s*e+a*r,s*i+a*n,s*o+a*r,i,o]},Et=function(t,e,n,r,o,s,a,l,c,u){var h,f=120*z/180,d=z/180*(+o||0),p=[],v=i(function(t,e,n){return{x:t*F.cos(n)-e*F.sin(n),y:t*F.sin(n)+e*F.cos(n)}});if(u)_=u[0],S=u[1],k=u[2],C=u[3];else{t=(h=v(t,e,-d)).x,e=h.y,l=(h=v(l,c,-d)).x,c=h.y;var g=(F.cos(z/180*o),F.sin(z/180*o),(t-l)/2),m=(e-c)/2,y=g*g/(n*n)+m*m/(r*r);y>1&&(n*=y=F.sqrt(y),r*=y);var x=n*n,b=r*r,w=(s==a?-1:1)*F.sqrt(R((x*b-x*m*m-b*g*g)/(x*m*m+b*g*g))),k=w*n*m/r+(t+l)/2,C=w*-r*g/n+(e+c)/2,_=F.asin(((e-C)/r).toFixed(9)),S=F.asin(((c-C)/r).toFixed(9));0>(_=k>t?z-_:_)&&(_=2*z+_),0>(S=k>l?z-S:S)&&(S=2*z+S),a&&_>S&&(_-=2*z),!a&&S>_&&(S-=2*z)}var T=S-_;if(R(T)>f){var L=S,A=l,E=c;S=_+f*(a&&S>_?1:-1),l=k+n*F.cos(S),c=C+r*F.sin(S),p=Et(l,c,n,r,o,0,a,A,E,[S,L,k,C])}T=S-_;var N=F.cos(_),O=F.sin(_),B=F.cos(S),j=F.sin(S),P=F.tan(T/4),I=4/3*n*P,H=4/3*r*P,W=[t,e],$=[t+I*O,e-H*N],q=[l+I*j,c-H*B],V=[l,c];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],u)return[$,q,V][M](p);for(var U=[],X=0,G=(p=[$,q,V][M](p).join()[D](",")).length;G>X;X++)U[X]=X%2?v(p[X-1],p[X],d).y:v(p[X],p[X+1],d).x;return U},Nt=function(t,e,n,r,i,o,s,a,l){var c=1-l;return{x:W(c,3)*t+3*W(c,2)*l*n+3*c*l*l*i+W(l,3)*s,y:W(c,3)*e+3*W(c,2)*l*r+3*c*l*l*o+W(l,3)*a}},Ot=i(function(t,e,n,r,i,o,s,a){var l,c=i-2*n+t-(s-2*i+n),u=2*(n-t)-2*(i-n),h=t-n,f=(-u+F.sqrt(u*u-4*c*h))/2/c,d=(-u-F.sqrt(u*u-4*c*h))/2/c,p=[e,a],v=[t,s];return R(f)>"1e12"&&(f=.5),R(d)>"1e12"&&(d=.5),f>0&&1>f&&(l=Nt(t,e,n,r,i,o,s,a,f),v.push(l.x),p.push(l.y)),d>0&&1>d&&(l=Nt(t,e,n,r,i,o,s,a,d),v.push(l.x),p.push(l.y)),c=o-2*r+e-(a-2*o+r),h=e-r,f=(-(u=2*(r-e)-2*(o-r))+F.sqrt(u*u-4*c*h))/2/c,d=(-u-F.sqrt(u*u-4*c*h))/2/c,R(f)>"1e12"&&(f=.5),R(d)>"1e12"&&(d=.5),f>0&&1>f&&(l=Nt(t,e,n,r,i,o,s,a,f),v.push(l.x),p.push(l.y)),d>0&&1>d&&(l=Nt(t,e,n,r,i,o,s,a,d),v.push(l.x),p.push(l.y)),{min:{x:H[L](0,v),y:H[L](0,p)},max:{x:I[L](0,v),y:I[L](0,p)}}}),Dt=n._path2curve=i(function(t,e){var n=!e&&Ct(t);if(!e&&n.curve)return St(n.curve);for(var r=Lt(t),i=e&&Lt(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][M](Et[L](0,[e.x,e.y][M](t.slice(1))));break;case"S":"C"==n||"S"==n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i][M](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][M](At(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][M](At(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][M](Mt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][M](Mt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][M](Mt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][M](Mt(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)u[e]="A",i&&(h[e]="A"),t.splice(e++,0,["C"][M](n.splice(0,6)));t.splice(e,1),v=I(r.length,i&&i.length||0)}},c=function(t,e,n,o,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],v=I(r.length,i&&i.length||0))},u=[],h=[],f="",d="",p=0,v=I(r.length,i&&i.length||0);v>p;p++){r[p]&&(f=r[p][0]),"C"!=f&&(u[p]=f,p&&(d=u[p-1])),r[p]=a(r[p],o,d),"A"!=u[p]&&"C"==f&&(u[p]="C"),l(r,p),i&&(i[p]&&(f=i[p][0]),"C"!=f&&(h[p]=f,p&&(d=h[p-1])),i[p]=a(i[p],s,d),"A"!=h[p]&&"C"==f&&(h[p]="C"),l(i,p)),c(r,i,o,s,p),c(i,r,s,o,p);var g=r[p],m=i&&i[p],y=g.length,x=i&&m.length;o.x=g[y-2],o.y=g[y-1],o.bx=Z(g[y-4])||o.x,o.by=Z(g[y-3])||o.y,s.bx=i&&(Z(m[x-4])||s.x),s.by=i&&(Z(m[x-3])||s.y),s.x=i&&m[x-2],s.y=i&&m[x-1]}return i||(n.curve=St(r)),i?[r,i]:r},null,St),Bt=(n._parseDots=i(function(t){for(var e=[],r=0,i=t.length;i>r;r++){var o={},s=t[r].match(/^([^:]*):?([\d\.]*)/);if(o.color=n.getRGB(s[1]),o.color.error)return null;o.color=o.color.hex,s[2]&&(o.offset=s[2]+"%"),e.push(o)}for(r=1,i=e.length-1;i>r;r++)if(!e[r].offset){for(var a=Z(e[r-1].offset||0),l=0,c=r+1;i>c;c++)if(e[c].offset){l=e[c].offset;break}l||(l=100,c=i);for(var u=((l=Z(l))-a)/(c-r+1);c>r;r++)a+=u,e[r].offset=a+"%"}return e}),n._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),jt=(n._tofront=function(t,e){e.top!==t&&(Bt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},n._toback=function(t,e){e.bottom!==t&&(Bt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},n._insertafter=function(t,e,n){Bt(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},n._insertbefore=function(t,e,n){Bt(t,n),e==n.bottom&&(n.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},n.toMatrix=function(t,e){var n=_t(t),r={_:{transform:E},getBBox:function(){return n}};return Pt(r,e),r.matrix}),Pt=(n.transformPath=function(t,e){return pt(t,jt(t,e))},n._extractTransform=function(t,e){if(null==e)return t._.transform;e=O(e).replace(/\.{3}|\u2026/g,t._.transform||E);var r,i,o=n.parseTransformString(e),s=0,a=1,l=1,c=t._,u=new f;if(c.transform=o||[],o)for(var h=0,d=o.length;d>h;h++){var p,v,g,m,y,x=o[h],b=x.length,w=O(x[0]).toLowerCase(),k=x[0]!=w,C=k?u.invert():0;"t"==w&&3==b?k?(p=C.x(0,0),v=C.y(0,0),g=C.x(x[1],x[2]),m=C.y(x[1],x[2]),u.translate(g-p,m-v)):u.translate(x[1],x[2]):"r"==w?2==b?(y=y||t.getBBox(1),u.rotate(x[1],y.x+y.width/2,y.y+y.height/2),s+=x[1]):4==b&&(k?(g=C.x(x[2],x[3]),m=C.y(x[2],x[3]),u.rotate(x[1],g,m)):u.rotate(x[1],x[2],x[3]),s+=x[1]):"s"==w?2==b||3==b?(y=y||t.getBBox(1),u.scale(x[1],x[b-1],y.x+y.width/2,y.y+y.height/2),a*=x[1],l*=x[b-1]):5==b&&(k?(g=C.x(x[3],x[4]),m=C.y(x[3],x[4]),u.scale(x[1],x[2],g,m)):u.scale(x[1],x[2],x[3],x[4]),a*=x[1],l*=x[2]):"m"==w&&7==b&&u.add(x[1],x[2],x[3],x[4],x[5],x[6]),c.dirtyT=1,t.matrix=u}t.matrix=u,c.sx=a,c.sy=l,c.deg=s,c.dx=r=u.e,c.dy=i=u.f,1==a&&1==l&&!s&&c.bbox?(c.bbox.x+=+r,c.bbox.y+=+i):c.dirtyT=1}),Ft=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},It=n._equaliseTransform=function(t,e){e=O(e).replace(/\.{3}|\u2026/g,t),t=n.parseTransformString(t)||[],e=n.parseTransformString(e)||[];for(var r,i,o,s,a=I(t.length,e.length),l=[],c=[],u=0;a>u;u++){if(o=t[u]||Ft(e[u]),s=e[u]||Ft(o),o[0]!=s[0]||"r"==o[0].toLowerCase()&&(o[2]!=s[2]||o[3]!=s[3])||"s"==o[0].toLowerCase()&&(o[3]!=s[3]||o[4]!=s[4]))return;for(l[u]=[],c[u]=[],r=0,i=I(o.length,s.length);i>r;r++)r in o&&(l[u][r]=o[r]),r in s&&(c[u][r]=s[r])}return{from:l,to:c}};n._getContainer=function(t,e,r,i){var o;return null!=(o=null!=i||n.is(t,"object")?t:_.doc.getElementById(t))?o.tagName?null==e?{container:o,width:o.style.pixelWidth||o.offsetWidth,height:o.style.pixelHeight||o.offsetHeight}:{container:o,width:e,height:r}:{container:1,x:t,y:e,width:r,height:i}:void 0},n.pathToRelative=Tt,n._engine={},n.path2curve=Dt,n.matrix=function(t,e,n,r,i,o){return new f(t,e,n,r,i,o)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var n=F.sqrt(e(t));t[0]&&(t[0]/=n),t[1]&&(t[1]/=n)}t.add=function(t,e,n,r,i,o){var s,a,l,c,u=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,n,i],[e,r,o],[0,0,1]];for(t&&t instanceof f&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(a=0;3>a;a++){for(c=0,l=0;3>l;l++)c+=h[s][l]*d[l][a];u[s][a]=c}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new f(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new f(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,n,r){null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},t.rotate=function(t,e,r){t=n.rad(t),e=e||0,r=r||0;var i=+F.cos(t).toFixed(9),o=+F.sin(t).toFixed(9);this.add(i,o,-o,i,e,r),this.add(1,0,0,1,-e,-r)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[O.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return n.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];t.scalex=F.sqrt(e(i[0])),r(i[0]),t.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*t.shear,i[1][1]-i[0][1]*t.shear],t.scaley=F.sqrt(e(i[1])),r(i[1]),t.shear/=t.scaley;var o=-i[0][1],s=i[1][1];return 0>s?(t.rotate=n.deg(F.acos(s)),0>o&&(t.rotate=360-t.rotate)):t.rotate=n.deg(F.asin(o)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[D]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:E)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:E)+(e.rotate?"r"+[e.rotate,0,0]:E)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(f.prototype);var Ht=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);x.safari="Apple Computer, Inc."==navigator.vendor&&(Ht&&Ht[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ht&&Ht[1]<8?function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:function(){};for(var Rt=function(){this.returnValue=!1},Wt=function(){return this.originalEvent.preventDefault()},zt=function(){this.cancelBubble=!0},$t=function(){return this.originalEvent.stopPropagation()},qt=function(t){var e=_.doc.documentElement.scrollTop||_.doc.body.scrollTop,n=_.doc.documentElement.scrollLeft||_.doc.body.scrollLeft;return{x:t.clientX+n,y:t.clientY+e}},Vt=_.doc.addEventListener?function(t,e,n,r){var i=function(t){var e=qt(t);return n.call(r,t,e.x,e.y)};if(t.addEventListener(e,i,!1),A&&j[e]){var o=function(e){for(var i=qt(e),o=e,s=0,a=e.targetTouches&&e.targetTouches.length;a>s;s++)if(e.targetTouches[s].target==t){(e=e.targetTouches[s]).originalEvent=o,e.preventDefault=Wt,e.stopPropagation=$t;break}return n.call(r,e,i.x,i.y)};t.addEventListener(j[e],o,!1)}return function(){return t.removeEventListener(e,i,!1),A&&j[e]&&t.removeEventListener(j[e],o,!1),!0}}:_.doc.attachEvent?function(t,e,n,r){var i=function(t){t=t||_.win.event;var e=_.doc.documentElement.scrollTop||_.doc.body.scrollTop,i=_.doc.documentElement.scrollLeft||_.doc.body.scrollLeft,o=t.clientX+i,s=t.clientY+e;return t.preventDefault=t.preventDefault||Rt,t.stopPropagation=t.stopPropagation||zt,n.call(r,t,o,s)};return t.attachEvent("on"+e,i),function(){return t.detachEvent("on"+e,i),!0}}:void 0,Ut=[],Xt=function(t){for(var n,r=t.clientX,i=t.clientY,o=_.doc.documentElement.scrollTop||_.doc.body.scrollTop,s=_.doc.documentElement.scrollLeft||_.doc.body.scrollLeft,a=Ut.length;a--;){if(n=Ut[a],A&&t.touches){for(var l,c=t.touches.length;c--;)if((l=t.touches[c]).identifier==n.el._drag.id){r=l.clientX,i=l.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u,h=n.el.node,f=h.nextSibling,d=h.parentNode,p=h.style.display;_.win.opera&&d.removeChild(h),h.style.display="none",u=n.el.paper.getElementByPoint(r,i),h.style.display=p,_.win.opera&&(f?d.insertBefore(h,f):d.appendChild(h)),u&&e("raphael.drag.over."+n.el.id,n.el,u),r+=s,i+=o,e("raphael.drag.move."+n.el.id,n.move_scope||n.el,r-n.el._drag.x,i-n.el._drag.y,r,i,t)}},Gt=function(t){n.unmousemove(Xt).unmouseup(Gt);for(var r,i=Ut.length;i--;)(r=Ut[i]).el._drag={},e("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,t);Ut=[]},Yt=n.el={},Kt=B.length;Kt--;)!function(t){n[t]=Yt[t]=function(e,r){return n.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Vt(this.shape||this.node||_.doc,t,e,r||this)})),this},n["un"+t]=Yt["un"+t]=function(e){for(var r=this.events||[],i=r.length;i--;)r[i].name!=t||!n.is(e,"undefined")&&r[i].f!=e||(r[i].unbind(),r.splice(i,1),!r.length&&delete this.events);return this}}(B[Kt]);Yt.data=function(t,r){var i=lt[this.id]=lt[this.id]||{};if(0==arguments.length)return i;if(1==arguments.length){if(n.is(t,"object")){for(var o in t)t[C](o)&&this.data(o,t[o]);return this}return e("raphael.data.get."+this.id,this,i[t],t),i[t]}return i[t]=r,e("raphael.data.set."+this.id,this,r,t),this},Yt.removeData=function(t){return null==t?lt[this.id]={}:lt[this.id]&&delete lt[this.id][t],this},Yt.getData=function(){return r(lt[this.id]||{})},Yt.hover=function(t,e,n,r){return this.mouseover(t,n).mouseout(e,r||n)},Yt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Zt=[];Yt.drag=function(t,r,i,o,s,a){function l(l){(l.originalEvent||l).preventDefault();var c=l.clientX,u=l.clientY,h=_.doc.documentElement.scrollTop||_.doc.body.scrollTop,f=_.doc.documentElement.scrollLeft||_.doc.body.scrollLeft;if(this._drag.id=l.identifier,A&&l.touches)for(var d,p=l.touches.length;p--;)if(d=l.touches[p],this._drag.id=d.identifier,d.identifier==this._drag.id){c=d.clientX,u=d.clientY;break}this._drag.x=c+f,this._drag.y=u+h,!Ut.length&&n.mousemove(Xt).mouseup(Gt),Ut.push({el:this,move_scope:o,start_scope:s,end_scope:a}),r&&e.on("raphael.drag.start."+this.id,r),t&&e.on("raphael.drag.move."+this.id,t),i&&e.on("raphael.drag.end."+this.id,i),e("raphael.drag.start."+this.id,s||o||this,l.clientX+f,l.clientY+h,l)}return this._drag={},Zt.push({el:this,start:l}),this.mousedown(l),this},Yt.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},Yt.undrag=function(){for(var t=Zt.length;t--;)Zt[t].el==this&&(this.unmousedown(Zt[t].start),Zt.splice(t,1),e.unbind("raphael.drag.*."+this.id));!Zt.length&&n.unmousemove(Xt).unmouseup(Gt),Ut=[]},x.circle=function(t,e,r){var i=n._engine.circle(this,t||0,e||0,r||0);return this.__set__&&this.__set__.push(i),i},x.rect=function(t,e,r,i,o){var s=n._engine.rect(this,t||0,e||0,r||0,i||0,o||0);return this.__set__&&this.__set__.push(s),s},x.ellipse=function(t,e,r,i){var o=n._engine.ellipse(this,t||0,e||0,r||0,i||0);return this.__set__&&this.__set__.push(o),o},x.path=function(t){t&&!n.is(t,q)&&!n.is(t[0],V)&&(t+=E);var e=n._engine.path(n.format[L](n,arguments),this);return this.__set__&&this.__set__.push(e),e},x.image=function(t,e,r,i,o){var s=n._engine.image(this,t||"about:blank",e||0,r||0,i||0,o||0);return this.__set__&&this.__set__.push(s),s},x.text=function(t,e,r){var i=n._engine.text(this,t||0,e||0,O(r));return this.__set__&&this.__set__.push(i),i},x.set=function(t){!n.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new le(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},x.setStart=function(t){this.__set__=t||this.set()},x.setFinish=function(){var t=this.__set__;return delete this.__set__,t},x.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},x.setSize=function(t,e){return n._engine.setSize.call(this,t,e)},x.setViewBox=function(t,e,r,i,o){return n._engine.setViewBox.call(this,t,e,r,i,o)},x.top=x.bottom=null,x.raphael=n;x.getElementByPoint=function(t,e){var n=this,r=n.canvas,i=_.doc.elementFromPoint(t,e);if(_.win.opera&&"svg"==i.tagName){var o=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.body,i=n.documentElement,o=i.clientTop||r.clientTop||0,s=i.clientLeft||r.clientLeft||0;return{y:e.top+(_.win.pageYOffset||i.scrollTop||r.scrollTop)-o,x:e.left+(_.win.pageXOffset||i.scrollLeft||r.scrollLeft)-s}}(r),s=r.createSVGRect();s.x=t-o.x,s.y=e-o.y,s.width=s.height=1;var a=r.getIntersectionList(s,null);a.length&&(i=a[a.length-1])}if(!i)return null;for(;i.parentNode&&i!=r.parentNode&&!i.raphael;)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i&&i.raphael?n.getById(i.raphaelid):null},x.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(r){n.isBBoxIntersect(r.getBBox(),t)&&e.push(r)}),e},x.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},x.forEach=function(t,e){for(var n=this.bottom;n;){if(!1===t.call(e,n))return this;n=n.next}return this},x.getElementsByPoint=function(t,e){var n=this.set();return this.forEach(function(r){r.isPointInside(t,e)&&n.push(r)}),n},Yt.isPointInside=function(t,e){var r=this.realPath=dt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(r=n.transformPath(r,this.attr("transform"))),n.isPointInsidePath(r,t,e)},Yt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=dt[this.type](this),e.bboxwt=_t(this.realPath),e.bboxwt.toString=d,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=dt[this.type](this)),e.bbox=_t(pt(this.realPath,this.matrix)),e.bbox.toString=d,e.dirty=e.dirtyT=0),e.bbox)},Yt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Yt.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},n=e.width/2,r=this.paper,i=r.set(),o=this.realPath||dt[this.type](this);o=this.matrix?pt(o,this.matrix):o;for(var s=1;n+1>s;s++)i.push(r.path(o).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/n*s).toFixed(3),opacity:+(e.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(e.offsetx,e.offsety)};var Qt=function(t,e,r,i,o,s,a,c,u){return null==u?l(t,e,r,i,o,s,a,c):n.findDotsAtSegment(t,e,r,i,o,s,a,c,function(t,e,n,r,i,o,s,a,c){if(!(0>c||l(t,e,n,r,i,o,s,a).01;)u=l(t,e,n,r,i,o,s,a,f+=(c>u?1:-1)*(h/=2));return f}}(t,e,r,i,o,s,a,c,u))},Jt=function(t,e){return function(r,i,o){for(var s,a,l,c,u,h="",f={},d=0,p=0,v=(r=Dt(r)).length;v>p;p++){if("M"==(l=r[p])[0])s=+l[1],a=+l[2];else{if(d+(c=Qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6]))>i){if(e&&!f.start){if(h+=["C"+(u=Qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],i-d)).start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],o)return h;f.start=h,h=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),d+=c,s=+l[5],a=+l[6];continue}if(!t&&!e)return{x:(u=Qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],i-d)).x,y:u.y,alpha:u.alpha}}d+=c,s=+l[5],a=+l[6]}h+=l.shift()+l}return f.end=h,(u=t?d:e?f:n.findDotsAtSegment(s,a,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},te=Jt(1),ee=Jt(),ne=Jt(0,1);n.getTotalLength=te,n.getPointAtLength=ee,n.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return ne(t,e).end;var r=ne(t,n,1);return e?ne(r,e).end:r},Yt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():te(t)},Yt.getPointAtLength=function(t){var e=this.getPath();if(e)return ee(e,t)},Yt.getPath=function(){var t,e=n._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return e&&(t=e(this)),t},Yt.getSubpath=function(t,e){var r=this.getPath();if(r)return n.getSubpath(r,t,e)};var re=n.easing_formulas={linear:function(t){return t},"<":function(t){return W(t,1.7)},">":function(t){return W(t,.48)},"<>":function(t){var e=.48-t/1.04,n=F.sqrt(.1734+e*e),r=n-e,i=-n-e,o=W(R(r),1/3)*(0>r?-1:1)+W(R(i),1/3)*(0>i?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:W(2,-10*t)*F.sin(2*(t-.075)*z/.3)+1},bounce:function(t){var e,n=7.5625,r=2.75;return 1/r>t?e=n*t*t:2/r>t?e=n*(t-=1.5/r)*t+.75:2.5/r>t?e=n*(t-=2.25/r)*t+.9375:e=n*(t-=2.625/r)*t+.984375,e}};re.easeIn=re["ease-in"]=re["<"],re.easeOut=re["ease-out"]=re[">"],re.easeInOut=re["ease-in-out"]=re["<>"],re["back-in"]=re.backIn,re["back-out"]=re.backOut;var ie=[],oe=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},se=function(){for(var t=+new Date,r=0;ra))if(l>a){var m=c(a/l);for(var y in u)if(u[C](y)){switch(et[y]){case $:o=+u[y]+m*l*h[y];break;case"colour":o="rgb("+[ae(K(u[y].r+m*l*h[y].r)),ae(K(u[y].g+m*l*h[y].g)),ae(K(u[y].b+m*l*h[y].b))].join(",")+")";break;case"path":o=[];for(var x=0,b=u[y].length;b>x;x++){o[x]=[u[y][x][0]];for(var w=1,k=u[y][x].length;k>w;w++)o[x][w]=+u[y][x][w]+m*l*h[y][x][w];o[x]=o[x].join(N)}o=o.join(N);break;case"transform":if(h[y].real)for(o=[],x=0,b=u[y].length;b>x;x++)for(o[x]=[u[y][x][0]],w=1,k=u[y][x].length;k>w;w++)o[x][w]=u[y][x][w]+m*l*h[y][x][w];else{var _=function(t){return+u[y][t]+m*l*h[y][t]};o=[["m",_(0),_(1),_(2),_(3),_(4),_(5)]]}break;case"csv":if("clip-rect"==y)for(o=[],x=4;x--;)o[x]=+u[y][x]+m*l*h[y][x];break;default:var S=[][M](u[y]);for(o=[],x=d.paper.customAttributes[y].length;x--;)o[x]=+S[x]+m*l*h[y][x]}p[y]=o}d.attr(p),function(t,n,r){setTimeout(function(){e("raphael.anim.frame."+t,n,r)})}(d.id,d,i.anim)}else{if(function(t,r,i){setTimeout(function(){e("raphael.anim.frame."+r.id,r,i),e("raphael.anim.finish."+r.id,r,i),n.is(t,"function")&&t.call(r)})}(i.callback,d,i.anim),d.attr(f),ie.splice(r--,1),i.repeat>1&&!i.next){for(s in f)f[C](s)&&(v[s]=i.totalOrigin[s]);i.el.attr(v),g(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&g(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}n.svg&&d&&d.paper&&d.paper.safari(),ie.length&&oe(se)},ae=function(t){return t>255?255:0>t?0:t};Yt.animateWith=function(t,e,r,i,o,s){var a=this;if(a.removed)return s&&s.call(a),a;var l=r instanceof v?r:n.animation(r,i,o,s);g(l,a,l.percents[0],null,a.attr());for(var c=0,u=ie.length;u>c;c++)if(ie[c].anim==e&&ie[c].el==t){ie[u-1].start=ie[c].start;break}return a},Yt.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},v.prototype.delay=function(t){var e=new v(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},v.prototype.repeat=function(t){var e=new v(this.anim,this.ms);return e.del=this.del,e.times=F.floor(I(t,0))||1,e},n.animation=function(t,e,r,i){if(t instanceof v)return t;(n.is(r,"function")||!r)&&(i=i||r||null,r=null),t=Object(t),e=+e||0;var o,s,a={};for(s in t)t[C](s)&&Z(s)!=s&&Z(s)+"%"!=s&&(o=!0,a[s]=t[s]);if(o)return r&&(a.easing=r),i&&(a.callback=i),new v({100:a},e);if(i){var l=0;for(var c in t){var u=Q(c);t[C](c)&&u>l&&(l=u)}!t[l+="%"].callback&&(t[l].callback=i)}return new v(t,e)},Yt.animate=function(t,e,r,i){var o=this;if(o.removed)return i&&i.call(o),o;var s=t instanceof v?t:n.animation(t,e,r,i);return g(s,o,s.percents[0],null,o.attr()),o},Yt.setTime=function(t,e){return t&&null!=e&&this.status(t,H(e,t.ms)/t.ms),this},Yt.status=function(t,e){var n,r,i=[],o=0;if(null!=e)return g(t,this,-1,H(e,1)),this;for(n=ie.length;n>o;o++)if((r=ie[o]).el.id==this.id&&(!t||r.anim==t)){if(t)return r.status;i.push({anim:r.anim,status:r.status})}return t?0:i},Yt.pause=function(t){for(var n=0;ne;e++)!t[e]||t[e].constructor!=Yt.constructor&&t[e].constructor!=le||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},ce=le.prototype;for(var ue in ce.push=function(){for(var t,e,n=0,r=arguments.length;r>n;n++)!(t=arguments[n])||t.constructor!=Yt.constructor&&t.constructor!=le||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},ce.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},ce.forEach=function(t,e){for(var n=0,r=this.items.length;r>n;n++)if(!1===t.call(e,this.items[n],n))return this;return this},Yt)Yt[C](ue)&&(ce[ue]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t][L](n,e)})}}(ue));return ce.attr=function(t,e){if(t&&n.is(t,V)&&n.is(t[0],"object"))for(var r=0,i=t.length;i>r;r++)this.items[r].attr(t[r]);else for(var o=0,s=this.items.length;s>o;o++)this.items[o].attr(t,e);return this},ce.clear=function(){for(;this.length;)this.pop()},ce.splice=function(t,e){t=0>t?I(this.length+t,0):t,e=I(0,H(this.length-t,e));var n,r=[],i=[],o=[];for(n=2;nn;n++)i.push(this[t+n]);for(;nn?o[n]:r[n-s];for(n=this.items.length=this.length-=e-s;this[n];)delete this[n++];return new le(i)},ce.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0},ce.animate=function(t,e,r,i){(n.is(r,"function")||!r)&&(i=r||null);var o,s,a=this.items.length,l=a,c=this;if(!a)return this;i&&(s=function(){!--a&&i.call(c)}),r=n.is(r,q)?r:s;var u=n.animation(t,e,r,s);for(o=this.items[--l].animate(u);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(o,u,u),this.items[l]&&!this.items[l].removed||a--;return this},ce.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},ce.getBBox=function(){for(var t=[],e=[],n=[],r=[],i=this.items.length;i--;)if(!this.items[i].removed){var o=this.items[i].getBBox();t.push(o.x),e.push(o.y),n.push(o.x+o.width),r.push(o.y+o.height)}return{x:t=H[L](0,t),y:e=H[L](0,e),x2:n=I[L](0,n),y2:r=I[L](0,r),width:n-t,height:r-e}},ce.clone=function(t){t=this.paper.set();for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},ce.toString=function(){return"Raphaël‘s set"},ce.glow=function(t){var e=this.paper.set();return this.forEach(function(n){var r=n.glow(t);null!=r&&r.forEach(function(t){e.push(t)})}),e},ce.isPointInside=function(t,e){var n=!1;return this.forEach(function(r){return r.isPointInside(t,e)?(n=!0,!1):void 0}),n},n.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},n=t.face["font-family"];for(var r in t.face)t.face[C](r)&&(e.face[r]=t.face[r]);if(this.fonts[n]?this.fonts[n].push(e):this.fonts[n]=[e],!t.svg)for(var i in e.face["units-per-em"]=Q(t.face["units-per-em"],10),t.glyphs)if(t.glyphs[C](i)){var o=t.glyphs[i];if(e.glyphs[i]={w:o.w,k:{},d:o.d&&"M"+o.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},o.k)for(var s in o.k)o[C](s)&&(e.glyphs[i].k[s]=o.k[s])}return t},x.getFont=function(t,e,r,i){if(i=i||"normal",r=r||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,n.fonts){var o,s=n.fonts[t];if(!s){var a=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,E)+"(\\s|$)","i");for(var l in n.fonts)if(n.fonts[C](l)&&a.test(l)){s=n.fonts[l];break}}if(s)for(var c=0,u=s.length;u>c&&((o=s[c]).face["font-weight"]!=e||o.face["font-style"]!=r&&o.face["font-style"]||o.face["font-stretch"]!=i);c++);return o}},x.print=function(t,e,r,i,o,s,a,l){s=s||"middle",a=I(H(a||0,1),-1),l=I(H(l||1,3),1);var c,u=O(r)[D](E),h=0,f=0,d=E;if(n.is(i,"string")&&(i=this.getFont(i)),i){c=(o||16)/i.face["units-per-em"];for(var p=i.face.bbox[D](b),v=+p[0],g=p[3]-p[1],m=0,y=+p[1]+("baseline"==s?g+ +i.face.descent:g/2),x=0,w=u.length;w>x;x++){if("\n"==u[x])h=0,C=0,f=0,m+=g*l;else{var k=f&&i.glyphs[u[x-1]]||{},C=i.glyphs[u[x]];h+=f?(k.w||i.w)+(k.k&&k.k[u[x]]||0)+i.w*a:0,f=1}C&&C.d&&(d+=n.transformPath(C.d,["t",h*c,m*c,"s",c,c,v,y,"t",(t-v)/c,(e-y)/c]))}}return this.path(d).attr({fill:"#000",stroke:"none"})},x.add=function(t){if(n.is(t,"array"))for(var e,r=this.set(),i=0,o=t.length;o>i;i++)e=t[i]||{},w[C](e.type)&&r.push(this[e.type]().attr(e));return r},n.format=function(t,e){var r=n.is(e,V)?[0][M](e):arguments;return t&&n.is(t,q)&&r.length-1&&(t=t.replace(k,function(t,e){return null==r[++e]?E:r[e]})),t||E},n.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(t,n,r){var i=r;return n.replace(e,function(t,e,n,r,o){e=e||r,i&&(e in i&&(i=i[e]),"function"==typeof i&&o&&(i=i()))}),i=(null==i||i==r?t:i)+""};return function(e,r){return String(e).replace(t,function(t,e){return n(t,e,r)})}}(),n.ninja=function(){return S.was?_.win.Raphael=S.is:delete Raphael,n},n.st=ce,e.on("raphael.DOMload",function(){y=!0}),function(t,e,r){null==t.readyState&&t.addEventListener&&(t.addEventListener(e,r=function(){t.removeEventListener(e,r,!1),t.readyState="complete"},!1),t.readyState="loading"),function e(){/in/.test(t.readyState)?setTimeout(e,9):n.eve("raphael.DOMload")}()}(document,"DOMContentLoaded"),function(){if(n.svg){var t="hasOwnProperty",e=String,r=parseFloat,i=parseInt,o=Math,s=o.max,a=o.abs,l=o.pow,c=/[, ]+/,u=n.eve,h="",f=" ",d="http://www.w3.org/1999/xlink",p={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},v={};n.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var g=function(r,i){if(i)for(var o in"string"==typeof r&&(r=g(r)),i)i[t](o)&&("xlink:"==o.substring(0,6)?r.setAttributeNS(d,o.substring(6),e(i[o])):r.setAttribute(o,e(i[o])));else(r=n._g.doc.createElementNS("http://www.w3.org/2000/svg",r)).style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},m=function(t,i){var c="linear",u=t.id+i,f=.5,d=.5,p=t.node,v=t.paper,m=p.style,y=n._g.doc.getElementById(u);if(!y){if(i=(i=e(i).replace(n._radial_gradient,function(t,e,n){if(c="radial",e&&n){f=r(e);var i=2*((d=r(n))>.5)-1;l(f-.5,2)+l(d-.5,2)>.25&&(d=o.sqrt(.25-l(f-.5,2))*i+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*i)}return h})).split(/\s*\-\s*/),"linear"==c){var x=i.shift();if(x=-r(x),isNaN(x))return null;var b=[0,0,o.cos(n.rad(x)),o.sin(n.rad(x))],w=1/(s(a(b[2]),a(b[3]))||1);b[2]*=w,b[3]*=w,b[2]<0&&(b[0]=-b[2],b[2]=0),b[3]<0&&(b[1]=-b[3],b[3]=0)}var k=n._parseDots(i);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&u!=t.gradient.id&&(v.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){y=g(c+"Gradient",{id:u}),t.gradient=y,g(y,"radial"==c?{fx:f,fy:d}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:t.matrix.invert()}),v.defs.appendChild(y);for(var C=0,_=k.length;_>C;C++)y.appendChild(g("stop",{offset:k[C].offset?k[C].offset:C?"100%":"0%","stop-color":k[C].color||"#fff"}))}}return g(p,{fill:"url("+document.location+"#"+u+")",opacity:1,"fill-opacity":1}),m.fill=h,m.opacity=1,m.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},x=function(r,i,o){if("path"==r.type){for(var s,a,l,c,u,f=e(i).toLowerCase().split("-"),d=r.paper,m=o?"end":"start",y=r.node,x=r.attrs,b=x["stroke-width"],w=f.length,k="classic",C=3,_=3,S=5;w--;)switch(f[w]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":k=f[w];break;case"wide":_=5;break;case"narrow":_=2;break;case"long":C=5;break;case"short":C=2}if("open"==k?(C+=2,_+=2,S+=2,l=1,c=o?4:1,u={fill:"none",stroke:x.stroke}):(c=l=C/2,u={fill:x.stroke,stroke:"none"}),r._.arrows?o?(r._.arrows.endPath&&v[r._.arrows.endPath]--,r._.arrows.endMarker&&v[r._.arrows.endMarker]--):(r._.arrows.startPath&&v[r._.arrows.startPath]--,r._.arrows.startMarker&&v[r._.arrows.startMarker]--):r._.arrows={},"none"!=k){var T="raphael-marker-"+k,L="raphael-marker-"+m+k+C+_+"-obj"+r.id;n._g.doc.getElementById(T)?v[T]++:(d.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:p[k],id:T})),v[T]=1);var M,A=n._g.doc.getElementById(L);A?(v[L]++,M=A.getElementsByTagName("use")[0]):(A=g(g("marker"),{id:L,markerHeight:_,markerWidth:C,orient:"auto",refX:c,refY:_/2}),M=g(g("use"),{"xlink:href":"#"+T,transform:(o?"rotate(180 "+C/2+" "+_/2+") ":h)+"scale("+C/S+","+_/S+")","stroke-width":(1/((C/S+_/S)/2)).toFixed(4)}),A.appendChild(M),d.defs.appendChild(A),v[L]=1),g(M,u);var E=l*("diamond"!=k&&"oval"!=k);o?(s=r._.arrows.startdx*b||0,a=n.getTotalLength(x.path)-E*b):(s=E*b,a=n.getTotalLength(x.path)-(r._.arrows.enddx*b||0)),(u={})["marker-"+m]="url(#"+L+")",(a||s)&&(u.d=n.getSubpath(x.path,s,a)),g(y,u),r._.arrows[m+"Path"]=T,r._.arrows[m+"Marker"]=L,r._.arrows[m+"dx"]=E,r._.arrows[m+"Type"]=k,r._.arrows[m+"String"]=i}else o?(s=r._.arrows.startdx*b||0,a=n.getTotalLength(x.path)-s):(s=0,a=n.getTotalLength(x.path)-(r._.arrows.enddx*b||0)),r._.arrows[m+"Path"]&&g(y,{d:n.getSubpath(x.path,s,a)}),delete r._.arrows[m+"Path"],delete r._.arrows[m+"Marker"],delete r._.arrows[m+"dx"],delete r._.arrows[m+"Type"],delete r._.arrows[m+"String"];for(u in v)if(v[t](u)&&!v[u]){var N=n._g.doc.getElementById(u);N&&N.parentNode.removeChild(N)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},w=function(t,n,r){if(n=b[e(n).toLowerCase()]){for(var i=t.attrs["stroke-width"]||"1",o={round:i,square:i,butt:0}[t.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,s=[],a=n.length;a--;)s[a]=n[a]*i+(a%2?1:-1)*o;g(t.node,{"stroke-dasharray":s.join(",")})}},k=function(r,o){var l=r.node,u=r.attrs,f=l.style.visibility;for(var p in l.style.visibility="hidden",o)if(o[t](p)){if(!n._availableAttrs[t](p))continue;var v=o[p];switch(u[p]=v,p){case"blur":r.blur(v);break;case"title":var b=l.getElementsByTagName("title");if(b.length&&(b=b[0]))b.firstChild.nodeValue=v;else{b=g("title");var k=n._g.doc.createTextNode(v);b.appendChild(k),l.appendChild(b)}break;case"href":case"target":var _=l.parentNode;if("a"!=_.tagName.toLowerCase()){var S=g("a");_.insertBefore(S,l),S.appendChild(l),_=S}"target"==p?_.setAttributeNS(d,"show","blank"==v?"new":v):_.setAttributeNS(d,p,v);break;case"cursor":l.style.cursor=v;break;case"transform":r.transform(v);break;case"arrow-start":x(r,v);break;case"arrow-end":x(r,v,1);break;case"clip-rect":var T=e(v).split(c);if(4==T.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var L=g("clipPath"),M=g("rect");L.id=n.createUUID(),g(M,{x:T[0],y:T[1],width:T[2],height:T[3]}),L.appendChild(M),r.paper.defs.appendChild(L),g(l,{"clip-path":"url(#"+L.id+")"}),r.clip=M}if(!v){var A=l.getAttribute("clip-path");if(A){var E=n._g.doc.getElementById(A.replace(/(^url\(#|\)$)/g,h));E&&E.parentNode.removeChild(E),g(l,{"clip-path":h}),delete r.clip}}break;case"path":"path"==r.type&&(g(l,{d:v?u.path=n._pathToAbsolute(v):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1)));break;case"width":if(l.setAttribute(p,v),r._.dirty=1,!u.fx)break;p="x",v=u.x;case"x":u.fx&&(v=-u.x-(u.width||0));case"rx":if("rx"==p&&"rect"==r.type)break;case"cx":l.setAttribute(p,v),r.pattern&&y(r),r._.dirty=1;break;case"height":if(l.setAttribute(p,v),r._.dirty=1,!u.fy)break;p="y",v=u.y;case"y":u.fy&&(v=-u.y-(u.height||0));case"ry":if("ry"==p&&"rect"==r.type)break;case"cy":l.setAttribute(p,v),r.pattern&&y(r),r._.dirty=1;break;case"r":"rect"==r.type?g(l,{rx:v,ry:v}):l.setAttribute(p,v),r._.dirty=1;break;case"src":"image"==r.type&&l.setAttributeNS(d,"href",v);break;case"stroke-width":(1!=r._.sx||1!=r._.sy)&&(v/=s(a(r._.sx),a(r._.sy))||1),l.setAttribute(p,v),u["stroke-dasharray"]&&w(r,u["stroke-dasharray"],o),r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1));break;case"stroke-dasharray":w(r,v,o);break;case"fill":var N=e(v).match(n._ISURL);if(N){L=g("pattern");var O=g("image");L.id=n.createUUID(),g(L,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(O,{x:0,y:0,"xlink:href":N[1]}),L.appendChild(O),function(t){n._preload(N[1],function(){var e=this.offsetWidth,n=this.offsetHeight;g(t,{width:e,height:n}),g(O,{width:e,height:n}),r.paper.safari()})}(L),r.paper.defs.appendChild(L),g(l,{fill:"url(#"+L.id+")"}),r.pattern=L,r.pattern&&y(r);break}var D=n.getRGB(v);if(D.error){if(("circle"==r.type||"ellipse"==r.type||"r"!=e(v).charAt())&&m(r,v)){if("opacity"in u||"fill-opacity"in u){var B=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h));if(B){var j=B.getElementsByTagName("stop");g(j[j.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=v,u.fill="none";break}}else delete o.gradient,delete u.gradient,!n.is(u.opacity,"undefined")&&n.is(o.opacity,"undefined")&&g(l,{opacity:u.opacity}),!n.is(u["fill-opacity"],"undefined")&&n.is(o["fill-opacity"],"undefined")&&g(l,{"fill-opacity":u["fill-opacity"]});D[t]("opacity")&&g(l,{"fill-opacity":D.opacity>1?D.opacity/100:D.opacity});case"stroke":D=n.getRGB(v),l.setAttribute(p,D.hex),"stroke"==p&&D[t]("opacity")&&g(l,{"stroke-opacity":D.opacity>1?D.opacity/100:D.opacity}),"stroke"==p&&r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1));break;case"gradient":("circle"==r.type||"ellipse"==r.type||"r"!=e(v).charAt())&&m(r,v);break;case"opacity":u.gradient&&!u[t]("stroke-opacity")&&g(l,{"stroke-opacity":v>1?v/100:v});case"fill-opacity":if(u.gradient){(B=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,h)))&&(j=B.getElementsByTagName("stop"),g(j[j.length-1],{"stop-opacity":v}));break}default:"font-size"==p&&(v=i(v,10)+"px");var P=p.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[P]=v,r._.dirty=1,l.setAttribute(p,v)}}C(r,o),l.style.visibility=f},C=function(r,o){if("text"==r.type&&(o[t]("text")||o[t]("font")||o[t]("font-size")||o[t]("x")||o[t]("y"))){var s=r.attrs,a=r.node,l=a.firstChild?i(n._g.doc.defaultView.getComputedStyle(a.firstChild,h).getPropertyValue("font-size"),10):10;if(o[t]("text")){for(s.text=o.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,u=e(o.text).split("\n"),f=[],d=0,p=u.length;p>d;d++)c=g("tspan"),d&&g(c,{dy:1.2*l,x:s.x}),c.appendChild(n._g.doc.createTextNode(u[d])),a.appendChild(c),f[d]=c}else for(d=0,p=(f=a.getElementsByTagName("tspan")).length;p>d;d++)d?g(f[d],{dy:1.2*l,x:s.x}):g(f[0],{dy:0});g(a,{x:s.x,y:s.y}),r._.dirty=1;var v=r._getBBox(),m=s.y-(v.y+v.height/2);m&&n.is(m,"finite")&&g(f[0],{dy:m})}},_=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t};Element=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.matrix=n.matrix(),this.realPath=null,this.paper=e,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},Yt=n.el,Element.prototype=Yt,Yt.constructor=Element,n._engine.path=function(t,e){var n=g("path");e.canvas&&e.canvas.appendChild(n);var r=new Element(n,e);return r.type="path",k(r,{fill:"none",stroke:"#000",path:t}),r},Yt.rotate=function(t,n,i){if(this.removed)return this;if((t=e(t).split(c)).length-1&&(n=r(t[1]),i=r(t[2])),t=r(t[0]),null==i&&(n=i),null==n||null==i){var o=this.getBBox(1);n=o.x+o.width/2,i=o.y+o.height/2}return this.transform(this._.transform.concat([["r",t,n,i]])),this},Yt.scale=function(t,n,i,o){if(this.removed)return this;if((t=e(t).split(c)).length-1&&(n=r(t[1]),i=r(t[2]),o=r(t[3])),t=r(t[0]),null==n&&(n=t),null==o&&(i=o),null==i||null==o)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,n,i,o]])),this},Yt.translate=function(t,n){return this.removed?this:((t=e(t).split(c)).length-1&&(n=r(t[1])),t=r(t[0])||0,n=+n||0,this.transform(this._.transform.concat([["t",t,n]])),this)},Yt.transform=function(e){var r=this._;if(null==e)return r.transform;if(n._extractTransform(this,e),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&g(this.node,{transform:this.matrix}),1!=r.sx||1!=r.sy){var i=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},Yt.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},Yt.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},Yt.remove=function(){var t=_(this.node);if(!this.removed&&t.parentNode){var e=this.paper;for(var r in e.__set__&&e.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&e.defs.removeChild(this.gradient),n._tear(this,e),t.parentNode.removeChild(t),this.removeData(),this)this[r]="function"==typeof this[r]?n._removedFactory(r):null;this.removed=!0}},Yt._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,n=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(n=!0,e.display="");var r={};try{r=this.node.getBBox()}catch(t){r={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{r=r||{},n&&(e.display="none")}return t&&this.hide(),r},Yt.attr=function(e,r){if(this.removed)return this;if(null==e){var i={};for(var o in this.attrs)this.attrs[t](o)&&(i[o]=this.attrs[o]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&n.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==e)return this._.transform;for(var s=e.split(c),a={},l=0,h=s.length;h>l;l++)a[e=s[l]]=e in this.attrs?this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?this.paper.customAttributes[e].def:n._availableAttrs[e];return h-1?a:a[s[0]]}if(null==r&&n.is(e,"array")){for(a={},l=0,h=e.length;h>l;l++)a[e[l]]=this.attr(e[l]);return a}if(null!=r){var f={};f[e]=r}else null!=e&&n.is(e,"object")&&(f=e);for(var d in f)u("raphael.attr."+d+"."+this.id,this,f[d]);for(d in this.paper.customAttributes)if(this.paper.customAttributes[t](d)&&f[t](d)&&n.is(this.paper.customAttributes[d],"function")){var p=this.paper.customAttributes[d].apply(this,[].concat(f[d]));for(var v in this.attrs[d]=f[d],p)p[t](v)&&(f[v]=p[v])}return k(this,f),this},Yt.toFront=function(){if(this.removed)return this;var t=_(this.node);t.parentNode.appendChild(t);var e=this.paper;return e.top!=this&&n._tofront(this,e),this},Yt.toBack=function(){if(this.removed)return this;var t=_(this.node),e=t.parentNode;return e.insertBefore(t,e.firstChild),n._toback(this,this.paper),this.paper,this},Yt.insertAfter=function(t){if(this.removed||!t)return this;var e=_(this.node),r=_(t.node||t[t.length-1].node);return r.nextSibling?r.parentNode.insertBefore(e,r.nextSibling):r.parentNode.appendChild(e),n._insertafter(this,t,this.paper),this},Yt.insertBefore=function(t){if(this.removed||!t)return this;var e=_(this.node),r=_(t.node||t[0].node);return r.parentNode.insertBefore(e,r),n._insertbefore(this,t,this.paper),this},Yt.blur=function(t){var e=this;if(0!=+t){var r=g("filter"),i=g("feGaussianBlur");e.attrs.blur=t,r.id=n.createUUID(),g(i,{stdDeviation:+t||1.5}),r.appendChild(i),e.paper.defs.appendChild(r),e._blur=r,g(e.node,{filter:"url(#"+r.id+")"})}else e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter");return e},n._engine.circle=function(t,e,n,r){var i=g("circle");t.canvas&&t.canvas.appendChild(i);var o=new Element(i,t);return o.attrs={cx:e,cy:n,r:r,fill:"none",stroke:"#000"},o.type="circle",g(i,o.attrs),o},n._engine.rect=function(t,e,n,r,i,o){var s=g("rect");t.canvas&&t.canvas.appendChild(s);var a=new Element(s,t);return a.attrs={x:e,y:n,width:r,height:i,rx:o||0,ry:o||0,fill:"none",stroke:"#000"},a.type="rect",g(s,a.attrs),a},n._engine.ellipse=function(t,e,n,r,i){var o=g("ellipse");t.canvas&&t.canvas.appendChild(o);var s=new Element(o,t);return s.attrs={cx:e,cy:n,rx:r,ry:i,fill:"none",stroke:"#000"},s.type="ellipse",g(o,s.attrs),s},n._engine.image=function(t,e,n,r,i,o){var s=g("image");g(s,{x:n,y:r,width:i,height:o,preserveAspectRatio:"none"}),s.setAttributeNS(d,"href",e),t.canvas&&t.canvas.appendChild(s);var a=new Element(s,t);return a.attrs={x:n,y:r,width:i,height:o,src:e},a.type="image",a},n._engine.text=function(t,e,r,i){var o=g("text");t.canvas&&t.canvas.appendChild(o);var s=new Element(o,t);return s.attrs={x:e,y:r,"text-anchor":"middle",text:i,"font-family":n._availableAttrs["font-family"],"font-size":n._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",k(s,s.attrs),s},n._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t&&t.container,r=t.x,i=t.y,o=t.width,s=t.height;if(!e)throw new Error("SVG container not found.");var a,l=g("svg"),c="overflow:hidden;";return r=r||0,i=i||0,g(l,{height:s=s||342,version:1.1,width:o=o||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==e?(l.style.cssText=c+"position:absolute;left:"+r+"px;top:"+i+"px",n._g.doc.body.appendChild(l),a=1):(l.style.cssText=c+"position:relative",e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)),(e=new n._Paper).width=o,e.height=s,e.canvas=l,e.clear(),e._left=e._top=0,a&&(e.renderfix=function(){}),e.renderfix(),e},n._engine.setViewBox=function(t,e,n,r,i){u("raphael.setViewBox",this,this._viewBox,[t,e,n,r,i]);var o,a,l=this.getSize(),c=s(n/l.width,r/l.height),h=this.top,d=i?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(c=1),delete this._vbSize,o="0 0 "+this.width+f+this.height):(this._vbSize=c,o=t+f+e+f+n+f+r),g(this.canvas,{viewBox:o,preserveAspectRatio:d});c&&h;)a="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":a}),h._.dirty=1,h._.dirtyT=1,h=h.prev;return this._viewBox=[t,e,n,r,!!i],this},n.prototype.renderfix=function(){var t,e=this.canvas,n=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(n){t=e.createSVGMatrix()}var r=-t.e%1,i=-t.f%1;(r||i)&&(r&&(this._left=(this._left+r)%1,n.left=this._left+"px"),i&&(this._top=(this._top+i)%1,n.top=this._top+"px"))},n.prototype.clear=function(){n.eve("raphael.clear",this);for(var t=this.canvas;t.firstChild;)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(n._g.doc.createTextNode("Created with Raphaël "+n.version)),t.appendChild(this.desc),t.appendChild(this.defs=g("defs"))},n.prototype.remove=function(){for(var t in u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[t]="function"==typeof this[t]?n._removedFactory(t):null};var S=n.st;for(var T in Yt)Yt[t](T)&&!S[t](T)&&(S[T]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(T))}}(),function(){if(n.vml){var t="hasOwnProperty",e=String,r=parseFloat,i=Math,o=i.round,s=i.max,a=i.min,l=i.abs,c="fill",u=/[, ]+/,h=n.eve,f=" ",d="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},v=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,m=/-?[^,\s-]+/g,y="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",x=21600,b={path:1,rect:1,image:1},w={circle:1,ellipse:1},k=function(t){var r=/[ahqstv]/gi,i=n._pathToAbsolute;if(e(t).match(r)&&(i=n._path2curve),r=/[clmz]/g,i==n._pathToAbsolute&&!e(t).match(r)){var s=e(t).replace(v,function(t,e,n){var r=[],i="m"==e.toLowerCase(),s=p[e];return n.replace(m,function(t){i&&2==r.length&&(s+=r+p["m"==e?"l":"L"],r=[]),r.push(o(t*x))}),s+r});return s}var a,l,c=i(t);s=[];for(var u=0,h=c.length;h>u;u++){a=c[u],"z"==(l=c[u][0].toLowerCase())&&(l="x");for(var g=1,y=a.length;y>g;g++)l+=o(a[g]*x)+(g!=y-1?",":d);s.push(l)}return s.join(f)},C=function(t,e,r){var i=n.matrix();return i.rotate(-t,.5,.5),{dx:i.x(e,r),dy:i.y(e,r)}},_=function(t,e,n,r,i,o){var s=t._,a=t.matrix,u=s.fillpos,h=t.node,d=h.style,p=1,v="",g=x/e,m=x/n;if(d.visibility="hidden",e&&n){if(h.coordsize=l(g)+f+l(m),d.rotation=o*(0>e*n?-1:1),o){var y=C(o,r,i);r=y.dx,i=y.dy}if(0>e&&(v+="x"),0>n&&(v+=" y")&&(p=-1),d.flip=v,h.coordorigin=r*-g+f+i*-m,u||s.fillsize){var b=h.getElementsByTagName(c);b=b&&b[0],h.removeChild(b),u&&(y=C(o,a.x(u[0],u[1]),a.y(u[0],u[1])),b.position=y.dx*p+f+y.dy*p),s.fillsize&&(b.size=s.fillsize[0]*l(e)+f+s.fillsize[1]*l(n)),h.appendChild(b)}d.visibility="visible"}};n.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S,T=function(t,n,r){for(var i=e(n).toLowerCase().split("-"),o=r?"end":"start",s=i.length,a="classic",l="medium",c="medium";s--;)switch(i[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=i[s];break;case"wide":case"narrow":c=i[s];break;case"long":case"short":l=i[s]}var u=t.node.getElementsByTagName("stroke")[0];u[o+"arrow"]=a,u[o+"arrowlength"]=l,u[o+"arrowwidth"]=c},L=function(i,l){i.attrs=i.attrs||{};var h=i.node,p=i.attrs,v=h.style,g=b[i.type]&&(l.x!=p.x||l.y!=p.y||l.width!=p.width||l.height!=p.height||l.cx!=p.cx||l.cy!=p.cy||l.rx!=p.rx||l.ry!=p.ry||l.r!=p.r),m=w[i.type]&&(p.cx!=l.cx||p.cy!=l.cy||p.r!=l.r||p.rx!=l.rx||p.ry!=l.ry),y=i;for(var C in l)l[t](C)&&(p[C]=l[C]);if(g&&(p.path=n._getPath[i.type](i),i._.dirty=1),l.href&&(h.href=l.href),l.title&&(h.title=l.title),l.target&&(h.target=l.target),l.cursor&&(v.cursor=l.cursor),"blur"in l&&i.blur(l.blur),(l.path&&"path"==i.type||g)&&(h.path=k(~e(p.path).toLowerCase().indexOf("r")?n._pathToAbsolute(p.path):p.path),i._.dirty=1,"image"==i.type&&(i._.fillpos=[p.x,p.y],i._.fillsize=[p.width,p.height],_(i,1,1,0,0,0))),"transform"in l&&i.transform(l.transform),m){var L=+p.cx,A=+p.cy,E=+p.rx||+p.r||0,N=+p.ry||+p.r||0;h.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",o((L-E)*x),o((A-N)*x),o((L+E)*x),o((A+N)*x),o(L*x)),i._.dirty=1}if("clip-rect"in l){var O=e(l["clip-rect"]).split(u);if(4==O.length){O[2]=+O[2]+ +O[0],O[3]=+O[3]+ +O[1];var D=h.clipRect||n._g.doc.createElement("div"),B=D.style;B.clip=n.format("rect({1}px {2}px {3}px {0}px)",O),h.clipRect||(B.position="absolute",B.top=0,B.left=0,B.width=i.paper.width+"px",B.height=i.paper.height+"px",h.parentNode.insertBefore(D,h),D.appendChild(h),h.clipRect=D)}l["clip-rect"]||h.clipRect&&(h.clipRect.style.clip="auto")}if(i.textpath){var j=i.textpath.style;l.font&&(j.font=l.font),l["font-family"]&&(j.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),l["font-size"]&&(j.fontSize=l["font-size"]),l["font-weight"]&&(j.fontWeight=l["font-weight"]),l["font-style"]&&(j.fontStyle=l["font-style"])}if("arrow-start"in l&&T(y,l["arrow-start"]),"arrow-end"in l&&T(y,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var P=h.getElementsByTagName(c);if(!(P=P&&P[0])&&(P=S(c)),"image"==i.type&&l.src&&(P.src=l.src),l.fill&&(P.on=!0),(null==P.on||"none"==l.fill||null===l.fill)&&(P.on=!1),P.on&&l.fill){var F=e(l.fill).match(n._ISURL);if(F){P.parentNode==h&&h.removeChild(P),P.rotate=!0,P.src=F[1],P.type="tile";var I=i.getBBox(1);P.position=I.x+f+I.y,i._.fillpos=[I.x,I.y],n._preload(F[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else P.color=n.getRGB(l.fill).hex,P.src=d,P.type="solid",n.getRGB(l.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=e(l.fill).charAt())&&M(y,l.fill,P)&&(p.fill="none",p.gradient=l.fill,P.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var H=((+p["fill-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+n.getRGB(l.fill).o+1||2)-1);H=a(s(H,0),1),P.opacity=H,P.src&&(P.color="none")}h.appendChild(P);var R=h.getElementsByTagName("stroke")&&h.getElementsByTagName("stroke")[0],W=!1;!R&&(W=R=S("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(R.on=!0),("none"==l.stroke||null===l.stroke||null==R.on||0==l.stroke||0==l["stroke-width"])&&(R.on=!1);var z=n.getRGB(l.stroke);R.on&&l.stroke&&(R.color=z.hex),H=((+p["stroke-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+z.o+1||2)-1);var $=.75*(r(l["stroke-width"])||1);if(H=a(s(H,0),1),null==l["stroke-width"]&&($=p["stroke-width"]),l["stroke-width"]&&(R.weight=$),$&&1>$&&(H*=$)&&(R.weight=1),R.opacity=H,l["stroke-linejoin"]&&(R.joinstyle=l["stroke-linejoin"]||"miter"),R.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(R.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var q={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=q[t](l["stroke-dasharray"])?q[l["stroke-dasharray"]]:d}W&&h.appendChild(R)}if("text"==y.type){y.paper.canvas.style.display=d;var V=y.paper.span,U=p.font&&p.font.match(/\d+(?:\.\d*)?(?=px)/);v=V.style,p.font&&(v.font=p.font),p["font-family"]&&(v.fontFamily=p["font-family"]),p["font-weight"]&&(v.fontWeight=p["font-weight"]),p["font-style"]&&(v.fontStyle=p["font-style"]),U=r(p["font-size"]||U&&U[0])||10,v.fontSize=100*U+"px",y.textpath.string&&(V.innerHTML=e(y.textpath.string).replace(/"));var X=V.getBoundingClientRect();y.W=p.w=(X.right-X.left)/100,y.H=p.h=(X.bottom-X.top)/100,y.X=p.x,y.Y=p.y+y.H/2,("x"in l||"y"in l)&&(y.path.v=n.format("m{0},{1}l{2},{1}",o(p.x*x),o(p.y*x),o(p.x*x)+1));for(var G=["x","y","text","font","font-family","font-weight","font-style","font-size"],Y=0,K=G.length;K>Y;Y++)if(G[Y]in l){y._.dirty=1;break}switch(p["text-anchor"]){case"start":y.textpath.style["v-text-align"]="left",y.bbx=y.W/2;break;case"end":y.textpath.style["v-text-align"]="right",y.bbx=-y.W/2;break;default:y.textpath.style["v-text-align"]="center",y.bbx=0}y.textpath.style["v-text-kern"]=!0}},M=function(t,o,s){t.attrs=t.attrs||{};var a=(t.attrs,Math.pow),l="linear",c=".5 .5";if(t.attrs.gradient=o,o=(o=e(o).replace(n._radial_gradient,function(t,e,n){return l="radial",e&&n&&(e=r(e),n=r(n),a(e-.5,2)+a(n-.5,2)>.25&&(n=i.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),c=e+f+n),d})).split(/\s*\-\s*/),"linear"==l){var u=o.shift();if(u=-r(u),isNaN(u))return null}var h=n._parseDots(o);if(!h)return null;if(t=t.shape||t.node,h.length){t.removeChild(s),s.on=!0,s.method="none",s.color=h[0].color,s.color2=h[h.length-1].color;for(var p=[],v=0,g=h.length;g>v;v++)h[v].offset&&p.push(h[v].offset+f+h[v].color);s.colors=p.length?p.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=c,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),t.appendChild(s)}return 1},A=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=e,this.matrix=n.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},E=n.el;A.prototype=E,E.constructor=A,E.transform=function(t){if(null==t)return this._.transform;var r,i=this.paper._viewBoxShift,o=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d;i&&(r=t=e(t).replace(/\.{3}|\u2026/g,this._.transform||d)),n._extractTransform(this,o+t);var s,a=this.matrix.clone(),l=this.skew,c=this.node,u=~e(this.attrs.fill).indexOf("-"),h=!e(this.attrs.fill).indexOf("url(");if(a.translate(1,1),h||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=a.split(),u&&s.noRotation||!s.isSimple){c.style.filter=a.toFilter();var p=this.getBBox(),v=this.getBBox(1),g=p.x-v.x,m=p.y-v.y;c.coordorigin=g*-x+f+m*-x,_(this,1,1,g,m,0)}else c.style.filter=d,_(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else c.style.filter=d,l.matrix=e(a),l.offset=a.offset();return null!==r&&(this._.transform=r,n._extractTransform(this,r)),this},E.rotate=function(t,n,i){if(this.removed)return this;if(null!=t){if((t=e(t).split(u)).length-1&&(n=r(t[1]),i=r(t[2])),t=r(t[0]),null==i&&(n=i),null==n||null==i){var o=this.getBBox(1);n=o.x+o.width/2,i=o.y+o.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,n,i]])),this}},E.translate=function(t,n){return this.removed?this:((t=e(t).split(u)).length-1&&(n=r(t[1])),t=r(t[0])||0,n=+n||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=n),this.transform(this._.transform.concat([["t",t,n]])),this)},E.scale=function(t,n,i,o){if(this.removed)return this;if((t=e(t).split(u)).length-1&&(n=r(t[1]),i=r(t[2]),o=r(t[3]),isNaN(i)&&(i=null),isNaN(o)&&(o=null)),t=r(t[0]),null==n&&(n=t),null==o&&(i=o),null==i||null==o)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,n,i,o]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=d),this},E.auxGetBBox=n.el.getBBox,E.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},n=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=n,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=n,e.width=t.width*n,e.height=t.height*n,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},E._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){for(var t in this.paper.__set__&&this.paper.__set__.exclude(this),n.eve.unbind("raphael.*.*."+this.id),n._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;this.removed=!0}},E.attr=function(e,r){if(this.removed)return this;if(null==e){var i={};for(var o in this.attrs)this.attrs[t](o)&&(i[o]=this.attrs[o]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&n.is(e,"string")){if(e==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=e.split(u),a={},l=0,f=s.length;f>l;l++)a[e=s[l]]=e in this.attrs?this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?this.paper.customAttributes[e].def:n._availableAttrs[e];return f-1?a:a[s[0]]}if(this.attrs&&null==r&&n.is(e,"array")){for(a={},l=0,f=e.length;f>l;l++)a[e[l]]=this.attr(e[l]);return a}var d;for(var p in null!=r&&((d={})[e]=r),null==r&&n.is(e,"object")&&(d=e),d)h("raphael.attr."+p+"."+this.id,this,d[p]);if(d){for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&d[t](p)&&n.is(this.paper.customAttributes[p],"function")){var v=this.paper.customAttributes[p].apply(this,[].concat(d[p]));for(var g in this.attrs[p]=d[p],v)v[t](g)&&(d[g]=v[g])}d.text&&"text"==this.type&&(this.textpath.string=d.text),L(this,d)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper)),this)},E.insertAfter=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this)},E.insertBefore=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),n._insertbefore(this,t,this.paper),this)},E.blur=function(t){var e=this.node.runtimeStyle,r=e.filter;return r=r.replace(g,d),0!=+t?(this.attrs.blur=t,e.filter=r+f+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+t||1.5)+")",e.margin=n.format("-{0}px 0 0 -{0}px",o(+t||1.5))):(e.filter=r,e.margin=0,delete this.attrs.blur),this},n._engine.path=function(t,e){var n=S("shape");n.style.cssText=y,n.coordsize=x+f+x,n.coordorigin=e.coordorigin;var r=new A(n,e),i={fill:"none",stroke:"#000"};t&&(i.path=t),r.type="path",r.path=[],r.Path=d,L(r,i),e.canvas.appendChild(n);var o=S("skew");return o.on=!0,n.appendChild(o),r.skew=o,r.transform(d),r},n._engine.rect=function(t,e,r,i,o,s){var a=n._rectPath(e,r,i,o,s),l=t.path(a),c=l.attrs;return l.X=c.x=e,l.Y=c.y=r,l.W=c.width=i,l.H=c.height=o,c.r=s,c.path=a,l.type="rect",l},n._engine.ellipse=function(t,e,n,r,i){var o=t.path();return o.attrs,o.X=e-r,o.Y=n-i,o.W=2*r,o.H=2*i,o.type="ellipse",L(o,{cx:e,cy:n,rx:r,ry:i}),o},n._engine.circle=function(t,e,n,r){var i=t.path();return i.attrs,i.X=e-r,i.Y=n-r,i.W=i.H=2*r,i.type="circle",L(i,{cx:e,cy:n,r:r}),i},n._engine.image=function(t,e,r,i,o,s){var a=n._rectPath(r,i,o,s),l=t.path(a).attr({stroke:"none"}),u=l.attrs,h=l.node,f=h.getElementsByTagName(c)[0];return u.src=e,l.X=u.x=r,l.Y=u.y=i,l.W=u.width=o,l.H=u.height=s,u.path=a,l.type="image",f.parentNode==h&&h.removeChild(f),f.rotate=!0,f.src=e,f.type="tile",l._.fillpos=[r,i],l._.fillsize=[o,s],h.appendChild(f),_(l,1,1,0,0,0),l},n._engine.text=function(t,r,i,s){var a=S("shape"),l=S("path"),c=S("textpath");r=r||0,i=i||0,s=s||"",l.v=n.format("m{0},{1}l{2},{1}",o(r*x),o(i*x),o(r*x)+1),l.textpathok=!0,c.string=e(s),c.on=!0,a.style.cssText=y,a.coordsize=x+f+x,a.coordorigin="0 0";var u=new A(a,t),h={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:s};u.shape=a,u.path=l,u.textpath=c,u.type="text",u.attrs.text=e(s),u.attrs.x=r,u.attrs.y=i,u.attrs.w=1,u.attrs.h=1,L(u,h),a.appendChild(c),a.appendChild(l),t.canvas.appendChild(a);var p=S("skew");return p.on=!0,a.appendChild(p),u.skew=p,u.transform(d),u},n._engine.setSize=function(t,e){var r=this.canvas.style;return this.width=t,this.height=e,t==+t&&(t+="px"),e==+e&&(e+="px"),r.width=t,r.height=e,r.clip="rect(0 "+t+" "+e+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this},n._engine.setViewBox=function(t,e,r,i,o){n.eve("raphael.setViewBox",this,this._viewBox,[t,e,r,i,o]);var s,a,l=this.getSize(),c=l.width,u=l.height;return o&&(c>r*(s=u/i)&&(t-=(c-r*s)/2/s),u>i*(a=c/r)&&(e-=(u-i*a)/2/a)),this._viewBox=[t,e,r,i,!!o],this._viewBoxShift={dx:-t,dy:-e,scale:size},this.forEach(function(t){t.transform("...")}),this},n._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),S=function(t){return e.createElement("')}}catch(t){S=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},n._engine.initWin(n._g.win),n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t.container,r=t.height,i=t.width,o=t.x,s=t.y;if(!e)throw new Error("VML container not found.");var a=new n._Paper,l=a.canvas=n._g.doc.createElement("div"),c=l.style;return o=o||0,s=s||0,i=i||512,r=r||342,a.width=i,a.height=r,i==+i&&(i+="px"),r==+r&&(r+="px"),a.coordsize=216e5+f+216e5,a.coordorigin="0 0",a.span=n._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),c.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,r),1==e?(n._g.doc.body.appendChild(l),c.left=o+"px",c.top=s+"px",c.position="absolute"):e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l),a.renderfix=function(){},a},n.prototype.clear=function(){n.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=n._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},n.prototype.remove=function(){for(var t in n.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;return!0};var N=n.st;for(var O in E)E[t](O)&&!N[t](O)&&(N[O]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(O))}}(),S.was?_.win.Raphael=n:Raphael=n,"object"==typeof exports&&(module.exports=n),n}),function(){"use strict";function t(){this.title=void 0,this.actors=[],this.signals=[]}function e(t,e){_.extend(this,e),this.name="ParseError",this.message=t||""}t.prototype.getActor=function(e){var n=/^(.+) as (\S+)$/i.exec(e.trim());n?(name=n[1].trim(),e=n[2].trim()):name=e.trim(),name=name.replace(/\\n/gm,"\n");var r,i=this.actors;for(r in i)if(i[r].alias==e)return i[r];return i[(r=i.push(new t.Actor(e,name,i.length)))-1]},t.prototype.setTitle=function(t){this.title=t},t.prototype.addSignal=function(t){this.signals.push(t)},t.Actor=function(t,e,n){this.alias=t,this.name=e,this.index=n},t.Signal=function(t,e,n,r){this.type="Signal",this.actorA=t,this.actorB=n,this.linetype=3&e,this.arrowtype=3&e>>2,this.message=r},t.Signal.prototype.isSelf=function(){return this.actorA.index==this.actorB.index},t.Note=function(t,e,n){if(this.type="Note",this.actor=t,this.placement=e,this.message=n,this.hasManyActors()&&t[0]==t[1])throw new Error("Note should be over two different actors")},t.Note.prototype.hasManyActors=function(){return _.isArray(this.actor)},t.LINETYPE={SOLID:0,DOTTED:1},t.ARROWTYPE={FILLED:0,OPEN:1},t.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2};var n=function(){function e(){this.yy={}}var n={trace:function(){},yy:{},symbols_:{error:2,start:3,document:4,EOF:5,line:6,statement:7,NL:8,participant:9,actor:10,signal:11,note_statement:12,title:13,message:14,note:15,placement:16,over:17,actor_pair:18,",":19,left_of:20,right_of:21,signaltype:22,ACTOR:23,linetype:24,arrowtype:25,LINE:26,DOTLINE:27,ARROW:28,OPENARROW:29,MESSAGE:30,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"NL",9:"participant",13:"title",15:"note",17:"over",19:",",20:"left_of",21:"right_of",23:"ACTOR",26:"LINE",27:"DOTLINE",28:"ARROW",29:"OPENARROW",30:"MESSAGE"},productions_:[0,[3,2],[4,0],[4,2],[6,1],[6,1],[7,2],[7,1],[7,1],[7,2],[12,4],[12,4],[18,1],[18,3],[16,1],[16,1],[11,4],[10,1],[22,2],[22,1],[24,1],[24,1],[25,1],[25,1],[14,1]],performAction:function(e,n,r,i,o,s){var a=s.length-1;switch(o){case 1:return i;case 4:break;case 6:s[a];break;case 7:case 8:i.addSignal(s[a]);break;case 9:i.setTitle(s[a]);break;case 10:this.$=new t.Note(s[a-1],s[a-2],s[a]);break;case 11:this.$=new t.Note(s[a-1],t.PLACEMENT.OVER,s[a]);break;case 12:this.$=s[a];break;case 13:this.$=[s[a-2],s[a]];break;case 14:this.$=t.PLACEMENT.LEFTOF;break;case 15:this.$=t.PLACEMENT.RIGHTOF;break;case 16:this.$=new t.Signal(s[a-3],s[a-2],s[a-1],s[a]);break;case 17:this.$=i.getActor(s[a]);break;case 18:this.$=s[a-1]|s[a]<<2;break;case 19:this.$=s[a];break;case 20:this.$=t.LINETYPE.SOLID;break;case 21:this.$=t.LINETYPE.DOTTED;break;case 22:this.$=t.ARROWTYPE.FILLED;break;case 23:this.$=t.ARROWTYPE.OPEN;break;case 24:this.$=s[a].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:2,5:[2,2],8:[2,2],9:[2,2],13:[2,2],15:[2,2],23:[2,2]},{1:[3]},{5:[1,3],6:4,7:5,8:[1,6],9:[1,7],10:11,11:8,12:9,13:[1,10],15:[1,12],23:[1,13]},{1:[2,1]},{5:[2,3],8:[2,3],9:[2,3],13:[2,3],15:[2,3],23:[2,3]},{5:[2,4],8:[2,4],9:[2,4],13:[2,4],15:[2,4],23:[2,4]},{5:[2,5],8:[2,5],9:[2,5],13:[2,5],15:[2,5],23:[2,5]},{10:14,23:[1,13]},{5:[2,7],8:[2,7],9:[2,7],13:[2,7],15:[2,7],23:[2,7]},{5:[2,8],8:[2,8],9:[2,8],13:[2,8],15:[2,8],23:[2,8]},{14:15,30:[1,16]},{22:17,24:18,26:[1,19],27:[1,20]},{16:21,17:[1,22],20:[1,23],21:[1,24]},{5:[2,17],8:[2,17],9:[2,17],13:[2,17],15:[2,17],19:[2,17],23:[2,17],26:[2,17],27:[2,17],30:[2,17]},{5:[2,6],8:[2,6],9:[2,6],13:[2,6],15:[2,6],23:[2,6]},{5:[2,9],8:[2,9],9:[2,9],13:[2,9],15:[2,9],23:[2,9]},{5:[2,24],8:[2,24],9:[2,24],13:[2,24],15:[2,24],23:[2,24]},{10:25,23:[1,13]},{23:[2,19],25:26,28:[1,27],29:[1,28]},{23:[2,20],28:[2,20],29:[2,20]},{23:[2,21],28:[2,21],29:[2,21]},{10:29,23:[1,13]},{10:31,18:30,23:[1,13]},{23:[2,14]},{23:[2,15]},{14:32,30:[1,16]},{23:[2,18]},{23:[2,22]},{23:[2,23]},{14:33,30:[1,16]},{14:34,30:[1,16]},{19:[1,35],30:[2,12]},{5:[2,16],8:[2,16],9:[2,16],13:[2,16],15:[2,16],23:[2,16]},{5:[2,10],8:[2,10],9:[2,10],13:[2,10],15:[2,10],23:[2,10]},{5:[2,11],8:[2,11],9:[2,11],13:[2,11],15:[2,11],23:[2,11]},{10:36,23:[1,13]},{30:[2,13]}],defaultActions:{3:[2,1],23:[2,14],24:[2,15],26:[2,18],27:[2,22],28:[2,23],36:[2,13]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,n=[0],r=[null],i=[],o=this.table,s="",a=0,l=0,c=0,u=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;i.push(h);var f,d=this.lexer.options&&this.lexer.options.ranges;this.parseError="function"==typeof this.yy.parseError?this.yy.parseError:Object.getPrototypeOf(this).parseError;for(var p,v,g,m,y,x,b,w,k,C={};;){if(g=n[n.length-1],this.defaultActions[g]?m=this.defaultActions[g]:(null==p&&(f=void 0,"number"!=typeof(f=e.lexer.lex()||u)&&(f=e.symbols_[f]||f),p=f),m=o[g]&&o[g][p]),void 0===m||!m.length||!m[0]){var _;for(x in k=[],o[g])this.terminals_[x]&&x>2&&k.push("'"+this.terminals_[x]+"'");_=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(a+1)+": Unexpected "+(p==u?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:h,expected:k})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+p);switch(m[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(m[1]),p=null,v?(p=v,v=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(b=this.productions_[m[1]][1],C.$=r[r.length-b],C._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(C._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),void 0!==(y=this.performAction.call(C,s,l,a,this.yy,m[1],r,i)))return y;b&&(n=n.slice(0,-2*b),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[m[1]][0]),r.push(C.$),i.push(C._$),w=o[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;oe[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 8;case 1:case 2:break;case 3:return 9;case 4:return 20;case 5:return 21;case 6:return 17;case 7:return 15;case 8:return 13;case 9:return 19;case 10:return 23;case 11:return 27;case 12:return 26;case 13:return 29;case 14:return 28;case 15:return 30;case 16:return 5;case 17:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:participant\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:,)/i,/^(?:[^\->:\n,]+)/i,/^(?:--)/i,/^(?:-)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:[^#\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};return n.lexer=r,e.prototype=n,n.Parser=e,new e}();"undefined"!=typeof require&&"undefined"!=typeof exports&&(exports.parser=n,exports.Parser=n.Parser,exports.parse=function(){return n.parse.apply(n,arguments)},exports.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var e=require("fs").readFileSync(require("path").normalize(t[1]),"utf8");return exports.parser.parse(e)},"undefined"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1))),e.prototype=new Error,t.ParseError=e,n.parseError=function(t,n){throw new e(t,n)},t.parse=function(e){return n.yy=new t,n.parse(e)},this.Diagram=t}.call(this),"undefined"!=typeof jQuery&&function(t){t.fn.sequenceDiagram=function(e){return this.each(function(){var n=t(this),r=Diagram.parse(n.text());n.html(""),r.drawSVG(this,e)})}}(jQuery),Raphael.registerFont({w:209,face:{"font-family":"daniel","font-weight":700,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 8 0 0 0 0 0 0 0",ascent:"288",descent:"-72","x-height":"7",bbox:"-92.0373 -310.134 632 184.967","underline-thickness":"3.51562","underline-position":"-21.6211","unicode-range":"U+0009-U+F002"},glyphs:{" ":{w:179},"\t":{w:179},"!":{d:"66,-306v9,3,18,11,19,24v-18,73,-20,111,-37,194v0,10,2,34,-12,34v-12,0,-18,-9,-18,-28v0,-85,23,-136,38,-214v1,-7,4,-10,10,-10xm25,-30v15,-1,28,34,5,35v-11,-1,-38,-36,-5,-35",w:115},'"':{d:"91,-214v-32,3,-25,-40,-20,-68v3,-16,7,-25,12,-27v35,13,14,56,8,95xm8,-231v4,-31,1,-40,18,-75v37,7,11,51,11,79v-3,3,-4,8,-5,13v-17,4,-16,-10,-24,-17",w:117},"#":{d:"271,-64v-30,26,-96,-7,-102,51v-6,2,-13,2,-24,-2v-2,-11,10,-21,2,-28v-14,5,-48,0,-48,22v0,23,-11,14,-29,10v-7,-6,6,-19,-1,-24r-32,4v-19,-8,-15,-24,5,-28r33,-6v4,0,24,-23,11,-27v-26,0,-63,14,-74,-10v3,-1,9,-17,16,-10v15,-8,81,4,89,-30v8,-14,16,-34,24,-38v23,9,24,38,5,49v37,24,55,-38,72,-43v19,10,20,23,-1,45v2,8,23,1,29,4v3,3,6,6,10,11v-14,13,-20,12,-45,12v-17,0,-16,17,-19,29v18,-7,49,3,67,-2v4,0,8,4,12,11xm161,-104v-30,-1,-44,10,-44,37v14,1,24,0,40,-5v0,-1,3,-10,8,-26v0,-4,-1,-6,-4,-6",w:285},$:{d:"164,-257v29,4,1,42,-3,50v5,5,38,13,41,24v8,4,6,15,-2,21v-18,3,-36,-17,-49,-17v-17,1,-31,40,-28,48v5,4,8,8,9,10v13,1,35,37,28,44v-10,21,-36,20,-65,28v-10,10,-12,40,-17,51v-9,-3,-28,1,-18,-17v0,-13,5,-24,-1,-35v-18,1,-59,-10,-42,-29v21,0,56,16,55,-16v5,-4,9,-18,9,-26v-14,-15,-55,-41,-53,-65v2,-33,56,-19,98,-26v10,-14,31,-43,38,-45xm93,-152v11,-10,15,-15,14,-29v-17,-3,-37,1,-43,6v10,12,20,19,29,23xm111,-103v-8,1,-11,12,-10,22v10,0,28,2,27,-8v0,-4,-13,-15,-17,-14",w:225},"%":{d:"181,-96v24,-7,67,-13,104,1v14,18,21,19,22,44v-13,43,-99,61,-146,36v-9,-9,-22,-11,-32,-29v0,-27,24,-53,52,-52xm139,-185v-9,68,-138,73,-131,-5v0,-3,3,-9,9,-17v13,1,27,1,17,-16v5,-39,63,0,93,-6v36,1,80,-9,102,11v15,32,12,32,-8,56v-16,21,-103,78,-152,125r-14,28v-23,11,-25,-7,-29,-20v34,-71,133,-98,171,-162v-13,-12,-52,-5,-61,1v0,1,1,3,3,5xm38,-190v0,34,55,29,70,8v0,-14,-20,-11,-32,-14v-14,-3,-24,-9,-40,-10v1,0,5,11,2,16xm172,-53v12,27,90,18,102,-5v-18,-7,-32,-10,-40,-10v-29,3,-57,-4,-62,15",w:308},"&":{d:"145,-82v17,-8,47,-15,71,-26v13,2,25,12,9,23v-23,7,-40,16,-53,27r0,6v13,8,30,21,36,38v0,8,-4,12,-11,12v-19,0,-43,-39,-59,-44v-30,12,-65,29,-97,32v-32,3,-45,-41,-23,-63v21,-20,52,-26,70,-48v-4,-31,-12,-47,9,-73v13,-16,20,-29,23,-39v15,-15,32,-22,51,-22v30,9,62,64,32,96v-2,3,-47,42,-69,48v-15,8,-11,9,0,22v6,7,10,11,11,11xm114,-138v25,-13,62,-38,74,-62v0,-9,-10,-31,-20,-29v-28,7,-60,42,-60,75v0,10,2,15,6,16xm99,-91v-18,10,-54,18,-59,45v26,5,61,-12,77,-22v-1,-5,-13,-23,-18,-23",w:253},"'":{d:"36,-182v-36,7,-34,-61,-17,-80v15,1,21,19,21,20r-1,-1v0,0,-1,12,-5,35v1,5,3,17,2,26",w:63},"(":{d:"130,-306v13,2,23,43,-1,43v-49,43,-77,77,-90,148v5,49,27,67,64,101v4,14,5,6,2,19r-15,0v-35,-17,-79,-58,-79,-120v0,-58,66,-176,119,-191",w:120},")":{d:"108,-138v-2,73,-48,120,-98,153v-17,-5,-16,-20,-6,-31v52,-64,73,-62,74,-135v1,-42,-40,-98,-58,-128v0,-5,-1,-12,-2,-22v18,-18,25,0,42,27v25,39,50,66,48,136",w:120},"*":{d:"121,-271v15,-5,36,-8,40,9v-5,10,-31,19,-47,31v0,11,34,43,14,53v-18,8,-24,-24,-34,-20v-4,10,-4,19,-12,41v-25,7,-15,-30,-17,-47v-13,-1,-17,9,-46,30r-10,0v-20,-32,37,-43,54,-64v-10,-11,-36,-33,-16,-51v3,0,14,8,33,24v8,-10,26,-39,32,-42v14,7,15,23,9,36",w:177},"+":{d:"163,-64v-7,22,-65,2,-77,21v-2,10,-6,21,-11,35v-20,4,-21,-12,-19,-29v3,-23,-44,6,-39,-27v-8,-22,36,-8,49,-18v8,-13,6,-36,24,-40v19,-4,14,32,11,39v18,3,19,2,54,8v2,1,5,5,8,11",w:170},",":{d:"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102",w:97},"-":{d:"57,-94v19,4,55,-5,54,17v-15,23,-54,20,-91,15v-4,2,-13,-10,-11,-16v-1,-22,28,-15,48,-16",w:124},".":{d:"40,-48v21,20,21,44,-4,44v-33,0,-26,-24,-10,-44r14,0",w:67},"/":{d:"21,20v-22,-45,21,-95,41,-126v38,-57,115,-158,193,-201v2,0,4,3,7,11v11,29,-15,34,-25,55v-81,56,-189,208,-197,261r-19,0",w:275},0:{d:"78,-237v70,-47,269,-41,270,59v0,34,-11,53,-29,76v-13,35,-30,32,-85,64v-6,2,-10,6,-7,8v-73,14,-98,38,-173,1v-7,-13,-52,-48,-46,-88v9,-57,27,-75,70,-120xm123,-38v100,0,202,-46,195,-153v-32,-55,-144,-73,-211,-35v-16,34,-68,54,-53,108v6,25,1,22,-3,39v6,24,41,41,72,41",w:353},1:{d:"39,-208v0,-14,6,-59,29,-39v3,4,6,13,10,24r-22,128r8,87v-4,6,-9,3,-16,2v-44,-38,-9,-137,-9,-202",w:93},2:{d:"88,-35v47,-10,119,-24,168,-9v0,12,-23,13,-35,16v1,1,3,1,5,1v-74,8,-118,23,-194,23v-14,0,-20,-13,-21,-28v55,-40,83,-61,123,-104v26,-13,65,-67,71,-102v-1,-9,-11,-16,-22,-16v-20,-1,-120,29,-156,49v-10,-2,-30,-20,-10,-28v50,-21,111,-51,178,-48v25,10,44,22,36,39v12,30,-19,64,-34,83v-39,48,-37,39,-115,109v0,5,-3,8,-8,11v4,3,8,4,14,4",w:265},3:{d:"188,-282v34,-10,74,25,47,51v-19,32,-55,50,-92,70v28,14,116,25,108,70v8,14,-49,40,-63,48v-29,9,-130,22,-168,42v-6,-5,-19,-7,-12,-22v56,-36,175,-21,210,-76v-9,-20,-88,-42,-97,-33v-20,-1,-41,2,-56,-7r5,-21v56,-25,103,-36,137,-78v1,-1,2,-5,4,-11v-15,-14,-56,7,-79,0v-10,9,-73,22,-92,31v-11,-4,-28,-23,-13,-30v50,-22,96,-26,154,-37v0,-1,8,3,7,3",w:260},4:{d:"79,-249v-7,17,-29,75,-33,96v0,6,3,8,8,8v43,-2,111,6,141,-6v17,-47,20,-100,63,-148v9,4,16,7,21,10v-17,31,-44,95,-51,141v7,4,24,-4,23,10v-1,16,-29,12,-31,23v-10,22,-9,69,-7,103v-3,2,-7,5,-10,9v-47,-11,-23,-74,-16,-114v0,-4,-2,-6,-7,-6v-65,2,-89,13,-162,4v-22,-22,-2,-53,5,-76v16,-15,17,-57,35,-70v6,-1,21,11,21,16",w:267},5:{d:"185,-272v30,7,45,-8,53,18v1,16,-17,18,-34,14v0,0,-95,-11,-129,1v-6,9,-24,33,-29,54v76,10,171,5,214,47v11,11,22,30,5,52v-14,12,-30,14,-34,27v-26,11,-141,63,-157,60v-16,-2,-25,-19,-4,-27v48,-18,128,-39,170,-86v4,-14,-65,-41,-85,-41r-92,0v-10,-4,-66,-1,-57,-23v0,-23,23,-51,35,-83v11,-28,133,-10,144,-13",w:284},6:{d:"70,-64v9,-51,63,-74,123,-71v43,2,109,3,111,41r-25,47v0,1,1,2,2,3v-5,0,-39,10,-41,20v-15,3,-22,4,-22,11v-39,1,-77,20,-119,13v-42,-7,-35,-9,-77,-46v-56,-118,94,-201,176,-229v7,0,21,8,20,15v-2,17,-23,15,-43,24v-69,31,-119,72,-134,145v-5,25,36,68,78,64v59,-6,128,-18,153,-61v-7,-14,-13,-9,-32,-21v-67,-15,-118,-5,-150,43r0,12v-13,4,-17,-3,-20,-10",w:310},7:{d:"37,-228v33,-14,173,-17,181,-19v28,-1,24,31,9,45v-17,15,-45,49,-59,69v-17,26,-55,67,-61,113v-10,13,-9,14,-14,20v-33,-13,-20,-25,-11,-53v16,-48,73,-115,109,-156v2,-7,5,-14,-10,-12v-26,4,-54,6,-76,13v-23,-5,-83,31,-94,-9v2,-8,18,-19,26,-11",w:245},8:{d:"57,-236v40,-50,166,-51,213,-10v22,28,10,63,-22,78r-35,17v8,5,54,24,53,44v-5,14,-4,33,-18,42v-13,13,-35,18,-44,34v-60,27,-190,49,-194,-42v7,-41,17,-54,59,-70r0,-4v-32,-9,-73,-62,-26,-85v4,0,8,-2,14,-4xm142,-160v24,-2,160,-31,99,-72v-28,-18,-108,-33,-146,-5v-16,12,-28,30,-33,59v24,12,37,20,80,18xm41,-62v30,65,189,6,199,-37v3,-14,-60,-30,-74,-30v-70,0,-118,10,-125,67",w:290},9:{d:"11,-192v15,-49,119,-61,161,-23v16,15,27,55,11,79v-20,62,-51,79,-96,118v-10,4,-45,27,-50,6v9,-15,66,-52,98,-99v-7,-7,-8,-3,-25,0v-49,-11,-96,-25,-99,-81xm145,-131v7,-5,13,-34,13,-41v-2,-51,-104,-38,-114,-6v-2,10,37,35,46,35v23,1,43,-1,55,12",w:198},":":{d:"39,-125v15,-8,40,-1,40,15v0,15,-6,22,-19,22v-13,0,-29,-21,-21,-37xm66,-17v-8,27,-51,19,-46,-8v-1,-6,8,-22,14,-20v29,0,30,6,32,28",w:95},";":{d:"56,-93v2,-30,37,-22,40,2v0,2,-1,7,-3,15v-13,8,-15,6,-27,4xm64,-44v11,-11,30,-4,32,14v-21,39,-63,71,-92,85v-5,0,-11,-2,-18,-8v11,-23,36,-36,50,-61v11,-7,19,-20,28,-30",w:107},"<":{d:"166,-202v12,0,29,15,24,29v0,4,-119,64,-120,73v15,21,89,64,91,86v2,29,-18,12,-30,15v-27,-29,-59,-54,-95,-75v-18,-10,-25,-13,-24,-41",w:176},"=":{d:"125,-121v18,7,55,-9,69,14v0,17,-45,26,-135,26v-18,0,-27,-7,-27,-21v-1,-37,60,-5,93,-19xm138,-71v20,0,48,-1,50,16v-13,24,-86,32,-131,29v-29,-2,-43,-10,-43,-24v-7,-23,36,-14,39,-17v27,6,57,-4,85,-4",w:196},">":{d:"4,-14v20,-48,77,-59,118,-94v-16,-19,-58,-52,-81,-75v-11,-7,-15,-38,-1,-40v33,16,83,71,121,105v26,23,-6,35,-41,53v-29,16,-56,28,-73,54v-21,15,-16,20,-34,15v-3,0,-9,-16,-9,-18",w:174},"?":{d:"105,-291v57,-13,107,-4,107,39v0,67,-136,85,-155,137v-1,6,10,23,-4,23v-23,1,-33,-35,-23,-57v31,-41,124,-60,149,-103v-8,-21,-72,-5,-88,-1v-23,6,-59,39,-71,8v0,0,-1,0,1,-17v10,-4,45,-20,84,-29xm80,-25v-6,4,-8,39,-24,22v-24,3,-22,-21,-13,-35v17,-7,29,5,37,13",w:216},"@":{d:"218,-207v23,8,42,14,47,37v44,68,-27,137,-87,85r1,0v0,2,-59,19,-61,17v-35,0,-42,-47,-17,-68r0,-4v-19,-1,-45,37,-49,40v-37,76,58,72,121,62v11,-2,34,-13,36,3v-14,31,-69,31,-114,33v-51,2,-99,-41,-80,-92v2,-30,22,-40,42,-63v35,-20,91,-53,161,-50xm217,-101v23,0,35,-19,35,-41v0,-43,-75,-41,-102,-19v36,3,55,16,62,41v-6,5,-6,19,5,19xm127,-110v8,5,51,-15,28,-16v-4,0,-25,4,-28,16",w:291},A:{d:"97,-81v-23,-10,-39,38,-52,60v-8,6,-8,6,-22,18v-22,-7,-23,-37,-4,-49v7,-8,11,-15,15,-23r-1,1v-14,-26,23,-29,31,-40v1,-1,15,-29,26,-36v17,-31,39,-58,54,-92v16,-20,20,-51,41,-66v29,5,34,62,45,92v9,64,21,103,49,155v-3,25,-44,11,-54,0v-34,-12,-97,-29,-128,-20xm107,-118v20,6,80,10,111,17v6,-7,-4,-15,-7,-24v-11,-28,-9,-92,-30,-117v-9,9,-19,44,-34,55v-9,23,-27,40,-40,69",w:294},B:{d:"256,-179v41,10,115,34,91,91v-6,3,-14,12,-19,20v-37,19,-50,34,-63,25v-9,10,-12,11,-34,13r3,-3v-4,-4,-12,-4,-18,0v0,0,2,2,5,4v-21,14,-26,6,-44,15v-4,0,-7,-2,-8,-5v-6,11,-20,-5,-18,11v-36,4,-91,35,-114,4v-7,-62,-10,-138,4,-199v-1,-19,-37,2,-37,-27v0,-8,2,-13,6,-15v68,-31,231,-92,311,-39v8,12,12,20,12,25v-8,42,-32,49,-77,80xm79,-160v72,-17,135,-39,184,-70v20,-13,31,-23,31,-27v1,-6,-30,-13,-38,-12v-54,0,-116,13,-186,41v11,21,1,48,9,68xm262,-43v0,-4,3,-6,-4,-5v0,1,1,2,4,5xm211,-140v-34,7,-94,24,-139,15v-6,20,-4,56,-4,82v0,29,43,1,56,2v48,-11,108,-25,154,-48v20,-10,32,-17,32,-25v0,-18,-33,-26,-99,-26xm195,-20v6,1,6,-2,5,-7v-3,2,-7,2,-5,7",w:364},C:{d:"51,-114v-12,75,96,76,166,71r145,-10v9,2,9,5,9,18v-37,18,-85,28,-109,22v-18,10,-47,10,-71,10v-29,0,-68,1,-105,-11v-6,-1,-10,-3,-10,-8v-33,-13,-48,-33,-66,-59v-19,-114,146,-150,224,-177v35,0,88,-31,99,7v-1,29,-49,14,-76,28v-55,8,-115,35,-175,71v-13,8,-23,21,-31,38",w:376},D:{d:"312,-78v-2,1,-3,7,-10,5v6,-3,10,-4,10,-5xm4,-252v2,-27,83,-38,106,-39v130,-7,267,1,291,109v0,0,-2,8,-3,25v-5,9,-4,28,-23,34v-4,4,-2,5,-7,0v-3,3,-15,7,-5,10v0,0,-10,14,-13,2v-11,1,-8,5,-20,14v1,2,7,3,9,1v-4,13,-22,13,-11,4v0,-3,1,-6,-3,-5v-40,29,-103,38,-141,65v10,6,22,-7,34,-3v-41,20,-127,44,-171,46v-21,1,-47,-33,-11,-39v15,-2,43,-6,56,-11v-16,-101,-5,-130,9,-207v2,0,4,-1,6,-3v-16,-17,-91,38,-103,-3xm297,-69v-7,3,-17,8,-25,7v1,1,3,2,5,2v-4,2,-11,5,-23,9v4,-11,30,-21,43,-18xm240,-51v10,0,12,2,0,6r0,-6xm220,-36v-1,-3,4,-6,6,-3v0,1,-2,1,-6,3xm125,-48v16,6,137,-46,155,-53v29,-18,101,-44,82,-93v-21,-53,-84,-61,-168,-67v-20,7,-50,3,-77,8v33,54,-12,132,8,205xm159,-22v-4,-1,-15,-5,-15,2v7,-1,12,-2,15,-2",w:381},E:{d:"45,-219v-19,-36,34,-41,63,-36v44,-10,133,-8,194,-15v3,2,38,11,52,15v-73,19,-171,21,-246,38v-9,11,-16,32,-20,61v35,11,133,-6,183,3v1,6,2,7,3,14v-46,24,-118,16,-193,27v-15,13,-22,52,-22,66v60,1,121,-20,188,-20v22,10,53,-7,74,5v16,29,-23,26,-43,32v-73,4,-139,13,-216,27r-52,-10v-4,-22,23,-69,26,-98v-3,0,-10,-15,-12,-24v20,-12,34,-23,35,-67v2,-1,5,-5,5,-7v0,-4,-14,-11,-19,-11",w:353},F:{d:"270,-258v13,2,59,6,48,34v-78,-3,-143,1,-212,22v-10,16,-21,43,-24,69r145,-9v8,3,29,-3,16,21v-14,-1,-59,13,-60,7v-12,13,-67,18,-108,21v-2,1,-4,3,-7,6v-2,23,-8,43,-7,69v1,28,-30,11,-40,5r10,-80r-26,-14v5,-10,10,-33,28,-25v21,-3,15,-46,26,-59v-1,-3,-32,-13,-28,-24v2,-22,45,-16,59,-30v47,4,99,-14,151,-9v5,-3,25,-3,29,-4",w:236},G:{d:"311,-168v53,0,94,57,74,110v-31,37,-71,34,-136,52v-13,-7,-41,10,-57,7v-73,-1,-122,-17,-162,-59v-49,-51,-24,-80,5,-130v35,-61,138,-93,214,-106v16,4,42,-1,40,21v-5,40,-39,2,-73,21v-76,19,-162,65,-177,142v28,103,237,76,312,29v2,-3,3,-7,3,-13v-10,-35,-37,-43,-87,-45v-16,-13,-53,-9,-78,1v-4,-3,-5,-7,-5,-11v17,-29,73,-17,108,-24v12,4,18,5,19,5",w:391},H:{d:"300,-268v18,12,19,32,4,51v-35,44,-34,140,-46,217v-1,5,-5,13,-11,12v-6,1,-19,-14,-18,-27r7,-106v-28,7,-76,22,-116,14v-18,2,-36,6,-55,3v-43,-8,-14,53,-33,75v-29,1,-26,-67,-21,-97v5,-31,28,-73,43,-98v2,2,7,3,14,3v13,33,-11,48,-13,78v61,4,118,2,176,2v8,0,13,-6,15,-20v4,-47,21,-87,54,-107",w:288},I:{d:"63,-266v34,10,-4,105,-8,128r-24,126v-2,2,-3,1,-9,6v-12,-10,-12,-15,-12,-47v0,-93,9,-156,28,-188v10,-17,19,-25,25,-25",w:79},J:{d:"235,-291v26,11,31,104,31,142v0,37,-2,95,-32,126v-33,34,-121,26,-167,1v-18,-11,-54,-29,-59,-59v0,-3,5,-15,16,-14v31,36,90,57,162,51v63,-30,56,-148,32,-226v-1,-16,11,-13,17,-21",w:282},K:{d:"212,-219v17,-5,80,-60,80,-19v0,9,-2,14,-5,16r-132,78v-34,23,-54,32,-21,50v39,21,74,23,124,41v5,2,7,5,7,9v-4,24,-55,15,-79,8v-67,-19,-98,-36,-116,-83v9,-24,38,-35,66,-61v7,-4,49,-30,76,-39xm47,-194v11,-20,11,-45,31,-55v2,2,4,3,6,0v29,39,-21,96,-18,128v-17,24,-15,62,-29,113v-4,3,-10,7,-19,11v-12,-13,-10,-28,-8,-53v3,-31,17,-79,37,-144",w:270},L:{d:"84,-43v58,0,179,-27,242,-4v3,17,-29,24,-40,26v-85,-4,-202,46,-268,3v-24,-16,-2,-33,-4,-57v26,-76,38,-108,86,-191v14,-7,26,-50,45,-32v6,22,5,31,-12,46v-20,39,-50,82,-67,142v-7,6,-19,46,-19,54v0,9,12,13,37,13",w:331},M:{d:"174,-236v-1,52,-11,92,-7,143v10,5,15,-12,22,-18v42,-55,90,-130,136,-174r15,-18v42,2,32,53,11,80v-12,58,-54,143,-34,210v0,3,-3,12,-9,10v-31,-5,-32,-57,-27,-92v4,-27,12,-58,25,-93v-5,-10,5,-19,6,-30v-46,44,-66,110,-129,172v-11,10,-18,15,-22,15v-34,6,-28,-103,-28,-152v-28,22,-65,119,-96,170v-9,15,-34,3,-31,-19v30,-64,91,-177,139,-229v12,-1,29,13,29,25",w:343},N:{d:"248,-20v-3,17,-37,18,-43,3v-24,-35,-53,-145,-80,-203v-32,40,-55,120,-92,174v-13,3,-26,-13,-27,-22r87,-171v4,-13,20,-57,42,-32v42,48,46,139,82,198v29,-45,46,-88,65,-153v12,-19,23,-42,38,-60v27,-1,14,18,4,44v-6,46,-32,68,-37,121v-15,29,-33,69,-39,101",w:307},O:{d:"240,-268v85,1,163,29,150,125v13,7,-12,18,-5,26v-23,63,-133,112,-228,124v-80,-16,-171,-56,-148,-153v11,-47,20,-43,53,-83v17,-9,39,-22,73,-29v45,-10,81,-10,105,-10xm363,-156v16,-51,-62,-85,-111,-79v-25,-11,-50,8,-81,0v-15,10,-70,16,-85,31v6,20,-27,24,-39,45v-42,75,40,128,115,128v56,0,209,-71,201,-125",w:383},P:{d:"70,-225v-7,-12,-36,16,-49,19v-4,0,-9,-5,-14,-17v21,-47,114,-55,172,-59v41,-3,132,33,99,87v-21,34,-72,59,-144,80v-2,16,-79,3,-74,46v3,25,-5,47,-10,68v-22,-1,-23,-29,-22,-56v2,-25,-20,-32,-8,-50v21,-5,10,-35,25,-57v6,-28,14,-48,25,-61xm71,-229v47,14,-2,50,-1,99v41,-3,113,-37,173,-76v5,-9,8,-14,8,-15v-28,-47,-125,-29,-180,-8",w:252},Q:{d:"374,-217v20,59,-11,127,-48,156r30,38v-1,6,-8,16,-14,9v-3,0,-19,-9,-47,-26v-72,35,-173,75,-236,12v-70,-40,-67,-213,26,-217r8,5v24,-20,72,-48,112,-38v21,-4,22,-1,50,-2v66,-2,94,20,119,63xm296,-88v13,5,61,-49,63,-84v4,-62,-54,-78,-119,-76v-14,-6,-49,5,-71,3v-42,16,-89,41,-93,94v-9,11,1,25,-7,38v-12,-19,-7,-67,-1,-88v-56,30,-37,137,19,155v27,17,92,19,119,0v12,-2,29,-9,52,-20v2,-2,3,-3,3,-6v-11,-12,-46,-27,-54,-56v0,-13,3,-19,9,-19v18,1,60,52,80,59",w:379},R:{d:"100,-275v96,-23,196,-10,208,78v-3,18,-17,52,-49,62v-14,20,-54,23,-79,40v-2,0,-14,2,-36,6v-40,8,-30,14,-3,33v37,27,52,30,118,55v16,6,31,23,12,27v-58,-2,-104,-29,-143,-61v-14,-3,-16,-15,-39,-27v-23,-19,-28,-12,-15,-38v63,-19,111,-15,163,-53v27,-20,43,-36,43,-49v0,-64,-120,-62,-173,-38v-9,4,-38,9,-40,18v-10,32,-16,70,-13,116v-10,21,-8,47,-6,75v2,31,-9,29,-27,22v-9,-55,5,-140,15,-190v-8,-6,-24,10,-24,-11v0,-34,16,-34,42,-55v2,-1,17,-4,46,-10",w:297},S:{d:"13,-3v-7,-3,-22,-18,-5,-22v68,-15,119,-32,154,-45v51,-19,39,-34,3,-53v-46,-25,-82,-30,-121,-64v-33,-29,-50,-35,-25,-58v37,-20,119,-29,181,-29v29,0,44,6,44,18v-9,26,-62,6,-104,14v-17,2,-72,6,-92,16v37,53,132,58,180,111v8,9,11,20,11,30v-4,17,-23,35,-42,34v-21,16,-17,1,-49,17v-14,7,-41,9,-56,20v-25,-3,-49,10,-79,11",w:234},T:{d:"141,-3v-36,-6,1,-49,-3,-79v10,-19,6,-35,15,-64r26,-85v-51,-9,-100,10,-141,14v-16,2,-30,-26,-11,-32v26,-8,143,-8,179,-19r12,6v67,-2,142,-1,200,-1v8,0,14,3,19,10v-18,16,-74,3,-103,14v-48,-4,-60,4,-113,7v-42,22,-36,130,-58,187v1,12,-9,44,-22,42",w:277},U:{d:"365,-262v13,56,-22,104,-36,141v-19,22,-30,38,-57,56v-4,18,-60,35,-78,50v-53,28,-142,0,-161,-34v-31,-56,-37,-108,-11,-164v17,-33,29,-50,48,-29v-2,2,-3,7,-4,13v-44,36,-38,149,7,174v30,26,55,19,102,4v56,-17,66,-34,120,-76v12,-24,56,-68,46,-122r0,-16v0,1,-1,3,-1,6v4,-13,11,-10,25,-3",w:368},V:{d:"246,-258v21,-22,31,-26,44,-8v1,1,-12,22,-28,35v-15,25,-41,38,-56,69v-13,15,-20,31,-28,57v-15,13,-11,29,-27,72v3,21,-5,24,-27,27v-33,-45,-54,-118,-84,-167v-5,-26,-18,-50,-25,-76v-3,-12,24,-8,29,-5v8,13,18,52,26,70r52,115v9,-2,4,-9,10,-21r25,-47v25,-44,46,-76,89,-121",w:234},W:{d:"31,-213v16,46,17,106,41,151v31,-35,49,-89,76,-127v30,-15,39,27,52,56v10,22,21,48,35,67v2,0,4,-1,5,-3v16,-28,50,-76,79,-121v14,-21,40,-63,64,-83r5,8v-30,58,-76,110,-97,173v-18,28,-25,37,-33,63v-11,1,-16,25,-30,15v-21,-31,-44,-89,-62,-131v0,-2,-1,-3,-5,-5v-17,11,-16,36,-31,50v-20,33,-20,84,-68,94v-24,-19,-23,-81,-39,-111v-1,-15,-29,-94,-10,-108v9,2,12,5,18,12",w:331},X:{d:"143,-183v43,-25,69,-36,126,-62v22,-10,86,-10,56,21v-51,3,-158,61,-154,64v10,15,41,30,50,52v27,17,46,60,70,82v9,14,-6,30,-24,20v-35,-43,-75,-100,-116,-132v-48,13,-100,47,-118,94v-1,49,-26,34,-27,4v-1,-26,13,-27,17,-48v22,-27,68,-55,90,-77v-9,-12,-60,-39,-79,-57v-6,-10,-6,-25,12,-25",w:312},Y:{d:"216,-240v19,-14,42,10,22,26v-54,66,-121,109,-156,197v-8,21,-11,15,-30,4v3,-37,27,-61,33,-76v12,-12,15,-19,32,-42v-8,-6,-40,5,-45,5v-48,-6,-69,-65,-56,-113v14,0,13,-1,24,7v2,33,12,75,42,73v36,-2,102,-57,134,-81",w:189},Z:{d:"60,-255v66,12,200,-34,240,21v-13,42,-63,62,-98,89v-19,15,-47,33,-82,55v-25,16,-47,32,-66,47v58,24,129,-6,208,-6v23,0,36,12,13,19v-33,2,-53,5,-86,10v-32,18,-88,15,-135,15v-9,-1,-55,-1,-48,-29v1,-24,30,-24,40,-41v64,-50,151,-86,208,-147v-38,-17,-155,12,-198,-4v0,0,-11,-33,4,-29",w:310},"[":{d:"72,-258r-15,250v30,4,55,-3,80,-6v7,-1,8,17,9,23v-28,15,-73,23,-121,21v-7,0,-10,-6,-10,-17v0,-60,25,-193,22,-288v0,-16,13,-20,33,-19v9,-3,34,-12,51,-12v16,0,15,16,19,29v-16,7,-48,10,-68,19",w:151},"\\":{d:"21,38v-20,-21,9,-72,13,-90v44,-78,113,-189,200,-253v2,0,5,4,7,12v11,31,-13,36,-24,58v-74,61,-174,219,-180,273r-16,0",w:257},"]":{d:"133,-258v-23,-13,-84,6,-85,-32v0,-10,5,-15,14,-15v0,0,30,2,90,7v10,1,15,13,15,36v2,7,-8,59,-13,112r-11,125v-9,48,9,90,-59,71v-20,-4,-39,-1,-59,-4v-5,-10,-25,-12,-14,-30v8,-3,61,-13,78,-8v14,1,8,-7,10,-17v15,-69,21,-166,34,-245",w:171},"^":{d:"68,-306v20,15,47,36,58,60v-1,4,0,7,-9,7v-26,0,-47,-38,-49,-32v-15,9,-41,50,-54,30v-2,-31,17,-23,33,-51v8,-9,15,-14,21,-14",w:135},_:{d:"11,15v-8,33,18,45,50,34r205,2r197,-5v11,-5,14,-9,7,-28v-95,-21,-258,-10,-376,-10v-25,0,-72,-3,-83,7",w:485},"`":{d:"75,-264v16,8,56,14,39,43v-30,-8,-65,-23,-105,-44v-1,-3,-3,-28,5,-25v16,5,44,17,61,26",w:129},a:{d:"124,-56v10,4,59,41,65,50v1,7,-6,17,-12,17r-60,-30v-22,2,-42,21,-65,19v-33,4,-68,-67,-15,-81v41,-27,96,-39,110,9v0,6,-4,12,-11,16v-33,-25,-67,-5,-88,12v10,16,61,-18,76,-12",w:196},b:{d:"80,-140v69,1,123,0,134,52v5,26,-71,71,-97,70v-11,11,-88,22,-94,22v-11,-3,-26,-18,-6,-24v19,-5,-2,-19,-1,-35v1,-18,11,-36,-5,-47v-6,-17,-6,-21,14,-32v6,-45,18,-89,28,-124v2,-7,8,-12,17,-15v5,3,10,11,16,28v-12,27,-13,63,-23,96v0,6,6,9,17,9xm87,-107v-40,-9,-31,31,-39,54v8,15,0,25,12,22v30,-8,60,-18,88,-32v39,-18,49,-33,-1,-42v-20,-4,-45,-7,-60,-2",w:217},c:{d:"128,-123v29,-7,37,29,12,33v-27,-4,-40,6,-79,25v-8,4,-13,11,-16,22v30,32,91,3,134,11v5,13,-8,26,-22,19v-51,25,-139,28,-150,-30v6,-50,69,-82,121,-80",w:194},d:{d:"224,-201v0,-35,-17,-111,24,-94v7,86,-2,119,0,197v-4,2,-8,21,-18,16v-62,-7,-154,-8,-185,29v6,17,28,26,51,26v16,0,100,-15,132,-18v7,5,-6,20,-10,22v-24,8,-122,42,-163,25v-32,-5,-62,-53,-36,-80v35,-37,118,-46,198,-43v1,-22,7,-49,7,-80",w:265},e:{d:"4,-57v0,-58,51,-71,110,-74v33,-1,45,16,59,35v1,14,2,39,-7,42v-24,-2,-73,13,-99,11v-2,2,-2,3,-2,3v0,3,12,8,37,15v21,0,69,9,31,22v-9,14,-34,6,-56,6v-27,-5,-73,-28,-73,-60xm123,-102v-22,2,-68,5,-65,26v24,-2,66,5,79,-6v-5,-13,-1,-13,-14,-20",w:182},f:{d:"6,-59v6,-29,53,-4,53,-43v0,-64,29,-118,84,-150v45,-25,167,-24,155,51v-1,2,-7,6,0,6r-10,2v-45,-58,-165,-39,-186,39v-7,26,-11,42,-9,62v44,8,95,-21,135,-7v-12,25,-39,21,-76,30v-19,5,-18,7,-54,19v-2,8,15,32,17,35v-6,25,-26,26,-40,-5r-15,-24v-41,10,-44,12,-54,-15",w:234},g:{d:"132,-97v30,27,21,75,30,117v-12,31,-11,66,-36,103v-32,46,-105,83,-167,39v-31,-21,-49,-29,-51,-75v-2,-37,77,-50,121,-57v37,-6,68,-10,95,-11v7,-6,3,-32,4,-46v0,0,-1,1,-1,2v0,-18,-5,-31,-14,-45v-44,5,-79,20,-94,-18v3,-54,73,-54,125,-50v12,7,12,13,4,25v-30,-11,-76,8,-90,20v23,3,50,-16,74,-4xm-34,121v60,53,168,1,159,-86v-47,-7,-93,24,-142,30v-12,7,-45,19,-42,29v0,10,8,19,25,27",w:188},h:{d:"100,-310v11,-2,10,19,11,20v-11,52,-40,133,-53,189v-6,30,-9,37,-9,47v27,0,113,-34,143,-34v42,0,31,47,39,79v0,4,-5,17,-16,16v4,2,11,3,4,6v-24,-1,-28,-34,-25,-64v-1,-1,-2,-3,-5,-5v-51,0,-110,38,-162,51v-9,1,-15,-15,-16,-23v17,-89,39,-141,71,-264v0,-9,6,-19,18,-18",w:251},i:{d:"62,-209v7,18,9,23,-5,38v-23,-6,-21,-18,-11,-36v2,0,8,-1,16,-2xm34,-7v-18,-21,-8,-73,-1,-106v7,-10,20,-8,23,6v-1,36,7,72,-2,104v-8,2,-8,0,-20,-4",w:80},j:{d:"88,-191v5,28,-18,40,-28,21v0,-20,12,-29,28,-21xm82,-99v28,-1,16,35,16,61v0,60,-19,150,-35,202v-12,8,-19,31,-35,16v-32,-7,-43,-19,-56,-44r2,-17v11,4,49,45,61,18v10,-55,27,-107,30,-171v0,-16,0,-59,17,-65",w:120},k:{d:"59,-66v33,26,114,37,155,62v8,-4,22,-2,19,-17v0,-4,-12,-11,-30,-24v-36,-25,-54,-22,-99,-33v14,-21,119,-13,103,-63r-16,-7r-123,47r25,-93v-3,-15,16,-49,18,-81v1,-15,-21,-14,-25,-3v-31,82,-49,168,-75,257v2,2,22,30,27,10v2,-5,4,-9,9,-11v4,-16,4,-15,12,-44",w:236},l:{d:"66,-300v21,-6,37,23,30,55v-10,51,-28,135,-28,208v0,11,6,36,-13,37v-29,-5,-30,-48,-25,-83r28,-177v-6,-17,1,-29,8,-40",w:102},m:{d:"348,-59v-2,21,0,57,3,73v-17,3,-30,-1,-32,-16v-8,-7,-5,-44,-13,-70v-35,3,-82,49,-111,70v-12,8,-40,4,-39,-15r2,-56v-1,-13,4,-28,-8,-29v-35,8,-79,72,-115,87v-6,2,-20,-18,-21,-22v1,-20,14,-105,39,-64r8,15v17,-14,72,-56,93,-54v27,3,49,40,43,80v24,-2,66,-55,124,-53v11,14,28,23,27,54",w:368},n:{d:"121,-136v37,6,62,54,62,111v0,32,-16,25,-31,17v-18,-30,-5,-45,-22,-85v-37,-13,-71,55,-92,65v-20,-3,-39,-39,-21,-62v2,-12,3,-15,11,-30v12,-8,20,11,29,12",w:194},o:{d:"108,-139v52,-24,104,18,104,63v0,59,-66,67,-114,83v-52,-2,-115,-50,-80,-105v23,-18,52,-35,90,-41xm45,-60v16,54,125,16,131,-23v-12,-59,-129,-8,-131,23",w:217},p:{d:"82,14v-10,12,-8,117,-24,142v-15,2,-19,0,-29,-13v0,-76,9,-113,22,-192v14,-27,35,-6,37,13v0,8,-3,21,-7,38v2,2,3,2,4,2v26,-9,116,-33,126,-72v-7,-17,-24,-33,-49,-31v-40,3,-116,13,-116,47v-5,7,-2,17,-16,20v-17,-12,-18,-20,-12,-38v8,-25,74,-61,110,-59v55,-15,113,15,118,70v-15,52,-84,79,-146,83v-5,0,-11,-4,-18,-10",w:251},q:{d:"144,-147v27,-8,89,-3,97,31v-9,29,-42,-4,-73,1v-32,6,-118,20,-111,49v0,7,13,13,21,13v21,0,78,-24,104,-34v2,0,9,8,22,21v1,1,1,2,1,5v-27,90,-22,70,-43,203v11,15,-15,54,-33,33v-6,-8,-10,-20,-3,-28v1,-72,5,-114,15,-172v-35,3,-35,10,-59,8v-41,-4,-98,-41,-56,-85v33,-34,59,-27,118,-45",w:248},r:{d:"242,-117v2,22,5,10,-14,23v-73,-7,-166,-23,-174,56v-8,6,-3,20,-8,36v-29,10,-40,-9,-33,-46v6,-31,7,-69,32,-55v58,-37,66,-42,175,-19v3,5,15,4,22,5",w:229},s:{d:"154,-151v19,1,27,24,13,32v-4,1,-22,4,-53,7v-16,8,-22,-2,-39,9v23,21,89,16,96,62v-13,24,-85,35,-124,42v-9,-3,-18,-3,-27,0v-6,-4,-21,-16,-8,-25v30,-6,83,-13,102,-24v-17,-16,-80,-33,-97,-48v-3,-2,-4,-7,-4,-15v-6,-6,3,-13,15,-18v22,-9,94,-23,126,-22",w:188},t:{d:"85,-150v10,-41,35,-126,65,-134v4,1,24,19,11,36v-17,22,-29,57,-36,104v26,8,50,-7,73,5v14,0,22,3,22,9v-1,19,-44,18,-57,23v-10,1,-46,0,-54,10v-10,24,-4,67,-20,98v-21,-3,-26,1,-26,-20v0,-9,2,-36,8,-81v-15,-13,-81,9,-77,-27v4,-38,71,6,91,-23",w:194},u:{d:"207,-136v-1,-2,11,-14,14,-13v6,0,10,7,10,22v-3,40,-23,56,-40,82v-13,19,-62,43,-93,43v-67,-2,-111,-75,-71,-133v26,-3,21,29,19,49v-1,27,26,44,57,42v41,-2,93,-55,104,-92",w:242},v:{d:"24,-127r52,71v42,-16,70,-54,124,-65v5,4,8,7,8,11v-8,19,-4,8,-33,32v0,1,-1,3,-1,5v-61,45,-93,68,-97,68v-40,-15,-50,-72,-68,-100v6,-14,10,-22,15,-22",w:214},w:{d:"15,-139v38,-2,27,57,45,86v30,2,67,-66,101,-78v26,6,36,69,60,78v47,-35,51,-54,119,-104v3,0,7,-2,15,-4v19,23,-9,28,-21,49v-33,28,-68,90,-107,109v-10,6,-52,-47,-72,-71v-20,17,-85,74,-97,73v-38,7,-41,-98,-52,-122v0,-1,3,-7,9,-16",w:325},x:{d:"95,-124v22,-13,78,-32,99,-31v16,0,23,6,23,18v0,22,-17,11,-49,21v-3,0,-45,20,-42,24v0,1,2,4,8,10v20,24,49,41,44,80v-35,3,-27,-9,-60,-44v-40,-43,-37,-26,-79,9v-1,1,-2,3,-3,8v-12,8,-28,10,-27,-11v-6,-8,45,-65,48,-65v-17,-21,-61,-52,-24,-68v9,0,48,37,62,49",w:223},y:{d:"44,-65v22,33,70,4,99,-8v5,-4,28,-15,41,-31r17,0v25,47,-26,70,-40,114v-5,4,-9,8,-10,21v-16,12,-11,33,-27,51v-5,18,-12,43,-23,71v-1,-1,-2,34,-18,29v-12,1,-22,-12,-22,-23v20,-70,24,-65,68,-177v-47,16,-111,8,-116,-39v-11,-13,-7,-62,8,-62v18,0,22,26,23,54",w:216},z:{d:"189,-43v9,-1,46,-6,41,12v0,7,-5,13,-15,14v-45,6,-148,24,-181,13v0,-3,-5,-8,-14,-15v5,-44,66,-46,90,-85v-15,-18,-84,21,-84,-14v0,-10,5,-17,14,-18v33,-3,79,-13,109,-3v4,-2,14,11,12,15v0,23,-26,51,-78,84v28,10,73,-3,106,-3",w:244},"{":{d:"94,-303v27,-9,90,-14,79,26v-20,17,-55,-5,-87,13v-4,1,-6,4,-6,8v33,42,31,44,7,85v-6,10,-13,16,-13,13v5,6,17,17,15,31r-33,78v7,35,28,49,57,63r49,0v7,42,-51,41,-86,20v-43,-13,-51,-51,-56,-89v-2,-25,25,-54,27,-71v-3,-4,-46,-5,-41,-21v2,-10,-3,-29,11,-25v2,0,51,-17,52,-38v4,-3,-25,-23,-25,-49v0,-41,8,-30,50,-44",w:179},"|":{d:"30,-308v26,5,14,50,15,80v5,78,-8,153,-3,225v-2,15,-1,31,-11,36v-8,-3,-25,-22,-25,-32r9,-183v0,-40,0,-78,1,-112v0,-4,9,-15,14,-14",w:63},"}":{d:"47,-298v34,-17,118,-18,112,36v6,25,-76,98,-69,103v4,16,39,7,44,28v7,34,-34,17,-37,39v8,29,49,83,23,123v-15,23,-43,26,-73,46v-34,8,-43,11,-49,-17v1,-15,30,-15,33,-20v24,-12,70,-27,55,-61v-14,-33,-37,-68,-19,-103v-46,-50,46,-100,60,-141v-10,-16,-68,6,-77,-12",w:143},"~":{d:"7,-254v2,-6,59,-50,67,-46v11,-1,35,19,46,26v5,0,27,-10,66,-31v21,8,-1,25,-7,38v-27,21,-48,31,-65,31v-24,-11,-37,-39,-65,-9v-7,7,-26,36,-42,11v3,-5,-3,-17,0,-20",w:199},"Ä":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm187,-259v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm90,-284v7,3,28,11,28,18v0,9,-9,18,-18,17v-17,0,-25,-24,-10,-35"},"Å":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm112,-239v-31,-17,-9,-61,29,-56v12,2,22,3,33,12v24,39,-30,62,-62,44xm119,-262v2,14,41,8,41,-4v0,-4,-8,-6,-24,-9v-10,-2,-17,10,-17,13"},"Ç":{d:"48,-108v-12,70,90,71,159,67r138,-9v9,-1,7,9,7,17v-37,16,-80,27,-103,21v-14,9,-40,3,-67,9v-30,0,-64,1,-100,-10v-6,-1,-10,-4,-10,-8v-32,-12,-46,-31,-63,-56v-16,-61,47,-103,83,-121v82,-42,118,-45,200,-60v21,-4,36,34,11,37v-90,11,-148,31,-225,77v-12,8,-23,20,-30,36xm172,18v29,4,47,14,53,35v-2,7,-14,31,-27,31v-28,7,-55,9,-84,14v-18,-5,-13,-32,7,-32v21,0,55,-5,69,-13v-16,-14,-63,10,-50,-35v9,-10,1,-27,23,-29v7,8,11,16,9,29",w:331},"É":{d:"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm133,-248v27,-11,48,-32,59,-14v3,11,-79,52,-88,53v-14,1,-16,-11,-12,-21v10,-4,23,-11,41,-18",w:252},"Ñ":{d:"224,-182v1,-17,15,-24,22,-38v20,0,13,10,3,33v-3,36,-25,52,-28,94v-10,24,-30,55,-29,82r-19,7v-32,-8,-36,-70,-58,-111v-2,-23,-7,-27,-19,-54v-28,36,-41,93,-71,133v-9,5,-20,-9,-20,-17r73,-149v9,-24,31,-5,36,7v19,41,31,98,53,139v22,-35,34,-69,50,-118v2,-3,3,-3,7,-8xm203,-257v22,-8,41,-24,65,-26v3,11,-8,9,-7,21v-26,20,-46,31,-59,31v-2,3,-49,-27,-49,-29v-11,0,-32,31,-46,32v-11,-2,-12,-21,-4,-23v4,-6,28,-30,48,-34v17,-4,43,28,52,28",w:219},"Ö":{d:"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm197,-229v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm101,-254v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35",w:273},"Ü":{d:"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-29,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm197,-227v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm101,-252v7,3,27,10,27,18v0,8,-9,18,-18,17v-18,-1,-24,-25,-9,-35",w:262},"á":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm32,-117v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-13,2,-14,-10,-12,-21",w:173},"à":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm99,-137v7,6,56,14,37,40v-28,-7,-62,-21,-100,-41v-2,-3,-2,-26,5,-23v16,4,42,17,58,24",w:173},"â":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm147,-97v-27,-6,-39,-26,-60,-37v-21,7,-38,46,-65,23v-2,-5,-3,-10,-4,-14v18,-4,43,-31,61,-42v28,5,40,21,62,36v12,8,18,17,18,25v0,6,-4,9,-12,9",w:173},"ä":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-32,5,-66,-64,-15,-77v39,-26,92,-36,104,9v0,6,-3,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm142,-119v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,28,2,28,21xm46,-144v7,3,28,9,27,18v1,8,-9,18,-18,17v-18,-1,-25,-25,-9,-35",w:173},"ã":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm114,-136v22,-8,41,-24,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-12,-32,8,-29,32,-51v24,-21,54,20,69,23",w:173},"å":{d:"118,-53v10,4,55,41,62,47v0,7,-5,16,-12,16r-57,-28v-20,3,-40,19,-61,18v-10,2,-43,-17,-42,-36v0,-14,7,-40,27,-41v39,-26,92,-36,104,9v0,6,-2,11,-9,15v-32,-24,-64,-6,-84,11v8,15,58,-17,72,-11xm54,-101v-37,-20,-9,-71,34,-65v13,1,25,3,38,13v27,45,-34,73,-72,52xm61,-128v4,20,48,7,49,-5v0,-5,-9,-7,-28,-10v-12,-2,-21,11,-21,15",w:173},"ç":{d:"108,-118v30,-6,56,21,25,33v-24,-6,-39,5,-75,23v-7,4,-12,12,-15,22v31,28,86,3,128,9v3,28,-29,16,-44,28v-53,15,-106,10,-120,-37v0,-48,62,-70,101,-78xm92,18v23,4,45,12,48,32v-2,6,-12,28,-25,28v-24,6,-50,10,-77,13v-16,-4,-11,-28,7,-29v17,-1,51,-4,63,-12v-14,-15,-57,10,-46,-32v9,-8,0,-25,21,-26v6,6,12,14,9,26",w:171},"é":{d:"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm76,-169v26,-11,48,-32,59,-14v3,10,-80,53,-89,53v-14,1,-14,-10,-12,-21v15,-7,16,-7,42,-18",w:161},"è":{d:"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm95,-166v7,6,54,14,37,40v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,18,58,25",w:161},"ê":{d:"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10v-1,1,-2,3,-2,3v0,3,12,7,35,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-70,-26,-70,-58v0,-54,48,-65,104,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm145,-129v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-51,34,-56,0v17,-4,44,-32,61,-43v28,5,41,21,63,36v12,8,17,17,17,25v0,6,-3,9,-11,9",w:161},"ë":{d:"108,-124v42,-3,70,39,50,73v-22,-1,-70,12,-94,10r-3,3v0,3,12,7,36,14v18,0,64,7,30,21v-10,14,-31,6,-53,6v-26,-7,-67,-27,-71,-58v7,-52,48,-65,105,-69xm130,-78v-2,-35,-66,-13,-77,3v16,6,62,6,77,-3xm140,-144v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm44,-169v7,3,28,9,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35",w:161},"í":{d:"59,-98v20,4,15,53,10,95v-6,1,-11,2,-19,-4v1,-7,-12,-18,-10,-24v4,-22,-4,-65,19,-67xm50,-139v27,-11,49,-32,59,-14v3,11,-80,53,-89,53v-14,1,-14,-12,-11,-22v15,-7,14,-6,41,-17",w:105},"ì":{d:"57,-98v22,5,13,50,11,95v-7,1,-11,2,-20,-4v1,-7,-12,-18,-10,-24v4,-22,-2,-64,19,-67xm70,-139v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-3,-25,5,-23v15,5,41,17,57,24",w:109},"î":{d:"72,-98v20,5,12,51,10,95v-6,2,-13,1,-20,-4v1,-8,-12,-18,-10,-24v4,-22,-3,-65,20,-67xm134,-94v-26,-7,-39,-25,-60,-37v-7,0,-9,4,-13,10v-14,15,-51,34,-56,-1v18,-4,45,-33,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-4,9,-12,9",w:143},"ï":{d:"55,-97v19,5,15,53,10,95v-17,5,-26,-14,-30,-28v6,-20,-3,-65,20,-67xm110,-118v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm14,-143v6,3,28,8,28,17v0,9,-9,18,-18,18v-18,0,-25,-24,-10,-35",w:107},"ñ":{d:"115,-129v34,6,59,50,59,105v0,31,-15,24,-30,17v-15,-29,-5,-42,-20,-81v-35,-13,-68,52,-88,61v-20,-4,-38,-36,-19,-59v0,-12,3,-14,10,-28v11,-8,18,11,27,12xm117,-166v22,-7,41,-23,64,-26v3,11,-7,10,-7,21v-26,20,-45,30,-58,30v-3,3,-49,-26,-49,-28v-10,-1,-32,35,-51,31v-5,-12,-8,-16,0,-23v4,-6,28,-29,48,-33v17,-3,43,28,53,28",w:171},"ó":{d:"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm49,-154v24,-3,85,-55,101,-32v3,11,-80,53,-89,53v-14,0,-13,-8,-12,-21",w:191},"ò":{d:"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm115,-181v14,10,51,13,37,40v-28,-7,-62,-21,-100,-41v-3,-2,-3,-26,5,-23v16,5,42,17,58,24",w:191},"ô":{d:"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm110,-177v-22,6,-38,45,-65,22v-2,-4,-3,-9,-4,-13v18,-4,43,-32,61,-43v27,6,40,21,62,36v12,9,18,17,18,25v1,11,-15,10,-23,7",w:191},"ö":{d:"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm161,-160v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm65,-185v7,3,28,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35",w:191},"õ":{d:"102,-132v50,-20,99,16,99,60v0,54,-60,64,-108,79v-50,-2,-110,-48,-76,-100v22,-17,49,-33,85,-39xm136,-104v-34,0,-91,27,-94,47v16,51,125,16,125,-22v0,-17,-10,-25,-31,-25xm58,-199v26,-21,54,18,69,22v4,0,15,-5,34,-13v22,-9,21,-16,31,-13v3,11,-9,9,-7,22v-26,20,-46,30,-59,30v-2,4,-49,-28,-49,-29v-11,0,-32,31,-46,32v-12,-3,-13,-21,-4,-23v4,-6,14,-15,31,-28",w:191},"ú":{d:"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm106,-174v26,-11,48,-32,59,-14v3,11,-81,53,-89,54v-13,1,-15,-12,-11,-22v15,-7,14,-7,41,-18",w:213},"ù":{d:"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm126,-166v7,6,56,14,37,40v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,18,58,25",w:213},"û":{d:"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm172,-143v-27,-6,-39,-26,-60,-37v-8,0,-10,4,-14,10v-11,15,-49,35,-56,0v17,-4,44,-32,61,-43v27,6,41,21,63,36v12,9,17,17,17,25v0,6,-3,9,-11,9",w:213},"ü":{d:"196,-129v-1,-4,12,-13,15,-13v6,0,8,7,8,21v0,24,-7,25,-13,45v-7,7,-14,21,-24,29v-9,24,-61,45,-89,45v-63,0,-105,-72,-67,-126v24,-3,19,27,18,46v-1,26,23,42,54,40v38,-3,88,-51,98,-87xm168,-161v0,8,-3,13,-11,13v-17,0,-20,-19,-17,-34v18,-1,29,1,28,21xm72,-186v7,3,29,9,28,18v0,7,-9,18,-18,17v-18,1,-25,-24,-10,-35",w:213},"†":{d:"22,-286v15,6,5,-20,19,-19v9,-3,15,21,17,22v6,1,12,3,20,6v3,10,5,16,-9,16v-34,-10,-6,51,-34,52v-20,-7,11,-47,-15,-49v-14,3,-25,-5,-17,-24v7,-2,14,-4,19,-4",w:77},"°":{d:"106,-268v0,36,-35,38,-51,46v-48,5,-60,-58,-25,-78v33,-11,76,-9,76,32xm38,-257v16,7,39,2,38,-17v-13,-9,-28,-1,-32,11v-5,3,-7,0,-6,6",w:114},"¢":{d:"105,-188v13,-12,14,-18,26,-15v7,23,7,15,-3,49v6,0,18,14,17,20v-3,5,-12,19,-26,13v-14,1,-14,5,-16,21v10,10,46,-13,38,18v-9,17,-23,16,-54,20v-17,16,-4,55,-29,60v-37,-10,19,-64,-24,-71v-20,-10,-37,-47,-6,-62v23,-20,73,-4,77,-53xm65,-101v4,-9,7,-8,3,-13v-14,4,-22,10,-3,13",w:154},"£":{d:"153,-170v3,22,62,0,49,39v-18,6,-31,12,-58,9v-12,-1,-17,30,-23,39v19,26,50,56,91,35v9,-2,27,-13,27,4v0,27,-27,39,-58,42v-32,-5,-59,-19,-78,-39v-6,1,-35,44,-57,39v-25,0,-37,-15,-37,-46v0,-41,43,-53,73,-50v4,1,12,-18,12,-21v-7,-15,-49,0,-44,-30v-2,-31,31,-16,60,-19v16,-30,25,-119,93,-113v16,2,75,16,50,44v-4,5,-7,7,-12,8v-18,-12,-32,-18,-41,-18v-35,-1,-38,52,-47,77xm43,-45v4,5,12,-2,11,-9v-1,2,-12,1,-11,9",w:242},"§":{d:"141,-115v12,10,29,36,28,56v-4,68,-129,69,-152,16v-1,-12,-10,-22,8,-23v17,3,47,21,67,23v16,1,40,-8,38,-21v-8,-49,-119,-30,-117,-85v1,-28,15,-45,-3,-64v-1,-53,55,-61,103,-62v15,-5,6,-5,20,-2v16,17,23,27,23,30v-1,26,-29,7,-45,7v-21,0,-51,2,-62,17v19,14,87,8,97,43v18,14,16,57,-5,65xm64,-147r57,17v10,-28,-22,-43,-47,-44v-25,-1,-35,19,-10,27",w:174},"•":{d:"130,-114v0,47,-124,54,-120,-8r6,-31v44,-28,64,-34,104,0v8,6,10,20,10,39",w:139},"¶":{d:"121,-237v21,-9,44,-13,63,-1v-1,7,5,6,7,11r-4,190v-2,33,4,39,-15,40v-16,1,-10,-20,-10,-33r4,-161v0,-17,-1,-34,-16,-25v2,10,1,23,1,35v-9,46,-6,75,-15,156v-3,4,-7,5,-12,5v-17,-10,-3,-89,-10,-115v-43,14,-98,10,-101,-29v-4,-53,59,-63,104,-75v3,1,4,2,4,2xm95,-204v2,9,-30,50,1,50v35,0,23,-13,29,-43v0,-1,-2,-7,-4,-15v-12,-1,-14,2,-26,8",w:206},"ß":{d:"33,10v-29,4,-28,-32,-16,-70v18,-58,17,-137,56,-176v12,-24,46,-58,82,-43v20,8,47,24,47,54v0,30,-62,59,-67,90v33,23,56,33,63,63v-18,21,-22,36,-48,54v-24,17,-27,41,-53,16v-2,-19,7,-35,24,-42v15,-13,26,-22,34,-40v-13,-17,-78,-29,-56,-70v-3,-27,64,-54,66,-86v-8,-25,-41,-4,-52,8v-29,30,-47,83,-51,141v-17,25,-8,71,-29,101"},"®":{d:"75,-194v78,-29,116,9,130,84v-2,42,-22,47,-57,67v-74,20,-161,-19,-129,-110v6,-18,29,-34,57,-40xm46,-86v51,36,84,21,129,-15v7,-15,0,-39,-10,-49v-13,-37,-49,-26,-86,-18v-28,7,-49,46,-33,82xm72,-123v-5,-43,68,-57,75,-14v-17,26,-18,17,3,32v2,25,-25,18,-45,7r-4,-4v-1,8,-3,20,-12,24v-10,-3,-21,-34,-17,-45xm112,-135v-10,-1,-20,13,-9,14v6,-6,9,-11,9,-14",w:217},"©":{d:"102,-29v-74,5,-124,-84,-70,-140v22,-22,53,-35,97,-38v46,-4,88,49,74,100v0,44,-51,75,-101,78xm96,-66v42,-3,75,-23,75,-69v0,-23,-4,-38,-44,-38v-16,0,-33,6,-49,20v36,-4,55,-12,62,20v-5,16,-49,1,-50,21v10,15,53,-14,54,11v0,18,-14,27,-42,27v-22,1,-46,-11,-46,-31v0,-25,7,-39,20,-44v-1,-1,-2,-2,-3,-2v-51,22,-32,89,23,85",w:217},"™":{d:"213,-307v28,9,11,49,7,75v-1,4,-4,6,-11,6v-7,1,-11,-14,-11,-34v-14,-6,-34,34,-46,28v-2,0,-10,-9,-24,-27v-10,7,-3,36,-27,31v-15,-24,-3,-27,1,-48v-6,-7,-27,-1,-31,3v-3,14,-7,30,-11,51v-5,10,-29,9,-24,-12v-5,-8,1,-18,3,-35v-13,6,-33,2,-29,-18v20,-17,64,-17,100,-19v28,-1,29,30,45,39v11,-6,35,-32,58,-40",w:239},"´":{d:"52,-284v29,-11,50,-34,62,-14v3,12,-86,54,-94,56v-14,0,-16,-12,-12,-23v11,-5,25,-11,44,-19",w:120},"¨":{d:"124,-259v0,9,-4,13,-12,13v-18,0,-22,-21,-17,-35v19,-1,30,1,29,22xm23,-285v7,2,30,9,29,18v1,10,-9,19,-18,19v-19,0,-28,-26,-11,-37",w:136},"≠":{d:"48,-130v29,11,49,-57,60,-50v25,6,7,27,-1,46v22,5,29,7,21,22v-18,2,-48,-1,-50,15v9,8,53,-7,54,10v-4,22,-46,20,-72,24v-7,13,-18,32,-34,57v-8,6,-15,-3,-13,-14v-1,-9,15,-39,14,-45v-30,5,-24,-17,-13,-25v12,-1,36,4,29,-13v-14,0,-47,6,-36,-12v0,-18,27,-13,41,-15",w:140},"Æ":{d:"335,-259v0,30,-102,12,-122,34v10,21,2,79,16,100v24,-6,59,-13,86,-16v23,-2,32,21,13,26r-103,29v-3,22,-4,38,8,43v28,-5,60,-6,86,-14v5,-1,14,7,14,11v6,16,-90,40,-107,40v-29,0,-39,-19,-32,-46v-2,-4,0,-26,-9,-28v-29,2,-58,6,-88,6v-31,0,-40,74,-82,73v-18,-23,4,-37,12,-50v40,-65,112,-126,165,-207v20,-17,69,-11,112,-13v21,0,31,4,31,12xm123,-111v28,1,44,-2,67,-10v-4,-22,5,-49,-7,-65v-3,6,-65,61,-60,75",w:348},"Ø":{d:"76,-211v41,-13,100,-22,140,-3v26,-19,40,-29,44,-29v10,0,15,7,15,20v0,15,-23,23,-30,35v23,39,29,114,-21,139v-36,19,-102,35,-147,18v-14,-5,-29,29,-46,35v-25,-13,-19,-24,3,-56v-9,-17,-28,-27,-28,-60v0,-38,23,-72,70,-99xm107,-66v55,15,125,-12,123,-70v0,-16,-5,-25,-13,-29r-110,95r0,4xm39,-108v-1,3,17,31,22,27v8,-6,109,-90,123,-106v-15,-11,-43,1,-63,2v-33,10,-80,35,-82,77",w:270},"∞":{d:"322,-72v-4,22,-54,41,-76,41v-43,0,-83,-17,-114,-35v-46,19,-125,53,-128,-18v-1,-14,10,-22,13,-35v29,-10,62,-31,97,-4v37,28,47,5,75,-8v40,-19,73,-10,114,1v13,1,18,55,19,58xm228,-69v15,0,62,-12,61,-25v-19,-23,-89,-10,-105,11v0,2,1,4,2,4v28,6,42,10,42,10xm75,-102v-13,2,-41,4,-44,19v0,4,3,7,10,7v21,0,40,-6,54,-17v-9,-6,-16,-9,-20,-9",w:330},"±":{d:"93,-163v-7,46,76,-4,46,47v-14,6,-27,13,-38,8v-24,2,-14,28,-28,44r-14,0v-7,-12,-5,-15,-7,-33v-12,-7,-41,-1,-37,-24v2,-11,23,-17,36,-14r28,-38v4,0,9,4,14,10xm113,-27v-12,18,-58,27,-85,24v-16,2,-22,-23,-13,-36v28,-7,85,-11,98,12",w:151},"≤":{d:"73,-109v10,15,87,16,87,42v0,11,-5,16,-13,16v-36,-11,-69,-24,-109,-31v-18,-8,-18,-13,-9,-36v59,-56,93,-83,101,-83v16,0,18,17,14,28v-27,24,-42,35,-71,64xm10,-29v35,-12,117,-26,148,-3v1,2,-5,19,-8,18r-124,15v-16,2,-26,-18,-16,-30",w:168},"≥":{d:"115,-174v20,7,53,36,20,57v-19,11,-91,68,-82,59v-18,3,-25,-22,-13,-31v15,-10,14,-10,70,-51r-50,-37v-5,-4,-5,-27,4,-28v16,7,40,17,51,31xm14,-32v33,-10,86,-14,127,-10v12,12,5,23,-11,27v-49,9,-82,13,-99,13v-22,0,-24,-16,-17,-30",w:163},"¥":{d:"31,-248v30,-3,64,64,74,59v37,-22,77,-65,107,-82v20,-11,34,18,21,32v-28,19,-52,38,-70,57v-18,8,-40,21,-35,60v2,19,39,7,64,7v25,0,16,21,2,27v-36,16,-46,8,-68,18v6,11,101,-20,66,24v-21,11,-42,12,-75,20v-2,1,-5,6,-10,18v-8,3,-11,10,-24,8v-7,-17,-2,-18,-9,-26v-13,5,-39,3,-53,-2v-10,-17,-7,-27,0,-34v23,-1,45,1,64,-5v-11,-7,-28,-4,-64,-6v-13,-8,-15,-24,-6,-35v33,-2,102,9,76,-37v-14,-14,-33,-38,-60,-66v-10,-10,-8,-28,0,-37",w:219},"µ":{d:"123,-114v41,0,54,-9,127,-17v12,-2,20,-6,25,-12v5,-78,43,-127,119,-138v38,-5,46,23,55,48v-5,5,2,4,2,12v-2,47,-72,81,-129,95v-17,4,-12,32,-2,39v30,-5,24,0,99,4v14,9,14,20,-1,23v-17,3,-71,-1,-85,13v1,19,18,35,-3,47v-1,-6,-10,-7,-16,-5v-3,-3,-20,-37,-29,-41v-15,8,-50,22,-49,-9v1,-19,2,-27,28,-26v24,1,13,-12,8,-30v-22,1,-64,16,-111,23v-50,7,-17,47,-17,57v0,10,-5,15,-13,15v-20,-9,-27,-30,-33,-55v-20,-17,-52,8,-85,-6v-2,-10,-13,-26,4,-29v32,-6,41,-1,65,-7v-17,-74,-4,-173,69,-180v55,-20,130,8,131,65v-11,9,-10,2,-29,-11v-33,-23,-37,-26,-76,-25v-41,13,-69,38,-67,100v0,34,4,50,13,50xm317,-152v29,-6,106,-43,106,-71v0,-23,-24,-25,-42,-17v-31,1,-74,48,-64,88",w:462},"∂":{d:"456,-113v55,-37,119,-8,176,5v-19,37,-104,-5,-144,18v-5,64,-45,87,-130,87v-43,0,-70,-8,-96,-21v-54,15,-146,29,-209,10v-18,-11,-43,-26,-46,-53v-1,-9,28,-48,51,-46v55,-10,55,-8,101,-8v29,0,17,-26,23,-56v4,-19,4,-74,34,-49v4,42,-7,83,-10,124v0,4,-11,10,-34,17v-29,-1,-45,-4,-74,1v-10,2,-57,3,-52,18v30,43,132,30,190,18v2,-10,-7,-19,-5,-28v5,-36,31,-59,74,-56v27,2,71,4,70,35v-1,30,-37,41,-58,57v35,13,131,15,135,-23v2,-19,-5,-36,4,-50xm262,-85v0,3,13,28,19,25v7,0,48,-13,61,-29v-10,-17,-71,-17,-80,4",w:640},"∑":{d:"235,-95v-3,-59,120,-41,160,-28v3,-2,15,-3,14,4v1,3,-16,19,-21,18r-97,4v-25,5,-18,18,-23,56v-16,14,-25,24,-36,18v-83,32,-154,29,-212,-17v-45,-68,41,-114,107,-119v50,-4,59,66,22,85v-16,8,-61,10,-79,15v36,27,185,24,165,-36xm128,-119v-23,-3,-43,4,-53,15v13,5,46,-4,53,-15",w:414},"∏":{d:"243,-190v7,-18,27,-19,38,6v0,2,-5,8,-14,16v-8,-9,-27,-4,-24,-22xm221,-111v55,-7,60,22,45,64v5,23,17,47,-22,47v-35,0,-18,-40,-15,-70v-2,-19,-35,-13,-52,-18v-2,0,-13,1,-34,3v-4,0,-10,11,-13,31v-3,20,1,43,-11,54v-12,-4,-13,-5,-21,-3v-13,-13,-3,-25,-12,-41v7,-6,12,-22,10,-39v-23,-8,-79,15,-87,-21v12,-28,78,-4,101,-20r36,-96v8,-19,17,-28,27,-28v10,0,15,6,15,18v-6,32,-31,62,-38,109v25,10,47,-1,71,10",w:282},"π":{d:"247,-240v-3,5,-14,12,-21,6v-41,5,-71,-4,-85,37v-6,7,-21,42,-25,61v28,12,104,-16,129,24v8,11,12,24,12,38v-7,17,-2,99,-40,68v-9,-23,-5,-47,-1,-73v3,-24,-40,-24,-50,-19v-4,0,-18,2,-44,6v-30,-6,-16,49,-33,58v-19,-11,-14,2,-29,-10v8,-71,20,-114,43,-170v-24,-2,-49,4,-73,7v-30,3,-32,-33,-7,-36r184,-22v17,-1,40,13,40,25",w:265},"∫":{d:"62,-151v-7,-70,20,-130,63,-150v28,1,39,10,70,23v20,8,6,33,-6,35v-29,-13,-45,-20,-49,-20v-20,-4,-45,51,-43,70v8,60,5,129,5,189v0,62,-27,93,-79,93v-37,-1,-71,-14,-63,-57v21,0,79,34,91,-2v16,-3,14,-64,21,-85v-2,-31,-1,-74,-10,-96",w:156},"ª":{d:"6,-265v1,-31,58,-53,80,-22v-11,14,25,28,25,36v-2,8,-15,12,-27,10v-22,-29,-68,19,-78,-24xm52,-281v-8,1,-24,10,-9,13v11,1,24,-10,9,-13",w:117},"º":{d:"13,-273v1,-31,56,-41,83,-18v36,8,14,48,-9,52v-35,6,-64,-5,-74,-34xm81,-269v-7,-7,-20,-11,-29,-6v5,13,13,11,29,6",w:128},"Ω":{d:"121,-111v9,16,43,-5,54,5v28,-4,62,8,81,-5v48,-33,166,-28,160,44v15,34,-51,53,-88,53v-34,0,-53,-21,-71,-37v-15,7,-32,-4,-28,-22v-26,-4,-93,-6,-108,8v8,17,5,37,12,54v-1,15,-18,15,-31,10v-9,-15,-20,-39,-19,-63v-20,-9,-73,15,-79,-18v4,-28,50,-11,77,-24v12,-99,36,-168,137,-178v35,5,64,20,67,57v0,13,-14,18,-20,5v-15,-35,-83,-31,-104,4v-26,20,-39,82,-40,107xm334,-45v15,2,51,-14,53,-22v-7,-20,-36,-31,-69,-29v-8,-1,-39,6,-37,14v-3,10,44,38,53,37",w:424},"æ":{d:"145,-44r33,7v2,42,-59,29,-85,16v-6,7,-35,24,-48,15v-19,2,-35,-21,-33,-37v2,-24,5,-19,28,-36v-6,-8,-45,3,-33,-21v21,-22,58,-12,85,-1v6,-5,35,-28,45,-15v20,-4,36,17,36,35v0,23,-4,21,-28,37xm111,-72v12,3,49,-16,19,-17v-5,0,-20,12,-19,17xm74,-50v-14,-4,-48,16,-19,17v4,1,19,-14,19,-17",w:184},"ø":{d:"76,-136v17,7,33,-8,51,0v9,-6,21,-13,36,-21v23,22,-13,31,3,50v11,13,4,21,14,35v-4,5,-1,14,-4,23v-14,23,-45,41,-84,39v-12,2,-29,28,-41,38v-2,-11,-34,-10,-15,-30v3,-7,5,-11,5,-11v-15,-24,-60,-54,-22,-89v23,-21,25,-32,57,-34xm102,-54v18,1,50,-19,30,-32v-12,7,-22,18,-30,32xm85,-92v-14,3,-26,8,-38,17v2,20,17,13,26,0v6,-8,12,-13,12,-17",w:188},"¿":{d:"181,-247v3,1,31,2,29,15v-4,22,-37,27,-41,4v1,-5,7,-20,12,-19xm161,-34v-45,-1,-105,19,-124,51v0,11,18,17,54,17v39,0,82,-13,112,4v-10,35,-58,31,-100,31v-47,0,-80,-10,-99,-31v-10,-56,22,-73,64,-90v8,-3,32,-9,74,-18v21,-15,7,-62,22,-92v-1,-5,-1,-11,4,-12v16,0,24,7,24,22v-8,30,-8,73,-17,111v-3,5,-7,7,-14,7",w:213},"¡":{d:"86,-197v8,16,-7,41,-24,25v-11,-11,-4,-16,-3,-29v13,0,15,-2,27,4xm46,-107v4,-8,11,-16,23,-7v19,26,-5,57,-6,87v-7,0,-5,18,-9,28v0,14,-17,52,-11,70v-2,7,-15,28,-25,12v-4,-6,-15,-7,-6,-16v2,-39,14,-96,34,-174",w:95},"¬":{d:"141,-99v47,7,103,-3,149,6v14,24,18,15,10,39v-10,34,-7,31,-26,76v-4,6,-15,8,-16,21v-4,2,-4,1,-13,5v-22,-33,-4,-33,16,-104v-5,-9,-28,-4,-38,-6r-183,4v-14,0,-41,-29,-17,-36v31,-9,82,5,118,-5",w:315},"√":{d:"364,-218v43,-21,80,-51,104,-32v-3,19,-24,21,-44,40v-41,15,-78,53,-136,78r-137,98v-20,16,-79,66,-91,68v-3,1,-25,-11,-24,-13v-4,-28,-43,-61,-30,-85v26,-15,42,19,58,32r295,-188v0,1,2,2,5,2",w:474},"ƒ":{d:"115,-262v-23,6,-39,63,-38,96v1,3,57,2,54,16v1,22,-45,15,-51,30v3,34,12,68,10,103v14,17,-18,53,-28,63v-48,8,-89,5,-95,-37v20,-5,77,21,83,-18v17,-29,-4,-61,0,-98v0,-5,-3,-10,-7,-17v-33,4,-43,-17,-25,-37v10,-4,27,5,27,-10v0,-43,15,-77,32,-109v12,-7,16,-22,38,-20v11,1,51,35,25,55v-9,1,-16,-17,-25,-17",w:145},"≈":{d:"133,-112v21,15,48,-30,78,-17v3,3,5,7,5,9v-8,30,-47,45,-76,45v-19,0,-64,-48,-90,-21r-29,20v-6,-1,-17,-16,-15,-32v24,-17,70,-42,107,-21v4,4,10,9,20,17xm138,-57v28,2,48,-25,76,-26v13,30,-21,42,-40,53v-41,24,-77,-15,-114,-23v-15,14,-46,32,-49,-1v-3,-9,27,-28,54,-30",w:223},"∆":{d:"18,-1v-24,-30,8,-48,25,-71v14,-19,34,-28,40,-56v20,-35,29,-14,57,4v9,39,43,62,57,102v0,16,-34,17,-50,14v-28,2,-72,4,-129,7xm139,-47r-22,-52v-12,-5,-12,15,-24,27v-7,6,-14,16,-23,28v23,1,36,-1,69,-3",w:199},"«":{d:"191,-64v16,6,87,37,53,63v-39,-9,-71,-28,-107,-40v-14,-13,-13,-34,10,-47v27,-15,48,-55,84,-62v9,-2,21,10,21,18r-13,21v-16,5,-44,22,-51,41v0,4,1,6,3,6xm71,-65v17,6,87,35,55,62v-39,-8,-66,-27,-108,-40v-14,-13,-13,-36,10,-46v23,-18,50,-56,84,-63v9,-2,21,10,21,18r-13,22v-20,6,-32,17,-51,37v0,3,-1,11,2,10",w:265},"»":{d:"120,-129v9,-33,48,-10,64,5v9,20,86,52,50,86v-36,11,-66,31,-107,40v-6,-7,-9,-13,-9,-17v-2,-13,50,-46,63,-46v11,-18,-33,-42,-48,-47xm1,-128v10,-33,46,-8,64,6v8,19,86,50,51,85v-40,13,-69,30,-108,40v-6,-7,-8,-12,-8,-16v-2,-14,50,-46,63,-47v7,-13,-9,-20,-19,-30v-10,-9,-20,-15,-30,-17",w:252},"…":{d:"244,-24v-1,21,-38,32,-41,3v-2,-19,23,-22,34,-17v0,7,0,15,7,14xm113,-24v0,-22,28,-21,38,-8v5,34,-39,40,-38,8xm35,-2v-10,-2,-36,-17,-18,-29v-1,-15,17,-17,31,-6v7,17,6,33,-13,35",w:258}," ":{w:179},"À":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm150,-268v14,10,54,14,37,41v-28,-7,-62,-22,-100,-42v-2,-3,-2,-26,5,-23v16,4,42,17,58,24"},"Ã":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm100,-285v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-9,22,-17,31,-12v3,11,-9,9,-7,21v-26,20,-46,30,-59,30v-3,3,-50,-26,-49,-29v-12,1,-31,35,-51,32v-3,-8,-5,-14,-5,-18v10,-9,16,-17,37,-33"},"Õ":{d:"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm116,-270v26,-19,54,19,69,22v4,0,15,-5,34,-13v23,-10,22,-16,31,-12v3,11,-8,9,-7,21v-45,28,-47,42,-88,16v-29,-19,-12,-20,-43,2v-8,5,-12,18,-23,15v-13,-3,-12,-20,-4,-23v4,-6,14,-15,31,-28",w:273},"Œ":{d:"247,-243v71,4,161,-7,245,-8v17,0,27,6,27,17v-8,27,-70,14,-104,23v-3,1,-52,0,-65,7r0,4v16,16,17,29,17,65v32,10,74,-14,99,16v-14,25,-76,17,-127,24v-17,18,-55,32,-75,51v85,0,128,-3,204,-11v15,-2,21,11,20,29v-78,24,-177,12,-270,24v-24,3,-24,-29,-48,-15v-46,7,-70,4,-105,-4v-19,-18,-42,-22,-52,-55v-10,-34,0,-47,12,-78v-18,-59,48,-78,105,-84v17,-18,103,-13,117,-5xm125,-45v76,-9,186,-43,209,-105v-26,-67,-137,-83,-217,-54v3,34,-45,25,-60,58v-41,48,5,108,68,101",w:492},"œ":{d:"185,-54v25,28,107,-17,104,33v-12,12,-60,14,-87,14v0,0,1,1,2,1v-11,1,-39,-9,-50,-17v-28,17,-75,32,-114,7v-22,-14,-34,-11,-34,-41v0,-36,33,-49,48,-75v29,-16,72,-3,95,11v12,-9,48,-27,59,-26v30,0,64,15,65,40v0,7,-6,20,-20,37v-29,1,-44,11,-68,16xm226,-106v-21,-7,-41,-2,-48,13v14,1,42,-7,48,-13xm132,-87v-21,-35,-94,11,-92,24v-2,14,43,21,61,21v25,0,36,-20,31,-45",w:295},"–":{d:"6,-66v-8,-72,79,-21,146,-39v37,-10,79,7,111,0v9,8,14,13,14,17v2,26,-72,13,-99,21v-83,4,-124,21,-172,1",w:282},"—":{d:"175,-106v86,-9,201,1,286,-1v11,6,13,11,6,30v-118,15,-246,10,-377,10v-25,0,-73,3,-82,-8r-2,-26v11,-13,32,-9,52,-7v38,3,84,-5,117,2",w:485},"“":{d:"66,-261v-21,5,-37,51,-22,77v0,4,-2,6,-7,6v-31,-9,-38,-62,-12,-94v12,-15,21,-28,31,-34v16,-1,19,24,22,34v10,-11,22,-32,43,-23v-2,8,4,16,5,19v-6,11,-51,53,-29,74v-12,21,-30,5,-33,-17v-6,-13,9,-28,2,-42",w:118},"”":{d:"120,-294v12,3,30,26,19,34v2,15,-40,70,-55,66v-40,-10,10,-51,14,-64v3,-3,8,-31,22,-36xm70,-306v14,3,26,34,16,49v-19,30,-31,45,-58,59v-12,-11,-33,-17,-7,-36v13,-19,36,-27,36,-59v0,-5,9,-13,13,-13",w:148},"‘":{d:"73,-262v-10,7,-41,39,-38,69v-15,13,-27,-16,-28,-28v-2,-20,51,-83,66,-83v20,0,25,41,0,42",w:95},"’":{d:"74,-300v13,31,-1,99,-44,101v-13,0,-19,-5,-19,-15v6,-10,31,-34,35,-59v2,-11,1,-32,11,-32v6,0,11,2,17,5",w:90},"÷":{d:"167,-158v-4,3,-7,9,-10,20v-23,4,-34,-8,-29,-31v14,-6,18,1,39,11xm78,-72v-53,11,-53,12,-69,-15v-1,-12,11,-17,22,-14v71,-13,151,-18,230,-24v11,1,21,16,23,28v-28,20,-90,11,-126,16v-36,5,-62,5,-80,9xm123,-40v19,-17,41,-1,41,17v0,13,-6,19,-17,19v-15,0,-29,-14,-24,-36",w:293},"◊":{d:"76,-158v48,-8,64,11,100,36v28,19,-5,39,-22,54v-15,13,-40,32,-48,49v-17,5,-12,0,-27,-16v-6,-6,-86,-31,-68,-53r2,-9v27,-23,48,-44,63,-61xm93,-65v12,-2,35,-31,41,-38v-5,-10,-16,-14,-34,-24v-12,12,-36,29,-40,44v19,11,30,18,33,18",w:199},"ÿ":{d:"118,85v-11,11,-11,38,-22,61v-2,-1,-2,31,-17,27v-11,0,-21,-10,-21,-22v20,-66,23,-61,64,-168v-22,1,-38,16,-58,4v-22,4,-51,-16,-51,-42v-11,-13,-7,-59,7,-58v16,1,21,24,22,51v21,33,66,5,94,-7v4,-3,26,-14,38,-29r17,0v23,44,-23,59,-34,102v-6,9,-13,9,-13,26v-15,6,-12,33,-27,48v0,2,1,4,1,7xm158,-136v0,8,-4,13,-12,13v-18,0,-21,-20,-16,-34v18,-1,29,1,28,21xm62,-161v7,3,28,9,27,18v1,8,-8,17,-17,17v-18,0,-26,-24,-10,-35",w:190},"Ÿ":{d:"176,-189v35,20,-25,54,-39,72v-26,34,-57,57,-74,104v-10,15,-4,14,-23,3r0,-10v19,-44,27,-46,50,-81v-9,-5,-24,4,-34,4v-38,0,-54,-50,-44,-87v21,-5,18,19,22,35v4,18,15,27,29,27v41,0,60,-39,113,-67xm153,-222v0,8,-3,12,-11,12v-18,0,-21,-19,-16,-33v18,-1,28,2,27,21xm57,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18",w:135},"⁄":{d:"193,-305v7,6,17,31,3,41v-10,7,-12,13,-21,25v-79,56,-190,209,-197,260r-18,0v-23,-19,9,-70,15,-85v52,-83,121,-179,218,-241",w:120},"¤":{d:"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30",w:312},"€":{d:"308,-133r-200,16v-2,1,-6,4,-10,10v70,-2,144,-14,211,-8v3,0,8,4,13,8v-1,4,-3,9,-9,17v-57,11,-164,6,-219,25v26,32,112,25,173,25v9,0,35,2,35,19v0,9,-4,13,-12,14v-115,12,-146,23,-211,-19v-12,-4,-22,-9,-25,-27v-6,-29,-61,3,-43,-49v17,-1,36,7,42,-12v-32,7,-36,-39,-11,-40v29,14,63,-25,73,-30v52,-25,72,-44,142,-44v23,0,21,41,-1,39v-35,-3,-61,9,-102,31v2,2,5,4,8,4v18,-6,101,-9,115,-9v7,0,55,13,31,30",w:312},"‹":{d:"64,-107v9,17,86,17,87,43v0,11,-4,16,-13,16v-36,-11,-70,-22,-109,-31v-19,-4,-18,-14,-9,-36v59,-56,93,-84,101,-84v17,0,19,20,13,29",w:159},"›":{d:"41,-181v26,27,112,44,70,91r-82,60v-20,3,-25,-23,-13,-32r70,-51r-66,-46v-5,-6,-4,-28,5,-29v4,2,9,4,16,7",w:137},"":{d:"74,-74v-6,-24,-70,8,-68,-27v0,-6,6,-20,20,-18v44,6,45,-9,42,-49v7,-40,26,-114,90,-104v48,-2,63,-1,90,30v11,25,4,14,2,44v-7,17,-54,9,-49,-7r8,-21v-5,-13,-22,-9,-43,-11v-56,-6,-63,45,-67,92v-2,21,5,23,22,22v37,-1,80,-9,113,-1v13,31,-9,82,-22,106v-13,10,-26,-6,-22,-25r11,-46v0,-3,-2,-6,-6,-6v-19,0,-47,3,-83,9v-6,1,-9,4,-8,11r12,59v-1,9,-11,30,-23,18v-18,-18,-15,-59,-19,-76",w:272},"":{d:"43,-61v-21,4,-36,2,-39,-15v-4,-35,41,-8,34,-47v4,-59,12,-99,46,-124v11,-42,157,-47,149,13v1,7,-7,15,-13,15v-18,-7,-19,-26,-47,-23v-34,3,-65,6,-79,37v-12,27,-22,52,-21,91v13,9,31,-11,45,-4v32,-15,50,-6,94,-13v12,-30,19,-79,36,-133v1,-5,5,-8,12,-8v44,18,-18,106,-12,144v-9,22,-1,73,-16,104v2,28,-23,28,-37,16v1,-26,9,-48,11,-75v0,-6,-3,-9,-9,-9v-43,0,-83,8,-119,24v8,40,17,33,-7,56v-20,-9,-21,-19,-28,-49",w:283},"‡":{d:"102,-284v16,2,42,-2,33,18v-7,15,-42,1,-38,30v3,3,31,1,30,11v4,15,-29,19,-36,24v-2,18,-4,24,-16,29r-25,-26v-25,7,-53,3,-42,-25v4,-10,70,0,51,-22v-17,4,-41,12,-39,-15v-5,-16,39,-18,44,-20v4,-2,7,-10,10,-24v19,-3,23,6,28,20",w:145},"∙":{d:"57,-77v6,18,-7,21,-19,23v-34,6,-25,-40,-9,-43v18,-3,29,8,28,20",w:67},"‚":{d:"25,63v-26,21,-48,-2,-22,-24v14,-12,35,-40,35,-69v3,-2,3,-11,12,-9v35,17,5,88,-25,102",w:97},"„":{d:"25,63v-26,21,-48,-2,-22,-24v11,-9,36,-41,35,-69v3,-2,4,-12,12,-9v36,14,5,89,-25,102xm84,64v-24,20,-45,-1,-21,-24v21,-20,32,-35,35,-69v3,-2,3,-11,12,-9v36,17,9,86,-26,102",w:135},"‰":{d:"398,-131v58,-1,87,13,72,65v-1,30,-66,63,-99,65v-56,3,-99,-58,-62,-102v2,2,5,2,8,2v20,-16,51,-17,81,-30xm202,-279v33,0,94,-24,95,18v-7,31,-33,27,-54,55v-36,32,-71,74,-112,99v-18,18,-40,34,-51,58v-19,14,-25,37,-56,40v-17,2,-25,-29,-10,-40v15,-11,40,-37,52,-52r87,-72v-51,13,-100,6,-116,-27v1,-5,-6,-30,-9,-36v-3,-5,22,-41,27,-39v29,2,16,34,5,49v0,15,14,23,42,23v42,0,59,-31,28,-38v-17,-4,-53,3,-50,-23v0,-7,1,-12,4,-16v16,-9,36,4,49,5v0,0,23,-4,69,-4xm222,-118v33,-2,55,18,50,57v-29,36,-48,45,-96,50v-27,-5,-56,-17,-58,-51v13,-37,64,-43,104,-56xm335,-61v13,44,101,7,108,-31v-11,-3,-20,-4,-30,-4v-18,-1,-82,18,-78,35xm225,-244v-18,0,-29,-1,-46,3v7,15,6,28,0,43v15,-14,34,-30,46,-46xm164,-53v26,5,59,-10,76,-26v-17,-16,-49,2,-67,14v1,8,-8,6,-9,12",w:485},"Â":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm202,-219v-27,-6,-40,-26,-61,-37v-21,7,-39,46,-65,23v-2,-4,-3,-10,-4,-14v19,-4,43,-32,61,-43v27,6,40,22,62,37v12,8,18,17,18,25v0,6,-3,9,-11,9"},"Ê":{d:"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm199,-211v-27,-6,-39,-26,-60,-37v-21,7,-40,47,-65,22v-2,-7,-2,-7,-4,-13v18,-5,44,-31,61,-43v27,6,41,22,62,37v12,9,18,17,18,25v0,6,-4,9,-12,9",w:252},"Á":{d:"161,-217v20,53,23,124,54,170v-2,20,-34,9,-42,0v-27,-12,-78,-18,-101,-18v-26,6,-29,51,-54,63v-18,-4,-19,-30,-3,-38v5,-9,15,-16,8,-29v1,-12,23,-9,26,-19v6,-10,11,-20,20,-27r70,-121v12,-4,16,4,22,19xm82,-91v17,3,62,7,86,13v-13,-33,-13,-80,-29,-109v-15,30,-38,63,-57,96xm84,-250v31,-5,83,-53,100,-31v0,5,-11,15,-35,28v-16,5,-51,28,-53,25v-14,1,-16,-11,-12,-22"},"Ë":{d:"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-17,41,-17,51v55,0,112,-21,169,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-3,-21,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm191,-236v0,8,-4,13,-12,13v-17,0,-19,-19,-16,-34v18,-1,29,1,28,21xm95,-261v7,3,29,9,28,18v0,7,-9,17,-18,17v-18,0,-26,-25,-10,-35",w:252},"È":{d:"49,-160v1,-4,-10,-9,-15,-8v-15,-35,32,-30,57,-31r142,-8v2,1,30,7,40,10v-52,16,-133,17,-190,30v-7,9,-12,24,-15,47v26,10,102,-6,141,3v1,3,1,6,2,10v-36,18,-92,12,-149,21v-11,9,-16,41,-16,51v55,-1,111,-21,168,-13v15,-8,48,1,31,18v-53,16,-130,13,-198,29r-39,-8v-4,-19,17,-53,20,-76v-1,0,-7,-11,-9,-18v18,-7,22,-28,30,-57xm184,-236v6,9,5,13,0,23v-28,-7,-62,-21,-100,-41v-3,-2,-3,-27,5,-23v34,11,60,25,95,41",w:252},"Í":{d:"26,-5v-9,-6,-9,-12,-9,-36v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76v-2,1,-2,0,-7,4xm6,-233v31,-6,83,-53,101,-31v2,11,-80,53,-89,53v-14,1,-14,-11,-12,-22",w:104},"Î":{d:"53,-9v-15,7,-16,-3,-16,-32v0,-71,7,-119,21,-144v8,-13,14,-20,19,-20v28,19,-7,89,-10,120v-2,21,-8,47,-14,76xm137,-209v-27,-6,-40,-26,-61,-37v-8,0,-9,4,-13,10v-11,13,-50,37,-56,0v18,-5,43,-32,61,-43v28,5,40,21,62,36v12,9,18,17,18,25v0,6,-4,9,-11,9",w:144},"Ï":{d:"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm111,-222v0,8,-4,12,-12,12v-18,0,-19,-19,-16,-33v18,-1,29,1,28,21xm15,-247v8,2,29,9,28,17v0,21,-37,24,-36,1v0,-7,2,-13,8,-18",w:110},"Ì":{d:"33,-5v-9,-6,-9,-12,-9,-36v0,-71,8,-119,22,-144v8,-13,14,-20,19,-20v27,20,-11,87,-10,120r-15,76v-1,1,-4,2,-7,4xm72,-247v7,6,55,15,36,40v-28,-7,-61,-21,-99,-41v-3,-2,-3,-27,5,-23v18,3,41,17,58,24",w:111},"Ó":{d:"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm142,-250v27,-11,47,-32,59,-14v2,11,-80,53,-89,53v-13,1,-15,-11,-12,-21v10,-5,24,-11,42,-18",w:273},"Ô":{d:"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm157,-282v17,18,52,34,54,63v-24,12,-52,-36,-53,-29r-42,34v-23,-4,-6,-31,5,-34v1,1,27,-37,36,-34",w:273},"":{d:"231,-188v31,-74,91,-99,188,-116v28,1,6,39,1,51v-20,52,-100,91,-148,126v2,4,6,7,12,10v42,-42,181,-41,166,46v-1,8,-19,8,-28,5v-43,1,-168,42,-106,86v15,16,33,28,61,39v0,10,0,17,-6,22v-8,8,-35,26,-78,51v-52,7,-128,22,-154,-17v-23,-35,-99,-35,-117,-77v-29,-68,25,-149,75,-175v44,-23,89,5,135,13v14,-26,2,-39,-1,-64",w:461},"Ò":{d:"62,-184v78,-31,249,-50,238,74v-6,65,-102,105,-179,115v-77,-7,-152,-71,-101,-149v2,-5,24,-33,42,-40xm279,-120v14,-38,-47,-64,-85,-61v-20,-9,-41,7,-62,0v-11,7,-54,12,-66,24v0,20,-51,35,-38,66v-1,43,50,67,96,67v44,0,162,-55,155,-96xm161,-262v14,10,52,13,37,41v-28,-7,-62,-21,-100,-41v-3,-3,-3,-26,5,-24v16,5,42,17,58,24",w:273},"Ú":{d:"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm194,-265v3,-1,11,4,11,6v3,12,-81,52,-89,54v-14,0,-13,-9,-12,-22",w:262},"Û":{d:"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm150,-266v24,11,58,27,73,46v0,5,-3,6,-10,6v-28,2,-61,-30,-63,-25v-10,0,-57,40,-69,23v3,-10,-8,-15,8,-19v17,-1,34,-29,61,-31",w:262},"Ù":{d:"281,-202v6,67,-30,121,-71,152v-3,14,-47,26,-60,39v-41,20,-110,1,-125,-26v-24,-44,-28,-84,-8,-127v12,-26,23,-38,37,-22v-2,2,-3,5,-3,10v-34,26,-30,116,5,134v22,32,86,-1,109,-8v38,-28,104,-64,97,-149v2,-10,7,-8,19,-3xm151,-243v14,10,54,14,37,41v-28,-7,-61,-22,-99,-42v-3,-2,-4,-25,4,-23v16,5,42,17,58,24",w:262},"ı":{d:"43,-103v21,4,16,56,11,100v-7,2,-11,1,-20,-5v0,-7,-13,-18,-11,-25v4,-23,-3,-68,20,-70",w:80},"ˆ":{d:"144,-220v-29,0,-41,-27,-63,-39v-8,0,-11,5,-15,11v-17,12,-32,31,-54,13v-2,-5,-3,-9,-4,-14v20,-5,45,-33,64,-45v28,6,43,23,65,38v12,9,19,19,19,27v0,6,-4,9,-12,9",w:165},"˜":{d:"47,-300v26,-21,57,19,72,23v4,0,16,-5,36,-14v24,-10,22,-16,32,-13v3,12,-7,11,-7,23v-27,21,-48,32,-62,32v-3,2,-52,-27,-51,-31v-12,-2,-34,40,-54,33v-4,-13,-8,-18,1,-24v5,-7,16,-15,33,-29",w:186},"¯":{d:"63,-295v28,-7,73,10,105,7v11,1,6,8,5,19v-37,21,-72,11,-136,11v-23,0,-31,-14,-27,-36v12,-15,40,0,53,-1",w:183},"˘":{d:"65,-269v20,-11,45,-31,74,-36v20,30,-42,40,-59,66v-5,6,-11,8,-18,8v-8,-3,-45,-32,-51,-54v5,-24,14,-13,34,1",w:158},"˙":{d:"23,-302v15,-13,32,1,32,18v1,22,-36,29,-39,4v0,0,3,-7,7,-22",w:70},"˚":{d:"23,-225v-43,-24,-11,-85,41,-78v16,2,31,4,46,17v32,54,-41,86,-87,61xm33,-257v2,20,57,11,57,-6v0,-6,-11,-9,-33,-12v-14,-2,-24,13,-24,18",w:123},"¸":{d:"74,16v32,2,49,14,55,36v-3,7,-14,31,-29,33v-28,4,-57,11,-88,14v-19,-6,-13,-31,8,-33v20,-1,59,-5,73,-14v-17,-14,-68,8,-53,-37v9,-10,2,-28,24,-30v8,8,13,17,10,31",w:129},"˝":{d:"91,-249v15,-11,38,-53,57,-29v0,9,0,14,-3,23v-2,3,-20,22,-54,55v-5,5,-10,8,-16,8v-17,2,-6,-22,-7,-31v-1,0,-2,0,-4,1v-17,21,-29,31,-50,27v-5,-18,-3,-15,3,-27v23,-27,40,-46,48,-59v7,-12,31,3,29,9v-1,14,-3,24,-13,31v4,4,9,-1,10,-8",w:151},"˛":{d:"82,-5v-8,12,-16,55,-21,75v0,4,2,7,7,7v6,0,22,-7,50,-20v8,0,12,7,12,20v-2,22,-6,14,-27,30v-15,12,-26,16,-30,16v-47,-8,-59,-14,-56,-75v8,-27,12,-54,25,-77v19,-21,35,15,40,24",w:138},"ˇ":{d:"39,-286v33,46,63,-4,96,-16v6,0,9,6,9,19v0,24,-49,46,-77,46v-32,0,-52,-28,-59,-48v0,-25,23,-17,31,-1",w:153},"\r":{w:179}}}),function(){"use strict";function t(t){this.message=t}function e(e,n){if(!e)throw new t(n)}function n(t){return t.x+t.width/2}var r=Diagram.PLACEMENT,i=Diagram.LINETYPE,o=Diagram.ARROWTYPE,s={stroke:"#000","stroke-width":2},a={fill:"#fff"};t.prototype.toString=function(){return"AssertException: "+this.message},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Raphael.fn.line=function(t,n,r,i){return e(_.all([t,r,n,i],_.isFinite),"x1,x2,y1,y2 must be numeric"),this.path("M{0},{1} L{2},{3}",t,n,r,i)},Raphael.fn.wobble=function(t,n,r,i){e(_.all([t,r,n,i],_.isFinite),"x1,x2,y1,y2 must be numeric");var o=Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))/25,s=Math.random(),a=Math.random(),l=Math.random()>.5?o:-o,c=Math.random()>.5?o:-o;return"C"+((r-t)*s+t+l)+","+((i-n)*s+n+c)+" "+((r-t)*a+t-l)+","+((i-n)*a+n-c)+" "+r+","+i},Raphael.fn.text_bbox=function(t,e){var n;e._obj?n=this.print_center(0,0,t,e._obj,e["font-size"]):(n=this.text(0,0,t)).attr(e);var r=n.getBBox();return n.remove(),r},Raphael.fn.handRect=function(t,n,r,i){return e(_.all([t,n,r,i],_.isFinite),"x, y, w, h must be numeric"),this.path("M"+t+","+n+this.wobble(t,n,t+r,n)+this.wobble(t+r,n,t+r,n+i)+this.wobble(t+r,n+i,t,n+i)+this.wobble(t,n+i,t,n)).attr(a)},Raphael.fn.handLine=function(t,n,r,i){return e(_.all([t,r,n,i],_.isFinite),"x1,x2,y1,y2 must be numeric"),this.path("M"+t+","+n+this.wobble(t,n,r,i))},Raphael.fn.print_center=function(t,e,n,r,i,o){var s=this.print(t,e,n,r,i,"baseline",o),a=s.getBBox(),l=t-a.x-a.width/2,c=e-a.y-a.height/2,u=new Raphael.matrix;return u.translate(l,c),s.attr("path",Raphael.mapPath(s.attr("path"),u))};var l=function(t){this.init(t)};_.extend(l.prototype,{init:function(t){this.diagram=t,this._paper=void 0,this._font=void 0,this._title=void 0,this._actors_height=0,this._signals_height=0;var e=this.arrow_types={};e[o.FILLED]="block",e[o.OPEN]="open";var n=this.line_types={};n[i.SOLID]="",n[i.DOTTED]="-"},init_paper:function(t){this._paper=new Raphael(t,320,200)},init_font:function(){},draw_line:function(t,e,n,r){return this._paper.line(t,e,n,r)},draw_rect:function(t,e,n,r){return this._paper.rect(t,e,n,r)},draw:function(t){var e=this.diagram;this.init_paper(t),this.init_font(),this.layout();var n=this._title?this._title.height:0;this._paper.setStart(),this._paper.setSize(e.width,e.height);var r=10+n;this.draw_title(),this.draw_actors(r),this.draw_signals(r+this._actors_height),this._paper.setFinish()},layout:function(){function t(t,n,r){e(n>t,"a must be less than or equal to b"),0>t?(n=s[n]).x=Math.max(r-n.width/2,n.x):n>=s.length?(t=s[t]).padding_right=Math.max(r,t.padding_right):(t=s[t]).distances[n]=Math.max(r,t.distances[n]?t.distances[n]:0)}var n=this.diagram,i=this._paper,o=this._font,s=n.actors,a=n.signals;if(n.width=0,n.height=0,n.title){var l=this._title={},c=i.text_bbox(n.title,o);l.text_bb=c,l.message=n.title,l.width=c.width+10,l.height=c.height+10,l.x=10,l.y=10,n.width+=l.width,n.height+=l.height}_.each(s,function(t){var e=i.text_bbox(t.name,o);t.text_bb=e,t.x=0,t.y=0,t.width=e.width+40,t.height=e.height+40,t.distances=[],t.padding_right=0,this._actors_height=Math.max(t.height,this._actors_height)},this),_.each(a,function(e){var n,s,a=i.text_bbox(e.message,o);e.text_bb=a,e.width=a.width,e.height=a.height;var l=0;if("Signal"==e.type)e.width+=20,e.height+=20,e.isSelf()?(s=(n=e.actorA.index)+1,e.width+=20):(n=Math.min(e.actorA.index,e.actorB.index),s=Math.max(e.actorA.index,e.actorB.index));else{if("Note"!=e.type)throw new Error("Unhandled signal type:"+e.type);if(e.width+=30,e.height+=30,l=20,e.placement==r.LEFTOF)n=(s=e.actor.index)-1;else if(e.placement==r.RIGHTOF)s=(n=e.actor.index)+1;else if(e.placement==r.OVER&&e.hasManyActors())n=Math.min(e.actor[0].index,e.actor[1].index),s=Math.max(e.actor[0].index,e.actor[1].index),l=-40;else if(e.placement==r.OVER)return t((n=e.actor.index)-1,n,e.width/2),t(n,n+1,e.width/2),void(this._signals_height+=e.height)}t(n,s,e.width+l),this._signals_height+=e.height},this);var u=0;return _.each(s,function(t){t.x=Math.max(u,t.x),_.each(t.distances,function(e,n){void 0!==e&&(n=s[n],e=Math.max(e,t.width/2,n.width/2),n.x=Math.max(n.x,t.x+t.width/2+e-n.width/2))}),u=t.x+t.width+t.padding_right},this),n.width=Math.max(u,n.width),n.width+=20,n.height+=20+2*this._actors_height+this._signals_height,this},draw_title:function(){var t=this._title;t&&this.draw_text_box(t,t.message,0,5,this._font)},draw_actors:function(t){var e=t;_.each(this.diagram.actors,function(t){this.draw_actor(t,e,this._actors_height),this.draw_actor(t,e+this._actors_height+this._signals_height,this._actors_height);var r=n(t);this.draw_line(r,e+this._actors_height-10,r,e+this._actors_height+10+this._signals_height).attr(s)},this)},draw_actor:function(t,e,n){t.y=e,t.height=n,this.draw_text_box(t,t.name,10,10,this._font)},draw_signals:function(t){var e=t;_.each(this.diagram.signals,function(t){"Signal"==t.type?t.isSelf()?this.draw_self_signal(t,e):this.draw_signal(t,e):"Note"==t.type&&this.draw_note(t,e),e+=t.height},this)},draw_self_signal:function(t,r){e(t.isSelf(),"signal must be a self signal");var i=t.text_bb,o=n(t.actorA),a=o+20+5-i.x,l=r+t.height/2;this.draw_text(a,l,t.message,this._font);var c,u=_.extend({},s,{"stroke-dasharray":this.line_types[t.linetype]}),h=r+5,f=h+t.height-5;(c=this.draw_line(o,h,o+20,h)).attr(u),(c=this.draw_line(o+20,h,o+20,f)).attr(u),c=this.draw_line(o+20,f,o,f),u["arrow-end"]=this.arrow_types[t.arrowtype]+"-wide-long",c.attr(u)},draw_signal:function(t,e){var r=n(t.actorA),i=n(t.actorB),o=(i-r)/2+r,a=e+5+10;this.draw_text(o,a,t.message,this._font),a=e+t.height-5-5;var l=this.draw_line(r,a,i,a);l.attr(s),l.attr({"arrow-end":this.arrow_types[t.arrowtype]+"-wide-long","stroke-dasharray":this.line_types[t.linetype]})},draw_note:function(t,e){t.y=e;var i=n(t.hasManyActors()?t.actor[0]:t.actor);switch(t.placement){case r.RIGHTOF:t.x=i+10;break;case r.LEFTOF:t.x=i-10-t.width;break;case r.OVER:if(t.hasManyActors()){var o=n(t.actor[1]);t.x=i-20,t.width=o+20-t.x}else t.x=i-t.width/2;break;default:throw new Error("Unhandled note placement:"+t.placement)}this.draw_text_box(t,t.message,10,5,this._font)},draw_text:function(t,e,n,r){var i,o=this._paper,s=r||{};s._obj?i=o.print_center(t,e,n,s._obj,s["font-size"]):(i=o.text(t,e,n)).attr(s);var a=i.getBBox();o.rect(a.x,a.y,a.width,a.height).attr({fill:"#fff",stroke:"none"}),i.toFront()},draw_text_box:function(t,e,r,i,o){var a=t.x+r,l=t.y+r,c=t.width-2*r,u=t.height-2*r;this.draw_rect(a,l,c,u).attr(s),a=n(t),l=function(t){return t.y+t.height/2}(t),this.draw_text(a,l,e,o)}});var c=function(t){this.init(t)};_.extend(c.prototype,l.prototype,{init_font:function(){this._font={"font-size":16,"font-family":"Andale Mono, monospace"}}});var u=function(t){this.init(t)};_.extend(u.prototype,l.prototype,{init_font:function(){this._font={"font-size":16,"font-family":"daniel"},this._font._obj=this._paper.getFont("daniel")},draw_line:function(t,e,n,r){return this._paper.handLine(t,e,n,r)},draw_rect:function(t,e,n,r){return this._paper.handRect(t,e,n,r)}});var h={simple:c,hand:u};Diagram.prototype.drawSVG=function(t,e){if(!((e=_.defaults(e||{},{theme:"hand"})).theme in h))throw new Error("Unsupported theme: "+e.theme);new h[e.theme](this).draw(t)}}(),function(){function t(t,e,n){var r,i,o="M{0},{1}";for(r=2,i=2*n.length+2;i>r;r+=2)o+=" L{"+r+"},{"+(r+1)+"}";var s=[e.x,e.y];for(r=0,i=n.length;i>r;r++)s.push(n[r].x),s.push(n[r].y);var a=t.paper.path(o,s);a.attr("stroke",t.options["element-color"]),a.attr("stroke-width",t.options["line-width"]);var l=t.options.font,c=t.options["font-family"],u=t.options["font-weight"];return l&&a.attr({font:l}),c&&a.attr({"font-family":c}),u&&a.attr({"font-weight":u}),a}function e(t,e,n,r){var i,o;"[object Array]"!==Object.prototype.toString.call(n)&&(n=[n]);var s="M{0},{1}";for(i=2,o=2*n.length+2;o>i;i+=2)s+=" L{"+i+"},{"+(i+1)+"}";var a=[e.x,e.y];for(i=0,o=n.length;o>i;i++)a.push(n[i].x),a.push(n[i].y);var l=t.paper.path(s,a);l.attr({stroke:t.options["line-color"],"stroke-width":t.options["line-width"],"arrow-end":t.options["arrow-end"]});var c=t.options.font,u=t.options["font-family"],h=t.options["font-weight"];if(c&&l.attr({font:c}),u&&l.attr({"font-family":u}),h&&l.attr({"font-weight":h}),r){var f=t.paper.text(0,0,r),d=!1,p=n[0];e.y===p.y&&(d=!0);var v=0,g=0;v=e.x,g=e.y,d?(v+=t.options["text-margin"]/2,g-=t.options["text-margin"]):(v+=t.options["text-margin"]/2,g+=t.options["text-margin"]),f.attr({"text-anchor":"start","font-size":t.options["font-size"],fill:t.options["font-color"],x:v,y:g}),c&&f.attr({font:c}),u&&f.attr({"font-family":u}),h&&f.attr({"font-weight":h})}return l}function n(t,e,n,r,i,o,s,a){var l,c,u,h,f={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(l=(a-o)*(n-t)-(s-i)*(r-e))?f:(h=(n-t)*(c=e-o)-(r-e)*(u=t-i),c=((s-i)*c-(a-o)*u)/l,u=h/l,f.x=t+c*(n-t),f.y=e+c*(r-e),c>0&&1>c&&(f.onLine1=!0),u>0&&1>u&&(f.onLine2=!0),f)}function r(t,e){e=e||{},this.paper=new Raphael(t),this.options=d.defaults(e,f),this.symbols=[],this.lines=[],this.start=null}function i(t,e,n){this.chart=t,this.group=this.chart.paper.set(),this.symbol=n,this.connectedTo=[],this.symbolType=e.symbolType,this.flowstate=e.flowstate||"future",this.next_direction=e.next&&e.direction_next?e.direction_next:void 0,this.text=this.chart.paper.text(0,0,e.text),e.key&&(this.text.node.id=e.key+"t"),this.text.node.setAttribute("class",this.getAttr("class")+"t"),this.text.attr({"text-anchor":"start",x:this.getAttr("text-margin"),fill:this.getAttr("font-color"),"font-size":this.getAttr("font-size")});var r=this.getAttr("font"),i=this.getAttr("font-family"),o=this.getAttr("font-weight");r&&this.text.attr({font:r}),i&&this.text.attr({"font-family":i}),o&&this.text.attr({"font-weight":o}),e.link&&this.text.attr("href",e.link),e.target&&this.text.attr("target",e.target);var s=this.getAttr("maxWidth");if(s){for(var a=e.text.split(" "),l="",c=0,u=a.length;u>c;c++){var h=a[c];this.text.attr("text",l+" "+h),l+=this.text.getBBox().width>s?"\n"+h:" "+h}this.text.attr("text",l.substring(1))}if(this.group.push(this.text),n){var f=this.getAttr("text-margin");n.attr({fill:this.getAttr("fill"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*f,height:this.text.getBBox().height+2*f}),n.node.setAttribute("class",this.getAttr("class")),e.link&&n.attr("href",e.link),e.target&&n.attr("target",e.target),e.key&&(n.node.id=e.key),this.group.push(n),n.insertBefore(this.text),this.text.attr({y:n.getBBox().height/2}),this.initialize()}}function o(t,e){var n=t.paper.rect(0,0,0,0,20);(e=e||{}).text=e.text||"Start",i.call(this,t,e,n)}function s(t,e){var n=t.paper.rect(0,0,0,0,20);(e=e||{}).text=e.text||"End",i.call(this,t,e,n)}function a(t,e){var n=t.paper.rect(0,0,0,0);e=e||{},i.call(this,t,e,n)}function l(t,e){var n=t.paper.rect(0,0,0,0);e=e||{},i.call(this,t,e,n),n.attr({width:this.text.getBBox().width+4*this.getAttr("text-margin")}),this.text.attr({x:2*this.getAttr("text-margin")});var r=t.paper.rect(0,0,0,0);r.attr({x:this.getAttr("text-margin"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*this.getAttr("text-margin"),height:this.text.getBBox().height+2*this.getAttr("text-margin"),fill:this.getAttr("fill")}),e.key&&(r.node.id=e.key+"i");var o=this.getAttr("font"),s=this.getAttr("font-family"),a=this.getAttr("font-weight");o&&r.attr({font:o}),s&&r.attr({"font-family":s}),a&&r.attr({"font-weight":a}),e.link&&r.attr("href",e.link),e.target&&r.attr("target",e.target),this.group.push(r),r.insertBefore(this.text),this.initialize()}function c(e,n){n=n||{},i.call(this,e,n),this.textMargin=this.getAttr("text-margin"),this.text.attr({x:3*this.textMargin});var r=this.text.getBBox().width+4*this.textMargin,o=this.text.getBBox().height+2*this.textMargin,s=this.textMargin,a=o/2,l=t(e,{x:s,y:a},[{x:s-this.textMargin,y:o},{x:s-this.textMargin+r,y:o},{x:s-this.textMargin+r+2*this.textMargin,y:0},{x:s-this.textMargin+2*this.textMargin,y:0},{x:s,y:a}]);l.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),n.link&&l.attr("href",n.link),n.target&&l.attr("target",n.target),n.key&&(l.node.id=n.key),l.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:l.getBBox().height/2}),this.group.push(l),l.insertBefore(this.text),this.initialize()}function u(e,n){n=n||{},i.call(this,e,n),this.textMargin=this.getAttr("text-margin"),this.yes_direction="bottom",this.no_direction="right",n.yes&&n.direction_yes&&n.no&&!n.direction_no?"right"===n.direction_yes?(this.no_direction="bottom",this.yes_direction="right"):(this.no_direction="right",this.yes_direction="bottom"):n.yes&&!n.direction_yes&&n.no&&n.direction_no?"right"===n.direction_no?(this.yes_direction="bottom",this.no_direction="right"):(this.yes_direction="right",this.no_direction="bottom"):(this.yes_direction="bottom",this.no_direction="right"),this.yes_direction=this.yes_direction||"bottom",this.no_direction=this.no_direction||"right",this.text.attr({x:2*this.textMargin});var r=this.text.getBBox().width+3*this.textMargin;r+=r/2;var o=this.text.getBBox().height+2*this.textMargin;o+=o/2;var s=r/4,a=(o=Math.max(.5*r,o))/4;this.text.attr({x:s+this.textMargin/2});var l=t(e,{x:s,y:a},[{x:s-r/4,y:a+o/4},{x:s-r/4+r/2,y:a+o/4+o/2},{x:s-r/4+r,y:a+o/4},{x:s-r/4+r/2,y:a+o/4-o/2},{x:s-r/4,y:a+o/4}]);l.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),n.link&&l.attr("href",n.link),n.target&&l.attr("target",n.target),n.key&&(l.node.id=n.key),l.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:l.getBBox().height/2}),this.group.push(l),l.insertBefore(this.text),this.initialize()}Array.prototype.indexOf||(Array.prototype.indexOf=function(t){"use strict";if(null===this)throw new TypeError;var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>0&&((r=Number(arguments[1]))!=r?r=0:0!==r&&1/0!=r&&r!=-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);n>i;i++)if(i in e&&e[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){"use strict";if(null===this)throw new TypeError;var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=n;arguments.length>1&&((r=Number(arguments[1]))!=r?r=0:0!==r&&r!=1/0&&r!=-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r))));for(var i=r>=0?Math.min(r,n-1):n-Math.abs(r);i>=0;i--)if(i in e&&e[i]===t)return i;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var h={};"undefined"!=typeof module&&module.exports?module.exports=h:this.flowchart=this.flowchart||h;var f={x:0,y:0,"line-width":3,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",class:"flowchart",symbols:{start:{},end:{},condition:{},inputoutput:{},operation:{},subroutine:{}}},d={defaults:function t(e,n){if(!e||"function"==typeof e)return n;var r={};for(var i in n)r[i]=n[i];for(i in e)e[i]&&(r[i]="object"==typeof r[i]?t(r[i],e[i]):e[i]);return r},inherits:function(t,e){if("function"==typeof Object.create)t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});else{t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}};r.prototype.handle=function(t){this.symbols.indexOf(t)<=-1&&this.symbols.push(t);var e=this;return t instanceof u?(t.yes=function(n){return t.yes_symbol=n,t.no_symbol&&(t.pathOk=!0),e.handle(n)},t.no=function(n){return t.no_symbol=n,t.yes_symbol&&(t.pathOk=!0),e.handle(n)}):t.then=function(n){return t.next=n,t.pathOk=!0,e.handle(n)},t},r.prototype.startWith=function(t){return this.start=t,this.handle(t)},r.prototype.render=function(){var t,e=0,n=0,r=0,i=0,o=0,s=0;for(r=0,i=this.symbols.length;i>r;r++)(t=this.symbols[r]).width>e&&(e=t.width),t.height>n&&(n=t.height);for(r=0,i=this.symbols.length;i>r;r++)(t=this.symbols[r]).shiftX(this.options.x+(e-t.width)/2+this.options["line-width"]),t.shiftY(this.options.y+(n-t.height)/2+this.options["line-width"]);for(this.start.render(),r=0,i=this.symbols.length;i>r;r++)(t=this.symbols[r]).renderLines();for(o=this.maxXFromLine,r=0,i=this.symbols.length;i>r;r++){var a=(t=this.symbols[r]).getX()+t.width,l=t.getY()+t.height;a>o&&(o=a),l>s&&(s=l)}this.paper.setSize(o+this.options["line-width"],s+this.options["line-width"])},r.prototype.clean=function(){if(this.paper){var t=this.paper.canvas;t.parentNode.removeChild(t)}},i.prototype.getAttr=function(t){if(this.chart){var e,n=this.chart.options?this.chart.options[t]:void 0,r=this.chart.options.symbols?this.chart.options.symbols[this.symbolType][t]:void 0;return this.chart.options.flowstate&&this.chart.options.flowstate[this.flowstate]&&(e=this.chart.options.flowstate[this.flowstate][t]),e||r||n}},i.prototype.initialize=function(){this.group.transform("t"+this.getAttr("line-width")+","+this.getAttr("line-width")),this.width=this.group.getBBox().width,this.height=this.group.getBBox().height},i.prototype.getCenter=function(){return{x:this.getX()+this.width/2,y:this.getY()+this.height/2}},i.prototype.getX=function(){return this.group.getBBox().x},i.prototype.getY=function(){return this.group.getBBox().y},i.prototype.shiftX=function(t){this.group.transform("t"+(this.getX()+t)+","+this.getY())},i.prototype.setX=function(t){this.group.transform("t"+t+","+this.getY())},i.prototype.shiftY=function(t){this.group.transform("t"+this.getX()+","+(this.getY()+t))},i.prototype.setY=function(t){this.group.transform("t"+this.getX()+","+t)},i.prototype.getTop=function(){var t=this.getY();return{x:this.getX()+this.width/2,y:t}},i.prototype.getBottom=function(){var t=this.getY()+this.height;return{x:this.getX()+this.width/2,y:t}},i.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2;return{x:this.getX(),y:t}},i.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2;return{x:this.getX()+this.group.getBBox().width,y:t}},i.prototype.render=function(){if(this.next){var t=this.getAttr("line-length");if("right"===this.next_direction){var e=this.getRight();if(this.next.getLeft(),!this.next.isPositioned){this.next.setY(e.y-this.next.height/2),this.next.shiftX(this.group.getBBox().x+this.width+t);var n=this;!function e(){for(var r,i=!1,o=0,s=n.chart.symbols.length;s>o;o++){r=n.chart.symbols[o];var a=Math.abs(r.getCenter().x-n.next.getCenter().x);if(r.getCenter().y>n.next.getCenter().y&&a<=n.next.width/2){i=!0;break}}i&&(n.next.setX(r.getX()+r.width+t),e())}(),this.next.isPositioned=!0,this.next.render()}}else{var r=this.getBottom();this.next.getTop(),this.next.isPositioned||(this.next.shiftY(this.getY()+this.height+t),this.next.setX(r.x-this.next.width/2),this.next.isPositioned=!0,this.next.render())}}},i.prototype.renderLines=function(){this.next&&(this.next_direction?this.drawLineTo(this.next,"",this.next_direction):this.drawLineTo(this.next))},i.prototype.drawLineTo=function(t,r,i){this.connectedTo.indexOf(t)<0&&this.connectedTo.push(t);var o,s=this.getCenter().x,a=this.getCenter().y,l=(this.getTop(),this.getRight()),c=this.getBottom(),u=this.getLeft(),h=t.getCenter().x,f=t.getCenter().y,d=t.getTop(),p=t.getRight(),v=(t.getBottom(),t.getLeft()),g=s===h,m=a===f,y=f>a,x=a>f,b=s>h,w=h>s,k=0,C=this.getAttr("line-length"),_=this.getAttr("line-width");if(i&&"bottom"!==i||!g||!y)if(i&&"right"!==i||!m||!w)if(i&&"left"!==i||!m||!b)if(i&&"right"!==i||!g||!x)if(i&&"right"!==i||!g||!y)if(i&&"bottom"!==i||!b)if(i&&"bottom"!==i||!w)if(i&&"right"===i&&b)o=e(this.chart,l,[{x:l.x+C/2,y:l.y},{x:l.x+C/2,y:d.y-C/2},{x:d.x,y:d.y-C/2},{x:d.x,y:d.y}],r),this.rightStart=!0,t.topEnd=!0,k=l.x+C/2;else if(i&&"right"===i&&w)o=e(this.chart,l,[{x:d.x,y:l.y},{x:d.x,y:d.y}],r),this.rightStart=!0,t.topEnd=!0,k=l.x+C/2;else if(i&&"bottom"===i&&g&&x)o=e(this.chart,c,[{x:c.x,y:c.y+C/2},{x:l.x+C/2,y:c.y+C/2},{x:l.x+C/2,y:d.y-C/2},{x:d.x,y:d.y-C/2},{x:d.x,y:d.y}],r),this.bottomStart=!0,t.topEnd=!0,k=c.x+C/2;else if("left"===i&&g&&x){var S=u.x-C/2;v.xT;T++)for(var M=this.chart.lines[T].attr("path"),A=o.attr("path"),E=0,N=M.length-1;N>E;E++){var O=[];O.push(["M",M[E][1],M[E][2]]),O.push(["L",M[E+1][1],M[E+1][2]]);for(var D=O[0][1],B=O[0][2],j=O[1][1],P=O[1][2],F=0,I=A.length-1;I>F;F++){var H=[];H.push(["M",A[F][1],A[F][2]]),H.push(["L",A[F+1][1],A[F+1][2]]);var R,W=H[0][1],z=H[0][2],$=H[1][1],q=H[1][2],V=n(D,B,j,P,W,z,$,q);if(V.onLine1&&V.onLine2)z===q?W>$?(R=["L",V.x+2*_,z],A.splice(F+1,0,R),R=["C",V.x+2*_,z,V.x,z-4*_,V.x-2*_,z],A.splice(F+2,0,R),o.attr("path",A)):(R=["L",V.x-2*_,z],A.splice(F+1,0,R),R=["C",V.x-2*_,z,V.x,z-4*_,V.x+2*_,z],A.splice(F+2,0,R),o.attr("path",A)):z>q?(R=["L",W,V.y+2*_],A.splice(F+1,0,R),R=["C",W,V.y+2*_,W+4*_,V.y,W,V.y-2*_],A.splice(F+2,0,R),o.attr("path",A)):(R=["L",W,V.y-2*_],A.splice(F+1,0,R),R=["C",W,V.y-2*_,W+4*_,V.y,W,V.y+2*_],A.splice(F+2,0,R),o.attr("path",A)),F+=2,2}}this.chart.lines.push(o)}(!this.chart.maxXFromLine||this.chart.maxXFromLine&&k>this.chart.maxXFromLine)&&(this.chart.maxXFromLine=k)},d.inherits(o,i),d.inherits(s,i),d.inherits(a,i),d.inherits(l,i),d.inherits(c,i),c.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2;return{x:this.getX()+this.textMargin,y:t}},c.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2;return{x:this.getX()+this.group.getBBox().width-this.textMargin,y:t}},d.inherits(u,i),u.prototype.render=function(){this.yes_direction&&(this[this.yes_direction+"_symbol"]=this.yes_symbol),this.no_direction&&(this[this.no_direction+"_symbol"]=this.no_symbol);var t=this.getAttr("line-length");if(this.bottom_symbol){var e=this.getBottom();this.bottom_symbol.getTop(),this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+t),this.bottom_symbol.setX(e.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.right_symbol){var n=this.getRight();if(this.right_symbol.getLeft(),!this.right_symbol.isPositioned){this.right_symbol.setY(n.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+t);var r=this;!function e(){for(var n,i=!1,o=0,s=r.chart.symbols.length;s>o;o++){n=r.chart.symbols[o];var a=Math.abs(n.getCenter().x-r.right_symbol.getCenter().x);if(n.getCenter().y>r.right_symbol.getCenter().y&&a<=r.right_symbol.width/2){i=!0;break}}i&&(r.right_symbol.setX(n.getX()+n.width+t),e())}(),this.right_symbol.isPositioned=!0,this.right_symbol.render()}}},u.prototype.renderLines=function(){this.yes_symbol&&this.drawLineTo(this.yes_symbol,this.getAttr("yes-text"),this.yes_direction),this.no_symbol&&this.drawLineTo(this.no_symbol,this.getAttr("no-text"),this.no_direction)},h.parse=function(t){function e(t){var e=t.indexOf("(")+1,n=t.indexOf(")");return e>=0&&n>=0?i.symbols[t.substring(0,e-1)]:i.symbols[t]}function n(t){var e="next",n=t.indexOf("(")+1,r=t.indexOf(")");return n>=0&&r>=0&&(e=A.substring(n,r)).indexOf(",")<0&&"yes"!==e&&"no"!==e&&(e="next, "+e),e}t=(t=t||"").trim();for(var i={symbols:{},start:null,drawSVG:function(t,e){function n(t){if(f[t.key])return f[t.key];switch(t.symbolType){case"start":f[t.key]=new o(h,t);break;case"end":f[t.key]=new s(h,t);break;case"operation":f[t.key]=new a(h,t);break;case"inputoutput":f[t.key]=new c(h,t);break;case"subroutine":f[t.key]=new l(h,t);break;case"condition":f[t.key]=new u(h,t);break;default:return new Error("Wrong symbol type!")}return f[t.key]}var i=this;this.diagram&&this.diagram.clean();var h=new r(t,e);this.diagram=h;var f={};!function t(e,r,o){var s=n(e);return i.start===e?h.startWith(s):r&&o&&!r.pathOk&&(r instanceof u?(o.yes===e&&r.yes(s),o.no===e&&r.no(s)):r.then(s)),s.pathOk?s:(s instanceof u?(e.yes&&t(e.yes,s,e),e.no&&t(e.no,s,e)):e.next&&t(e.next,s,e),s)}(this.start),h.render()},clean:function(){this.diagram.clean()}},h=[],f=0,d=1,p=t.length;p>d;d++)if("\n"===t[d]&&"\\"!==t[d-1]){var v=t.substring(f,d);f=d+1,h.push(v.replace(/\\\n/g,"\n"))}fg;){var y=h[g];y.indexOf(": ")<0&&y.indexOf("(")<0&&y.indexOf(")")<0&&y.indexOf("->")<0&&y.indexOf("=>")<0?(h[g-1]+="\n"+y,h.splice(g,1),m--):g++}for(;h.length>0;){var x=h.splice(0,1)[0];if(x.indexOf("=>")>=0){var b,w=x.split("=>"),k={key:w[0],symbolType:w[1],text:null,link:null,target:null,flowstate:null};if(k.symbolType.indexOf(": ")>=0&&(b=k.symbolType.split(": "),k.symbolType=b[0],k.text=b[1]),k.text&&k.text.indexOf(":>")>=0?(b=k.text.split(":>"),k.text=b[0],k.link=b[1]):k.symbolType.indexOf(":>")>=0&&(b=k.symbolType.split(":>"),k.symbolType=b[0],k.link=b[1]),k.symbolType.indexOf("\n")>=0&&(k.symbolType=k.symbolType.split("\n")[0]),k.link){var C=k.link.indexOf("[")+1,_=k.link.indexOf("]");C>=0&&_>=0&&(k.target=k.link.substring(C,_),k.link=k.link.substring(0,C-1))}if(k.text&&k.text.indexOf("|")>=0){var S=k.text.split("|");k.text=S[0],k.flowstate=S[1].trim()}i.symbols[k.key]=k}else if(x.indexOf("->")>=0)for(var T=x.split("->"),L=0,M=T.length;M>L;L++){var A=T[L],E=e(A),N=n(A),O=null;if(N.indexOf(",")>=0){var D=N.split(",");N=D[0],O=D[1].trim()}if(i.start||(i.start=E),M>L+1){var B=T[L+1];E[N]=e(B),E["direction_"+N]=O,O=null}}}return i}}(), -/*! jQuery.flowchart.js v1.1.0 | jquery.flowchart.min.js | jQuery plugin for flowchart.js. | MIT License | By: Pandao | https://github.com/pandao/jquery.flowchart.js | 2015-03-09 */ -function(t){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=t:"function"==typeof define?t(jQuery,flowchart):t($,flowchart)}(function(t,e){var n;(n=t).fn.flowChart=function(t){t=t||{};var r={x:0,y:0,"line-width":2,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",symbols:{start:{"font-color":"black","element-color":"black",fill:"white"},end:{class:"end-element"}},flowstate:{past:{fill:"#CCCCCC","font-size":12},current:{fill:"black","font-color":"white","font-weight":"bold"},future:{fill:"white"},request:{fill:"blue"},invalid:{fill:"#444444"},approved:{fill:"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},rejected:{fill:"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}};return this.each(function(){var i=n(this),o=e.parse(i.text()),s=n.extend(!0,r,t);i.html(""),o.drawSVG(this,s)})}}),function(t){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=t:"function"==typeof define?define.amd||define(["../../../../editormd/examples/js/jquery.min"],t):window.editormd=t()}(function(){"use strict";var t="undefined"!=typeof jQuery?jQuery:Zepto;if(void 0!==t){var e,n,r=function(t,e){return new r.fn.init(t,e)};r.title=r.$name="Editor.md",r.version="1.5.0",r.homePage="https://pandao.github.io/editor.md/",r.classPrefix="editormd-",r.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},r.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:"style,iframe|on*",pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return r.toolbarHandlers.ucwords},lowercase:function(){return r.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'
    a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:r.classPrefix+"bold",h2:r.classPrefix+"bold",h3:r.classPrefix+"bold",h4:r.classPrefix+"bold",h5:r.classPrefix+"bold",h6:r.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
    Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+r.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}},r.classNames={tex:r.classPrefix+"tex"},r.dialogZindex=99999,r.$katex=null,r.$marked=null,r.$CodeMirror=null,r.$prettyPrint=null,r.prototype=r.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(e,n){n=n||{},"object"==typeof e&&(n=e);var i=this.classPrefix=r.classPrefix,o=this.settings=t.extend(!0,r.defaults,n);e="object"==typeof e?o.id:e;var s=this.editor=t("#"+e);this.id=e,this.lang=o.lang;var a=this.classNames={textarea:{html:i+"html-textarea",markdown:i+"markdown-textarea"}};o.pluginPath=""===o.pluginPath?o.path+"../plugins/":o.pluginPath,this.state.watching=!!o.watch,s.hasClass("editormd")||s.addClass("editormd"),s.css({width:"number"==typeof o.width?o.width+"px":o.width,height:"number"==typeof o.height?o.height+"px":o.height}),o.autoHeight&&s.css("height","auto");var l=this.markdownTextarea=s.children("textarea");l.length<1&&(s.append(""),l=this.markdownTextarea=s.children("textarea")),l.addClass(a.textarea.markdown).attr("placeholder",o.placeholder),void 0!==l.attr("name")&&""!==l.attr("name")||l.attr("name",""!==o.name?o.name:e+"-markdown-doc");var c=[o.readOnly?"":'',o.saveHTMLToTextarea?'':"",'
    ','
    ','
    '].join("\n");return s.append(c).addClass(i+"vertical"),""!==o.theme&&s.addClass(i+"theme-"+o.theme),this.mask=s.children("."+i+"mask"),this.containerMask=s.children("."+i+"container-mask"),""!==o.markdown&&l.val(o.markdown),""!==o.appendMarkdown&&l.val(l.val()+o.appendMarkdown),this.htmlTextarea=s.children("."+a.textarea.html),this.preview=s.children("."+i+"preview"),this.previewContainer=this.preview.children("."+i+"preview-container"),""!==o.previewTheme&&this.preview.addClass(i+"preview-theme-"+o.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(r.$katex=katex),o.searchReplace&&!o.readOnly&&(r.loadCSS(o.path+"codemirror/addon/dialog/dialog"),r.loadCSS(o.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!o.autoLoadModules?("undefined"!=typeof CodeMirror&&(r.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(r.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var t=this,e=this.settings,n=e.path,i=function(){r.isIE8?t.loadedDisplay():e.flowChart||e.sequenceDiagram?r.loadScript(n+"raphael.min",function(){r.loadScript(n+"underscore.min",function(){!e.flowChart&&e.sequenceDiagram?r.loadScript(n+"sequence-diagram.min",function(){t.loadedDisplay()}):e.flowChart&&!e.sequenceDiagram?r.loadScript(n+"flowchart.min",function(){r.loadScript(n+"jquery.flowchart.min",function(){t.loadedDisplay()})}):e.flowChart&&e.sequenceDiagram&&r.loadScript(n+"flowchart.min",function(){r.loadScript(n+"jquery.flowchart.min",function(){r.loadScript(n+"sequence-diagram.min",function(){t.loadedDisplay()})})})})}):t.loadedDisplay()};return e.searchReplace&&!e.readOnly&&(r.loadCSS(n+"codemirror/addon/dialog/dialog"),r.loadCSS(n+"codemirror/addon/search/matchesonscrollbar")),e.codeFold&&r.loadCSS(n+"codemirror/addon/fold/foldgutter"),r.$CodeMirror=CodeMirror,r.loadScript(n+"codemirror/modes.min",function(){r.loadScript(n+"codemirror/addons.min",function(){if(t.setCodeMirror(),"gfm"!==e.mode&&"markdown"!==e.mode)return t.loadedDisplay(),!1;t.setToolbar(),r.loadScript(n+"marked.min",function(){r.$marked=marked,e.previewCodeHighlight?r.loadScript(n+"prettify.min",function(){i()}):i()})})}),this},setTheme:function(t){var e=this.editor,n=this.settings.theme,r=this.classPrefix+"theme-";return e.removeClass(r+n).addClass(r+t),this.settings.theme=t,this},setEditorTheme:function(t){var e=this.settings;return e.editorTheme=t,"default"!==t&&r.loadCSS(e.path+"codemirror/theme/"+e.editorTheme),this.cm.setOption("theme",t),this},setCodeMirrorTheme:function(t){return this.setEditorTheme(t),this},setPreviewTheme:function(t){var e=this.preview,n=this.settings.previewTheme,r=this.classPrefix+"preview-theme-";return e.removeClass(r+n).addClass(r+t),this.settings.previewTheme=t,this},setCodeMirror:function(){var t=this.settings,e=this.editor;"default"!==t.editorTheme&&r.loadCSS(t.path+"codemirror/theme/"+t.editorTheme);var n={mode:t.mode,theme:t.editorTheme,tabSize:t.tabSize,dragDrop:!1,autofocus:t.autoFocus,autoCloseTags:t.autoCloseTags,readOnly:!!t.readOnly&&"nocursor",indentUnit:t.indentUnit,lineNumbers:t.lineNumbers,lineWrapping:t.lineWrapping,extraKeys:{"Ctrl-Q":function(t){t.foldCode(t.getCursor())}},foldGutter:t.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:t.matchBrackets,indentWithTabs:t.indentWithTabs,styleActiveLine:t.styleActiveLine,styleSelectedText:t.styleSelectedText,autoCloseBrackets:t.autoCloseBrackets,showTrailingSpace:t.showTrailingSpace,highlightSelectionMatches:!!t.matchWordHighlight&&{showToken:"onselected"!==t.matchWordHighlight&&/\w/}};return this.codeEditor=this.cm=r.$CodeMirror.fromTextArea(this.markdownTextarea[0],n),this.codeMirror=this.cmElement=e.children(".CodeMirror"),""!==t.value&&this.cm.setValue(t.value),this.codeMirror.css({fontSize:t.fontSize,width:t.watch?"50%":"100%"}),t.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),t.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(t){return this.cm.getOption(t)},setCodeMirrorOption:function(t,e){return this.cm.setOption(t,e),this},addKeyMap:function(t,e){return this.cm.addKeyMap(t,e),this},removeKeyMap:function(t){return this.cm.removeKeyMap(t),this},gotoLine:function(e){var n=this.settings;if(!n.gotoLine)return this;var r=this.cm,i=(this.editor,r.lineCount()),o=this.preview;if("string"==typeof e&&("last"===e&&(e=i),"first"===e&&(e=1)),"number"!=typeof e)return alert("Error: The line number must be an integer."),this;if((e=parseInt(e)-1)>i)return alert("Error: The line number range 1-"+i),this;r.setCursor({line:e,ch:0});var s=r.getScrollInfo().clientHeight,a=r.charCoords({line:e,ch:0},"local");if(r.scrollTo(null,(a.top+a.bottom-s)/2),n.watch){var l=this.codeMirror.find(".CodeMirror-scroll")[0],c=t(l).height(),u=l.scrollTop,h=u/l.scrollHeight;0===u?o.scrollTop(0):u+c>=l.scrollHeight-16?o.scrollTop(o[0].scrollHeight):o.scrollTop(o[0].scrollHeight*h)}return r.focus(),this},extend:function(){return void 0!==arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=t.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&void 0===arguments[0].length&&t.extend(!0,this,arguments[0]),this},set:function(e,n){return void 0!==n&&"function"==typeof n&&(n=t.proxy(n,this)),this[e]=n,this},config:function(e,n){var r=this.settings;return"object"==typeof e&&(r=t.extend(!0,r,e)),"string"==typeof e&&(r[e]=n),this.settings=r,this.recreate(),this},on:function(e,n){var r=this.settings;return void 0!==r["on"+e]&&(r["on"+e]=t.proxy(n,this)),this},off:function(t){var e=this.settings;return void 0!==e["on"+t]&&(e["on"+t]=function(){}),this},showToolbar:function(e){var n=this.settings;return n.readOnly?this:(n.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),n.toolbar=!0,this.toolbar.show(),this.resize(),t.proxy(e||function(){},this)(),this)},hideToolbar:function(e){return this.settings.toolbar=!1,this.toolbar.hide(),this.resize(),t.proxy(e||function(){},this)(),this},setToolbarAutoFixed:function(e){var n=this.state,r=this.editor,i=this.toolbar,o=this.settings;void 0!==e&&(o.toolbarAutoFixed=e);return!n.fullscreen&&!n.preview&&o.toolbar&&o.toolbarAutoFixed&&t(window).bind("scroll",function(){var e=t(window),n=e.scrollTop();if(!o.toolbarAutoFixed)return!1;n-r.offset().top>10&&n
      ';e.append(o),i=this.toolbar=e.children("."+n+"toolbar")}if(!t.toolbar)return i.hide(),this;i.show();for(var s="function"==typeof t.toolbarIcons?t.toolbarIcons():"string"==typeof t.toolbarIcons?r.toolbarModes[t.toolbarIcons]:t.toolbarIcons,a=i.find("."+this.classPrefix+"menu"),l="",c=!1,u=0,h=s.length;u|';else{var d=/h(\d)/.test(f),p=f;"watch"!==f||t.watch||(p="unwatch");var v=t.lang.toolbar[p],g=t.toolbarIconTexts[p],m=t.toolbarIconsClass[p];v=void 0===v?"":v,g=void 0===g?"":g,m=void 0===m?"":m;var y=c?'
    • ':"
    • ";void 0!==t.toolbarCustomIcons[f]&&"function"!=typeof t.toolbarCustomIcons[f]?y+=t.toolbarCustomIcons[f]:(y+='',y+=''+(d?f.toUpperCase():""===m?g:"")+"",y+=""),y+="
    • ",l=c?y+l:l+y}}return a.html(l),a.find('[title="Lowercase"]').attr("title",t.lang.toolbar.lowercase),a.find('[title="ucwords"]').attr("title",t.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return t.proxy(r.dialogLockScreen,this)(),this},dialogShowMask:function(e){return t.proxy(r.dialogShowMask,this)(e),this},getToolbarHandles:function(t){var e=this.toolbarHandlers=r.toolbarHandlers;return t&&void 0!==toolbarIconHandlers[t]?e[t]:e},setToolbarHandler:function(){var e=this,n=this.settings;if(!n.toolbar||n.readOnly)return this;var i=this.toolbar,o=this.cm,s=this.classPrefix,a=this.toolbarIcons=i.find("."+s+"menu > li > a"),l=this.getToolbarHandles();return a.bind(r.mouseOrTouch("click","touchend"),function(r){var i=t(this).children(".fa"),s=i.attr("name"),a=o.getCursor(),c=o.getSelection();if(""!==s)return e.activeIcon=i,void 0!==l[s]?t.proxy(l[s],e)(o):void 0!==n.toolbarHandlers[s]&&t.proxy(n.toolbarHandlers[s],e)(o,i,a,c),"link"!==s&&"reference-link"!==s&&"image"!==s&&"code-block"!==s&&"preformatted-text"!==s&&"watch"!==s&&"preview"!==s&&"search"!==s&&"fullscreen"!==s&&"info"!==s&&o.focus(),!1}),this},createDialog:function(e){return t.proxy(r.createDialog,this)(e)},createInfoDialog:function(){var t=this,e=this.editor,n=this.classPrefix,i=['
      ','
      ','

      '+r.title+"v"+r.version+"

      ","

      "+this.lang.description+"

      ",'

      '+r.homePage+'

      ','

      Copyright © 2015 Pandao, The MIT License.

      ',"
      ",'',"
      "].join("\n");e.append(i);var o=this.infoDialog=e.children("."+n+"dialog-info");return o.find("."+n+"dialog-close").bind(r.mouseOrTouch("click","touchend"),function(){t.hideInfoDialog()}),o.css("border",r.isIE8?"1px solid #ddd":"").css("z-index",r.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var e=this.infoDialog,n=function(){e.css({top:(t(window).height()-e.height())/2+"px",left:(t(window).width()-e.width())/2+"px"})};return n(),t(window).resize(n),this},showInfoDialog:function(){t("html,body").css("overflow-x","hidden");var e=this.editor,n=this.settings,i=this.infoDialog=e.children("."+this.classPrefix+"dialog-info");return i.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:n.dialogMaskOpacity,backgroundColor:n.dialogMaskBgColor}).show(),i.css("z-index",r.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return t("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(t){return r.lockScreen(t),this.resize(),this},recreate:function(){var t=this.editor,e=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),e.readOnly||(t.find(".editormd-dialog").length>0&&t.find(".editormd-dialog").remove(),e.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var t=this.settings,e=this.previewContainer;return t.previewCodeHighlight&&(e.find("pre").addClass("prettyprint linenums"),void 0!==prettyPrint&&prettyPrint()),this},katexRender:function(){return null===e?this:(this.previewContainer.find("."+r.classNames.tex).each(function(){var e=t(this);r.$katex.render(e.text(),e[0]),e.find(".katex").css("font-size","1.0em")}),this)},flowChartAndSequenceDiagramRender:function(){var e=this.settings,i=this.previewContainer;if(r.isIE8)return this;if(e.flowChart){if(null===n)return this;i.find(".flowchart").flowChart()}e.sequenceDiagram&&i.find(".sequence-diagram").sequenceDiagram({theme:"simple"});var o=this.preview,s=this.codeMirror.find(".CodeMirror-scroll"),a=s.height(),l=s.scrollTop(),c=l/s[0].scrollHeight,u=0;o.find(".markdown-toc-list").each(function(){u+=t(this).height()});var h=o.find(".editormd-toc-menu").height();return h=h||0,0===l?o.scrollTop(0):l+a>=s[0].scrollHeight-16?o.scrollTop(o[0].scrollHeight):o.scrollTop((o[0].scrollHeight+u+h)*c),this},registerKeyMaps:function(e){var n=this,i=this.cm,o=this.settings,s=r.toolbarHandlers,a=o.disabledKeyMaps;if(e=e||null){for(var l in e)if(t.inArray(l,a)<0){e[l],i.addKeyMap(e)}}else{for(var c in r.keyMaps){var u=r.keyMaps[c],h="string"==typeof u?t.proxy(s[u],n):t.proxy(u,n);if(t.inArray(c,["F9","F10","F11"])<0&&t.inArray(c,a)<0){var f={};f[c]=h,i.addKeyMap(f)}}t(window).keydown(function(e){if(t.inArray({120:"F9",121:"F10",122:"F11"}[e.keyCode],a)<0)switch(e.keyCode){case 120:return t.proxy(s.watch,n)(),!1;case 121:return t.proxy(s.preview,n)(),!1;case 122:return t.proxy(s.fullscreen,n)(),!1}})}return this},bindScrollEvent:function(){var e=this,n=this.preview,i=this.settings,o=this.codeMirror,s=r.mouseOrTouch;if(!i.syncScrolling)return this;var a=function(){o.find(".CodeMirror-scroll").bind(s("scroll","touchmove"),function(r){var o=t(this).height(),s=t(this).scrollTop(),a=s/t(this)[0].scrollHeight,l=0;n.find(".markdown-toc-list").each(function(){l+=t(this).height()});var c=n.find(".editormd-toc-menu").height();c=c||0,0===s?n.scrollTop(0):s+o>=t(this)[0].scrollHeight-16?n.scrollTop(n[0].scrollHeight):n.scrollTop((n[0].scrollHeight+l+c)*a),t.proxy(i.onscroll,e)(r)})},l=function(){o.find(".CodeMirror-scroll").unbind(s("scroll","touchmove"))},c=function(){n.bind(s("scroll","touchmove"),function(n){var r=t(this).height(),s=t(this).scrollTop(),a=s/t(this)[0].scrollHeight,l=o.find(".CodeMirror-scroll");0===s?l.scrollTop(0):s+r>=t(this)[0].scrollHeight?l.scrollTop(l[0].scrollHeight):l.scrollTop(l[0].scrollHeight*a),t.proxy(i.onpreviewscroll,e)(n)})},u=function(){n.unbind(s("scroll","touchmove"))};return o.bind({mouseover:a,mouseout:l,touchstart:a,touchend:l}),"single"===i.syncScrolling?this:(n.bind({mouseover:c,mouseout:u,touchstart:c,touchend:u}),this)},bindChangeEvent:function(){var t=this,n=this.cm,r=this.settings;return r.syncScrolling?(n.on("change",function(n,i){r.watch&&t.previewContainer.css("padding",r.autoHeight?"20px 20px 50px 40px":"20px"),e=setTimeout(function(){clearTimeout(e),t.save(),e=null},r.delay)}),this):this},loadedDisplay:function(e){e=e||!1;var n=this,r=this.editor,i=this.preview,o=this.settings;return this.containerMask.hide(),this.save(),o.watch&&i.show(),r.data("oldWidth",r.width()).data("oldHeight",r.height()),this.resize(),this.registerKeyMaps(),t(window).resize(function(){n.resize()}),this.bindScrollEvent().bindChangeEvent(),e||(o.imageUploadURL&&initEditormdPasteUpload(this,o.imageUploadURL),t.proxy(o.onload,this)()),this.state.loaded=!0,this},width:function(t){return this.editor.css("width","number"==typeof t?t+"px":t),this.resize(),this},height:function(t){return this.editor.css("height","number"==typeof t?t+"px":t),this.resize(),this},resize:function(e,n){e=e||null,n=n||null;var r=this.state,i=this.editor,o=this.preview,s=this.toolbar,a=this.settings,l=this.codeMirror;if(e&&i.css("width","number"==typeof e?e+"px":e),!a.autoHeight||r.fullscreen||r.preview?(n&&i.css("height","number"==typeof n?n+"px":n),r.fullscreen&&i.height(t(window).height()),a.toolbar&&!a.readOnly?l.css("margin-top",s.height()+1).height(i.height()-s.height()):l.css("margin-top",0).height(i.height())):(i.css("height","auto"),l.css("height","auto")),a.watch)if(l.width(i.width()/2),o.width(r.preview?i.width():i.width()/2),this.previewContainer.css("padding",a.autoHeight?"20px 20px 50px 40px":"20px"),a.toolbar&&!a.readOnly?o.css("top",s.height()+1):o.css("top",0),!a.autoHeight||r.fullscreen||r.preview){var c=a.toolbar&&!a.readOnly?i.height()-s.height():i.height();o.height(c)}else o.height("");else l.width(i.width()),o.hide();return r.loaded&&t.proxy(a.onresize,this)(),this},save:function(){if(null===e)return this;var i=this,o=this.state,s=this.settings,a=this.cm,l=a.getValue(),c=this.previewContainer;if("gfm"!==s.mode&&"markdown"!==s.mode)return this.markdownTextarea.val(l),this;var u=r.$marked,h=this.markdownToC=[],f=this.markedRendererOptions={toc:s.toc,tocm:s.tocm,tocStartLevel:s.tocStartLevel,pageBreak:s.pageBreak,taskList:s.taskList,emoji:s.emoji,tex:s.tex,atLink:s.atLink,emailLink:s.emailLink,flowChart:s.flowChart,sequenceDiagram:s.sequenceDiagram,previewCodeHighlight:s.previewCodeHighlight},d=this.markedOptions={renderer:r.markedRenderer(h,f),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!s.htmlDecode,smartLists:!0,smartypants:!0};u.setOptions(d);var p=r.$marked(l,d);if(p=r.filterHTMLTags(p,s.htmlDecode),this.markdownTextarea.text(l),a.save(),s.saveHTMLToTextarea&&this.htmlTextarea.text(p),s.watch||!s.watch&&o.preview){if(c.html(p),this.previewCodeHighlight(),s.toc){var v=""===s.tocContainer?c:t(s.tocContainer),g=v.find("."+this.classPrefix+"toc-menu");v.attr("previewContainer",""===s.tocContainer?"true":"false"),""!==s.tocContainer&&g.length>0&&g.remove(),r.markdownToCRenderer(h,v,s.tocDropdown,s.tocStartLevel),(s.tocDropdown||v.find("."+this.classPrefix+"toc-menu").length>0)&&r.tocDropdownMenu(v,""!==s.tocTitle?s.tocTitle:this.lang.tocTitle),""!==s.tocContainer&&c.find(".markdown-toc").css("border","none")}s.tex&&(!r.kaTeXLoaded&&s.autoLoadModules?r.loadKaTeX(function(){r.$katex=katex,r.kaTeXLoaded=!0,i.katexRender()}):(r.$katex=katex,this.katexRender())),(s.flowChart||s.sequenceDiagram)&&(n=setTimeout(function(){clearTimeout(n),i.flowChartAndSequenceDiagramRender(),n=null},10)),o.loaded&&t.proxy(s.onchange,this)()}return this},focus:function(){return this.cm.focus(),this},setCursor:function(t){return this.cm.setCursor(t),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(t,e){return this.cm.setSelection(t,e),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(t){return this.cm.setSelections(t),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(t){return this.cm.replaceSelection(t),this},insertValue:function(t){return this.replaceSelection(t),this},appendMarkdown:function(t){this.settings;var e=this.cm;return e.setValue(e.getValue()+t),this},setMarkdown:function(t){return this.cm.setValue(t||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(t){return this.cm.setValue(t),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(n){var r=this.settings;if(t.inArray(r.mode,["gfm","markdown"])<0)return this;if(this.state.watching=r.watch=!0,this.preview.show(),this.toolbar){var i=r.toolbarIconsClass.watch,o=r.toolbarIconsClass.unwatch,s=this.toolbar.find(".fa[name=watch]");s.parent().attr("title",r.lang.toolbar.watch),s.removeClass(o).addClass(i)}return this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),e=0,this.save().resize(),r.onwatch||(r.onwatch=n||function(){}),t.proxy(r.onwatch,this)(),this},unwatch:function(e){var n=this.settings;if(this.state.watching=n.watch=!1,this.preview.hide(),this.toolbar){var r=n.toolbarIconsClass.watch,i=n.toolbarIconsClass.unwatch,o=this.toolbar.find(".fa[name=watch]");o.parent().attr("title",n.lang.toolbar.unwatch),o.removeClass(r).addClass(i)}return this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),n.onunwatch||(n.onunwatch=e||function(){}),t.proxy(n.onunwatch,this)(),this},show:function(e){e=e||function(){};var n=this;return this.editor.show(0,function(){t.proxy(e,n)()}),this},hide:function(e){e=e||function(){};var n=this;return this.editor.hide(0,function(){t.proxy(e,n)()}),this},previewing:function(){var e=this,n=this.editor,i=this.preview,o=this.toolbar,s=this.settings,a=this.codeMirror,l=this.previewContainer;if(t.inArray(s.mode,["gfm","markdown"])<0)return this;s.toolbar&&o&&(o.toggle(),o.find(".fa[name=preview]").toggleClass("active")),a.toggle();var c=function(t){t.shiftKey&&27===t.keyCode&&e.previewed()};"none"===a.css("display")?(this.state.preview=!0,this.state.fullscreen&&i.css("background","#fff"),n.find("."+this.classPrefix+"preview-close-btn").show().bind(r.mouseOrTouch("click","touchend"),function(){e.previewed()}),s.watch?l.css("padding",""):this.save(),l.addClass(this.classPrefix+"preview-active"),i.show().css({position:"",top:0,width:n.width(),height:s.autoHeight&&!this.state.fullscreen?"auto":n.height()}),this.state.loaded&&t.proxy(s.onpreviewing,this)(),t(window).bind("keyup",c)):(t(window).unbind("keyup",c),this.previewed())},previewed:function(){var e=this.editor,n=this.preview,i=this.toolbar,o=this.settings,s=this.previewContainer,a=e.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),o.toolbar&&i.show(),n[o.watch?"show":"hide"](),a.hide().unbind(r.mouseOrTouch("click","touchend")),s.removeClass(this.classPrefix+"preview-active"),o.watch&&s.css("padding","20px"),n.css({background:null,position:"absolute",width:e.width()/2,height:o.autoHeight&&!this.state.fullscreen?"auto":e.height()-i.height(),top:o.toolbar?i.height():0}),this.state.loaded&&t.proxy(o.onpreviewed,this)(),this},fullscreen:function(){var e=this,n=this.state,r=this.editor,i=(this.preview,this.toolbar),o=this.settings,s=this.classPrefix+"fullscreen";i&&i.find(".fa[name=fullscreen]").parent().toggleClass("active");var a=function(t){t.shiftKey||27!==t.keyCode||n.fullscreen&&e.fullscreenExit()};return r.hasClass(s)?(t(window).unbind("keyup",a),this.fullscreenExit()):(n.fullscreen=!0,t("html,body").css("overflow","hidden"),r.css({width:t(window).width(),height:t(window).height()}).addClass(s),this.resize(),t.proxy(o.onfullscreen,this)(),t(window).bind("keyup",a)),this},fullscreenExit:function(){var e=this.editor,n=this.settings,r=this.toolbar,i=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,r&&r.find(".fa[name=fullscreen]").parent().removeClass("active"),t("html,body").css("overflow",""),e.css({width:e.data("oldWidth"),height:e.data("oldHeight")}).removeClass(i),this.resize(),t.proxy(n.onfullscreenExit,this)(),this},executePlugin:function(e,n){var i=this,o=this.cm;return n=this.settings.pluginPath+n,"function"==typeof define?void 0===this[e]?(alert("Error: "+e+" plugin is not found, you are not load this plugin."),this):(this[e](o),this):(t.inArray(n,r.loadFiles.plugin)<0?r.loadPlugin(n,function(){r.loadPlugins[e]=i[e],i[e](o)}):t.proxy(r.loadPlugins[e],this)(o),this)},search:function(t){var e=this.settings;return e.searchReplace?(e.readOnly||this.cm.execCommand(t||"find"),this):(alert("Error: settings.searchReplace == false"),this)},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},r.fn.init.prototype=r.fn,r.dialogLockScreen=function(){(this.settings||{dialogLockScreen:!0}).dialogLockScreen&&(t("html,body").css("overflow","hidden"),this.resize())},r.dialogShowMask=function(e){var n=this.editor,r=this.settings||{dialogShowMask:!0};e.css({top:(t(window).height()-e.height())/2+"px",left:(t(window).width()-e.width())/2+"px"}),r.dialogShowMask&&n.children("."+this.classPrefix+"mask").css("z-index",parseInt(e.css("z-index"))-1).show()},r.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("**"+n+"**"),""===n&&t.setCursor(e.line,e.ch+2)},del:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("~~"+n+"~~"),""===n&&t.setCursor(e.line,e.ch+2)},italic:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("*"+n+"*"),""===n&&t.setCursor(e.line,e.ch+1)},quote:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("> "+n),t.setCursor(e.line,e.ch+2)):t.replaceSelection("> "+n)},ucfirst:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(r.firstUpperCase(e)),t.setSelections(n)},ucwords:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(r.wordsFirstUpperCase(e)),t.setSelections(n)},uppercase:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(e.toUpperCase()),t.setSelections(n)},lowercase:function(){var t=this.cm,e=(t.getCursor(),t.getSelection()),n=t.listSelections();t.replaceSelection(e.toLowerCase()),t.setSelections(n)},h1:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("# "+n),t.setCursor(e.line,e.ch+2)):t.replaceSelection("# "+n)},h2:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("## "+n),t.setCursor(e.line,e.ch+3)):t.replaceSelection("## "+n)},h3:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("### "+n),t.setCursor(e.line,e.ch+4)):t.replaceSelection("### "+n)},h4:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("#### "+n),t.setCursor(e.line,e.ch+5)):t.replaceSelection("#### "+n)},h5:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("##### "+n),t.setCursor(e.line,e.ch+6)):t.replaceSelection("##### "+n)},h6:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("###### "+n),t.setCursor(e.line,e.ch+7)):t.replaceSelection("###### "+n)},"list-ul":function(){var t=this.cm,e=(t.getCursor(),t.getSelection());if(""===e)t.replaceSelection("- "+e);else{for(var n=e.split("\n"),r=0,i=n.length;r'}else{var l=t.match(v),c=t.match(d);if(l)for(var u=0,h=l.length;u'}else{if(!c){var g="+1"===i?"plus1":i;return g="moon"===(g="black_large_square"===g?"black_square":g)?"waxing_gibbous_moon":g,':'+i+':'}for(var m=0,y=c.length;m'}}}});return t},a.atLink=function(e){return c.test(e)?(o.atLink&&(e=(e=e.replace(h,function(t,e,n,r){return t.replace(/@/g,"_#_@_#_")})).replace(c,function(t,e){return''+t+""}).replace(/_#_@_#_/g,"@")),o.emailLink&&(e=e.replace(f,function(e,n,r,i,o){return!n&&t.inArray(o,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+e+"":e})),e):e},a.link=function(t,e,n){if(this.options.sanitize){try{var r=decodeURIComponent(unescape(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===r.indexOf("javascript:"))return""}var i=''+n.replace(/@/g,"@")+""):(e&&(i+=' title="'+e+'"'),i+=">"+n+"")},a.heading=function(t,n,r){var o=t,s=/\s*\]*)\>(.*)\<\/a\>\s*/;if(s.test(t)){for(var a=[],l=0,c=(t=t.split(/\]+)\>([^\>]*)\<\/a\>/)).length;l';return f+='',f+='',f+=s?this.atLink(this.emoji(o)):this.atLink(this.emoji(t)),f+=""},a.pageBreak=function(t){return g.test(t)&&o.pageBreak&&(t='
      '),t},a.paragraph=function(t){var e=/\$\$(.*)\$\$/g.test(t),n=/^\$\$(.*)\$\$$/.test(t),i=n?' class="'+r.classNames.tex+'"':"",s=o.tocm?/^(\[TOC\]|\[TOCM\])$/.test(t):/^\[TOC\]$/.test(t),a=/^\[TOCM\]$/.test(t),l='
      '+(t=!n&&e?t.replace(/(\$\$([^\$]*)\$\$)+/g,function(t,e){return''+e.replace(/\$/g,"")+""}):n?t.replace(/\$/g,""):t)+"
      ";return s?a?'
      '+l+"

      ":l:g.test(t)?this.pageBreak(t):""+this.atLink(this.emoji(t))+"

      \n"},a.code=function(t,e,n){return"seq"===e||"sequence"===e?'
      '+t+"
      ":"flow"===e?'
      '+t+"
      ":"math"===e||"latex"===e||"katex"===e?'

      '+t+"

      ":s.Renderer.prototype.code.apply(this,arguments)},a.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+this.atLink(this.emoji(t))+"\n"},a.listitem=function(t){return o.taskList&&/^\s*\[[x\s]\]\s*/.test(t)?(t=t.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
    • '+this.atLink(this.emoji(t))+"
    • "):"
    • "+this.atLink(this.emoji(t))+"
    • "},a},r.markdownToCRenderer=function(t,e,n,r){var i="",o=0,s=this.classPrefix;r=r||1;for(var a=0,l=t.length;ao?"":u"):"",i+='
    • '+c+"
        ",o=u)}var h=e.find(".markdown-toc");if(h.length<1&&"false"===e.attr("previewContainer")){var f='
        ';f=n?'
        '+f+"
        ":f,e.html(f),h=e.find(".markdown-toc")}return n&&h.wrap('

        '),h.html('
          ').children(".markdown-toc-list").html(i.replace(/\r?\n?\\<\/ul\>/g,"")),h},r.tocDropdownMenu=function(e,n){n=n||"Table of Contents";var r=400,i=e.find("."+this.classPrefix+"toc-menu");return i.each(function(){var e=t(this),i=e.children(".markdown-toc"),o='',s=''+o+n+"",a=i.children("ul"),l=a.find("li");i.append(s),l.first().before("
        • "+n+" "+o+"

        • "),e.mouseover(function(){a.show(),l.each(function(){var e=t(this),n=e.children("ul");if(""===n.html()&&n.remove(),n.length>0&&""!==n.html()){var i=e.children("a").first();i.children(".fa").length<1&&i.append(t(o).css({float:"right",paddingTop:"4px"}))}e.mouseover(function(){n.css("z-index",r).show(),r+=1}).mouseleave(function(){n.hide()})})}).mouseleave(function(){a.hide()})}),i},r.filterHTMLTags=function(e,n){if("string"!=typeof e&&(e=new String(e)),"string"!=typeof n)return e;for(var r=n.split("|"),i=r[0].split(","),o=r[1],s=0,a=i.length;s]*)>([^>]*)","igm"),"")}if(void 0!==o){var c=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;e="*"===o?e.replace(c,function(t,e,n,r,i){return"<"+e+">"+r+""}):"on*"===o?e.replace(c,function(e,n,r,i,o){var s=t("<"+n+">"+i+""),a=t(e)[0].attributes,l={};t.each(a,function(t,e){'"'!==e.nodeName&&(l[e.nodeName]=e.nodeValue)}),t.each(l,function(t){0===t.indexOf("on")&&delete l[t]}),s.attr(l);var c=void 0!==s[1]?t(s[1]).text():"";return s[0].outerHTML+c}):e.replace(c,function(e,n,r,i){var s=o.split(","),a=t(e);return a.html(i),t.each(s,function(t){a.attr(s[t],null)}),a[0].outerHTML})}return e},r.markdownToHTML=function(e,n){r.$marked=marked;var i=t("#"+e),o=i.settings=t.extend(!0,{gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0},n||{}),s=i.find("textarea");s.length<1&&(i.append(""),s=i.find("textarea"));var a=""===o.markdown?s.val():o.markdown,l=[],c={toc:o.toc,tocm:o.tocm,tocStartLevel:o.tocStartLevel,taskList:o.taskList,emoji:o.emoji,tex:o.tex,pageBreak:o.pageBreak,atLink:o.atLink,emailLink:o.emailLink,flowChart:o.flowChart,sequenceDiagram:o.sequenceDiagram,previewCodeHighlight:o.previewCodeHighlight},u={renderer:r.markedRenderer(l,c),gfm:o.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:!o.htmlDecode,smartLists:!0,smartypants:!0};a=new String(a);var h=marked(a,u);h=r.filterHTMLTags(h,o.htmlDecode),o.markdownSourceCode?s.text(a):s.remove(),i.addClass("markdown-body "+this.classPrefix+"html-preview").append(h);var f=""!==o.tocContainer?t(o.tocContainer):i;if(""!==o.tocContainer&&f.attr("previewContainer",!1),o.toc&&(i.tocContainer=this.markdownToCRenderer(l,f,o.tocDropdown,o.tocStartLevel),(o.tocDropdown||i.find("."+this.classPrefix+"toc-menu").length>0)&&this.tocDropdownMenu(i,o.tocTitle),""!==o.tocContainer&&i.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),o.previewCodeHighlight&&(i.find("pre").addClass("prettyprint linenums"),prettyPrint()),r.isIE8||(o.flowChart&&i.find(".flowchart").flowChart(),o.sequenceDiagram&&i.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),o.tex){var d=function(){i.find("."+r.classNames.tex).each(function(){var e=t(this);katex.render(e.text(),e[0]),e.find(".katex").css("font-size","1.0em")})};!o.autoLoadKaTeX||r.$katex||r.kaTeXLoaded?d():this.loadKaTeX(function(){r.$katex=katex,r.kaTeXLoaded=!0,d()})}return i.getMarkdown=function(){return s.val()},i},r.themes=["default","dark"],r.previewThemes=["default","dark"],r.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],r.loadPlugins={},r.loadFiles={js:[],css:[],plugin:[]},r.loadPlugin=function(t,e,n){e=e||function(){},this.loadScript(t,function(){r.loadFiles.plugin.push(t),e()},n)},r.loadCSS=function(t,e,n){n=n||"head",e=e||function(){};var i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.onload=i.onreadystatechange=function(){r.loadFiles.css.push(t),e()},i.href=t+".css","head"===n?document.getElementsByTagName("head")[0].appendChild(i):document.body.appendChild(i)},r.isIE="Microsoft Internet Explorer"==navigator.appName,r.isIE8=r.isIE&&"8."==navigator.appVersion.match(/8./i),r.loadScript=function(t,e,n){n=n||"head",e=e||function(){};var i=null;(i=document.createElement("script")).id=t.replace(/[\./]+/g,"-"),i.type="text/javascript",i.src=t+".js",r.isIE8?i.onreadystatechange=function(){i.readyState&&("loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,r.loadFiles.js.push(t),e()))}:i.onload=function(){r.loadFiles.js.push(t),e()},"head"===n?document.getElementsByTagName("head")[0].appendChild(i):document.body.appendChild(i)},r.katexURL={css:"/katex/katex.min",js:"/katex/katex.min"},r.kaTeXLoaded=!1,r.loadKaTeX=function(t){r.loadCSS(r.katexURL.css,function(){r.loadScript(r.katexURL.js,t||function(){})})},r.lockScreen=function(e){t("html,body").css("overflow",e?"hidden":"")},r.createDialog=function(e){e=t.extend(!0,{name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1},e);var n=this,i=this.editor,o=r.classPrefix,s=(new Date).getTime(),a=""===e.name?o+"dialog-"+s:e.name,l=r.mouseOrTouch,c='
          ';""!==e.title&&(c+='
          ",c+=''+e.title+"",c+="
          "),e.closed&&(c+=''),c+='
          '+e.content,(e.footer||"string"==typeof e.footer)&&(c+='"),c+="
          ",c+='
          ',c+='
          ',c+="
          ",i.append(c);var u=i.find("."+a);u.lockScreen=function(r){return e.lockScreen&&(t("html,body").css("overflow",r?"hidden":""),n.resize()),u},u.showMask=function(){return e.mask&&i.find("."+o+"mask").css(e.maskStyle).css("z-index",r.dialogZindex-1).show(),u},u.hideMask=function(){return e.mask&&i.find("."+o+"mask").hide(),u},u.loading=function(t){return u.find("."+o+"dialog-mask")[t?"show":"hide"](),u},u.lockScreen(!0).showMask(),u.show().css({zIndex:r.dialogZindex,border:r.isIE8?"1px solid #ddd":"",width:"number"==typeof e.width?e.width+"px":e.width,height:"number"==typeof e.height?e.height+"px":e.height});var h=function(){u.css({top:(t(window).height()-u.height())/2+"px",left:(t(window).width()-u.width())/2+"px"})};if(h(),t(window).resize(h),u.children("."+o+"dialog-close").bind(l("click","touchend"),function(){u.hide().lockScreen(!1).hideMask()}),"object"==typeof e.buttons){var f=u.footer=u.find("."+o+"dialog-footer");for(var d in e.buttons){var p=e.buttons[d],v=o+d+"-btn";f.append('"),p[1]=t.proxy(p[1],u),f.children("."+v).bind(l("click","touchend"),p[1])}}if(""!==e.title&&e.drag){var g,m,y=u.children("."+o+"dialog-header");e.mask||y.bind(l("click","touchend"),function(){r.dialogZindex+=2,u.css("z-index",r.dialogZindex)}),y.mousedown(function(t){t=t||window.event,g=t.clientX-parseInt(u[0].style.left),m=t.clientY-parseInt(u[0].style.top),document.onmousemove=w});var x=function(t){t.removeClass(o+"user-unselect").off("selectstart")},b=function(t){t.addClass(o+"user-unselect").on("selectstart",function(t){return!1})},w=function(e){e=e||window.event;var n,r,i=parseInt(u[0].style.left),o=parseInt(u[0].style.top);i>=0?i+u.width()<=t(window).width()?n=e.clientX-g:(n=t(window).width()-u.width(),document.onmousemove=null):(n=0,document.onmousemove=null),o>=0?r=e.clientY-m:(r=0,document.onmousemove=null),document.onselectstart=function(){return!1},b(t("body")),b(u),u[0].style.left=n+"px",u[0].style.top=r+"px"};document.onmouseup=function(){x(t("body")),x(u),document.onselectstart=null,document.onmousemove=null},y.touchDraggable=function(){var e=null;this.bind("touchstart",function(n){var r=n.originalEvent,i=t(this).parent().position();e={x:r.changedTouches[0].pageX-i.left,y:r.changedTouches[0].pageY-i.top}}).bind("touchmove",function(n){n.preventDefault();var r=n.originalEvent;t(this).parent().css({top:r.changedTouches[0].pageY-e.y,left:r.changedTouches[0].pageX-e.x})})},y.touchDraggable()}return r.dialogZindex+=2,t("body").removeAttr("style"),u},r.mouseOrTouch=function(t,e){e=e||"touchend";var n=t=t||"click";try{document.createEvent("TouchEvent"),n=e}catch(t){}return n},r.dateFormat=function(t){t=t||"";var e=function(t){return t<10?"0"+t:t},n=new Date,r=n.getFullYear(),i=r.toString().slice(2,4),o=e(n.getMonth()+1),s=e(n.getDate()),a=n.getDay(),l=e(n.getHours()),c=e(n.getMinutes()),u=e(n.getSeconds()),h=e(n.getMilliseconds()),f="",d=i+"-"+o+"-"+s,p=r+"-"+o+"-"+s,v=l+":"+c+":"+u;switch(t){case"UNIX Time":f=n.getTime();break;case"UTC":f=n.toUTCString();break;case"yy":f=i;break;case"year":case"yyyy":f=r;break;case"month":case"mm":f=o;break;case"cn-week-day":case"cn-wd":f="星期"+["日","一","二","三","四","五","六"][a];break;case"week-day":case"wd":f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][a];break;case"day":case"dd":f=s;break;case"hour":case"hh":f=l;break;case"min":case"ii":f=c;break;case"second":case"ss":f=u;break;case"ms":f=h;break;case"yy-mm-dd":f=d;break;case"yyyy-mm-dd":f=p;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":f=p+" "+v+" "+h;break;case"full":case"yyyy-mm-dd h:i:s":default:f=p+" "+v}return f},r}}),window._whenPasterDoUpload=function(t,e,n){var r,i,o,s=t.clipboardData,a=0;if(s){if(!(r=s.items))return;for(i=r[0],o=s.types||[];a=15&&(h=!1,l=!0);var k=y&&(c||h&&(null==w||w<12.11)),C=n||s&&a>=9;function _(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var S,T=function(t,e){var n=t.className,r=_(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function M(t,e){return L(t).appendChild(e)}function A(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}v?j=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(j=function(t){try{t.select()}catch(t){}});var H=function(){this.id=null};function R(t,e){for(var n=0;n=e)return r+Math.min(s,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var X=[""];function G(t){for(;X.length<=t;)X.push(Y(X)+" ");return X[t]}function Y(t){return t[t.length-1]}function K(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:e=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?vt(n,at(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?vt(t.line,e):n<0?vt(t.line,0):t}(e,at(t,e.line).text.length)}function Ct(t,e){for(var n=[],r=0;r=e:o.to>e);(r||(r=[])).push(new Tt(s,o.from,a?null:o.to))}}return r}(n,i,s),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var x=0;x=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?gt(c.to,n)>=0:gt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?gt(c.from,r)<=0:gt(c.from,r)<0)))return!0}}}function Rt(t){for(var e;e=Ft(t);)t=e.find(-1,!0).line;return t}function Wt(t,e){var n=at(t,e),r=Rt(n);return n==r?e:ht(r)}function zt(t,e){if(e>t.lastLine())return e;var n,r=at(t,e);if(!$t(t,r))return e;for(;n=It(r);)r=n.find(1,!0).line;return ht(r)+1}function $t(t,e){var n=St&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Gt=null;function Yt(t,e,n){var r;Gt=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:Gt=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:Gt=i)}return null!=r?r:Gt}var Kt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function a(t,e,n){this.level=t,this.from=e,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var h,f=l.length,d=[],p=0;pt.text.length?null:r}function Jt(t,e,n){var r=Qt(t,e.ch,n);return null==r?null:new vt(e.line,r,n<0?"after":"before")}function te(t,e,n,r,i){if(t){var o=Zt(n,e.doc.direction);if(o){var s,a=i<0?Y(o):o[0],l=i<0==(1==a.level)?"after":"before";if(a.level>0){var c=On(e,n);s=i<0?n.text.length-1:0;var u=Dn(e,c,s).top;s=st(function(t){return Dn(e,c,t).top==u},i<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Qt(n,s,1))}else s=i<0?a.to:a.from;return new vt(r,s,l)}}return new vt(r,i<0?n.text.length:0,i<0?"before":"after")}function ee(t,e,n,r){var i=Zt(e,t.doc.direction);if(!i)return Jt(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Yt(i,n.ch,n.sticky),s=i[o];if("ltr"==t.doc.direction&&s.level%2==0&&(r>0?s.to>n.ch:s.from=s.from&&f>=u.begin)){var d=h?"before":"after";return new vt(n.line,f,d)}}var p=function(t,e,r){for(var o=function(t,e){return e?new vt(n.line,l(t,1),"before"):new vt(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?r.begin:l(r.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==e.text.length||!(v=p(r>0?0:i.length-1,r,c(g)))?null:v}var ne=[],re=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||ne).concat(n)}};function ie(t,e){return t._handlers&&t._handlers[e]||ne}function oe(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var r=t._handlers,i=r&&r[e];if(i){var o=R(i,n);o>-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function se(t,e){var n=ie(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ue(t){t.prototype.on=function(t,e){re(this,t,e)},t.prototype.off=function(t,e){oe(this,t,e)}}function he(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function fe(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function de(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function pe(t){he(t),fe(t)}function ve(t){return t.target||t.srcElement}function ge(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var me,ye,xe=function(){if(s&&a<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}();function be(t){if(null==me){var e=A("span","​");M(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(me=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=me?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function we(t){if(null!=ye)return ye;var e=M(t,document.createTextNode("AخA")),n=S(e,0,1).getBoundingClientRect(),r=S(e,1,2).getBoundingClientRect();return L(t),!(!n||n.left==n.right)&&(ye=r.right-n.right<3)}var ke,Ce=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},_e=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Se="oncopy"in(ke=A("div"))||(ke.setAttribute("oncopy","return;"),"function"==typeof ke.oncopy),Te=null;var Le={},Me={};function Ae(t){if("string"==typeof t&&Me.hasOwnProperty(t))t=Me[t];else if(t&&"string"==typeof t.name&&Me.hasOwnProperty(t.name)){var e=Me[t.name];"string"==typeof e&&(e={name:e}),(t=Q(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ae("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ae("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ee(t,e){e=Ae(e);var n=Le[e.name];if(!n)return Ee(t,"text/plain");var r=n(t,e);if(Ne.hasOwnProperty(e.name)){var i=Ne[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)r[s]=e.modeProps[s];return r}var Ne={};function Oe(t,e){F(e,Ne.hasOwnProperty(t)?Ne[t]:Ne[t]={})}function De(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Be(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function je(t,e,n){return!t.startState||t.startState(e,n)}var Pe=function(t,e){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};function Fe(t,e,n,r){var i=[t.state.modeGen],o={};Ve(t,e.text,t.doc.mode,n,function(t,e){return i.push(t,e)},o,r);for(var s=function(n){var r=t.state.overlays[n],s=1,a=0;Ve(t,e.text,r.mode,!0,function(t,e){for(var n=s;at&&i.splice(s,1,t,i[s+1],o),s+=2,a=Math.min(t,o)}if(e)if(r.opaque)i.splice(n,s-n,t,"overlay "+e),s=n+2;else for(;nt.options.maxHighlightLength?De(t.doc.mode,r):r);e.stateAfter=r,e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function He(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return!0;var o=function(t,e,n){for(var r,i,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=at(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var c=I(l.text,null,t.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}(t,e,n),s=o>r.first&&at(r,o-1).stateAfter;return s=s?De(r.mode,s):je(r.mode),r.iter(o,e,function(n){Re(t,n.text,s);var a=o==e-1||o%5==0||o>=i.viewFrom&&oe.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function $e(t,e,n,r){var i,o=function(t){return{start:h.start,end:h.pos,string:h.current(),type:i||null,state:t?De(s.mode,u):u}},s=t.doc,a=s.mode;e=kt(s,e);var l,c=at(s,e.line),u=He(t,e.line,n),h=new Pe(c.text,t.options.tabSize);for(r&&(l=[]);(r||h.post.options.maxHighlightLength?(a=!1,s&&Re(t,e,r,h.pos),h.pos=e.length,l=null):l=qe(ze(n,h,r,f),o),f){var d=f[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!a||u!=l){for(;c=this.string.length},Pe.prototype.sol=function(){return this.pos==this.lineStart},Pe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pe.prototype.next=function(){if(this.pose},Pe.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Pe.prototype.skipToEnd=function(){this.pos=this.string.length},Pe.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Pe.prototype.backUp=function(t){this.pos-=t},Pe.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Pe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pe.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}};var Ue=function(t,e,n){this.text=t,Ot(this,e),this.height=n?n(this):1};function Xe(t){t.parent=null,Nt(t)}Ue.prototype.lineNo=function(){return ht(this)},ue(Ue);var Ge={},Ye={};function Ke(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Ye:Ge;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=E("span",null,null,l?"padding-right: .1px":null),r={pre:E("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(s||l)&&t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Je,we(t.display.measure)&&(a=Zt(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,Ie(t,o,e!=t.display.externalMeasured&&ht(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=B(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=B(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(be(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return se(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=B(r.pre.className,r.textClass||"")),r}function Qe(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);f++);if(h.to>=u)return t(n,r,i,o,s,a,l);t(n,r.slice(0,h.to-c),i,o,null,a,l),o=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var s,a,l,c,u,h,f,d=i.length,p=0,v=1,g="",m=0;;){if(m==p){l=c=u=h=a="",f=null,m=1/0;for(var y=[],x=void 0,b=0;bp||k.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==m&&(x||(x=[])).push(k.endStyle,w.to),k.title&&!h&&(h=k.title),k.collapsed&&(!f||jt(f.marker,k)<0)&&(f=w)):w.from>p&&m>w.from&&(m=w.from)}if(x)for(var C=0;C=d)break;for(var S=Math.min(d,m);;){if(g){var T=p+g.length;if(!f){var L=T>S?g.slice(0,S-p):g;e.addToken(e,L,s?s+l:l,u,p+L.length==m?c:"",h,a)}if(T>=S){g=g.slice(S-p),p=S;break}p=T,u=""}g=i.slice(o,o=n[v++]),s=Ke(n[v++],e.cm.options)}}else for(var M=1;Mn)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function En(t,e,n,r){return Dn(t,On(t,e),n,r)}function Nn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=Pn(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var d;c>0&&(h=r="right"),i=t.options.lineWrapping&&(d=l.getClientRects()).length>1?d["right"==r?d.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tr(t.display),top:p.top,bottom:p.bottom}:jn}for(var v=i.top-e.rect.top,g=i.bottom-e.rect.top,m=(v+g)/2,y=e.view.measure.heights,x=0;xe)&&(i=(o=l-a)-1,e>=l&&(s="right")),null!=i){if(r=t[c+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],s="left";if("right"==n&&i==l-a)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function In(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){return s(n?t-1:t,a[e].level%2!=0!=n)}var h=Yt(a,l,c),f=Gt,d=u(l,h,"before"==c);return null!=f&&(d.other=u(l,f,"before"!=c)),d}function Xn(t,e){var n=0;e=kt(t.doc,e),t.options.lineWrapping||(n=tr(t.display)*e.ch);var r=at(t.doc,e.line),i=Vt(r)+Cn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Gn(t,e,n,r,i){var o=vt(t,e,n);return o.xRel=i,r&&(o.outside=!0),o}function Yn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Gn(r.first,0,null,!0,-1);var i=ft(r,n),o=r.first+r.size-1;if(i>o)return Gn(r.first+r.size-1,at(r,o).text.length,null,!0,1);e<0&&(e=0);for(var s=at(r,i);;){var a=Qn(t,s,i,e,n),l=It(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=ht(s=c.to.line)}}function Kn(t,e,n,r){var i=function(r){return $n(t,e,Dn(t,n,r),"line")},o=e.text.length,s=st(function(t){return i(t-1).bottom<=r},o,0);return{begin:s,end:o=st(function(t){return i(t).top>r},s,o)}}function Zn(t,e,n,r){return Kn(t,e,n,$n(t,e,Dn(t,n,r),"line").top)}function Qn(t,e,n,r,i){i-=Vt(e);var o,s=0,a=e.text.length,l=On(t,e);if(Zt(e,t.doc.direction)){var c;if(t.options.lineWrapping)s=(c=Kn(t,e,l,i)).begin,a=c.end;o=new vt(n,s);var u,h,f=Un(t,o,"line",e,l).left,d=fMath.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var v=st(function(n){var o=$n(t,e,Dn(t,l,n),"line");return o.top>i?(a=Math.min(n,a),!0):!(o.bottom<=i)&&(o.left>r||!(o.rightg.right?1:0,o}function Jn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Bn){Bn=A("pre");for(var e=0;e<49;++e)Bn.appendChild(document.createTextNode("x")),Bn.appendChild(A("br"));Bn.appendChild(document.createTextNode("x"))}M(t.measure,Bn);var n=Bn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),L(t.measure),n||1}function tr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e]);M(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function er(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[t.options.gutters[s]]=o.clientWidth;return{fixedPos:nr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function nr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function rr(t){var e=Jn(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/tr(t.display)-3);return function(i){if($t(t.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r=t.display.viewTo||a.to().linee||e==n&&s.to==e)&&(r(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(e,n,"ltr")}(Zt(u,i.direction),n||0,null==r?h:r,function(t,e,i){var u,d,p,v=f(t,"left");if(t==e)u=v,d=p=v.left;else{if(u=f(e-1,"right"),"rtl"==i){var g=v;v=u,u=g}d=v.left,p=u.right}null==n&&0==t&&(d=a),u.top-v.top>3&&(c(d,v.top,null,v.bottom),d=a,v.bottoms.bottom||u.bottom==s.bottom&&u.right>s.right)&&(s=u),d0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function fr(t){t.state.focused||(t.display.input.focus(),dr(t))}function dr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(se(t,"focus",t,e),t.state.focused=!0,D(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),hr(t))}function pr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(se(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function vr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=nr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",s=0;s.001||u<-.001)&&(ut(i.line,o),yr(i.line),i.rest))for(var h=0;h=s&&(o=ft(e,Vt(at(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function br(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,n||oi(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),n&&oi(t),ti(t,100))}function wr(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,vr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}var kr=0,Cr=null;function _r(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Sr(t){var e=_r(t);return e.x*=Cr,e.y*=Cr,e}function Tr(t,e){var r=_r(e),i=r.x,o=r.y,s=t.display,a=s.scroller,c=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var f=e.target,d=s.view;f!=a;f=f.parentNode)for(var p=0;pt.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Mr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},Mr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},Mr.prototype.zeroWidthHack=function(){var t=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new H,this.disableVert=new H},Mr.prototype.enableZeroWidthBar=function(t,e){t.style.pointerEvents="auto",e.set(1e3,function n(){var r=t.getBoundingClientRect();document.elementFromPoint(r.left+1,r.bottom-1)!=t?t.style.pointerEvents="none":e.set(1e3,n)})},Mr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ar=function(){};function Er(t,e){e||(e=Lr(t));var n=t.display.barWidth,r=t.display.barHeight;Nr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&mr(t),Nr(t,Lr(t)),n=t.display.barWidth,r=t.display.barHeight}function Nr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Ar.prototype.update=function(){return{bottom:0,right:0}},Ar.prototype.setScrollLeft=function(){},Ar.prototype.setScrollTop=function(){},Ar.prototype.clear=function(){};var Or={native:Mr,null:Ar};function Dr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Or[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),re(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?wr(t,e):br(t,e)},t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}function Br(t,e){var n=t.display,r=Jn(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Mn(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+_n(n),l=e.topa-r;if(e.topi+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=i&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,f=Ln(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),d=e.right-e.left>f;return d&&(e.right=e.left+f),e.left<10?s.scrollLeft=0:e.leftf+h-3&&(s.scrollLeft=e.right+(d?0:10)-f),s}function jr(t,e,n){null==e&&null==n||Fr(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function Pr(t){Fr(t);var e=t.getCursor(),n=e,r=e;t.options.lineWrapping||(n=e.ch?vt(e.line,e.ch-1):e,r=vt(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:r,margin:t.options.cursorScrollMargin}}function Fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Xn(t,e.from),r=Xn(t,e.to),i=Br(t,{left:Math.min(n.left,r.left),top:Math.min(n.top,r.top)-e.margin,right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)+e.margin});t.scrollTo(i.scrollLeft,i.scrollTop)}}var Ir=0;function Hr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ir},e=t.curOp,sn?sn.ops.push(e):e.ownsGroup=sn={ops:[e],delayedCallbacks:[]}}function Rr(t){!function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ni(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function zr(t){var e=t.cm,n=e.display;t.updatedDisplay&&mr(e),t.barMeasure=Lr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=En(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Ln(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function $r(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0);for(var o=0;o<5;o++){var s=!1,a=Un(t,e),l=n&&n!=e?Un(t,n):a,c=Br(t,i={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(br(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(wr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return i}(e,kt(r,t.scrollToPos.from),kt(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var s=0;se)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)St&&Wt(t.doc,e)i.viewFrom?Zr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)Zr(t);else if(e<=i.viewFrom){var o=Qr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Zr(t)}else if(n>=i.viewTo){var s=Qr(t,e,e,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):Zr(t)}else{var a=Qr(t,e,e,-1),l=Qr(t,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(on(t,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Zr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[sr(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==R(s,n)&&s.push(n)}}}function Zr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Qr(t,e,n,r){var i,o=sr(t,e),s=t.display.view;if(!St||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;i=a+s[o].size-e,o++}else i=a-e;e+=i,n+=i}for(;Wt(t.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Jr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo)){var n=+new Date+t.options.workTime,r=De(e.mode,He(t,e.frontier)),i=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(e.frontier>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength,l=Fe(t,o,a?De(e.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!h&&fn)return ti(t,t.options.workDelay),!0}),i.length&&Vr(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Jr(t))return!1;gr(t)&&(Zr(t),e.dims=er(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),s=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),St&&(o=Wt(t.doc,o),s=zt(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,sr(t,n)))),r.viewTo=n}(t,o,s),n.viewOffset=Vt(at(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=Jr(t);if(!a&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=O();return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(d=!1),un(t,f,u,n)),d&&(L(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(pt(t.options,u)))),s=f.node.nextSibling}else{var p=mn(t,f,u,n);o.insertBefore(p,s)}u+=f.size}for(;s;)s=a(s)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&O()!=u&&u.offsetHeight&&u.focus(),L(n.cursorDiv),L(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ti(t,400)),n.updateLineNumbers=null,!0}function ii(t,e){for(var n=e.viewport,r=!0;(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ln(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+_n(t.display)-Mn(t),n.top)}),e.visible=xr(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&ri(t,e);r=!1){mr(t);var i=Lr(t);ar(t),Er(t,i),ai(t,i)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function oi(t,e){var n=new ni(t,e);if(ri(t,n)){mr(t),ii(t,n);var r=Lr(t);ar(t),Er(t,r),ai(t,r),n.finish()}}function si(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function ai(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function li(t){var e=t.display.gutters,n=t.options.gutters;L(e);for(var r=0;r-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}ni.prototype.signal=function(t,e){ce(t,e)&&this.events.push(arguments)},ni.prototype.finish=function(){for(var t=0;t=0&>(t,r.to())<=0)return n}return-1};var hi=function(t,e){this.anchor=t,this.head=e};function fi(t,e){var n=t[e];t.sort(function(t,e){return gt(t.from(),e.from())}),e=R(t,n);for(var r=1;r=0){var s=bt(o.from(),i.from()),a=xt(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=e&&--e,t.splice(--r,2,new hi(l?a:s,l?s:a))}}return new ui(t,e)}function di(t,e){return new ui([new hi(t,e||t)],0)}function pi(t){return t.text?vt(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function vi(t,e){if(gt(t,e.from)<0)return t;if(gt(t,e.to)<=0)return pi(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=pi(e).ch-e.to.ch),vt(n,r)}function gi(t,e){for(var n=[],r=0;r1&&t.remove(a.line+1,p-1),t.insert(a.line+1,m)}ln(t,"change",t,e)}function ki(t,e,n){!function t(r,i,o){if(r.linked)for(var s=0;sa-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Li(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i,i.lastOp==r)))s=Y(o.changes),0==gt(e.from,e.to)&&0==gt(e.from,s.to)?s.to=pi(e):o.changes.push(Ti(t,e));else{var l=Y(i.done);for(l&&l.ranges||Ei(t.sel,i.done),o={changes:[Ti(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,s||se(t,"historyAdded")}function Ai(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,Y(i.done),e))?i.done[i.done.length-1]=e:Ei(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Li(i.undone)}function Ei(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Ni(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function Oi(t){if(!t)return null;for(var e,n=0;n-1&&(Y(a)[h]=c[h],delete c[h])}}}return r}function ji(t,e,n,r){if(t.cm&&t.cm.display.shift||t.extend){var i=e.anchor;if(r){var o=gt(n,i)<0;o!=gt(r,i)<0?(i=n,n=r):o!=gt(n,r)<0&&(n=r)}return new hi(i,n)}return new hi(r||n,n)}function Pi(t,e,n,r){Wi(t,new ui([ji(t,t.sel.primary(),e,n)],0),r)}function Fi(t,e,n){for(var r=[],i=0;i=e.ch:a.to>e.ch))){if(i&&(se(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Gi(t,c,-r,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=gt(c,n))&&(r<0?u<0:u>0))return Ui(t,c,e,r,i)}var h=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Gi(t,h,r,h.line==e.line?o:null)),h?Ui(t,h,e,r,i):null}}return e}function Xi(t,e,n,r,i){var o=r||1,s=Ui(t,e,n,o,i)||!i&&Ui(t,e,n,o,!0)||Ui(t,e,n,-o,i)||!i&&Ui(t,e,n,-o,!0);return s||(t.cantEdit=!0,vt(t.first,0))}function Gi(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?kt(t,vt(e.line-1)):null:n>0&&e.ch==(r||at(t,e.line)).text.length?e.line0)){var u=[l,1],h=gt(c.from,a.from),f=gt(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)Qi(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text});else Qi(t,e)}}function Qi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=gt(e.from,e.to)){var n=gi(t,e);Mi(t,e,n,t.cm?t.cm.curOp.id:NaN),eo(t,e,n,At(t,e));var r=[];ki(t,function(t,n){n||-1!=R(r,t.history)||(oo(t.history,e),r.push(t.history)),eo(t,e,null,At(t,e))})}}function Ji(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var r,i=t.history,o=t.sel,s="undo"==e?i.done:i.undone,a="undo"==e?i.undone:i.done,l=0;l=0;--f){var d=h(f);if(d)return d.v}}}}function to(t,e){if(0!=e&&(t.first+=e,t.sel=new ui(K(t.sel.ranges,function(t){return new hi(vt(t.anchor.line+e,t.anchor.ch),vt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Yr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:vt(o,at(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=gi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=ht(Rt(at(r,o.line))),r.iter(l,s.line+1,function(t){if(t==i.maxLine)return a=!0,!0}));r.sel.contains(e.from,e.to)>-1&&le(t);wi(r,e,n,rr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,function(t){var e=Ut(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0));r.frontier=Math.min(r.frontier,o.line),ti(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?Yr(t):o.line!=s.line||1!=e.text.length||bi(t.doc,e)?Yr(t,o.line,s.line+1,c):Kr(t,o.line,"text");var u=ce(t,"changes"),h=ce(t,"change");if(h||u){var f={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&ln(t,"change",t,f),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(f)}t.display.selForContextMenu=null}(t.cm,e,r):wi(t,e,r),zi(t,n,$)}}function no(t,e,n,r,i){if(r||(r=n),gt(r,n)<0){var o=r;r=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Zi(t,{from:n,to:r,text:e,origin:i})}function ro(t,e,n,r){n1||!(this.children[0]instanceof ao))){var a=[];this.collapse(a),this.children=[new ao(a)],this.children[0].parent=this}},lo.prototype.collapse=function(t){for(var e=0;e50){for(var s=i.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},lo.prototype.iterN=function(t,e,n){for(var r=0;r0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ht(t,e.line,e,n,o)||e.line!=n.line&&Ht(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}o.addToHistory&&Mi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Rt(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Tt(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){$t(t,e)&&ut(e,0)}),o.clearOnEnter&&re(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(_t=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ho,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Yr(c,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=e.line;u<=n.line;u++)Kr(c,u,"text");o.atomic&&qi(c.doc),ln(c,"markerAdded",c,o)}return o}fo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Hr(t),ce(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Yr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&qi(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&Rr(t),this.parent&&this.parent.clear()}},fo.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)Zi(this,r[l]);a?Ri(this,a):this.cm&&Pr(this.cm)}),undo:Gr(function(){Ji(this,"undo")}),redo:Gr(function(){Ji(this,"redo")}),undoSelection:Gr(function(){Ji(this,"undo",!0)}),redoSelection:Gr(function(){Ji(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=kt(this,t),e=kt(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n}),kt(this,vt(n,e))},indexFromPos:function(t){var e=(t=kt(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),zi(e.doc,di(n,n)),h)for(var f=0;f=0;e--)no(t.doc,"",r[e].from,r[e].to,"+delete");Pr(t)})}No.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},No.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},No.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},No.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},No.default=y?No.macDefault:No.pcDefault;var Ho={selectAll:Yi,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),$)},killLine:function(t){return Io(t,function(e){if(e.empty()){var n=at(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new vt(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),vt(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var s=at(t.doc,i.line-1).text;s&&(i=new vt(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),vt(i.line-1,s.length-1),i,"+transpose"))}n.push(new hi(i,i))}t.setSelections(n)})},newlineAndIndent:function(t){return Vr(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;ri-400&&0==gt(Xo.pos,n)?r="triple":Uo&&Uo.time>i-400&&0==gt(Uo.pos,n)?(r="double",Xo={time:i,pos:n}):(r="single",Uo={time:i,pos:n});var o,c=t.doc.sel,u=y?e.metaKey:e.ctrlKey;t.options.dragDrop&&xe&&!t.isReadOnly()&&"single"==r&&(o=c.contains(n))>-1&&(gt((o=c.ranges[o]).from(),n)<0||n.xRel>0)&&(gt(o.to(),n)>0||n.xRel<0)?function(t,e,n,r){var i=t.display,o=+new Date,c=Ur(t,function(u){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,oe(document,"mouseup",c),oe(i.scroller,"drop",c),Math.abs(e.clientX-u.clientX)+Math.abs(e.clientY-u.clientY)<10&&(he(u),!r&&+new Date-200-1?u[l]:new hi(n,n)):(a=s.sel.primary(),l=s.sel.primIndex);if(x?e.shiftKey&&e.metaKey:e.altKey)r="rect",i||(a=new hi(n,n)),n=or(t,e,!0,!0),l=-1;else if("double"==r){var h=t.findWordAt(n);a=t.display.shift||s.extend?ji(s,a,h.anchor,h.head):h}else if("triple"==r){var f=new hi(vt(n.line,0),kt(s,vt(n.line+1,0)));a=t.display.shift||s.extend?ji(s,a,f.anchor,f.head):f}else a=ji(s,a,n);i?-1==l?(l=u.length,Wi(s,fi(u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"single"==r&&!e.shiftKey?(Wi(s,fi(u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=s.sel):Ii(s,l,a,q):(l=0,Wi(s,new ui([a],0),q),c=s.sel);var d=n;var p=o.wrapper.getBoundingClientRect(),v=0;function g(e){var i=++v,u=or(t,e,!0,"rect"==r);if(u)if(0!=gt(u,d)){t.curOp.focus=O(),function(e){if(0==gt(d,e))return;if(d=e,"rect"==r){for(var i=[],o=t.options.tabSize,u=I(at(s,n.line).text,n.ch,o),h=I(at(s,e.line).text,e.ch,o),f=Math.min(u,h),p=Math.max(u,h),v=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));v<=g;v++){var m=at(s,v).text,y=U(m,f,o);f==p?i.push(new hi(vt(v,y),vt(v,y))):m.length>y&&i.push(new hi(vt(v,y),vt(v,U(m,p,o))))}i.length||i.push(new hi(n,n)),Wi(s,fi(c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var x,b=a,w=b.anchor,k=e;if("single"!=r)gt((x="double"==r?t.findWordAt(e):new hi(vt(e.line,0),kt(s,vt(e.line+1,0)))).anchor,w)>0?(k=x.head,w=bt(b.from(),x.anchor)):(k=x.anchor,w=xt(b.to(),x.head));var C=c.ranges.slice(0);C[l]=new hi(kt(s,w),k),Wi(s,fi(C,l),q)}}(u);var h=xr(o,s);(u.line>=h.to||u.linep.bottom?20:0;f&&setTimeout(Ur(t,function(){v==i&&(o.scroller.scrollTop+=f,g(e))}),50)}}function m(e){t.state.selectingText=!1,v=1/0,he(e),o.input.focus(),oe(document,"mousemove",y),oe(document,"mouseup",b),s.history.lastSelOrigin=null}var y=Ur(t,function(t){ge(t)?g(t):m(t)}),b=Ur(t,m);t.state.selectingText=b,re(document,"mousemove",y),re(document,"mouseup",b)}(t,e,n,r,u)}(e,t,r):ve(t)==n.scroller&&he(t);break;case 2:l&&(e.state.lastMiddleDown=+new Date),r&&Pi(e.doc,r),setTimeout(function(){return n.input.focus()},20),he(t);break;case 3:C?es(e,t):function(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,pr(t))},100)}(e)}}}function Jo(t,e,n,r){var i,o;try{i=e.clientX,o=e.clientY}catch(e){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&he(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!ce(t,n))return de(e);o-=a.top-s.viewOffset;for(var l=0;l=i)return se(t,n,t,ft(t.doc,o),t.options.gutters[l],e),de(e)}}function ts(t,e){return Jo(t,e,"gutterClick",!0)}function es(t,e){kn(t.display,e)||function(t,e){if(!ce(t,"gutterContextMenu"))return!1;return Jo(t,e,"gutterContextMenu",!1)}(t,e)||ae(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function ns(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rn(t)}var rs={toString:function(){return"CodeMirror.Init"}},is={},os={};function ss(t){li(t),Yr(t),vr(t)}function as(t,e,n){if(!e!=!(n&&n!=rs)){var r=t.display.dragFunctions,i=e?re:oe;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function ls(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),Xt(t)),ir(t),Yr(t),Rn(t),setTimeout(function(){return Er(t)},100)}function cs(t,e){var r=this;if(!(this instanceof cs))return new cs(t,e);this.options=e=e?F(e):{},F(is,e,!1),ci(e);var i=e.value;"string"==typeof i&&(i=new xo(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var o=new cs.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,r){var i=this;this.input=r,i.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=E("div",null,"CodeMirror-code"),i.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=A("div",null,"CodeMirror-cursors"),i.measure=A("div",null,"CodeMirror-measure"),i.lineMeasure=A("div",null,"CodeMirror-measure"),i.lineSpace=E("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=E("div",[i.lineSpace],"CodeMirror-lines");i.mover=A("div",[o],null,"position: relative"),i.sizer=A("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=A("div",null,null,"position: absolute; height: "+W+"px; width: 1px;"),i.gutters=A("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=A("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=A("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),s&&a<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&m||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}(t,i,o);for(var u in c.wrapper.CodeMirror=this,li(this),ns(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Dr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},e.autofocus&&!m&&c.input.focus(),s&&a<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(t){var e=t.display;re(e.scroller,"mousedown",Ur(t,Qo)),re(e.scroller,"dblclick",s&&a<11?Ur(t,function(e){if(!ae(t,e)){var n=or(t,e);if(n&&!ts(t,e)&&!kn(t.display,e)){he(e);var r=t.findWordAt(n);Pi(t.doc,r.anchor,r.head)}}}):function(e){return ae(t,e)||he(e)});C||re(e.scroller,"contextmenu",function(e){return es(t,e)});var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}re(e.scroller,"touchstart",function(i){if(!ae(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}}),re(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),re(e.scroller,"touchend",function(n){var r=e.activeTouch;if(r&&!kn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var s,a=t.coordsChar(e.activeTouch,"page");s=!r.prev||o(r,r.prev)?new hi(a,a):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(a):new hi(vt(a.line,0),kt(t.doc,vt(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),he(n)}i()}),re(e.scroller,"touchcancel",i),re(e.scroller,"scroll",function(){e.scroller.clientHeight&&(br(t,e.scroller.scrollTop),wr(t,e.scroller.scrollLeft,!0),se(t,"scroll",t))}),re(e.scroller,"mousewheel",function(e){return Tr(t,e)}),re(e.scroller,"DOMMouseScroll",function(e){return Tr(t,e)}),re(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){ae(t,e)||pe(e)},over:function(e){ae(t,e)||(!function(t,e){var n=or(t,e);if(n){var r=document.createDocumentFragment();cr(t,n,r),t.display.dragCursor||(t.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),M(t.display.dragCursor,r)}}(t,e),pe(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-bo<100))pe(e);else if(!ae(t,e)&&!kn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:Ur(t,wo),leave:function(e){ae(t,e)||ko(t)}};var l=e.input.getField();re(l,"keyup",function(e){return Ko.call(t,e)}),re(l,"keydown",Ur(t,Yo)),re(l,"keypress",Ur(t,Zo)),re(l,"focus",function(e){return dr(t,e)}),re(l,"blur",function(e){return pr(t,e)})}(this),So(),Hr(this),this.curOp.forceUpdate=!0,Ci(this,i),e.autofocus&&!m||this.hasFocus()?setTimeout(P(dr,this),20):pr(this),os)os.hasOwnProperty(u)&&os[u](r,e[u],rs);gr(this),e.finishInit&&e.finishInit(this);for(var d=0;d150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?I(at(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",f=0;if(t.options.indentWithTabs)for(var d=Math.floor(c/s);d;--d)f+=s,h+="\t";if(f1)if(fs&&fs.text.join("\n")==e){if(r.ranges.length%fs.text.length==0){c=[];for(var u=0;u=0;h--){var f=r.ranges[h],d=f.from(),p=f.to();f.empty()&&(n&&n>0?d=vt(d.line,d.ch-n):t.state.overwrite&&!a?p=vt(p.line,Math.min(at(o,p.line).text.length,p.ch+Y(l).length)):fs&&fs.lineWise&&fs.text.join("\n")==e&&(d=p=vt(d.line,0))),s=t.curOp.updateInput;var v={from:d,to:p,text:c?c[h%c.length]:l,origin:i||(a?"paste":t.state.cutIncoming?"cut":"+input")};Zi(t.doc,v),ln(t,"inputRead",t,v)}e&&!a&&gs(t,e),Pr(t),t.curOp.updateInput=s,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function vs(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Vr(e,function(){return ps(e,n,0,null,"paste")}),!0}function gs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=hs(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(at(t.doc,i.head.line).text.slice(0,i.head.ch))&&(s=hs(t,i.head.line,"smart"));s&&ln(t,"electricInput",t,i.head.line)}}}function ms(t){for(var e=[],n=[],r=0;r=t.first+t.size||(e=new vt(s,e.ch,e.sticky),!(a=at(t,s))))return!1;e=te(i,t.cm,a,e.line,n)}else e=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,h=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||l(!f);f=!1){var d=a.text.charAt(e.ch)||"\n",p=et(d,h)?"w":u&&"\n"==d?"n":!u||/\s/.test(d)?null:"p";if(!u||f||p||(p="s"),c&&c!=p){n<0&&(n=1,l(),e.sticky="after");break}if(p&&(c=p),n>0&&!l(!f))break}var v=Xi(t,e,o,s,!0);return mt(o,v)&&(v.hitSide=!0),v}function ws(t,e,n,r){var i,o,s=t.doc,a=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Jn(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Yn(t,a,i)).outside;){if(n<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*n}return o}var ks=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Cs(t,e){var n=Nn(t,e.line);if(!n||n.hidden)return null;var r=at(t.doc,e.line),i=An(n,r,e.line),o=Zt(r,t.doc.direction),s="left";o&&(s=Yt(o,e.ch)%2?"right":"left");var a=Pn(i.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function _s(t,e){return e&&(t.bad=!0),t}function Ss(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return _s(t.clipPos(vt(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;ir.firstLine()&&(s=vt(s.line-1,at(r.doc,s.line-1).length)),a.ch==at(r.doc,a.line).text.length&&a.linei.viewTo-1)return!1;s.line==i.viewFrom||0==(t=sr(r,s.line))?(e=ht(i.view[0].line),n=i.view[0].node):(e=ht(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=sr(r,a.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=ht(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",s=!1,a=t.doc.lineSeparator();function l(){s&&(o+=a,s=!1)}function c(t){t&&(l(),o+=t)}function u(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void c(n||e.textContent.replace(/\u200b/g,""));var o,h=e.getAttribute("cm-marker");if(h){var f=t.findMarks(vt(r,0),vt(i+1,0),(v=+h,function(t){return t.id==v}));return void(f.length&&(o=f[0].find())&&c(lt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(e.nodeName);d&&l();for(var p=0;p1&&f.length>1;)if(Y(h)==Y(f))h.pop(),f.pop(),l--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var d=0,p=0,v=h[0],g=f[0],m=Math.min(v.length,g.length);ds.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var w=vt(e,d),k=vt(l,f.length?Y(f).length-p:0);return h.length>1||h[0]||gt(w,k)?(no(r.doc,h,w,k,"+input"),!0):void 0},ks.prototype.ensurePolled=function(){this.forceCompositionEnd()},ks.prototype.reset=function(){this.forceCompositionEnd()},ks.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ks.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},ks.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Vr(this.cm,function(){return Yr(t.cm)})},ks.prototype.setUneditable=function(t){t.contentEditable="false"},ks.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||Ur(this.cm,ps)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},ks.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},ks.prototype.onContextMenu=function(){},ks.prototype.resetPosition=function(){},ks.prototype.needsContentAttribute=!0;var Ls=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ls.prototype.init=function(t){var e=this,n=this,r=this.cm,i=this.wrapper=xs(),o=this.textarea=i.firstChild;function l(t){if(!ae(r,t)){if(r.somethingSelected())ds({lineWise:!1,text:r.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=fs.text.join("\n"),j(o));else{if(!r.options.lineWiseCopyCut)return;var e=ms(r);ds({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,$):(n.prevInput="",o.value=e.text.join("\n"),j(o))}"cut"==t.type&&(r.state.cutIncoming=!0)}}t.wrapper.insertBefore(i,t.wrapper.firstChild),v&&(o.style.width="0px"),re(o,"input",function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),re(o,"paste",function(t){ae(r,t)||vs(t,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),re(o,"cut",l),re(o,"copy",l),re(t.scroller,"paste",function(e){kn(t,e)||ae(r,e)||(r.state.pasteIncoming=!0,n.focus())}),re(t.lineSpace,"selectstart",function(e){kn(t,e)||he(e)}),re(o,"compositionstart",function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),re(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ls.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=lr(t);if(t.options.moveInputWithCursor){var i=Un(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},Ls.prototype.showSelection=function(t){var e=this.cm.display;M(e.cursorDiv,t.cursors),M(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ls.prototype.reset=function(t){if(!this.contextMenuPending){var e,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary(),l=(e=Se&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3))?"-":n||r.getSelection();this.textarea.value=l,r.state.focused&&j(this.textarea),s&&a>=9&&(this.hasSelection=l)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},Ls.prototype.getField=function(){return this.textarea},Ls.prototype.supportsTouch=function(){return!1},Ls.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||O()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ls.prototype.blur=function(){this.textarea.blur()},Ls.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ls.prototype.receivedFocus=function(){this.slowPoll()},Ls.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ls.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Ls.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||_e(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ls.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ls.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Ls.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea,o=or(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ur(n,Wi)(n.doc,di(o),$);var u=i.style.cssText,f=e.wrapper.style.cssText;e.wrapper.style.cssText="position: absolute";var d,p=e.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(d=window.scrollY),r.input.focus(),l&&window.scrollTo(null,d),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&g(),C){pe(t);var v=function(){oe(window,"mouseup",v),setTimeout(m,20)};re(window,"mouseup",v)}else setTimeout(m,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=u,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart){(!s||s&&a<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?Ur(n,Yi)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ls.prototype.readOnlyChanged=function(t){t||this.reset()},Ls.prototype.setUneditable=function(){},Ls.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=rs&&i(t,e,n)}:i)}t.defineOption=n,t.Init=rs,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,yi(t)},!0),n("indentUnit",2,yi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){xi(t),Rn(t),Yr(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter(function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(vt(r,o))}r++});for(var i=n.length-1;i>=0;i--)no(t.doc,e,n[i],vt(n[i].line,n[i].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=rs&&t.refresh()}),n("specialCharPlaceholder",Qe,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){ns(t),ss(t)},!0),n("keyMap","default",function(t,e,n){var r=Fo(e),i=n!=rs&&Fo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)}),n("extraKeys",null),n("lineWrapping",!1,ls,!0),n("gutters",[],function(t){ci(t.options),ss(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?nr(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Er(t)},!0),n("scrollbarStyle","native",function(t){Dr(t),Er(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){ci(t.options),ss(t)},!0),n("firstLineNumber",1,ss,!0),n("lineNumberFormatter",function(t){return t},ss,!0),n("showCursorWhenSelecting",!1,ar,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("readOnly",!1,function(t,e){"nocursor"==e?(pr(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,as),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,ar,!0),n("singleCursorHeightPerLine",!0,ar,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,xi,!0),n("addModeClass",!1,xi,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,xi,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(cs),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&Ur(this,e[t])(this,n,i),se(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Fo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(hs(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ii(this.doc,r,new hi(o,c[r].to()),$)}}}),getTokenAt:function(t,e){return $e(this,t,e)},getLineTokens:function(t,e){return $e(this,vt(t),e,!0)},getTokenTypeAt:function(t){t=kt(this.doc,t);var e,n=Ie(this,at(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]o&&(t=o,i=!0),r=at(this.doc,t)}else r=t;return $n(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return Jn(this.display)},defaultCharWidth:function(){return tr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,s,a,l=this.display,c=(t=Un(this,kt(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>f&&(u=f-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,s={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Br(o,s)).scrollTop&&br(o,a.scrollTop),null!=a.scrollLeft&&wr(o,a.scrollLeft))},triggerOnKeyDown:Xr(Yo),triggerOnKeyPress:Xr(Zo),triggerOnKeyUp:Ko,execCommand:function(t){if(Ho.hasOwnProperty(t))return Ho[t].call(null,this)},triggerElectric:Xr(function(t){gs(this,t)}),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=kt(this.doc,t),s=0;s0&&s(e.charAt(n-1));)--n;for(;r.5)&&ir(this),se(this,"refresh",this)}),swapDoc:Xr(function(t){var e=this.doc;return e.cm=null,Ci(this,t),Rn(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ue(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(cs);var Ms="iter insert remove copy getEditor constructor".split(" ");for(var As in xo.prototype)xo.prototype.hasOwnProperty(As)&&R(Ms,As)<0&&(cs.prototype[As]=function(t){return function(){return t.apply(this.doc,arguments)}}(xo.prototype[As]));return ue(xo),cs.inputStyles={textarea:Ls,contenteditable:ks},cs.defineMode=function(t){cs.defaults.mode||"null"==t||(cs.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Le[t]=e}.apply(this,arguments)},cs.defineMIME=function(t,e){Me[t]=e},cs.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),cs.defineMIME("text/plain","null"),cs.defineExtension=function(t,e){cs.prototype[t]=e},cs.defineDocExtension=function(t,e){xo.prototype[t]=e},cs.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=O();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=a.getValue()}var i;if(t.form&&(re(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(oe(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var a=cs(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return a},function(t){t.off=oe,t.on=re,t.wheelEventPixels=Sr,t.Doc=xo,t.splitLines=Ce,t.countColumn=I,t.findColumn=U,t.isWordChar=tt,t.Pass=z,t.signal=se,t.Line=Ue,t.changeEnd=pi,t.scrollbarModel=Or,t.Pos=vt,t.cmpPos=gt,t.modes=Le,t.mimeModes=Me,t.resolveMode=Ae,t.getMode=Ee,t.modeExtensions=Ne,t.extendMode=Oe,t.copyState=De,t.startState=je,t.innerMode=Be,t.commands=Ho,t.keyMap=No,t.keyName=Po,t.isModifierKey=jo,t.lookupKey=Bo,t.normalizeKeyMap=Do,t.StringStream=Pe,t.SharedTextMarker=vo,t.TextMarker=fo,t.LineWidget=co,t.e_preventDefault=he,t.e_stopPropagation=fe,t.e_stop=pe,t.addClass=D,t.contains=N,t.rmClass=T,t.keyNames=Lo}(cs),cs.version="5.25.0",cs}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var e="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function i(t){for(var i=0;i!?|~^]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return r=t,i=n,e}function v(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(a&&"@"==t.peek()&&t.match(d))return e.tokenize=v,p("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=v),p("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==r&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&t.eat(">"))return p("=>","operator");if("0"==r&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),p("number","number");if(/\d/.test(r))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),p("number","number");if("/"==r)return t.eat("*")?(e.tokenize=g,g(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):"operator"==e.lastType||"keyword c"==e.lastType||"sof"==e.lastType||/^[\[{}\(,;:]$/.test(e.lastType)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),p("regexp","string-2")):(t.eatWhile(f),p("operator","operator",t.current()));if("`"==r)return e.tokenize=m,m(t,e);if("#"==r)return t.skipToEnd(),p("error","error");if(f.test(r))return t.eatWhile(f),p("operator","operator",t.current());if(u.test(r)){t.eatWhile(u);var i=t.current(),o=h.propertyIsEnumerable(i)&&h[i];return o&&"."!=e.lastType?p(o.type,o.style,i):p("variable","variable",i)}}function g(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=v;break}r="*"==n}return p("comment","comment")}function m(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=v;break}r=!r&&"\\"==n}return p("quasi","string-2",t.current())}var y="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=t.string.charAt(o),a=y.indexOf(s);if(a>=0&&a<3){if(!r){++o;break}if(0==--r)break}else if(a>=3&&a<6)++r;else if(u.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(e.fatArrowAt=o)}}var b={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function k(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}var C={state:null,column:null,marked:null,cc:null};function _(){for(var t=arguments.length-1;t>=0;t--)C.cc.push(arguments[t])}function S(){return _.apply(null,arguments),!0}function T(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var r=C.state;if(r.context){if(C.marked="def",e(r.localVars))return;r.localVars={name:t,next:r.localVars}}else{if(e(r.globalVars))return;n.globalVars&&(r.globalVars={name:t,next:r.globalVars})}}var L={name:"this",next:{name:"arguments"}};function M(){C.state.context={prev:C.state.context,vars:C.state.localVars},C.state.localVars=L}function A(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function E(t,e){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,C.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function N(){var t=C.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function O(t){return function e(n){return n==t?S():";"==t?_():S(e)}}function D(t,e){return"var"==t?S(E("vardef",e.length),et,O(";"),N):"keyword a"==t?S(E("form"),B,D,N):"keyword b"==t?S(E("form"),D,N):"{"==t?S(E("}"),Q,N):";"==t?S():"if"==t?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==N&&C.state.cc.pop()(),S(E("form"),B,D,N,st)):"function"==t?S(ft):"for"==t?S(E("form"),at,D,N):"variable"==t?S(E("stat"),V):"switch"==t?S(E("form"),B,E("}","switch"),O("{"),Q,N,N):"case"==t?S(B,O(":")):"default"==t?S(O(":")):"catch"==t?S(E("form"),M,O("("),dt,O(")"),D,N,A):"module"==t?S(E("form"),M,yt,A,N):"class"==t?S(E("form"),pt,N):"export"==t?S(E("form"),xt,N):"import"==t?S(E("form"),bt,N):_(E("stat"),B,O(";"),N)}function B(t){return P(t,!1)}function j(t){return P(t,!0)}function P(t,e){if(C.state.fatArrowAt==C.stream.start){var n=e?q:$;if("("==t)return S(M,E(")"),K(nt,")"),N,O("=>"),n,A);if("variable"==t)return _(M,nt,O("=>"),n,A)}var r=e?R:H;return b.hasOwnProperty(t)?S(r):"function"==t?S(ft,r):"keyword c"==t?S(e?I:F):"("==t?S(E(")"),F,St,O(")"),N,r):"operator"==t||"spread"==t?S(e?j:B):"["==t?S(E("]"),Ct,N,r):"{"==t?Z(X,"}",null,r):"quasi"==t?_(W,r):S()}function F(t){return t.match(/[;\}\)\],]/)?_():_(B)}function I(t){return t.match(/[;\}\)\],]/)?_():_(j)}function H(t,e){return","==t?S(B):R(t,e,!1)}function R(t,e,n){var r=0==n?H:R,i=0==n?B:j;return"=>"==t?S(M,n?q:$,A):"operator"==t?/\+\+|--/.test(e)?S(r):"?"==e?S(B,O(":"),i):S(i):"quasi"==t?_(W,r):";"!=t?"("==t?Z(j,")","call",r):"."==t?S(U,r):"["==t?S(E("]"),F,O("]"),N,r):void 0:void 0}function W(t,e){return"quasi"!=t?_():"${"!=e.slice(e.length-2)?S(W):S(B,z)}function z(t){if("}"==t)return C.marked="string-2",C.state.tokenize=m,S(W)}function $(t){return x(C.stream,C.state),_("{"==t?D:B)}function q(t){return x(C.stream,C.state),_("{"==t?D:j)}function V(t){return":"==t?S(N,D):_(H,O(";"),N)}function U(t){if("variable"==t)return C.marked="property",S()}function X(t,e){return"variable"==t||"keyword"==C.style?(C.marked="property",S("get"==e||"set"==e?G:Y)):"number"==t||"string"==t?(C.marked=a?"property":C.style+" property",S(Y)):"jsonld-keyword"==t?S(Y):"["==t?S(B,O("]"),Y):void 0}function G(t){return"variable"!=t?_(Y):(C.marked="property",S(ft))}function Y(t){return":"==t?S(j):"("==t?_(ft):void 0}function K(t,e){function n(r){if(","==r){var i=C.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),S(t,n)}return r==e?S():S(O(e))}return function(r){return r==e?S():_(t,n)}}function Z(t,e,n){for(var r=3;r=0;--l){var c=e.cc[l];if(c==N)a=a.prev;else if(c!=st)break}"stat"==a.type&&"}"==i&&(a=a.prev),s&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var u=a.type,h=i==u;return"vardef"==u?a.indented+("operator"==e.lastType||","==e.lastType?a.info+1:0):"form"==u&&"{"==i?a.indented:"form"==u?a.indented+o:"stat"==u?a.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||f.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?s||o:0):"switch"!=a.info||h||0==n.doubleIndentSwitch?a.align?a.column+(h?0:1):a.indented+(h?0:o):a.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(){function t(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}t.prototype.diff_main=function(t,e,n,r){if(void 0===r&&(r=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout),null==t||null==e)throw Error("Null input. (diff_main)");if(t==e)return t?[[0,t]]:[];void 0===n&&(n=!0);var i=n,o=this.diff_commonPrefix(t,e);n=t.substring(0,o),t=t.substring(o),e=e.substring(o);o=this.diff_commonSuffix(t,e);var s=t.substring(t.length-o);return t=t.substring(0,t.length-o),e=e.substring(0,e.length-o),t=this.diff_compute_(t,e,i,r),n&&t.unshift([0,n]),s&&t.push([0,s]),this.diff_cleanupMerge(t),t},t.prototype.diff_compute_=function(t,e,n,r){if(!t)return[[1,e]];if(!e)return[[-1,t]];var i=t.length>e.length?t:e,o=t.length>e.length?e:t,s=i.indexOf(o);return-1!=s?(n=[[1,i.substring(0,s)],[0,o],[1,i.substring(s+o.length)]],t.length>e.length&&(n[0][0]=n[2][0]=-1),n):1==o.length?[[-1,t],[1,e]]:(i=this.diff_halfMatch_(t,e))?(o=i[0],t=i[1],s=i[2],e=i[3],i=i[4],o=this.diff_main(o,s,n,r),n=this.diff_main(t,e,n,r),o.concat([[0,i]],n)):n&&100n);g++){for(var m=-g+f;m<=g-d;m+=2){for(var y,x=s+m,b=(y=m==-g||m!=g&&l[x-1]r)d+=2;else if(b>i)f+=2;else if(h&&(0<=(x=s+u-m)&&x=w)return this.diff_bisectSplit_(t,e,y,b,n)}}for(m=-g+p;m<=g-v;m+=2){for(x=s+m,y=(w=m==-g||m!=g&&c[x-1]r)v+=2;else if(y>i)p+=2;else if(!h&&(0<=(x=s+u-m)&&x=(w=r-w))))return this.diff_bisectSplit_(t,e,y,b,n)}}return[[-1,t],[1,e]]},t.prototype.diff_bisectSplit_=function(t,e,n,r,i){var o=t.substring(0,n),s=e.substring(0,r);return t=t.substring(n),e=e.substring(r),o=this.diff_main(o,s,!1,i),i=this.diff_main(t,e,!1,i),o.concat(i)},t.prototype.diff_linesToChars_=function(t,e){function n(t){for(var e="",n=0,o=-1,s=r.length;or?t=t.substring(n-r):n=t.length?[r,i,o,s,u]:null}if(0>=this.Diff_Timeout)return null;var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(4>r.length||2*i.lengthr[4].length?l:r:l,t.length>e.length?(l=o[0],r=o[1],i=o[2],s=o[3]):(i=o[0],s=o[1],l=o[2],r=o[3]),[l,r,i,s,o=o[4]]):null},t.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,i=null,o=0,s=0,a=0,l=0,c=0;o=(i=this.diff_commonOverlap_(n,e))?(r>=e.length/2||r>=n.length/2)&&(t.splice(o,0,[0,n.substring(0,r)]),t[o-1][1]=e.substring(0,e.length-r),t[o+1][1]=n.substring(r),o++):(i>=e.length/2||i>=n.length/2)&&(t.splice(o,0,[0,e.substring(0,i)]),t[o-1][0]=1,t[o-1][1]=n.substring(0,n.length-i),t[o+1][0]=-1,t[o+1][1]=e.substring(i),o++),o++),o++},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),s=i.match(t.nonAlphaNumericRegex_),a=o&&r.match(t.whitespaceRegex_),l=s&&i.match(t.whitespaceRegex_),c=(r=a&&r.match(t.linebreakRegex_),i=l&&i.match(t.linebreakRegex_),r&&e.match(t.blanklineEndRegex_)),u=i&&n.match(t.blanklineStartRegex_);return c||u?5:r||i?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var r=1;r=u&&(u=h,l=i,a=o,c=s)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=a,c?e[r+1][1]=c:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,i=null,o=0,s=!1,a=!1,l=!1,c=!1;oe));n++)o=r,s=i;return t.length!=n&&-1===t[n][0]?s:s+(e-o)},t.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,r=//g,o=/\n/g,s=0;s");switch(a){case 1:e[s]=''+l+"";break;case-1:e[s]=''+l+"";break;case 0:e[s]=""+l+""}}return e.join("")},t.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var i=this.match_alphabet_(e),o=this,s=this.Match_Threshold;-1!=(h=t.indexOf(e,n))&&(s=Math.min(r(0,h),s),-1!=(h=t.lastIndexOf(e,n+e.length))&&(s=Math.min(r(0,h),s)));for(var a,l,c,u=1<=a;p--){var v=i[t.charAt(p-1)];if(l[p]=0===d?(l[p+1]<<1|1)&v:(l[p+1]<<1|1)&v|(c[p+1]|c[p])<<1|1|c[p+1],l[p]&u&&(v=r(d,p-1))<=s){if(s=v,!((h=p-1)>n))break;a=Math.max(1,2*n-h)}}if(r(d+1,n)>s)break;c=l}return h},t.prototype.match_alphabet_=function(t){for(var e={},n=0;n=2*this.Patch_Margin&&o&&(this.patch_addContext_(e,l),r.push(e),e=new t.patch_obj,o=0,l=i,s=a)}1!==u&&(s+=h.length),-1!==u&&(a+=h.length)}return o&&(this.patch_addContext_(e,l),r.push(e)),r},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(s=this.match_main(e,u.substring(0,this.Match_MaxBits),a))&&(-1==(l=this.match_main(e,u.substring(u.length-this.Match_MaxBits),a+u.length-this.Match_MaxBits))||s>=l)&&(s=-1):s=this.match_main(e,u,a),-1==s)i[o]=!1,r-=t[o].length2-t[o].length1;else if(i[o]=!0,r=s-a,u==(a=-1==l?e.substring(s,s+u.length):e.substring(s,l+this.Match_MaxBits)))e=e.substring(0,s)+this.diff_text2(t[o].diffs)+e.substring(s+u.length);else if(a=this.diff_main(u,a,!1),u.length>this.Match_MaxBits&&this.diff_levenshtein(a)/u.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(a);var c,u=0;for(l=0;li[0][1].length){var o=e-i[0][1].length;i[0][1]=n.substring(i[0][1].length)+i[0][1],r.start1-=o,r.start2-=o,r.length1+=o,r.length2+=o}return 0==(i=(r=t[t.length-1]).diffs).length||0!=i[i.length-1][0]?(i.push([0,n]),r.length1+=e,r.length2+=e):e>i[i.length-1][1].length&&(o=e-i[i.length-1][1].length,i[i.length-1][1]+=n.substring(0,o),r.length1+=o,r.length2+=o),n},t.prototype.patch_splitMax=function(e){for(var n=this.Match_MaxBits,r=0;r2*n?(l.length1+=u.length,o+=u.length,c=!1,l.diffs.push([a,u]),i.diffs.shift()):(u=u.substring(0,n-l.length1-this.Patch_Margin),l.length1+=u.length,o+=u.length,0===a?(l.length2+=u.length,s+=u.length):c=!1,l.diffs.push([a,u]),u==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(u.length))}a=(a=this.diff_text2(l.diffs)).substring(a.length-this.Patch_Margin),""!==(u=this.diff_text1(i.diffs).substring(0,this.Patch_Margin))&&(l.length1+=u.length,l.length2+=u.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=u:l.diffs.push([0,u])),c||e.splice(++r,0,l)}}},t.prototype.patch_toText=function(t){for(var e=[],n=0;ni)return!1;var o=n.getScrollInfo();if("align"==t.mv.options.connect)g=o.top;else{var s,a,l=.5*o.clientHeight,c=o.top+l,u=n.lineAtHeight(c,"local"),h=function(t,e,n){for(var r,i,o,s,a=0;ae?(i=l.editFrom,s=l.origFrom):u>e&&(i=l.editTo,s=l.origTo)),u<=e?(r=l.editTo,o=l.origTo):c<=e&&(r=l.editFrom,o=l.origFrom)}return{edit:{before:r,after:i},orig:{before:o,after:s}}}(t.chunks,u,e),f=p(n,e?h.edit:h.orig),d=p(r,e?h.orig:h.edit),v=(c-f.top)/(f.bot-f.top),g=d.top-l+v*(d.bot-d.top);if(g>o.top&&(a=o.top/l)<1)g=g*a+o.top*(1-a);else if((s=o.height-o.clientHeight-o.top)s&&(a=s/l)<1&&(g=g*a+(m.height-m.clientHeight-s)*(1-a))}}return r.scrollTo(o.left,g),r.state.scrollSetAt=i,r.state.scrollSetBy=t,!0}function p(t,e){var n=e.after;return null==n&&(n=t.lastLine()+1),{top:t.heightAtLine(e.before||0,"local"),bot:t.heightAtLine(n,"local")}}function v(t,e,n){t.lockScroll=e,e&&0!=n&&d(t,DIFF_INSERT)&&w(t)}function g(t,e,n){for(var r=n.classLocation,i=0;i20||n.from-o.to>20?(m(t,n.marked,i),b(t,e,r,n.marked,o.from,o.to,i),n.from=o.from,n.to=o.to):(o.fromn.to&&(b(t,e,r,n.marked,n.to,o.to,i),n.to=o.to))})}function x(t,e,n,r,i,o){for(var s=n.classLocation,a=t.getLineHandle(e),l=0;lb&&(p&&(f(d,b),p=!1),d=w)}else if(p=!0,m==n){var k=U(l,y,!0),C=Q(c,l),_=Z(u,k);J(C,_)||r.push(t.markText(C,_,{className:h})),l=k}}p&&f(d,l.line+1)}function w(t){if(t.showDifferences){if(t.svg){$(t.svg);var e=t.gap.offsetWidth;q(t.svg,"width",e,"height",t.gap.offsetHeight)}t.copyButtons&&$(t.copyButtons);for(var n=t.edit.getViewport(),r=t.orig.getViewport(),i=t.mv.wrap.getBoundingClientRect().top,o=i-t.edit.getScrollerElement().getBoundingClientRect().top+t.edit.getScrollInfo().top,s=i-t.orig.getScrollerElement().getBoundingClientRect().top+t.orig.getScrollInfo().top,a=0;a=n.from&&l.origFrom<=r.to&&l.origTo>=r.from&&M(t,l,s,o,e)}}}function k(t,e){for(var n=0,r=0,i=0;it&&o.editFrom<=t)return null;if(o.editFrom>t)break;n=o.editTo,r=o.origTo}return r+(t-n)}function C(t,e,n){for(var r=t.state.trackAlignable,i=t.firstLine(),o=0,s=[],a=0;;a++){for(var l=e[a],c=l?n?l.origFrom:l.editFrom:1e9;oh){o++,i--;continue t}if(f.editTo>u){if(f.editFrom<=u)continue t;break}a+=f.origTo-f.origFrom-(f.editTo-f.editFrom),s++}if(u==h-a)l[r]=h,o++;else if(u1&&n.push(L(t[o],e[o],a))}}function L(t,e,n){var r=!0;e>t.lastLine()&&(e--,r=!1);var i=document.createElement("div");return i.className="CodeMirror-merge-spacer",i.style.height=n+"px",i.style.minWidth="1px",t.addLineWidget(e,i,{height:n,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function M(t,e,n,r,i){var s="left"==t.type,a=t.orig.heightAtLine(e.origFrom,"local",!0)-n;if(t.svg){var l=a,c=t.edit.heightAtLine(e.editFrom,"local",!0)-r;if(s){var u=l;l=c,c=u}var h=t.orig.heightAtLine(e.origTo,"local",!0)-n,f=t.edit.heightAtLine(e.editTo,"local",!0)-r;if(s){u=h;h=f,f=u}var d=" C "+i/2+" "+c+" "+i/2+" "+l+" "+(i+2)+" "+l,p=" C "+i/2+" "+h+" "+i/2+" "+f+" -1 "+f;q(t.svg.appendChild(document.createElementNS(o,"path")),"d","M -1 "+c+d+" L "+(i+2)+" "+h+p+" z","class",t.classes.connect)}if(t.copyButtons){var v=t.copyButtons.appendChild(z("div","left"==t.type?"⇝":"⇜","CodeMirror-merge-copy")),g=t.mv.options.allowEditingOriginals;if(v.title=g?"Push to left":"Revert chunk",v.chunk=e,v.style.top=(e.origTo>e.origFrom?a:t.edit.heightAtLine(e.editFrom,"local")-r)+"px",g){var m=t.edit.heightAtLine(e.editFrom,"local")-r,y=t.copyButtons.appendChild(z("div","right"==t.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));y.title="Push to right",y.chunk={editFrom:e.origFrom,editTo:e.origTo,origFrom:e.editFrom,origTo:e.editTo},y.style.top=m+"px","right"==t.type?y.style.left="2px":y.style.right="2px"}}}function A(t,e,n,r){if(!t.diffOutOfDate){var o=r.origTo>n.lastLine()?i(r.origFrom-1):i(r.origFrom,0),s=i(r.origTo,0),a=r.editTo>e.lastLine()?i(r.editFrom-1):i(r.editFrom,0),l=i(r.editTo,0),c=t.mv.options.revertChunk;c?c(t.mv,n,o,s,e,a,l):e.replaceRange(n.getRange(o,s),a,l)}}var E=t.MergeView=function(e,n){if(!(this instanceof E))return new E(e,n);this.options=n;var r=n.origLeft,i=null==n.origRight?n.orig:n.origRight,o=null!=r,s=null!=i,a=1+(o?1:0)+(s?1:0),l=[],c=this.left=null,h=this.right=null,f=this;if(o){c=this.left=new u(this,"left");var d=W("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");l.push(d),l.push(N(c))}var p=W("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(l.push(p),s){h=this.right=new u(this,"right"),l.push(N(h));var v=W("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");l.push(v)}(s?v:p).className+=" CodeMirror-merge-pane-rightmost",l.push(W("div",null,null,"height: 0; clear: both;"));var g=this.wrap=e.appendChild(W("div",l,"CodeMirror-merge CodeMirror-merge-"+a+"pane"));this.edit=t(p,V(n)),c&&c.init(d,r,n),h&&h.init(v,i,n),n.collapseIdentical&&this.editor().operation(function(){!function(t,e){"number"!=typeof e&&(e=2);for(var n=[],r=t.editor(),i=r.firstLine(),o=i,s=r.lastLine();o<=s;o++)n.push(!0);t.left&&R(t.left,e,i,n);t.right&&R(t.right,e,i,n);for(var a=0;ae){var u=[{line:l,cm:r}];t.left&&u.push({line:k(l,t.left.chunks),cm:t.left.orig}),t.right&&u.push({line:k(l,t.right.chunks),cm:t.right.orig});var h=H(c,u);t.options.onCollapse&&t.options.onCollapse(t,l,c,h)}}}(f,n.collapseIdentical)}),"align"==n.connect&&(this.aligners=[],S(this.left||this.right,!0)),c&&c.registerEvents(h),h&&h.registerEvents(c);var m=function(){c&&w(c),h&&w(h)};t.on(window,"resize",m);var y=setInterval(function(){for(var e=g.parentNode;e&&e!=document.body;e=e.parentNode);e||(clearInterval(y),t.off(window,"resize",m))},5e3)};function N(e){var n=e.lockButton=W("div",null,"CodeMirror-merge-scrolllock");n.title="Toggle locked scrolling";var r=W("div",[n],"CodeMirror-merge-scrolllock-wrap");t.on(n,"click",function(){v(e,!e.lockScroll)});var i=[r];if(!1!==e.mv.options.revertButtons&&(e.copyButtons=W("div",null,"CodeMirror-merge-copybuttons-"+e.type),t.on(e.copyButtons,"click",function(t){var n=t.target||t.srcElement;n.chunk&&("CodeMirror-merge-copy-reverse"!=n.className?A(e,e.edit,e.orig,n.chunk):A(e,e.orig,e.edit,n.chunk))}),i.unshift(e.copyButtons)),"align"!=e.mv.options.connect){var s=document.createElementNS&&document.createElementNS(o,"svg");s&&!s.createSVGRect&&(s=null),e.svg=s,s&&i.push(s)}return e.gap=W("div",i,"CodeMirror-merge-gap")}function O(t){return"string"==typeof t?t:t.getValue()}E.prototype={constructor:E,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(t){this.right&&this.right.setShowDifferences(t),this.left&&this.left.setShowDifferences(t)},rightChunks:function(){if(this.right)return h(this.right),this.right.chunks},leftChunks:function(){if(this.left)return h(this.left),this.left.chunks}};var D=new diff_match_patch;function B(t,e,n){for(var r=D.diff_main(t,e),i=0;ih&&(a&&e.push({origFrom:r,origTo:f,editFrom:n,editTo:h}),n=p,r=v)}else U(c==DIFF_INSERT?o:s,l[1])}return(n<=o.line||r<=s.line)&&e.push({origFrom:r,origTo:s.line+1,editFrom:n,editTo:o.line+1}),e}function P(t,e){if(e==t.length-1)return!0;var n=t[e+1][1];return!(1==n.length&&e1||e==t.length-3)&&10==n.charCodeAt(0))}function F(t,e){if(0==e)return!0;var n=t[e-1][1];return 10==n.charCodeAt(n.length-1)&&(1==e||10==(n=t[e-2][1]).charCodeAt(n.length-1))}function I(e,n,r){e.addLineClass(n,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title="Identical text collapsed. Click to expand.";var s=e.markText(i(n,0),i(r-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});function a(){s.clear(),e.removeLineClass(n,"wrap","CodeMirror-merge-collapsed-line")}return t.on(o,"click",a),{mark:s,clear:a}}function H(t,e){var n=[];function r(){for(var t=0;t=0&&a0;--e)t.removeChild(t.firstChild)}function q(t){for(var e=1;e0?t:e}function J(t,e){return t.line==e.line&&t.ch==e.ch}function tt(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=(n?i.origTo:i.editTo)-1;if(oe)return o}}function nt(e,n){var r=null,i=e.state.diffViews,o=e.getCursor().line;if(i)for(var s=0;sr:c0)break}this.signal(),this.alignable.splice(n,0,t,e)},find:function(t){for(var e=0;e-1){var c=this.alignable[o+1];c==G?this.alignable.splice(o,2):this.alignable[o+1]=c&~G}s>-1&&n&&this.set(t+n,G)}},t.commands.goNextDiff=function(t){return nt(t,1)},t.commands.goPrevDiff=function(t){return nt(t,-1)}});var dv,EXPAND=0,SHRINK=1,repositoryTabHeight=40;function open_answer(t,e,n){$.ajax({url:"/myshixuns/"+e+"/stages/"+t+"/answer",data:{choose:n},dataType:"script"})}function choice_answer(t,e){if("2"==t)$(e).toggleClass("card-check"),$(e).toggleClass("color_white");else if("1"==t){var n=$(".color_white");n.removeClass("card-check"),n.removeClass("color_white"),$(e).addClass("card-check"),$(e).toggleClass("color_white")}}function check_tab(t,e,n){$("."+t).removeClass(e),$(n).addClass(e);var r=$(n).index()+1;$("#"+t+"_"+r).siblings().addClass("undis"),$("#"+t+"_"+r).removeClass("undis")}function toggle_test_case_choose(t,e){var n=$("#test_case_"+e).parent().prev(".-task-ces-top").children("i:first-child");n.hasClass("fa-caret-down")?(n.addClass("fa-caret-right"),n.removeClass("fa-caret-down")):n.hasClass("fa-caret-right")&&(n.addClass("fa-caret-down"),n.removeClass("fa-caret-right")),$("#test_case_"+e).toggle()}function toggle_test_case(t,e,n,r,i){var o=new Base64;e=o.decode(e),n=(n=o.decode(n)).replace(/\\r\\n/g,"\r\n").replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/<\/\/script>/g,"<\/script>"),e=e.replace(/\\r\\n/g,"\r\n").replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\t/g,"\t");var s=$("#test_case_"+r).parent().prev(".-task-ces-top").children("i:first-child");if(s.hasClass("fa-caret-down"))s.addClass("fa-caret-right"),s.removeClass("fa-caret-down"),$("#result_different_show_"+r).siblings(".-task-ces-info").attr("style","display:none"),$("#result_different_show_"+r).hide(),$("#test_case_"+r).hide();else if(s.hasClass("fa-caret-right")&&(s.addClass("fa-caret-down"),s.removeClass("fa-caret-right"),$("#result_different_show_"+r).show(),$("#test_case_"+r).show(),$("#result_different_show_"+r).siblings(".-task-ces-info").attr("style","display:block"),1==t||i)){r="result_different_show_"+r;var a=e,l="null"==n?"":n;CodeMirror.k_init(r,l,a);""==l&&($(".CodeMirror-merge-r-chunk").css("background","none"),$(".CodeMirror-merge-r-inserted").css("background-image","none"));var c=0;c=$("#"+r).find(".CodeMirror-merge-pane").eq(0).height()>$("#"+r).find(".CodeMirror-merge-pane").eq(1).height()?parseInt($("#"+r).find(".CodeMirror-merge-pane").eq(0).height()):parseInt($("#"+r).find(".CodeMirror-merge-pane").eq(1).height()),$("#"+r).find(".CodeMirror").height(c),$(".CodeMirror-merge-gap").css("height",c),$(".CodeMirror-merge-gap").find("svg").css("height",c)}}function CodeMirror_fromTextArea(t){return CodeMirror.fromTextArea(document.getElementById(t),{lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Ctrl-Q":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,gutters:["CodeMirror-linenumbers","breakpoints"]})}$(function(){function t(t){var e=document.getElementById("game_webssh");null!=e&&null!=e&&""!=e&&e.contentWindow.postMessage({tp:"resize",rows:t,cols:0},"https://webssh.educoder.net")}window.top.__updateWebsshRows=t;var e,n,r,i,o=$(document),s=$(".b-label"),a=$(".h-center"),l=!1,u=!1,h=0;s.live("mousedown",function(){return $("#game_webssh").css("pointer-events","none"),l=!0,leftOffset=$(".labelN").offset().left,r=$(".labelN").width(),!1}),a.live("mousedown",function(){return $("#game_webssh").css("pointer-events","none"),u=!0,topOffset=$(".centerH").offset().top,i=$(".centerH").height(),!1}),setTimeout(function(){$(".CodeMirror.cm-s-railscasts").css("height",$("#games_repository_contents").height()-repositoryTabHeight)},800),$(window).on("resize",function(){$(".CodeMirror.cm-s-railscasts").css("height",$("#games_repository_contents").height()-repositoryTabHeight)});var f=!(null==window.mozInnerScreenX)?19:18;o.live("mousemove",function(o){if($(".-brother").show(),l&&(clickX=o.pageX,clickX>leftOffset+0&&clickXtopOffset+100){a.css("top",clickY-7-topOffset+"px"),$("#games_repository_contents").height(clickY-topOffset+"px"),$(".CodeMirror.cm-s-railscasts").css("height",clickY-topOffset-repositoryTabHeight- $('#games_repository_contents .codePath').height() - 12),n=clickY-topOffset,$("#games_valuation_contents").height(i-n+"px");var c=$("#games_repository_contents").height()-$("#top_repository").height()-50,d=$("#games_repository_contents").height()-50;$("#games_repository_contents").width();$(".game_webssh").css("min-height",d),$(".game_webssh").css("max-height",d);var p=Math.floor(d/f);$("#file_entry_content").find(".CodeMirror-scroll").css("min-height",c),$("#file_entry_content").find(".CodeMirror-scroll").css("max-height",c)}else a.css("top","0px");h!=p?(t(p),h=p):h=p}}),o.live("mouseup",function(t){$("#game_webssh").css("pointer-events","inherit"),u=!1,l=!1,t.cancelBubble=!0,$(".-brother").hide()}),window.__tpiOnResize=function(){var t=$("#games_repository_contents").height()-50;if($(".game_webssh").css("min-height",t),$(".game_webssh").css("max-height",t),document.getElementById("game_webssh")){var e=!(null==window.mozInnerScreenX)?19:18,n=(t=$("#games_repository_contents").height()-50,Math.floor(t/e));window.top.__updateWebsshRows&&window.top.__updateWebsshRows(n)}},window.onresize=function(){__tpiOnResize()},$("#all_task_show").on("click",function(t){c=0,$("#all_task_tab").removeClass("leftnav-active"),$("#all_task_show").css("background","rgba(0,0,0,0)"),$("#all_task_index").css("left",0).stop().animate({left:"-505px"},400,function(){$("#all_task_show").hide(),fadein=0})}),$("#all_task_index").on("click",function(t){t.stopPropagation()}),$("#next_step").live("click",function(){nNext=$("#next_step_area"),html="下一关",nNext.html(html)}),$("#prev_step").live("click",function(){nNext=$("#prev_step_area"),html="上一关",nNext.html(html)})});var control=0,control_1=0;function repository_extend_and_zoom(){var t=$("#games_repository_contents"),e=$("#games_valuation_contents"),n=$("#extend_and_zoom").children("i"),r=$("#file_entry_content").find(".CodeMirror-scroll"),i=$(".h-center");0==control?(t.addClass("-flex-basic100"),e.addClass("-flex-basic0"),n.addClass("fa-compress"),n.removeClass("fa-expand"),$("#extend_and_zoom").attr("data-tip-left","收起"),i.hide(),control=1):1==control&&(t.removeClass("-flex-basic100"),e.removeClass("-flex-basic0"),n.removeClass("fa-compress"),n.addClass("fa-expand"),$("#extend_and_zoom").attr("data-tip-left","展开"),i.show(),control=0),window.editor_CodeMirror&&editor_CodeMirror.setSize("auto","auto"),$(".CodeMirror.cm-s-railscasts").css("height",$("#games_repository_contents").height()-repositoryTabHeight);var o=t.height()-$("#top_repository").height()-50;r.css("min-height",o)}function valuation_extend_and_zoom(){var t=$("#games_repository_contents"),e=$("#games_valuation_contents"),n=$("#valuation_extend_and_zoom").children("i"),r=$(".h-center");0==control_1?(t.addClass("-flex-basic0"),e.addClass("-flex-basic100"),n.removeClass("fa-expand"),n.addClass("fa-compress"),$("#valuation_extend_and_zoom").attr("data-tip-left","收起"),r.hide(),control_1=1):1==control_1&&(t.removeClass("-flex-basic0"),e.removeClass("-flex-basic100"),n.addClass("fa-expand"),n.removeClass("fa-compress"),$("#valuation_extend_and_zoom").attr("data-tip-left","展开"),r.show(),control_1=0)}var h=!0;function game_praise(t,e){treadStatus||$.ajax({url:"/praise_tread/praise_plus?obj_id="+t+"&obj_type="+e,data:{horizontal:h,game_praise:!0},success:function(t){h=!h;var e=$("#game_praise_count");t.praise?(praiseStatus=!0,e.html(t.praise_tread_count),$("#game_praise_tread").children("i").addClass("color-orange03"),$("#game_praise_tread").attr("data-tip-top","取消点赞")):(praiseStatus=!1,e.html(t.praise_tread_count),$("#game_praise_tread").children("i").removeClass("color-orange03"),$("#game_praise_tread").attr("data-tip-top","点赞"))}})}var editor2,d=!0;function game_tread(t){praiseStatus||$.ajax({url:"/praise_tread/praise_plus?obj_id="+t+"&obj_type=ChallengeTread",data:{horizontal:d,game_praise:!0},success:function(t){d=!d;var e=$("#game_tread_count");t.praise?(treadStatus=!0,e.html(t.praise_tread_count),$("#game_tread").children("i").addClass("color-orange"),$("#game_tread").attr("data-tip-top","取消踩")):(treadStatus=!1,e.html(t.praise_tread_count),$("#game_tread").children("i").removeClass("color-orange"),$("#game_tread").attr("data-tip-top","踩"))}})}function setupAjaxIndicatorBase(){$("#ajax-indicator-base").bind("ajaxSend",function(t,e,n){n&&n.url&&(n.url.match(/account\/heartbeat$/)||n.url.match(/file_update/)||n.url.match(/game_build/)||n.url.match(/game_status/)||n.url.match(/refresh_game_list/)||n.url.match(/next_step/)||n.url.match(/prev_step/)||n.url.match(/open_webssh/)||n.url.match(/repository/)||n.url.match(/get_waiting_time/))||0===$(".ajax-loading").length&&"application/octet-stream"!=n.contentType&&$("#ajax-indicator-base").css("display","flex").html("").show()}),$("#ajax-indicator-base").bind("ajaxStop",function(){$("#ajax-indicator-base").html("").hide(),MathJax&&MathJax.Hub&&MathJax.Hub.Queue(["Typeset",MathJax.Hub]);try{prettyPrint()}catch(t){}})}function match_specific_symbol(t){return t=t.replace(/ /g,'').replace(/\r\n$/,'').replace(/\n$/,'').replace(/\r$/,'').replace(/\r\n/g,"
          ").replace(/\n/g,"
          ").replace(/\r/g,"
          ").replace(/\t/g,'')}function code_evaluation(t,e,n,r,i,o,s,a,l,c,u,h,f,d){var p,v,g,m,y,x,b;if(p='
          ','
          ',-1!=h.indexOf("Html")&&(p='
          '),"0"!=e){var w="";""!=d&&null!=d&&null!=d&&(w=' 本次评测耗时:'+d+"秒"),v=r==n?w+'

          '+n+"/"+n+" 全部通过

          ":w+'

          '+r+"/"+n+""+u+"

          "}for(var k="",C=0;C':1==t[C].result?'':"",0==t[C].is_public?m=f&&"false"!=f?''+m:0==t[C].result||1==t[C].result?''+m:'':0!=t[C].result&&1!=t[C].result&&(m=void 0),b=null==t[C].input||""==t[C].input?"":'
          测试输入:

          '+(null==t[C].input||""==t[C].input?"空":t[C].input.replace(/\r\n/g,"
          "))+"

          ",1==t[C].is_public||"true"==f||f&&"false"!=f?y='
          ':0==t[C].is_public&&(y='
          • 此为隐藏测试项,解锁

          '),g='
          '+y+"
          ";var _=new Base64,S=null==t[C].actual_output?"":_.encode(t[C].actual_output),T=null==t[C].output?"":_.encode(t[C].output);k+='
          测试集 '+(C+1)+""+(null==m?"":m)+"
          "+g}"0"!=e&&(x=r==n?'

          '+n+"/"+n+" 全部通过

          ":'

          '+r+"/"+n+" "+u+"

          ");var L=p+('
          '+(null==v?"":v)+k+"
          ")+('
          '+(null==x?"":x)+'
          • 公开测试:'+a+"/"+o+'
          • 隐藏测试:'+s+"/"+i+'
          • 经验值:+ '+l+'
          • 金币:'+(c>=0?"+ "+c:c)+"
          ");$("#game_test_set_results").html(L)}function elocalStorage(t,e,n){if(window.sessionStorage){if(editor2=t,null!==window.sessionStorage.getItem("content"+e)){var r='您上次有已保存的数据,是否恢复 ? / 不恢复";$("#e_tips_"+n).html(r)}setInterval(function(){var r=(d=new Date).getHours(),i=d.getMinutes(),o=d.getSeconds();if(r=r<10?"0"+r:r,i=i<10?"0"+i:i,o=o<10?"0"+o:o,t.sync(),!t.isEmpty()){add_data("content",e,t.html());var s="#e_tips_"+n;$("#e_tip_"+n).html(" 数据已于 "+r+":"+i+":"+o+" 保存 "),$(s).html("")}},1e4)}else $(".ke-edit").after("您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!")}function add_data(t,e,n){window.sessionStorage.setItem(t+e,n)}function pop_box_new(t,e,n){$("#popupAll").length>0&&$("#popupAll").remove(),w=($(window).width()-e)/2,h=($(window).height()-n)/2;function r(t){this.div=document.getElementById(t),this.div&&(this.div.style.cursor="move",this.div.style.position="fixed"),this.disX=0,this.disY=0;var e=this;this.div.onmousedown=function(t){e.getDistance(t),document.onmousemove=function(t){e.setPosition(t)},e.div.onmouseup=function(){e.clearEvent()}}}$(document.body).append('
          '),$("#popupWrap").html(t),$("#popupWrap").css({top:h+"px",left:w+"px",padding:"0",border:"none",position:"fixed","z-index":"99999","background-color":"#fff","border-radius":"10px"}),$("#popupWrap").parent().parent().show(),$("#popupWrap").find("a[class*='pop_close']").click(function(){$("#popupAll").hide()}),r.prototype.getDistance=function(t){var e=t||event;this.disX=e.clientX-this.div.offsetLeft,this.disY=e.clientY-this.div.offsetTop},r.prototype.setPosition=function(t){var e=t||event,n=e.clientX-this.disX,r=e.clientY-this.disY;n<=0?n=0:n>=document.documentElement.clientWidth-this.div.offsetWidth&&(n=document.documentElement.clientWidth-this.div.offsetWidth),r<=0?r=0:r>=document.documentElement.clientHeight-this.div.offsetHeight&&(r=document.documentElement.clientHeight-this.div.offsetHeight),this.div.style.left=n+"px",this.div.style.top=r+"px"},r.prototype.clearEvent=function(){this.div.onmouseup=null,document.onmousemove=null},new r("popupWrap"),$("#popupWrap input, #popupWrap textarea, #popupWrap ul, #popupWrap a").mousedown(function(t){t.stopPropagation(),new r("popupWrap")})}function sure_box_redirect_btn(t,e,n){pop_box_new('

          提示

          '+e+'

          ",480,160)}function sure_box_redirect_btn2(t,e,n){pop_box_new('

          提示

          '+e+'

          ",578,205)}function op_confirm_box_loading(t,e){pop_box_new('

          提示

          '+e+'

          ',578,205)}function delete_confirm_box_2(t,e){pop_box_new('

          提示

          '+e+'

          ',480,160)}function notice_box(t){pop_box_new('

          提示

          '+t+'

          ',480,160)}function hideModal(t){$("#popupAll").length>0?$("#popupAll").remove():(t?$(t).parents(".ui-dialog-content"):$("#ajax-modal")).dialog("close")}function is_cdn_link(t){return-1!=t.indexOf("http")||-1!=t.indexOf("com")||-1!=t.indexOf("net")||-1!=t.indexOf("org")||-1!=t.indexOf("cdn")}function tpi_html_show(){for(var t=editor_CodeMirror.getValue(),e=$("#html_form"),n=t,r=[],i=[],o=/(?:[\n\r\s]*?)(?:<\/link>)*/im,s=/(?:[\n\r\s]*?)(?:<\/script>)*/im,a=o.exec(n),l=s.exec(n);null!=a;)is_cdn_link(a[1])?n=n.replace(a[0],a[0].replace(/link/,"edulink")):(n=n.replace(o,"EDUCODERCSS"),r.push(a[1])),a=o.exec(n);for(;null!=l;)is_cdn_link(l[1])?n=n.replace(l[0],l[0].replace(/script/g,"w3scrw3ipttag")):(n=n.replace(s,"EDUCODERJS"),i.push(l[1])),l=s.exec(n);n=n.replace(/=/gi,"w3equalsign").replace(/script/gi,"w3scrw3ipttag"),$("#data_param").val(n),$("#data_css_param").val(r),$("#data_js_param").val(i),e.attr("action","/iframes/html_content?gpid="+__myshixun.gpid),e.submit()}$(document).ready(setupAjaxIndicatorBase); - -/*CodeMirror addon hint -----------------------------------------------Start*/ -/* showHint */ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var i="CodeMirror-hint",e="CodeMirror-hint-active";function n(t,i){this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(i){i=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in a)o[s]=a[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),i);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var o=0;ol.clientHeight+1,x=h.getScrollInfo();if(C>0){var A=k.bottom-k.top;if(m.top-(m.bottom-k.top)-A>0)l.style.top=(v=m.top-A)+"px",y=!1;else if(A>H){l.style.height=H-5+"px",l.style.top=(v=m.bottom-k.top)+"px";var S=h.getCursor();o.from.ch!=S.ch&&(m=h.cursorCoords(S),l.style.left=(g=m.left)+"px",k=l.getBoundingClientRect())}}var T,M=k.right-w;if(M>0&&(k.right-k.left>w&&(l.style.width=w-5+"px",M-=k.right-k.left-w),l.style.left=(g=m.left-M)+"px"),b)for(var E=l.firstChild;E;E=E.nextSibling)E.style.paddingRight=h.display.nativeBarWidth+"px";(h.addKeyMap(this.keyMap=function(t,i){var e={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},n=t.options.customKeys,o=n?{}:e;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,i)}:e.hasOwnProperty(n)?e[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(n,{moveFocus:function(t,i){s.changeActive(s.selectedHint+t,i)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:a.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus)&&(h.on("blur",this.onBlur=function(){T=setTimeout(function(){n.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(T)}));return h.on("scroll",this.onScroll=function(){var t=h.getScrollInfo(),i=h.getWrapperElement().getBoundingClientRect(),e=v+x.top-t.top,o=e-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(y||(o+=l.offsetHeight),o<=i.top||o>=i.bottom)return n.close();l.style.top=e+"px",l.style.left=g+x.left-t.left+"px"}),t.on(l,"dblclick",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),s.pick())}),t.on(l,"click",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),n.options.completeOnSingleClick&&s.pick())}),t.on(l,"mousedown",function(){setTimeout(function(){h.focus()},20)}),t.signal(o,"select",a[0],l.firstChild),!0}function l(t,i,e,n){if(t.async)t(i,n,e);else{var o=t(i,e);o&&o.then?o.then(n):n(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(i,e){var n=i.list[e];n.hint?n.hint(this.cm,i,n):this.cm.replaceRange(c(n),n.from||i.from,n.to||i.to,"complete"),t.signal(i,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch0&&n.to.ch-n.from.ch!=o.to.ch-o.from.ch)))&&(this.data=i,i&&i.list.length))if(s&&1==i.list.length)this.pick(i,0);else{if(1==i.list.length&&i.to.ch-i.from.ch===i.list[0].length)return;this.widget=new h(this,i),t.signal(i,"shown")}}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(i,n){if(i>=this.data.list.length?i=n?this.data.list.length-1:0:i<0&&(i=n?0:this.data.list.length-1),this.selectedHint!=i){var o=this.hints.childNodes[this.selectedHint];o.className=o.className.replace(" "+e,""),(o=this.hints.childNodes[this.selectedHint=i]).className+=" "+e,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:function(i,e){var n,o=i.getHelpers(e,"hint");if(o.length){var s=function(t,i,e){var n=function(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):o(s+1)})}(0)};return s.async=!0,s.supportsSelection=!0,s}if(n=i.getHelper(i.getCursor(),"hintWords")){t.signal(i,"hinting",n);var c=i.state.myhints,r=n.slice(0);return c&&c.forEach(function(t){-1===n.indexOf(t)&&r.push(t)}),function(i){return t.hint.fromList(i,{words:r})}}return t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else c="",r=s;var h=[];if(fuzzysort&&fuzzysort.go){var l=fuzzysort.go(c,e.words);l&&l.forEach(function(t){h.push(t.target)})}else for(var a=0;a,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)}); - -/* anyword-hint */ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var r=/[A-z]+/;e.registerHelper("hint","anyword",function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}})}); - -/* fuzzysort */ -!function(e,r){"function"==typeof define&&define.amd?define([],r):"object"==typeof module&&module.exports?module.exports=r():e.fuzzysort=r()}(this,function(){var e="undefined"!=typeof require&&"undefined"==typeof window,r=new Map,n=new Map,o=[];o.total=0;var t=[],i=[];function a(){r.clear(),n.clear(),t=[],i=[]}function l(e){for(var r=-9007199254740991,n=e.length-1;n>=0;--n){var o=e[n];if(null!==o){var t=o.score;t>r&&(r=t)}}return-9007199254740991===r?null:r}function f(e,r){var n=e[r];if(void 0!==n)return n;var o=r;Array.isArray(r)||(o=r.split("."));for(var t=o.length,i=-1;e&&++i>1]=e[n],t=1+(n<<1)}for(var a=n-1>>1;n>0&&o.score>1)e[n]=e[a];e[n]=o}return n.add=function(n){var o=r;e[r++]=n;for(var t=o-1>>1;o>0&&n.score>1)e[o]=e[t];e[o]=n},n.poll=function(){if(0!==r){var n=e[0];return e[0]=e[--r],o(),n}},n.peek=function(n){if(0!==r)return e[0]},n.replaceTop=function(r){e[0]=r,o()},n},p=s();return function d(c){var g={single:function(e,r,n){return e?(u(e)||(e=g.getPreparedSearch(e)),r?(u(r)||(r=g.getPrepared(r)),((n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo)(e,r,e[0])):null):null},go:function(e,r,n){if(!e)return o;var t=(e=g.prepareSearch(e))[0],i=n&&n.threshold||c&&c.threshold||-9007199254740991,a=n&&n.limit||c&&c.limit||9007199254740991,s=(n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,d=0,v=0,h=r.length;if(n&&n.keys)for(var w=n.scoreFn||l,x=n.keys,y=x.length,m=h-1;m>=0;--m){for(var T=r[m],k=new Array(y),b=y-1;b>=0;--b)(_=f(T,B=x[b]))?(u(_)||(_=g.getPrepared(_)),k[b]=s(e,_,t)):k[b]=null;k.obj=T;var I=w(k);null!==I&&(Ip.peek().score&&p.replaceTop(k))))}else if(n&&n.key){var B=n.key;for(m=h-1;m>=0;--m)(_=f(T=r[m],B))&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}else for(m=h-1;m>=0;--m){var _,C;(_=r[m])&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}if(0===d)return o;var A=new Array(d);for(m=d-1;m>=0;--m)A[m]=p.poll();return A.total=d+v,A},goAsync:function(r,n,t){var i=!1,a=new Promise(function(a,p){if(!r)return a(o);var d=(r=g.prepareSearch(r))[0],v=s(),h=n.length-1,w=t&&t.threshold||c&&c.threshold||-9007199254740991,x=t&&t.limit||c&&c.limit||9007199254740991,y=(t&&void 0!==t.allowTypo?t.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,m=0,T=0;function k(){if(i)return p("canceled");var s=Date.now();if(t&&t.keys)for(var c=t.scoreFn||l,b=t.keys,I=b.length;h>=0;--h){for(var B=n[h],_=new Array(I),C=I-1;C>=0;--C)(P=f(B,L=b[C]))?(u(P)||(P=g.getPrepared(P)),_[C]=y(r,P,d)):_[C]=null;_.obj=B;var A=c(_);if(null!==A&&!(Av.peek().score&&v.replaceTop(_)),h%1e3==0&&Date.now()-s>=10))return void(e?setImmediate(k):setTimeout(k))}else if(t&&t.key){for(var L=t.key;h>=0;--h)if((P=f(B=n[h],L))&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}else for(;h>=0;--h){var P,j;if((P=n[h])&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}if(0===m)return a(o);for(var N=new Array(m),S=m-1;S>=0;--S)N[S]=v.poll();N.total=m+T,a(N)}e?setImmediate(k):k()});return a.cancel=function(){i=!0},a},highlight:function(e,r,n){if(null===e)return null;void 0===r&&(r=""),void 0===n&&(n="");for(var o="",t=0,i=!1,a=e.target,l=a.length,f=e.indexes,u=0;u999)return g.prepare(e);var n=r.get(e);return void 0!==n?n:(n=g.prepare(e),r.set(e,n),n)},getPreparedSearch:function(e){if(e.length>999)return g.prepareSearch(e);var r=n.get(e);return void 0!==r?r:(r=g.prepareSearch(e),n.set(e,r),r)},algorithm:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0,p=0;;){if(n===o[u]){if(t[p++]=u,++f===a)break;n=e[0===s?f:s===f?f+1:s===f-1?f-1:f]}if(++u>=l)for(;;){if(f<=1)return null;if(0===s){if(n===e[--f])continue;s=f}else{if(1===s)return null;if((n=e[1+(f=--s)])===e[f])continue}u=t[(p=f)-1]+1;break}}f=0;var d=0,c=!1,v=0,h=r._nextBeginningIndexes;null===h&&(h=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target));var w=u=0===t[0]?0:h[t[0]-1];if(u!==l)for(;;)if(u>=l){if(f<=0){if(++d>a-2)break;if(e[d]===e[d+1])continue;u=w;continue}--f,u=h[i[--v]]}else if(e[0===d?f:d===f?f+1:d===f-1?f-1:f]===o[u]){if(i[v++]=u,++f===a){c=!0;break}++u}else u=h[u];if(c)var x=i,y=v;else x=t,y=p;for(var m=0,T=-1,k=0;k=0;--k)r.indexes[k]=x[k];return r},algorithmNoTypo:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0;;){if(n===o[u]){if(t[s++]=u,++f===a)break;n=e[f]}if(++u>=l)return null}f=0;var p=!1,d=0,c=r._nextBeginningIndexes;if(null===c&&(c=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target)),(u=0===t[0]?0:c[t[0]-1])!==l)for(;;)if(u>=l){if(f<=0)break;--f,u=c[i[--d]]}else if(e[f]===o[u]){if(i[d++]=u,++f===a){p=!0;break}++u}else u=c[u];if(p)var v=i,h=d;else v=t,h=s;for(var w=0,x=-1,y=0;y=0;--y)r.indexes[y]=v[y];return r},prepareLowerCodes:function(e){for(var r=e.length,n=[],o=e.toLowerCase(),t=0;t=65&&l<=90,u=f||l>=97&&l<=122||l>=48&&l<=57,s=f&&!t||!i||!u;t=f,i=u,s&&(n[o++]=a)}return n},prepareNextBeginningIndexes:function(e){for(var r=e.length,n=g.prepareBeginningIndexes(e),o=[],t=n[0],i=0,a=0;aa?o[a]=t:(t=n[++i],o[a]=void 0===t?r:t);return o},cleanup:a,new:d};return g}()}); -/*CodeMirror addon hint -----------------------------------------------End*/ - -//提示框:只有一个知道啦按钮,点击打开新窗口 -// -function sure_box_redirect(url, str){ - var htmlvalue = '

          提示

          '+ - '

          ' + str + '

          '+ - '知道啦
          '; - pop_box_new(htmlvalue, 480, 160); -} -// 长提示框:只有一个“知道啦”按钮,点击关闭弹框 -// -function yes_notice_box(str){ - var htmlvalue = '

          提示

          '+ - '

          ' + str + '

          '+ - '知道啦
          '; - pop_box_new(htmlvalue, 575, 200); -} - -// --------------------- --------------------- --------------------- --------------------- START -function notice_sure_box(str){ - var htmlvalue = '

          提示

          '+ - '

          ' + str + '

          '+ - '知道啦
          '; - pop_box_new(htmlvalue, 480, 160); -} -//点击删除时的确认弹框: 走destroy方法,remote为true -function delete_confirm_box_2_react(url, str, data){ - var htmlvalue = '
          提示
          '+ - '

          ' + str + '

          '; - pop_box_new(htmlvalue, 480, 160); - // encodeURIComponent(JSON.stringify(data)) - // "$(window.top).trigger(\'' + url +'\', \'' + url + '\')" -} -// https://github.com/facebook/react/issues/3249#issuecomment-177750141 -function _triggerEvent(eventName, data, target) { - var event = document.createEvent("HTMLEvents"); - event.initEvent(eventName, true, true); - var target = target || document; - // $('body>#root').data(eventName, data) - window[eventName] = data; - target.dispatchEvent(event); -} -// --------------------- --------------------- --------------------- --------------------- END - -// CodeMirror python -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i)),e.defineMode("python",function(a,s){for(var c="error",l=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],f=0;fr?_(t):i0&&z(e,t)&&(a+=" "+c),a}return v(e,t)}function v(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var r=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),e.match(/^[\d_]+\.\d*/)&&(r=!0),e.match(/^\.\d+/)&&(r=!0),r)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(y))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(t,n){return t.match(e)?(n.tokenize=o,r):t.match("{")?"punctuation":t.match("}")?(n.tokenize=o,"punctuation"):v(t,n)}function o(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return a.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return a.tokenize=i,o.current()?r:(o.next(),"punctuation");if(o.match("}}"))return r;if(o.match("}"))return c;o.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return c;a.tokenize=t}return r}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var t=1==e.length,n="string";function r(r,i){for(;!r.eol();)if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),t&&r.eol())return n}else{if(r.match(e))return i.tokenize=x,n;r.eat(/['"]/)}if(t){if(s.singleLineStringErrors)return c;i.tokenize=x}return n}return r.isString=!0,r}(e.current()),t.tokenize(e,t));for(var o=0;o1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function w(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(b,!1)?"meta":h?"operator":c;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent+=1),"lambda"==r&&(t.lambda=!0),":"!=r||t.lambda||"py"!=o(t).type||_(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(o(t).type!=r)return c;t.indent=t.scopes.pop().offset-p}}return t.dedent>0&&e.eol()&&"py"==o(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}return{startState:function(e){return{tokenize:x,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=w(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+c:r},indent:function(t,n){if(t.tokenize!=x)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0);return null!=r.align?r.align-(i?1:0):r.offset-(i?p:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python");var a;e.defineMIME("text/x-cython",{name:"python",extra_keywords:(a="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",a.split(" "))})}); -// CodeMirror c-like(java) -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,L=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;function D(e,t){var n,r=e.next();if(k[r]){var o=k[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r))return c=r,null;if(T.test(r)){if(e.backUp(1),e.match(M))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=z,z(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(P.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(P););return"operator"}if(e.eatWhile(L),S)for(;e.match(S);)e.eatWhile(L);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(x,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)?(l(g,a)&&(c="newstatement"),"builtin"):l(b,a)?"atom":"variable"}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):v&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),k.token){var d=k.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,I(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0);if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(k.indent){var a=k.indent(t,r,n);if("number"==typeof a)return a}var i=o==r.type,l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||i?r.indented+(i?0:d)+(i||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(i?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",c="int long char short double float unsigned signed void size_t ptrdiff_t";function u(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=u;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function d(e,t){return"type"==t.prevToken&&"type"}function f(e){return e.eatWhile(/[\w\.']/),"number"}function p(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function m(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function y(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.types),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function e(t){return function(n,r){for(var o;o=n.next();){if("*"==o&&n.eat("/")){if(1==t){r.tokenize=null;break}return r.tokenize=e(t-1),r.tokenize(n,r)}if("/"==o&&n.eat("*"))return r.tokenize=e(t+1),r.tokenize(n,r)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,o=!1,a=!1;!e.eol();){if(!n&&!o&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!o&&"$"==r&&e.match("{")&&e.skipTo("}"),o=!o&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:i(s+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(c),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:i(s+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(c),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),y("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(c),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var x=null;y("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var o,a=!1,i=!1;!n.eol();){if(!a&&n.match('"')&&("single"==t||n.match('""'))){i=!0;break}if(!a&&n.match("``")){x=e(t),i=!0;break}o=n.next(),a="single"==t&&!a&&"\\"==o}return i&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!x||!e.match("`"))&&(t.tokenize=x,x=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}); -// CodeMirror matchbrackets -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(t,e,i){var c=t.getLineHandle(e.line),o=e.ch-1,l=i&&i.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=!l&&o>=0&&r[c.text.charAt(o)]||r[c.text.charAt(++o)];if(!h)return null;var s=">"==h.charAt(1)?1:-1;if(i&&i.strict&&s>0!=(o==e.ch))return null;var u=t.getTokenTypeAt(n(e.line,o+1)),f=a(t,n(e.line,o+(s>0?1:0)),s,u||null,i);return null==f?null:{from:n(e.line,o),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:s>0}}function a(t,e,i,a,c){for(var o=c&&c.maxScanLineLength||1e4,l=c&&c.maxScanLines||1e3,h=[],s=c&&c.bracketRegex?c.bracketRegex:/[(){}[\]]/,u=i>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),f=e.line;f!=u;f+=i){var m=t.getLine(f);if(m){var g=i>0?0:m.length-1,d=i>0?m.length:-1;if(!(m.length>o))for(f==e.line&&(g=e.ch-(i<0?1:0));g!=d;g+=i){var k=m.charAt(g);if(s.test(k)&&(void 0===a||t.getTokenTypeAt(n(f,g+1))==a))if(">"==r[k].charAt(1)==i>0)h.push(k);else{if(!h.length)return{pos:n(f,g),ch:k};h.pop()}}}}return f-i!=(i>0?t.lastLine():t.firstLine())&&null}function c(t,r,a){for(var c=t.state.matchBrackets.maxHighlightLineLength||1e3,o=[],l=t.listSelections(),h=0;h
          ", - testIcon1 : "
          " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea : true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity : 0.6, - placeholder: placeholder, - imageUpload : true, - imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL : imageUrl,//url - onload: function(){ - // this.previewing(); - $("#"+ id +" [type=\"latex\"]").bind("click", function(){ - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line-1, 0); - }); - - $("#"+ id +" [type=\"inline\"]").bind("click", function(){ - editorName.cm.replaceSelection("$$$$"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch-2); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - callback && callback() - } - }, otherOptions)); - return editorName; -} - -// --------------------------------------------------------------------------------------------- -// md编辑器拖拽改变高度,TODO其他初始化参数,高度改变阈值... -// 写这里,供非react版本时copy一份用 -function initMDEditorDragResize(resizeBarSelector, mdEditor, options) { - if (!options) { - options = {} - } - if($('#'+ mdEditor.id).length === 0) { - console.error('未找到editor') - return; - } - var doc = $(document); - var editor__resize = $('#'+ mdEditor.id).parent().find(resizeBarSelector); - if (editor__resize.length === 0) { - console.error('未找到resizeBar') - return; - } - var dragging = false; - var topOffset, clickY, initDelta; - let initHeight = options.initHeight || 240; - - editor__resize.on('mousedown',function(){ - dragging = true; - topOffset = editor__resize.offset().top; - initDelta = $('#' + mdEditor.id).height() - initHeight; - }); - doc.live('mousemove', function(e){ - if(dragging){ - clickY = e.pageY; - - let delta = clickY - topOffset + initDelta; - if (delta > 300 ) { - delta = 300; - } - if (delta < 0) { - delta = 0; - } - - mdEditor.resize('', `${initHeight + delta}px`) - - // $('#memo_comment_editorMd').height(initHeight + delta) - } - return false - }); - - doc.live("mouseup", function(e) { - dragging = false; - }); -} \ No newline at end of file diff --git a/public/react/public/js/js_min_cm.js b/public/react/public/js/js_min_cm.js index a417c5c60..568198bb0 100755 --- a/public/react/public/js/js_min_cm.js +++ b/public/react/public/js/js_min_cm.js @@ -1,7 +1,34 @@ -// 记录下cm相关的脚本 +// 记录下从js_min_all移除的cm相关的脚本 + + +// ----------------------------- ----------------------------- active-line.js +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",i="CodeMirror-activeline-gutter";function r(e){for(var r=0;r!?|~^]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,r){return n=e,a=r,t}function m(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(p))return t.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=m),v("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),v("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),v("regexp","string-2")):(e.eatWhile(d),v("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n)return e.skipToEnd(),v("error","error");if(d.test(n))return e.eatWhile(d),v("operator","operator",e.current());if(f.test(n)){e.eatWhile(f);var a=e.current(),i=s.propertyIsEnumerable(a)&&s[a];return i&&"."!=t.lastType?v(i.type,i.style,a):v("variable","variable",a)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var k="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){for(var n=0,a=!1,i=r-1;i>=0;--i){var o=e.string.charAt(i),c=k.indexOf(o);if(c>=0&&c<3){if(!n){++i;break}if(0==--n)break}else if(c>=3&&c<6)++n;else if(f.test(o))a=!0;else{if(/["'\/]/.test(o))return;if(a&&!n){++i;break}}}a&&!n&&(t.fatArrowAt=i)}}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function g(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var j={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)j.cc.push(arguments[e])}function V(){return M.apply(null,arguments),!0}function E(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=j.state;if(n.context){if(j.marked="def",t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}var I={name:"this",next:{name:"arguments"}};function z(){j.state.context={prev:j.state.context,vars:j.state.localVars},j.state.localVars=I}function T(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function A(e,t){var r=function(){var r=j.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new g(n,j.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function C(){var e=j.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function $(e){return function t(r){return r==e?V():";"==e?M():V(t)}}function q(e,t){return"var"==e?V(A("vardef",t.length),te,$(";"),C):"keyword a"==e?V(A("form"),O,q,C):"keyword b"==e?V(A("form"),q,C):"{"==e?V(A("}"),Z,C):";"==e?V():"if"==e?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==C&&j.state.cc.pop()(),V(A("form"),O,q,C,oe)):"function"==e?V(de):"for"==e?V(A("form"),ce,q,C):"variable"==e?V(A("stat"),J):"switch"==e?V(A("form"),O,A("}","switch"),$("{"),Z,C,C):"case"==e?V(O,$(":")):"default"==e?V($(":")):"catch"==e?V(A("form"),z,$("("),pe,$(")"),q,C,T):"module"==e?V(A("form"),z,ke,T,C):"class"==e?V(A("form"),ve,C):"export"==e?V(A("form"),xe,C):"import"==e?V(A("form"),he,C):M(A("stat"),O,$(";"),C)}function O(e){return S(e,!1)}function P(e){return S(e,!0)}function S(e,t){if(j.state.fatArrowAt==j.stream.start){var r=t?G:F;if("("==e)return V(z,A(")"),X(re,")"),C,$("=>"),r,T);if("variable"==e)return M(z,re,$("=>"),r,T)}var n=t?U:H;return h.hasOwnProperty(e)?V(n):"function"==e?V(de,n):"keyword c"==e?V(t?N:W):"("==e?V(A(")"),W,Ve,$(")"),C,n):"operator"==e||"spread"==e?V(t?P:O):"["==e?V(A("]"),je,C,n):"{"==e?Y(L,"}",null,n):"quasi"==e?M(B,n):V()}function W(e){return e.match(/[;\}\)\],]/)?M():M(O)}function N(e){return e.match(/[;\}\)\],]/)?M():M(P)}function H(e,t){return","==e?V(O):U(e,t,!1)}function U(e,t,r){var n=0==r?H:U,a=0==r?O:P;return"=>"==e?V(z,r?G:F,T):"operator"==e?/\+\+|--/.test(t)?V(n):"?"==t?V(O,$(":"),a):V(a):"quasi"==e?M(B,n):";"!=e?"("==e?Y(P,")","call",n):"."==e?V(K,n):"["==e?V(A("]"),W,$("]"),C,n):void 0:void 0}function B(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?V(B):V(O,D)}function D(e){if("}"==e)return j.marked="string-2",j.state.tokenize=b,V(B)}function F(e){return x(j.stream,j.state),M("{"==e?q:O)}function G(e){return x(j.stream,j.state),M("{"==e?q:P)}function J(e){return":"==e?V(C,q):M(H,$(";"),C)}function K(e){if("variable"==e)return j.marked="property",V()}function L(e,t){return"variable"==e||"keyword"==j.style?(j.marked="property",V("get"==t||"set"==t?Q:R)):"number"==e||"string"==e?(j.marked=c?"property":j.style+" property",V(R)):"jsonld-keyword"==e?V(R):"["==e?V(O,$("]"),R):void 0}function Q(e){return"variable"!=e?M(R):(j.marked="property",V(de))}function R(e){return":"==e?V(P):"("==e?M(de):void 0}function X(e,t){function r(n){if(","==n){var a=j.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),V(e,r)}return n==t?V():V($(t))}return function(n){return n==t?V():M(e,r)}}function Y(e,t,r){for(var n=3;n=0;--l){var u=t.cc[l];if(u==C)c=c.prev;else if(u!=oe)break}"stat"==c.type&&"}"==a&&(c=c.prev),o&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,s=a==f;return"vardef"==f?c.indented+("operator"==t.lastType||","==t.lastType?c.info+1:0):"form"==f&&"{"==a?c.indented:"form"==f?c.indented+i:"stat"==f?c.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?o||i:0):"switch"!=c.info||s||0==r.doubleIndentSwitch?c.align?c.column+(s?0:1):c.indented+(s?0:i):c.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",helperType:l?"json":"javascript",jsonldMode:c,jsonMode:l}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}); + + + +/*CodeMirror addon hint -----------------------------------------------Start*/ +/* https://github.com/farzher/fuzzysort */ +!function(e,r){"function"==typeof define&&define.amd?define([],r):"object"==typeof module&&module.exports?module.exports=r():e.fuzzysort=r()}(this,function(){var e="undefined"!=typeof require&&"undefined"==typeof window,r=new Map,n=new Map,o=[];o.total=0;var t=[],i=[];function a(){r.clear(),n.clear(),t=[],i=[]}function l(e){for(var r=-9007199254740991,n=e.length-1;n>=0;--n){var o=e[n];if(null!==o){var t=o.score;t>r&&(r=t)}}return-9007199254740991===r?null:r}function f(e,r){var n=e[r];if(void 0!==n)return n;var o=r;Array.isArray(r)||(o=r.split("."));for(var t=o.length,i=-1;e&&++i>1]=e[n],t=1+(n<<1)}for(var a=n-1>>1;n>0&&o.score>1)e[n]=e[a];e[n]=o}return n.add=function(n){var o=r;e[r++]=n;for(var t=o-1>>1;o>0&&n.score>1)e[o]=e[t];e[o]=n},n.poll=function(){if(0!==r){var n=e[0];return e[0]=e[--r],o(),n}},n.peek=function(n){if(0!==r)return e[0]},n.replaceTop=function(r){e[0]=r,o()},n},p=s();return function d(c){var g={single:function(e,r,n){return e?(u(e)||(e=g.getPreparedSearch(e)),r?(u(r)||(r=g.getPrepared(r)),((n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo)(e,r,e[0])):null):null},go:function(e,r,n){if(!e)return o;var t=(e=g.prepareSearch(e))[0],i=n&&n.threshold||c&&c.threshold||-9007199254740991,a=n&&n.limit||c&&c.limit||9007199254740991,s=(n&&void 0!==n.allowTypo?n.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,d=0,v=0,h=r.length;if(n&&n.keys)for(var w=n.scoreFn||l,x=n.keys,y=x.length,m=h-1;m>=0;--m){for(var T=r[m],k=new Array(y),b=y-1;b>=0;--b)(_=f(T,B=x[b]))?(u(_)||(_=g.getPrepared(_)),k[b]=s(e,_,t)):k[b]=null;k.obj=T;var I=w(k);null!==I&&(Ip.peek().score&&p.replaceTop(k))))}else if(n&&n.key){var B=n.key;for(m=h-1;m>=0;--m)(_=f(T=r[m],B))&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}else for(m=h-1;m>=0;--m){var _,C;(_=r[m])&&(u(_)||(_=g.getPrepared(_)),null!==(C=s(e,_,t))&&(C.scorep.peek().score&&p.replaceTop(C)))))}if(0===d)return o;var A=new Array(d);for(m=d-1;m>=0;--m)A[m]=p.poll();return A.total=d+v,A},goAsync:function(r,n,t){var i=!1,a=new Promise(function(a,p){if(!r)return a(o);var d=(r=g.prepareSearch(r))[0],v=s(),h=n.length-1,w=t&&t.threshold||c&&c.threshold||-9007199254740991,x=t&&t.limit||c&&c.limit||9007199254740991,y=(t&&void 0!==t.allowTypo?t.allowTypo:!c||void 0===c.allowTypo||c.allowTypo)?g.algorithm:g.algorithmNoTypo,m=0,T=0;function k(){if(i)return p("canceled");var s=Date.now();if(t&&t.keys)for(var c=t.scoreFn||l,b=t.keys,I=b.length;h>=0;--h){for(var B=n[h],_=new Array(I),C=I-1;C>=0;--C)(P=f(B,L=b[C]))?(u(P)||(P=g.getPrepared(P)),_[C]=y(r,P,d)):_[C]=null;_.obj=B;var A=c(_);if(null!==A&&!(Av.peek().score&&v.replaceTop(_)),h%1e3==0&&Date.now()-s>=10))return void(e?setImmediate(k):setTimeout(k))}else if(t&&t.key){for(var L=t.key;h>=0;--h)if((P=f(B=n[h],L))&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}else for(;h>=0;--h){var P,j;if((P=n[h])&&(u(P)||(P=g.getPrepared(P)),null!==(j=y(r,P,d))&&!(j.scorev.peek().score&&v.replaceTop(j)),h%1e3==0&&Date.now()-s>=10)))return void(e?setImmediate(k):setTimeout(k))}if(0===m)return a(o);for(var N=new Array(m),S=m-1;S>=0;--S)N[S]=v.poll();N.total=m+T,a(N)}e?setImmediate(k):k()});return a.cancel=function(){i=!0},a},highlight:function(e,r,n){if(null===e)return null;void 0===r&&(r=""),void 0===n&&(n="");for(var o="",t=0,i=!1,a=e.target,l=a.length,f=e.indexes,u=0;u999)return g.prepare(e);var n=r.get(e);return void 0!==n?n:(n=g.prepare(e),r.set(e,n),n)},getPreparedSearch:function(e){if(e.length>999)return g.prepareSearch(e);var r=n.get(e);return void 0!==r?r:(r=g.prepareSearch(e),n.set(e,r),r)},algorithm:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0,p=0;;){if(n===o[u]){if(t[p++]=u,++f===a)break;n=e[0===s?f:s===f?f+1:s===f-1?f-1:f]}if(++u>=l)for(;;){if(f<=1)return null;if(0===s){if(n===e[--f])continue;s=f}else{if(1===s)return null;if((n=e[1+(f=--s)])===e[f])continue}u=t[(p=f)-1]+1;break}}f=0;var d=0,c=!1,v=0,h=r._nextBeginningIndexes;null===h&&(h=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target));var w=u=0===t[0]?0:h[t[0]-1];if(u!==l)for(;;)if(u>=l){if(f<=0){if(++d>a-2)break;if(e[d]===e[d+1])continue;u=w;continue}--f,u=h[i[--v]]}else if(e[0===d?f:d===f?f+1:d===f-1?f-1:f]===o[u]){if(i[v++]=u,++f===a){c=!0;break}++u}else u=h[u];if(c)var x=i,y=v;else x=t,y=p;for(var m=0,T=-1,k=0;k=0;--k)r.indexes[k]=x[k];return r},algorithmNoTypo:function(e,r,n){for(var o=r._targetLowerCodes,a=e.length,l=o.length,f=0,u=0,s=0;;){if(n===o[u]){if(t[s++]=u,++f===a)break;n=e[f]}if(++u>=l)return null}f=0;var p=!1,d=0,c=r._nextBeginningIndexes;if(null===c&&(c=r._nextBeginningIndexes=g.prepareNextBeginningIndexes(r.target)),(u=0===t[0]?0:c[t[0]-1])!==l)for(;;)if(u>=l){if(f<=0)break;--f,u=c[i[--d]]}else if(e[f]===o[u]){if(i[d++]=u,++f===a){p=!0;break}++u}else u=c[u];if(p)var v=i,h=d;else v=t,h=s;for(var w=0,x=-1,y=0;y=0;--y)r.indexes[y]=v[y];return r},prepareLowerCodes:function(e){for(var r=e.length,n=[],o=e.toLowerCase(),t=0;t=65&&l<=90,u=f||l>=97&&l<=122||l>=48&&l<=57,s=f&&!t||!i||!u;t=f,i=u,s&&(n[o++]=a)}return n},prepareNextBeginningIndexes:function(e){for(var r=e.length,n=g.prepareBeginningIndexes(e),o=[],t=n[0],i=0,a=0;aa?o[a]=t:(t=n[++i],o[a]=void 0===t?r:t);return o},cleanup:a,new:d};return g}()}); +/* showHint */ +!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var i="CodeMirror-hint",e="CodeMirror-hint-active";function n(t,i){this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(i){i=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in a)o[s]=a[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),i);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var o=0;ol.clientHeight+1,x=h.getScrollInfo();if(C>0){var A=k.bottom-k.top;if(m.top-(m.bottom-k.top)-A>0)l.style.top=(v=m.top-A)+"px",y=!1;else if(A>H){l.style.height=H-5+"px",l.style.top=(v=m.bottom-k.top)+"px";var S=h.getCursor();o.from.ch!=S.ch&&(m=h.cursorCoords(S),l.style.left=(g=m.left)+"px",k=l.getBoundingClientRect())}}var T,M=k.right-w;if(M>0&&(k.right-k.left>w&&(l.style.width=w-5+"px",M-=k.right-k.left-w),l.style.left=(g=m.left-M)+"px"),b)for(var E=l.firstChild;E;E=E.nextSibling)E.style.paddingRight=h.display.nativeBarWidth+"px";(h.addKeyMap(this.keyMap=function(t,i){var e={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},n=t.options.customKeys,o=n?{}:e;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,i)}:e.hasOwnProperty(n)?e[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(n,{moveFocus:function(t,i){s.changeActive(s.selectedHint+t,i)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:a.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus)&&(h.on("blur",this.onBlur=function(){T=setTimeout(function(){n.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(T)}));return h.on("scroll",this.onScroll=function(){var t=h.getScrollInfo(),i=h.getWrapperElement().getBoundingClientRect(),e=v+x.top-t.top,o=e-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(y||(o+=l.offsetHeight),o<=i.top||o>=i.bottom)return n.close();l.style.top=e+"px",l.style.left=g+x.left-t.left+"px"}),t.on(l,"dblclick",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),s.pick())}),t.on(l,"click",function(t){var i=r(l,t.target||t.srcElement);i&&null!=i.hintId&&(s.changeActive(i.hintId),n.options.completeOnSingleClick&&s.pick())}),t.on(l,"mousedown",function(){setTimeout(function(){h.focus()},20)}),t.signal(o,"select",a[0],l.firstChild),!0}function l(t,i,e,n){if(t.async)t(i,n,e);else{var o=t(i,e);o&&o.then?o.then(n):n(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(i,e){var n=i.list[e];n.hint?n.hint(this.cm,i,n):this.cm.replaceRange(c(n),n.from||i.from,n.to||i.to,"complete"),t.signal(i,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch0&&n.to.ch-n.from.ch!=o.to.ch-o.from.ch)))&&(this.data=i,i&&i.list.length))if(s&&1==i.list.length)this.pick(i,0);else{if(1==i.list.length&&i.to.ch-i.from.ch===i.list[0].length)return;this.widget=new h(this,i),t.signal(i,"shown")}}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(i,n){if(i>=this.data.list.length?i=n?this.data.list.length-1:0:i<0&&(i=n?0:this.data.list.length-1),this.selectedHint!=i){var o=this.hints.childNodes[this.selectedHint];o.className=o.className.replace(" "+e,""),(o=this.hints.childNodes[this.selectedHint=i]).className+=" "+e,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:function(i,e){var n,o=i.getHelpers(e,"hint");if(o.length){var s=function(t,i,e){var n=function(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):o(s+1)})}(0)};return s.async=!0,s.supportsSelection=!0,s}if(n=i.getHelper(i.getCursor(),"hintWords")){t.signal(i,"hinting",n);var c=i.state.myhints,r=n.slice(0);return c&&c.forEach(function(t){-1===n.indexOf(t)&&r.push(t)}),function(i){return t.hint.fromList(i,{words:r})}}return t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else c="",r=s;var h=[];if(fuzzysort&&fuzzysort.go){var l=fuzzysort.go(c,e.words);l&&l.forEach(function(t){h.push(t.target)})}else for(var a=0;a,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)}); +/* javascript-hint 注释掉,使得show-hint.js 的resolveAutoHints方法进入这个判断:} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { */ +// !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;rf.ch&&(c.end=f.ch,c.string=c.string.slice(0,f.ch-c.start)):c={start:f.ch,end:f.ch,string:"",state:c.state,type:"."==c.string?"property":null};for(var p=c;"property"==p.type;){if("."!=(p=s(i,e(f.line,p.start))).string)return;if(p=s(i,e(f.line,p.start)),!l)var l=[];l.push(p)}t.signal(i,"hinting");var u=i.state.myhints;return i.state.needToClearJSHint&&(o=[],i.state.needToClearJSHint=!1),u&&u.forEach(function(t){n(o,t)||o.push(t)}),{list:function(t,e,i,o){var s=[],a=t.string,f=o&&o.globalScope||window;function c(t){if(fuzzysort&&fuzzysort.single){var e=fuzzysort.single(a,t);e&&e.score<=0&&!n(s,t)&&s.push(t)}else 0!=t.lastIndexOf(a,0)||n(s,t)||s.push(t)}if(e&&e.length){var p,l=e.pop();for(l.type&&0===l.type.indexOf("variable")?(o&&o.additionalContext&&(p=o.additionalContext[l.string]),o&&!1===o.useGlobalScope||(p=p||f[l.string])):"string"==l.type?p="":"atom"==l.type?p=1:"function"==l.type&&(null==f.jQuery||"$"!=l.string&&"jQuery"!=l.string||"function"!=typeof f.jQuery?null!=f._&&"_"==l.string&&"function"==typeof f._&&(p=f._()):p=f.jQuery());null!=p&&e.length;)p=p[e.pop().string];null!=p&&function(t){"string"==typeof t?r(stringProps,c):t instanceof Array?r(arrayProps,c):t instanceof Function&&r(funcProps,c);!function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,c)}(p)}else{var u=fuzzysort.go(a,i);u&&u.forEach(function(t){s.push(t.target)})}return s}(c,l,o,a),from:e(f.line,c.start),to:e(f.line,c.end)}}}function o(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",function(t,e){return i(t,s,function(t,e){return t.getTokenAt(e)},e)}),t.registerHelper("hint","coffeescript",function(t,e){return i(t,coffeescriptKeywords,o,e)});var s="double float int long short null true false enum super this void auto for register static const friend mutable explicit virtual template typename printf break continue return do while if else for instanceof switch case default try catch finally throw throws assert import package boolean byte char delete private inline struct union signed unsigned export extern namespace using operator sizeof typedef typeid and del from not as elif or with pass except print exec raise is def lambda private protected public abstract class extends final implements interface native new static strictfp synchronized transient main String string System println vector bool boolean FALSE TRUE function".split(" ")}); +/* anyword-hint */ +!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}})}); +/*CodeMirror addon hint -----------------------------------------------End*/ + // CodeMirror python !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i)),e.defineMode("python",function(a,s){for(var c="error",l=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],f=0;fr?_(t):i0&&z(e,t)&&(a+=" "+c),a}return v(e,t)}function v(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var r=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),e.match(/^[\d_]+\.\d*/)&&(r=!0),e.match(/^\.\d+/)&&(r=!0),r)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(y))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(t,n){return t.match(e)?(n.tokenize=o,r):t.match("{")?"punctuation":t.match("}")?(n.tokenize=o,"punctuation"):v(t,n)}function o(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return a.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return a.tokenize=i,o.current()?r:(o.next(),"punctuation");if(o.match("}}"))return r;if(o.match("}"))return c;o.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return c;a.tokenize=t}return r}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var t=1==e.length,n="string";function r(r,i){for(;!r.eol();)if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),t&&r.eol())return n}else{if(r.match(e))return i.tokenize=x,n;r.eat(/['"]/)}if(t){if(s.singleLineStringErrors)return c;i.tokenize=x}return n}return r.isString=!0,r}(e.current()),t.tokenize(e,t));for(var o=0;o1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function w(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(b,!1)?"meta":h?"operator":c;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent+=1),"lambda"==r&&(t.lambda=!0),":"!=r||t.lambda||"py"!=o(t).type||_(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(o(t).type!=r)return c;t.indent=t.scopes.pop().offset-p}}return t.dedent>0&&e.eol()&&"py"==o(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}return{startState:function(e){return{tokenize:x,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=w(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+c:r},indent:function(t,n){if(t.tokenize!=x)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0);return null!=r.align?r.align-(i?1:0):r.offset-(i?p:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python");var a;e.defineMIME("text/x-cython",{name:"python",extra_keywords:(a="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",a.split(" "))})}); // CodeMirror c-like(java) !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,L=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;function D(e,t){var n,r=e.next();if(k[r]){var o=k[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r))return c=r,null;if(T.test(r)){if(e.backUp(1),e.match(M))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=z,z(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(P.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(P););return"operator"}if(e.eatWhile(L),S)for(;e.match(S);)e.eatWhile(L);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(x,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)?(l(g,a)&&(c="newstatement"),"builtin"):l(b,a)?"atom":"variable"}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):v&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),k.token){var d=k.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,I(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0);if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(k.indent){var a=k.indent(t,r,n);if("number"==typeof a)return a}var i=o==r.type,l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||i?r.indented+(i?0:d)+(i||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(i?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",c="int long char short double float unsigned signed void size_t ptrdiff_t";function u(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=u;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function d(e,t){return"type"==t.prevToken&&"type"}function f(e){return e.eatWhile(/[\w\.']/),"number"}function p(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function m(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function y(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.types),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function e(t){return function(n,r){for(var o;o=n.next();){if("*"==o&&n.eat("/")){if(1==t){r.tokenize=null;break}return r.tokenize=e(t-1),r.tokenize(n,r)}if("/"==o&&n.eat("*"))return r.tokenize=e(t+1),r.tokenize(n,r)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,o=!1,a=!1;!e.eol();){if(!n&&!o&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!o&&"$"==r&&e.match("{")&&e.skipTo("}"),o=!o&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:i(s+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(c),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:i(s+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(c),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),y("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(c),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var x=null;y("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var o,a=!1,i=!1;!n.eol();){if(!a&&n.match('"')&&("single"==t||n.match('""'))){i=!0;break}if(!a&&n.match("``")){x=e(t),i=!0;break}o=n.next(),a="single"==t&&!a&&"\\"==o}return i&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!x||!e.match("`"))&&(t.tokenize=x,x=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}); // CodeMirror matchbrackets -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(t,e,i){var c=t.getLineHandle(e.line),o=e.ch-1,l=i&&i.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=!l&&o>=0&&r[c.text.charAt(o)]||r[c.text.charAt(++o)];if(!h)return null;var s=">"==h.charAt(1)?1:-1;if(i&&i.strict&&s>0!=(o==e.ch))return null;var u=t.getTokenTypeAt(n(e.line,o+1)),f=a(t,n(e.line,o+(s>0?1:0)),s,u||null,i);return null==f?null:{from:n(e.line,o),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:s>0}}function a(t,e,i,a,c){for(var o=c&&c.maxScanLineLength||1e4,l=c&&c.maxScanLines||1e3,h=[],s=c&&c.bracketRegex?c.bracketRegex:/[(){}[\]]/,u=i>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),f=e.line;f!=u;f+=i){var m=t.getLine(f);if(m){var g=i>0?0:m.length-1,d=i>0?m.length:-1;if(!(m.length>o))for(f==e.line&&(g=e.ch-(i<0?1:0));g!=d;g+=i){var k=m.charAt(g);if(s.test(k)&&(void 0===a||t.getTokenTypeAt(n(f,g+1))==a))if(">"==r[k].charAt(1)==i>0)h.push(k);else{if(!h.length)return{pos:n(f,g),ch:k};h.pop()}}}}return f-i!=(i>0?t.lastLine():t.firstLine())&&null}function c(t,r,a){for(var c=t.state.matchBrackets.maxHighlightLineLength||1e3,o=[],l=t.listSelections(),h=0;h",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(t,e,i){var c=t.getLineHandle(e.line),o=e.ch-1,l=i&&i.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var h=!l&&o>=0&&r[c.text.charAt(o)]||r[c.text.charAt(++o)];if(!h)return null;var s=">"==h.charAt(1)?1:-1;if(i&&i.strict&&s>0!=(o==e.ch))return null;var u=t.getTokenTypeAt(n(e.line,o+1)),f=a(t,n(e.line,o+(s>0?1:0)),s,u||null,i);return null==f?null:{from:n(e.line,o),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:s>0}}function a(t,e,i,a,c){for(var o=c&&c.maxScanLineLength||1e4,l=c&&c.maxScanLines||1e3,h=[],s=c&&c.bracketRegex?c.bracketRegex:/[(){}[\]]/,u=i>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),f=e.line;f!=u;f+=i){var m=t.getLine(f);if(m){var g=i>0?0:m.length-1,d=i>0?m.length:-1;if(!(m.length>o))for(f==e.line&&(g=e.ch-(i<0?1:0));g!=d;g+=i){var k=m.charAt(g);if(s.test(k)&&(void 0===a||t.getTokenTypeAt(n(f,g+1))==a))if(">"==r[k].charAt(1)==i>0)h.push(k);else{if(!h.length)return{pos:n(f,g),ch:k};h.pop()}}}}return f-i!=(i>0?t.lastLine():t.firstLine())&&null}function c(t,r,a){for(var c=t.state.matchBrackets.maxHighlightLineLength||1e3,o=[],l=t.listSelections(),h=0;h // Copyright (C) 2006 Google Inc. @@ -143,5 +163,7 @@ return; // See the License for the specific language governing permissions and // limitations under the License. - + + 去掉了 + marked v0.3.3 去不了,去掉后 这句代码会报错:window.editormd.markdownToHTML , TODO 看能否去掉单独加载marked的地方 */ \ No newline at end of file