(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00a46cc0"],{"279f":function(t,e,n){"use strict";var i,r;function s(t,e,n){var i=function(e,n){return t.js_beautify(e,n)};return i.js=t.js_beautify,i.css=e.css_beautify,i.html=n.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=e.css_beautify,i.html_beautify=n.html_beautify,i}i=[n("a179"),n("a16b"),n("a69e")],r=function(t,e,n){return s(t,e,n)}.apply(e,i),void 0===r||(t.exports=r)},69713:function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),o=i||r||s,a=o&&(i?document.documentMode||6:+(s||r)[1]),l=!s&&/WebKit\//.test(t),u=l&&/Qt\/\d+\.\d+/.test(t),h=!s&&/Chrome\/(\d+)/.exec(t),c=h&&+h[1],_=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),d=/PhantomJS/.test(t),g=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),w=/win/i.test(e),x=_&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(_=!1,l=!0);var k=y&&(u||_&&(null==x||x<12.11)),C=n||o&&a>=9;function T(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var S,O=function(t,e){var n=t.className,i=T(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function E(t,e){return L(t).appendChild(e)}function A(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=n-o%n,s=a+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(P=function(t){try{t.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function V(t,e){for(var n=0;n=e)return i+Math.min(o,e-r);if(r+=s-i,r+=n-r%n,i=s+1,r>=e)return i}}var Z=[""];function J(t){while(Z.length<=t)Z.push(tt(Z)+" ");return Z[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||st.test(t))}function at(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ot(t))||e.test(t):ot(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ut=/[\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 ht(t){return t.charCodeAt(0)>=768&&ut.test(t)}function ct(t,e,n){while((n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,s=i<0?Math.ceil(r):Math.floor(r);if(s==e)return t(s)?e:n;t(s)?n=s:e=s+i}}function pt(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,s=0;se||e==n&&o.to==e)&&(i(Math.max(o.from,e),Math.min(o.to,n),1==o.level?"rtl":"ltr",s),r=!0)}r||i(e,n,"ltr")}var ft=null;function dt(t,e,n){var i;ft=null;for(var r=0;re)return r;s.to==e&&(s.from!=s.to&&"before"==n?i=r:ft=r),s.from==e&&(s.from!=s.to&&"before"!=n?i=r:ft=r)}return null!=i?i:ft}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var u="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var h=t.length,c=[],_=0;_-1&&(i[e]=r.slice(0,s).concat(r.slice(s+1)))}}}function xt(t,e){var n=bt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function St(t){t.prototype.on=function(t,e){yt(this,t,e)},t.prototype.off=function(t,e){wt(this,t,e)}}function Ot(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Lt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Et(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function At(t){Ot(t),Lt(t)}function Nt(t){return t.target||t.srcElement}function Mt(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 Rt,Dt,Wt=function(){if(o&&a<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}();function Pt(t){if(null==Rt){var e=A("span","​");E(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Rt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var n=Rt?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function zt(t){if(null!=Dt)return Dt;var e=E(t,document.createTextNode("AخA")),n=S(e,0,1).getBoundingClientRect(),i=S(e,1,2).getBoundingClientRect();return L(t),!(!n||n.left==n.right)&&(Dt=i.right-n.right<3)}var It=3!="\n\nb".split(/\n/).length?function(t){var e=0,n=[],i=t.length;while(e<=i){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var s=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=s.indexOf("\r");-1!=o?(n.push(s.slice(0,o)),e+=o+1):(n.push(s),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},jt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(n){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Ft=function(){var t=A("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),Bt=null;function Ht(t){if(null!=Bt)return Bt;var e=E(t,A("span","x")),n=e.getBoundingClientRect(),i=S(e,0,1).getBoundingClientRect();return Bt=Math.abs(n.left-i.left)>1}var Ut={},Kt={};function Vt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Ut[t]=e}function Gt(t,e){Kt[t]=e}function Xt(t){if("string"==typeof t&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&"string"==typeof t.name&&Kt.hasOwnProperty(t.name)){var e=Kt[t.name];"string"==typeof e&&(e={name:e}),t=rt(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Xt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Xt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function $t(t,e){e=Xt(e);var n=Ut[e.name];if(!n)return $t(t,"text/plain");var i=n(t,e);if(qt.hasOwnProperty(e.name)){var r=qt[e.name];for(var s in r)r.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=r[s])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)i[o]=e.modeProps[o];return i}var qt={};function Yt(t,e){var n=qt.hasOwnProperty(t)?qt[t]:qt[t]={};H(e,n)}function Qt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Zt(t,e){var n;while(t.innerMode){if(n=t.innerMode(e),!n||n.mode==t)break;e=n.state,t=n.mode}return n||{mode:t,state:e}}function Jt(t,e,n){return!t.startState||t.startState(e,n)}var te=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function ee(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var n=t;while(!n.lines)for(var i=0;;++i){var r=n.children[i],s=r.chunkSize();if(e=t.first&&en?ue(n,ee(t,n).text.length):me(e,ee(t,e.line).text.length)}function me(t,e){var n=t.ch;return null==n||n>e?ue(t.line,e):n<0?ue(t.line,0):t}function ve(t,e){for(var n=[],i=0;i=this.string.length},te.prototype.sol=function(){return this.pos==this.lineStart},te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},te.prototype.next=function(){if(this.pose},te.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},te.prototype.skipToEnd=function(){this.pos=this.string.length},te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},te.prototype.backUp=function(t){this.pos-=t},te.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t},s=this.string.substr(this.pos,t.length);if(r(s)==r(t))return!1!==e&&(this.pos+=t.length),!0},te.prototype.current=function(){return this.string.slice(this.start,this.pos)},te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ye=function(t,e){this.state=t,this.lookAhead=e},be=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function we(t,e,n,i){var r=[t.state.modeGen],s={};Ae(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),s,i);for(var o=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,u=0;n.state=!0,Ae(t,e.text,a.mode,n,(function(t,e){var n=l;while(ut&&r.splice(l,1,t,r[l+1],i),l+=2,u=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Qt(t.doc.mode,i.state),s=we(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=s.styles,s.classes?e.styleClasses=s.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function ke(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new be(i,!0,e);var s=Ne(t,e,n),o=s>i.first&&ee(i,s-1).stateAfter,a=o?be.fromSaved(i,o,s):new be(i,Jt(i.mode),s);return i.iter(s,e,(function(n){Ce(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}be.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},be.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=t)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},be.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},be.fromSaved=function(t,e,n){return e instanceof ye?new be(t,Qt(t.mode,e.state),n,e.lookAhead):new be(t,Qt(t.mode,e),n)},be.prototype.save=function(t){var e=!1!==t?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ye(e,this.maxLookAhead):e};var Oe=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Le(t,e,n,i){var r,s=t.doc,o=s.mode;e=ge(s,e);var a,l=ee(s,e.line),u=ke(t,e.line,n),h=new te(l.text,t.options.tabSize,u);i&&(a=[]);while((i||h.post.options.maxHighlightLength?(a=!1,o&&Ce(t,e,i,c.pos),c.pos=e.length,l=null):l=Ee(Se(n,c,i.state,_),s),_){var p=_[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||h!=l){while(uo;--a){if(a<=s.first)return s.first;var l=ee(s,a-1),u=l.stateAfter;if(u&&(!n||a+(u instanceof ye?u.lookAhead:0)<=s.modeFrontier))return a;var h=U(l.text,null,t.options.tabSize);(null==r||i>h)&&(r=a-1,i=h)}return r}function Me(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=ee(t,i).stateAfter;if(r&&(!(r instanceof ye)||i+r.lookAhead=e:s.to>e);(i||(i=[])).push(new ze(o,s.from,l?null:s.to))}}return i}function He(t,e,n){var i;if(t)for(var r=0;r=e:s.to>e);if(a||s.from==e&&"bookmark"==o.type&&(!n||s.marker.insertLeft)){var l=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var b=0;b0)){var h=[l,1],c=he(u.from,a.from),_=he(u.to,a.to);(c<0||!o.inclusiveLeft&&!c)&&h.push({from:u.from,to:a.from}),(_>0||!o.inclusiveRight&&!_)&&h.push({from:a.to,to:u.to}),r.splice.apply(r,h),l+=h.length-3}}return r}function Ge(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||Ye(n,s.marker)<0)&&(n=s.marker)}return n}function en(t,e,n,i,r){var s=ee(t,e),o=De&&s.markedSpans;if(o)for(var a=0;a=0&&c<=0||h<=0&&c>=0)&&(h<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?he(u.to,n)>=0:he(u.to,n)>0)||h>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?he(u.from,i)<=0:he(u.from,i)<0)))return!0}}}function nn(t){var e;while(e=Ze(t))t=e.find(-1,!0).line;return t}function rn(t){var e;while(e=Je(t))t=e.find(1,!0).line;return t}function sn(t){var e,n;while(e=Je(t))t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function on(t,e){var n=ee(t,e),i=nn(n);return n==i?e:se(i)}function an(t,e){if(e>t.lastLine())return e;var n,i=ee(t,e);if(!ln(t,i))return e;while(n=Je(i))i=n.find(1,!0).line;return se(i)+1}function ln(t,e){var n=De&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var pn=function(t,e,n){this.text=t,Xe(this,e),this.height=n?n(this):1};function fn(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ge(t),Xe(t,n);var r=i?i(t):1;r!=t.height&&re(t,r)}function dn(t){t.parent=null,Ge(t)}pn.prototype.lineNo=function(){return se(this)},St(pn);var gn={},mn={};function vn(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?mn:gn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function yn(t,e){var n=N("span",null,null,l?"padding-right: .1px":null),i={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var s=r?e.rest[r-1]:e.line,o=void 0;i.pos=0,i.addToken=wn,zt(t.display.measure)&&(o=mt(s,t.doc.direction))&&(i.addToken=kn(i.addToken,o)),i.map=[];var a=e!=t.display.externalMeasured&&se(s);Tn(s,i,xe(t,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=W(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=W(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Pt(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return xt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=W(i.pre.className,i.textClass||"")),i}function bn(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function wn(t,e,n,i,r,s,l){if(e){var u,h=t.splitSpaces?xn(e,t.trailingSpace):e,c=t.cm.state.specialChars,_=!1;if(c.test(e)){u=document.createDocumentFragment();var p=0;while(1){c.lastIndex=p;var f=c.exec(e),d=f?f.index-p:e.length-p;if(d){var g=document.createTextNode(h.slice(p,p+d));o&&a<9?u.appendChild(A("span",[g])):u.appendChild(g),t.map.push(t.pos,t.pos+d,g),t.col+=d,t.pos+=d}if(!f)break;p+=d+1;var m=void 0;if("\t"==f[0]){var v=t.cm.options.tabSize,y=v-t.col%v;m=u.appendChild(A("span",J(y),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=y}else"\r"==f[0]||"\n"==f[0]?(m=u.appendChild(A("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&a<9?u.appendChild(A("span",[m])):u.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,u=document.createTextNode(h),t.map.push(t.pos,t.pos+e.length,u),o&&a<9&&(_=!0),t.pos+=e.length;if(t.trailingSpace=32==h.charCodeAt(e.length-1),n||i||r||_||s||l){var b=n||"";i&&(b+=i),r&&(b+=r);var w=A("span",[u],b,s);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return t.content.appendChild(w)}t.content.appendChild(u)}}function xn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;ru&&c.from<=u)break;if(c.to>=h)return t(n,i,r,s,o,a,l);t(n,i.slice(0,c.to-u),r,s,null,a,l),s=null,i=i.slice(c.to-u),u=c.to}}}function Cn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Tn(t,e,n){var i=t.markedSpans,r=t.text,s=0;if(i)for(var o,a,l,u,h,c,_,p=r.length,f=0,d=1,g="",m=0;;){if(m==f){l=u=h=a="",_=null,c=null,m=1/0;for(var v=[],y=void 0,b=0;bf||x.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&m>w.to&&(m=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&w.from==f&&(h+=" "+x.startStyle),x.endStyle&&w.to==m&&(y||(y=[])).push(x.endStyle,w.to),x.title&&((_||(_={})).title=x.title),x.attributes)for(var k in x.attributes)(_||(_={}))[k]=x.attributes[k];x.collapsed&&(!c||Ye(c.marker,x)<0)&&(c=w)}else w.from>f&&m>w.from&&(m=w.from)}if(y)for(var C=0;C=p)break;var S=Math.min(p,m);while(1){if(g){var O=f+g.length;if(!c){var L=O>S?g.slice(0,S-f):g;e.addToken(e,L,o?o+l:l,h,f+L.length==m?u:"",a,_)}if(O>=S){g=g.slice(S-f),f=S;break}f=O,h=""}g=r.slice(s,s=n[d++]),o=vn(n[d++],e.cm.options)}}else for(var E=1;E2&&s.push((l.bottom+u.top)/2-n.top)}}s.push(n.bottom-n.top)}}function ni(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function ii(t,e){e=nn(e);var n=se(e),i=t.display.externalMeasured=new Sn(t.doc,e,n);i.lineN=n;var r=i.built=yn(t,i);return i.text=r.pre,E(t.display.lineMeasure,r.pre),i}function ri(t,e,n,i){return ai(t,oi(t,e),n,i)}function si(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(s=l-a,r=s-1,e>=l&&(o="right")),null!=r){if(i=t[u+2],a==l&&n==(i.insertLeft?"left":"right")&&(o=n),"left"==n&&0==r)while(u&&t[u-2]==t[u-3]&&t[u-1].insertLeft)i=t[2+(u-=3)],o="left";if("right"==n&&r==l-a)while(u=0;r--)if((n=t[r]).left!=n.right)break;return n}function _i(t,e,n,i){var r,s=hi(e.map,n,i),l=s.node,u=s.start,h=s.end,c=s.collapse;if(3==l.nodeType){for(var _=0;_<4;_++){while(u&&ht(e.line.text.charAt(s.coverStart+u)))--u;while(s.coverStart+h0&&(c=i="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!u&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Di(t.display),top:f.top,bottom:f.bottom}:ui}for(var d=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(d+g)/2,v=e.view.measure.heights,y=0;y=i.text.length?(l=i.text.length,u="before"):l<=0&&(l=0,u="after"),!a)return o("before"==u?l-1:l,"before"==u);function h(t,e,n){var i=a[e],r=1==i.level;return o(n?t-1:t,r!=n)}var c=dt(a,l,u),_=ft,p=h(l,c,"before"==u);return null!=_&&(p.other=h(l,_,"before"!=u)),p}function Ci(t,e){var n=0;e=ge(t.doc,e),t.options.lineWrapping||(n=Di(t.display)*e.ch);var i=ee(t.doc,e.line),r=hn(i)+qn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Ti(t,e,n,i,r){var s=ue(t,e,n);return s.xRel=r,i&&(s.outside=i),s}function Si(t,e,n){var i=t.doc;if(n+=t.display.viewOffset,n<0)return Ti(i.first,0,null,-1,-1);var r=oe(i,n),s=i.first+i.size-1;if(r>s)return Ti(i.first+i.size-1,ee(i,s).text.length,null,1,1);e<0&&(e=0);for(var o=ee(i,r);;){var a=Ai(t,o,r,e,n),l=tn(o,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var u=l.find(1);if(u.line==r)return u;o=ee(i,r=u.line)}}function Oi(t,e,n,i){i-=yi(e);var r=e.text.length,s=_t((function(e){return ai(t,n,e-1).bottom<=i}),r,0);return r=_t((function(e){return ai(t,n,e).top>i}),s,r),{begin:s,end:r}}function Li(t,e,n,i){n||(n=oi(t,e));var r=bi(t,e,ai(t,n,i),"line").top;return Oi(t,e,n,r)}function Ei(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Ai(t,e,n,i,r){r-=hn(e);var s=oi(t,e),o=yi(e),a=0,l=e.text.length,u=!0,h=mt(e,t.doc.direction);if(h){var c=(t.options.lineWrapping?Mi:Ni)(t,e,n,s,h,i,r);u=1!=c.level,a=u?c.from:c.to-1,l=u?c.to:c.from-1}var _,p,f=null,d=null,g=_t((function(e){var n=ai(t,s,e);return n.top+=o,n.bottom+=o,!!Ei(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=e,d=n),!0)}),a,l),m=!1;if(d){var v=i-d.left=b.bottom?1:0}return g=ct(e.text,g,1),Ti(n,g,p,m,i-_)}function Ni(t,e,n,i,r,s,o){var a=_t((function(a){var l=r[a],u=1!=l.level;return Ei(ki(t,ue(n,u?l.to:l.from,u?"before":"after"),"line",e,i),s,o,!0)}),0,r.length-1),l=r[a];if(a>0){var u=1!=l.level,h=ki(t,ue(n,u?l.from:l.to,u?"after":"before"),"line",e,i);Ei(h,s,o,!0)&&h.top>o&&(l=r[a-1])}return l}function Mi(t,e,n,i,r,s,o){var a=Oi(t,e,i,o),l=a.begin,u=a.end;/\s/.test(e.text.charAt(u-1))&&u--;for(var h=null,c=null,_=0;_=u||p.to<=l)){var f=1!=p.level,d=ai(t,i,f?Math.min(u,p.to)-1:Math.max(l,p.from)).right,g=dg)&&(h=p,c=g)}}return h||(h=r[r.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}function Ri(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==li){li=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)li.appendChild(document.createTextNode("x")),li.appendChild(A("br"));li.appendChild(document.createTextNode("x"))}E(t.measure,li);var n=li.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),L(t.measure),n||1}function Di(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");E(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Wi(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;n[a]=s.offsetLeft+s.clientLeft+r,i[a]=s.clientWidth}return{fixedPos:Pi(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Pi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function zi(t){var e=Ri(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/Di(t.display)-3);return function(r){if(ln(t.doc,r))return 0;var s=0;if(r.widgets)for(var o=0;o0&&(l=ee(t.doc,u.line).text).length==u.ch){var h=U(l,l.length,t.options.tabSize)-l.length;u=ue(u.line,Math.max(0,Math.round((s-Qn(t.display).left)/Di(t.display))-h))}return u}function Fi(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,i=0;ie)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)De&&on(t.doc,e)r.viewFrom?Ui(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Ui(t);else if(e<=r.viewFrom){var s=Ki(t,n,n+i,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=i):Ui(t)}else if(n>=r.viewTo){var o=Ki(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Ui(t)}else{var a=Ki(t,e,e,-1),l=Ki(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(On(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Ui(t)}var u=r.externalMeasured;u&&(n=r.lineN&&e=i.viewTo)){var s=i.view[Fi(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==V(o,n)&&o.push(n)}}}function Ui(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Ki(t,e,n,i){var r,s=Fi(t,e),o=t.display.view;if(!De||n==t.doc.first+t.doc.size)return{index:s,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;r=a+o[s].size-e,s++}else r=a-e;e+=r,n+=r}while(on(t.doc,n)!=n){if(s==(i<0?0:o.length-1))return null;n+=i*o[s-(i<0?1:0)].size,s+=i}return{index:s,lineN:n}}function Vi(t,e,n){var i=t.display,r=i.view;0==r.length||e>=i.viewTo||n<=i.viewFrom?(i.view=On(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=On(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Fi(t,n)))),i.viewTo=n}function Gi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo||l.to().line0?o:t.defaultCharWidth())+"px"}if(i.other){var a=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Yi(t,e){return t.top-e.top||t.left-e.left}function Qi(t,e,n){var i=t.display,r=t.doc,s=document.createDocumentFragment(),o=Qn(t.display),a=o.left,l=Math.max(i.sizerWidth,Jn(t)-i.sizer.offsetLeft)-o.right,u="ltr"==r.direction;function h(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),s.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(i-e)+"px"))}function c(e,n,i){var s,o,c=ee(r,e),_=c.text.length;function p(n,i){return xi(t,ue(e,n),"div",c,i)}function f(e,n,i){var r=Li(t,c,null,e),s="ltr"==n==("after"==i)?"left":"right",o="after"==i?r.begin:r.end-(/\s/.test(c.text.charAt(r.end-1))?2:1);return p(o,s)[s]}var d=mt(c,r.direction);return pt(d,n||0,null==i?_:i,(function(t,e,r,c){var g="ltr"==r,m=p(t,g?"left":"right"),v=p(e-1,g?"right":"left"),y=null==n&&0==t,b=null==i&&e==_,w=0==c,x=!d||c==d.length-1;if(v.top-m.top<=3){var k=(u?y:b)&&w,C=(u?b:y)&&x,T=k?a:(g?m:v).left,S=C?l:(g?v:m).right;h(T,m.top,S-T,m.bottom)}else{var O,L,E,A;g?(O=u&&y&&w?a:m.left,L=u?l:f(t,r,"before"),E=u?a:f(e,r,"after"),A=u&&b&&x?l:v.right):(O=u?f(t,r,"before"):a,L=!u&&y&&w?l:m.right,E=!u&&b&&x?a:v.left,A=u?f(e,r,"after"):l),h(O,m.top,L-O,m.bottom),m.bottom0?e.blinker=setInterval((function(){t.hasFocus()||nr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Ji(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||er(t))}function tr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&nr(t))}),100)}function er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(xt(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()),Zi(t))}function nr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(xt(t,"blur",t,e),t.state.focused=!1,O(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function ir(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,s=0,l=0;l.005||d<-.005)&&(rt.display.sizerWidth){var m=Math.ceil(_/Di(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=u.line,t.display.maxLineChanged=!0)}}}Math.abs(s)>2&&(e.scroller.scrollTop+=s)}function rr(t){if(t.widgets)for(var e=0;e=o&&(s=oe(e,hn(ee(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function or(t,e){if(!kt(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null,s=n.wrapper.ownerDocument;if(e.top+i.top<0?r=!0:e.bottom+i.top>(s.defaultView.innerHeight||s.documentElement.clientHeight)&&(r=!1),null!=r&&!d){var o=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-qn(t.display))+"px;\n height: "+(e.bottom-e.top+Zn(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(r),t.display.lineSpace.removeChild(o)}}}function ar(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?ue(e.line,e.ch+1,"before"):e,e=e.ch?ue(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var s=0;s<5;s++){var o=!1,a=ki(t,e),l=n&&n!=e?ki(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var u=ur(t,r),h=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=u.scrollTop&&(gr(t,u.scrollTop),Math.abs(t.doc.scrollTop-h)>1&&(o=!0)),null!=u.scrollLeft&&(vr(t,u.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return r}function lr(t,e){var n=ur(t,e);null!=n.scrollTop&&gr(t,n.scrollTop),null!=n.scrollLeft&&vr(t,n.scrollLeft)}function ur(t,e){var n=t.display,i=Ri(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,s=ti(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+Yn(n),l=e.topa-i;if(e.topr+s){var h=Math.min(e.top,(u?a:e.bottom)-s);h!=r&&(o.scrollTop=h)}var c=t.options.fixedGutter?0:n.gutters.offsetWidth,_=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-c,p=Jn(t)-n.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.left<_?o.scrollLeft=Math.max(0,e.left+c-(f?0:10)):e.right>p+_-3&&(o.scrollLeft=e.right+(f?0:10)-p),o}function hr(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function cr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function _r(t,e,n){null==e&&null==n||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function pr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Ci(t,e.from),i=Ci(t,e.to);dr(t,n,i,e.margin)}}function dr(t,e,n,i){var r=ur(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});_r(t,r.scrollLeft,r.scrollTop)}function gr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||Xr(t,{top:e}),mr(t,e,!0),n&&Xr(t),jr(t,100))}function mr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function vr(t,e,n,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,Qr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function yr(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Yn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Zn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var br=function(t,e,n){this.cm=n;var i=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),yt(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),yt(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};br.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},br.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},br.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},br.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},br.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect(),s="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=t?t.style.visibility="hidden":e.set(1e3,i)}t.style.visibility="",e.set(1e3,i)},br.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var wr=function(){};function xr(t,e){e||(e=yr(t));var n=t.display.barWidth,i=t.display.barHeight;kr(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&ir(t),kr(t,yr(t)),n=t.display.barWidth,i=t.display.barHeight}function kr(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}wr.prototype.update=function(){return{bottom:0,right:0}},wr.prototype.setScrollLeft=function(){},wr.prototype.setScrollTop=function(){},wr.prototype.clear=function(){};var Cr={native:br,null:wr};function Tr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&O(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Cr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),yt(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?vr(t,e):gr(t,e)}),t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}var Sr=0;function Or(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Sr,markArrays:null},En(t.curOp)}function Lr(t){var e=t.curOp;e&&Nn(e,(function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Br(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Nr(t){t.updatedDisplay=t.mustUpdate&&Vr(t.cm,t.update)}function Mr(t){var e=t.cm,n=e.display;t.updatedDisplay&&ir(e),t.barMeasure=yr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=ri(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+Zn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Jn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Rr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var n=+new Date+t.options.workTime,i=ke(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(i.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Qt(e.mode,i.state):null,l=we(t,s,i,!0);a&&(i.state=a),s.styles=l.styles;var u=s.styleClasses,h=l.classes;h?s.styleClasses=h:u&&(s.styleClasses=null);for(var c=!o||o.length!=s.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),_=0;!c&&_n)return jr(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Wr(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==Gi(t))return!1;Zr(t)&&(Ui(t),e.dims=Wi(t));var r=i.first+i.size,s=Math.max(e.visible.from-t.options.viewportMargin,i.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(r,n.viewTo)),De&&(s=on(t.doc,s),o=an(t.doc,o));var a=s!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;Vi(t,s,o),n.viewOffset=hn(ee(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Gi(t);if(!a&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Ur(t);return l>4&&(n.lineDiv.style.display="none"),$r(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Kr(u),L(n.cursorDiv),L(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,jr(t,400)),n.updateLineNumbers=null,!0}function Gr(t,e){for(var n=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Jn(t))i&&(e.visible=sr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Yn(t.display)-ti(t),n.top)}),e.visible=sr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Vr(t,e))break;ir(t);var r=yr(t);Xi(t),xr(t,r),Yr(t,r),e.force=!1}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 Xr(t,e){var n=new Br(t,e);if(Vr(t,n)){ir(t),Gr(t,n);var i=yr(t);Xi(t),xr(t,i),Yr(t,i),n.finish()}}function $r(t,e,n){var i=t.display,r=t.options.lineNumbers,s=i.lineDiv,o=s.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 u=i.view,h=i.viewFrom,c=0;c-1&&(p=!1),Wn(t,_,h,n)),p&&(L(_.lineNumber),_.lineNumber.appendChild(document.createTextNode(le(t.options,h)))),o=_.node.nextSibling}else{var f=Un(t,_,h,n);s.insertBefore(f,o)}h+=_.size}while(o)o=a(o)}function qr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Rn(t,"gutterChanged",t)}function Yr(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+Zn(t)+"px"}function Qr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Pi(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,s=i+"px",o=0;ou.clientWidth,f=u.scrollHeight>u.clientHeight;if(r&&p||s&&f){if(s&&y&&l)t:for(var d=e.target,g=a.view;d!=u;d=d.parentNode)for(var m=0;m=0&&he(t,i.to())<=0)return n}return-1};var us=function(t,e){this.anchor=t,this.head=e};function hs(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return he(t.from(),e.from())})),n=V(e,r);for(var s=1;s0:l>=0){var u=fe(a.from(),o.from()),h=pe(a.to(),o.to()),c=a.empty()?o.from()==o.head:a.from()==a.head;s<=n&&--n,e.splice(--s,2,new us(c?h:u,c?u:h))}}return new ls(e,n)}function cs(t,e){return new ls([new us(t,e||t)],0)}function _s(t){return t.text?ue(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function ps(t,e){if(he(t,e.from)<0)return t;if(he(t,e.to)<=0)return _s(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=_s(e).ch-e.to.ch),ue(n,i)}function fs(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,f-1),t.insert(a.line+1,m)}Rn(t,"change",t,e)}function ws(t,e,n){function i(t,r,s){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Es(t,e,n,i){var r=t.history;r.undone.length=0;var s,o,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(s=Ls(r,r.lastOp==i)))o=tt(s.changes),0==he(e.from,e.to)&&0==he(e.from,o.to)?o.to=_s(e):s.changes.push(Ss(t,e));else{var l=tt(r.done);l&&l.ranges||Ms(t.sel,r.done),s={changes:[Ss(t,e)],generation:r.generation},r.done.push(s);while(r.done.length>r.undoDepth)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,o||xt(t,"historyAdded")}function As(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Ns(t,e,n,i){var r=t.history,s=i&&i.origin;n==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||As(t,s,tt(r.done),e))?r.done[r.done.length-1]=e:Ms(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=n,i&&!1!==i.clearRedo&&Os(r.undone)}function Ms(t,e){var n=tt(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Rs(t,e,n,i){var r=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[s]=n.markedSpans),++s}))}function Ds(t){if(!t)return null;for(var e,n=0;n-1&&(tt(a)[c]=u[c],delete u[c])}}}return i}function Is(t,e,n,i){if(i){var r=t.anchor;if(n){var s=he(e,r)<0;s!=he(n,r)<0?(r=e,e=n):s!=he(e,n)<0&&(e=n)}return new us(r,e)}return new us(n||e,e)}function js(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Vs(t,new ls([Is(t.sel.primary(),e,n,r)],0),i)}function Fs(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),s=0;s=e.ch:a.to>e.ch))){if(r&&(xt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),_=void 0;if((i<0?h:u)&&(c=Zs(t,c,-i,c&&c.line==e.line?s:null)),c&&c.line==e.line&&(_=he(c,n))&&(i<0?_<0:_>0))return Ys(t,c,e,i,r)}var p=l.find(i<0?-1:1);return(i<0?u:h)&&(p=Zs(t,p,i,p.line==e.line?s:null)),p?Ys(t,p,e,i,r):null}}return e}function Qs(t,e,n,i,r){var s=i||1,o=Ys(t,e,n,s,r)||!r&&Ys(t,e,n,s,!0)||Ys(t,e,n,-s,r)||!r&&Ys(t,e,n,-s,!0);return o||(t.cantEdit=!0,ue(t.first,0))}function Zs(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?ge(t,ue(e.line-1)):null:n>0&&e.ch==(i||ee(t,e.line)).text.length?e.line=0;--r)no(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else no(t,e)}}function no(t,e){if(1!=e.text.length||""!=e.text[0]||0!=he(e.from,e.to)){var n=fs(t,e);Es(t,e,n,t.cm?t.cm.curOp.id:NaN),so(t,e,n,Ue(t,e));var i=[];ws(t,(function(t,n){n||-1!=V(i,t.history)||(ho(t.history,e),i.push(t.history)),so(t,e,null,Ue(t,e))}))}}function io(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,u=0;u=0;--p){var f=_(p);if(f)return f.v}}}}function ro(t,e){if(0!=e&&(t.first+=e,t.sel=new ls(et(t.sel.ranges,(function(t){return new us(ue(t.anchor.line+e,t.anchor.ch),ue(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Bi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lines&&(e={from:e.from,to:ue(s,ee(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ne(t,e.from,e.to),n||(n=fs(t,e)),t.cm?oo(t.cm,e,i):bs(t,e,i),Gs(t,n,$),t.cantEdit&&Qs(t,ue(t.firstLine(),0))&&(t.cantEdit=!1)}}function oo(t,e,n){var i=t.doc,r=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=se(nn(ee(i,s.line))),i.iter(l,o.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&Ct(t),bs(i,e,n,zi(t)),t.options.lineWrapping||(i.iter(l,s.line+e.text.length,(function(t){var e=cn(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),Me(i,s.line),jr(t,400);var u=e.text.length-(o.line-s.line)-1;e.full?Bi(t):s.line!=o.line||1!=e.text.length||ys(t.doc,e)?Bi(t,s.line,o.line+1,u):Hi(t,s.line,"text");var h=Tt(t,"changes"),c=Tt(t,"change");if(c||h){var _={from:s,to:o,text:e.text,removed:e.removed,origin:e.origin};c&&Rn(t,"change",t,_),h&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(_)}t.display.selForContextMenu=null}function ao(t,e,n,i,r){var s;i||(i=n),he(i,n)<0&&(s=[i,n],n=s[0],i=s[1]),"string"==typeof e&&(e=t.splitLines(e)),eo(t,{from:n,to:i,text:e,origin:r})}function lo(t,e,n,i){n1||!(this.children[0]instanceof _o))){var a=[];this.collapse(a),this.children=[new _o(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=r.lines.length%25+25,a=o;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=N("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(en(t,e.line,e,n,s)||e.line!=n.line&&en(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pe()}s.addToHistory&&Es(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,u=t.cm;if(t.iter(l,n.line+1,(function(i){u&&s.collapsed&&!u.options.lineWrapping&&nn(i)==u.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&re(i,0),Fe(i,new ze(s,l==e.line?e.ch:null,l==n.line?n.ch:null),t.cm&&t.cm.curOp),++l})),s.collapsed&&t.iter(e.line,n.line+1,(function(e){ln(t,e)&&re(e,0)})),s.clearOnEnter&&yt(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(We(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++vo,s.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),s.collapsed)Bi(u,e.line,n.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var h=e.line;h<=n.line;h++)Hi(u,h,"text");s.atomic&&$s(u.doc),Rn(u,"markerAdded",u,s)}return s}yo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Or(t),Tt(this,"clear")){var n=this.find();n&&Rn(this,"clear",n.from,n.to)}for(var i=null,r=null,s=0;st.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Bi(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&$s(t.doc)),t&&Rn(t,"markerCleared",t,this,i,r),e&&Lr(t),this.parent&&this.parent.clear()}},yo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)eo(this,i[l]);a?Ks(this,a):this.cm&&cr(this.cm)})),undo:Ir((function(){io(this,"undo")})),redo:Ir((function(){io(this,"redo")})),undoSelection:Ir((function(){io(this,"undo",!0)})),redoSelection:Ir((function(){io(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,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=ge(this,t),e=ge(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=s,++n})),ge(this,ue(n,e))},indexFromPos:function(t){t=ge(this,t);var e=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 c=t.dataTransfer.getData("Text");if(c){var _;if(e.state.draggingText&&!e.state.draggingText.copy&&(_=e.listSelections()),Gs(e.doc,cs(n,n)),_)for(var p=0;p<_.length;++p)ao(e.doc,"",_[p].anchor,_[p].head,"drag");e.replaceSelection(c,"around","paste"),e.display.input.focus()}}catch(f){}}}}function Ao(t,e){if(o&&(!t.state.draggingText||+new Date-Lo<100))At(e);else if(!kt(t,e)&&!$n(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!p)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),_&&n.parentNode.removeChild(n)}}function No(t,e){var n=ji(t,e);if(n){var i=document.createDocumentFragment();qi(t,n,i),t.display.dragCursor||(t.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),E(t.display.dragCursor,i)}}function Mo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Ro(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],i=0;i=0;e--)ao(t.doc,"",i[e].from,i[e].to,"+delete");cr(t)}))}function Qo(t,e,n){var i=ct(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Zo(t,e,n){var i=Qo(t,e.ch,n);return null==i?null:new ue(e.line,i,n<0?"after":"before")}function Jo(t,e,n,i,r){if(t){"rtl"==e.doc.direction&&(r=-r);var s=mt(n,e.doc.direction);if(s){var o,a=r<0?tt(s):s[0],l=r<0==(1==a.level),u=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var h=oi(e,n);o=r<0?n.text.length-1:0;var c=ai(e,h,o).top;o=_t((function(t){return ai(e,h,t).top==c}),r<0==(1==a.level)?a.from:a.to-1,o),"before"==u&&(o=Qo(n,o,1))}else o=r<0?a.to:a.from;return new ue(i,o,u)}}return new ue(i,r<0?n.text.length:0,r<0?"before":"after")}function ta(t,e,n,i){var r=mt(e,t.doc.direction);if(!r)return Zo(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var s=dt(r,n.ch,n.sticky),o=r[s];if("ltr"==t.doc.direction&&o.level%2==0&&(i>0?o.to>n.ch:o.from=o.from&&_>=h.begin)){var p=c?"before":"after";return new ue(n.line,_,p)}}var f=function(t,e,i){for(var s=function(t,e){return e?new ue(n.line,l(t,1),"before"):new ue(n.line,t,"after")};t>=0&&t0==(1!=o.level),u=a?i.begin:l(i.end,-1);if(o.from<=u&&u0?h.end:l(h.begin,-1);return null==g||i>0&&g==e.text.length||(d=f(i>0?0:r.length-1,i,u(g)),!d)?null:d}Ho.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"},Ho.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"},Ho.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ho.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"]},Ho["default"]=y?Ho.macDefault:Ho.pcDefault;var ea={selectAll:Js,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),$)},killLine:function(t){return Yo(t,(function(e){if(e.empty()){var n=ee(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new ue(r.line,r.ch+1),t.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),ue(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=ee(t.doc,r.line-1).text;o&&(r=new ue(r.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ue(r.line-1,o.length-1),r,"+transpose"))}n.push(new us(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Wr(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 i=0;i-1&&(he((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(he(r.to(),e)>0||e.xRel<0)?Sa(t,i,e,s):La(t,i,e,s)}function Sa(t,e,n,i){var r=t.display,s=!1,u=Pr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:tr(t)),wt(r.wrapper.ownerDocument,"mouseup",u),wt(r.wrapper.ownerDocument,"mousemove",h),wt(r.scroller,"dragstart",c),wt(r.scroller,"drop",u),s||(Ot(e),i.addNew||js(t.doc,n,null,null,i.extend),l&&!p||o&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),h=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},c=function(){return s=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=u,u.copy=!i.moveOnDrag,yt(r.wrapper.ownerDocument,"mouseup",u),yt(r.wrapper.ownerDocument,"mousemove",h),yt(r.scroller,"dragstart",c),yt(r.scroller,"drop",u),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Oa(t,e,n){if("char"==n)return new us(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new us(ue(e.line,0),ge(t.doc,ue(e.line+1,0)));var i=n(t,e);return new us(i.from,i.to)}function La(t,e,n,i){o&&tr(t);var r=t.display,s=t.doc;Ot(e);var a,l,u=s.sel,h=u.ranges;if(i.addNew&&!i.extend?(l=s.sel.contains(n),a=l>-1?h[l]:new us(n,n)):(a=s.sel.primary(),l=s.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new us(n,n)),n=ji(t,e,!0,!0),l=-1;else{var c=Oa(t,n,i.unit);a=i.extend?Is(a,c.anchor,c.head,i.extend):c}i.addNew?-1==l?(l=h.length,Vs(s,hs(t,h.concat([a]),l),{scroll:!1,origin:"*mouse"})):h.length>1&&h[l].empty()&&"char"==i.unit&&!i.extend?(Vs(s,hs(t,h.slice(0,l).concat(h.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=s.sel):Bs(s,l,a,q):(l=0,Vs(s,new ls([a],0),q),u=s.sel);var _=n;function p(e){if(0!=he(_,e))if(_=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,h=U(ee(s,n.line).text,n.ch,o),c=U(ee(s,e.line).text,e.ch,o),p=Math.min(h,c),f=Math.max(h,c),d=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));d<=g;d++){var m=ee(s,d).text,v=Q(m,p,o);p==f?r.push(new us(ue(d,v),ue(d,v))):m.length>v&&r.push(new us(ue(d,v),ue(d,Q(m,f,o))))}r.length||r.push(new us(n,n)),Vs(s,hs(t,u.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,b=a,w=Oa(t,e,i.unit),x=b.anchor;he(w.anchor,x)>0?(y=w.head,x=fe(b.from(),w.anchor)):(y=w.anchor,x=pe(b.to(),w.head));var k=u.ranges.slice(0);k[l]=Ea(t,new us(ge(s,x),y)),Vs(s,hs(t,k,l),q)}}var f=r.wrapper.getBoundingClientRect(),d=0;function g(e){var n=++d,o=ji(t,e,!0,"rectangle"==i.unit);if(o)if(0!=he(o,_)){t.curOp.focus=R(I(t)),p(o);var a=sr(r,s);(o.line>=a.to||o.linef.bottom?20:0;l&&setTimeout(Pr(t,(function(){d==n&&(r.scroller.scrollTop+=l,g(e))})),50)}}function m(e){t.state.selectingText=!1,d=1/0,e&&(Ot(e),r.input.focus()),wt(r.wrapper.ownerDocument,"mousemove",v),wt(r.wrapper.ownerDocument,"mouseup",y),s.history.lastSelOrigin=null}var v=Pr(t,(function(t){0!==t.buttons&&Mt(t)?g(t):m(t)})),y=Pr(t,m);t.state.selectingText=y,yt(r.wrapper.ownerDocument,"mousemove",v),yt(r.wrapper.ownerDocument,"mouseup",y)}function Ea(t,e){var n=e.anchor,i=e.head,r=ee(t.doc,n.line);if(0==he(n,i)&&n.sticky==i.sticky)return e;var s=mt(r);if(!s)return e;var o=dt(s,n.ch,n.sticky),a=s[o];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,u=o+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==s.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var h=dt(s,i.ch,i.sticky),c=h-o||(i.ch-n.ch)*(1==a.level?-1:1);l=h==u-1||h==u?c<0:c>0}var _=s[u+(l?-1:0)],p=l==(1==_.level),f=p?_.from:_.to,d=p?"after":"before";return n.ch==f&&n.sticky==d?e:new us(new ue(n.line,f,d),i)}function Aa(t,e,n,i){var r,s;if(e.touches)r=e.touches[0].clientX,s=e.touches[0].clientY;else try{r=e.clientX,s=e.clientY}catch(_){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Ot(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!Tt(t,n))return Et(e);s-=a.top-o.viewOffset;for(var l=0;l=r){var h=oe(t.doc,s),c=t.display.gutterSpecs[l];return xt(t,n,t,h,c.className,e),Et(e)}}}function Na(t,e){return Aa(t,e,"gutterClick",!0)}function Ma(t,e){$n(t.display,e)||Ra(t,e)||kt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function Ra(t,e){return!!Tt(t,"gutterContextMenu")&&Aa(t,e,"gutterContextMenu",!1)}function Da(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gi(t)}ba.prototype.compare=function(t,e,n){return this.time+ya>t&&0==he(e,this.pos)&&n==this.button};var Wa={toString:function(){return"CodeMirror.Init"}},Pa={},za={};function Ia(t){var e=t.optionHandlers;function n(n,i,r,s){t.defaults[n]=i,r&&(e[n]=s?function(t,e,n){n!=Wa&&r(t,e,n)}:r)}t.defineOption=n,t.Init=Wa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,ms(t)}),!0),n("indentUnit",2,ms,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){vs(t),gi(t),Bi(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var s=t.text.indexOf(e,r);if(-1==s)break;r=s+e.length,n.push(ue(i,s))}i++}));for(var r=n.length-1;r>=0;r--)ao(t.doc,e,n[r],ue(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Wa&&t.refresh()})),n("specialCharPlaceholder",bn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"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("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Da(t),es(t)}),!0),n("keyMap","default",(function(t,e,n){var i=qo(e),r=n!=Wa&&qo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Fa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=Jr(e,t.options.lineNumbers),es(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Pi(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return xr(t)}),!0),n("scrollbarStyle","native",(function(t){Tr(t),xr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Jr(t.options.gutters,e),es(t)}),!0),n("firstLineNumber",1,es,!0),n("lineNumberFormatter",(function(t){return t}),es,!0),n("showCursorWhenSelecting",!1,Xi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(nr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,ja),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xi,!0),n("singleCursorHeightPerLine",!0,Xi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,vs,!0),n("addModeClass",!1,vs,!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,vs,!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),n("phrases",null)}function ja(t,e,n){var i=n&&n!=Wa;if(!e!=!i){var r=t.display.dragFunctions,s=e?yt:wt;s(t.display.scroller,"dragstart",r.start),s(t.display.scroller,"dragenter",r.enter),s(t.display.scroller,"dragover",r.over),s(t.display.scroller,"dragleave",r.leave),s(t.display.scroller,"drop",r.drop)}}function Fa(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(O(t.display.wrapper,"CodeMirror-wrap"),_n(t)),Ii(t),Bi(t),gi(t),setTimeout((function(){return xr(t)}),100)}function Ba(t,e){var n=this;if(!(this instanceof Ba))return new Ba(t,e);this.options=e=e?H(e):{},H(Pa,e,!1);var i=e.value;"string"==typeof i?i=new Oo(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Ba.inputStyles[e.inputStyle](this),s=this.display=new ns(t,i,r,e);for(var u in s.wrapper.CodeMirror=this,Da(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tr(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 K,keySeq:null,specialChars:null},e.autofocus&&!v&&s.input.focus(),o&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ha(this),Wo(),Or(this),this.curOp.forceUpdate=!0,xs(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&er(n)}),20):nr(this),za)za.hasOwnProperty(u)&&za[u](this,e[u],Wa);Zr(this),e.finishInit&&e.finishInit(this);for(var h=0;h400}yt(e.scroller,"touchstart",(function(r){if(!kt(t,r)&&!s(r)&&!Na(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),yt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),yt(e.scroller,"touchend",(function(n){var i=e.activeTouch;if(i&&!$n(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,o=t.coordsChar(e.activeTouch,"page");s=!i.prev||l(i,i.prev)?new us(o,o):!i.prev.prev||l(i,i.prev.prev)?t.findWordAt(o):new us(ue(o.line,0),ge(t.doc,ue(o.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),Ot(n)}r()})),yt(e.scroller,"touchcancel",r),yt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(gr(t,e.scroller.scrollTop),vr(t,e.scroller.scrollLeft,!0),xt(t,"scroll",t))})),yt(e.scroller,"mousewheel",(function(e){return as(t,e)})),yt(e.scroller,"DOMMouseScroll",(function(e){return as(t,e)})),yt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){kt(t,e)||At(e)},over:function(e){kt(t,e)||(No(t,e),At(e))},start:function(e){return Ao(t,e)},drop:Pr(t,Eo),leave:function(e){kt(t,e)||Mo(t)}};var u=e.input.getField();yt(u,"keyup",(function(e){return da.call(t,e)})),yt(u,"keydown",Pr(t,pa)),yt(u,"keypress",Pr(t,ga)),yt(u,"focus",(function(e){return er(t,e)})),yt(u,"blur",(function(e){return nr(t,e)}))}Ba.defaults=Pa,Ba.optionHandlers=za;var Ua=[];function Ka(t,e,n,i){var r,s=t.doc;null==n&&(n="add"),"smart"==n&&(s.mode.indent?r=ke(t,e).state:n="prev");var o=t.options.tabSize,a=ee(s,e),l=U(a.text,null,o);a.stateAfter&&(a.stateAfter=null);var u,h=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&(u=s.mode.indent(r,a.text.slice(h.length),a.text),u==X||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>s.first?U(ee(s,e-1).text,null,o):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var c="",_=0;if(t.options.indentWithTabs)for(var p=Math.floor(u/o);p;--p)_+=o,c+="\t";if(_o,l=It(e),u=null;if(a&&i.ranges.length>1)if(Va&&Va.text.join("\n")==e){if(i.ranges.length%Va.text.length==0){u=[];for(var h=0;h=0;_--){var p=i.ranges[_],f=p.from(),d=p.to();p.empty()&&(n&&n>0?f=ue(f.line,f.ch-n):t.state.overwrite&&!a?d=ue(d.line,Math.min(ee(s,d.line).text.length,d.ch+tt(l).length)):a&&Va&&Va.lineWise&&Va.text.join("\n")==l.join("\n")&&(f=d=ue(f.line,0)));var g={from:f,to:d,text:u?u[_%u.length]:l,origin:r||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};eo(t.doc,g),Rn(t,"inputRead",t,g)}e&&!a&&qa(t,e),cr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=c),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function $a(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Wr(e,(function(){return Xa(e,n,0,null,"paste")})),!0}function qa(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var s=t.getModeAt(r.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Ka(t,r.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(ee(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ka(t,r.head.line,"smart"));o&&Rn(t,"electricInput",t,r.head.line)}}}function Ya(t){for(var e=[],n=[],i=0;in&&(Ka(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&cr(this));else{var s=r.from(),o=r.to(),a=Math.max(n,s.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l0&&Bs(this.doc,i,new us(s,u[i].to()),$)}}})),getTokenAt:function(t,e){return Le(this,t,e)},getLineTokens:function(t,e){return Le(this,ue(t),e,!0)},getTokenTypeAt:function(t){t=ge(this.doc,t);var e,n=xe(this,ee(this.doc,t.line)),i=0,r=(n.length-1)/2,s=t.ch;if(0==s)e=n[2];else for(;;){var o=i+r>>1;if((o?n[2*o-1]:0)>=s)r=o;else{if(!(n[2*o+1]s&&(t=s,r=!0),i=ee(this.doc,t)}else i=t;return bi(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-hn(i):0)},defaultTextHeight:function(){return Ri(this.display)},defaultCharWidth:function(){return Di(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var s=this.display;t=ki(this,ge(this.doc,t));var o=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),s.sizer.appendChild(e),"over"==i)o=t.top;else if("above"==i||"near"==i){var l=Math.max(s.wrapper.clientHeight,this.doc.height),u=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),a+e.offsetWidth>u&&(a=u-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(a=s.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(s.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&lr(this,{left:a,top:o,right:a+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:zr(pa),triggerOnKeyPress:zr(ga),triggerOnKeyUp:da,triggerOnMouseDown:zr(xa),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:zr((function(t){qa(this,t)})),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var s=ge(this.doc,t),o=0;o0&&a(n.charAt(i-1)))--i;while(r.5||this.options.lineWrapping)&&Ii(this),xt(this,"refresh",this)})),swapDoc:zr((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),xs(this,t),gi(this),this.display.input.reset(),_r(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Rn(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[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}},St(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,s){t.registerHelper(e,i,s),n[e]._global.push({pred:r,val:s})}}function tl(t,e,n,i,r){var s=e,o=n,a=ee(t,e.line),l=r&&"rtl"==t.direction?-n:n;function u(){var n=e.line+l;return!(n=t.first+t.size)&&(e=new ue(n,e.ch,e.sticky),a=ee(t,n))}function h(s){var o;if("codepoint"==i){var h=a.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(h))o=null;else{var c=n>0?h>=55296&&h<56320:h>=56320&&h<57343;o=new ue(e.line,Math.max(0,Math.min(a.text.length,e.ch+n*(c?2:1))),-n)}}else o=r?ta(t.cm,a,e,n):Zo(a,e,n);if(null==o){if(s||!u())return!1;e=Jo(r,t.cm,a,e.line,l)}else e=o;return!0}if("char"==i||"codepoint"==i)h();else if("column"==i)h(!0);else if("word"==i||"group"==i)for(var c=null,_="group"==i,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(n<0&&!h(!f))break;var d=a.text.charAt(e.ch)||"\n",g=at(d,p)?"w":_&&"\n"==d?"n":!_||/\s/.test(d)?null:"p";if(!_||f||g||(g="s"),c&&c!=g){n<0&&(n=1,h(),e.sticky="after");break}if(g&&(c=g),n>0&&!h(!f))break}var m=Qs(t,e,s,o,!0);return ce(s,m)&&(m.hitSide=!0),m}function el(t,e,n,i){var r,s,o=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,F(t).innerHeight||o(t).documentElement.clientHeight),u=Math.max(l-.5*Ri(t.display),3);r=(n>0?e.bottom:e.top)+n*u}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;;){if(s=Si(t,a,r),!s.outside)break;if(n<0?r<=0:r>=o.height){s.hitSide=!0;break}r+=5*n}return s}var nl=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function il(t,e){var n=si(t,e.line);if(!n||n.hidden)return null;var i=ee(t.doc,e.line),r=ni(n,i,e.line),s=mt(i,t.doc.direction),o="left";if(s){var a=dt(s,e.ch);o=a%2?"right":"left"}var l=hi(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function rl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function sl(t,e){return e&&(t.bad=!0),t}function ol(t,e,n,i,r){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function u(t){return function(e){return e.id==t}}function h(){o&&(s+=a,l&&(s+=a),o=l=!1)}function c(t){t&&(h(),s+=t)}function _(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void c(n);var s,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(ue(i,0),ue(r+1,0),u(+p));return void(f.length&&(s=f[0].find(0))&&c(ne(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&h();for(var g=0;g=e.display.viewTo||s.line=e.display.viewFrom&&il(e,r)||{node:l[0].measure.map[2],offset:0},h=s.linei.firstLine()&&(o=ue(o.line-1,ee(i.doc,o.line-1).length)),a.ch==ee(i.doc,a.line).text.length&&a.liner.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Fi(i,o.line))?(e=se(r.view[0].line),n=r.view[0].node):(e=se(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,u,h=Fi(i,a.line);if(h==r.view.length-1?(l=r.viewTo-1,u=r.lineDiv.lastChild):(l=se(r.view[h+1].line)-1,u=r.view[h+1].node.previousSibling),!n)return!1;var c=i.doc.splitLines(ol(i,n,u,e,l)),_=ne(i.doc,ue(e,0),ue(l,ee(i.doc,l).text.length));while(c.length>1&&_.length>1)if(tt(c)==tt(_))c.pop(),_.pop(),l--;else{if(c[0]!=_[0])break;c.shift(),_.shift(),e++}var p=0,f=0,d=c[0],g=_[0],m=Math.min(d.length,g.length);while(po.ch&&v.charCodeAt(v.length-f-1)==y.charCodeAt(y.length-f-1))p--,f++;c[c.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),c[0]=c[0].slice(p).replace(/\u200b+$/,"");var w=ue(e,p),x=ue(l,_.length?tt(_).length-f:0);return c.length>1||c[0]||he(w,x)?(ao(i.doc,c,w,x,"+input"),!0):void 0},nl.prototype.ensurePolled=function(){this.forceCompositionEnd()},nl.prototype.reset=function(){this.forceCompositionEnd()},nl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},nl.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))},nl.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Wr(this.cm,(function(){return Bi(t.cm)}))},nl.prototype.setUneditable=function(t){t.contentEditable="false"},nl.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Pr(this.cm,Xa)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},nl.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},nl.prototype.onContextMenu=function(){},nl.prototype.resetPosition=function(){},nl.prototype.needsContentAttribute=!0;var ul=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function hl(t,e){if(e=e?H(e):{},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=R(j(t));e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(yt(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var s=t.form;r=s.submit;try{var o=s.submit=function(){i(),s.submit=r,s.submit(),s.submit=o}}catch(l){}}e.finishInit=function(n){n.save=i,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,i(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(wt(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Ba((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a}function cl(t){t.off=wt,t.on=yt,t.wheelEventPixels=os,t.Doc=Oo,t.splitLines=It,t.countColumn=U,t.findColumn=Q,t.isWordChar=ot,t.Pass=X,t.signal=xt,t.Line=pn,t.changeEnd=_s,t.scrollbarModel=Cr,t.Pos=ue,t.cmpPos=he,t.modes=Ut,t.mimeModes=Kt,t.resolveMode=Xt,t.getMode=$t,t.modeExtensions=qt,t.extendMode=Yt,t.copyState=Qt,t.startState=Jt,t.innerMode=Zt,t.commands=ea,t.keyMap=Ho,t.keyName=$o,t.isModifierKey=Go,t.lookupKey=Vo,t.normalizeKeyMap=Ko,t.StringStream=te,t.SharedTextMarker=wo,t.TextMarker=yo,t.LineWidget=fo,t.e_preventDefault=Ot,t.e_stopPropagation=Lt,t.e_stop=At,t.addClass=D,t.contains=M,t.rmClass=O,t.keyNames=Io}ul.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function s(t){if(!kt(i,t)){if(i.somethingSelected())Ga({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Ya(i);Ga({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,$):(n.prevInput="",r.value=e.text.join("\n"),P(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),yt(r,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),yt(r,"paste",(function(t){kt(i,t)||$a(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),yt(r,"cut",s),yt(r,"copy",s),yt(t.scroller,"paste",(function(e){if(!$n(t,e)&&!kt(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,r.dispatchEvent(s)}})),yt(t.lineSpace,"selectstart",(function(e){$n(t,e)||Ot(e)})),yt(r,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),yt(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ul.prototype.createField=function(t){this.wrapper=Za(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Qa(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},ul.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},ul.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=$i(t);if(t.options.moveInputWithCursor){var r=ki(t,n.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-s.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-s.left))}return i},ul.prototype.showSelection=function(t){var e=this.cm,n=e.display;E(n.cursorDiv,t.cursors),E(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},ul.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&P(this.textarea),o&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null));this.resetting=!1}},ul.prototype.getField=function(){return this.textarea},ul.prototype.supportsTouch=function(){return!1},ul.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R(j(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},ul.prototype.blur=function(){this.textarea.blur()},ul.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ul.prototype.receivedFocus=function(){this.slowPoll()},ul.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},ul.prototype.fastPoll=function(){var t=!1,e=this;function n(){var i=e.poll();i||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},ul.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||jt(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=r.charCodeAt(0);if(8203!=s||i||(i="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}var l=0,u=Math.min(i.length,r.length);while(l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ul.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ul.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},ul.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=ji(n,t),u=i.scroller.scrollTop;if(s&&!_){var h=n.options.resetSelectionOnContextMenu;h&&-1==n.doc.sel.contains(s)&&Pr(n,Vs)(n.doc,cs(s),$);var c,p=r.style.cssText,f=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=r.ownerDocument.defaultView.scrollY),i.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,c),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),o&&a>=9&&m(),C){At(t);var g=function(){wt(window,"mouseup",g),setTimeout(v,20)};yt(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=r.selectionStart){var t=n.somethingSelected(),s="​"+(t?r.value:"");r.value="⇚",r.value=s,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=s.length,i.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,o&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=r.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Pr(n,Js)(n):t++<10?i.detectingSelectAll=setTimeout(s,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(s,200)}}},ul.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},ul.prototype.setUneditable=function(){},ul.prototype.needsContentAttribute=!1,Ia(Ba),Ja(Ba);var _l="iter insert remove copy getEditor constructor".split(" ");for(var pl in Oo.prototype)Oo.prototype.hasOwnProperty(pl)&&V(_l,pl)<0&&(Ba.prototype[pl]=function(t){return function(){return t.apply(this.doc,arguments)}}(Oo.prototype[pl]));return St(Oo),Ba.inputStyles={textarea:ul,contenteditable:nl},Ba.defineMode=function(t){Ba.defaults.mode||"null"==t||(Ba.defaults.mode=t),Vt.apply(this,arguments)},Ba.defineMIME=Gt,Ba.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ba.defineMIME("text/plain","null"),Ba.defineExtension=function(t,e){Ba.prototype[t]=e},Ba.defineDocExtension=function(t,e){Oo.prototype[t]=e},Ba.fromTextArea=hl,cl(Ba),Ba.version="5.65.21",Ba}))},a16b:function(t,e,n){var i,r;(function(){var n;(function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n},n.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty())this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){var i=this.__lines.length-2;while(i>=0){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},,,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(t,e){var n,r={};for(n in t=i(t),t)n!==e&&(r[n]=t[n]);if(e&&t[e])for(n in t[e])r[n]=t[e][n];return r}function i(t){var e,n={};for(e in t){var i=e.replace(/-/g,"_");n[i]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"===typeof n?null!==n&&"function"===typeof n.concat&&(i=n.concat()):"string"===typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t],i=void 0===n?!!e:!!n;return i},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"===typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},e.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=i,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},,,,,function(t){function e(t,e){t="string"===typeof t?t:t.source,e="string"===typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;var n=this.__directive_pattern.exec(t);while(n)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},,function(t,e,n){var i=n(16).Beautifier,r=n(17).Options;function s(t,e){var n=new i(t,e);return n.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new r}},function(t,e,n){var i=n(17).Options,r=n(2).Output,s=n(8).InputScanner,o=n(13).Directives,a=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,h=/\s/,c=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(t,e){this._source_text=t||"",this._options=new i(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}f.prototype.eatString=function(t){var e="";this._ch=this._input.next();while(this._ch){if(e+=this._ch,"\\"===this._ch)e+=this._input.next();else if(-1!==t.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return e},f.prototype.eatWhitespace=function(t){var e=h.test(this._input.peek()),n=0;while(h.test(this._input.peek()))this._ch=this._input.next(),t&&"\n"===this._ch&&(0===n||n0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===e&&(e="\n",t&&l.test(t||"")&&(e=t.match(l)[0])),t=t.replace(u,"\n");var n=t.match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new s(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;var i,o,f,d=0,g=!1,m=!1,v=!1,y=!1,b=!1,w=this._ch,x=!1;while(1){if(i=this._input.read(c),o=""!==i,f=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,!this._ch)break;if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var k=this._input.read(_),C=a.get_directives(k);C&&"start"===C.ignore&&(k+=a.readIgnored(this._input)),this.print_string(k),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(o),this.print_string(this._ch);var T=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);T.match(/[ :]$/)&&(T=this.eatString(": ").replace(/\s+$/,""),this.print_string(T),this._output.space_before_token=!0),0===d&&-1!==T.indexOf(":")&&(m=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(o),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===d&&-1!==S.indexOf(":")?(m=!0,this.indent()):S in this.NESTED_AT_RULE?(this._nestedLevel+=1,S in this.CONDITIONAL_GROUP_RULE&&(v=!0)):0!==d||m||(y=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(o),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)m&&(m=!1,this.outdent()),y=!1,v?(v=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===f?this._output.space_before_token=!1:","!==f&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===f&&this._output.trim(!0),m&&(this.outdent(),m=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var O=0;O"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||m||0!==d)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(o),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),h.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var A='"'===f||"'"===f;this.preserveSingleSpace(A||o),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&h.test(this._ch)&&(this._ch=""))}var N=this._output.get_code(e);return N},t.exports.Beautifier=f},function(t,e,n){var i=n(6).Options;function r(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;rn&&(n=t.line_indent_level));var i={mode:e,parent:t,last_token:t?t.last_token:new r(h.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return i},O.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(b.BlockStatement);var n=new a(t,this._options);return this._tokens=n.tokenize(),t},O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t,e=this._reset(this._source_text),n=this._options.eol;"auto"===this._options.eol&&(n="\n",e&&s.lineBreak.test(e||"")&&(n=e.match(s.lineBreak)[0]));var i=this._tokens.next();while(i)this.handle_token(i),this._last_last_text=this._flags.last_token.text,this._flags.last_token=i,i=this._tokens.next();return t=this._output.get_code(n),t},O.prototype.handle_token=function(t,e){t.type===h.START_EXPR?this.handle_start_expr(t):t.type===h.END_EXPR?this.handle_end_expr(t):t.type===h.START_BLOCK?this.handle_start_block(t):t.type===h.END_BLOCK?this.handle_end_block(t):t.type===h.WORD||t.type===h.RESERVED?this.handle_word(t):t.type===h.SEMICOLON?this.handle_semicolon(t):t.type===h.STRING?this.handle_string(t):t.type===h.EQUALS?this.handle_equals(t):t.type===h.OPERATOR?this.handle_operator(t):t.type===h.COMMA?this.handle_comma(t):t.type===h.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===h.COMMENT?this.handle_comment(t,e):t.type===h.DOT?this.handle_dot(t):t.type===h.EOF?this.handle_eof(t):(t.type,h.UNKNOWN,this.handle_unknown(t,e))},O.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,i=this._options.keep_array_indentation&&k(this._flags.mode);if(t.comments_before){var r=t.comments_before.next();while(r)this.handle_whitespace_and_comments(r,e),this.handle_token(r,e),r=t.comments_before.next()}if(i)for(var s=0;s0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var o=1;o0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===b.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.start_of_object_property=function(){return this._flags.parent.mode===b.ObjectLiteral&&this._flags.mode===b.Statement&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"]))},O.prototype.start_of_statement=function(t){var e=!1;return e=e||d(this._flags.last_token,["var","let","const"])&&t.type===h.WORD,e=e||f(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===b.ObjectLiteral&&this._flags.mode===b.Statement)&&d(this._flags.last_token,L)&&!t.newlines,e=e||f(this._flags.last_token,"else")&&!(f(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===h.END_EXPR&&(this._previous_flags.mode===b.ForInitializer||this._previous_flags.mode===b.Conditional),e=e||this._flags.last_token.type===h.WORD&&this._flags.mode===b.BlockStatement&&!this._flags.in_case&&!("--"===t.text||"++"===t.text)&&"function"!==this._last_last_text&&t.type!==h.WORD&&t.type!==h.RESERVED,e=e||this._flags.mode===b.ObjectLiteral&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"])),!!e&&(this.set_mode(b.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,d(t,["do","for","if","while"])),!0)},O.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=b.Expression;if("["===t.text){if(this._flags.last_token.type===h.WORD||")"===this._flags.last_token.text)return d(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));e=b.ArrayLiteral,k(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[h.START_EXPR,h.END_EXPR,h.WORD,h.OPERATOR,h.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===h.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,e=b.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=b.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===t.whitespace_before?this._output.space_before_token=!1:(c(this._flags.last_token.text,l)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===h.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var i=this._tokens.peek(-4);d(n,["async","function"])||"*"===n.text&&d(i,["async","function"])?this._output.space_before_token=!0:this._flags.mode===b.ObjectLiteral?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==i.text&&","!==i.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===h.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===b.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===h.START_BLOCK?this.print_newline():this._flags.last_token.type!==h.END_EXPR&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==h.COMMA||this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},O.prototype.handle_end_expr=function(t){while(this._flags.mode===b.Statement)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,"]"===t.text&&k(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==h.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(t),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===b.Conditional&&(this._previous_flags.mode=b.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},O.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===h.END_EXPR?(this.set_mode(b.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(b.BlockStatement):n&&(c(n.text,[":",","])&&c(e.type,[h.STRING,h.WORD,h.RESERVED])||c(e.text,["get","set","..."])&&c(n.type,[h.WORD,h.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(n.text,[":",","])?this.set_mode(b.BlockStatement):this.set_mode(b.ObjectLiteral):this._flags.last_token.type===h.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(b.BlockStatement):c(this._flags.last_token.type,[h.EQUALS,h.START_EXPR,h.COMMA,h.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(b.ObjectLiteral):this.set_mode(b.BlockStatement),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var i=!e.comments_before&&"}"===e.text,r=i&&"function"===this._flags.last_word&&this._flags.last_token.type===h.END_EXPR;if(this._options.brace_preserve_inline){var s=0,o=null;this._flags.inline_frame=!0;do{if(s+=1,o=this._tokens.peek(s-1),o.newlines){this._flags.inline_frame=!1;break}}while(o.type!==h.EOF&&(o.type!==h.END_BLOCK||o.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==h.OPERATOR&&(r||this._flags.last_token.type===h.EQUALS||d(this._flags.last_token,g)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!k(this._previous_flags.mode)||this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.COMMA||((this._flags.last_token.type===h.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==h.OPERATOR&&this._flags.last_token.type!==h.START_EXPR&&(c(this._flags.last_token.type,[h.START_BLOCK,h.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),i||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},O.prototype.handle_end_block=function(t){this.handle_whitespace_and_comments(t);while(this._flags.mode===b.Statement)this.restore_mode();var e=this._flags.last_token.type===h.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(k(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},O.prototype.handle_word=function(t){if(t.type===h.RESERVED)if(c(t.text,["set","get"])&&this._flags.mode!==b.ObjectLiteral)t.type=h.WORD;else if("import"===t.text&&c(this._tokens.peek().text,["(","."]))t.type=h.WORD;else if(c(t.text,["as","from"])&&!this._flags.import_block)t.type=h.WORD;else if(this._flags.mode===b.ObjectLiteral){var e=this._tokens.peek();":"===e.text&&(t.type=h.WORD)}if(this.start_of_statement(t)?d(this._flags.last_token,["var","let","const"])&&t.type===h.WORD&&(this._flags.declaration_statement=!0):!t.newlines||C(this._flags.mode)||this._flags.last_token.type===h.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===h.EQUALS||!this._options.preserve_newlines&&d(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(f(t,"while"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&f(t,"else"))this._flags.else_block=!0;else{while(this._flags.mode===b.Statement)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(t,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.EQUALS&&this._flags.last_token.type!==h.OPERATOR||this.start_of_object_property()||c(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===b.ObjectLiteral||this.allow_wrap_or_preserved_newline(t),f(t,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==h.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,L)||f(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===h.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!C(this._flags.mode)&&!k(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var n="NONE";if(this._flags.last_token.type===h.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":d(t,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&this._flags.mode===b.BlockStatement?n="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&C(this._flags.mode)?n="SPACE":this._flags.last_token.type===h.STRING?n="NEWLINE":this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===b.ObjectLiteral&&c(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===h.START_BLOCK?n=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===h.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),d(t,l)&&")"!==this._flags.last_token.text&&(n=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),d(t,["else","catch","finally"]))if((this._flags.last_token.type!==h.END_BLOCK||this._previous_flags.mode!==b.BlockStatement||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var i=this._output.current_line;"}"!==i.last()&&this.print_newline(),this._output.space_before_token=!0}else"NEWLINE"===n?d(this._flags.last_token,g)||"declare"===this._flags.last_token.text&&d(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==h.END_EXPR?this._flags.last_token.type===h.START_EXPR&&d(t,["var","let","const"])||":"===this._flags.last_token.text||(f(t,"if")&&f(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(t,l)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&k(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===n&&(this._output.space_before_token=!0);!t.previous||t.previous.type!==h.WORD&&t.previous.type!==h.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===h.RESERVED&&("do"===t.text?this._flags.do_block=!0:"if"===t.text?this._flags.if_block=!0:"import"===t.text?this._flags.import_block=!0:this._flags.import_block&&f(t,"from")&&(this._flags.import_block=!1))},O.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);var e=this._tokens.peek();while(this._flags.mode===b.Statement&&(!this._flags.if_block||!f(e,"else"))&&!this._flags.do_block)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},O.prototype.handle_string=function(t){(!t.text.startsWith("`")||0!==t.newlines||""!==t.whitespace_before||")"!==t.previous.text&&this._flags.last_token.type!==h.WORD)&&(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==h.END_EXPR||"]"!==t.previous.text&&")"!==t.previous.text||0!==t.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(t)},O.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},O.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(C(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===b.ObjectLiteral||this._flags.mode===b.Statement&&this._flags.parent.mode===b.ObjectLiteral?(this._flags.mode===b.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},O.prototype.handle_operator=function(t){var e="*"===t.text&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[h.START_BLOCK,h.COMMA,h.END_BLOCK,h.SEMICOLON])),n=c(t.text,["-","+"])&&(c(this._flags.last_token.type,[h.START_BLOCK,h.START_EXPR,h.EQUALS,h.OPERATOR])||c(this._flags.last_token.text,l)||","===this._flags.last_token.text);if(this.start_of_statement(t));else{var i=!e;this.handle_whitespace_and_comments(t,i)}if("*"!==t.text||this._flags.last_token.type!==h.DOT)if("::"!==t.text)if(c(t.text,["-","+"])&&this.start_of_object_property())this.print_token(t);else{if(this._flags.last_token.type===h.OPERATOR&&c(this._options.operator_position,y)&&this.allow_wrap_or_preserved_newline(t),":"===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==h.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var r=!0,s=!0,o=!1;if(":"===t.text?0===this._flags.ternary_depth?r=!1:(this._flags.ternary_depth-=1,o=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&c(t.text,u)){var a=":"===t.text,_=a&&o,p=a&&!o;switch(this._options.operator_position){case v.before_newline:return this._output.space_before_token=!p,this.print_token(t),a&&!_||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case v.after_newline:return this._output.space_before_token=!0,!a||_?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case v.preserve_newline:return p||this.allow_wrap_or_preserved_newline(t),r=!(this._output.just_added_newline()||p),this._output.space_before_token=r,this.print_token(t),void(this._output.space_before_token=!0)}}if(e){this.allow_wrap_or_preserved_newline(t),r=!1;var f=this._tokens.peek();s=f&&c(f.type,[h.WORD,h.RESERVED])}else if("..."===t.text)this.allow_wrap_or_preserved_newline(t),r=this._flags.last_token.type===h.START_BLOCK,s=!1;else if(c(t.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR||this.allow_wrap_or_preserved_newline(t),r=!1,s=!1,t.newlines&&("--"===t.text||"++"===t.text||"~"===t.text)){var m=d(this._flags.last_token,g)&&t.newlines;m&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(m,!0)}";"===this._flags.last_token.text&&C(this._flags.mode)&&(r=!0),this._flags.last_token.type===h.RESERVED?r=!0:this._flags.last_token.type===h.END_EXPR?r=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===h.OPERATOR&&(r=c(t.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(t.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==b.BlockStatement||this._flags.inline_frame)&&this._flags.mode!==b.Statement||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||r,this.print_token(t),this._output.space_before_token=s}else this.print_token(t);else this.print_token(t)},O.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&"end"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),"start"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):s.newline.test(t.text)||t.newlines?void this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),void(this._output.space_before_token=!0))},O.prototype.print_block_commment=function(t,e){var n,i=x(t.text),r=!1,s=!1,o=t.whitespace_before,a=o.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(i[0]),this.print_newline(!1,e),i.length>1){for(i=i.slice(1),r=T(i,"*"),s=S(i,o),r&&(this._flags.alignment=1),n=0;n0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n},n.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty())this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){var i=this.__lines.length-2;while(i>=0){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},function(t){function e(t,e,n,i){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=e},function(t,e){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",a="(?:"+o+"|["+n+r+"])",l="(?:"+o+"|["+i+r+s+"])*";e.identifier=new RegExp(a+l,"g"),e.identifierStart=new RegExp(a),e.identifierMatch=new RegExp("(?:"+o+"|["+i+r+s+"])+");e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")},function(t,e,n){var i=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function s(t){i.call(this,t,"js");var e=this.raw_options.brace_style||null;"expand-strict"===e?this.raw_options.brace_style="expand":"collapse-preserve-inline"===e?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var s=0;s>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),m=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";m=m.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),m="\\?\\.(?!\\d) "+m,m=m.replace(/ /g,"|");var v,y=new RegExp(m),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),w=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),x=new RegExp("^(?:"+w.join("|")+")$"),k=function(t,e){r.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new l(this._input),i=new u(this._input).read_options(this._options);this.__patterns={template:i,identifier:i.starting_with(a.identifier).matching(a.identifierMatch),number:n.matching(p),punct:n.matching(y),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(a.lineBreak),shebang:n.starting_with(/#!/).until_after(a.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:i.until(/['\\\n\r\u2028\u2029]/),double_quote:i.until(/["\\\n\r\u2028\u2029]/),template_text:i.until(/[`\\$]/),template_expression:i.until(/[`}\\]/)}};function C(t){var e="",n=0,r=new i(t),s=null;while(r.hasNext())if(s=r.match(/([\s]|[^\\]|\\\\)+/g),s&&(e+=s[0]),"\\"===r.peek()){if(r.next(),"x"===r.peek())s=r.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==r.peek()){e+="\\",r.hasNext()&&(e+=r.next());continue}s=r.match(/u([0-9A-Fa-f]{4})/g),s||(s=r.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!s)return t;if(n=parseInt(s[1],16),n>126&&n<=255&&0===s[0].indexOf("x"))return t;e+=n>=0&&n<32||n>1114111?"\\"+s[0]:34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return e}k.prototype=new r,k.prototype._is_comment=function(t){return t.type===c.COMMENT||t.type===c.BLOCK_COMMENT||t.type===c.UNKNOWN},k.prototype._is_opening=function(t){return t.type===c.START_BLOCK||t.type===c.START_EXPR},k.prototype._is_closing=function(t,e){return(t.type===c.END_BLOCK||t.type===c.END_EXPR)&&e&&("]"===t.text&&"["===e.text||")"===t.text&&"("===e.text||"}"===t.text&&"{"===e.text)},k.prototype._reset=function(){v=!1},k.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(c.EOF,""):(n=n||this._read_non_javascript(i),n=n||this._read_string(i),n=n||this._read_pair(i,this._input.peek(1)),n=n||this._read_word(t),n=n||this._read_singles(i),n=n||this._read_comment(i),n=n||this._read_regexp(i,t),n=n||this._read_xml(i,t),n=n||this._read_punctuation(),n=n||this._create_token(c.UNKNOWN,this._input.next()),n)},k.prototype._read_word=function(t){var e;return e=this.__patterns.identifier.read(),""!==e?(e=e.replace(a.allLineBreaks,"\n"),t.type!==c.DOT&&(t.type!==c.RESERVED||"set"!==t.text&&"get"!==t.text)&&x.test(e)?"in"!==e&&"of"!==e||t.type!==c.WORD&&t.type!==c.STRING?this._create_token(c.RESERVED,e):this._create_token(c.OPERATOR,e):this._create_token(c.WORD,e)):(e=this.__patterns.number.read(),""!==e?this._create_token(c.WORD,e):void 0)},k.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(c.START_EXPR,t):")"===t||"]"===t?e=this._create_token(c.END_EXPR,t):"{"===t?e=this._create_token(c.START_BLOCK,t):"}"===t?e=this._create_token(c.END_BLOCK,t):";"===t?e=this._create_token(c.SEMICOLON,t):"."===t&&d.test(this._input.peek(1))?e=this._create_token(c.DOT,t):","===t&&(e=this._create_token(c.COMMA,t)),e&&this._input.next(),e},k.prototype._read_pair=function(t,e){var n=null;return"#"===t&&"{"===e&&(n=this._create_token(c.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n},k.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(c.EQUALS,t):"?."===t?this._create_token(c.DOT,t):this._create_token(c.OPERATOR,t)},k.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(c.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read(),e)return this._create_token(c.UNKNOWN,e.trim()+"\n");t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(f)){do{t=this._input.next(),n+=t}while(this._input.hasNext()&&"#"!==t&&"="!==t);return"#"===t||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,n)}this._input.back()}else if("<"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){while(this._input.hasNext()&&!this._input.testChar(a.newline))e+=this._input.next();return v=!0,this._create_token(c.COMMENT,e)}}else if(v&&"-"===t&&(e=this.__patterns.html_comment_end.read(),e))return v=!1,this._create_token(c.COMMENT,e);return null},k.prototype._read_comment=function(t){var e=null;if("/"===t){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var i=_.get_directives(n);i&&"start"===i.ignore&&(n+=_.readIgnored(this._input)),n=n.replace(a.allLineBreaks,"\n"),e=this._create_token(c.BLOCK_COMMENT,n),e.directives=i}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),e=this._create_token(c.COMMENT,n))}return e},k.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var e=this._input.next();return this.has_char_escapes=!1,e+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=C(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(a.allLineBreaks,"\n"),this._create_token(c.STRING,e)}return null},k.prototype._allow_regexp_or_xml=function(t){return t.type===c.RESERVED&&h(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===c.END_EXPR&&")"===t.text&&t.opened.previous.type===c.RESERVED&&h(t.opened.previous.text,["if","while","for"])||h(t.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},k.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){var n=this._input.next(),i=!1,r=!1;while(this._input.hasNext()&&(i||r||this._input.peek()!==t)&&!this._input.testChar(a.newline))n+=this._input.peek(),i?i=!1:(i="\\"===this._input.peek(),"["===this._input.peek()?r=!0:"]"===this._input.peek()&&(r=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(a.identifier)),this._create_token(c.STRING,n)}return null},k.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var n="",i=this.__patterns.xml.read_match();if(i){var r=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),s=0===r.indexOf("{"),o=0;while(i){var l=!!i[1],u=i[2],h=!!i[i.length-1]||"![CDATA["===u.slice(0,8);if(!h&&(u===r||s&&u.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(l?--o:++o),n+=i[0],o<=0)break;i=this.__patterns.xml.read_match()}return i||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(a.allLineBreaks,"\n"),this._create_token(c.STRING,n)}}return null},k.prototype._read_string_recursive=function(t,e,n){var i,r;"'"===t?r=this.__patterns.single_quote:'"'===t?r=this.__patterns.double_quote:"`"===t?r=this.__patterns.template_text:"}"===t&&(r=this.__patterns.template_expression);var s=r.read(),o="";while(this._input.hasNext()){if(o=this._input.next(),o===t||!e&&a.newline.test(o)){this._input.back();break}"\\"===o&&this._input.hasNext()?(i=this._input.peek(),"x"===i||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),o+=this._input.next()):n&&("${"===n&&"$"===o&&"{"===this._input.peek()&&(o+=this._input.next()),n===o&&(o+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(o+=this._input.next()))),o+=r.read(),s+=o}return s},t.exports.Tokenizer=k,t.exports.TOKEN=c,t.exports.positionable_operators=g.slice(),t.exports.line_starters=b.slice()},function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var i=n(8).InputScanner,r=n(3).Token,s=n(10).TokenStream,o=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,e){this._input=new i(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();var e=new r(a.START,""),n=null,i=[],o=new s;while(e.type!==a.EOF){t=this._get_next_token(e,n);while(this._is_comment(t))o.add(t),t=this._get_next_token(e,n);o.isEmpty()||(t.comments_before=o,o=new s),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=i.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){var n=new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.prototype.read_options=function(t){var e=this._create();for(var n in r)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);var e=this._read_template();while(e)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},s.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},s.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=s}],e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}var r=i(0);n=r})();var s=n;i=[],r=function(){return{js_beautify:s}}.apply(e,i),void 0===r||(t.exports=r)})()},a69e:function(t,e,n){var i,r;(function(){var s;(function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function i(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){while(" "===this.last())this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n},n.prototype.__ensure_cache=function(t){while(t>=this.__cache.length)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},i.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty())this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(t,n){var i=this.__lines.length-2;while(i>=0){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(t)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=i},function(t){function e(t,e,n,i){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=e},,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(t,e){var n,r={};for(n in t=i(t),t)n!==e&&(r[n]=t[n]);if(e&&t[e])for(n in t[e])r[n]=t[e][n];return r}function i(t){var e,n={};for(e in t){var i=e.replace(/-/g,"_");n[i]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"===typeof n?null!==n&&"function"===typeof n.concat&&(i=n.concat()):"string"===typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t],i=void 0===n?!!e:!!n;return i},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"===typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},e.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=i,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function n(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var i=n(8).InputScanner,r=n(3).Token,s=n(10).TokenStream,o=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(t,e){this._input=new i(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();var e=new r(a.START,""),n=null,i=[],o=new s;while(e.type!==a.EOF){t=this._get_next_token(e,n);while(this._is_comment(t))o.add(t),t=this._get_next_token(e,n);o.isEmpty()||(t.comments_before=o,o=new s),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=i.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,"")},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){var n=new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.prototype.read_options=function(t){var e=this._create();for(var n in r)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);var e=this._read_template();while(e)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},s.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},s.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=s},,,,function(t,e,n){var i=n(19).Beautifier,r=n(20).Options;function s(t,e,n,r){var s=new i(t,e,n,r);return s.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new r}},function(t,e,n){var i=n(20).Options,r=n(2).Output,s=n(21).Tokenizer,o=n(21).TOKEN,a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,u=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new r(t,e)};u.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)},u.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e},u.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},u.prototype.add_raw_token=function(t){this._output.add_raw_token(t)},u.prototype.print_preserved_newlines=function(t){var e=0;t.type!==o.TEXT&&t.previous.type!==o.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines0);return 0!==e},u.prototype.traverse_whitespace=function(t){return!(!t.whitespace_before&&!t.newlines)&&(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0)},u.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},u.prototype.print_newline=function(t){this._output.add_new_line(t)},u.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))},u.prototype.indent=function(){this.indent_level++},u.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},u.prototype.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var h=function(t){var e=null,n=t.next;while(n.type!==o.EOF&&t.closed!==n){if(n.type===o.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===o.EQUALS&&n.next.next&&n.next.next.type===o.VALUE&&(e=n.next.next.text);break}n=n.next}return e},c=function(t,e){var n=null,i=null;return e.closed?("script"===t?n="text/javascript":"style"===t&&(n="text/css"),n=h(e)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function _(t,e){return-1!==e.indexOf(t)}function p(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function f(t){this._printer=t,this._current_frame=null}function d(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var s=new i(e,"html");this._options=s,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,"force".length),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,"preserve".length),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(t){var e=new p(this._current_frame,t,this._printer.indent_level);this._current_frame=e},f.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e},f.prototype._get_frame=function(t,e){var n=this._current_frame;while(n){if(-1!==t.indexOf(n.tag))break;if(e&&-1!==e.indexOf(n.tag)){n=null;break}n=n.parent}return n},f.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)},f.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&a.test(t)&&(e=t.match(a)[0])),t=t.replace(l,"\n");var n=t.match(/^[\t ]*/)[0],i={text:"",type:""},r=new g(this._options),h=new u(this._options,n),c=new s(t,this._options).tokenize();this._tag_stack=new f(h);var _=null,p=c.next();while(p.type!==o.EOF)p.type===o.TAG_OPEN||p.type===o.COMMENT?(_=this._handle_tag_open(h,p,r,i,c),r=_):p.type===o.ATTRIBUTE||p.type===o.EQUALS||p.type===o.VALUE||p.type===o.TEXT&&!r.tag_complete?_=this._handle_inside_tag(h,p,r,i):p.type===o.TAG_CLOSE?_=this._handle_tag_close(h,p,r):p.type===o.TEXT?_=this._handle_text(h,p,r):p.type===o.CONTROL_FLOW_OPEN?_=this._handle_control_flow_open(h,p):p.type===o.CONTROL_FLOW_CLOSE?_=this._handle_control_flow_close(h,p):h.add_raw_token(p),i=_,p=c.next();var d=h._output.get_code(e);return d},d.prototype._handle_control_flow_open=function(t,e){var n={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),t.print_token(e),t.indent(),n},d.prototype._handle_control_flow_close=function(t,e){var n={text:e.text,type:e.type};return t.deindent(),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),t.print_token(e),n},d.prototype._handle_tag_close=function(t,e,n){var i={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):("<"===n.tag_start_char&&(t.set_space_before_token("/"===e.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(t.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||t.set_wrap_point(),i},d.prototype._handle_inside_tag=function(t,e,n,i){var r=n.has_wrapped_attrs,s={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):"{"===n.tag_start_char&&e.type===o.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===o.ATTRIBUTE?t.set_space_before_token(!0):(e.type===o.EQUALS||e.type===o.VALUE&&e.previous.type===o.EQUALS)&&t.set_space_before_token(!1),e.type===o.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),r=r||0!==e.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==o.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),r=!0)),t.print_token(e),r=r||t.previous_token_wrapped(),n.has_wrapped_attrs=r),s},d.prototype._handle_text=function(t,e,n){var i={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),i},d.prototype._print_custom_beatifier_text=function(t,e,n){var i=this;if(""!==e.text){var r,s=e.text,o=1,a="",l="";"javascript"===n.custom_beautifier_name&&"function"===typeof this._js_beautify?r=this._js_beautify:"css"===n.custom_beautifier_name&&"function"===typeof this._css_beautify?r=this._css_beautify:"html"===n.custom_beautifier_name&&(r=function(t,e){var n=new d(t,e,i._js_beautify,i._css_beautify);return n.beautify()}),"keep"===this._options.indent_scripts?o=0:"separate"===this._options.indent_scripts&&(o=-t.indent_level);var u=t.get_full_indent(o);if(s=s.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===s[0]&&s.match(/^(|]]>)$/.exec(s);if(!h)return void t.add_raw_token(e);a=u+h[1]+"\n",s=h[4],h[5]&&(l=u+h[5]),s=s.replace(/\n[ \t]*$/,""),(h[2]||-1!==h[3].indexOf("\n"))&&(h=h[3].match(/[ \t]+$/),h&&(e.whitespace_before=h[0]))}if(s)if(r){var c=function(){this.eol="\n"};c.prototype=this._options.raw_options;var _=new c;s=r(u+s,_)}else{var p=e.whitespace_before;p&&(s=s.replace(new RegExp("\n("+p+")?","g"),"\n")),s=u+s.replace(/\n/g,"\n"+u)}a&&(s=s?a+s+"\n"+l:a+l),t.print_newline(!1),s&&(e.text=s,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},d.prototype._handle_tag_open=function(t,e,n,i,r){var s=this._get_tag_open_token(e);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||e.type!==o.TAG_OPEN||s.is_start_tag?(t.traverse_whitespace(e),this._set_tag_position(t,e,s,n,i),s.is_inline_element||t.set_wrap_point(),t.print_token(e)):(t.add_raw_token(e),s.start_tag_token=this._tag_stack.try_pop(s.tag_name)),s.is_start_tag&&this._is_wrap_attributes_force){var a,l=0;do{a=r.peek(l),a.type===o.ATTRIBUTE&&(s.attr_count+=1),l+=1}while(a.type!==o.EOF&&a.type!==o.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(s.alignment_size=e.text.length+1),s.tag_complete||s.is_unformatted||(t.alignment_size=s.alignment_size),s};var g=function(t,e,n){if(this.parent=e||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var i;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(i=n.text.match(/^<([^\s>]*)/),this.tag_check=i?i[1]:""):(i=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var r=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(r=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!t.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}else this.tag_complete=!0};d.prototype._get_tag_open_token=function(t){var e=new g(this._options,this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||_(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&_(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&_(e.tag_check,this._options.content_unformatted),e.is_inline_element=_(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||"{"===e.tag_start_char,e},d.prototype._set_tag_position=function(t,e,n,i,r){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=c(n.tag_check,e)))),_(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check){this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0;var s=t.current_line_has_match(/{{#if/);s||t.print_newline(!1)}"!--"===n.tag_name&&r.type===o.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(r.type===o.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==r.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===r.type&&!n.is_content_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n)},d.prototype._calcluate_parent_multiline=function(t,e){!e.parent||!t._output.just_added_newline()||(e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element||(e.parent.multiline_content=!0)};var m=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],v=["a","audio","del","ins","map","noscript","video"];d.prototype._do_optional_end_element=function(t){var e=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent){if("body"===t.tag_name)e=e||this._tag_stack.try_pop("head");else if("li"===t.tag_name)e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===t.tag_name||"dt"===t.tag_name)e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if("p"===t.parent.tag_name&&-1!==m.indexOf(t.tag_name)){var n=t.parent.parent;n&&-1!==v.indexOf(n.tag_name)||(e=e||this._tag_stack.try_pop("p"))}else"rp"===t.tag_name||"rt"===t.tag_name?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||this._tag_stack.try_pop("rp",["ruby","rtc"])):"optgroup"===t.tag_name?e=e||this._tag_stack.try_pop("optgroup",["select"]):"option"===t.tag_name?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===t.tag_name?e=e||this._tag_stack.try_pop("caption",["table"]):"thead"===t.tag_name?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):"tbody"===t.tag_name||"tfoot"===t.tag_name?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):"tr"===t.tag_name?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):"th"!==t.tag_name&&"td"!==t.tag_name||(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}},t.exports.Beautifier=d},function(t,e,n){var i=n(6).Options;function r(t){i.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}r.prototype=new i,t.exports.Options=r},function(t,e,n){var i=n(9).Tokenizer,r=n(9).TOKEN,s=n(13).Directives,o=n(14).TemplatablePattern,a=n(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},u=new s(/<\!--/,/-->/),h=function(t,e){i.call(this,t,e),this._current_tag_name="";var n=new o(this._input).read_options(this._options),r=new a(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:r.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(//),cdata:r.starting_with(//),conditional_comment:r.starting_with(//),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var s=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(s).until_after(s)}};h.prototype=new i,h.prototype._is_comment=function(t){return!1},h.prototype._is_opening=function(t){return t.type===l.TAG_OPEN||t.type===l.CONTROL_FLOW_OPEN},h.prototype._is_closing=function(t,e){return t.type===l.TAG_CLOSE&&e&&((">"===t.text||"/>"===t.text)&&"<"===e.text[0]||"}}"===t.text&&"{"===e.text[0]&&"{"===e.text[1])||t.type===l.CONTROL_FLOW_CLOSE&&"}"===t.text&&e.text.endsWith("{")},h.prototype._reset=function(){this._current_tag_name=""},h.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(l.EOF,""):(n=n||this._read_open_handlebars(i,e),n=n||this._read_attribute(i,t,e),n=n||this._read_close(i,e),n=n||this._read_script_and_style(i,t),n=n||this._read_control_flows(i,e),n=n||this._read_raw_content(i,t,e),n=n||this._read_content_word(i,e),n=n||this._read_comment_or_cdata(i),n=n||this._read_processing(i),n=n||this._read_open(i,e),n=n||this._create_token(l.UNKNOWN,this._input.next()),n)},h.prototype._read_comment_or_cdata=function(t){var e=null,n=null,i=null;if("<"===t){var r=this._input.peek(1);"!"===r&&(n=this.__patterns.comment.read(),n?(i=u.get_directives(n),i&&"start"===i.ignore&&(n+=u.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(l.COMMENT,n),e.directives=i)}return e},h.prototype._read_processing=function(t){var e=null,n=null,i=null;if("<"===t){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(l.COMMENT,n),e.directives=i)}return e},h.prototype._read_open=function(t,e){var n=null,i=null;return e&&e.type!==l.CONTROL_FLOW_OPEN||"<"===t&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(l.TAG_OPEN,n)),i},h.prototype._read_open_handlebars=function(t,e){var n=null,i=null;return e&&e.type!==l.CONTROL_FLOW_OPEN||(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===t&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars.read(),i=this._create_token(l.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),i=this._create_token(l.TAG_OPEN,n))),i},h.prototype._read_control_flows=function(t,e){var n="",i=null;if(!this._options.templating.includes("angular"))return i;if("@"===t){if(n=this.__patterns.angular_control_flow_start.read(),""===n)return i;var r=n.endsWith("(")?1:0,s=0;while(!n.endsWith("{")||r!==s){var o=this._input.next();if(null===o)break;"("===o?r++:")"===o&&s++,n+=o}i=this._create_token(l.CONTROL_FLOW_OPEN,n)}else"}"===t&&e&&e.type===l.CONTROL_FLOW_OPEN&&(n=this._input.next(),i=this._create_token(l.CONTROL_FLOW_CLOSE,n));return i},h.prototype._read_close=function(t,e){var n=null,i=null;return e&&e.type===l.TAG_OPEN&&("<"===e.text[0]&&(">"===t||"/"===t&&">"===this._input.peek(1))?(n=this._input.next(),"/"===t&&(n+=this._input.next()),i=this._create_token(l.TAG_CLOSE,n)):"{"===e.text[0]&&"}"===t&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(l.TAG_CLOSE,"}}"))),i},h.prototype._read_attribute=function(t,e,n){var i=null,r="";if(n&&"<"===n.text[0])if("="===t)i=this._create_token(l.EQUALS,this._input.next());else if('"'===t||"'"===t){var s=this._input.next();s+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(l.VALUE,s)}else r=this.__patterns.attribute.read(),r&&(i=e.type===l.EQUALS?this._create_token(l.VALUE,r):this._create_token(l.ATTRIBUTE,r));return i},h.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},h.prototype._read_raw_content=function(t,e,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(e.type===l.TAG_CLOSE&&"<"===e.opened.text[0]&&"/"!==e.text[0]){var r=e.opened.text.substr(1).toLowerCase();this._is_content_unformatted(r)&&(i=this._input.readUntil(new RegExp("","ig")))}return i?this._create_token(l.TEXT,i):null},h.prototype._read_script_and_style=function(t,e){if(e.type===l.TAG_CLOSE&&"<"===e.opened.text[0]&&"/"!==e.text[0]){var n=e.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var i=this._read_comment_or_cdata(t);if(i)return i.type=l.TEXT,i;var r=this._input.readUntil(new RegExp("","ig"));if(r)return this._create_token(l.TEXT,r)}}return null},h.prototype._read_content_word=function(t,e){var n="";return this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=e&&e.type===l.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(l.TEXT,n):null},t.exports.Tokenizer=h,t.exports.TOKEN=l}],e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}var i=n(18);s=i})();var o=s;i=[n,n("a179"),n("a16b")],r=function(t){var e=n("a179"),i=n("a16b");return{html_beautify:function(t,n){return o(t,n,e.js_beautify,i.css_beautify)}}}.apply(e,i),void 0===r||(t.exports=r)})()},af0e:function(t,e,n){},b2dd:function(t,e,n){},cbed:function(t,e,n){(function(t){t(n("69713"))})((function(t){"use strict";t.defineMode("javascript",(function(e,n){var i,r,s=e.indentUnit,o=n.statementIndent,a=n.jsonld,l=n.json||a,u=!1!==n.trackScope,h=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,_=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("keyword d"),s=t("operator"),o={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:i,void:i,throw:i,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:s,typeof:s,instanceof:s,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i}}(),p=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function d(t){var e,n=!1,i=!1;while(null!=(e=t.next())){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function g(t,e,n){return i=t,r=n,e}function m(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=v(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&t.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&t.eat(">"))return g("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return t.eat("*")?(e.tokenize=y,y(t,e)):t.eat("/")?(t.skipToEnd(),g("comment","comment")):re(t,e,1)?(d(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(t.eat("="),g("operator","operator",t.current()));if("`"==n)return e.tokenize=b,b(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),g("meta","meta");if("#"==n&&t.eatWhile(c))return g("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),g("comment","comment");if(p.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?g("."):g("operator","operator",t.current());if(c.test(n)){t.eatWhile(c);var i=t.current();if("."!=e.lastType){if(_.propertyIsEnumerable(i)){var r=_[i];return g(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",i)}return g("variable","variable",i)}}function v(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(f))return n.tokenize=m,g("jsonld-keyword","meta");while(null!=(i=e.next())){if(i==t&&!r)break;r=!r&&"\\"==i}return r||(n.tokenize=m),g("string","string")}}function y(t,e){var n,i=!1;while(n=t.next()){if("/"==n&&i){e.tokenize=m;break}i="*"==n}return g("comment","comment")}function b(t,e){var n,i=!1;while(null!=(n=t.next())){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=m;break}i=!i&&"\\"==n}return g("quasi","string-2",t.current())}var w="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(h){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,s=!1,o=n-1;o>=0;--o){var a=t.string.charAt(o),l=w.indexOf(a);if(l>=0&&l<3){if(!r){++o;break}if(0==--r){"("==a&&(s=!0);break}}else if(l>=3&&l<6)++r;else if(c.test(a))s=!0;else if(/["'\/`]/.test(a))for(;;--o){if(0==o)return;var u=t.string.charAt(o-1);if(u==a&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(s&&!r){++o;break}}s&&!r&&(e.fatArrowAt=o)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function C(t,e,n,i,r,s){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=s,null!=i&&(this.align=i)}function T(t,e){if(!u)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(n=i.vars;n;n=n.next)if(n.name==e)return!0}function S(t,e,n,i,r){var s=t.cc;O.state=t,O.stream=r,O.marked=null,O.cc=s,O.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);while(1){var o=s.length?s.pop():l?V:U;if(o(n,i)){while(s.length&&s[s.length-1].lex)s.pop()();return O.marked?O.marked:"variable"==n&&T(t,i)?"variable-2":e}}}var O={state:null,column:null,marked:null,cc:null};function L(){for(var t=arguments.length-1;t>=0;t--)O.cc.push(arguments[t])}function E(){return L.apply(null,arguments),!0}function A(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function N(t){var e=O.state;if(O.marked="def",u){if(e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=M(t,e.context);if(null!=i)return void(e.context=i)}else if(!A(t,e.localVars))return void(e.localVars=new W(t,e.localVars));n.globalVars&&!A(t,e.globalVars)&&(e.globalVars=new W(t,e.globalVars))}}function M(t,e){if(e){if(e.block){var n=M(t,e.prev);return n?n==e.prev?e:new D(n,e.vars,!0):null}return A(t,e.vars)?e:new D(e.prev,new W(t,e.vars),!1)}return null}function R(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,n){this.prev=t,this.vars=e,this.block=n}function W(t,e){this.name=t,this.next=e}var P=new W("this",new W("arguments",null));function z(){O.state.context=new D(O.state.context,O.state.localVars,!1),O.state.localVars=P}function I(){O.state.context=new D(O.state.context,O.state.localVars,!0),O.state.localVars=null}function j(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function F(t,e){var n=function(){var n=O.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new C(i,O.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function B(){var t=O.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function H(t){function e(n){return n==t?E():";"==t||"}"==n||")"==n||"]"==n?L():E(e)}return e}function U(t,e){return"var"==t?E(F("vardef",e),Lt,H(";"),B):"keyword a"==t?E(F("form"),X,U,B):"keyword b"==t?E(F("form"),U,B):"keyword d"==t?O.stream.match(/^\s*$/,!1)?E():E(F("stat"),q,H(";"),B):"debugger"==t?E(H(";")):"{"==t?E(F("}"),I,_t,B,j):";"==t?E():"if"==t?("else"==O.state.lexical.info&&O.state.cc[O.state.cc.length-1]==B&&O.state.cc.pop()(),E(F("form"),X,U,B,Dt)):"function"==t?E(It):"for"==t?E(F("form"),I,Wt,U,j,B):"class"==t||h&&"interface"==e?(O.marked="keyword",E(F("form","class"==t?t:e),Ut,B)):"variable"==t?h&&"declare"==e?(O.marked="keyword",E(U)):h&&("module"==e||"enum"==e||"type"==e)&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword","enum"==e?E(ee):"type"==e?E(Ft,H("operator"),mt,H(";")):E(F("form"),Et,H("{"),F("}"),_t,B,B)):h&&"namespace"==e?(O.marked="keyword",E(F("form"),V,U,B)):h&&"abstract"==e?(O.marked="keyword",E(U)):E(F("stat"),st):"switch"==t?E(F("form"),X,H("{"),F("}","switch"),I,_t,B,B,j):"case"==t?E(V,H(":")):"default"==t?E(H(":")):"catch"==t?E(F("form"),z,K,U,B,j):"export"==t?E(F("stat"),Xt,B):"import"==t?E(F("stat"),qt,B):"async"==t?E(U):"@"==e?E(V,U):L(F("stat"),V,H(";"),B)}function K(t){if("("==t)return E(Bt,H(")"))}function V(t,e){return $(t,e,!1)}function G(t,e){return $(t,e,!0)}function X(t){return"("!=t?L():E(F(")"),q,H(")"),B)}function $(t,e,n){if(O.state.fatArrowAt==O.stream.start){var i=n?et:tt;if("("==t)return E(z,F(")"),ht(Bt,")"),B,H("=>"),i,j);if("variable"==t)return L(z,Et,H("=>"),i,j)}var r=n?Q:Y;return k.hasOwnProperty(t)?E(r):"function"==t?E(It,r):"class"==t||h&&"interface"==e?(O.marked="keyword",E(F("form"),Ht,B)):"keyword c"==t||"async"==t?E(n?G:V):"("==t?E(F(")"),q,H(")"),B,r):"operator"==t||"spread"==t?E(n?G:V):"["==t?E(F("]"),te,B,r):"{"==t?ct(at,"}",null,r):"quasi"==t?L(Z,r):"new"==t?E(nt(n)):E()}function q(t){return t.match(/[;\}\)\],]/)?L():L(V)}function Y(t,e){return","==t?E(q):Q(t,e,!1)}function Q(t,e,n){var i=0==n?Y:Q,r=0==n?V:G;return"=>"==t?E(z,n?et:tt,j):"operator"==t?/\+\+|--/.test(e)||h&&"!"==e?E(i):h&&"<"==e&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(F(">"),ht(mt,">"),B,i):"?"==e?E(V,H(":"),r):E(r):"quasi"==t?L(Z,i):";"!=t?"("==t?ct(G,")","call",i):"."==t?E(ot,i):"["==t?E(F("]"),q,H("]"),B,i):h&&"as"==e?(O.marked="keyword",E(mt,i)):"regexp"==t?(O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),E(r)):void 0:void 0}function Z(t,e){return"quasi"!=t?L():"${"!=e.slice(e.length-2)?E(Z):E(q,J)}function J(t){if("}"==t)return O.marked="string-2",O.state.tokenize=b,E(Z)}function tt(t){return x(O.stream,O.state),L("{"==t?U:V)}function et(t){return x(O.stream,O.state),L("{"==t?U:G)}function nt(t){return function(e){return"."==e?E(t?rt:it):"variable"==e&&h?E(Tt,t?Q:Y):L(t?G:V)}}function it(t,e){if("target"==e)return O.marked="keyword",E(Y)}function rt(t,e){if("target"==e)return O.marked="keyword",E(Q)}function st(t){return":"==t?E(B,U):L(Y,H(";"),B)}function ot(t){if("variable"==t)return O.marked="property",E()}function at(t,e){return"async"==t?(O.marked="property",E(at)):"variable"==t||"keyword"==O.style?(O.marked="property","get"==e||"set"==e?E(lt):(h&&O.state.fatArrowAt==O.stream.start&&(n=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+n[0].length),E(ut))):"number"==t||"string"==t?(O.marked=a?"property":O.style+" property",E(ut)):"jsonld-keyword"==t?E(ut):h&&R(e)?(O.marked="keyword",E(at)):"["==t?E(V,pt,H("]"),ut):"spread"==t?E(G,ut):"*"==e?(O.marked="keyword",E(at)):":"==t?L(ut):void 0;var n}function lt(t){return"variable"!=t?L(ut):(O.marked="property",E(It))}function ut(t){return":"==t?E(G):"("==t?L(It):void 0}function ht(t,e,n){function i(r,s){if(n?n.indexOf(r)>-1:","==r){var o=O.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),E((function(n,i){return n==e||i==e?L():L(t)}),i)}return r==e||s==e?E():n&&n.indexOf(";")>-1?L(t):E(H(e))}return function(n,r){return n==e||r==e?E():L(t,i)}}function ct(t,e,n){for(var i=3;i"),mt):"quasi"==t?L(wt,Ct):void 0}function vt(t){if("=>"==t)return E(mt)}function yt(t){return t.match(/[\}\)\]]/)?E():","==t||";"==t?E(yt):L(bt,yt)}function bt(t,e){return"variable"==t||"keyword"==O.style?(O.marked="property",E(bt)):"?"==e||"number"==t||"string"==t?E(bt):":"==t?E(mt):"["==t?E(H("variable"),ft,H("]"),bt):"("==t?L(jt,bt):t.match(/[;\}\)\],]/)?void 0:E()}function wt(t,e){return"quasi"!=t?L():"${"!=e.slice(e.length-2)?E(wt):E(mt,xt)}function xt(t){if("}"==t)return O.marked="string-2",O.state.tokenize=b,E(wt)}function kt(t,e){return"variable"==t&&O.stream.match(/^\s*[?:]/,!1)||"?"==e?E(kt):":"==t?E(mt):"spread"==t?E(kt):L(mt)}function Ct(t,e){return"<"==e?E(F(">"),ht(mt,">"),B,Ct):"|"==e||"."==t||"&"==e?E(mt):"["==t?E(mt,H("]"),Ct):"extends"==e||"implements"==e?(O.marked="keyword",E(mt)):"?"==e?E(mt,H(":"),mt):void 0}function Tt(t,e){if("<"==e)return E(F(">"),ht(mt,">"),B,Ct)}function St(){return L(mt,Ot)}function Ot(t,e){if("="==e)return E(mt)}function Lt(t,e){return"enum"==e?(O.marked="keyword",E(ee)):L(Et,pt,Mt,Rt)}function Et(t,e){return h&&R(e)?(O.marked="keyword",E(Et)):"variable"==t?(N(e),E()):"spread"==t?E(Et):"["==t?ct(Nt,"]"):"{"==t?ct(At,"}"):void 0}function At(t,e){return"variable"!=t||O.stream.match(/^\s*:/,!1)?("variable"==t&&(O.marked="property"),"spread"==t?E(Et):"}"==t?L():"["==t?E(V,H("]"),H(":"),At):E(H(":"),Et,Mt)):(N(e),E(Mt))}function Nt(){return L(Et,Mt)}function Mt(t,e){if("="==e)return E(G)}function Rt(t){if(","==t)return E(Lt)}function Dt(t,e){if("keyword b"==t&&"else"==e)return E(F("form","else"),U,B)}function Wt(t,e){return"await"==e?E(Wt):"("==t?E(F(")"),Pt,B):void 0}function Pt(t){return"var"==t?E(Lt,zt):"variable"==t?E(zt):L(zt)}function zt(t,e){return")"==t?E():";"==t?E(zt):"in"==e||"of"==e?(O.marked="keyword",E(V,zt)):L(V,zt)}function It(t,e){return"*"==e?(O.marked="keyword",E(It)):"variable"==t?(N(e),E(It)):"("==t?E(z,F(")"),ht(Bt,")"),B,dt,U,j):h&&"<"==e?E(F(">"),ht(St,">"),B,It):void 0}function jt(t,e){return"*"==e?(O.marked="keyword",E(jt)):"variable"==t?(N(e),E(jt)):"("==t?E(z,F(")"),ht(Bt,")"),B,dt,j):h&&"<"==e?E(F(">"),ht(St,">"),B,jt):void 0}function Ft(t,e){return"keyword"==t||"variable"==t?(O.marked="type",E(Ft)):"<"==e?E(F(">"),ht(St,">"),B):void 0}function Bt(t,e){return"@"==e&&E(V,Bt),"spread"==t?E(Bt):h&&R(e)?(O.marked="keyword",E(Bt)):h&&"this"==t?E(pt,Mt):L(Et,pt,Mt)}function Ht(t,e){return"variable"==t?Ut(t,e):Kt(t,e)}function Ut(t,e){if("variable"==t)return N(e),E(Kt)}function Kt(t,e){return"<"==e?E(F(">"),ht(St,">"),B,Kt):"extends"==e||"implements"==e||h&&","==t?("implements"==e&&(O.marked="keyword"),E(h?mt:V,Kt)):"{"==t?E(F("}"),Vt,B):void 0}function Vt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||h&&R(e))&&O.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",E(Vt)):"variable"==t||"keyword"==O.style?(O.marked="property",E(Gt,Vt)):"number"==t||"string"==t?E(Gt,Vt):"["==t?E(V,pt,H("]"),Gt,Vt):"*"==e?(O.marked="keyword",E(Vt)):h&&"("==t?L(jt,Vt):";"==t||","==t?E(Vt):"}"==t?E():"@"==e?E(V,Vt):void 0}function Gt(t,e){if("!"==e)return E(Gt);if("?"==e)return E(Gt);if(":"==t)return E(mt,Mt);if("="==e)return E(G);var n=O.state.lexical.prev,i=n&&"interface"==n.info;return L(i?jt:It)}function Xt(t,e){return"*"==e?(O.marked="keyword",E(Jt,H(";"))):"default"==e?(O.marked="keyword",E(V,H(";"))):"{"==t?E(ht($t,"}"),Jt,H(";")):L(U)}function $t(t,e){return"as"==e?(O.marked="keyword",E(H("variable"))):"variable"==t?L(G,$t):void 0}function qt(t){return"string"==t?E():"("==t?L(V):"."==t?L(Y):L(Yt,Qt,Jt)}function Yt(t,e){return"{"==t?ct(Yt,"}"):("variable"==t&&N(e),"*"==e&&(O.marked="keyword"),E(Zt))}function Qt(t){if(","==t)return E(Yt,Qt)}function Zt(t,e){if("as"==e)return O.marked="keyword",E(Yt)}function Jt(t,e){if("from"==e)return O.marked="keyword",E(V)}function te(t){return"]"==t?E():L(ht(G,"]"))}function ee(){return L(F("form"),Et,H("{"),F("}"),ht(ne,"}"),B,B)}function ne(){return L(Et,Mt)}function ie(t,e){return"operator"==t.lastType||","==t.lastType||p.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function re(t,e,n){return e.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return z.lex=I.lex=!0,j.lex=!0,B.lex=!0,{startState:function(t){var e={tokenize:m,lastType:"sof",cc:[],lexical:new C((t||0)-s,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=y&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==i?n:(e.lastType="operator"!=i||"++"!=r&&"--"!=r?i:"incdec",S(e,n,i,r,t))},indent:function(e,i){if(e.tokenize==y||e.tokenize==b)return t.Pass;if(e.tokenize!=m)return 0;var r,a=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var u=e.cc.length-1;u>=0;--u){var h=e.cc[u];if(h==B)l=l.prev;else if(h!=Dt&&h!=j)break}while(("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==Y||r==Q)&&!/^[,\.=+\-*:?[\(]/.test(i)))l=l.prev;o&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var c=l.type,_=a==c;return"vardef"==c?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==c&&"{"==a?l.indented:"form"==c?l.indented+s:"stat"==c?l.indented+(ie(e,i)?o||s:0):"switch"!=l.info||_||0==n.doubleIndentSwitch?l.align?l.column+(_?0:1):l.indented+(_?0:s):l.indented+(/^(?:case|default)\b/.test(i)?s:2*s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:re,skipExpression:function(e){S(e,"atom","atom","true",new t.StringStream("",2,null))}}})),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/manifest+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})}))},f3fe:function(t,e,n){(function(t){t(n("69713"))})((function(t){var e=t.Pos;function n(t,e){for(var n=0,i=t.length;no.ch&&(a.end=o.ch,a.string=a.string.slice(0,o.ch-a.start)):a={start:o.ch,end:o.ch,string:"",state:a.state,type:"."==a.string?"property":null};var u=a;while("property"==u.type){if(u=r(n,e(o.line,u.start)),"."!=u.string)return;if(u=r(n,e(o.line,u.start)),!h)var h=[];h.push(u)}return{list:f(a,h,i,s),from:e(o.line,a.start),to:e(o.line,a.end)}}}}function s(t,e){return r(t,c,(function(t,e){return t.getTokenAt(e)}),e)}function o(t,e){var n=t.getTokenAt(e);return e.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function a(t,e){return r(t,_,o,e)}t.registerHelper("hint","javascript",s),t.registerHelper("hint","coffeescript",a);var l="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),h="prototype apply call bind".split(" "),c="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),_="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function p(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=t;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(e);else for(var i in t)e(i)}function f(t,e,r,s){var o=[],a=t.string,c=s&&s.globalScope||window;function _(t){0!=t.lastIndexOf(a,0)||i(o,t)||o.push(t)}function f(t){"string"==typeof t?n(l,_):t instanceof Array?n(u,_):t instanceof Function&&n(h,_),p(t,_)}if(e&&e.length){var d,g=e.pop();g.type&&0===g.type.indexOf("variable")?(s&&s.additionalContext&&(d=s.additionalContext[g.string]),s&&!1===s.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());while(null!=d&&e.length)d=d[e.pop().string];null!=d&&f(d)}else{for(var m=t.state.localVars;m;m=m.next)_(m.name);for(var v=t.state.context;v;v=v.prev)for(m=v.vars;m;m=m.next)_(m.name);for(m=t.state.globalVars;m;m=m.next)_(m.name);if(s&&null!=s.additionalContext)for(var y in s.additionalContext)_(y);s&&!1===s.useGlobalScope||f(c),n(r,_)}return o}}))},fd90:function(t,e,n){}}]);