report-ui/dist/static/js/chunk-e411.4643e4e4.js
2023-04-14 15:55:36 +08:00

31 satır
839 KiB
JavaScript
Ham Kalıcı Bağlantı Suçlama Geçmiş

Bu dosya görünmez Evrensel Kodlu karakter içeriyor

Bu dosya, insanlar tarafından ayırt edilemeyen ama bir bilgisayar tarafından farklı bir şekilde işlenebilecek görünmez evrensel kodlu karakter içeriyor. Eğer bunu kasıtlı olarak yaptıysanız bu uyarıyı yok sayabilirsiniz. Gizli karakterleri göstermek için Kaçış Karakterli düğmesine tıklayın.

Bu dosya, başka karakterlerle karıştırılabilecek evrensel kodlu karakter içeriyor. Eğer bunu kasıtlı olarak yaptıysanız bu uyarıyı yok sayabilirsiniz. Gizli karakterleri göstermek için Kaçış Karakterli düğmesine tıklayın.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e411"],{"+dQi":function(e,t,i){!function(e){"use strict";e.defineMode("javascript",function(t,i){var n,r,o=t.indentUnit,s=i.statementIndent,a=i.jsonld,l=i.json||a,c=!1!==i.trackScope,h=i.typescript,u=i.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),i=e("keyword b"),n=e("keyword c"),r=e("keyword d"),o=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:i,do:i,try:i,finally:i,return:r,break:r,continue:r,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,i){return n=e,r=i,t}function g(e,t){var i=e.next();if('"'==i||"'"==i)return t.tokenize=function(e){return function(t,i){var n,r=!1;if(a&&"@"==t.peek()&&t.match(p))return i.tokenize=g,m("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||r);)r=!r&&"\\"==n;return r||(i.tokenize=g),m("string","string")}}(i),t.tokenize(e,t);if("."==i&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==i&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return m(i);if("="==i&&e.eat(">"))return m("=>","operator");if("0"==i&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(i))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==i)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Ze(e,t,1)?(function(e){for(var t,i=!1,n=!1;null!=(t=e.next());){if(!i){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}i=!i&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==i)return t.tokenize=y,y(e,t);if("#"==i&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==i&&e.eatWhile(u))return m("variable","property");if("<"==i&&e.match("!--")||"-"==i&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(i))return">"==i&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=i&&"="!=i||e.eat("="):/[<>*+\-|&?]/.test(i)&&(e.eat(i),">"==i&&e.eat(i))),"?"==i&&e.eat(".")?m("."):m("operator","operator",e.current());if(u.test(i)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var r=d[n];return m(r.type,r.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",n)}return m("variable","variable",n)}}function v(e,t){for(var i,n=!1;i=e.next();){if("/"==i&&n){t.tokenize=g;break}n="*"==i}return m("comment","comment")}function y(e,t){for(var i,n=!1;null!=(i=e.next());){if(!n&&("`"==i||"$"==i&&e.eat("{"))){t.tokenize=g;break}n=!n&&"\\"==i}return m("quasi","string-2",e.current())}var w="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var i=e.string.indexOf("=>",e.start);if(!(i<0)){if(h){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,i));n&&(i=n.index)}for(var r=0,o=!1,s=i-1;s>=0;--s){var a=e.string.charAt(s),l=w.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(u.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;var c=e.string.charAt(s-1);if(c==a&&"\\"!=e.string.charAt(s-2)){s--;break}}else if(o&&!r){++s;break}}o&&!r&&(t.fatArrowAt=s)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function A(e,t,i,n,r,o){this.indented=e,this.column=t,this.type=i,this.prev=r,this.info=o,null!=n&&(this.align=n)}function x(e,t){if(!c)return!1;for(var i=e.localVars;i;i=i.next)if(i.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var i=n.vars;i;i=i.next)if(i.name==t)return!0}function E(e,t,i,n,r){var o=e.cc;for(F.state=e,F.stream=r,F.marked=null,F.cc=o,F.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=o.length?o.pop():l?H:j;if(s(i,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return F.marked?F.marked:"variable"==i&&x(e,n)?"variable-2":t}}}var F={state:null,column:null,marked:null,cc:null};function _(){for(var e=arguments.length-1;e>=0;e--)F.cc.push(arguments[e])}function S(){return _.apply(null,arguments),!0}function k(e,t){for(var i=t;i;i=i.next)if(i.name==e)return!0;return!1}function D(e){var t=F.state;if(F.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,i){if(i){if(i.block){var n=e(t,i.prev);return n?n==i.prev?i:new L(n,i.vars,!0):null}return k(t,i.vars)?i:new L(i.prev,new B(t,i.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!k(e,t.localVars))return void(t.localVars=new B(e,t.localVars));i.globalVars&&!k(e,t.globalVars)&&(t.globalVars=new B(e,t.globalVars))}}function $(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,i){this.prev=e,this.vars=t,this.block=i}function B(e,t){this.name=e,this.next=t}var R=new B("this",new B("arguments",null));function T(){F.state.context=new L(F.state.context,F.state.localVars,!1),F.state.localVars=R}function M(){F.state.context=new L(F.state.context,F.state.localVars,!0),F.state.localVars=null}function P(){F.state.localVars=F.state.context.vars,F.state.context=F.state.context.prev}function O(e,t){var i=function(){var i=F.state,n=i.indented;if("stat"==i.lexical.type)n=i.lexical.indented;else for(var r=i.lexical;r&&")"==r.type&&r.align;r=r.prev)n=r.indented;i.lexical=new A(n,F.stream.column(),e,null,i.lexical,t)};return i.lex=!0,i}function N(){var e=F.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function I(e){return function t(i){return i==e?S():";"==e||"}"==i||")"==i||"]"==i?_():S(t)}}function j(e,t){return"var"==e?S(O("vardef",t),Ee,I(";"),N):"keyword a"==e?S(O("form"),V,j,N):"keyword b"==e?S(O("form"),j,N):"keyword d"==e?F.stream.match(/^\s*$/,!1)?S():S(O("stat"),q,I(";"),N):"debugger"==e?S(I(";")):"{"==e?S(O("}"),M,le,N,P):";"==e?S():"if"==e?("else"==F.state.lexical.info&&F.state.cc[F.state.cc.length-1]==N&&F.state.cc.pop()(),S(O("form"),V,j,N,$e)):"function"==e?S(Te):"for"==e?S(O("form"),M,Le,j,P,N):"class"==e||h&&"interface"==t?(F.marked="keyword",S(O("form","class"==e?e:t),Ie,N)):"variable"==e?h&&"declare"==t?(F.marked="keyword",S(j)):h&&("module"==t||"enum"==t||"type"==t)&&F.stream.match(/^\s*\w/,!1)?(F.marked="keyword","enum"==t?S(Xe):"type"==t?S(Pe,I("operator"),fe,I(";")):S(O("form"),Fe,I("{"),O("}"),le,N,N)):h&&"namespace"==t?(F.marked="keyword",S(O("form"),H,j,N)):h&&"abstract"==t?(F.marked="keyword",S(j)):S(O("stat"),te):"switch"==e?S(O("form"),V,I("{"),O("}","switch"),M,le,N,N,P):"case"==e?S(H,I(":")):"default"==e?S(I(":")):"catch"==e?S(O("form"),T,W,j,N,P):"export"==e?S(O("stat"),ze,N):"import"==e?S(O("stat"),Ue,N):"async"==e?S(j):"@"==t?S(H,j):_(O("stat"),H,I(";"),N)}function W(e){if("("==e)return S(Oe,I(")"))}function H(e,t){return U(e,t,!1)}function z(e,t){return U(e,t,!0)}function V(e){return"("!=e?_():S(O(")"),q,I(")"),N)}function U(e,t,i){if(F.state.fatArrowAt==F.stream.start){var n=i?J:X;if("("==e)return S(T,O(")"),se(Oe,")"),N,I("=>"),n,P);if("variable"==e)return _(T,Fe,I("=>"),n,P)}var r=i?G:K;return C.hasOwnProperty(e)?S(r):"function"==e?S(Te,r):"class"==e||h&&"interface"==t?(F.marked="keyword",S(O("form"),Ne,N)):"keyword c"==e||"async"==e?S(i?z:H):"("==e?S(O(")"),q,I(")"),N,r):"operator"==e||"spread"==e?S(i?z:H):"["==e?S(O("]"),Qe,N,r):"{"==e?ae(ne,"}",null,r):"quasi"==e?_(Y,r):"new"==e?S(function(e){return function(t){return"."==t?S(e?ee:Z):"variable"==t&&h?S(Ce,e?G:K):_(e?z:H)}}(i)):S()}function q(e){return e.match(/[;\}\)\],]/)?_():_(H)}function K(e,t){return","==e?S(q):G(e,t,!1)}function G(e,t,i){var n=0==i?K:G,r=0==i?H:z;return"=>"==e?S(T,i?J:X,P):"operator"==e?/\+\+|--/.test(t)||h&&"!"==t?S(n):h&&"<"==t&&F.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S(O(">"),se(fe,">"),N,n):"?"==t?S(H,I(":"),r):S(r):"quasi"==e?_(Y,n):";"!=e?"("==e?ae(z,")","call",n):"."==e?S(ie,n):"["==e?S(O("]"),q,I("]"),N,n):h&&"as"==t?(F.marked="keyword",S(fe,n)):"regexp"==e?(F.state.lastType=F.marked="operator",F.stream.backUp(F.stream.pos-F.stream.start-1),S(r)):void 0:void 0}function Y(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?S(Y):S(q,Q)}function Q(e){if("}"==e)return F.marked="string-2",F.state.tokenize=y,S(Y)}function X(e){return b(F.stream,F.state),_("{"==e?j:H)}function J(e){return b(F.stream,F.state),_("{"==e?j:z)}function Z(e,t){if("target"==t)return F.marked="keyword",S(K)}function ee(e,t){if("target"==t)return F.marked="keyword",S(G)}function te(e){return":"==e?S(N,j):_(K,I(";"),N)}function ie(e){if("variable"==e)return F.marked="property",S()}function ne(e,t){if("async"==e)return F.marked="property",S(ne);if("variable"==e||"keyword"==F.style){return F.marked="property","get"==t||"set"==t?S(re):(h&&F.state.fatArrowAt==F.stream.start&&(i=F.stream.match(/^\s*:\s*/,!1))&&(F.state.fatArrowAt=F.stream.pos+i[0].length),S(oe));var i}else{if("number"==e||"string"==e)return F.marked=a?"property":F.style+" property",S(oe);if("jsonld-keyword"==e)return S(oe);if(h&&$(t))return F.marked="keyword",S(ne);if("["==e)return S(H,ce,I("]"),oe);if("spread"==e)return S(z,oe);if("*"==t)return F.marked="keyword",S(ne);if(":"==e)return _(oe)}}function re(e){return"variable"!=e?_(oe):(F.marked="property",S(Te))}function oe(e){return":"==e?S(z):"("==e?_(Te):void 0}function se(e,t,i){function n(r,o){if(i?i.indexOf(r)>-1:","==r){var s=F.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),S(function(i,n){return i==t||n==t?_():_(e)},n)}return r==t||o==t?S():i&&i.indexOf(";")>-1?_(e):S(I(t))}return function(i,r){return i==t||r==t?S():_(e,n)}}function ae(e,t,i){for(var n=3;n<arguments.length;n++)F.cc.push(arguments[n]);return S(O(t,i),se(e,t),N)}function le(e){return"}"==e?S():_(j,le)}function ce(e,t){if(h){if(":"==e)return S(fe);if("?"==t)return S(ce)}}function he(e,t){if(h&&(":"==e||"in"==t))return S(fe)}function ue(e){if(h&&":"==e)return F.stream.match(/^\s*\w+\s+is\b/,!1)?S(H,de,fe):S(fe)}function de(e,t){if("is"==t)return F.marked="keyword",S()}function fe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(F.marked="keyword",S("typeof"==t?z:fe)):"variable"==e||"void"==t?(F.marked="type",S(be)):"|"==t||"&"==t?S(fe):"string"==e||"number"==e||"atom"==e?S(be):"["==e?S(O("]"),se(fe,"]",","),N,be):"{"==e?S(O("}"),me,N,be):"("==e?S(se(we,")"),pe,be):"<"==e?S(se(fe,">"),fe):"quasi"==e?_(ve,be):void 0}function pe(e){if("=>"==e)return S(fe)}function me(e){return e.match(/[\}\)\]]/)?S():","==e||";"==e?S(me):_(ge,me)}function ge(e,t){return"variable"==e||"keyword"==F.style?(F.marked="property",S(ge)):"?"==t||"number"==e||"string"==e?S(ge):":"==e?S(fe):"["==e?S(I("variable"),he,I("]"),ge):"("==e?_(Me,ge):e.match(/[;\}\)\],]/)?void 0:S()}function ve(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?S(ve):S(fe,ye)}function ye(e){if("}"==e)return F.marked="string-2",F.state.tokenize=y,S(ve)}function we(e,t){return"variable"==e&&F.stream.match(/^\s*[?:]/,!1)||"?"==t?S(we):":"==e?S(fe):"spread"==e?S(we):_(fe)}function be(e,t){return"<"==t?S(O(">"),se(fe,">"),N,be):"|"==t||"."==e||"&"==t?S(fe):"["==e?S(fe,I("]"),be):"extends"==t||"implements"==t?(F.marked="keyword",S(fe)):"?"==t?S(fe,I(":"),fe):void 0}function Ce(e,t){if("<"==t)return S(O(">"),se(fe,">"),N,be)}function Ae(){return _(fe,xe)}function xe(e,t){if("="==t)return S(fe)}function Ee(e,t){return"enum"==t?(F.marked="keyword",S(Xe)):_(Fe,ce,ke,De)}function Fe(e,t){return h&&$(t)?(F.marked="keyword",S(Fe)):"variable"==e?(D(t),S()):"spread"==e?S(Fe):"["==e?ae(Se,"]"):"{"==e?ae(_e,"}"):void 0}function _e(e,t){return"variable"!=e||F.stream.match(/^\s*:/,!1)?("variable"==e&&(F.marked="property"),"spread"==e?S(Fe):"}"==e?_():"["==e?S(H,I("]"),I(":"),_e):S(I(":"),Fe,ke)):(D(t),S(ke))}function Se(){return _(Fe,ke)}function ke(e,t){if("="==t)return S(z)}function De(e){if(","==e)return S(Ee)}function $e(e,t){if("keyword b"==e&&"else"==t)return S(O("form","else"),j,N)}function Le(e,t){return"await"==t?S(Le):"("==e?S(O(")"),Be,N):void 0}function Be(e){return"var"==e?S(Ee,Re):"variable"==e?S(Re):_(Re)}function Re(e,t){return")"==e?S():";"==e?S(Re):"in"==t||"of"==t?(F.marked="keyword",S(H,Re)):_(H,Re)}function Te(e,t){return"*"==t?(F.marked="keyword",S(Te)):"variable"==e?(D(t),S(Te)):"("==e?S(T,O(")"),se(Oe,")"),N,ue,j,P):h&&"<"==t?S(O(">"),se(Ae,">"),N,Te):void 0}function Me(e,t){return"*"==t?(F.marked="keyword",S(Me)):"variable"==e?(D(t),S(Me)):"("==e?S(T,O(")"),se(Oe,")"),N,ue,P):h&&"<"==t?S(O(">"),se(Ae,">"),N,Me):void 0}function Pe(e,t){return"keyword"==e||"variable"==e?(F.marked="type",S(Pe)):"<"==t?S(O(">"),se(Ae,">"),N):void 0}function Oe(e,t){return"@"==t&&S(H,Oe),"spread"==e?S(Oe):h&&$(t)?(F.marked="keyword",S(Oe)):h&&"this"==e?S(ce,ke):_(Fe,ce,ke)}function Ne(e,t){return"variable"==e?Ie(e,t):je(e,t)}function Ie(e,t){if("variable"==e)return D(t),S(je)}function je(e,t){return"<"==t?S(O(">"),se(Ae,">"),N,je):"extends"==t||"implements"==t||h&&","==e?("implements"==t&&(F.marked="keyword"),S(h?fe:H,je)):"{"==e?S(O("}"),We,N):void 0}function We(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||h&&$(t))&&F.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(F.marked="keyword",S(We)):"variable"==e||"keyword"==F.style?(F.marked="property",S(He,We)):"number"==e||"string"==e?S(He,We):"["==e?S(H,ce,I("]"),He,We):"*"==t?(F.marked="keyword",S(We)):h&&"("==e?_(Me,We):";"==e||","==e?S(We):"}"==e?S():"@"==t?S(H,We):void 0}function He(e,t){if("!"==t)return S(He);if("?"==t)return S(He);if(":"==e)return S(fe,ke);if("="==t)return S(z);var i=F.state.lexical.prev,n=i&&"interface"==i.info;return _(n?Me:Te)}function ze(e,t){return"*"==t?(F.marked="keyword",S(Ye,I(";"))):"default"==t?(F.marked="keyword",S(H,I(";"))):"{"==e?S(se(Ve,"}"),Ye,I(";")):_(j)}function Ve(e,t){return"as"==t?(F.marked="keyword",S(I("variable"))):"variable"==e?_(z,Ve):void 0}function Ue(e){return"string"==e?S():"("==e?_(H):"."==e?_(K):_(qe,Ke,Ye)}function qe(e,t){return"{"==e?ae(qe,"}"):("variable"==e&&D(t),"*"==t&&(F.marked="keyword"),S(Ge))}function Ke(e){if(","==e)return S(qe,Ke)}function Ge(e,t){if("as"==t)return F.marked="keyword",S(qe)}function Ye(e,t){if("from"==t)return F.marked="keyword",S(H)}function Qe(e){return"]"==e?S():_(se(z,"]"))}function Xe(){return _(O("form"),Fe,I("{"),O("}"),se(Je,"}"),N,N)}function Je(){return _(Fe,ke)}function Ze(e,t,i){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(i||0)))}return T.lex=M.lex=!0,P.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new A((e||0)-o,0,"block",!1),localVars:i.localVars,context:i.localVars&&new L(null,null,!1),indented:e||0};return i.globalVars&&"object"==typeof i.globalVars&&(t.globalVars=i.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=v&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==n?i:(t.lastType="operator"!=n||"++"!=r&&"--"!=r?n:"incdec",E(t,i,n,r,e))},indent:function(t,n){if(t.tokenize==v||t.tokenize==y)return e.Pass;if(t.tokenize!=g)return 0;var r,a=n&&n.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var h=t.cc[c];if(h==N)l=l.prev;else if(h!=$e&&h!=P)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=t.cc[t.cc.length-1])&&(r==K||r==G)&&!/^[,\.=+\-*:?[\(]/.test(n));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,d=a==u;return"vardef"==u?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==u&&"{"==a?l.indented:"form"==u?l.indented+o:"stat"==u?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?s||o:0):"switch"!=l.info||d||0==i.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:o):l.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},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:Ze,skipExpression:function(t){E(t,"atom","atom","true",new e.StringStream("",2,null))}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(i("VrN/"))},"/9rB":function(e,t,i){!function(e){"use strict";function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function i(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function n(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",function(t,i){var n=i.client||{},a=i.atoms||{false:!0,true:!0,null:!0},l=i.builtin||o(s),c=i.keywords||o(r),h=i.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=i.support||{},d=i.hooks||{},f=i.dateSQL||{date:!0,time:!0,timestamp:!0},p=!1!==i.backslashStringEscapes,m=i.brackets||/^[\{}\(\)\[\]]/,g=i.punctuation||/^[;.,:]/;function v(e,t){var i=e.next();if(d[i]){var r=d[i](e,t);if(!1!==r)return r}if(u.hexNumber&&("0"==i&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==i||"X"==i)&&e.match(/^'[0-9a-fA-F]*'/)))return"number";if(u.binaryNumber&&(("b"==i||"B"==i)&&e.match(/^'[01]*'/)||"0"==i&&e.match(/^b[01]+/)))return"number";if(i.charCodeAt(0)>47&&i.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==i&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==i||'"'==i&&u.doubleQuote)return t.tokenize=y(i),t.tokenize(e,t);if((u.nCharCast&&("n"==i||"N"==i)||u.charsetCast&&"_"==i&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(u.escapeConstant&&("e"==i||"E"==i)&&("'"==e.peek()||'"'==e.peek()&&u.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=y(e.next(),!0))(e,t)},"keyword";if(u.commentSlashSlash&&"/"==i&&e.eat("/"))return e.skipToEnd(),"comment";if(u.commentHash&&"#"==i||"-"==i&&e.eat("-")&&(!u.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==i&&e.eat("*"))return t.tokenize=function e(t){return function(i,n){var r=i.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=e(t+1):n.tokenize=t>1?e(t-1):v:i.skipToEnd(),"comment"}}(1),t.tokenize(e,t);if("."!=i){if(h.test(i))return e.eatWhile(h),"operator";if(m.test(i))return"bracket";if(g.test(i))return e.eatWhile(g),"punctuation";if("{"==i&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var o=e.current().toLowerCase();return f.hasOwnProperty(o)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":a.hasOwnProperty(o)?"atom":l.hasOwnProperty(o)?"type":c.hasOwnProperty(o)?"keyword":n.hasOwnProperty(o)?"builtin":null}return u.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,t){return function(i,n){for(var r,o=!1;null!=(r=i.next());){if(r==e&&!o){n.tokenize=v;break}o=(p||t)&&!o&&"\\"==r}return"string"}}function w(e,t,i){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:i}}return{startState:function(){return{tokenize:v,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==v&&e.eatSpace())return null;var i=t.tokenize(e,t);if("comment"==i)return i;t.context&&null==t.context.align&&(t.context.align=!0);var n=e.current();return"("==n?w(e,t,")"):"["==n?w(e,t,"]"):t.context&&t.context.type==n&&function(e){e.indent=e.context.indent,e.context=e.context.prev}(t),i},indent:function(i,n){var r=i.context;if(!r)return e.Pass;var o=n.charAt(0)==r.type;return r.align?r.col+(o?0:1):r.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:u.commentSlashSlash?"//":u.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:i}});var r="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function o(e){for(var t={},i=e.split(" "),n=0;n<i.length;++n)t[i[n]]=!0;return t}var s="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";e.defineMIME("text/x-sql",{name:"sql",keywords:o(r+"begin"),builtin:o(s),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(r+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":i}}),e.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(r+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":t,"\\":n}}),e.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(r+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":t,"\\":n}}),e.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(r+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":i,":":i,"?":i,$:i,'"':function(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(r+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:o("date time timestamp"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:o("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:o("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-trino",{name:"sql",keywords:o("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:o("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:o("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:o("date time timestamp zone"),support:o("decimallessFloat zerolessFloat hexNumber")})}(i("VrN/"))},"0tVQ":function(e,t,i){i("FlQf"),i("VJsP"),e.exports=i("WEpk").Array.from},"6B/5":function(module,exports,__webpack_require__){
/*!
* jsoneditor.js
*
* @brief
* JSONEditor is a web-based tool to view, edit, format, and validate JSON.
* It has various modes such as a tree editor, a code editor, and a plain text
* editor.
*
* Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
*
* @license
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.5.11
* @date 2017-01-06
*/
!function(e,t){module.exports=t()}(0,function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=e,i.c=t,i.p="",i(0)}([function(e,t,i){"use strict";var n;try{n=i(1)}catch(e){}var r=i(51),o=i(62),s=i(54);function a(e,t,i){if(!(this instanceof a))throw new Error('JSONEditor constructor called without "new".');var n=s.getInternetExplorerVersion();if(-1!=n&&n<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t)){var r=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys"];Object.keys(t).forEach(function(e){-1===r.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,i)}a.modes={},a.prototype.DEBOUNCE_INTERVAL=150,a.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},a.prototype.destroy=function(){},a.prototype.set=function(e){this.json=e},a.prototype.get=function(){return this.json},a.prototype.setText=function(e){this.json=s.parse(e)},a.prototype.getText=function(){return JSON.stringify(this.json)},a.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},a.prototype.getName=function(){return this.options&&this.options.name},a.prototype.setMode=function(e){var t,i,n=this.container,r=s.extend({},this.options),o=r.mode;r.mode=e;var l=a.modes[e];if(!l)throw new Error('Unknown mode "'+r.mode+'"');try{var c="text"==l.data;if(i=this.getName(),t=this[c?"getText":"get"](),this.destroy(),s.clear(this),s.extend(this,l.mixin),this.create(n,r),this.setName(i),this[c?"setText":"set"](t),"function"==typeof l.load)try{l.load.call(this)}catch(e){console.error(e)}if("function"==typeof r.onModeChange&&e!==o)try{r.onModeChange(e,o)}catch(e){console.error(e)}}catch(e){this._onError(e)}},a.prototype.getMode=function(){return this.options.mode},a.prototype._onError=function(e){if(!this.options||"function"!=typeof this.options.onError)throw e;this.options.onError(e)},a.prototype.setSchema=function(e){if(e){var t;try{t=this.options.ajv||n({allErrors:!0,verbose:!0})}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate()),this.refresh()}else this.validateSchema=null,this.options.schema=null,this.validate(),this.refresh()},a.prototype.validate=function(){},a.prototype.refresh=function(){},a.registerMode=function(e){var t,i;if(s.isArray(e))for(t=0;t<e.length;t++)a.registerMode(e[t]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var n=e.mode;if(n in a.modes)throw new Error('Mode "'+n+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');var r=["setMode","registerMode","modes"];for(t=0;t<r.length;t++)if((i=r[t])in e.mixin)throw new Error('Reserved property "'+i+'" not allowed in mixin');a.modes[n]=e}},a.registerMode(r),a.registerMode(o),e.exports=a},function(e,t,i){"use strict";var n=i(2),r=i(3),o=i(21),s=i(16),a=i(12),l=i(22),c=i(23),h=i(43),u=i(11),d=i(17),f=i(19);e.exports=y,y.prototype.compileAsync=d.compile,y.prototype.addKeyword=i(49),y.ValidationError=i(20);var p="http://json-schema.org/draft-04/schema",m=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;function g(e){return m.test(e)}var v=["removeAdditional","useDefaults","coerceTypes"];function y(e){if(!(this instanceof y))return new y(e);var t=this;function w(e,i){var n;if("string"==typeof e){if(!(n=x(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var r=_(e);n=r.validate||S(r)}var o=n(i);return n.async?"*"==t._opts.async?f(o):o:(t.errors=n.errors,o)}function b(e,i,n,o){if(Array.isArray(e))for(var s=0;s<e.length;s++)b(e[s],void 0,n,o);else $(i=r.normalizeId(i||e.id)),(t._schemas[i]=_(e,n,!0)).meta=o}function C(e,t,i){b(e,t,i,!0)}function A(e,i){var n=e.$schema||t._opts.defaultMeta||function(){var e=t._opts.meta;return t._opts.defaultMeta="object"==typeof e?e.id||e:t._opts.v5?h.META_SCHEMA_ID:p,t._opts.defaultMeta}(),r=t._formats.uri;t._formats.uri="function"==typeof r?g:m;var o=w(n,e);if(t._formats.uri=r,!o&&i){var s="schema is invalid:"+k();if("log"!=t._opts.validateSchema)throw new Error(s);console.error(s)}return o}function x(e){var t=E(e);switch(typeof t){case"object":return t.validate||S(t);case"string":return x(t)}}function E(e){return e=r.normalizeId(e),t._schemas[e]||t._refs[e]}function F(e,i){for(var n in e){var r=e[n];r.meta||i&&!i.test(n)||(t._cache.del(r.jsonStr),delete e[n])}}function _(e,i,n){if("object"!=typeof e)throw new Error("schema should be object");var o=a(e),l=t._cache.get(o);if(l)return l;n=n||!1!==t._opts.addUsedSchema;var c=r.normalizeId(e.id);c&&n&&$(c),!1===t._opts.validateSchema||i||A(e,!0);var h=r.ids.call(t,e),u=new s({id:c,schema:e,localRefs:h,jsonStr:o});return"#"!=c[0]&&n&&(t._refs[c]=u),t._cache.put(o,u),u}function S(e,i){if(e.compiling)return e.validate=s,s.schema=e.schema,s.errors=null,s.root=i||s,!0===e.schema.$async&&(s.async=!0),s;var r,o;e.compiling=!0,e.meta&&(r=t._opts,t._opts=t._metaOpts);try{o=n.call(t,e.schema,i,e.localRefs)}finally{e.compiling=!1,e.meta&&(t._opts=r)}return e.validate=o,e.refs=o.refs,e.refVal=o.refVal,e.root=o.root,o;function s(){var t=e.validate,i=t.apply(null,arguments);return s.errors=t.errors,i}}function k(e,i){if(!(e=e||t.errors))return"No errors";for(var n=void 0===(i=i||{}).separator?", ":i.separator,r=void 0===i.dataVar?"data":i.dataVar,o="",s=0;s<e.length;s++){var a=e[s];a&&(o+=r+a.dataPath+" "+a.message+n)}return o.slice(0,-n.length)}function D(e,i){"string"==typeof i&&(i=new RegExp(i)),t._formats[e]=i}function $(e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}e=this._opts=u.copy(e)||{},this._schemas={},this._refs={},this._formats=l(e.format),this._cache=e.cache||new o,this._loadingSchemas={},this.RULES=c(),this.validate=w,this.compile=function(e){var t=_(e);return t.validate||S(t)},this.addSchema=b,this.addMetaSchema=C,this.validateSchema=A,this.getSchema=x,this.removeSchema=function(e){switch(typeof e){case"undefined":return F(t._schemas),F(t._refs),void t._cache.clear();case"string":var i=E(e);return i&&t._cache.del(i.jsonStr),delete t._schemas[e],void delete t._refs[e];case"object":if(e instanceof RegExp)return F(t._schemas,e),void F(t._refs,e);var n=a(e);t._cache.del(n);var o=e.id;o&&(o=r.normalizeId(o),delete t._schemas[o],delete t._refs[o])}},this.addFormat=D,this.errorsText=k,this._addSchema=_,this._compile=S,e.loopRequired=e.loopRequired||1/0,(e.async||e.transpile)&&d.setup(e),!0===e.beautify&&(e.beautify={indent_size:2}),"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),this._metaOpts=function(){for(var e=u.copy(t._opts),i=0;i<v.length;i++)delete e[v[i]];return e}(),function(){if(!1!==t._opts.meta){var e=i(50);C(e,p,!0),t._refs["http://json-schema.org/schema"]=p}var n=t._opts.schemas;if(!n)return;if(Array.isArray(n))b(n);else for(var r in n)b(n[r],r)}(),e.formats&&function(){for(var e in t._opts.formats){var i=t._opts.formats[e];D(e,i)}}(),e.v5&&h.enable(this),"object"==typeof e.meta&&C(e.meta)}},function(module,exports,__webpack_require__){"use strict";var resolve=__webpack_require__(3),util=__webpack_require__(11),stableStringify=__webpack_require__(12),async=__webpack_require__(17),beautify=function(){try{return __webpack_require__(!function(){var e=new Error('Cannot find module "js-beautify"');throw e.code="MODULE_NOT_FOUND",e}()).js_beautify}catch(e){}}(),validateGenerator=__webpack_require__(18);function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats,RULES=this.RULES;return localCompile(schema,root,localRefs,baseId);function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=!0===_schema.$async;$async&&!opts.transpile&&async.setup(opts);var sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.beautify&&(beautify?sourceCode=beautify(sourceCode,opts.beautify):console.error('"npm install js-beautify" to use beautify option'));var validate,validateCode,transpile=opts._transpileFunc;try{validateCode=$async&&transpile?transpile(sourceCode):sourceCode,eval(validateCode),refVal[0]=validate}catch(e){throw console.error("Error compiling schema, function code:",validateCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.async=!0),validate.sourceCode=sourceCode,validate}function resolveRef(e,t,i){t=resolve.url(e,t);var n,r,o=refs[t];if(void 0!==o)return resolvedRef(n=refVal[o],r="refVal["+o+"]");if(!i){var s=root.refs[t];if(void 0!==s)return resolvedRef(n=root.refVal[s],r=addLocalRef(t,n))}r=addLocalRef(t);var a=resolve.call(self,localCompile,root,t);if(!a){var l=localRefs&&localRefs[t];l&&(a=resolve.inlineRef(l,opts.inlineRefs)?l:compile.call(self,l,root,localRefs,e))}return a?(replaceLocalRef(t,a),resolvedRef(a,r)):void 0}function addLocalRef(e,t){var i=refVal.length;return refVal[i]=t,refs[e]=i,"refVal"+i}function replaceLocalRef(e,t){var i=refs[e];refVal[i]=t}function resolvedRef(e,t){return"object"==typeof e?{code:t,schema:e,inline:!0}:{code:t,async:e&&e.async}}function usePattern(e){var t=patternsHash[e];return void 0===t&&(t=patternsHash[e]=patterns.length,patterns[t]=e),"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return util.toQuotedString(e);case"object":if(null===e)return"null";var t=stableStringify(e),i=defaultsHash[t];return void 0===i&&(i=defaultsHash[t]=defaults.length,defaults[i]=e),"default"+i}}function useCustomRule(e,t,i,n){var r,o=e.definition.compile,s=e.definition.inline,a=e.definition.macro;o?r=o.call(self,t,i):a?(r=a.call(self,t,i),!1!==opts.validateSchema&&self.validateSchema(r,!0)):r=s?s.call(self,n,e.keyword,t,i):e.definition.validate;var l=customRules.length;return customRules[l]=r,{code:"customRule"+l,validate:r}}}function patternCode(e,t){return"var pattern"+e+" = new RegExp("+util.toQuotedString(t[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,t){return t[e]?"var refVal"+e+" = refVal["+e+"];":""}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,t){if(!e.length)return"";for(var i="",n=0;n<e.length;n++)i+=t(n,e);return i}module.exports=compile;var co=__webpack_require__(19),ucs2length=util.ucs2length,equal=__webpack_require__(10),ValidationError=__webpack_require__(20)},function(e,t,i){"use strict";var n=i(4),r=i(10),o=i(11),s=i(16);function a(e,t,i){var n=this._refs[i];if("string"==typeof n){if(!this._refs[n])return a.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[i])instanceof s)return d(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var r,o,c,h=l.call(this,t,i);return h&&(r=h.schema,t=h.root,c=h.baseId),r instanceof s?o=r.validate||e.call(this,r.schema,t,void 0,c):r&&(o=d(r,this._opts.inlineRefs)?r:e.call(this,r,t,void 0,c)),o}function l(e,t){var i=n.parse(t,!1,!0),r=p(i),o=f(e.schema.id);if(r!==o){var a=g(r),c=this._refs[a];if("string"==typeof c)return function(e,t,i){var n=l.call(this,e,t);if(n){var r=n.schema,o=n.baseId;return e=n.root,r.id&&(o=v(o,r.id)),h.call(this,i,o,r,e)}}.call(this,e,c,i);if(c instanceof s)c.validate||this._compile(c),e=c;else if((c=this._schemas[a])instanceof s){if(c.validate||this._compile(c),a==g(t))return{schema:c,root:e,baseId:o};e=c}if(!e.schema)return;o=f(e.schema.id)}return h.call(this,i,o,e.schema,e)}e.exports=a,a.normalizeId=g,a.fullPath=f,a.url=v,a.ids=function(e){var t=g(e.id),i={};return function e(t,s,a){if(Array.isArray(t))for(var l=0;l<t.length;l++)e.call(this,t[l],s+"/"+l,a);else if(t&&"object"==typeof t){if("string"==typeof t.id){var c=a=a?n.resolve(a,t.id):t.id;c=g(c);var h=this._refs[c];if("string"==typeof h&&(h=this._refs[h]),h&&h.schema){if(!r(t,h.schema))throw new Error('id "'+c+'" resolves to more than one schema')}else if(c!=g(s))if("#"==c[0]){if(i[c]&&!r(t,i[c]))throw new Error('id "'+c+'" resolves to more than one schema');i[c]=t}else this._refs[c]=s}for(var u in t)e.call(this,t[u],s+"/"+o.escapeFragment(u),a)}}.call(this,e,f(t,!1),t),i},a.inlineRef=d;var c=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,i,n){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var r=e.hash.split("/"),s=1;s<r.length;s++){var a=r[s];if(a){if(!(i=i[a=o.unescapeFragment(a)]))break;if(i.id&&!c[a]&&(t=v(t,i.id)),i.$ref){var h=v(t,i.$ref),u=l.call(this,n,h);u&&(i=u.schema,n=u.root,t=u.baseId)}}}return i&&i!=n.schema?{schema:i,root:n,baseId:t}:void 0}}var u=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,t){return!1!==t&&(void 0===t||!0===t?function e(t){var i;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if("object"==typeof(i=t[n])&&!e(i))return!1}else for(var r in t){if("$ref"==r)return!1;if("object"==typeof(i=t[r])&&!e(i))return!1}return!0}(e):t?function e(t){var i,n=0;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if("object"==typeof(i=t[r])&&(n+=e(i)),n==1/0)return 1/0}else for(var o in t){if("$ref"==o)return 1/0;if(u[o])n++;else if("object"==typeof(i=t[o])&&(n+=e(i)+1),n==1/0)return 1/0}return n}(e)<=t:void 0)}function f(e,t){return!1!==t&&(e=g(e)),p(n.parse(e,!1,!0))}function p(e){return(e.protocol||"")+(e.protocol?"//":"")+(e.host||"")+(e.path||"")+"#"}var m=/#\/?$/;function g(e){return e?e.replace(m,""):""}function v(e,t){return t=g(t),n.resolve(e,t)}},function(e,t,i){var n=i(5);function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){y(e)&&(e=v(e));return e instanceof r?e.format():r.prototype.format.call(e)},t.Url=r;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(a),c=["%","/","?",";","#"].concat(l),h=["/","?","#"],u=/^[a-z0-9A-Z_-]{0,63}$/,d=/^([a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=i(7);function v(e,t,i){if(e&&w(e)&&e instanceof r)return e;var n=new r;return n.parse(e,t,i),n}function y(e){return"string"==typeof e}function w(e){return"object"==typeof e&&null!==e}function b(e){return null===e}r.prototype.parse=function(e,t,i){if(!y(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var s=o.exec(r);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,r=r.substr(s.length)}if(i||s||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===r.substr(0,2);!v||s&&p[s]||(r=r.substr(2),this.slashes=!0)}if(!p[s]&&(v||s&&!m[s])){for(var w,b,C=-1,A=0;A<h.length;A++){-1!==(x=r.indexOf(h[A]))&&(-1===C||x<C)&&(C=x)}-1!==(b=-1===C?r.lastIndexOf("@"):r.lastIndexOf("@",C))&&(w=r.slice(0,b),r=r.slice(b+1),this.auth=decodeURIComponent(w)),C=-1;for(A=0;A<c.length;A++){var x;-1!==(x=r.indexOf(c[A]))&&(-1===C||x<C)&&(C=x)}-1===C&&(C=r.length),this.host=r.slice(0,C),r=r.slice(C),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var F=this.hostname.split(/\./),_=(A=0,F.length);A<_;A++){var S=F[A];if(S&&!S.match(u)){for(var k="",D=0,$=S.length;D<$;D++)S.charCodeAt(D)>127?k+="x":k+=S[D];if(!k.match(u)){var L=F.slice(0,A),B=F.slice(A+1),R=S.match(d);R&&(L.push(R[1]),B.unshift(R[2])),B.length&&(r="/"+B.join(".")+r),this.hostname=L.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!E){var T=this.hostname.split("."),M=[];for(A=0;A<T.length;++A){var P=T[A];M.push(P.match(/[^A-Za-z0-9_-]/)?"xn--"+n.encode(P):P)}this.hostname=M.join(".")}var O=this.port?":"+this.port:"",N=this.hostname||"";this.host=N+O,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!f[a])for(A=0,_=l.length;A<_;A++){var I=l[A],j=encodeURIComponent(I);j===I&&(j=escape(I)),r=r.split(I).join(j)}var W=r.indexOf("#");-1!==W&&(this.hash=r.substr(W),r=r.slice(0,W));var H=r.indexOf("?");if(-1!==H?(this.search=r.substr(H),this.query=r.substr(H+1),t&&(this.query=g.parse(this.query)),r=r.slice(0,H)):t&&(this.search="",this.query={}),r&&(this.pathname=r),m[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){O=this.pathname||"",P=this.search||"";this.path=O+P}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",n=this.hash||"",r=!1,o="";this.host?r=e+this.host:this.hostname&&(r=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&w(this.query)&&Object.keys(this.query).length&&(o=g.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==r?(r="//"+(r||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):r||(r=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+r+(i=i.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+n},r.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(y(e)){var t=new r;t.parse(e,!1,!0),e=t}var i=new r;if(Object.keys(this).forEach(function(e){i[e]=this[e]},this),i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(i[t]=e[t])}),m[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i;if(e.protocol&&e.protocol!==i.protocol){if(!m[e.protocol])return Object.keys(e).forEach(function(t){i[t]=e[t]}),i.href=i.format(),i;if(i.protocol=e.protocol,e.host||p[e.protocol])i.pathname=e.pathname;else{for(var n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),i.pathname=n.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var o=i.pathname||"",s=i.search||"";i.path=o+s}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var a=i.pathname&&"/"===i.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),c=l||a||i.host&&e.pathname,h=c,u=i.pathname&&i.pathname.split("/")||[],d=(n=e.pathname&&e.pathname.split("/")||[],i.protocol&&!m[i.protocol]);if(d&&(i.hostname="",i.port=null,i.host&&(""===u[0]?u[0]=i.host:u.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),c=c&&(""===n[0]||""===u[0])),l)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,u=n;else if(n.length)u||(u=[]),u.pop(),u=u.concat(n),i.search=e.search,i.query=e.query;else if(!function(e){return null==e}(e.search)){if(d)i.hostname=i.host=u.shift(),(C=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=C.shift(),i.host=i.hostname=C.shift());return i.search=e.search,i.query=e.query,b(i.pathname)&&b(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!u.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var f=u.slice(-1)[0],g=(i.host||e.host)&&("."===f||".."===f)||""===f,v=0,w=u.length;w>=0;w--)"."==(f=u[w])?u.splice(w,1):".."===f?(u.splice(w,1),v++):v&&(u.splice(w,1),v--);if(!c&&!h)for(;v--;v)u.unshift("..");!c||""===u[0]||u[0]&&"/"===u[0].charAt(0)||u.unshift(""),g&&"/"!==u.join("/").substr(-1)&&u.push("");var C,A=""===u[0]||u[0]&&"/"===u[0].charAt(0);d&&(i.hostname=i.host=A?"":u.length?u.shift():"",(C=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=C.shift(),i.host=i.hostname=C.shift()));return(c=c||i.host&&u.length)&&!A&&u.unshift(""),u.length?i.pathname=u.join("/"):(i.pathname=null,i.path=null),b(i.pathname)&&b(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},r.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){var n;(function(e,r){!function(o){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,c=36,h=1,u=26,d=38,f=700,p=72,m=128,g="-",v=/^xn--/,y=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=c-h,A=Math.floor,x=String.fromCharCode;function E(e){throw RangeError(b[e])}function F(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function _(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+F((e=e.replace(w,".")).split("."),t).join(".")}function S(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function k(e){return F(e,function(e){var t="";return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function D(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function $(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function L(e,t,i){var n=0;for(e=i?A(e/f):e>>1,e+=A(e/t);e>C*u>>1;n+=c)e=A(e/C);return A(n+(C+1)*e/(e+d))}function B(e){var t,i,n,r,o,s,a,d,f,v,y=[],w=e.length,b=0,C=m,x=p;for((i=e.lastIndexOf(g))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&E("not-basic"),y.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<w;){for(o=b,s=1,a=c;r>=w&&E("invalid-input"),((d=D(e.charCodeAt(r++)))>=c||d>A((l-b)/s))&&E("overflow"),b+=d*s,!(d<(f=a<=x?h:a>=x+u?u:a-x));a+=c)s>A(l/(v=c-f))&&E("overflow"),s*=v;x=L(b-o,t=y.length+1,0==o),A(b/t)>l-C&&E("overflow"),C+=A(b/t),b%=t,y.splice(b++,0,C)}return k(y)}function R(e){var t,i,n,r,o,s,a,d,f,v,y,w,b,C,F,_=[];for(w=(e=S(e)).length,t=m,i=0,o=p,s=0;s<w;++s)(y=e[s])<128&&_.push(x(y));for(n=r=_.length,r&&_.push(g);n<w;){for(a=l,s=0;s<w;++s)(y=e[s])>=t&&y<a&&(a=y);for(a-t>A((l-i)/(b=n+1))&&E("overflow"),i+=(a-t)*b,t=a,s=0;s<w;++s)if((y=e[s])<t&&++i>l&&E("overflow"),y==t){for(d=i,f=c;!(d<(v=f<=o?h:f>=o+u?u:f-o));f+=c)F=d-v,C=c-v,_.push(x($(v+F%C,0))),d=A(F/C);_.push(x($(d,0))),o=L(i,b,n==r),i=0,++n}++i,++t}return _.join("")}a={version:"1.3.2",ucs2:{decode:S,encode:k},decode:B,encode:R,toASCII:function(e){return _(e,function(e){return y.test(e)?"xn--"+R(e):e})},toUnicode:function(e){return _(e,function(e){return v.test(e)?B(e.slice(4).toLowerCase()):e})}},void 0===(n=function(){return a}.call(t,i,t,e))||(e.exports=n)}()}).call(t,i(6)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,i){"use strict";t.decode=t.parse=i(8),t.encode=t.stringify=i(9)},function(e,t){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;c<l;++c){var h,u,d,f,p=e[c].replace(s,"%20"),m=p.indexOf(n);m>=0?(h=p.substr(0,m),u=p.substr(m+1)):(h=p,u=""),d=decodeURIComponent(h),f=decodeURIComponent(u),i(o,d)?Array.isArray(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}return o}},function(e,t){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var o=encodeURIComponent(i(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return o+encodeURIComponent(i(e))}).join(t):o+encodeURIComponent(i(e[r]))}).join(t):r?encodeURIComponent(i(r))+n+encodeURIComponent(i(e)):""}},function(e,t){"use strict";e.exports=function e(t,i){if(t===i)return!0;var n,r=Array.isArray(t),o=Array.isArray(i);if(r&&o){if(t.length!=i.length)return!1;for(n=0;n<t.length;n++)if(!e(t[n],i[n]))return!1;return!0}if(r!=o)return!1;if(t&&i&&"object"==typeof t&&"object"==typeof i){var s=Object.keys(t);if(s.length!==Object.keys(i).length)return!1;for(n=0;n<s.length;n++)if(void 0===i[s[n]])return!1;for(n=0;n<s.length;n++)if(!e(t[s[n]],i[s[n]]))return!1;return!0}return!1}},function(e,t,i){"use strict";function n(e,t,i){var n=i?" !== ":" === ",r=i?" || ":" && ",o=i?"!":"",s=i?"":"!";switch(e){case"null":return t+n+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+r+"typeof "+t+n+'"object"'+r+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+r+s+"("+t+" % 1))";default:return"typeof "+t+n+'"'+e+'"'}}e.exports={copy:function(e,t){for(var i in t=t||{},e)t[i]=e[i];return t},checkDataType:n,checkDataTypes:function(e,t){switch(e.length){case 1:return n(e[0],t,!0);default:var i="",r=o(e);for(var s in r.array&&r.object&&(i=r.null?"(":"(!"+t+" || ",i+="typeof "+t+' !== "object")',delete r.null,delete r.array,delete r.object),r.number&&delete r.integer,r)i+=(i?" && ":"")+n(s,t,!0);return i}},coerceToTypes:function(e){if(Array.isArray(e)){for(var t=[],i=0;i<e.length;i++){var n=e[i];r[n]&&(t[t.length]=n)}if(t.length)return t}else if(r[e])return[e]},toHash:o,getProperty:l,escapeQuotes:c,ucs2length:function(e){var t,i=0,n=e.length,r=0;for(;r<n;)i++,(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<n&&56320==(64512&(t=e.charCodeAt(r)))&&r++;return i},varOccurences:function(e,t){t+="[^0-9]";var i=e.match(new RegExp(t,"g"));return i?i.length:0},varReplace:function(e,t,i){return t+="([^0-9])",i=i.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),i+"$1")},cleanUpCode:function(e){return e.replace(h,"").replace(u,"").replace(d,"if (!($1))")},cleanUpVarErrors:function(e,t){var i=e.match(f);return i&&2===i.length?t?e.replace(m,"").replace(y,w):e.replace(p,"").replace(g,v):e},schemaHasRules:function(e,t){for(var i in e)if(t[i])return!0},stableStringify:i(12),toQuotedString:b,getPathExpr:function(e,t,i,n){return A(e,i?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,i){var n=b(i?"/"+x(t):l(t));return A(e,n)},getData:function(e,t,i){var n=e.match(C);if(!n)throw new Error("Invalid relative JSON-pointer: "+e);var r=+n[1],o=n[2];if("#"==o){if(r>=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return i[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);var s="data"+(t-r||"");if(!o)return s;for(var a=s,c=o.split("/"),h=0;h<c.length;h++){var u=c[h];u&&(s+=l(E(u)),a+=" && "+s)}return a},unescapeFragment:function(e){return E(decodeURIComponent(e))},escapeFragment:function(e){return encodeURIComponent(x(e))},escapeJsonPointer:x};var r=o(["string","number","integer","boolean","null"]);function o(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;return t}var s=/^[a-z$_][a-z$_0-9]*$/i,a=/'|\\/g;function l(e){return"number"==typeof e?"["+e+"]":s.test(e)?"."+e:"['"+e.replace(a,"\\$&")+"']"}function c(e){return e.replace(a,"\\$&")}var h=/else\s*{\s*}/g,u=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,d=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var f=/[^v\.]errors/g,p=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,m=/var errors = 0;|var vErrors = null;/g,g="return errors === 0;",v="validate.errors = null; return true;",y=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,w="return true;";function b(e){return"'"+c(e)+"'"}var C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}function x(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function E(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},function(e,t,i){var n="undefined"!=typeof JSON?JSON:i(13);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var i=t.space||"";"number"==typeof i&&(i=Array(i+1).join(" "));var s="boolean"==typeof t.cycles&&t.cycles,a=t.replacer||function(e,t){return t},l=t.cmp&&function(e){return function(t){return function(i,n){var r={key:i,value:t[i]},o={key:n,value:t[n]};return e(r,o)}}}(t.cmp),c=[];return function e(t,h,u,d){var f=i?"\n"+new Array(d+1).join(i):"",p=i?": ":":";if(u&&u.toJSON&&"function"==typeof u.toJSON&&(u=u.toJSON()),void 0!==(u=a.call(t,h,u))){if("object"!=typeof u||null===u)return n.stringify(u);if(r(u)){for(var m=[],g=0;g<u.length;g++){var v=e(u,g,u[g],d+1)||n.stringify(null);m.push(f+i+v)}return"["+m.join(",")+f+"]"}if(-1!==c.indexOf(u)){if(s)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(u);var y=o(u).sort(l&&l(u));for(m=[],g=0;g<y.length;g++){var w=e(u,h=y[g],u[h],d+1);if(w){var b=n.stringify(h)+p+w;m.push(f+i+b)}}return c.splice(c.indexOf(u),1),"{"+m.join(",")+f+"}"}}({"":e},"",e,0)};var r=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},i=[];for(var n in e)t.call(e,n)&&i.push(n);return i}},function(e,t,i){t.parse=i(14),t.stringify=i(15)},function(e,t){var i,n,r,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},a=function(e){throw{name:"SyntaxError",message:e,at:i,text:r}},l=function(e){return e&&e!==n&&a("Expected '"+e+"' instead of '"+n+"'"),n=r.charAt(i),i+=1,n},c=function(){var e,t="";for("-"===n&&(t="-",l("-"));n>="0"&&n<="9";)t+=n,l();if("."===n)for(t+=".";l()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,l(),"-"!==n&&"+"!==n||(t+=n,l());n>="0"&&n<="9";)t+=n,l();if(e=+t,isFinite(e))return e;a("Bad number")},h=function(){var e,t,i,r="";if('"'===n)for(;l();){if('"'===n)return l(),r;if("\\"===n)if(l(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)i=16*i+e;r+=String.fromCharCode(i)}else{if("string"!=typeof s[n])break;r+=s[n]}else r+=n}a("Bad string")},u=function(){for(;n&&n<=" ";)l()};o=function(){switch(u(),n){case"{":return function(){var e,t={};if("{"===n){if(l("{"),u(),"}"===n)return l("}"),t;for(;n;){if(e=h(),u(),l(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=o(),u(),"}"===n)return l("}"),t;l(","),u()}}a("Bad object")}();case"[":return function(){var e=[];if("["===n){if(l("["),u(),"]"===n)return l("]"),e;for(;n;){if(e.push(o()),u(),"]"===n)return l("]"),e;l(","),u()}}a("Bad array")}();case'"':return h();case"-":return c();default:return n>="0"&&n<="9"?c():function(){switch(n){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}a("Unexpected '"+n+"'")}()}},e.exports=function(e,t){var s;return r=e,i=0,n=" ",s=o(),u(),n&&a("Syntax error"),"function"==typeof t?function e(i,n){var r,o,s=i[n];if(s&&"object"==typeof s)for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(void 0!==(o=e(s,r))?s[r]=o:delete s[r]);return t.call(i,n,s)}({"":s},""):s}},function(e,t){var i,n,r,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}e.exports=function(e,t,o){var s;if(i="",n="","number"==typeof o)for(s=0;s<o;s+=1)n+=" ";else"string"==typeof o&&(n=o);if(r=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return function e(t,o){var s,l,c,h,u,d=i,f=o[t];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(t)),"function"==typeof r&&(f=r.call(o,t,f)),typeof f){case"string":return a(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(i+=n,u=[],"[object Array]"===Object.prototype.toString.apply(f)){for(h=f.length,s=0;s<h;s+=1)u[s]=e(s,f)||"null";return c=0===u.length?"[]":i?"[\n"+i+u.join(",\n"+i)+"\n"+d+"]":"["+u.join(",")+"]",i=d,c}if(r&&"object"==typeof r)for(h=r.length,s=0;s<h;s+=1)"string"==typeof(l=r[s])&&(c=e(l,f))&&u.push(a(l)+(i?": ":":")+c);else for(l in f)Object.prototype.hasOwnProperty.call(f,l)&&(c=e(l,f))&&u.push(a(l)+(i?": ":":")+c);return c=0===u.length?"{}":i?"{\n"+i+u.join(",\n"+i)+"\n"+d+"}":"{"+u.join(",")+"}",i=d,c}}("",{"":e})}},function(e,t,i){"use strict";var n=i(11);e.exports=function(e){n.copy(e,this)}},function(module,exports,__webpack_require__){"use strict";module.exports={setup:setupAsync,compile:compileAsync};var util=__webpack_require__(11),ASYNC={"*":checkGenerators,"co*":checkGenerators,es7:checkAsyncFunction},TRANSPILE={nodent:getNodent,regenerator:getRegenerator},MODES=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}],regenerator,nodent;function setupAsync(e,t){!1!==t&&(t=!0);var i,n=e.async,r=e.transpile;switch(typeof r){case"string":var o=TRANSPILE[r];if(!o)throw new Error("bad transpiler: "+r);return e._transpileFunc=o(e,t);case"undefined":case"boolean":if("string"==typeof n){if(!(i=ASYNC[n]))throw new Error("bad async mode: "+n);return e.transpile=i(e,t)}for(var s=0;s<MODES.length;s++){var a=MODES[s];if(setupAsync(a,!1))return util.copy(a,e),e.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return e._transpileFunc=e.transpile;default:throw new Error("bad transpiler: "+r)}}function checkGenerators(opts,required){try{return eval("(function*(){})()"),!0}catch(e){if(required)throw new Error("generators not supported")}}function checkAsyncFunction(opts,required){try{return eval("(async function(){})()"),!0}catch(e){if(required)throw new Error("es7 async functions not supported")}}function getRegenerator(e,t){try{return regenerator||(regenerator=__webpack_require__(!function(){var e=new Error('Cannot find module "regenerator"');throw e.code="MODULE_NOT_FOUND",e}())).runtime(),e.async&&!0!==e.async||(e.async="es7"),regeneratorTranspile}catch(e){if(t)throw new Error("regenerator not available")}}function regeneratorTranspile(e){return regenerator.compile(e).code}function getNodent(e,t){try{return nodent||(nodent=__webpack_require__(!function(){var e=new Error('Cannot find module "nodent"');throw e.code="MODULE_NOT_FOUND",e}())({log:!1,dontInstallRequireHook:!0})),"es7"!=e.async&&(e.async&&!0!==e.async&&console.warn("nodent transpiles only es7 async functions"),e.async="es7"),nodentTranspile}catch(e){if(t)throw new Error("nodent not available")}}function nodentTranspile(e){return nodent.compile(e,"",{promises:!0,sourcemap:!1}).code}function compileAsync(e,t){var i,n=this;try{i=this._addSchema(e)}catch(e){return void setTimeout(function(){t(e)})}if(i.validate)setTimeout(function(){t(null,i.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");!function e(t,i,r){var o;try{o=n.compile(t)}catch(e){return void(e.missingSchema?function s(e){var r=e.missingSchema;if(n._refs[r]||n._schemas[r])return i(new Error("Schema "+r+" is loaded but"+e.missingRef+"cannot be resolved"));var o=n._loadingSchemas[r];o?"function"==typeof o?n._loadingSchemas[r]=[o,s]:o[o.length]=s:(n._loadingSchemas[r]=s,n._opts.loadSchema(r,function(e,t){var i=n._loadingSchemas[r];if(delete n._loadingSchemas[r],"function"==typeof i)i(e,t);else for(var o=0;o<i.length;o++)i[o](e,t)}));function s(e,o){if(e)return i(e);if(!n._refs[r]&&!n._schemas[r])try{n.addSchema(o,r)}catch(e){return void i(e)}!function e(t,i,r){var o;try{o=n.compile(t)}catch(e){return void(e.missingSchema?s(e):a(e))}a(null,o);function s(r){var o=r.missingSchema;if(n._refs[o]||n._schemas[o])return i(new Error("Schema "+o+" is loaded but"+r.missingRef+"cannot be resolved"));var s=n._loadingSchemas[o];function a(r,s){if(r)return i(r);if(!n._refs[o]&&!n._schemas[o])try{n.addSchema(s,o)}catch(e){return void i(e)}e(t,i)}s?"function"==typeof s?n._loadingSchemas[o]=[s,a]:s[s.length]=a:(n._loadingSchemas[o]=a,n._opts.loadSchema(o,function(e,t){var i=n._loadingSchemas[o];if(delete n._loadingSchemas[o],"function"==typeof i)i(e,t);else for(var r=0;r<i.length;r++)i[r](e,t)}))}function a(e,t){if(!r)return i(e,t);setTimeout(function(){i(e,t)})}}(t,i)}}(e):a(e))}a(null,o);function s(r){var o=r.missingSchema;if(n._refs[o]||n._schemas[o])return i(new Error("Schema "+o+" is loaded but"+r.missingRef+"cannot be resolved"));var s=n._loadingSchemas[o];function a(r,s){if(r)return i(r);if(!n._refs[o]&&!n._schemas[o])try{n.addSchema(s,o)}catch(e){return void i(e)}e(t,i)}s?"function"==typeof s?n._loadingSchemas[o]=[s,a]:s[s.length]=a:(n._loadingSchemas[o]=a,n._opts.loadSchema(o,function(e,t){var i=n._loadingSchemas[o];if(delete n._loadingSchemas[o],"function"==typeof i)i(e,t);else for(var r=0;r<i.length;r++)i[r](e,t)}))}function a(e,t){if(!r)return i(e,t);setTimeout(function(){i(e,t)})}}(e,t,!0)}}},function(e,t){"use strict";e.exports=function(e,t){var i="",n=!0===e.schema.$async;if(e.isTop){var r=e.isTop,o=e.level=0,s=e.dataLevel=0,a="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,n){e.async=!0;var l="es7"==e.opts.async;e.yieldAwait=l?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],i+=" validate = ",n?l?i+=" (async function ":("co*"==e.opts.async&&(i+="co.wrap"),i+="(function* "):i+=" (function ",i+=" (data, dataPath, parentData, parentDataProperty) { 'use strict'; var vErrors = null; ",i+=" var errors = 0; "}else{o=e.level,a="data"+((s=e.dataLevel)||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),n&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+o+" = errors;"}var c,h="valid"+o,u=!e.opts.allErrors,d="",f="",p=e.schema.type,m=Array.isArray(p);if(p&&e.opts.coerceTypes){var g=e.util.coerceToTypes(p);if(g){var v=e.schemaPath+".type",y=e.errSchemaPath+"/type",w=m?"checkDataTypes":"checkDataType";i+=" if ("+e.util[w](p,a,!0)+") { ";var b="dataType"+o,C="coerced"+o;i+=" var "+b+" = typeof "+a+"; var "+C+" = undefined; ";var A="",x=g;if(x)for(var E,F=-1,_=x.length-1;F<_;)E=x[F+=1],F&&(i+=" if ("+C+" === undefined) { ",A+="}"),"string"==E?i+=" if ("+b+" == 'number' || "+b+" == 'boolean') "+C+" = '' + "+a+"; else if ("+a+" === null) "+C+" = ''; ":"number"==E||"integer"==E?(i+=" if ("+b+" == 'boolean' || "+a+" === null || ("+b+" == 'string' && "+a+" && "+a+" == +"+a+" ","integer"==E&&(i+=" && !("+a+" % 1)"),i+=")) "+C+" = +"+a+"; "):"boolean"==E?i+=" if ("+a+" === 'false' || "+a+" === 0 || "+a+" === null) "+C+" = false; else if ("+a+" === 'true' || "+a+" === 1) "+C+" = true; ":"null"==E&&(i+=" if ("+a+" === '' || "+a+" === 0 || "+a+" === false) "+C+" = null; ");i+=" "+A+" if ("+C+" === undefined) { ",(oe=oe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+y+"\" , params: { type: '",i+=m?""+p.join(","):""+p,i+="' } ",!1!==e.opts.messages&&(i+=" , message: 'should be ",i+=m?""+p.join(","):""+p,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+v+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),i+=" } "):i+=" {} ";var S=i;if(i=oe.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",s)i+=" "+a+" = "+("data"+(s-1||""))+"["+e.dataPathArr[s]+"] = "+C+"; ";else i+=" data = "+C+"; if (parentData !== undefined) parentData[parentDataProperty] = "+C+"; ";i+=" } } "}}var k=e.RULES;if(k)for(var D,$=-1,L=k.length-1;$<L;)if(se(D=k[$+=1])){if(D.type&&(i+=" if ("+e.util.checkDataType(D.type,a)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==D.type&&e.schema.properties){var B=e.schema.properties,R=Object.keys(B);if(R)for(var T,M=-1,P=R.length-1;M<P;){if(void 0!==(N=B[T=R[M+=1]]).default)i+=" if ("+(j=a+e.util.getProperty(T))+" === undefined) "+j+" = ","clone"==e.opts.useDefaults?i+=" "+JSON.stringify(N.default)+" ":i+=" "+e.useDefault(N.default)+" ",i+="; "}}else if("array"==D.type&&Array.isArray(e.schema.items)){var O=e.schema.items;if(O){F=-1;for(var N,I=O.length-1;F<I;){var j;if(void 0!==(N=O[F+=1]).default)i+=" if ("+(j=a+"["+F+"]")+" === undefined) "+j+" = ","clone"==e.opts.useDefaults?i+=" "+JSON.stringify(N.default)+" ":i+=" "+e.useDefault(N.default)+" ",i+="; "}}}var W=D.rules;if(W)for(var H,z=-1,V=W.length-1;z<V;)if(ae(H=W[z+=1])){if(H.custom){B=e.schema[H.keyword];var U=e.useCustomRule(H,B,e.schema,e),q=U.code+".errors",K=(v=e.schemaPath+"."+H.keyword,y=e.errSchemaPath+"/"+H.keyword,"errs"+o),G=(F="i"+o,"ruleErr"+o),Y=H.definition,Q=Y.async,X=Y.inline,J=Y.macro;if(Q&&!e.async)throw new Error("async keyword in sync schema");if(X||J||(i+=q+" = null;"),i+="var "+K+" = errors;var valid"+o+";",X&&Y.statements)i+=" "+U.validate;else if(J){var Z=e.util.copy(e);Z.level++,Z.schema=U.validate,Z.schemaPath="";var ee=e.compositeRule;e.compositeRule=Z.compositeRule=!0;var te=e.validate(Z).replace(/validate\.schema/g,U.code);e.compositeRule=Z.compositeRule=ee,i+=" "+te}else if(Y.compile||Y.validate){(oe=oe||[]).push(i),i="",i+=" "+U.code+".call( ",e.opts.passContext?i+="this":i+="self";U.validate.length;Y.compile||!1===Y.schema?i+=" , "+a+" ":i+=" , validate.schema"+v+" , "+a+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath),i+=s?" , data"+(s-1||"")+" , "+e.dataPathArr[s]+" ":" , parentData , parentDataProperty ";var ie=i+=" ) ";i=oe.pop(),!1!==Y.errors&&(i+=Q?" var "+(q="customErrors"+o)+" = null; try { valid"+o+" = "+e.yieldAwait+ie+"; } catch (e) { valid"+o+" = false; if (e instanceof ValidationError) "+q+" = e.errors; else throw e; } ":" "+U.code+".errors = null; ")}i+="if (! ",X?Y.statements?i+=" valid"+o+" ":i+=" ("+U.validate+") ":J?i+=" valid"+Z.level+" ":Q?!1===Y.errors?i+=" ("+e.yieldAwait+ie+") ":i+=" valid"+o+" ":i+=" "+ie+" ",i+=") { ",c=H.keyword,(oe=oe||[]).push(i),i="",(oe=oe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+y+"\" , params: { keyword: '"+H.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+H.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+v+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),i+=" } "):i+=" {} ";S=i;i=oe.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var ne=i;i=oe.pop(),X?Y.errors?"full"!=Y.errors&&(i+=" for (var "+F+"="+K+"; "+F+"<errors; "+F+"++) { var "+G+" = vErrors["+F+"]; if ("+G+".dataPath === undefined) { "+G+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+G+".schemaPath === undefined) { "+G+'.schemaPath = "'+y+'"; } ',e.opts.verbose&&(i+=" "+G+".schema = validate.schema"+v+"; "+G+".data = "+a+"; "),i+=" } "):!1===Y.errors?i+=" "+ne+" ":(i+=" if ("+K+" == errors) { "+ne+" } else { for (var "+F+"="+K+"; "+F+"<errors; "+F+"++) { var "+G+" = vErrors["+F+"]; if ("+G+".dataPath === undefined) { "+G+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+G+".schemaPath === undefined) { "+G+'.schemaPath = "'+y+'"; } ',e.opts.verbose&&(i+=" "+G+".schema = validate.schema"+v+"; "+G+".data = "+a+"; "),i+=" } } "):J?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+y+"\" , params: { keyword: '"+H.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+H.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+v+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false ")):!1===Y.errors?i+=" "+ne+" ":(i+=" if (Array.isArray("+q+")) { if (vErrors === null) vErrors = "+q+"; else vErrors.concat("+q+"); errors = vErrors.length; for (var "+F+"="+K+"; "+F+"<errors; "+F+"++) { var "+G+" = vErrors["+F+"]; "+G+".dataPath = (dataPath || '') + "+e.errorPath+"; "+G+'.schemaPath = "'+y+'"; ',e.opts.verbose&&(i+=" "+G+".schema = validate.schema"+v+"; "+G+".data = "+a+"; "),i+=" } } else { "+ne+" } "),c=void 0,i+=" } ",u&&(i+=" else { ")}else i+=" "+H.code(e,H.keyword)+" ";u&&(d+="}")}if(u&&(i+=" "+d+" ",d=""),D.type&&(i+=" } ",p&&p===D.type)){var re=!0;i+=" else { ";v=e.schemaPath+".type",y=e.errSchemaPath+"/type";(oe=oe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+y+"\" , params: { type: '",i+=m?""+p.join(","):""+p,i+="' } ",!1!==e.opts.messages&&(i+=" , message: 'should be ",i+=m?""+p.join(","):""+p,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+v+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),i+=" } "):i+=" {} ";S=i;i=oe.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}u&&(i+=" if (errors === ",i+=r?"0":"errs_"+o,i+=") { ",f+="}")}if(p&&!re&&(!e.opts.coerceTypes||!g)){var oe;v=e.schemaPath+".type",y=e.errSchemaPath+"/type",w=m?"checkDataTypes":"checkDataType";i+=" if ("+e.util[w](p,a,!0)+") { ",(oe=oe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+y+"\" , params: { type: '",i+=m?""+p.join(","):""+p,i+="' } ",!1!==e.opts.messages&&(i+=" , message: 'should be ",i+=m?""+p.join(","):""+p,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+v+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),i+=" } "):i+=" {} ";S=i;i=oe.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }"}function se(e){for(var t=0;t<e.rules.length;t++)if(ae(e.rules[t]))return!0}function ae(t){return void 0!==e.schema[t.keyword]||"properties"==t.keyword&&(!1===e.schema.additionalProperties||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}return u&&(i+=" "+f+" "),r?(n?(i+=" if (errors === 0) return true; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" });"):i+=" var "+h+" = errors === errs_"+o+";",i=e.util.cleanUpCode(i),r&&u&&(i=e.util.cleanUpVarErrors(i,n)),i}},function(e,t){var i=Array.prototype.slice;function n(e){var t=this,n=i.call(arguments,1);return new Promise(function(i,s){if("function"==typeof e&&(e=e.apply(t,n)),!e||"function"!=typeof e.next)return i(e);function a(t){var i;try{i=e.next(t)}catch(e){return s(e)}c(i)}function l(t){var i;try{i=e.throw(t)}catch(e){return s(e)}c(i)}function c(e){if(e.done)return i(e.value);var n=r.call(t,e.value);return n&&o(n)?n.then(a,l):l(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}a()})}function r(e){return e?o(e)?e:function(e){var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||s(t.prototype))}(e)||s(e)?n.call(this,e):"function"==typeof e?function(e){var t=this;return new Promise(function(n,r){e.call(t,function(e,t){if(e)return r(e);arguments.length>2&&(t=i.call(arguments,1)),n(t)})})}.call(this,e):Array.isArray(e)?function(e){return Promise.all(e.map(r,this))}.call(this,e):function(e){return Object==e.constructor}(e)?function(e){for(var t=new e.constructor,i=Object.keys(e),n=[],s=0;s<i.length;s++){var a=i[s],l=r.call(this,e[a]);l&&o(l)?c(l,a):t[a]=e[a]}return Promise.all(n).then(function(){return t});function c(e,i){t[i]=void 0,n.push(e.then(function(e){t[i]=e}))}}.call(this,e):e:e}function o(e){return"function"==typeof e.then}function s(e){return"function"==typeof e.next&&"function"==typeof e.throw}e.exports=n.default=n.co=n,n.wrap=function(e){return t.__generatorFunction__=e,t;function t(){return n.call(this,e.apply(this,arguments))}}},function(e,t){"use strict";function i(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}e.exports=i,i.prototype=Object.create(Error.prototype),i.prototype.constructor=i},function(e,t){"use strict";var i=e.exports=function(){this._cache={}};i.prototype.put=function(e,t){this._cache[e]=t},i.prototype.get=function(e){return this._cache[e]},i.prototype.del=function(e){delete this._cache[e]},i.prototype.clear=function(){this._cache={}}},function(e,t,i){"use strict";var n=i(11),r=/^\d\d\d\d-(\d\d)-(\d\d)$/,o=[0,31,29,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,a=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i,u=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;function d(e){e="full"==e?"full":"fast";var t=n.copy(d[e]);for(var i in d.compare)t[i]={validate:t[i],compare:d.compare[i]};return t}function f(e){var t=e.match(r);if(!t)return!1;var i=+t[1],n=+t[2];return i>=1&&i<=12&&n>=1&&n<=o[i]}function p(e,t){var i=e.match(s);if(!i)return!1;var n=i[1],r=i[2],o=i[3],a=i[5];return n<=23&&r<=59&&o<=59&&(!t||a)}e.exports=d,d.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:v,uuid:c,"json-pointer":h,"relative-json-pointer":u},d.full={date:f,time:p,"date-time":function(e){var t=e.split(m);return f(t[0])&&p(t[1],!0)},uri:function(e){return g.test(e)&&l.test(e)},email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&a.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:v,uuid:c,"json-pointer":h,"relative-json-pointer":u},d.compare={date:y,time:w,"date-time":function(e,t){if(!e||!t)return;e=e.split(m),t=t.split(m);var i=y(e[0],t[0]);if(void 0===i)return;return i||w(e[1],t[1])}};var m=/t|\s/i;var g=/\/|\:/;function v(e){try{return new RegExp(e),!0}catch(e){return!1}}function y(e,t){if(e&&t)return e>t?1:e<t?-1:e===t?0:void 0}function w(e,t){if(e&&t&&(e=e.match(s),t=t.match(s),e&&t))return(e=e[1]+e[2]+e[3]+(e[4]||""))>(t=t[1]+t[2]+t[3]+(t[4]||""))?1:e<t?-1:e===t?0:void 0}},function(e,t,i){"use strict";var n=i(24),r=i(11);e.exports=function(){var e=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}];return e.all=["type","additionalProperties","patternProperties"],e.keywords=["additionalItems","$schema","id","title","description","default"],e.types=["number","integer","string","array","object","boolean","null"],e.forEach(function(t){t.rules=t.rules.map(function(t){return e.all.push(t),{keyword:t,code:n[t]}})}),e.keywords=r.toHash(e.all.concat(e.keywords)),e.all=r.toHash(e.all),e.types=r.toHash(e.types),e}},function(e,t,i){"use strict";e.exports={$ref:i(25),allOf:i(26),anyOf:i(27),dependencies:i(28),enum:i(29),format:i(30),items:i(31),maximum:i(32),minimum:i(32),maxItems:i(33),minItems:i(33),maxLength:i(34),minLength:i(34),maxProperties:i(35),minProperties:i(35),multipleOf:i(36),not:i(37),oneOf:i(38),pattern:i(39),properties:i(40),required:i(41),uniqueItems:i(42),validate:i(18)}},function(e,t){"use strict";e.exports=function(e,t){var i,n,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),u="valid"+o;if("#"==a||"#/"==a)e.isRoot?(i=e.async,n="validate"):(i=!0===e.root.schema.$async,n="root.refVal[0]");else{var d=e.resolveRef(e.baseId,a,e.isRoot);if(void 0===d){var f="can't resolve reference "+a+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(f),(v=v||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { ref: '"+e.util.escapeQuotes(a)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(a)+"' "),e.opts.verbose&&(r+=" , schema: "+e.util.toQuotedString(a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ";var p=r;r=v.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+p+"]); ":r+=" validate.errors = ["+p+"]; return false; ":r+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var m=new Error(f);throw m.missingRef=e.resolve.url(e.baseId,a),m.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(m.missingRef)),m}console.log(f),c&&(r+=" if (true) { ")}}else if(d.inline){var g=e.util.copy(e);g.level++,g.schema=d.schema,g.schemaPath="",g.errSchemaPath=a,r+=" "+e.validate(g).replace(/validate\.schema/g,d.code)+" ",c&&(r+=" if (valid"+g.level+") { ")}else i=d.async,n=d.code}if(n){var v;(v=v||[]).push(r),r="",e.opts.passContext?r+=" "+n+".call(this, ":r+=" "+n+"( ",r+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(r+=" + "+e.errorPath),r+=s?" , data"+(s-1||"")+" , "+e.dataPathArr[s]+" ":" , parentData , parentDataProperty ";var y=r+=") ";if(r=v.pop(),i){if(!e.async)throw new Error("async schema referenced by sync schema");r+=" try { ",c&&(r+="var "+u+" ="),r+=" "+e.yieldAwait+" "+y+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",c&&(r+=" if ("+u+") { ")}else r+=" if (!"+y+") { if (vErrors === null) vErrors = "+n+".errors; else vErrors = vErrors.concat("+n+".errors); errors = vErrors.length; } ",c&&(r+=" else { ")}return r}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.schema[t],r=e.schemaPath+"."+t,o=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,a=e.util.copy(e),l="";a.level++;var c=n;if(c)for(var h,u=-1,d=c.length-1;u<d;)h=c[u+=1],e.util.schemaHasRules(h,e.RULES.all)&&(a.schema=h,a.schemaPath=r+"["+u+"]",a.errSchemaPath=o+"/"+u,i+=" "+e.validate(a)+" ",s&&(i+=" if (valid"+a.level+") { ",l+="}"));return s&&(i+=" "+l.slice(0,-1)),i=e.util.cleanUpCode(i)}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="errs__"+n,d=e.util.copy(e),f="";if(d.level++,o.every(function(t){return e.util.schemaHasRules(t,e.RULES.all)})){i+=" var "+u+" = errors; var "+h+" = false; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0;var m=o;if(m)for(var g,v=-1,y=m.length-1;v<y;)g=m[v+=1],d.schema=g,d.schemaPath=s+"["+v+"]",d.errSchemaPath=a+"/"+v,i+=" "+e.validate(d)+" "+h+" = "+h+" || valid"+d.level+"; if (!"+h+") { ",f+="}";e.compositeRule=d.compositeRule=p,i+=" "+f+" if (!"+h+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } "),i=e.util.cleanUpCode(i)}else l&&(i+=" if (true) { ");return i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="errs__"+n,u=e.util.copy(e),d="";u.level++;var f={},p={};for(y in o){var m=o[y],g=Array.isArray(m)?p:f;g[y]=m}i+="var "+h+" = errors;";var v=e.errorPath;for(var y in i+="var missing"+n+";",p){g=p[y],i+=" if ("+c+e.util.getProperty(y)+" !== undefined && ( ";var w=g;if(w)for(var b,C=-1,A=w.length-1;C<A;){b=w[C+=1],C&&(i+=" || ");var x=e.util.getProperty(b);i+=" ( "+c+x+" === undefined && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?b:x)+") ) "}i+=")) { ";var E="missing"+n,F="' + "+E+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(v,E,!0):v+" + "+E);var _=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { property: '"+e.util.escapeQuotes(y)+"', missingProperty: '"+F+"', depsCount: "+g.length+", deps: '"+e.util.escapeQuotes(1==g.length?g[0]:g.join(", "))+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should have ",1==g.length?i+="property "+e.util.escapeQuotes(g[0]):i+="properties "+e.util.escapeQuotes(g.join(", ")),i+=" when property "+e.util.escapeQuotes(y)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var S=i;i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(d+="}",i+=" else { ")}for(var y in e.errorPath=v,f){m=f[y];e.util.schemaHasRules(m,e.RULES.all)&&(i+=" valid"+u.level+" = true; if ("+c+"['"+y+"'] !== undefined) { ",u.schema=m,u.schemaPath=s+e.util.getProperty(y),u.errSchemaPath=a+"/"+e.util.escapeFragment(y),i+=" "+e.validate(u)+" } ",l&&(i+=" if (valid"+u.level+") { ",d+="}"))}return l&&(i+=" "+d+" if ("+h+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u=e.opts.v5&&o.$data,d=u?e.util.getData(o.$data,r,e.dataPathArr):o;u&&(i+=" var schema"+n+" = "+d+"; ",d="schema"+n);var f="i"+n;u||(i+=" var schema"+n+" = validate.schema"+s+";"),i+="var "+h+";",u&&(i+=" if (schema"+n+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+n+")) "+h+" = false; else {"),i+=h+" = false;for (var "+f+"=0; "+f+"<schema"+n+".length; "+f+"++) if (equal("+c+", schema"+n+"["+f+"])) { "+h+" = true; break; }",u&&(i+=" } "),i+=" if (!"+h+") { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var m=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||"");if(!1===e.opts.format)return l&&(i+=" if (true) { "),i;var h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;if(h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n),h){i+=" var "+(d="format"+n)+" = formats["+u+"]; var isObject"+n+" = typeof "+d+" == 'object' && !("+d+" instanceof RegExp) && "+d+".validate; if (isObject"+n+") { var async"+n+" = "+d+".async; "+d+" = "+d+".validate; } if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),i+=" ("+d+" && !(typeof "+d+" == 'function' ? ",e.async?i+=" (async"+n+" ? "+e.yieldAwait+" "+d+"("+c+") : "+d+"("+c+")) ":i+=" "+d+"("+c+") ",i+=" : "+d+".test("+c+")))) {"}else{var d;if(!(d=e.formats[o]))return l&&(i+=" if (true) { "),i;var f="object"==typeof d&&!(d instanceof RegExp)&&d.validate;if(f){var p=!0===d.async;d=d.validate}if(p){if(!e.async)throw new Error("async format in sync schema");var m="formats"+e.util.getProperty(o)+".validate";i+=" if (!("+e.yieldAwait+" "+m+"("+c+"))) { "}else{i+=" if (! ";m="formats"+e.util.getProperty(o);f&&(m+=".validate"),i+="function"==typeof d?" "+m+"("+c+") ":" "+m+".test("+c+") ",i+=") { "}}var g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { format: ',i+=h?""+u:""+e.util.toQuotedString(o),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match format \"",i+=h?"' + "+u+" + '":""+e.util.escapeQuotes(o),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var v=i;return i=g.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="errs__"+n,d=e.util.copy(e),f="";d.level++;var p=d.dataLevel=e.dataLevel+1,m="data"+p;if(i+="var "+u+" = errors;var "+h+";",Array.isArray(o)){var g=e.schema.additionalItems;if(!1===g){i+=" "+h+" = "+c+".length <= "+o.length+"; ";var v=a;a=e.errSchemaPath+"/additionalItems",i+=" if (!"+h+") { ";var y=y||[];y.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { limit: '+o.length+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var w=i;i=y.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",a=v,l&&(f+="}",i+=" else { ")}var b=o;if(b)for(var C,A=-1,x=b.length-1;A<x;)if(C=b[A+=1],e.util.schemaHasRules(C,e.RULES.all)){i+=" valid"+d.level+" = true; if ("+c+".length > "+A+") { ";var E=c+"["+A+"]";d.schema=C,d.schemaPath=s+"["+A+"]",d.errSchemaPath=a+"/"+A,d.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,!0),d.dataPathArr[p]=A;var F=e.validate(d);e.util.varOccurences(F,m)<2?i+=" "+e.util.varReplace(F,m,E)+" ":i+=" var "+m+" = "+E+"; "+F+" ",i+=" } ",l&&(i+=" if (valid"+d.level+") { ",f+="}")}if("object"==typeof g&&e.util.schemaHasRules(g,e.RULES.all)){d.schema=g,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" valid"+d.level+" = true; if ("+c+".length > "+o.length+") { for (var i"+n+" = "+o.length+"; i"+n+" < "+c+".length; i"+n+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+n,e.opts.jsonPointers,!0);E=c+"[i"+n+"]";d.dataPathArr[p]="i"+n;F=e.validate(d);e.util.varOccurences(F,m)<2?i+=" "+e.util.varReplace(F,m,E)+" ":i+=" var "+m+" = "+E+"; "+F+" ",l&&(i+=" if (!valid"+d.level+") break; "),i+=" } } ",l&&(i+=" if (valid"+d.level+") { ",f+="}")}}else if(e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=s,d.errSchemaPath=a,i+=" for (var i"+n+" = 0; i"+n+" < "+c+".length; i"+n+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+n,e.opts.jsonPointers,!0);E=c+"[i"+n+"]";d.dataPathArr[p]="i"+n;F=e.validate(d);e.util.varOccurences(F,m)<2?i+=" "+e.util.varReplace(F,m,E)+" ":i+=" var "+m+" = "+E+"; "+F+" ",l&&(i+=" if (!valid"+d.level+") break; "),i+=" } ",l&&(i+=" if (valid"+d.level+") { ",f+="}")}return l&&(i+=" "+f+" if ("+u+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n);var d="maximum"==t,f=d?"exclusiveMaximum":"exclusiveMinimum",p=e.schema[f],m=e.opts.v5&&p&&p.$data,g=d?"<":">",v=d?">":"<";if(m){var y=e.util.getData(p.$data,r,e.dataPathArr),w="exclusive"+n,b="' + "+(x="op"+n)+" + '";i+=" var schemaExcl"+n+" = "+y+"; ",i+=" var exclusive"+n+"; if (typeof "+(y="schemaExcl"+n)+" != 'boolean' && typeof "+y+" != 'undefined') { ";var C=f;(E=E||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(C||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var A=i;i=E.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+A+"]); ":i+=" validate.errors = ["+A+"]; return false; ":i+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "),i+=" ((exclusive"+n+" = "+y+" === true) ? "+c+" "+v+"= "+u+" : "+c+" "+v+" "+u+")) { var op"+n+" = exclusive"+n+" ? '"+g+"' : '"+g+"=';"}else{b=g;(w=!0===p)||(b+="=");var x="'"+b+"'";i+=" if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "),i+=" "+c+" "+v,w&&(i+="="),i+=" "+u+") {"}var E;C=t;(E=E||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(C||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { comparison: '+x+", limit: "+u+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+b+" ",i+=h?"' + "+u:o+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";A=i;return i=E.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+A+"]); ":i+=" validate.errors = ["+A+"]; return false; ":i+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n),i+="if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "),i+=" "+c+".length "+("maxItems"==t?">":"<")+" "+u+") { ";var d=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { limit: '+u+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=h?"' + "+u+" + '":""+o,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var p=i;return i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n);var d="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "),!1===e.opts.unicode?i+=" "+c+".length ":i+=" ucs2length("+c+") ",i+=" "+d+" "+u+") { ";var f=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { limit: '+u+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+u+" + '":""+o,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var m=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n),i+="if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "),i+=" Object.keys("+c+").length "+("maxProperties"==t?">":"<")+" "+u+") { ";var d=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { limit: '+u+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=h?"' + "+u+" + '":""+o,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var p=i;return i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n),i+="var division"+n+";if (",h&&(i+=" "+u+" !== undefined && ( typeof "+u+" != 'number' || "),i+=" (division"+n+" = "+c+" / "+u+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+n+" !== parseInt(division"+n+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { multipleOf: '+u+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+u:o+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var f=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="errs__"+n,u=e.util.copy(e);if(u.level++,e.util.schemaHasRules(o,e.RULES.all)){u.schema=o,u.schemaPath=s,u.errSchemaPath=a,i+=" var "+h+" = errors; ";var d,f=e.compositeRule;e.compositeRule=u.compositeRule=!0,u.createErrors=!1,u.opts.allErrors&&(d=u.opts.allErrors,u.opts.allErrors=!1),i+=" "+e.validate(u)+" ",u.createErrors=!0,d&&(u.opts.allErrors=d),e.compositeRule=u.compositeRule=f,i+=" if (valid"+u.level+") { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var m=i;i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(i+=" if (false) { ");return i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="errs__"+n,d=e.util.copy(e),f="";d.level++,i+="var "+u+" = errors;var prevValid"+n+" = false;var "+h+" = false; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0;var m=o;if(m)for(var g,v=-1,y=m.length-1;v<y;)g=m[v+=1],e.util.schemaHasRules(g,e.RULES.all)?(d.schema=g,d.schemaPath=s+"["+v+"]",d.errSchemaPath=a+"/"+v,i+=" "+e.validate(d)+" "):i+=" var valid"+d.level+" = true; ",v&&(i+=" if (valid"+d.level+" && prevValid"+n+") "+h+" = false; else { ",f+="}"),i+=" if (valid"+d.level+") "+h+" = prevValid"+n+" = true;";e.compositeRule=d.compositeRule=p,i+=f+"if (!"+h+") { ";var w=w||[];w.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var b=i;return i=w.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h=e.opts.v5&&o.$data,u=h?e.util.getData(o.$data,r,e.dataPathArr):o;h&&(i+=" var schema"+n+" = "+u+"; ",u="schema"+n);var d=h?"(new RegExp("+u+"))":e.usePattern(o);i+="if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),i+=" !"+d+".test("+c+") ) { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { pattern: ',i+=h?""+u:""+e.util.toQuotedString(o),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+u+" + '":""+e.util.escapeQuotes(o),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+s:""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var p=i;return i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="errs__"+n,d=e.util.copy(e),f="";d.level++;var p=d.dataLevel=e.dataLevel+1,m="data"+p,g=Object.keys(o||{}),v=e.schema.patternProperties||{},y=Object.keys(v),w=e.schema.additionalProperties,b=g.length||y.length,C=!1===w,A="object"==typeof w&&Object.keys(w).length,x=e.opts.removeAdditional,E=C||A||x,F=e.schema.required;if(F&&(!e.opts.v5||!F.$data)&&F.length<e.opts.loopRequired)var _=e.util.toHash(F);if(e.opts.v5)var S=e.schema.patternGroups||{},k=Object.keys(S);if(i+="var "+u+" = errors;var valid"+d.level+" = true;",E){if(i+=" for (var key"+n+" in "+c+") { ",b){if(i+=" var isAdditional"+n+" = !(false ",g.length)if(g.length>5)i+=" || validate.schema"+s+"[key"+n+"] ";else{var D=g;if(D)for(var $=-1,L=D.length-1;$<L;)q=D[$+=1],i+=" || key"+n+" == "+e.util.toQuotedString(q)+" "}if(y.length){var B=y;if(B)for(var R=-1,T=B.length-1;R<T;)te=B[R+=1],i+=" || "+e.usePattern(te)+".test(key"+n+") "}if(e.opts.v5&&k&&k.length){var M=k;if(M){R=-1;for(var P=M.length-1;R<P;)oe=M[R+=1],i+=" || "+e.usePattern(oe)+".test(key"+n+") "}}i+=" ); if (isAdditional"+n+") { "}if("all"==x)i+=" delete "+c+"[key"+n+"]; ";else{var O=e.errorPath,N="' + key"+n+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,"key"+n,e.opts.jsonPointers)),C)if(x)i+=" delete "+c+"[key"+n+"]; ";else{i+=" valid"+d.level+" = false; ";var I=a;a=e.errSchemaPath+"/additionalProperties",(pe=pe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { additionalProperty: '"+N+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var j=i;i=pe.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a=I,l&&(i+=" break; ")}else if(A)if("failing"==x){i+=" var "+u+" = errors; ";var W=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=w,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+n,e.opts.jsonPointers);var H=c+"[key"+n+"]";d.dataPathArr[p]="key"+n;var z=e.validate(d);e.util.varOccurences(z,m)<2?i+=" "+e.util.varReplace(z,m,H)+" ":i+=" var "+m+" = "+H+"; "+z+" ",i+=" if (!valid"+d.level+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"[key"+n+"]; } ",e.compositeRule=d.compositeRule=W}else{d.schema=w,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+n,e.opts.jsonPointers);H=c+"[key"+n+"]";d.dataPathArr[p]="key"+n;z=e.validate(d);e.util.varOccurences(z,m)<2?i+=" "+e.util.varReplace(z,m,H)+" ":i+=" var "+m+" = "+H+"; "+z+" ",l&&(i+=" if (!valid"+d.level+") break; ")}e.errorPath=O}b&&(i+=" } "),i+=" } ",l&&(i+=" if (valid"+d.level+") { ",f+="}")}var V=e.opts.useDefaults&&!e.compositeRule;if(g.length){var U=g;if(U)for(var q,K=-1,G=U.length-1;K<G;){var Y=o[q=U[K+=1]];if(e.util.schemaHasRules(Y,e.RULES.all)){var Q=e.util.getProperty(q),X=(H=c+Q,V&&void 0!==Y.default);d.schema=Y,d.schemaPath=s+Q,d.errSchemaPath=a+"/"+e.util.escapeFragment(q),d.errorPath=e.util.getPath(e.errorPath,q,e.opts.jsonPointers),d.dataPathArr[p]=e.util.toQuotedString(q);z=e.validate(d);if(e.util.varOccurences(z,m)<2){z=e.util.varReplace(z,m,H);var J=H}else{J=m;i+=" var "+m+" = "+H+"; "}if(X)i+=" "+z+" ";else{if(_&&_[q]){i+=" if ("+J+" === undefined) { valid"+d.level+" = false; ";O=e.errorPath,I=a;var Z=e.util.escapeQuotes(q);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(O,q,e.opts.jsonPointers)),a=e.errSchemaPath+"/required",(pe=pe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+Z+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+Z+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";j=i;i=pe.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a=I,e.errorPath=O,i+=" } else { "}else i+=l?" if ("+J+" === undefined) { valid"+d.level+" = true; } else { ":" if ("+J+" !== undefined) { ";i+=" "+z+" } "}}l&&(i+=" if (valid"+d.level+") { ",f+="}")}}var ee=y;if(ee)for(var te,ie=-1,ne=ee.length-1;ie<ne;){Y=v[te=ee[ie+=1]];if(e.util.schemaHasRules(Y,e.RULES.all)){d.schema=Y,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(te),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(te),i+=" for (var key"+n+" in "+c+") { if ("+e.usePattern(te)+".test(key"+n+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+n,e.opts.jsonPointers);H=c+"[key"+n+"]";d.dataPathArr[p]="key"+n;z=e.validate(d);e.util.varOccurences(z,m)<2?i+=" "+e.util.varReplace(z,m,H)+" ":i+=" var "+m+" = "+H+"; "+z+" ",l&&(i+=" if (!valid"+d.level+") break; "),i+=" } ",l&&(i+=" else valid"+d.level+" = true; "),i+=" } ",l&&(i+=" if (valid"+d.level+") { ",f+="}")}}if(e.opts.v5){var re=k;if(re)for(var oe,se=-1,ae=re.length-1;se<ae;){var le=S[oe=re[se+=1]];Y=le.schema;if(e.util.schemaHasRules(Y,e.RULES.all)){d.schema=Y,d.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(oe)+".schema",d.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(oe)+"/schema",i+=" var pgPropCount"+n+" = 0; for (var key"+n+" in "+c+") { if ("+e.usePattern(oe)+".test(key"+n+")) { pgPropCount"+n+"++; ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+n,e.opts.jsonPointers);H=c+"[key"+n+"]";d.dataPathArr[p]="key"+n;z=e.validate(d);e.util.varOccurences(z,m)<2?i+=" "+e.util.varReplace(z,m,H)+" ":i+=" var "+m+" = "+H+"; "+z+" ",l&&(i+=" if (!valid"+d.level+") break; "),i+=" } ",l&&(i+=" else valid"+d.level+" = true; "),i+=" } ",l&&(i+=" if (valid"+d.level+") { ",f+="}");var ce=le.minimum,he=le.maximum;if(void 0!==ce||void 0!==he){i+=" var "+h+" = true; ";I=a;if(void 0!==ce){var ue=ce,de="minimum",fe="less";i+=" "+h+" = pgPropCount"+n+" >= "+ce+"; ",a=e.errSchemaPath+"/patternGroups/minimum",i+=" if (!"+h+") { ",(pe=pe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { reason: '"+de+"', limit: "+ue+", pattern: '"+e.util.escapeQuotes(oe)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have "+fe+" than "+ue+' properties matching pattern "'+e.util.escapeQuotes(oe)+"\"' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";j=i;i=pe.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",void 0!==he&&(i+=" else ")}if(void 0!==he){var pe;ue=he,de="maximum",fe="more";i+=" "+h+" = pgPropCount"+n+" <= "+he+"; ",a=e.errSchemaPath+"/patternGroups/maximum",i+=" if (!"+h+") { ",(pe=pe||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { reason: '"+de+"', limit: "+ue+", pattern: '"+e.util.escapeQuotes(oe)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have "+fe+" than "+ue+' properties matching pattern "'+e.util.escapeQuotes(oe)+"\"' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";j=i;i=pe.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}a=I,l&&(i+=" if ("+h+") { ",f+="}")}}}}return l&&(i+=" "+f+" if ("+u+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u=e.opts.v5&&o.$data,d=u?e.util.getData(o.$data,r,e.dataPathArr):o;if(u&&(i+=" var schema"+n+" = "+d+"; ",d="schema"+n),!u)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var f=[],p=o;if(p)for(var m=-1,g=p.length-1;m<g;){D=p[m+=1];var v=e.schema.properties[D];v&&e.util.schemaHasRules(v,e.RULES.all)||(f[f.length]=D)}}else f=o;if(u||f.length){var y=e.errorPath,w=u||f.length>=e.opts.loopRequired;if(l)if(i+=" var missing"+n+"; ",w){u||(i+=" var schema"+n+" = validate.schema"+s+"; ");var b="' + "+(S="schema"+n+"["+(E="i"+n)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,S,e.opts.jsonPointers)),i+=" var "+h+" = true; ",u&&(i+=" if (schema"+n+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+n+")) "+h+" = false; else {"),i+=" for (var "+E+" = 0; "+E+" < schema"+n+".length; "+E+"++) { "+h+" = "+c+"[schema"+n+"["+E+"]] !== undefined; if (!"+h+") break; } ",u&&(i+=" } "),i+=" if (!"+h+") { ",(_=_||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var C=i;i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var A=f;if(A)for(var x,E=-1,F=A.length-1;E<F;){x=A[E+=1],E&&(i+=" || "),i+=" ( "+c+(L=e.util.getProperty(x))+" === undefined && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?x:L)+") ) "}i+=") { ";var _;b="' + "+(S="missing"+n)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(y,S,!0):y+" + "+S),(_=_||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";C=i;i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(w){u||(i+=" var schema"+n+" = validate.schema"+s+"; ");var S;b="' + "+(S="schema"+n+"["+(E="i"+n)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,S,e.opts.jsonPointers)),u&&(i+=" if (schema"+n+" && !Array.isArray(schema"+n+")) { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema"+n+" !== undefined) { "),i+=" for (var "+E+" = 0; "+E+" < schema"+n+".length; "+E+"++) { if ("+c+"[schema"+n+"["+E+"]] === undefined) { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",u&&(i+=" } ")}else{var k=f;if(k){E=-1;for(var D,$=k.length-1;E<$;){D=k[E+=1];var L=e.util.getProperty(D);b=e.util.escapeQuotes(D);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(y,D,e.opts.jsonPointers)),i+=" if ("+c+L+" === undefined) { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}e.errorPath=y}else l&&(i+=" if (true) {");return i}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u=e.opts.v5&&o.$data,d=u?e.util.getData(o.$data,r,e.dataPathArr):o;if(u&&(i+=" var schema"+n+" = "+d+"; ",d="schema"+n),(o||u)&&!1!==e.opts.uniqueItems){u&&(i+=" var "+h+"; if ("+d+" === false || "+d+" === undefined) "+h+" = true; else if (typeof "+d+" != 'boolean') "+h+" = false; else { "),i+=" var "+h+" = true; if ("+c+".length > 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+h+" = false; break outer; } } } } ",u&&(i+=" } "),i+=" if (!"+h+") { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { i: i, j: j } ',!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=u?"validate.schema"+s:""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var p=i;i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i}},function(e,t,i){"use strict";var n="https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json";function r(e){return{not:{items:{not:e}}}}e.exports={enable:function(e){var t={switch:i(44),constant:i(45),_formatLimit:i(46),patternRequired:i(47)};if(!1!==e._opts.meta){var o=i(48);e.addMetaSchema(o,n)}function s(i,n,r){var o={inline:r||t[i],statements:!0,errors:"full"};n&&(o.type=n),e.addKeyword(i,o)}s("constant"),e.addKeyword("contains",{type:"array",macro:r}),s("formatMaximum","string",t._formatLimit),s("formatMinimum","string",t._formatLimit),e.addKeyword("exclusiveFormatMaximum"),e.addKeyword("exclusiveFormatMinimum"),e.addKeyword("patternGroups"),s("patternRequired","object"),s("switch")},META_SCHEMA_ID:n}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="errs__"+n,d=e.util.copy(e),f="";d.level++;var p,m="ifPassed"+e.level;i+="var "+m+";";var g=o;if(g)for(var v,y=-1,w=g.length-1;y<w;){if(v=g[y+=1],y&&!p&&(i+=" if (!"+m+") { ",f+="}"),v.if&&e.util.schemaHasRules(v.if,e.RULES.all)){i+=" var "+u+" = errors; ";var b=e.compositeRule;if(e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.schema=v.if,d.schemaPath=s+"["+y+"].if",d.errSchemaPath=a+"/"+y+"/if",i+=" "+e.validate(d)+" ",d.createErrors=!0,e.compositeRule=d.compositeRule=b,i+=" "+m+" = valid"+d.level+"; if ("+m+") { ","boolean"==typeof v.then){if(!1===v.then){(A=A||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { caseIndex: '+y+" } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var C=i;i=A.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" var valid"+d.level+" = "+v.then+"; "}else d.schema=v.then,d.schemaPath=s+"["+y+"].then",d.errSchemaPath=a+"/"+y+"/then",i+=" "+e.validate(d)+" ";i+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } } "}else if(i+=" "+m+" = true; ","boolean"==typeof v.then){if(!1===v.then){var A;(A=A||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { caseIndex: '+y+" } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";C=i;i=A.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" var valid"+d.level+" = "+v.then+"; "}else d.schema=v.then,d.schemaPath=s+"["+y+"].then",d.errSchemaPath=a+"/"+y+"/then",i+=" "+e.validate(d)+" ";p=v.continue}return i+=f+"var "+h+" = valid"+d.level+"; ",i=e.util.cleanUpCode(i)}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u=e.opts.v5&&o.$data,d=u?e.util.getData(o.$data,r,e.dataPathArr):o;u&&(i+=" var schema"+n+" = "+d+"; ",d="schema"+n),u||(i+=" var schema"+n+" = validate.schema"+s+";"),i+="var "+h+" = equal("+c+", schema"+n+"); if (!"+h+") { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'constant' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var p=i;return i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }"}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n;if(i+="var "+h+" = undefined;",!1===e.opts.format)return i+=" "+h+" = true; ";var u=e.schema.format,d=e.opts.v5&&u.$data,f="";if(d){var p=e.util.getData(u.$data,r,e.dataPathArr);i+=" var "+(m="format"+n)+" = formats["+p+"] , "+(g="compare"+n)+" = "+m+" && "+m+".compare;"}else{var m;if(!(m=e.formats[u])||!m.compare)return i+=" "+h+" = true; ";var g="formats"+e.util.getProperty(u)+".compare"}var v="formatMaximum"==t,y="exclusiveFormat"+(v?"Maximum":"Minimum"),w=e.schema[y],b=e.opts.v5&&w&&w.$data,C=v?"<":">",A="result"+n,x=e.opts.v5&&o.$data,E=x?e.util.getData(o.$data,r,e.dataPathArr):o;if(x&&(i+=" var schema"+n+" = "+E+"; ",E="schema"+n),b){var F=e.util.getData(w.$data,r,e.dataPathArr),_="exclusive"+n,S="' + "+("op"+n)+" + '";i+=" var schemaExcl"+n+" = "+F+"; ",i+=" if (typeof "+(F="schemaExcl"+n)+" != 'boolean' && "+F+" !== undefined) { "+h+" = false; ";var k=y;($=$||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(k||"_exclusiveFormatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: {} ',!1!==e.opts.messages&&(i+=" , message: '"+y+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var D=i;i=$.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+D+"]); ":i+=" validate.errors = ["+D+"]; return false; ":i+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(f+="}",i+=" else { "),x&&(i+=" if ("+E+" === undefined) "+h+" = true; else if (typeof "+E+" != 'string') "+h+" = false; else { ",f+="}"),d&&(i+=" if (!"+g+") "+h+" = true; else { ",f+="}"),i+=" var "+A+" = "+g+"("+c+", ",i+=x?""+E:""+e.util.toQuotedString(o),i+=" ); if ("+A+" === undefined) "+h+" = false; var exclusive"+n+" = "+F+" === true; if ("+h+" === undefined) { "+h+" = exclusive"+n+" ? "+A+" "+C+" 0 : "+A+" "+C+"= 0; } if (!"+h+") var op"+n+" = exclusive"+n+" ? '"+C+"' : '"+C+"=';"}else{S=C;(_=!0===w)||(S+="=");x&&(i+=" if ("+E+" === undefined) "+h+" = true; else if (typeof "+E+" != 'string') "+h+" = false; else { ",f+="}"),d&&(i+=" if (!"+g+") "+h+" = true; else { ",f+="}"),i+=" var "+A+" = "+g+"("+c+", ",i+=x?""+E:""+e.util.toQuotedString(o),i+=" ); if ("+A+" === undefined) "+h+" = false; if ("+h+" === undefined) "+h+" = "+A+" "+C,_||(i+="="),i+=" 0;"}i+=f+"if (!"+h+") { ";var $;k=t;($=$||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(k||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+'" , params: { limit: ',i+=x?""+E:""+e.util.toQuotedString(o),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+' "',i+=x?"' + "+E+" + '":""+e.util.escapeQuotes(o),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=x?"validate.schema"+s:""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";D=i;return i=$.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+D+"]); ":i+=" validate.errors = ["+D+"]; return false; ":i+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="}"}},function(e,t){"use strict";e.exports=function(e,t){var i=" ",n=e.level,r=e.dataLevel,o=e.schema[t],s=e.schemaPath+"."+t,a=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,c="data"+(r||""),h="valid"+n,u="key"+n,d="patternMatched"+n,f="";i+="var "+h+" = true;";var p=o;if(p)for(var m,g=-1,v=p.length-1;g<v;){m=p[g+=1],i+=" var "+d+" = false; for (var "+u+" in "+c+") { "+d+" = "+e.usePattern(m)+".test("+u+"); if ("+d+") break; } ";var y=e.util.escapeQuotes(m);i+=" if (!"+d+") { "+h+" = false; var err = ",!1!==e.createErrors?(i+=" { keyword: 'patternRequired' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+a+"\" , params: { missingPattern: '"+y+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should have property matching pattern \\'"+y+"\\'' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",l&&(f+="}",i+=" else { ")}return i+=""+f}},function(e,t){e.exports={id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema (v5 proposals)",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},$data:{type:"object",required:["$data"],properties:{$data:{type:"string",format:"relative-json-pointer"}},additionalProperties:!1}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{anyOf:[{type:"number",minimum:0,exclusiveMinimum:!0},{$ref:"#/definitions/$data"}]},maximum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxLength:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minLength:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},pattern:{anyOf:[{type:"string",format:"regex"},{$ref:"#/definitions/$data"}]},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minItems:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},uniqueItems:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},maxProperties:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minProperties:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},required:{anyOf:[{$ref:"#/definitions/stringArray"},{$ref:"#/definitions/$data"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{anyOf:[{type:"array",minItems:1,uniqueItems:!0},{$ref:"#/definitions/$data"}]},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},format:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMaximum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMinimum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},exclusiveFormatMaximum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},exclusiveFormatMinimum:{anyOf:[{type:"boolean",default:!1},{$ref:"#/definitions/$data"}]},constant:{anyOf:[{},{$ref:"#/definitions/$data"}]},contains:{$ref:"#"},patternGroups:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},schema:{$ref:"#"}},additionalProperties:!1},default:{}},switch:{type:"array",items:{required:["then"],properties:{if:{$ref:"#"},then:{anyOf:[{type:"boolean"},{$ref:"#"}]},continue:{type:"boolean"}},additionalProperties:!1,dependencies:{continue:["if"]}}}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"],formatMaximum:["format"],formatMinimum:["format"],exclusiveFormatMaximum:["formatMaximum"],exclusiveFormatMinimum:["formatMinimum"]},default:{}}},function(e,t){"use strict";var i=/^[a-z_$][a-z0-9_$]*$/i;e.exports=function(e,t){var n=this;if(this.RULES.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!i.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){var r=t.type;if(Array.isArray(r)){var o,s=r.length;for(o=0;o<s;o++)l(r[o]);for(o=0;o<s;o++)a(e,r[o],t)}else r&&l(r),a(e,r,t)}function a(e,t,i){for(var r,o=0;o<n.RULES.length;o++){var s=n.RULES[o];if(s.type==t){r=s;break}}r||(r={type:t,rules:[]},n.RULES.push(r));var a={keyword:e,definition:i,custom:!0};r.rules.push(a)}function l(e){if(!n.RULES.types[e])throw new Error("Unknown type "+e)}this.RULES.keywords[e]=!0,this.RULES.all[e]=!0}},function(e,t){e.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}},function(e,t,i){"use strict";var n=i(52),r=i(53),o=i(56),s=i(57),a=i(58),l=i(61),c=i(54),h={create:function(e,t){if(!e)throw new Error("No container element provided.");this.container=e,this.dom={},this.highlighter=new n,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.errorNodes=[],this.node=null,this.focusTarget=null,this._setOptions(t),this.options.history&&"view"!==this.options.mode&&(this.history=new r(this)),this._createFrame(),this._createTable()},destroy:function(){this.frame&&this.container&&this.frame.parentNode==this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null)},_setOptions:function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null},e)for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.setSchema(this.options.schema),this._debouncedValidate=c.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL)},set:function(e,t){if(t&&(console.warn('Second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=t),e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var i={field:this.options.name,value:e},n=new a(this,i);this._setRoot(n),this.validate();this.node.expand(!1),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},get:function(){if(this.focusTarget){var e=a.getNodeFromTarget(this.focusTarget);e&&e.blur()}return this.node?this.node.getValue():void 0},getText:function(){return JSON.stringify(this.get())},setText:function(e){this.set(c.parse(e))},setName:function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},getName:function(){return this.options.name},focus:function(){var e=this.content.querySelector("[contenteditable=true]");e?e.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(e=this.frame.querySelector("button"))&&e.focus()},clear:function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},_setRoot:function(e){this.clear(),this.node=e,this.tbody.appendChild(e.getDom())},search:function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},expandAll:function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},collapseAll:function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},_onAction:function(e,t){this.history&&this.history.add(e,t),this._onChange()},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}},validate:function(){this.errorNodes&&this.errorNodes.forEach(function(e){e.setError(null)});var e=this.node;if(e){var t=e.validate(),i=[];if(this.validateSchema)this.validateSchema(e.getValue())||(i=this.validateSchema.errors.map(function(e){return c.improveSchemaError(e)}).map(function(t){return{node:e.findNode(t.dataPath),error:t}}).filter(function(e){return null!=e.node}));this.errorNodes=t.concat(i).reduce(function(e,t){return t.node.findParents().map(function(e){return{node:e,child:t.node,error:{message:"object"===e.type?"Contains invalid properties":"Contains invalid items"}}}).concat(e,[t])},[]).map(function(e){return e.node.setError(e.error,e.child),e.node})}},refresh:function(){this.node&&this.node.updateDom({recurse:!0})},startAutoScroll:function(e){var t=this,i=this.content,n=c.getAbsoluteTop(i),r=i.clientHeight,o=n+r;e<n+24&&i.scrollTop>0?this.autoScrollStep=(n+24-e)/3:e>o-24&&r+i.scrollTop<i.scrollHeight?this.autoScrollStep=(o-24-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){t.autoScrollStep?i.scrollTop-=t.autoScrollStep:t.stopAutoScroll()},50)):this.stopAutoScroll()},stopAutoScroll:function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},setSelection:function(e){e&&("scrollTop"in e&&this.content&&(this.content.scrollTop=e.scrollTop),e.nodes&&this.select(e.nodes),e.range&&c.setSelectionOffset(e.range),e.dom&&e.dom.focus())},getSelection:function(){var e=c.getSelectionOffset();return e&&"DIV"!==e.container.nodeName&&(e=null),{dom:this.focusTarget,range:e,nodes:this.multiselection.nodes.slice(0),scrollTop:this.content?this.content.scrollTop:0}},scrollTo:function(e,t){var i=this.content;if(i){var n=this;n.animateTimeout&&(clearTimeout(n.animateTimeout),delete n.animateTimeout),n.animateCallback&&(n.animateCallback(!1),delete n.animateCallback);var r=i.clientHeight,o=i.scrollHeight-r,s=Math.min(Math.max(e-r/4,0),o),a=function(){var e=i.scrollTop,r=s-e;Math.abs(r)>3?(i.scrollTop+=r/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=s,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},_createFrame:function(){this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame);var e=this;function t(t){e._onEvent&&e._onEvent(t)}this.frame.onclick=function(e){var i=e.target;t(e),"BUTTON"==i.nodeName&&e.preventDefault()},this.frame.oninput=t,this.frame.onchange=t,this.frame.onkeydown=t,this.frame.onkeyup=t,this.frame.oncut=t,this.frame.onpaste=t,this.frame.onmousedown=t,this.frame.onmouseup=t,this.frame.onmouseover=t,this.frame.onmouseout=t,c.addEventListener(this.frame,"focus",t,!0),c.addEventListener(this.frame,"blur",t,!0),this.frame.onfocusin=t,this.frame.onfocusout=t,this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var i=document.createElement("button");i.type="button",i.className="jsoneditor-expand-all",i.title="Expand all fields",i.onclick=function(){e.expandAll()},this.menu.appendChild(i);var n=document.createElement("button");if(n.type="button",n.title="Collapse all fields",n.className="jsoneditor-collapse-all",n.onclick=function(){e.collapseAll()},this.menu.appendChild(n),this.history){var r=document.createElement("button");r.type="button",r.className="jsoneditor-undo jsoneditor-separator",r.title="Undo last action (Ctrl+Z)",r.onclick=function(){e._onUndo()},this.menu.appendChild(r),this.dom.undo=r;var s=document.createElement("button");s.type="button",s.className="jsoneditor-redo",s.title="Redo (Ctrl+Shift+Z)",s.onclick=function(){e._onRedo()},this.menu.appendChild(s),this.dom.redo=s,this.history.onChange=function(){r.disabled=!e.history.canUndo(),s.disabled=!e.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var a=this;this.modeSwitcher=new l(this.menu,this.options.modes,this.options.mode,function(e){a.modeSwitcher.destroy(),a.setMode(e),a.modeSwitcher.focus()})}this.options.search&&(this.searchBox=new o(this,this.menu))},_onUndo:function(){this.history&&(this.history.undo(),this._onChange())},_onRedo:function(){this.history&&(this.history.redo(),this._onChange())},_onEvent:function(e){"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(this.focusTarget=e.target),"mousedown"==e.type&&this._startDragDistance(e),"mousemove"!=e.type&&"mouseup"!=e.type&&"click"!=e.type||this._updateDragDistance(e);var t=a.getNodeFromTarget(e.target);if(t&&t.selected){if("click"==e.type){if(e.target==t.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"==e.type&&a.onDragStart(this.multiselection.nodes,e)}else"mousedown"==e.type&&(this.deselect(),t&&e.target==t.dom.drag?a.onDragStart(t,e):(!t||e.target!=t.dom.field&&e.target!=t.dom.value&&e.target!=t.dom.select)&&this._onMultiSelectStart(e));t&&t.onEvent(e)},_startDragDistance:function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},_updateDragDistance:function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,i=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+i*i),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||this.dragDistanceEvent.dragDistance>10,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},_onMultiSelectStart:function(e){var t=a.getNodeFromTarget(e.target);if("tree"===this.options.mode&&void 0===this.options.onEditable){this.multiselection={start:t||null,end:null,nodes:[]},this._startDragDistance(e);var i=this;this.mousemove||(this.mousemove=c.addEventListener(window,"mousemove",function(e){i._onMultiSelect(e)})),this.mouseup||(this.mouseup=c.addEventListener(window,"mouseup",function(e){i._onMultiSelectEnd(e)}))}},_onMultiSelect:function(e){if(e.preventDefault(),this._updateDragDistance(e),e.hasMoved){var t=a.getNodeFromTarget(e.target);t&&(null==this.multiselection.start&&(this.multiselection.start=t),this.multiselection.end=t),this.deselect();var i=this.multiselection.start,n=this.multiselection.end||this.multiselection.start;i&&n&&(this.multiselection.nodes=this._findTopLevelNodes(i,n),this.select(this.multiselection.nodes))}},_onMultiSelectEnd:function(e){this.multiselection.nodes[0]&&this.multiselection.nodes[0].dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&(c.removeEventListener(window,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(c.removeEventListener(window,"mouseup",this.mouseup),delete this.mouseup)},deselect:function(e){this.multiselection.nodes.forEach(function(e){e.setSelected(!1)}),this.multiselection.nodes=[],e&&(this.multiselection.start=null,this.multiselection.end=null)},select:function(e){if(!Array.isArray(e))return this.select([e]);if(e){this.deselect(),this.multiselection.nodes=e.slice(0);var t=e[0];e.forEach(function(e){e.setSelected(!0,e===t)})}},_findTopLevelNodes:function(e,t){for(var i=e.getNodePath(),n=t.getNodePath(),r=0;r<i.length&&i[r]===n[r];)r++;var o=i[r-1],s=i[r],a=n[r];if(s&&a||(o.parent?(s=o,a=o,o=o.parent):(s=o.childs[0],a=o.childs[o.childs.length-1])),o&&s&&a){var l=o.childs.indexOf(s),c=o.childs.indexOf(a),h=Math.min(l,c),u=Math.max(l,c);return o.childs.slice(h,u+1)}return[]},_onKeyDown:function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,r=!1;if(9==t){var o=this;setTimeout(function(){c.selectContentEditable(o.focusTarget)},0)}if(this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),r=!0;else if(114==t||i&&71==t){n?this.searchBox.previous(!0):this.searchBox.next(!0),r=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),r=!0):i&&n&&90==t&&(this._onRedo(),r=!0)),r&&(e.preventDefault(),e.stopPropagation())},_createTable:function(){var e,t=document.createElement("div");t.className="jsoneditor-outer",this.contentOuter=t,this.content=document.createElement("div"),this.content.className="jsoneditor-tree",t.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&((e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e)),(e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e),e=document.createElement("col"),this.colgroupContent.appendChild(e),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(t)},showContextMenu:function(e,t){var i=[],n=this;i.push({text:"Duplicate",title:"Duplicate selected fields (Ctrl+D)",className:"jsoneditor-duplicate",click:function(){a.onDuplicate(n.multiselection.nodes)}}),i.push({text:"Remove",title:"Remove selected fields (Ctrl+Del)",className:"jsoneditor-remove",click:function(){a.onRemove(n.multiselection.nodes)}}),new s(i,{close:t}).show(e,this.content)}};e.exports=[{mode:"tree",mixin:h,data:"json"},{mode:"view",mixin:h,data:"json"},{mode:"form",mixin:h,data:"json"}]},function(e,t){"use strict";function i(){this.locked=!1}i.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},i.prototype.unhighlight=function(){if(!this.locked){var e=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},i.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},i.prototype.lock=function(){this.locked=!0},i.prototype.unlock=function(){this.locked=!1},e.exports=i},function(e,t,i){"use strict";i(54);function n(e){this.editor=e,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},appendNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.appendChild(t)})}},insertBeforeNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.insertBefore(t,e.beforeNode)})}},insertAfterNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){var t=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(e.node,t),t=i})}},removeNodes:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,i)})},redo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})}},duplicateNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){var t=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(i,t),t=i})}},moveNodes:{undo:function(e){e.nodes.forEach(function(t){e.oldBeforeNode.parent.moveBefore(t,e.oldBeforeNode)})},redo:function(e){e.nodes.forEach(function(t){e.newBeforeNode.parent.moveBefore(t,e.newBeforeNode)})}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}n.prototype.onChange=function(){},n.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()},n.prototype.clear=function(){this.history=[],this.index=-1,this.onChange()},n.prototype.canUndo=function(){return this.index>=0},n.prototype.canRedo=function(){return this.index<this.history.length-1},n.prototype.undo=function(){if(this.canUndo()){var e=this.history[this.index];if(e){var t=this.actions[e.action];t&&t.undo?(t.undo(e.params),e.params.oldSelection&&this.editor.setSelection(e.params.oldSelection)):console.error(new Error('unknown action "'+e.action+'"'))}this.index--,this.onChange()}},n.prototype.redo=function(){if(this.canRedo()){this.index++;var e=this.history[this.index];if(e){var t=this.actions[e.action];t&&t.redo?(t.redo(e.params),e.params.newSelection&&this.editor.setSelection(e.params.newSelection)):console.error(new Error('unknown action "'+e.action+'"'))}this.onChange()}},n.prototype.destroy=function(){this.editor=null,this.history=[],this.index=-1},e.exports=n},function(e,t,i){"use strict";var n=i(55);t.parse=function(e){try{return JSON.parse(e)}catch(i){throw t.validate(e),i}},t.sanitize=function(e){var t=[],i=0,n=e.match(/^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);function r(){return e.charAt(i)}function o(){return e.charAt(i+1)}function s(){for(var e=t.length-1;e>=0;){var i=t[e];if(" "!==i&&"\n"!==i&&"\r"!==i&&"\t"!==i)return i;e--}return""}function a(){for(i+=2;i<e.length&&("*"!==r()||"/"!==o());)i++;i+=2}function l(){for(i+=2;i<e.length&&"\n"!==r();)i++}function c(n){t.push('"'),i++;for(var o=r();i<e.length&&o!==n;)'"'===o&&"\\"!==e.charAt(i-1)&&t.push("\\"),"\\"===o&&(i++,"'"!==(o=r())&&t.push("\\")),t.push(o),i++,o=r();o===n&&(t.push('"'),i++)}function h(){for(var e="",n=r(),o=/[a-zA-Z_$\d]/;o.test(n);)e+=n,i++,n=r();-1===["null","true","false"].indexOf(e)?t.push('"'+e+'"'):t.push(e)}for(n&&(e=n[3]);i<e.length;){var u=r();"/"===u&&"*"===o()?a():"/"===u&&"/"===o()?l():"'"===u||'"'===u?c(u):/[a-zA-Z_$]/.test(u)&&-1!==["{",","].indexOf(s())?h():(t.push(u),i++)}return t.join("")},t.escapeUnicodeChars=function(e){return e.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})},t.validate=function(e){void 0!==n?n.parse(e):JSON.parse(e)},t.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},t.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},t.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":t.isArray(e)?"array":"object"};var r=/^https?:\/\/\S+$/;t.isUrl=function(e){return("string"==typeof e||e instanceof String)&&r.test(e)},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.getAbsoluteLeft=function(e){return e.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0},t.getAbsoluteTop=function(e){return e.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0},t.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},t.removeClassName=function(e,t){var i=e.className.split(" "),n=i.indexOf(t);-1!=n&&(i.splice(n,1),e.className=i.join(" "))},t.stripFormatting=function(e){for(var i=e.childNodes,n=0,r=i.length;n<r;n++){var o=i[n];o.style&&o.removeAttribute("style");var s=o.attributes;if(s)for(var a=s.length-1;a>=0;a--){var l=s[a];!0===l.specified&&o.removeAttribute(l.name)}t.stripFormatting(o)}},t.setEndOfContentEditable=function(e){var t,i;document.createRange&&((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(i=window.getSelection()).removeAllRanges(),i.addRange(t))},t.selectContentEditable=function(e){var t,i;e&&"DIV"==e.nodeName&&(window.getSelection&&document.createRange&&((i=document.createRange()).selectNodeContents(e),(t=window.getSelection()).removeAllRanges(),t.addRange(i)))},t.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},t.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},t.getSelectionOffset=function(){var e=t.getSelection();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer==e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null},t.setSelectionOffset=function(e){if(document.createRange&&window.getSelection&&window.getSelection()){var i=document.createRange();e.container.firstChild||e.container.appendChild(document.createTextNode("")),i.setStart(e.container.firstChild,e.startOffset),i.setEnd(e.container.firstChild,e.endOffset),t.setSelection(i)}},t.getInnerText=function(e,i){if(void 0==i&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),e.nodeValue)return i.flush()+e.nodeValue;if(e.hasChildNodes()){for(var n=e.childNodes,r="",o=0,s=n.length;o<s;o++){var a=n[o];if("DIV"==a.nodeName||"P"==a.nodeName){var l=n[o-1],c=l?l.nodeName:void 0;c&&"DIV"!=c&&"P"!=c&&"BR"!=c&&(r+="\n",i.flush()),r+=t.getInnerText(a,i),i.set("\n")}else"BR"==a.nodeName?(r+=i.flush(),i.set("\n")):r+=t.getInnerText(a,i)}return r}return"P"==e.nodeName&&-1!=t.getInternetExplorerVersion()?i.flush():""},t.getInternetExplorerVersion=function(){if(-1==o){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}o=e}return o},t.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var o=-1;t.addEventListener=function(e,i,n,r){if(e.addEventListener)return void 0===r&&(r=!1),"mousewheel"===i&&t.isFirefox()&&(i="DOMMouseScroll"),e.addEventListener(i,n,r),n;if(e.attachEvent){var o=function(){return n.call(e,window.event)};return e.attachEvent("on"+i,o),o}},t.removeEventListener=function(e,i,n,r){e.removeEventListener?(void 0===r&&(r=!1),"mousewheel"===i&&t.isFirefox()&&(i="DOMMouseScroll"),e.removeEventListener(i,n,r)):e.detachEvent&&e.detachEvent("on"+i,n)},t.parsePath=function e(t){var i,n;if(0===t.length)return[];var r=t.match(/^\.(\w+)/);if(r)i=r[1],n=t.substr(i.length+1);else{if("["!==t[0])throw new SyntaxError("Failed to parse path");var o=t.indexOf("]");if(-1===o)throw new SyntaxError("Character ] expected in path");if(1===o)throw new SyntaxError("Index expected after [");var s=t.substring(1,o);"'"===s[0]&&(s='"'+s.substring(1,s.length-1)+'"'),i="*"===s?s:JSON.parse(s),n=t.substr(o+1)}return[i].concat(e(n))},t.improveSchemaError=function(e){if("enum"===e.keyword&&Array.isArray(e.schema)){var t=e.schema;if(t){if((t=t.map(function(e){return JSON.stringify(e)})).length>5){var i=["("+(t.length-5)+" more...)"];(t=t.slice(0,5)).push(i)}e.message="should be equal to one of: "+t.join(", ")}}return"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e},t.insideRect=function(e,t,i){var n=void 0!==i?i:0;return t.left-n>=e.left&&t.right+n<=e.right&&t.top-n>=e.top&&t.bottom+n<=e.bottom},t.debounce=function(e,t,i){var n;return function(){var r=this,o=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(r,o)},t),s&&e.apply(r,o)}},t.textDiff=function(e,t){for(var i=t.length,n=0,r=e.length,o=t.length;t.charAt(n)===e.charAt(n)&&n<i;)n++;for(;t.charAt(o-1)===e.charAt(r-1)&&o>n&&r>0;)o--,r--;return{start:n,end:o}}},function(e,t,i){var n=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,i,n,r,o,s){var a=o.length-1;switch(r){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[a-1];case 13:this.$={};break;case 14:this.$=o[a-1];break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[];break;case 19:this.$=o[a-1];break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,i=[0],n=[null],r=[],o=this.table,s="",a=0,l=0,c=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;function u(e){i.length=i.length-2*e,n.length=n.length-e,r.length=r.length-e}function d(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}r.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,p,m,g,v,y,w,b,C,A={};;){if(m=i[i.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null==f&&(f=d()),g=o[m]&&o[m][f]),void 0===g||!g.length||!g[0]){if(!c){for(y in C=[],o[m])this.terminals_[y]&&y>2&&C.push("'"+this.terminals_[y]+"'");var x="";x=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[f]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:h,expected:C})}if(3==c){if(1==f)throw new Error(x||"Parsing halted.");l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,f=d()}for(;!(2..toString()in o[m]);){if(0==m)throw new Error(x||"Parsing halted.");u(1),m=i[i.length-1]}p=f,f=2,g=o[m=i[i.length-1]]&&o[m][2],c=3}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(g[0]){case 1:i.push(f),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(g[1]),f=null,p?(f=p,p=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(w=this.productions_[g[1]][1],A.$=n[n.length-w],A._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},void 0!==(v=this.performAction.call(A,s,l,a,this.yy,g[1],n,r)))return v;w&&(i=i.slice(0,-1*w*2),n=n.slice(0,-1*w),r=r.slice(0,-1*w)),i.push(this.productions_[g[1]][0]),n.push(A.$),r.push(A._$),b=o[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,i,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;s<o.length&&(!(i=this._input.match(this.rules[o[s]]))||t&&!(i[0].length>t[0].length)||(t=i,n=s,this.options.flex));s++);return t?((r=t[0].match(/\n.*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return e.lexer=t,e}();t.parser=n,t.parse=n.parse.bind(n)},function(e,t){"use strict";function i(e,t){var i=this;this.editor=e,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.dom={},this.dom.container=t;var n=document.createElement("table");this.dom.table=n,n.className="jsoneditor-search",t.appendChild(n);var r=document.createElement("tbody");this.dom.tbody=r,n.appendChild(r);var o=document.createElement("tr");r.appendChild(o);var s=document.createElement("td");o.appendChild(s);var a=document.createElement("div");this.dom.results=a,a.className="jsoneditor-results",s.appendChild(a),s=document.createElement("td"),o.appendChild(s);var l=document.createElement("div");this.dom.input=l,l.className="jsoneditor-frame",l.title="Search fields and values",s.appendChild(l);var c=document.createElement("table");l.appendChild(c);var h=document.createElement("tbody");c.appendChild(h),o=document.createElement("tr"),h.appendChild(o);var u=document.createElement("button");u.type="button",u.className="jsoneditor-refresh",(s=document.createElement("td")).appendChild(u),o.appendChild(s);var d=document.createElement("input");this.dom.search=d,d.oninput=function(e){i._onDelayedSearch(e)},d.onchange=function(e){i._onSearch()},d.onkeydown=function(e){i._onKeyDown(e)},d.onkeyup=function(e){i._onKeyUp(e)},u.onclick=function(e){d.select()},(s=document.createElement("td")).appendChild(d),o.appendChild(s);var f=document.createElement("button");f.type="button",f.title="Next result (Enter)",f.className="jsoneditor-next",f.onclick=function(){i.next()},(s=document.createElement("td")).appendChild(f),o.appendChild(s);var p=document.createElement("button");p.type="button",p.title="Previous result (Shift+Enter)",p.className="jsoneditor-previous",p.onclick=function(){i.previous()},(s=document.createElement("td")).appendChild(p),o.appendChild(s)}i.prototype.next=function(e){if(void 0!=this.results){var t=void 0!=this.resultIndex?this.resultIndex+1:0;t>this.results.length-1&&(t=0),this._setActiveResult(t,e)}},i.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;i<0&&(i=t),this._setActiveResult(i,e)}},i.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node;"field"==this.activeResult.elem?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var n=this.results[this.resultIndex].node,r=this.results[this.resultIndex].elem;"field"==r?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo(function(){t&&n.focus(r)})},i.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},i.prototype._onDelayedSearch=function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)},i.prototype._onSearch=function(e){this._clearDelay();var t=this.dom.search.value,i=t.length>0?t:void 0;if(i!=this.lastText||e)if(this.lastText=i,this.results=this.editor.search(i),this._setActiveResult(void 0),void 0!=i){var n=this.results.length;switch(n){case 0:this.dom.results.innerHTML="no&nbsp;results";break;case 1:this.dom.results.innerHTML="1&nbsp;result";break;default:this.dom.results.innerHTML=n+"&nbsp;results"}}else this.dom.results.innerHTML=""},i.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},i.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},i.prototype.clear=function(){this.dom.search.value="",this._onSearch()},i.prototype.destroy=function(){this.editor=null,this.dom.container.removeChild(this.dom.table),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()},e.exports=i},function(e,t,i){"use strict";var n=i(54);function r(e,t){this.dom={};var i=this,n=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.onClose=t?t.close:void 0;var r=document.createElement("div");r.className="jsoneditor-contextmenu-root",n.root=r;var o=document.createElement("div");o.className="jsoneditor-contextmenu",n.menu=o,r.appendChild(o);var s=document.createElement("ul");s.className="jsoneditor-menu",o.appendChild(s),n.list=s,n.items=[];var a=document.createElement("button");a.type="button",n.focusButton=a;var l=document.createElement("li");l.style.overflow="hidden",l.style.height="0",l.appendChild(a),s.appendChild(l),function e(t,n,r){r.forEach(function(r){if("separator"==r.type){var o=document.createElement("div");o.className="jsoneditor-separator",(a=document.createElement("li")).appendChild(o),t.appendChild(a)}else{var s={},a=document.createElement("li");t.appendChild(a);var l=document.createElement("button");if(l.type="button",l.className=r.className,s.button=l,r.title&&(l.title=r.title),r.click&&(l.onclick=function(e){e.preventDefault(),i.hide(),r.click()}),a.appendChild(l),r.submenu){var c,h=document.createElement("div");if(h.className="jsoneditor-icon",l.appendChild(h),l.appendChild(document.createTextNode(r.text)),r.click){l.className+=" jsoneditor-default";var u=document.createElement("button");u.type="button",s.buttonExpand=u,u.className="jsoneditor-expand",u.innerHTML='<div class="jsoneditor-expand"></div>',a.appendChild(u),r.submenuTitle&&(u.title=r.submenuTitle),c=u}else{var d=document.createElement("div");d.className="jsoneditor-expand",l.appendChild(d),c=l}c.onclick=function(e){e.preventDefault(),i._onExpandItem(s),c.focus()};var f=[];s.subItems=f;var p=document.createElement("ul");s.ul=p,p.className="jsoneditor-menu",p.style.height="0",a.appendChild(p),e(p,f,r.submenu)}else l.innerHTML='<div class="jsoneditor-icon"></div>'+r.text;n.push(s)}})}(s,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var n=24*(e.length+(t.submenu?t.submenu.length:0));i.maxHeight=Math.max(i.maxHeight,n)})}r.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},r.visibleMenu=void 0,r.prototype.show=function(e,t){this.hide();var i=!0;if(t){var o=e.getBoundingClientRect(),s=t.getBoundingClientRect();o.bottom+this.maxHeight<s.bottom||o.top-this.maxHeight>s.top&&(i=!1)}if(i){var a=e.offsetHeight;this.dom.menu.style.left="0px",this.dom.menu.style.top=a+"px",this.dom.menu.style.bottom=""}else this.dom.menu.style.left="0px",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px";var l=e.parentNode;l.insertBefore(this.dom.root,l.firstChild);var c=this,h=this.dom.list;this.eventListeners.mousedown=n.addEventListener(window,"mousedown",function(e){var t=e.target;t==h||c._isChildOf(t,h)||(c.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.keydown=n.addEventListener(window,"keydown",function(e){c._onKeyDown(e)}),this.selection=n.getSelection(),this.anchor=e,setTimeout(function(){c.dom.focusButton.focus()},0),r.visibleMenu&&r.visibleMenu.hide(),r.visibleMenu=this},r.prototype.hide=function(){for(var e in this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose&&this.onClose()),this.eventListeners)if(this.eventListeners.hasOwnProperty(e)){var t=this.eventListeners[e];t&&n.removeEventListener(window,e,t),delete this.eventListeners[e]}r.visibleMenu==this&&(r.visibleMenu=void 0)},r.prototype._onExpandItem=function(e){var t=this,i=e==this.expandedItem,r=this.expandedItem;if(r&&(r.ul.style.height="0",r.ul.style.padding="",setTimeout(function(){t.expandedItem!=r&&(r.ul.style.display="",n.removeClassName(r.ul.parentNode,"jsoneditor-selected"))},300),this.expandedItem=void 0),!i){var o=e.ul;o.style.display="block";o.clientHeight;setTimeout(function(){t.expandedItem==e&&(o.style.height=24*o.childNodes.length+"px",o.style.padding="5px 10px")},0),n.addClassName(o.parentNode,"jsoneditor-selected"),this.expandedItem=e}},r.prototype._onKeyDown=function(e){var t,i,r,o,s=e.target,a=e.which,l=!1;27==a?(this.selection&&n.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9==a?e.shiftKey?0==(i=(t=this._getVisibleButtons()).indexOf(s))&&(t[t.length-1].focus(),l=!0):(i=(t=this._getVisibleButtons()).indexOf(s))==t.length-1&&(t[0].focus(),l=!0):37==a?("jsoneditor-expand"==s.className&&(r=(t=this._getVisibleButtons())[(i=t.indexOf(s))-1])&&r.focus(),l=!0):38==a?((r=(t=this._getVisibleButtons())[(i=t.indexOf(s))-1])&&"jsoneditor-expand"==r.className&&(r=t[i-2]),r||(r=t[t.length-1]),r&&r.focus(),l=!0):39==a?((o=(t=this._getVisibleButtons())[(i=t.indexOf(s))+1])&&"jsoneditor-expand"==o.className&&o.focus(),l=!0):40==a&&((o=(t=this._getVisibleButtons())[(i=t.indexOf(s))+1])&&"jsoneditor-expand"==o.className&&(o=t[i+2]),o||(o=t[0]),o&&(o.focus(),l=!0),l=!0),l&&(e.stopPropagation(),e.preventDefault())},r.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},e.exports=r},function(e,t,i){"use strict";var n=i(59),r=i(57),o=i(60),s=i(54);function a(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=s.debounce(this._onChangeValue.bind(this),a.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=s.debounce(this._onChangeField.bind(this),a.prototype.DEBOUNCE_INTERVAL)}a.prototype.DEBOUNCE_INTERVAL=150,a.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,("tree"===this.editor.options.mode||"form"===this.editor.options.mode)&&"function"==typeof this.editor.options.onEditable)){var e=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()});"boolean"==typeof e?(this.editable.field=e,this.editable.value=e):("boolean"==typeof e.field&&(this.editable.field=e.field),"boolean"==typeof e.value&&(this.editable.value=e.value))}},a.prototype.getPath=function(){for(var e=this,t=[];e;){var i=e.parent?"array"!=e.parent.type?e.field:e.index:void 0;void 0!==i&&t.unshift(i),e=e.parent}return t},a.prototype.findNode=function(e){for(var t=s.parsePath(e),i=this;i&&t.length>0;){var n=t.shift();if("number"==typeof n){if("array"!==i.type)throw new Error("Cannot get child node at index "+n+": node is no array");i=i.childs[n]}else{if("object"!==i.type)throw new Error("Cannot get child node "+n+": node is no object");i=i.childs.filter(function(e){return e.field===n})[0]}}return i},a.prototype.findParents=function(){for(var e=[],t=this.parent;t;)e.unshift(t),t=t.parent;return e},a.prototype.setError=function(e,t){this.getDom(),this.error=e;var i=this.dom.tdError;if(e){i||(i=document.createElement("td"),this.dom.tdError=i,this.dom.tdValue.parentNode.appendChild(i));var n=document.createElement("div");n.className="jsoneditor-popover jsoneditor-right",n.appendChild(document.createTextNode(e.message));var r=document.createElement("button");for(r.type="button",r.className="jsoneditor-schema-error",r.appendChild(n),r.onmouseover=r.onfocus=function(){for(var e=["right","above","below","left"],t=0;t<e.length;t++){var i=e[t];n.className="jsoneditor-popover jsoneditor-"+i;var r=this.editor.content.getBoundingClientRect(),o=n.getBoundingClientRect();if(s.insideRect(r,o,20))break}}.bind(this),t&&(r.onclick=function(){t.findParents().forEach(function(e){e.expand(!1)}),t.scrollTo(function(){t.focus()})});i.firstChild;)i.removeChild(i.firstChild);i.appendChild(r)}else i&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)},a.prototype.getIndex=function(){return this.parent?this.parent.childs.indexOf(this):-1},a.prototype.setParent=function(e){this.parent=e},a.prototype.setField=function(e,t){this.field=e,this.previousField=e,this.fieldEditable=!0===t},a.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},a.prototype.setValue=function(e,t){var i,n,r=this.childs;if(r)for(;r.length;)this.removeChild(r[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var o=0,s=e.length;o<s;o++)void 0===(i=e[o])||i instanceof Function||(n=new a(this.editor,{value:i}),this.appendChild(n));this.value=""}else if("object"==this.type){for(var l in this.childs=[],e)e.hasOwnProperty(l)&&(void 0===(i=e[l])||i instanceof Function||(n=new a(this.editor,{field:l,value:i}),this.appendChild(n)));this.value="",!0===this.editor.options.sortObjectKeys&&this.sort("asc")}else this.childs=void 0,this.value=e;this.previousValue=this.value},a.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},a.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},a.prototype.getNodePath=function(){var e=this.parent?this.parent.getNodePath():[];return e.push(this),e},a.prototype.clone=function(){var e=new a(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},a.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-expanded"),this.showChilds(),!1!==e&&this.childs.forEach(function(t){t.expand(e)}))},a.prototype.collapse=function(e){this.childs&&(this.hideChilds(),!1!==e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-collapsed"),this.expanded=!1)},a.prototype.showChilds=function(){if(this.childs&&this.expanded){var e=this.dom.tr,t=e?e.parentNode:void 0;if(t){var i=this.getAppend(),n=e.nextSibling;n?t.insertBefore(i,n):t.appendChild(i),this.childs.forEach(function(e){t.insertBefore(e.getDom(),i),e.showChilds()})}}},a.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},a.prototype.hideChilds=function(){if(this.childs&&this.expanded){var e=this.getAppend();e.parentNode&&e.parentNode.removeChild(e),this.childs.forEach(function(e){e.hide()})}},a.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},a.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof l?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},a.prototype.moveTo=function(e,t){e.parent==this&&(this.childs.indexOf(e)<t&&t++);var i=this.childs[t]||this.append;this.moveBefore(e,i)},a.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),r=t.getDom(),o=r?r.parentNode:void 0;r&&o&&o.insertBefore(n,r),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},a.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},a.prototype.search=function(e){var t=[],i=e?e.toLowerCase():void 0;(delete this.searchField,delete this.searchValue,void 0!=this.field)&&(-1!=String(this.field).toLowerCase().indexOf(i)&&(this.searchField=!0,t.push({node:this,elem:"field"})),this._updateDomField());if(this._hasChilds()){if(this.childs){var n=[];this.childs.forEach(function(t){n=n.concat(t.search(e))}),t=t.concat(n)}if(void 0!=i){0==n.length?this.collapse(!1):this.expand(!1)}}else{if(void 0!=this.value)-1!=String(this.value).toLowerCase().indexOf(i)&&(this.searchValue=!0,t.push({node:this,elem:"value"}));this._updateDomValue()}return t},a.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent;t;)t.expand(!1),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},a.focusElement=void 0,a.prototype.focus=function(e){if(a.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},a.select=function(e){setTimeout(function(){s.selectContentEditable(e)},0)},a.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},a.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;i<n;i++)if(t[i].containsNode(e))return!0;return!1},a.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},a.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return i.parent=null,this.updateDom({updateIndexes:!0}),i}}},a.prototype._remove=function(e){this.removeChild(e)},a.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0,r=(i=this.expanded?this.getAppend():this.getDom())&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),"string"!=t&&"auto"!=t||(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),"string"!=t&&"auto"!=t||(this.expanded=!0)):this.expanded=!1,n&&(r?n.insertBefore(this.getDom(),r):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;"auto"!=e&&"string"!=e||(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},a.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=s.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var i=this._unescapeHTML(this.valueInnerText);t=this._stringCast(i)}t!==this.value&&(this.value=t,this._debouncedOnChangeValue())}catch(t){if(this.value=void 0,!0!==e)throw t}},a.prototype._onChangeValue=function(){var e=this.editor.getSelection();if(e.range){var t=s.textDiff(String(this.value),String(this.previousValue));e.range.startOffset=t.start,e.range.endOffset=t.end}var i=this.editor.getSelection();if(i.range){var n=s.textDiff(String(this.previousValue),String(this.value));i.range.startOffset=n.start,i.range.endOffset=n.end}this.editor._onAction("editValue",{node:this,oldValue:this.previousValue,newValue:this.value,oldSelection:e,newSelection:i}),this.previousValue=this.value},a.prototype._onChangeField=function(){var e=this.editor.getSelection();if(e.range){var t=s.textDiff(this.field,this.previousField);e.range.startOffset=t.start,e.range.endOffset=t.end}var i=this.editor.getSelection();if(i.range){var n=s.textDiff(this.previousField,this.field);i.range.startOffset=n.start,i.range.endOffset=n.end}this.editor._onAction("editField",{node:this,oldValue:this.previousField,newValue:this.field,oldSelection:e,newSelection:i}),this.previousField=this.field},a.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=["jsoneditor-value"],i=this.value,n="auto"==this.type?s.type(i):this.type,r="string"==n&&s.isUrl(i);if(t.push("jsoneditor-"+n),r&&t.push("jsoneditor-url"),""==String(this.value)&&"array"!=this.type&&"object"!=this.type&&t.push("jsoneditor-empty"),this.searchValueActive&&t.push("jsoneditor-highlight-active"),this.searchValue&&t.push("jsoneditor-highlight"),e.className=t.join(" "),"array"==n||"object"==n){var o=this.childs?this.childs.length:0;e.title=this.type+" containing "+o+" items"}else r&&this.editable.value?e.title="Ctrl+Click or Ctrl+Enter to open url in new window":e.title="";if("boolean"===n&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value){if(!this.dom.select){this.dom.select=document.createElement("select"),this.id=this.field+"_"+(new Date).getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,this.dom.select.option=document.createElement("option"),this.dom.select.option.value="",this.dom.select.option.innerHTML="--",this.dom.select.appendChild(this.dom.select.option);for(var a=0;a<this.enum.length;a++)this.dom.select.option=document.createElement("option"),this.dom.select.option.value=this.enum[a],this.dom.select.option.innerHTML=this.enum[a],this.dom.select.option.value==this.value&&(this.dom.select.option.selected=!0),this.dom.select.appendChild(this.dom.select.option);this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)}!this.schema||this.schema.hasOwnProperty("oneOf")||this.schema.hasOwnProperty("anyOf")||this.schema.hasOwnProperty("allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.innerHTML="")}else this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML);s.stripFormatting(e)}},a.prototype._updateDomField=function(){var e=this.dom.field;e&&(""==String(this.field)&&"array"!=this.parent.type?s.addClassName(e,"jsoneditor-empty"):s.removeClassName(e,"jsoneditor-empty"),this.searchFieldActive?s.addClassName(e,"jsoneditor-highlight-active"):s.removeClassName(e,"jsoneditor-highlight-active"),this.searchField?s.addClassName(e,"jsoneditor-highlight"):s.removeClassName(e,"jsoneditor-highlight"),s.stripFormatting(e))},a.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=s.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);t!==this.field&&(this.field=t,this._debouncedOnChangeField())}catch(t){if(this.field=void 0,!0!==e)throw t}},a.prototype.validate=function(){var e=[];if("object"===this.type){for(var t={},i=[],n=0;n<this.childs.length;n++){var r=this.childs[n];t.hasOwnProperty(r.field)&&i.push(r.field),t[r.field]=!0}i.length>0&&(e=this.childs.filter(function(e){return-1!==i.indexOf(e.field)}).map(function(e){return{node:e,error:{message:'duplicate key "'+e.field+'"'}}}))}if(this.childs)for(n=0;n<this.childs.length;n++){var o=this.childs[n].validate();o.length>0&&(e=e.concat(o))}return e},a.prototype.clearDom=function(){this.dom={}},a.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(this._updateEditability(),e.tr=document.createElement("tr"),e.tr.node=this,"tree"===this.editor.options.mode){var t=document.createElement("td");if(this.editable.field&&this.parent){var i=document.createElement("button");i.type="button",e.drag=i,i.className="jsoneditor-dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),r=document.createElement("button");r.type="button",e.menu=r,r.className="jsoneditor-contextmenu",r.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var o=document.createElement("td");return e.tr.appendChild(o),e.tree=this._createDomTree(),o.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},a.onDragStart=function(e,t){if(!Array.isArray(e))return a.onDragStart([e],t);if(0!==e.length){var i=e[0],n=e[e.length-1],r=a.getNodeFromTarget(t.target),o=n._nextSibling(),l=i.editor,c=s.getAbsoluteTop(r.dom.tr)-s.getAbsoluteTop(i.dom.tr);l.mousemove||(l.mousemove=s.addEventListener(window,"mousemove",function(t){a.onDrag(e,t)})),l.mouseup||(l.mouseup=s.addEventListener(window,"mouseup",function(t){a.onDragEnd(e,t)})),l.highlighter.lock(),l.drag={oldCursor:document.body.style.cursor,oldSelection:l.getSelection(),oldBeforeNode:o,mouseX:t.pageX,offsetY:c,level:i.getLevel()},document.body.style.cursor="move",t.preventDefault()}},a.onDrag=function(e,t){if(!Array.isArray(e))return a.onDrag([e],t);if(0!==e.length){var i,n,r,o,c,h,u,d,f,p,m,g,v,y,w=e[0].editor,b=t.pageY-w.drag.offsetY,C=t.pageX,A=!1,x=e[0];if(i=x.dom.tr,f=s.getAbsoluteTop(i),g=i.offsetHeight,b<f){n=i;do{n=n.previousSibling,u=a.getNodeFromTarget(n),p=n?s.getAbsoluteTop(n):0}while(n&&b<p);u&&!u.parent&&(u=void 0),u||(n=(h=i.parentNode.firstChild)?h.nextSibling:void 0,(u=a.getNodeFromTarget(n))==x&&(u=void 0)),u&&b>(p=(n=u.dom.tr)?s.getAbsoluteTop(n):0)+g&&(u=void 0),u&&(e.forEach(function(e){u.parent.moveBefore(e,u)}),A=!0)}else{var E=e[e.length-1];if(o=(c=E.expanded&&E.append?E.append.getDom():E.dom.tr)?c.nextSibling:void 0){m=s.getAbsoluteTop(o),r=o;do{d=a.getNodeFromTarget(r),r&&(v=r.nextSibling?s.getAbsoluteTop(r.nextSibling):0,y=r?v-m:0,d.parent.childs.length==e.length&&d.parent.childs[e.length-1]==E&&(f+=27)),r=r.nextSibling}while(r&&b>f+y);if(d&&d.parent){var F=C-w.drag.mouseX,_=Math.round(F/24/2),S=w.drag.level+_,k=d.getLevel();for(n=d.dom.tr.previousSibling;k<S&&n;){if(u=a.getNodeFromTarget(n),e.some(function(e){return e===u||u._isChildOf(e)}));else{if(!(u instanceof l))break;var D=u.parent.childs;if(D.length==e.length&&D[e.length-1]==E)break;k=(d=a.getNodeFromTarget(n)).getLevel()}n=n.previousSibling}c.nextSibling!=d.dom.tr&&(e.forEach(function(e){d.parent.moveBefore(e,d)}),A=!0)}}}A&&(w.drag.mouseX=C,w.drag.level=x.getLevel()),w.startAutoScroll(b),t.preventDefault()}},a.onDragEnd=function(e,t){if(!Array.isArray(e))return a.onDrag([e],t);if(0!==e.length){var i=e[0],n=i.editor,r=i.parent,o=r.childs.indexOf(i),l=r.childs[o+e.length]||r.append;e[0]&&e[0].dom.menu.focus();var c={nodes:e,oldSelection:n.drag.oldSelection,newSelection:n.getSelection(),oldBeforeNode:n.drag.oldBeforeNode,newBeforeNode:l};c.oldBeforeNode!=c.newBeforeNode&&n._onAction("moveNodes",c),document.body.style.cursor=n.drag.oldCursor,n.highlighter.unlock(),e.forEach(function(e){t.target!==e.dom.drag&&t.target!==e.dom.menu&&n.highlighter.unhighlight()}),delete n.drag,n.mousemove&&(s.removeEventListener(window,"mousemove",n.mousemove),delete n.mousemove),n.mouseup&&(s.removeEventListener(window,"mouseup",n.mouseup),delete n.mouseup),n.stopAutoScroll(),t.preventDefault()}},a.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},a.prototype._createDomField=function(){return document.createElement("div")},a.prototype.setHighlight=function(e){this.dom.tr&&(e?s.addClassName(this.dom.tr,"jsoneditor-highlight"):s.removeClassName(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},a.prototype.setSelected=function(e,t){this.selected=e,this.dom.tr&&(e?s.addClassName(this.dom.tr,"jsoneditor-selected"):s.removeClassName(this.dom.tr,"jsoneditor-selected"),t?s.addClassName(this.dom.tr,"jsoneditor-first"):s.removeClassName(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(e),this.childs&&this.childs.forEach(function(t){t.setSelected(e)}))},a.prototype.updateValue=function(e){this.value=e,this.updateDom()},a.prototype.updateField=function(e){this.field=e,this.updateDom()},a.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i,n=this.dom.field;n&&(this.fieldEditable?(n.contentEditable=this.editable.field,n.spellcheck=!1,n.className="jsoneditor-field"):n.className="jsoneditor-readonly",i=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",n.innerHTML=this._escapeHTML(i),this._updateSchema());var r=this.dom.value;if(r){var o=this.childs?this.childs.length:0;"array"==this.type?(r.innerHTML="["+o+"]",s.addClassName(this.dom.tr,"jsoneditor-expandable")):"object"==this.type?(r.innerHTML="{"+o+"}",s.addClassName(this.dom.tr,"jsoneditor-expandable")):(r.innerHTML=this._escapeHTML(this.value),s.removeClassName(this.dom.tr,"jsoneditor-expandable"))}this._updateDomField(),this._updateDomValue(),e&&!0===e.updateIndexes&&this._updateDomIndexes(),e&&!0===e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},a.prototype._updateSchema=function(){this.editor&&this.editor.options&&(this.schema=a._findSchema(this.editor.options.schema,this.getPath()),this.schema?this.enum=a._findEnum(this.schema):delete this.enum)},a._findEnum=function(e){if(e.enum)return e.enum;var t=e.oneOf||e.anyOf||e.allOf;if(t){var i=t.filter(function(e){return e.enum});if(i.length>0)return i[0].enum}return null},a._findSchema=function(e,t){for(var i=e,n=0;n<t.length&&i;n++){var r=t[n];"string"==typeof r&&i.properties?i=i.properties[r]||null:"number"==typeof r&&i.items&&(i=i.items)}return i},a.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},a.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div")).innerHTML="[...]":"object"==this.type?(e=document.createElement("div")).innerHTML="{...}":!this.editable.value&&s.isUrl(this.value)?((e=document.createElement("a")).href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):((e=document.createElement("div")).contentEditable=this.editable.value,e.spellcheck=!1,e.innerHTML=this._escapeHTML(this.value)),e},a.prototype._createDomExpandButton=function(){var e=document.createElement("button");return e.type="button",this._hasChilds()?(e.className=this.expanded?"jsoneditor-expanded":"jsoneditor-collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="jsoneditor-invisible",e.title=""),e},a.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var r=document.createElement("td");r.className="jsoneditor-tree",n.appendChild(r),e.expand=this._createDomExpandButton(),r.appendChild(e.expand),e.tdExpand=r;var o=document.createElement("td");o.className="jsoneditor-tree",n.appendChild(o),e.field=this._createDomField(),o.appendChild(e.field),e.tdField=o;var s=document.createElement("td");s.className="jsoneditor-tree",n.appendChild(s),"object"!=this.type&&"array"!=this.type&&(s.appendChild(document.createTextNode(":")),s.className="jsoneditor-separator"),e.tdSeparator=s;var a=document.createElement("td");return a.className="jsoneditor-tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},a.prototype.onEvent=function(e){var t=e.type,i=e.target||e.srcElement,n=this.dom,r=this,o=this._hasChilds();if(i!=n.drag&&i!=n.menu||("mouseover"==t?this.editor.highlighter.highlight(this):"mouseout"==t&&this.editor.highlighter.unhighlight()),"click"==t&&i==n.menu){var a=r.editor.highlighter;a.highlight(r),a.lock(),s.addClassName(n.menu,"jsoneditor-selected"),this.showContextMenu(n.menu,function(){s.removeClassName(n.menu,"jsoneditor-selected"),a.unlock(),a.unhighlight()})}if("click"==t&&(i==n.expand||("view"===r.editor.options.mode||"form"===r.editor.options.mode)&&"DIV"===i.nodeName)&&o){var l=e.ctrlKey;this._onExpand(l)}"change"==t&&i==n.checkbox&&(this.dom.value.innerHTML=!this.value,this._getDomValue()),"change"==t&&i==n.select&&(this.dom.value.innerHTML=n.select.value,this._getDomValue(),this._updateDomValue());var c=n.value;if(i==c)switch(t){case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(c.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":!e.ctrlKey&&this.editable.value||s.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var h=n.field;if(i==h)switch(t){case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(h.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}i!=n.tree.parentNode||"click"!=t||e.hasMoved||((void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<s.getAbsoluteLeft(n.tdSeparator))||o?h&&(s.setEndOfContentEditable(h),h.focus()):c&&!this.enum&&(s.setEndOfContentEditable(c),c.focus()));(i!=n.tdExpand||o)&&i!=n.tdField&&i!=n.tdSeparator||"click"!=t||e.hasMoved||h&&(s.setEndOfContentEditable(h),h.focus()),"keydown"==t&&this.onKeyDown(e)},a.prototype.onKeyDown=function(e){var t,i,n,r,o,c,h,u,d=e.which||e.keyCode,f=e.target||e.srcElement,p=e.ctrlKey,m=e.shiftKey,g=e.altKey,v=!1,y="tree"===this.editor.options.mode,w=this.editor.multiselection.nodes.length>0?this.editor.multiselection.nodes:[this],b=w[0],C=w[w.length-1];if(13==d){if(f==this.dom.value)this.editable.value&&!e.ctrlKey||s.isUrl(this.value)&&(window.open(this.value,"_blank"),v=!0);else if(f==this.dom.expand){if(this._hasChilds()){var A=e.ctrlKey;this._onExpand(A),f.focus(),v=!0}}}else if(68==d)p&&y&&(a.onDuplicate(w),v=!0);else if(69==d)p&&(this._onExpand(m),f.focus(),v=!0);else if(77==d&&y)p&&(this.showContextMenu(f),v=!0);else if(46==d&&y)p&&(a.onRemove(w),v=!0);else if(45==d&&y)p&&!m?(this._onInsertBefore(),v=!0):p&&m&&(this._onInsertAfter(),v=!0);else if(35==d){if(g){var x=this._lastNode();x&&x.focus(a.focusElement||this._getElementName(f)),v=!0}}else if(36==d){if(g){var E=this._firstNode();E&&E.focus(a.focusElement||this._getElementName(f)),v=!0}}else if(37==d){if(g&&!m){var F=this._previousElement(f);F&&this.focus(this._getElementName(F)),v=!0}else if(g&&m&&y){if(C.expanded){var _=C.getAppend();n=_?_.nextSibling:void 0}else{var S=C.getDom();n=S.nextSibling}n&&(i=a.getNodeFromTarget(n),r=n.nextSibling,$=a.getNodeFromTarget(r),i&&i instanceof l&&1!=C.parent.childs.length&&$&&$.parent&&(o=this.editor.getSelection(),c=C._nextSibling(),w.forEach(function(e){$.parent.moveBefore(e,$)}),this.focus(a.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{nodes:w,oldBeforeNode:c,newBeforeNode:$,oldSelection:o,newSelection:this.editor.getSelection()})))}}else if(38==d)g&&!m?((t=this._previousNode())&&(this.editor.deselect(!0),t.focus(a.focusElement||this._getElementName(f))),v=!0):!g&&p&&m&&y?((t=this._previousNode())&&((u=this.editor.multiselection).start=u.start||this,u.end=t,h=this.editor._findTopLevelNodes(u.start,u.end),this.editor.select(h),t.focus("field")),v=!0):g&&m&&y&&((t=b._previousNode())&&t.parent&&(o=this.editor.getSelection(),c=C._nextSibling(),w.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(a.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{nodes:w,oldBeforeNode:c,newBeforeNode:t,oldSelection:o,newSelection:this.editor.getSelection()})),v=!0);else if(39==d){if(g&&!m){var k=this._nextElement(f);k&&this.focus(this._getElementName(k)),v=!0}else if(g&&m&&y){var D=(S=b.getDom()).previousSibling;D&&(t=a.getNodeFromTarget(D))&&t.parent&&t instanceof l&&!t.isVisible()&&(o=this.editor.getSelection(),c=C._nextSibling(),w.forEach(function(e){t.parent.moveBefore(e,t)}),this.focus(a.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{nodes:w,oldBeforeNode:c,newBeforeNode:t,oldSelection:o,newSelection:this.editor.getSelection()}))}}else if(40==d)if(g&&!m)(i=this._nextNode())&&(this.editor.deselect(!0),i.focus(a.focusElement||this._getElementName(f))),v=!0;else if(!g&&p&&m&&y)(i=this._nextNode())&&((u=this.editor.multiselection).start=u.start||this,u.end=i,h=this.editor._findTopLevelNodes(u.start,u.end),this.editor.select(h),i.focus("field")),v=!0;else if(g&&m&&y){var $=(i=C.expanded?C.append?C.append._nextNode():void 0:C._nextNode())&&(i._nextNode()||i.parent.append);$&&$.parent&&(o=this.editor.getSelection(),c=C._nextSibling(),w.forEach(function(e){$.parent.moveBefore(e,$)}),this.focus(a.focusElement||this._getElementName(f)),this.editor._onAction("moveNodes",{nodes:w,oldBeforeNode:c,newBeforeNode:$,oldSelection:o,newSelection:this.editor.getSelection()})),v=!0}v&&(e.preventDefault(),e.stopPropagation())},a.prototype._onExpand=function(e){if(e){var t=this.dom.tr.parentNode,i=t.parentNode,n=i.scrollTop;i.removeChild(t)}this.expanded?this.collapse(e):this.expand(e),e&&(i.appendChild(t),i.scrollTop=n)},a.onRemove=function(e){if(!Array.isArray(e))return a.onRemove([e]);if(e&&e.length>0){var t=e[0],i=t.parent,n=t.editor,r=t.getIndex();n.highlighter.unhighlight();var o=n.getSelection();a.blurNodes(e);var s=n.getSelection();e.forEach(function(e){e.parent._remove(e)}),n._onAction("removeNodes",{nodes:e.slice(0),parent:i,index:r,oldSelection:o,newSelection:s})}},a.onDuplicate=function(e){if(!Array.isArray(e))return a.onDuplicate([e]);if(e&&e.length>0){var t=e[e.length-1],i=t.parent,n=t.editor;n.deselect(n.multiselection.nodes);var r=n.getSelection(),o=t,s=e.map(function(e){var t=e.clone();return i.insertAfter(t,o),o=t,t});1===e.length?s[0].focus():n.select(s);var l=n.getSelection();n._onAction("duplicateNodes",{afterNode:t,nodes:s,parent:i,oldSelection:r,newSelection:l})}},a.prototype._onInsertBefore=function(e,t,i){var n=this.editor.getSelection(),r=new a(this.editor,{field:void 0!=e?e:"",value:void 0!=t?t:"",type:i});r.expand(!0),this.parent.insertBefore(r,this),this.editor.highlighter.unhighlight(),r.focus("field");var o=this.editor.getSelection();this.editor._onAction("insertBeforeNodes",{nodes:[r],beforeNode:this,parent:this.parent,oldSelection:n,newSelection:o})},a.prototype._onInsertAfter=function(e,t,i){var n=this.editor.getSelection(),r=new a(this.editor,{field:void 0!=e?e:"",value:void 0!=t?t:"",type:i});r.expand(!0),this.parent.insertAfter(r,this),this.editor.highlighter.unhighlight(),r.focus("field");var o=this.editor.getSelection();this.editor._onAction("insertAfterNodes",{nodes:[r],afterNode:this,parent:this.parent,oldSelection:n,newSelection:o})},a.prototype._onAppend=function(e,t,i){var n=this.editor.getSelection(),r=new a(this.editor,{field:void 0!=e?e:"",value:void 0!=t?t:"",type:i});r.expand(!0),this.parent.appendChild(r),this.editor.highlighter.unhighlight(),r.focus("field");var o=this.editor.getSelection();this.editor._onAction("appendNodes",{nodes:[r],parent:this.parent,oldSelection:n,newSelection:o})},a.prototype._onChangeType=function(e){var t=this.type;if(e!=t){var i=this.editor.getSelection();this.changeType(e);var n=this.editor.getSelection();this.editor._onAction("changeType",{node:this,oldType:t,newType:e,oldSelection:i,newSelection:n})}},a.prototype.sort=function(e){if(this._hasChilds()){var t="desc"==e?-1:1,i="array"==this.type?"value":"field";this.hideChilds();var r=this.childs,o=this.sortOrder;this.childs=this.childs.concat(),this.childs.sort(function(e,r){return t*n(e[i],r[i])}),this.sortOrder=1==t?"asc":"desc",this.editor._onAction("sort",{node:this,oldChilds:r,oldSort:o,newChilds:this.childs,newSort:this.sortOrder}),this.showChilds()}},a.prototype.getAppend=function(){return this.append||(this.append=new l(this.editor),this.append.setParent(this)),this.append.getDom()},a.getNodeFromTarget=function(e){for(;e;){if(e.node)return e.node;e=e.parentNode}},a.blurNodes=function(e){if(Array.isArray(e)){var t=e[0],i=t.parent,n=t.getIndex();i.childs[n+e.length]?i.childs[n+e.length].focus():i.childs[n-1]?i.childs[n-1].focus():i.focus()}else a.blurNodes([e])},a.prototype._nextSibling=function(){var e=this.parent.childs.indexOf(this);return this.parent.childs[e+1]||this.parent.append},a.prototype._previousNode=function(){var e=null,t=this.getDom();if(t&&t.parentNode){var i=t;do{i=i.previousSibling,e=a.getNodeFromTarget(i)}while(i&&e instanceof l&&!e.isVisible())}return e},a.prototype._nextNode=function(){var e=null,t=this.getDom();if(t&&t.parentNode){var i=t;do{i=i.nextSibling,e=a.getNodeFromTarget(i)}while(i&&e instanceof l&&!e.isVisible())}return e},a.prototype._firstNode=function(){var e=null,t=this.getDom();if(t&&t.parentNode){var i=t.parentNode.firstChild;e=a.getNodeFromTarget(i)}return e},a.prototype._lastNode=function(){var e=null,t=this.getDom();if(t&&t.parentNode){var i=t.parentNode.lastChild;for(e=a.getNodeFromTarget(i);i&&e instanceof l&&!e.isVisible();)i=i.previousSibling,e=a.getNodeFromTarget(i)}return e},a.prototype._previousElement=function(e){var t=this.dom;switch(e){case t.value:if(this.fieldEditable)return t.field;case t.field:if(this._hasChilds())return t.expand;case t.expand:return t.menu;case t.menu:if(t.drag)return t.drag;default:return null}},a.prototype._nextElement=function(e){var t=this.dom;switch(e){case t.drag:return t.menu;case t.menu:if(this._hasChilds())return t.expand;case t.expand:if(this.fieldEditable)return t.field;case t.field:if(!this._hasChilds())return t.value;default:return null}},a.prototype._getElementName=function(e){var t=this.dom;for(var i in t)if(t.hasOwnProperty(i)&&t[i]==e)return i;return null},a.prototype._hasChilds=function(){return"array"==this.type||"object"==this.type},a.TYPE_TITLES={auto:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',object:'Field type "object". An object contains an unordered set of key/value pairs.',array:'Field type "array". An array contains an ordered collection of values.',string:'Field type "string". Field type is not determined from the value, but always returned as string.'},a.prototype.showContextMenu=function(e,t){var i=this,n=a.TYPE_TITLES,o=[];if(this.editable.value&&o.push({text:"Type",title:"Change the type of this field",className:"jsoneditor-type-"+this.type,submenu:[{text:"Auto",className:"jsoneditor-type-auto"+("auto"==this.type?" jsoneditor-selected":""),title:n.auto,click:function(){i._onChangeType("auto")}},{text:"Array",className:"jsoneditor-type-array"+("array"==this.type?" jsoneditor-selected":""),title:n.array,click:function(){i._onChangeType("array")}},{text:"Object",className:"jsoneditor-type-object"+("object"==this.type?" jsoneditor-selected":""),title:n.object,click:function(){i._onChangeType("object")}},{text:"String",className:"jsoneditor-type-string"+("string"==this.type?" jsoneditor-selected":""),title:n.string,click:function(){i._onChangeType("string")}}]}),this._hasChilds()){var s="asc"==this.sortOrder?"desc":"asc";o.push({text:"Sort",title:"Sort the childs of this "+this.type,className:"jsoneditor-sort-"+s,click:function(){i.sort(s)},submenu:[{text:"Ascending",className:"jsoneditor-sort-asc",title:"Sort the childs of this "+this.type+" in ascending order",click:function(){i.sort("asc")}},{text:"Descending",className:"jsoneditor-sort-desc",title:"Sort the childs of this "+this.type+" in descending order",click:function(){i.sort("desc")}}]})}if(this.parent&&this.parent._hasChilds()){o.length&&o.push({type:"separator"});var l=i.parent.childs;i==l[l.length-1]&&o.push({text:"Append",title:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"jsoneditor-append",click:function(){i._onAppend("","","auto")},submenu:[{text:"Auto",className:"jsoneditor-type-auto",title:n.auto,click:function(){i._onAppend("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:n.array,click:function(){i._onAppend("",[])}},{text:"Object",className:"jsoneditor-type-object",title:n.object,click:function(){i._onAppend("",{})}},{text:"String",className:"jsoneditor-type-string",title:n.string,click:function(){i._onAppend("","","string")}}]}),o.push({text:"Insert",title:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",submenuTitle:"Select the type of the field to be inserted",className:"jsoneditor-insert",click:function(){i._onInsertBefore("","","auto")},submenu:[{text:"Auto",className:"jsoneditor-type-auto",title:n.auto,click:function(){i._onInsertBefore("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:n.array,click:function(){i._onInsertBefore("",[])}},{text:"Object",className:"jsoneditor-type-object",title:n.object,click:function(){i._onInsertBefore("",{})}},{text:"String",className:"jsoneditor-type-string",title:n.string,click:function(){i._onInsertBefore("","","string")}}]}),this.editable.field&&(o.push({text:"Duplicate",title:"Duplicate this field (Ctrl+D)",className:"jsoneditor-duplicate",click:function(){a.onDuplicate(i)}}),o.push({text:"Remove",title:"Remove this field (Ctrl+Del)",className:"jsoneditor-remove",click:function(){a.onRemove(i)}}))}new r(o,{close:t}).show(e,this.editor.content)},a.prototype._getType=function(e){return e instanceof Array?"array":e instanceof Object?"object":"string"==typeof e&&"string"!=typeof this._stringCast(e)?"string":"auto"},a.prototype._stringCast=function(e){var t=e.toLowerCase(),i=Number(e),n=parseFloat(e);return""==e?"":"null"==t?null:"true"==t||"false"!=t&&(isNaN(i)||isNaN(n)?e:i)},a.prototype._escapeHTML=function(e){if("string"!=typeof e)return String(e);var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ /g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),i=JSON.stringify(t),n=i.substring(1,i.length-1);return!0===this.editor.options.escapeUnicode&&(n=s.escapeUnicodeChars(n)),n},a.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"';return s.parse(t).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")},a.prototype._escapeJSON=function(e){for(var t="",i=0;i<e.length;){var n=e.charAt(i);"\n"==n?t+="\\n":"\\"==n?(t+=n,i++,""!==(n=e.charAt(i))&&-1!='"\\/bfnrtu'.indexOf(n)||(t+="\\"),t+=n):t+='"'==n?'\\"':n,i++}return t};var l=o(a);e.exports=a},function(e,t){e.exports=function e(t,i){"use strict";var n,r,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,s=/(^[ ]*|[ ]*$)/g,a=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,c=/^0/,h=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},u=h(t).replace(s,"")||"",d=h(i).replace(s,"")||"",f=u.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=d.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(u.match(l),16)||1!==f.length&&u.match(a)&&Date.parse(u),g=parseInt(d.match(l),16)||m&&d.match(a)&&Date.parse(d)||null;if(g){if(m<g)return-1;if(m>g)return 1}for(var v=0,y=Math.max(f.length,p.length);v<y;v++){if(n=!(f[v]||"").match(c)&&parseFloat(f[v])||f[v]||0,r=!(p[v]||"").match(c)&&parseFloat(p[v])||p[v]||0,isNaN(n)!==isNaN(r))return isNaN(n)?1:-1;if(typeof n!=typeof r&&(n+="",r+=""),n<r)return-1;if(n>r)return 1}return 0}},function(e,t,i){"use strict";var n=i(54),r=i(57);e.exports=function(e){function t(e){this.editor=e,this.dom={}}return t.prototype=new e,t.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr");if(t.node=this,e.tr=t,"tree"===this.editor.options.mode){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.type="button",n.className="jsoneditor-contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var r=document.createElement("td"),o=document.createElement("div");return o.innerHTML="(empty)",o.className="jsoneditor-readonly",r.appendChild(o),e.td=r,e.text=o,this.updateDom(),t},t.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},t.prototype.isVisible=function(){return 0==this.parent.childs.length},t.prototype.showContextMenu=function(t,i){var n=this,o=e.TYPE_TITLES,s=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"jsoneditor-insert",click:function(){n._onAppend("","","auto")},submenu:[{text:"Auto",className:"jsoneditor-type-auto",title:o.auto,click:function(){n._onAppend("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:o.array,click:function(){n._onAppend("",[])}},{text:"Object",className:"jsoneditor-type-object",title:o.object,click:function(){n._onAppend("",{})}},{text:"String",className:"jsoneditor-type-string",title:o.string,click:function(){n._onAppend("","","string")}}]}];new r(s,{close:i}).show(t,this.editor.content)},t.prototype.onEvent=function(e){var t=e.type,i=e.target||e.srcElement,r=this.dom;if(i==r.menu&&("mouseover"==t?this.editor.highlighter.highlight(this.parent):"mouseout"==t&&this.editor.highlighter.unhighlight()),"click"==t&&i==r.menu){var o=this.editor.highlighter;o.highlight(this.parent),o.lock(),n.addClassName(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,function(){n.removeClassName(r.menu,"jsoneditor-selected"),o.unlock(),o.unhighlight()})}"keydown"==t&&this.onKeyDown(e)},t}},function(e,t,i){"use strict";var n=i(57);function r(e,t,i,r){for(var o={code:{text:"Code",title:"Switch to code highlighter",click:function(){r("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){r("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){r("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){r("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){r("view")}}},s=[],a=0;a<t.length;a++){var l=t[a],c=o[l];if(!c)throw new Error('Unknown mode "'+l+'"');c.className="jsoneditor-type-modes"+(i==l?" jsoneditor-selected":""),s.push(c)}var h=o[i];if(!h)throw new Error('Unknown mode "'+i+'"');var u=h.text,d=document.createElement("button");d.type="button",d.className="jsoneditor-modes jsoneditor-separator",d.innerHTML=u+" &#x25BE;",d.title="Switch editor mode",d.onclick=function(){new n(s).show(d)};var f=document.createElement("div");f.className="jsoneditor-modes",f.style.position="relative",f.appendChild(d),e.appendChild(f),this.dom={container:e,box:d,frame:f}}r.prototype.focus=function(){this.dom.box.focus()},r.prototype.destroy=function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null},e.exports=r},function(e,t,i){"use strict";var n;try{n=i(63)}catch(e){}var r=i(61),o=i(54),s={};s.create=function(e,t){t=t||{},this.options=t,t.indentation?this.indentation=Number(t.indentation):this.indentation=2;var s=t.ace?t.ace:n;this.mode="code"==t.mode?"code":"text","code"==this.mode&&void 0===s&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=t.theme||"ace/theme/jsoneditor","ace/theme/jsoneditor"===this.theme&&window.ace&&i(70);var a=this;this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this._debouncedValidate=o.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){a._onKeyDown(e)},this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var l=document.createElement("button");l.type="button",l.className="jsoneditor-format",l.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(l),l.onclick=function(){try{a.format(),a._onChange()}catch(e){a._onError(e)}};var c=document.createElement("button");if(c.type="button",c.className="jsoneditor-compact",c.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(c),c.onclick=function(){try{a.compact(),a._onChange()}catch(e){a._onError(e)}},this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new r(this.menu,this.options.modes,this.options.mode,function(e){a.setMode(e),a.modeSwitcher.focus()})),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var h=s.edit(this.editorDom);h.$blockScrolling=1/0,h.setTheme(this.theme),h.setShowPrintMargin(!1),h.setFontSize(13),h.getSession().setMode("ace/mode/json"),h.getSession().setTabSize(this.indentation),h.getSession().setUseSoftTabs(!0),h.getSession().setUseWrapMode(!0),h.commands.bindKey("Ctrl-L",null),h.commands.bindKey("Command-L",null),this.aceEditor=h,this.hasOwnProperty("editor")||Object.defineProperty(this,"editor",{get:function(){return console.warn('Property "editor" has been renamed to "aceEditor".'),a.aceEditor},set:function(e){console.warn('Property "editor" has been renamed to "aceEditor".'),a.aceEditor=e}});var u=document.createElement("a");u.appendChild(document.createTextNode("powered by ace")),u.href="http://ace.ajax.org",u.target="_blank",u.className="jsoneditor-poweredBy",u.onclick=function(){window.open(u.href,u.target)},this.menu.appendChild(u),h.on("change",this._onChange.bind(this))}else{var d=document.createElement("textarea");d.className="jsoneditor-text",d.spellcheck=!1,this.content.appendChild(d),this.textarea=d,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this)}this.setSchema(this.options.schema)},s._onChange=function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}},s._onKeyDown=function(e){var t=!1;220==(e.which||e.keyCode)&&e.ctrlKey&&(e.shiftKey?(this.compact(),this._onChange()):(this.format(),this._onChange()),t=!0),t&&(e.preventDefault(),e.stopPropagation())},s.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null},s.compact=function(){var e=this.get(),t=JSON.stringify(e);this.setText(t)},s.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this.setText(t)},s.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},s.resize=function(){if(this.aceEditor){this.aceEditor.resize(!1)}},s.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},s.get=function(){var e,t=this.getText();try{e=o.parse(t)}catch(i){t=o.sanitize(t),e=o.parse(t)}return e},s.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},s.setText=function(e){var t;if(t=!0===this.options.escapeUnicode?o.escapeUnicodeChars(e):e,this.textarea&&(this.textarea.value=t),this.aceEditor){var i=this.options.onChange;this.options.onChange=null,this.aceEditor.setValue(t,-1),this.options.onChange=i}this.validate()},s.validate=function(){this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.content.style.marginBottom="",this.content.style.paddingBottom="");var e,t=!1,i=[];try{e=this.get(),t=!0}catch(e){}t&&this.validateSchema&&(this.validateSchema(e)||(i=this.validateSchema.errors.map(function(e){return o.improveSchemaError(e)})));if(i.length>0){if(i.length>3){i=i.slice(0,3);var n=this.validateSchema.errors.length-3;i.push("("+n+" more errors...)")}var r=document.createElement("div");r.innerHTML='<table class="jsoneditor-text-errors"><tbody>'+i.map(function(e){return'<tr><td><button class="jsoneditor-schema-error"></button></td>'+("string"==typeof e?'<td colspan="2"><pre>'+e+"</pre></td>":"<td>"+e.dataPath+"</td><td>"+e.message+"</td>")+"</tr>"}).join("")+"</tbody></table>",this.dom.validationErrors=r,this.frame.appendChild(r);var s=r.clientHeight;this.content.style.marginBottom=-s+"px",this.content.style.paddingBottom=s+"px"}if(this.aceEditor){this.aceEditor.resize(!1)}},e.exports=[{mode:"text",mixin:s,data:"text",load:s.format},{mode:"code",mixin:s,data:"text",load:s.format}]},function(e,t,i){var n=i(64);i(67),i(69),e.exports=n},function(e,t,i){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i=function(e,t,i){if("string"==typeof t){var r=o(e,t);if(void 0!=r)return i&&i(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=o(e,t[a]);if(void 0==c&&n.original)return;s.push(c)}return i&&i.apply(null,s)||!0}},n=function(e,t){var r=i("",e,t);return void 0==r&&n.original?n.original.apply(this,arguments):r},r=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return r(e,i[0])+"!"+r(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=function(e,n){n=r(e,n);var o=t.modules[n];if(!o){if("function"==typeof(o=t.payloads[n])){var s={},a={id:n,uri:"",exports:s,packaged:!0};s=o(function(e,t){return i(n,e,t)},s,a)||a.exports,t.modules[n]=s,delete t.payloads[n]}o=t.modules[n]=s||o}return o};!function(i){var r=e;i&&(e[i]||(e[i]={}),r=e[i]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.acequire&&r.acequire.packaged||(n.original=r.acequire,r.acequire=n,r.acequire.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,i){"use strict";var n={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===n.exec.call(/()??/,"")[1],o=function(){var e=/^/g;return n.test.call(e,""),!e.lastIndex}();o&&r||(RegExp.prototype.exec=function(e){var t,i,s=n.exec.apply(this,arguments);if("string"==typeof e&&s){if(!r&&s.length>1&&function(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}(s,"")>-1&&(i=RegExp(this.source,n.replace.call(function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}(this),"g","")),n.replace.call(e.slice(s.index),i,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(s[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var a=1;a<s.length;a++)(t=this._xregexp.captureNames[a-1])&&(s[t]=s[a]);!o&&this.global&&!s[0].length&&this.lastIndex>s.index&&this.lastIndex--}return s},o||(RegExp.prototype.test=function(e){var t=n.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=d.call(arguments,1),r=function(){if(this instanceof r){var n=t.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(d.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,r.prototype=new n,n.prototype=null),r});var r,o,s,a,l,c=Function.prototype.call,h=Array.prototype,u=Object.prototype,d=h.slice,f=c.bind(u.toString),p=c.bind(u.hasOwnProperty);if((l=p(u,"__defineGetter__"))&&(r=c.bind(u.__defineGetter__),o=c.bind(u.__defineSetter__),s=c.bind(u.__lookupGetter__),a=c.bind(u.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?m.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),r=d.call(arguments,2),o=r.length;if(e===i)o&&this.push.apply(this,r);else{var s=Math.min(t,i-e),a=e+s,l=a+o-s,c=i-a,h=i-s;if(l<a)for(var u=0;u<c;++u)this[l+u]=this[a+u];else if(l>a)for(u=c;u--;)this[l+u]=this[a+u];if(o&&e===h)this.length=h,this.push.apply(this,r);else for(this.length=h+o,u=0;u<o;++u)this[e+u]=r[u]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var g,v=Object("a"),y="a"!=v[0]||!(0 in v);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=arguments[1],r=-1,o=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++r<o;)r in i&&e.call(n,i[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,r=Array(n),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var s=0;s<n;s++)s in i&&(r[s]=e.call(o,i[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=L(this),n=y&&"[object String]"==f(this)?this.split(""):i,r=n.length>>>0,o=[],s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in n&&(t=n[a],e.call(s,t,a,i)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&!e.call(r,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&e.call(r,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in i){r=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o<n;o++)o in i&&(r=e.call(void 0,r,i[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=L(this),i=y&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=n-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in i){r=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,i[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==f(this)?this.split(""):L(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=$(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=y&&"[object String]"==f(this)?this.split(""):L(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,$(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(p(e,t)){var i;if(i={enumerable:!0,configurable:!0},l){var n=e.__proto__;e.__proto__=u;var r=s(e,t),o=a(e,t);if(e.__proto__=n,r||o)return r&&(i.get=r),o&&(i.set=o),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(g=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=g();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var b=w({}),C="undefined"==typeof document||w(document.createElement("div"));if(!b||!C)var A=Object.defineProperty}if(!Object.defineProperty||A){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(A)try{return A.call(Object,e,t,i)}catch(e){}if(p(i,"value"))if(l&&(s(e,t)||a(e,t))){var n=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");p(i,"get")&&r(e,t,i.get),p(i,"set")&&o(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)p(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var i=p(e,t);return delete e[t],i}),!Object.keys){var x=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],F=E.length;for(var _ in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)p(e,i)&&t.push(i);if(x)for(var n=0,r=F;n<r;n++){var o=E[n];p(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r    \u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var k=new RegExp("^"+S+S+"*"),D=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(k,"").replace(D,"")}}function $(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var L=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className||"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var r=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if((t=t||document).createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}else if(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))return null;var r;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?((r=n.createStyleSheet()).cssText=e,i&&(r.owningElement.id=i)):((r=t.createElement("style")).appendChild(n.createTextNode(e)),i&&(r.id=i),t.getDocumentHead(n).appendChild(r))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{var n=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);var o=e.documentElement;o.appendChild(n);var s=i.offsetWidth;r.overflow="scroll";var a=i.offsetWidth;return s==a&&(a=n.clientWidth),o.removeChild(n),s-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var i=e.cloneNode(!1);return i.innerHTML=t,e.parentNode.replaceChild(i,e),i},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,i){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,i){"use strict";e("./fixoldbrowsers");var n=e("./oop"),r=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var n=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==n,t.isMac="mac"==n,t.isLinux="linux"==n,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isTouchPad=r.indexOf("TouchPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("./keys"),r=e("./useragent"),o=null,s=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function r(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,i){var n,r;"ontouchmove"in e&&(t.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];n=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.changedTouches[0];e.wheelX=-(t.clientX-n)/1,e.wheelY=-(t.clientY-r)/1,n=t.clientX,r=t.clientY,i(e)}))},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,o){var s,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,r.isIE){var u=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;l&&!u||(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)}if(e._clicks=c,n[o]("mousedown",e),c>4)c=0;else if(c>1)return n[o](h[c],e)}function d(e){c=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),n[o]("mousedown",e),n[o](h[c],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",u),r.isOldIE&&t.addListener(e,"dblclick",d)})};var a=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};function l(e,t,i){var l=a(t);if(!r.isMac&&o){if(o.OSKey&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===i||17===i){var c="location"in t?t.location:t.keyLocation;if(17===i&&1===c)1==o[i]&&(s=t.timeStamp);else if(18===i&&3===l&&2===c){t.timeStamp-s<50&&(o.altGr=!0)}}}if((i in n.MODIFIER_KEYS&&(i=-1),8&l&&i>=91&&i<=93&&(i=-1),!l&&13===i)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,l,-i),t.defaultPrevented)))return;if(r.isChromeOS&&8&l){if(e(t,l,i),t.defaultPrevented)return;l&=-9}return!!(l||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,l,i)}function c(){(o=Object.create(null)).count=0,o.lastT=0}if(t.getModifierString=function(e){return n.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;n(e,"keydown",function(e){s=e.keyCode}),n(e,"keypress",function(e){return l(i,e,s)})}else{var a=null;n(e,"keydown",function(e){var t=e.keyCode;o[t]=(o[t]||0)+1,91==t||92==t?o.OSKey=!0:o.OSKey&&e.timeStamp-o.lastT>200&&1==o.count&&c(),1==o[t]&&o.count++,o.lastT=e.timeStamp;var n=l(i,e,t);return a=e.defaultPrevented,n}),n(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),n(e,"keyup",function(e){var t=e.keyCode;o[t]?o.count=Math.max(o.count-1,0):c(),91!=t&&92!=t||(o.OSKey=!1),o[t]=null}),o||(c(),n(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){t.nextTick=function(e,i){i=i||window;t.addListener(i,"message",function n(r){"zero-timeout-message-1"==r.data&&(t.stopPropagation(r),t.removeListener(i,"message",n),e())}),i.postMessage("zero-timeout-message-1","*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}var r=t.constructor;if(r===RegExp)return t;for(var n in i=r(),t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},r=function(e){null==i&&(i=setTimeout(n,e||t))};return r.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){i&&clearTimeout(i),i=null},r.isPending=function(){return i},r}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=r.isChrome<18,l=r.isIE;t.TextInput=function(e,t){var i=o.createElement("textarea");i.className="ace_text-input",r.isTouchPad&&i.setAttribute("x-palm-disable-auto-cap",!0),i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",r.isOldIE&&(i.style.top="-1000px"),e.insertBefore(i,e.firstChild);var c="",h=!1,u=!1,d=!1,f="",p=!0;try{var m=document.activeElement===i}catch(e){}n.addListener(i,"blur",function(e){t.onBlur(e),m=!1}),n.addListener(i,"focus",function(e){m=!0,t.onFocus(e),y()}),this.focus=function(){if(f)return i.focus();var e=i.style.top;i.style.position="fixed",i.style.top="0px",i.focus(),setTimeout(function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)},0)},this.blur=function(){i.blur()},this.isFocused=function(){return m};var g=s.delayedCall(function(){m&&y(p)}),v=s.delayedCall(function(){d||(i.value=c,m&&y())});function y(e){if(!d){if(d=!0,F)t=0,n=e?0:i.value.length-1;else var t=e?2:1,n=2;try{i.setSelectionRange(t,n)}catch(e){}d=!1}}function w(){d||(i.value=c,r.isWebKit&&v.schedule())}r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=p&&(p=!p,g.schedule())}),w(),m&&t.onFocus();var b=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length};if(!i.setSelectionRange&&i.createTextRange&&(i.setSelectionRange=function(e,t){var i=this.createTextRange();i.collapse(!0),i.moveStart("character",e),i.moveEnd("character",t),i.select()},b=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&t.text==e.value}),r.isOldIE){var C=!1,A=function(e){if(!C){var t=i.value;if(!d&&t&&t!=c){if(e&&t==c[0])return x.schedule();S(t),C=!0,w(),C=!1}}},x=s.delayedCall(A);n.addListener(i,"propertychange",A);var E={13:1,27:1};n.addListener(i,"keyup",function(e){if(!d||i.value&&!E[e.keyCode]||setTimeout(P,0),(i.value.charCodeAt(0)||0)<129)return x.call();d?M():T()}),n.addListener(i,"keydown",function(e){x.schedule(50)})}var F=null;this.setInputHandler=function(e){F=e},this.getInputHandler=function(){return F};var _=!1,S=function(e){F&&(e=F(e),F=null),u?(y(),e&&t.onPaste(e),u=!1):e==c.charAt(0)?_?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==c?e=e.substr(2):e.charAt(0)==c.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==c.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==c.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),_&&(_=!1)},k=function(e,t){var i=e.clipboardData||window.clipboardData;if(i&&!a){var n=l?"Text":"text/plain";return t?!1!==i.setData(n,t):i.getData(n)}},D=function(e,r){var o=t.getCopyText();if(!o)return n.preventDefault(e);k(e,o)?(r?t.onCut():t.onCopy(),n.preventDefault(e)):(h=!0,i.value=o,i.select(),setTimeout(function(){h=!1,w(),y(),r?t.onCut():t.onCopy()}))},$=function(e){D(e,!0)},L=function(e){D(e,!1)},B=function(e){var o=k(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(y),n.preventDefault(e)):(i.value="",u=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",function(e){h?h=!1:b(i)?(t.selectAll(),y()):F&&y(t.selection.isEmpty())}),n.addListener(i,"input",function(e){if(!d){var t=i.value;S(t),w()}}),n.addListener(i,"cut",$),n.addListener(i,"copy",L),n.addListener(i,"paste",B),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:L(e);break;case 86:B(e);break;case 88:$(e)}});var R,T=function(e){d||!t.onCompositionStart||t.$readOnly||(d={},t.onCompositionStart(),setTimeout(M,0),t.on("mousedown",P),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},M=function(){if(d&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\x01/g,"");if(d.lastValue!==e&&(t.onCompositionUpdate(e),d.lastValue&&t.undo(),d.lastValue=e,d.lastValue)){var n=t.selection.getRange();t.insert(d.lastValue),t.session.markUndoGroup(),d.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},P=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=d;d=!1;var r=setTimeout(function(){r=null;var e=i.value.replace(/\x01/g,"");d||(e==n.lastValue?w():!n.lastValue&&e&&(w(),S(e)))});F=function(e){return r&&clearTimeout(r),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&r&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",P),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range)}},O=s.delayedCall(M,50);function N(){clearTimeout(R),R=setTimeout(function(){f&&(i.style.cssText=f,f=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},r.isOldIE?200:0)}n.addListener(i,"compositionstart",T),r.isGecko?n.addListener(i,"text",function(){O.schedule()}):(n.addListener(i,"keyup",function(){O.schedule()}),n.addListener(i,"keydown",function(){O.schedule()})),n.addListener(i,"compositionend",P),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){_=!0,y(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){if(s||!r.isOldIE){f||(f=i.style.cssText),i.style.cssText=(s?"z-index:100000;":"")+"height:"+i.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-i.clientHeight-2,d=function(e){i.style.left=e.clientX-h-2+"px",i.style.top=Math.min(e.clientY-c-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(R),r.isWin&&!r.isOldIE&&n.capture(t.container,d,N))}},this.onContextMenuClose=N;var I=function(e){t.textInput.onContextMenu(e),N()};n.addListener(i,"mouseup",I),n.addListener(i,"mousedown",function(e){e.preventDefault(),N()}),n.addListener(t.renderer.scroller,"contextmenu",I),n.addListener(i,"contextmenu",I)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";e("../lib/dom"),e("../lib/event"),e("../lib/useragent");function n(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function r(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,r=e.getButton();if(0!==r){var o=n.getSelectionRange().isEmpty();return n.$blockScrolling++,(o||1==r)&&n.selection.moveToPosition(i),n.$blockScrolling--,void(2==r&&n.textInput.onContextMenu(e.domEvent))}return this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,i);i=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),o=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==n.row&&o.end.column==n.column||(n=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==n.row&&o.start.column==n.column||(n=o.end);else if(-1==s&&1==a)n=o.end,t=o.start;else{var l=r(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;return n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;if(n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200)return this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=n.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){n.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){n.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(r.prototype),t.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";var n=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,(e+=15)+r>i&&(e-=e+r-i),t+o>n&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,i,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function h(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s.removeEventListener("mousewheel",h))}function u(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var i=t.getDocumentPosition().row,n=s.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(a,"ace_fold-widget"))return h();r&&e.$tooltipFollowsMouse&&u(o),i=o,t||(t=setTimeout(function(){t=null,i&&!e.isMousePressed?function(){var t=i.getDocumentPosition().row,n=l.$annotations[t];if(!n)return h();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,i.y).row,a=i.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return h()}if(r!=n)if(r=n.text.join("<br/>"),c.setHtml(r),c.show(),s.on("mousewheel",h),e.$tooltipFollowsMouse)u(i);else{var d=i.domEvent.target.getBoundingClientRect(),f=c.getElement().style;f.left=d.right+"px",f.top=d.bottom+"px"}}():h()},50))}),o.addListener(s.renderer.$gutter,"mouseout",function(e){i=null,r&&!t&&(t=setTimeout(function(){t=null,h()},50))}),s.on("changeSession",h)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent"),s=200,a=200,l=5;function c(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c,u,d,f,p,m,g,v,y,w,b,C=t.container,A=0;function x(){var e=m;(function(e,i){var n=Date.now(),r=!i||e.row!=i.row,o=!i||e.column!=i.column;!w||r||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,w=n,b={x:u,y:d}):h(b.x,b.y,u,d)>l?w=null:n-w>=a&&(t.renderer.scrollCursorIntoView(),w=null)})(m=t.renderer.screenToTextCoordinates(u,d),e),function(e,i){var n=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:u-a.left,right:a.right-u},y:{top:d-a.top,bottom:a.bottom-d}},c=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),f={row:e.row,column:e.column};c/o<=2&&(f.column+=l.x.left<l.x.right?-3:2),h/r<=1&&(f.row+=l.y.top<l.y.bottom?-1:1);var p=e.row!=f.row,m=e.column!=f.column,g=!i||e.row!=i.row;p||m&&!g?y?n-y>=s&&t.renderer.scrollCursorIntoView(f):y=n:y=null}(m,e)}function E(){p=t.selection.toOrientedRange(),c=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),x(),f=setInterval(x,20),A=0,r.addListener(document,"mousemove",S)}function F(){clearInterval(f),t.session.removeMarker(c),c=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(p),t.$blockScrolling-=1,t.isFocused()&&!v&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),p=null,m=null,A=0,y=null,w=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!C.draggable){var n=this;return setTimeout(function(){n.startSelect(),n.captureMouse(e)},0),e.preventDefault()}p=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),r.setDragImage&&r.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),r.clearData(),r.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(C.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;g||"move"!=i||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return u=e.clientX,d=e.clientY,c||E(),A++,e.dataTransfer.dropEffect=g=D(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return u=e.clientX,d=e.clientY,c||(E(),A++),null!==_&&(_=null),e.dataTransfer.dropEffect=g=D(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--A<=0&&c)return F(),g=null,r.preventDefault(e)},this.onDrop=function(e){if(m){var i=e.dataTransfer;if(v)switch(g){case"move":p=p.contains(m.row,m.column)?{start:m,end:m}:t.moveText(p,m);break;case"copy":p=t.moveText(p,m,!0)}else{var n=i.getData("Text");p={start:m,end:t.session.insert(m,n)},t.focus(),g=null}return F(),r.preventDefault(e)}},r.addListener(C,"dragstart",this.onDragStart.bind(e)),r.addListener(C,"dragend",this.onDragEnd.bind(e)),r.addListener(C,"dragenter",this.onDragEnter.bind(e)),r.addListener(C,"dragover",this.onDragOver.bind(e)),r.addListener(C,"dragleave",this.onDragLeave.bind(e)),r.addListener(C,"drop",this.onDrop.bind(e));var _=null;function S(){null==_&&(_=setTimeout(function(){null!=_&&c&&F()},20))}function k(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function D(e){var t=["copy","copymove","all","uninitialized"],i=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return i&&t.indexOf(n)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?r="move":t.indexOf(n)>=0&&(r="copy"),r}}function h(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(c.prototype),t.DragdropHandler=c}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),r=document.createElement("script");r.src=e,i.appendChild(r),r.onload=r.onreadystatechange=function(e,i){!i&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";var n={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var s=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){var i=this;t&&this.addEventListener(e,function n(){i.removeEventListener(e,n),t.apply(null,arguments)})},n.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],r=i._disabled_[e];r||(i._disabled_[e]=r=[]),r.push(n);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}i[e]=t},n.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t){i[e];n&&this.setDefaultHandler(e,n.pop())}else if(n){var r=n.indexOf(t);-1!=r&&n.splice(r,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=n}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"no use strict";var n=e("./oop"),r=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];if(!i)return s('misspelled option "'+e+'"');if(i.forwardTo)return this[i.forwardTo]&&this[i.forwardTo].setOption(e,t);i.handlesSet||(this["$"+e]=t),i&&i.set&&i.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:s('misspelled option "'+e+'"')}};function s(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}var l=function(){this.$defaultOptions={}};(function(){n.implement(this,r),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach(function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)}),n.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)})},this.setDefaultValue=function(e,t,i){var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(i){this.setDefaultValue(e,i,t[i])},this)},this.warn=s,this.reportError=a}).call(l.prototype),t.AppConfig=l}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){"no use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};function c(r){if(a&&a.document){l.packaged=r||e.packaged||n.packaged||a.define&&i(65).packaged;for(var o={},s="",c=document.currentScript||document._currentScript,u=(c&&c.ownerDocument||document).getElementsByTagName("script"),d=0;d<u.length;d++){var f=u[d],p=f.src||f.getAttribute("src");if(p){for(var m=f.attributes,g=0,v=m.length;g<v;g++){var y=m[g];0===y.name.indexOf("data-ace-")&&(o[h(y.name.replace(/^data-ace-/,""))]=y.value)}var w=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(s=w[1])}}for(var b in s&&(o.base=o.base||s,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base,o)void 0!==o[b]&&t.set(b,o[b])}}function h(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);l[e]=t},t.all=function(){return r.copyObject(l)},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",r=i[i.length-1];if("worker"==t&&"-"==n){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&i.length>1&&(r=i[i.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==n&&(t=n=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+n+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var r,s;Array.isArray(i)&&(s=i[0],i=i[1]);try{r=e(i)}catch(e){}if(r&&!t.$loading[i])return n&&n(r);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(i,s),a)}},c(!0),t.init=c}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var i=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;n.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(c,"mousedown",i),r.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new a(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(h),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=s,o.releaseMouse=n.capture(this.editor.container,s,l);var h=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,i){"use strict";t.FoldHandler=function(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,r=n.getFoldAt(i.row,i.column,1);r&&(t.getAccelKey()?n.removeFold(r):n.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session;n.foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session,r=n.getParentFoldRangeData(i,!0),o=r.range||r.firstRange;if(o){i=o.start.row;var s=n.getFoldAt(i,n.getLine(i).length,1);s?n.removeFold(s):(n.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,n))&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(n),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,i){var r=n.keyCodeToString(i);this.$callKeyboardHandlers(t,r,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/range",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return n.fromPoints(r||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var r={row:e,column:t};else var o={row:e,column:t};return n.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){n.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),i=this.getSelectionLead(),n=this.isBackwards();n&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(n||0!==i.column)&&this.$moveSelection(function(){this.moveCursorTo(i.row,i.column+e)})}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(n);return r?(n=r.start.row,i=r.end.row):i=n,!0===t?new s(n,0,i,this.session.getLine(i).length):new s(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-i,t.column).split(" ").length-1==i?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize();t=this.lead;this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column,t.column+i).split(" ").length-1==i?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(i,0),r=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=r[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var i=this.session.getLine(t.row);if(t.column==i.length){var n=i.search(/\s+$/);n>0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))this.moveCursorTo(e.start.row,e.start.column);else{var n=this.session.getFoldStringAt(t,i,-1);null==n&&(n=this.doc.getLine(t).substring(0,i));var o=r.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(r.lastIndex=0;(t=e[i])&&!r.test(t);)if(r.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var s=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var n=this.session.getLine(t).substring(0,i);if(0===i){do{t--,n=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=r.stringReverse(n),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&(n.row>0||e>0)&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return s.fromPoints(t,i)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<i.length;l++){var c=i[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var h=c.regex,u=new RegExp("(?:("+h+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=u,n.push(h),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],r=0,o=i.length;r<o;r++)t[r]&&(n[n.length]={type:i[r],value:t[r]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,r=0,o=n.length;r<o;r++)t[r+1]&&(i[i.length]={type:n[r],value:t[r+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,s,a,l){return n?n="]"!=a:a?n=!0:s?(i==r.stack&&(r.end=l+1,r.stack=-1),i--):o&&(i++,1!=o.length&&(r.stack=i,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t)"#tmp"===(t=(i=t.slice(0))[0])&&(i.shift(),t=i.shift());else var i=[];var n=t||"start",o=this.states[n];o||(n="start",o=this.states[n]);var s=this.matchMappings[n],a=this.regExps[n];a.lastIndex=0;for(var l,c=[],h=0,u=0,d={type:null,value:""};l=a.exec(e);){var f=s.defaultToken,p=null,m=l[0],g=a.lastIndex;if(g-m.length>h){var v=e.substring(h,g-m.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){f=(p=o[s[y]]).onMatch?p.onMatch(m,n,i):p.token,p.next&&(n="string"==typeof p.next?p.next:p.next(n,i),(o=this.states[n])||(this.reportError("state doesn't exist",n),n="start",o=this.states[n]),s=this.matchMappings[n],h=g,(a=this.regExps[n]).lastIndex=g);break}if(m)if("string"==typeof f)p&&!1===p.merge||d.type!==f?(d.type&&c.push(d),d={type:f,value:m}):d.value+=m;else if(f){d.type&&c.push(d),d={type:null,value:""};for(y=0;y<f.length;y++)c.push(f[y])}if(h==e.length)break;if(h=g,u++>r){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h<e.length;)d.type&&c.push(d),d={value:e.substring(h,h+=2e3),type:"overflow"};n="start",i=[];break}}return d.type&&c.push(d),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],r=0;r<n.length;r++){var o=n[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,r,o){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else for(var l in r=[],s)r.push(t+l);if(this.addRules(s,t),i){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],n.deepCopy(i))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach(function r(o){var s=n[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a];!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var c=l.next||l.push;if(c&&Array.isArray(c)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),n[h]&&(h+=i++)),n[h]=c,l.next=h,r(h)}else"pop"==c&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var u in l.rules)n[u]?n[u].push&&n[u].push.apply(n[u],l.rules[u]):n[u]=l.rules[u];if(l.include||"string"==typeof l)var d=l.include||l,f=n[d];else Array.isArray(l)&&(f=l);if(f){var p=[a,1].concat(f);l.noEscape&&(p=p.filter(function(e){return!e.next})),s.splice.apply(s,p),a--,f=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,i,n){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];i&&(o=o.toLowerCase());for(var s=o.split(n||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,i?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(e){for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}return this.$behaviours}}).call(n.prototype),t.Behaviour=n}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){"use strict";t.packages={},function(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var n=e.getTokenAt(t,i);this.$tokenIndex=n?n.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)i+=e[t-=1].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(n.prototype),t.TokenIterator=n}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,s=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,h=function(){this.HighlightRules=r,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){var r=t.doc,o=!0,s=!0,l=1/0,c=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else m=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),h=t.getUseSoftTabs();y=function(e,t){var i=e.match(m);if(i){var n=i[1].length,o=i[0].length;d(e,n,o)||" "!=i[0][o-1]||o--,r.removeInLine(t,n,o)}};var u=f+" ",d=(v=function(e,t){o&&!/\S/.test(e)||(d(e,l,l)?r.insertInLine({row:t,column:l},u):r.insertInLine({row:t,column:l},f))},w=function(e,t){return m.test(e)},function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%c!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return c>2?n%c!=c-1:n%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),g=new RegExp("(?:"+a.escapeRegExp(p)+")\\s*$"),v=function(e,t){w(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:l},f))},y=function(e,t){var i;(i=e.match(g))&&r.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(m))&&r.removeInLine(t,i[1].length,i[0].length)},w=function(e,i){if(m.test(e))return!0;for(var n=t.getTokens(i),r=0;r<n.length;r++)if("comment"===n[r].type)return!0}}function b(e){for(var t=i;t<=n;t++)e(r.getLine(t),t)}var C=1/0;b(function(e,t){var i=e.search(/\S/);-1!==i?(i<l&&(l=i),s&&!w(e,t)&&(s=!1)):C>e.length&&(C=e.length)}),l==1/0&&(l=C,o=!1,s=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),b(s?y:v)},this.toggleBlockComment=function(e,t,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(m=new l(t,n.row,n.column)).getCurrentToken(),h=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var u,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(r.start))){var f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;u=new c(f,p,f,p+r.start.length);break}a=m.stepBackward()}var m;for(a=(m=new l(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(r.end))){f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new c(f,p,f,p+r.end.length);break}a=m.stepForward()}d&&t.remove(d),u&&(t.remove(u),o=u.start.row,s=-r.start.length)}else s=r.start.length,o=i.start.row,t.insert(i.end,r.end),t.insert(i.start,r.start);h.start.row==o&&(h.start.column+=s),h.end.row==o&&(h.end.column+=s),t.selection.fromOrientedRange(h)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<i.length;t++)!function(e){var n=i[t],r=e[n];e[i[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,i){var n=t[0];"string"!=typeof n&&(n=n[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=n.split(this.$embeds[r]);if(!o[0]&&o[1]){t[0]=o[1];var s=this.$modes[this.$embeds[r]];return s[e].apply(s,t)}}var a=i.apply(this,t);return i?a:void 0},this.transformAction=function(e,t,i,n,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(var n in t)for(var r=t[n],o=0,s=r.length;o<s;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&i.push(r[o].regex);else if("object"==typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){n=r[o].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),t.Mode=h}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,i){"use strict";t.applyDelta=function(e,t,i){var n=t.start.row,r=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[n,1].concat(t.lines);e.splice.apply(e,s),e[n]=o.substring(0,r)+e[n],e[n+t.lines.length-1]+=o.substring(r)}break;case"remove":var a=t.end.column,l=t.end.row;n===l?e[n]=o.substring(0,r)+o.substring(a):e.splice(n,l-n+1,o.substring(0,r)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function e(e,t,i){var n=i?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}n.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var i=function(t,i,n){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(i,a,n))return{row:i.row,column:i.column};if(e(l,i,!n))return{row:i.row+o,column:i.column+(i.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var r={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:r,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return void 0==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),e--,i=this.$lines[e].length),this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var i=this.clippedPos(e.row,e.column),n={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),i=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)},this.removeInLine=function(e,t,i){var n=this.clippedPos(e,t),r=this.clippedPos(e,i);return this.applyDelta({start:n,end:r,action:"remove",lines:this.getLinesForRange({start:n,end:r})},!0),this.clonePos(n)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,n=t<this.getLength()-1,r=i?e-1:e,o=i?this.getLine(r).length:0,a=n?t+1:t,l=n?0:this.getLine(a).length,c=new s(r,o,a,l),h=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),h},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length,r=e.start.row,o=e.start.column,s=0,a=0;;){s=a,a+=t-1;var l=i.slice(s,a);if(a>n){e.lines=l,e.start.row=r+s,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=t||0,o=i.length;r<o;r++)if((e-=i[r].length+n)<0)return{row:r,column:e+i[r].length+n};return{row:o-1,column:i[o-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,i.length),s=t||0;s<o;++s)r+=i[s].length+n;return r+e.column}}).call(l.prototype),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,r=i.doc,o=t;i.lines[t];)t++;var s=r.getLength(),a=0;for(i.running=!1;t<s;){i.$tokenizeRow(t),n=t;do{t++}while(i.lines[t]);if(++a%5==0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=n.getMatchOffsets(i.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;l<s.length;l++){if(-1==(r=(n=s[l]).range.compareStart(t,i)))return void e(null,t,i,o,a);if(!e(null,n.start.row,n.start.column,o,a)&&e(n.placeholder,n.start.row,n.start.column,o)||0===r)return;a=!n.sameRow,o=n.end.column}e(null,t,i,o,a)},this.getNextFoldTo=function(e,t){for(var i,n,r=0;r<this.folds.length;r++){if(-1==(n=(i=this.folds[r]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,r,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var s=(r=this.folds).indexOf(n);for(0===s&&(this.start.column+=i);s<r.length;s++){if((n=r[s]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)return null;var n=i.fold,o=this.folds,s=this.foldData,a=o.indexOf(n),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new r(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var r=this.ranges,o=i||0;o<r.length;o++){var s=r[o],a=n(e,s.end);if(!(a>0)){var l=n(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],i=this.ranges,r=(i=i.sort(function(e,t){return n(e.start,t.start)}))[0],o=1;o<i.length;o++){e=r,r=i[o];var s=n(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(n(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),i.splice(o,1),t.push(r),r=e,o--)}return this.ranges=i,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var n=this.pointIndex({row:e,column:0});n<0&&(n=-n-1);var r=this.pointIndex({row:t,column:0},n);r<0&&(r=-r-1);for(var o=[],s=n;s<r;s++)o.push(i[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,i=e.end;else i=e.start,t=e.end;for(var n=t.row,r=i.row-n,o=-t.column+i.column,s=this.ranges,a=0,l=s.length;a<l;a++){if(!((c=s[a]).end.row<n)){if(c.start.row>n)break;if(c.start.row==n&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=o,c.start.row+=r)),c.end.row==n&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&o>0&&a<l-1&&c.end.column>c.start.column&&c.end.column==s[a+1].start.column&&(c.end.column-=o),c.end.column+=o,c.end.row+=r}}}if(0!=r&&a<l)for(;a<l;a++){var c;(c=s[a]).start.row+=r,c.end.row+=r}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";e("../range").Range;var n=e("../range_list").RangeList,r=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}r.inherits(o,n),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);!function(e,t){s(e.start,t),s(e.end,t)}(e,this.start);for(var t=e.start.row,i=e.start.column,n=0,r=-1;n<this.subFolds.length&&1==(r=this.subFolds[n].range.compare(t,i));n++);var o=this.subFolds[n];if(0==r)return o.addSubFold(e);t=e.range.end.row,i=e.range.end.column;var a=n;for(r=-1;a<this.subFolds.length&&1==(r=this.subFolds[a].range.compare(t,i));a++);this.subFolds[a];if(0==r)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(n,a-n,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,i){"use strict";var n=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var r=n.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(e,t)){if(1==i&&s.range.isEnd(e,t))continue;if(-1==i&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,r=[];t.column+=1,i.column-=1;for(var o=0;o<n.length;o++){var s=n[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=n[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return t.column-=1,i.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<n.folds.length;a++){var l=(o=n.folds[a]).range.compareEnd(e,t);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==i?r.substring(0,t-s.end.column):1==i?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;r<i.length;r++){var o=i[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?n-=t-a:n=0);break}s>=e&&(n-=a>=e?s-a:s-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i,n=this.$foldData,s=!1;e instanceof o?i=e:(i=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,h=i.end.column;if(!(a<c||a==c&&l<=h-2))throw new Error("The range has to be at least 2 characters width");var u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(i);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var f=this.getFoldsInRange(i.range);f.length>0&&(this.removeFolds(f),f.forEach(function(e){i.addSubFold(e)}));for(var p=0;p<n.length;p++){var m=n[p];if(c==m.start.row){m.addFold(i),s=!0;break}if(a==m.end.row){if(m.addFold(i),s=!0,!i.sameRow){var g=n[p+1];if(g&&g.start.row==c){m.merge(g);break}}break}if(c<=m.start.row)break}return s||(m=this.$addFoldLine(new r(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i,r;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,r=this.getFoldsInRangeList(i),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,r){null==n&&(n=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,s="";return e.walk(function(e,t,i,a){if(!(t<n)){if(t==n){if(i<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,i)}},t,i),s},this.getDisplayLine=function(e,t,i,n){var r,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,i,n):(r=this.doc.getLine(e)).substring(n||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var i=t.folds.map(function(e){return e.clone()});return new r(e,i)})},this.toggleFold=function(e){var t,i,n=this.selection.getRange();if(n.isEmpty()){var r=n.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(i=this.findMatchingBracket(r))?1==n.comparePoint(i)?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==n.comparePoint(i)?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(r.row,r.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(n.start.row,n.start.column)),t&&t.range.toString()==n.toString())this.expandFold(t);else{var s="...";if(!n.isMultiLine()){if((s=this.getTextRange(n)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,n)}},this.getCommentFoldRange=function(e,t,i){var r=new s(this,e,t),o=r.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var a=new n,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=i){do{o=r.stepBackward()}while(o&&l.test(o.type));r.stepForward()}if(a.start.row=r.getCurrentTokenRow(),a.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),-1!=i){do{o=r.stepForward()}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return a.end.row=r.getCurrentTokenRow(),a.end.column=r.getCurrentTokenColumn()+o.value.length-2,a}},this.foldAll=function(e,t,i){void 0==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==n[r]&&(n[r]=this.getFoldWidget(r)),"start"==n[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=i)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,r=e-1;r>=0;){var o=i[r];if(null==o&&(o=i[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(n||(n=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),r="end"===i?-1:1,o=this.getFoldAt(e,-1===r?0:n.length,r);if(o)t.children||t.all?this.removeFold(o):this.expandFold(o);else{var s=this.getFoldWidgetRange(e,!0);if(!s||s.isMultiLine()||!(o=this.getFoldAt(s.start.row,s.start.column,1))||!s.isEqual(o.range)){if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}this.removeFold(o)}}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var r=this.$brackets[e],o=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var r=this.$brackets[e],o=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;l<h;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/lang"),o=e("./config"),s=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,h=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,f=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new a(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};(function(){n.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>1,o=e[r];if(t>o)i=r+1;else{if(!(t<o))return r;n=r-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i,n=this.bgTokenizer.getTokens(e),r=0;if(null==t)o=n.length-1,r=this.getLine(e).length;else for(var o=0;o<n.length&&!((r+=n[o].value.length)>=t);o++);return(i=n[o])?(i.index=o,i.start=r-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var r=this.$markerId++,o={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:r};return n?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var i=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete i[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i||(i="ace_step");var r=new c(e,0,t,1/0);return r.id=this.addMarker(r,i,"fullLine",n),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var i=this.getLine(e),n=!1;if(t>0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var r=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(r));o++}for(var s=t;s<i.length&&i.charAt(s).match(r);)s++;return new c(e,o,e,s)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,o.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||(this.$modes[n]=e,e.$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.addEventListener){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new u(i);var r=this;this.bgTokenizer.addEventListener("update",function(e){r._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var r=e[n];"doc"==r.group?(this.doc.revertDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!0,i)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var r=e[n];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,s=e[0];n(s)?r=c.fromPoints(s.start,s.end):r=c.fromPoints(s.start,s.start);for(var a=1;a<e.length;a++)n(s=e[a])?(o=s.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=s.end,1==r.compare(o.row,o.column)&&r.setEnd(o),!0):(o=s.start,-1==r.compare(o.row,o.column)&&(r=c.fromPoints(s.start,s.start)),!1);if(null!=i){0===c.comparePoints(i.start,r.start)&&(i.start.column+=r.end.column-r.start.column,i.end.column+=r.end.column-r.start.column);var l=i.compareRange(r);1==l?r.setStart(i.start):-1==l&&r.setEnd(i.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),r=this.getFoldsInRange(e),o=c.fromPoints(t,t);if(!i){this.remove(e);var s=e.start.row-e.end.row;(h=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=h),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=h)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,n),r.length){var a=e.start,l=o.start,h=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=h),e.end.row==a.row&&(e.end.column+=h),e.start.row+=s,e.end.row+=s,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new c(0,0,0,0),n=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);i.start.row=r,i.end.row=r;for(var s=0;s<n&&" "==o.charAt(s);++s);s<n&&"\t"==o.charAt(s)?(i.start.column=s,i.end.column=s+1):(i.start.column=0,i.end.column=s),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((r=this.getRowFoldStart(e+i))<0)return 0;var n=r-e}else if(i>0){var r;if((r=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=r-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var o=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,a),s.length&&this.addFolds(s),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,r=e.end,o=n.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(m=this.getFoldLine(r.row)){m.addRemoveChars(r.row,r.column,n.column-r.column),m.shiftRow(-a);var u=this.getFoldLine(o);u&&u!==m&&(u.merge(m),m=u),h=c.indexOf(m)+1}for(;h<c.length;h++){(m=c[h]).start.row>=r.row&&m.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);c=this.$foldData,h=0;if(m=this.getFoldLine(o)){var p=m.range.compareInside(n.row,n.column);0==p?(m=m.split(n.row,n.column))&&(m.shiftRow(a),m.addRemoveChars(s,0,r.column-n.column)):-1==p&&(m.addRemoveChars(o,0,r.column-n.column),m.shiftRow(a)),h=c.indexOf(m)+1}for(;h<c.length;h++){var m;(m=c[h]).start.row>=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,n.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(i,n){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=i;for(n=Math.min(n,s.length-1);h<=n;)(o=this.getFoldLine(h,o))?(r=[],o.walk(function(i,n,o,a){var l;if(null!=i){(l=this.$getDisplayTokens(i,r.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[n].substring(a,o),r.length);r=r.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(r,c,a),h=o.end.row+1):(r=this.$getDisplayTokens(s[h]),l[h]=this.$computeWrapSplits(r,c,a),h++)};var e=3,t=4,i=10,a=11,h=12;function f(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,o){if(0==n.length)return[];var s=[],l=n.length,c=0,u=0,d=this.$wrapAsCode,f=this.$indentedSoftWrap,p=r<=Math.max(2*o,8)||!1===f?0:Math.floor(r/2);function m(e){var t=n.slice(c,e),r=t.length;t.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),s.length||(g=function(){var e=0;if(0===p)return e;if(f)for(var t=0;t<n.length;t++){var r=n[t];if(r==i)e+=1;else{if(r!=a){if(r==h)continue;break}e+=o}}return d&&!1!==f&&(e+=o),Math.min(e,p)}(),s.indent=g),u+=r,s.push(u),c=e}for(var g=0;l-c>r-g;){var v=c+r-g;if(n[v-1]>=i&&n[v]>=i)m(v);else if(n[v]!=e&&n[v]!=t){for(var y=Math.max(v-(r-(r>>2)),c-1);v>y&&n[v]<e;)v--;if(d){for(;v>y&&n[v]<e;)v--;for(;v>y&&9==n[v];)v--}else for(;v>y&&n[v]<i;)v--;v>y?m(++v):(2==n[v=c+r]&&v--,m(v-g))}else{for(;v!=c-1&&n[v]!=e;v--);if(v>c){m(v);continue}for(v=c+r;v<n.length&&n[v]==t;v++);if(v==n.length)break;m(v)}}return s},this.$getDisplayTokens=function(e,t){var n,r=[];t=t||0;for(var o=0;o<e.length;o++){var s=e.charCodeAt(o);if(9==s){n=this.getScreenTabSize(r.length+t),r.push(a);for(var l=1;l<n;l++)r.push(h)}else 32==s?r.push(i):s>39&&s<48||s>57&&s<64?r.push(9):s>=4352&&f(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,r;for(null==t&&(t=1/0),i=i||0,r=0;r<e.length&&(9==(n=e.charCodeAt(r))?i+=this.getScreenTabSize(i):n>=4352&&f(n)?i+=2:i+=1,!(i>t));r++);return[i,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]<t.column?i.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var i,n,r=0,o=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){s=l[c],r=this.$docRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getLength()-1,f=this.getNextFoldLine(r),p=f?f.start.row:1/0;s<=e&&!(s+(a=this.getRowLength(r))>e||r>=d);)s+=a,++r>p&&(r=f.end.row+1,p=(f=this.getNextFoldLine(r,f))?f.start.row:1/0),u&&(this.$docRowCache.push(r),this.$screenRowCache.push(s));if(f&&f.start.row<=r)i=this.getFoldDisplayLine(f),r=f.start.row;else{if(s+a<=e||r>d)return{row:d,column:this.getLine(d).length};i=this.getLine(r),f=null}var m=0;if(this.$useWrapMode){var g=this.$wrapData[r];if(g){var v=Math.floor(e-s);n=g[v],v>0&&g.length&&(m=g.indent,o=g[v-1]||g[g.length-1],i=i.substring(o))}}return o+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&o>=n&&(o=n-1),f?f.idxToPosition(o):{row:r,column:o}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n,r=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],r=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a<e;){if(a>=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,e,t),o=d.start.row):(p=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;p.length>=g[v];)r++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return{row:r,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);n<i;){var o=this.$wrapData[n];e+=o?o.length+1:1,++n>r&&(n=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,n){if(0===i)return[0,0];var r,o;for(i||(i=1/0),n=n||0,o=0;o<t.length&&!((n+="\t"===(r=t.charAt(o))?this.getScreenTabSize(n):e.getCharacterWidth(r))>i);o++);return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),o.defineOptions(f.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach(function(e,i,r){if(e.start)n=e;else{var s=e.offset+(r||0);if(n=new o(i,s,i,s+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))return n=null,!1}return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,r=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=r.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;d<c;d++)if(-1==r[u+d].search(a[d]))continue e;var f=r[u],p=r[u+c-1],m=f.length-f.match(a[0])[0].length,g=p.match(a[c-1])[0].length;l&&l.end.row===u&&l.end.column>m||(s.push(l=new o(u,m,u+c-1,g)),c>2&&(u=u+c-2))}}else for(var v=0;v<r.length;v++){var y=n.getMatchOffsets(r[v],a);for(d=0;d<y.length;d++){var w=y[d];s.push(new o(v,w.offset,v,w.offset+w.length))}}if(i){var b=i.start.column,C=i.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<b&&s[v].start.row==i.start.row;)v++;for(;v<d&&s[d].end.column>C&&s[d].end.row==i.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=i.start.row,s[v].end.row+=i.start.row}return s},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var r=n.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var i,r=this.$assembleRegExp(t);if(!r)return!1;if(t.$isMultiLine)var s=r.length,a=function(t,n,a){var l=t.search(r[0]);if(-1!=l){for(var c=1;c<s;c++)if(-1==(t=e.getLine(n+c)).search(r[c]))return;var h=t.match(r[s-1])[0].length,u=new o(n,l,n+s-1,h);return 1==r.offset?(u.start.row--,u.start.column=Number.MAX_VALUE):a&&(u.start.column+=a),!!i(u)||void 0}};else if(t.backwards)a=function(e,t,o){for(var s=n.getMatchOffsets(e,r),a=s.length-1;a>=0;a--)if(i(s[a],t,o))return!0};else a=function(e,t,o){for(var s=n.getMatchOffsets(e,r),a=0;a<s.length;a++)if(i(s[a],t,o))return!0};var l=this.$lineIterator(e,t);return{forEach:function(e){i=e,l.forEach(a)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i="\\b"+i+"\\b");var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,r);try{var o=new RegExp(i,r)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<i.length;r++)try{n.push(new RegExp(i[r],t))}catch(e){return!1}return""==i[0]?(n.shift(),n.offset=1):n.offset=0,n},this.$lineIterator=function(e,t){var i=1==t.backwards,n=0!=t.skipCurrent,r=t.range,o=t.start;o||(o=r?r[i?"end":"start"]:e.selection.getRange()),o.start&&(o=o[n!=i?"end":"start"]);var s=r?r.start.row:0,a=r?r.end.row:e.getLength()-1;return{forEach:i?function(i){var n=o.row;if(!i(e.getLine(n).substring(0,o.column),n)){for(n--;n>=s;n--)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=a,s=o.row;n>=s;n--)if(i(e.getLine(n),n))return}}:function(i){var n=o.row;if(!i(e.getLine(n).substr(o.column),n,o.column)){for(n+=1;n<=a;n++)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=s,a=o.row;n<=a;n++)if(i(e.getLine(n),n))return}}}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/keys"),r=e("../lib/useragent"),o=n.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var r in n){var o=n[r];if(o==e)delete n[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(n[r]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(void 0==i&&(i=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),i=o[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(n+a,t,i)},this)},this._addCommandToBinding=function(t,i,n){var r,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(i))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof n&&(n=n||i.isDefault?-100:e(i));var s=o[t];for(r=0;r<s.length;r++){if(e(s[r])>n)break}s.splice(r,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),r=n[i];if(n.FUNCTION_KEYS[r])i=n.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=n.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=o[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var r=o[t]+i,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(s,r),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r={editor:t,command:e,args:i};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";var n=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","Ctrl-E"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:s("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:s("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:s("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:s("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:s("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:s("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:s("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:s("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:s("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:s("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:s("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:s("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(i.row),c=i.row+1;c<=r.row+1;c++){var h=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}r.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(i.row,0,r.row+2,0),l),a>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+a)):(s=e.session.doc.getLine(i.row).length>s?s+1:s,e.selection.moveCursorTo(i.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,r=[];n.length<1&&(n=[e.selection.getRange()]);for(var s=0;s<n.length;s++)s==n.length-1&&(n[s].end.row===t&&n[s].end.column===i||r.push(new o(n[s].end.row,n[s].end.column,t,i))),0===s?0===n[s].start.row&&0===n[s].start.column||r.push(new o(0,0,n[s].start.row,n[s].start.column)):r.push(new o(n[s-1].end.row,n[s-1].end.column,n[s].start.row,n[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,u=e("./edit_session").EditSession,d=e("./search").Search,f=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,w=function(e,t){var i=e.getContainerElement();this.container=i,this.renderer=e,this.commands=new m(s.isMac?"mac":"win",g),this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new h(this),this.$mouseHandler=new l(this),new c(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new u("")),v.resetOptions(this),v._signal("editor",this)};(function(){n.implement(this,p),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),r=this.renderer.layerConfig;(n.start.row>=r.lastRow||n.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;v.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new f(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new y(e.session,i.row,i.column),r=n.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=n.stepForward())){var o=r.value,s=0,a=n.stepBackward();if("<"==a.value)do{a=r,(r=n.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(r&&s>=0);else{do{r=a,a=n.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);n.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),c=n.getCurrentTokenColumn(),h=new f(l,c,l,c+r.value.length);t.$tagHighlight&&0!==h.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),h&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(h,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new f(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,r=e.getLine(t.start.row),o=r.length,s=r.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(s)||n<=o&&/[\w\d]$/.test(s)))if(s=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var r=n.length;r--;){var o=n[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(r.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){(s=new f.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);i.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,h=i.getState(r.row),u=(a=i.getLine(r.row),n.checkOutdent(h,a,e));i.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new f(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(h,a.slice(0,r.column),i.getTabString());i.insert({row:r.row+1,column:0},d)}u&&n.autoOutdent(h,i,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),r=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var s=i.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,r=this.session.getLine(e.row);t<r.length?(i=r.charAt(t)+r.charAt(t-1),n=new f(e.row,t-1,e.row,t+1)):(i=r.charAt(t-1)+r.charAt(t-2),n=new f(e.row,t-2,e.row,t)),this.session.replace(n,i)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i)){h=this.$getSelectedRows();return void e.indentRows(h.first,h.last,"\t")}}var n=e.getLine(t.start.row),r=t.start,s=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=s-a%s,c=o.stringRepeat(" ",l);else{for(l=a%s;" "==n[t.start.column]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var h=this.$getSelectedRows();e.indentRows(h.first,h.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,i=[];for(r=e.first;r<=e.last;r++)i.push(t.getLine(r));i.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var n=new f(0,0,0,0),r=e.first;r<=e.last;r++){var o=t.getLine(r);n.start.row=r,n.end.row=r,n.end.column=o.length,t.replace(n,i[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var r=i.exec(n);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new f(t,i-1,t,i),r=this.session.getTextRange(n);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,i);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&i<s?e*=Math.pow(10,o.end-i-1):e*=Math.pow(10,o.end-i),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),h=new f(t,o.start,t,o.end);this.session.replace(h,c),this.moveCursorTo(t,Math.max(o.start+1,i+c.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,i=e.getRange(),n=e.isBackwards();if(i.isEmpty()){var r=i.start.row;t.duplicateLines(r,r)}else{var o=n?i.start:i.end,s=t.insert(o,t.getTextRange(i),!1);i.start=o,i.end=s,e.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i,n,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();i=this.$getSelectedRows(o),n=this.session.$moveLines(i.first,i.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,h=0;h<c;h++){var u=h;s[h].moveBy(a,0);for(var d=(i=this.$getSelectedRows(s[h])).first,f=i.last;++h<c;){l&&s[h].moveBy(l,0);var p=this.$getSelectedRows(s[h]);if(t&&p.first!=f)break;if(!t&&p.first>f+1)break;f=p.last}for(h--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,r=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,r*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new y(this.session,i.row,i.column),r=n.getCurrentToken(),o=r||n.stepForward();if(o){var s,a,l=!1,c={},h=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;h<o.value.length&&!l;h++)if(u[o.value[h]])switch(a=u[o.value[h]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[h]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===r.value?c[o.value]++:"</"===r.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(r=o,o=n.stepForward(),h=0)}while(o&&!l);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(i))||(p=(d=new f(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+h-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+h-1)).start,(t||p.row===i.row&&Math.abs(p.column-i.column)<2)&&(d=this.session.getBracketRange(p)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var m=o.value;if(0===(d=new f(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column)){l=!1;do{o=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),o.value===m&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?c[m]++:"</"===r.value&&c[m]--,0===c[m]&&(l=!0)))}while(r&&!l)}o&&o.type.indexOf("tag-name")&&(p=d.start).row==i.row&&Math.abs(p.column-i.column)<2&&(p=d.end)}(p=d&&d.cursor||p)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,e)&&(n=1),null!==i&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),n):n},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=i.length-1;o>=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",function(){n=!0}),s=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(n=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(w.prototype),v.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=w}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function i(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){for(var r=e[n],o={group:r.group,deltas:new Array(r.length)},s=0;s<r.deltas.length;s++){var a=r.deltas[s];o.deltas[s]=t(a)}i[n]=o}return i}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return i(t,e)},this.$deserializeDeltas=function(e){return i(e,t)}}).call(n.prototype),t.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,s),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var i=e[t],n=i.row,r=this.$annotations[n];r||(r=this.$annotations[n]={text:[]});var s=i.text;s=s?o.escapeHTML(s):i.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=i.type;"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,i=e.end.row-t;if(0===i);else if("remove"==e.action)this.$annotations.splice(t,i+1,null);else{var n=new Array(i+1);n.unshift(t,1),this.$annotations.splice.apply(this.$annotations,n)}}},this.update=function(e){for(var t=this.session,i=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(i),s=o?o.start.row:1/0,a=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,c=t.$decorations,h=t.$firstLineNumber,u=0,d=t.gutterRenderer||this.$renderer,f=null,p=-1,m=i;;){if(m>s&&(m=o.end.row+1,s=(o=t.getNextFoldLine(m,o))?o.start.row:1/0),m>r){for(;this.$cells.length>p+1;)f=this.$cells.pop(),this.element.removeChild(f.element);break}(f=this.$cells[++p])||((f={element:null,textNode:null,foldWidget:null}).element=n.createElement("div"),f.textNode=document.createTextNode(""),f.element.appendChild(f.textNode),this.element.appendChild(f.element),this.$cells[p]=f);var g="ace_gutter-cell ";if(l[m]&&(g+=l[m]),c[m]&&(g+=c[m]),this.$annotations[m]&&(g+=this.$annotations[m].className),f.element.className!=g&&(f.element.className=g),(y=t.getRowLength(m)*e.lineHeight+"px")!=f.element.style.height&&(f.element.style.height=y),a){var v=a[m];null==v&&(v=a[m]=t.getFoldWidget(m))}if(v){f.foldWidget||(f.foldWidget=n.createElement("span"),f.element.appendChild(f.foldWidget));g="ace_fold-widget ace_"+v;"start"==v&&m==s&&m<o.end.row?g+=" ace_closed":g+=" ace_open",f.foldWidget.className!=g&&(f.foldWidget.className=g);var y=e.lineHeight+"px";f.foldWidget.style.height!=y&&(f.foldWidget.style.height=y)}else f.foldWidget&&(f.element.removeChild(f.foldWidget),f.foldWidget=null);var w=u=d?d.getText(t,m):m+h;w!=f.textNode.data&&(f.textNode.data=w),m++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(u=t.getLength()+h);var b=d?d.getWidth(t,u,e):u.toString().length*e.characterWidth,C=this.$padding||this.$computePadding();(b+=C.left+C.right)===this.gutterWidth||isNaN(b)||(this.gutterWidth=b,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",b))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?n.addCssClass(this.element,"ace_folding-enabled"):n.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=n.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,i,n){return(e?1:0)|(t?2:0)|(i?4:0)|(n?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e=e||this.config){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var r=n.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),n.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;n.renderer(t,r,s,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,r,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,r,n.clazz,e):r.isMultiLine()?"text"==n.type?this.drawTextMarker(t,r,n.clazz,e):this.drawMultiLineMarker(t,r,n.clazz,e):this.drawSingleLineMarker(t,r,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,i,r,o,s){for(var a=this.session,l=i.start.row,c=i.end.row,h=l,u=0,d=0,f=a.getScreenLastRowColumn(h),p=new n(h,i.start.column,h,d);h<=c;h++)p.start.row=p.end.row=h,p.start.column=h==l?i.start.column:a.getRowWrapIndent(h),p.end.column=f,u=d,d=f,f=h+1<c?a.getScreenLastRowColumn(h+1):h==c?0:i.end.column,this.drawSingleLineMarker(t,p,r+(h==l?" ace_start":"")+" ace_br"+e(h==l||h==l+1&&i.start.column,u<d,d>f,h==c),o,h==c?0:1,s)},this.drawMultiLineMarker=function(e,t,i,n,r){var o=this.$padding,s=n.lineHeight,a=this.$getTop(t.start.row,n),l=o+t.start.column*n.characterWidth;r=r||"",e.push("<div class='",i," ace_br1 ace_start' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",l,"px;",r,"'></div>"),a=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;if(e.push("<div class='",i," ace_br12' style='","height:",s,"px;","width:",c,"px;","top:",a,"px;","left:",o,"px;",r,"'></div>"),!((s=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){a=this.$getTop(t.start.row+1,n);var h=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",i,h?" ace_br"+h:"","' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",o,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,i,n,r,o){var s=n.lineHeight,a=(t.end.column+(r||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("<div class='",i,"' style='","height:",s,"px;","width:",a,"px;","top:",l,"px;","left:",c,"px;",o||"","'></div>")},this.drawFullLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),s=n.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,n)-o),e.push("<div class='",i,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),s=n.lineHeight;e.push("<div class='",i,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i<e+1;i++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,i)+"</span>"):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",r="",s="";if(this.showInvisibles){n+=" ace_invisible",r=" ace_invisible_space",s=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=a=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+n+r+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+n+s+"'>"+l+"</span>"}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),r=Math.min(i,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<n;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}s++}a=n;for(var l,c=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;a>c&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var h=o[s++];if(h){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==c&&l),h.style.height=e.lineHeight*this.session.getRowLength(a)+"px",h.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var i=this.element;if(t.firstRow<e.firstRow)for(var n=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);n>0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)}if(e.lastRow>t.lastRow){r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(r)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>i);){var l=r.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&s),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,r=i,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==s&&o),this.$useLineGroups()&&t.push("</div>"),r++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var r=this,s=n.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,function(e,i,n,s,a){if(i)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&#38;";if("<"==e)return"&#60;";if(">"==e)return"&#62;";if("\t"==e){var l=r.session.getScreenTabSize(t+s);return t+=l-1,r.$tabStrings[l]}if(" "==e){var c=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+c+"' style='width:"+2*r.config.characterWidth+"px'>"+h+"</span>"}return n?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")});if(this.$textToken[i.type])e.push(s);else{var a="ace_"+i.type.replace(/\./g," ace_"),l="";"fold"==i.type&&(l=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",l,">",s,"</span>")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var r=0,s=0,a=i[0],l=0,c=0;c<t.length;c++){var h=t[c],u=h.value;if(0==c&&this.displayIndentGuides){if(r=u.length,!(u=this.renderIndentGuide(e,u,a)))continue;r-=u.length}if(r+u.length<a)l=this.$renderToken(e,l,h,u),r+=u.length;else{for(;r+u.length>=a;)l=this.$renderToken(e,l,h,u.substring(0,a-r)),u=u.substring(a-r),r=a,n||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",i.indent)),l=0,a=i[++s]||Number.MAX_VALUE;0!=u.length&&(r+=u.length,l=this.$renderToken(e,l,h,u))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],r=n.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(i=this.$renderToken(e,i,n,r));for(var o=1;o<t.length;o++)r=(n=t[o]).value,i=this.$renderToken(e,i,n,r)},this.$renderLine=function(e,t,i,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);if(i||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,i):this.$renderSimpleLine(e,r)}this.showInvisibles&&(n&&(t=n.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),i||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];var r=i.getTokens(e);return t.walk(function(e,t,o,s,a){null!=e?n.push({type:"fold",value:e}):(a&&(r=i.getTokens(t)),r.length&&function(e,t,i){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;for(o!=t&&((s=e[r].value.substring(t-o)).length>i-t&&(s=s.substring(0,i-t)),n.push({type:e[r].type,value:s}),o=t+s.length,r+=1);o<i&&r<e.length;){var s;(s=e[r].value).length+o>i?n.push({type:e[r].type,value:s.substring(0,i-o)}):n.push(e[r]),o+=s.length,r+=1}}(r,s,o))},t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e);return{left:this.$padding+i.column*this.config.characterWidth,top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);i=0;for(var r=t.length;i<r;i++){var o=this.getPixelPosition(t[i].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&i>1)){var s=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(s,o,e,t[i],this.session):(s.left=o.left+"px",s.top=o.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px")}}for(;this.cursors.length>n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),t.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {\tposition: relative;\toverflow: hidden;\tfont: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\tdirection: ltr;\t}\t.ace_scroller {\tposition: absolute;\toverflow: hidden;\ttop: 0;\tbottom: 0;\tbackground-color: inherit;\t-ms-user-select: none;\t-moz-user-select: none;\t-webkit-user-select: none;\tuser-select: none;\tcursor: text;\t}\t.ace_content {\tposition: absolute;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tmin-width: 100%;\t}\t.ace_dragging .ace_scroller:before{\tposition: absolute;\ttop: 0;\tleft: 0;\tright: 0;\tbottom: 0;\tcontent: \'\';\tbackground: rgba(250, 250, 250, 0.01);\tz-index: 1000;\t}\t.ace_dragging.ace_dark .ace_scroller:before{\tbackground: rgba(0, 0, 0, 0.01);\t}\t.ace_selecting, .ace_selecting * {\tcursor: text !important;\t}\t.ace_gutter {\tposition: absolute;\toverflow : hidden;\twidth: auto;\ttop: 0;\tbottom: 0;\tleft: 0;\tcursor: default;\tz-index: 4;\t-ms-user-select: none;\t-moz-user-select: none;\t-webkit-user-select: none;\tuser-select: none;\t}\t.ace_gutter-active-line {\tposition: absolute;\tleft: 0;\tright: 0;\t}\t.ace_scroller.ace_scroll-left {\tbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\t}\t.ace_gutter-cell {\tpadding-left: 19px;\tpadding-right: 6px;\tbackground-repeat: no-repeat;\t}\t.ace_gutter-cell.ace_error {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\tbackground-repeat: no-repeat;\tbackground-position: 2px center;\t}\t.ace_gutter-cell.ace_warning {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\tbackground-position: 2px center;\t}\t.ace_gutter-cell.ace_info {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\tbackground-position: 2px center;\t}\t.ace_dark .ace_gutter-cell.ace_info {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\t}\t.ace_scrollbar {\tposition: absolute;\tright: 0;\tbottom: 0;\tz-index: 6;\t}\t.ace_scrollbar-inner {\tposition: absolute;\tcursor: text;\tleft: 0;\ttop: 0;\t}\t.ace_scrollbar-v{\toverflow-x: hidden;\toverflow-y: scroll;\ttop: 0;\t}\t.ace_scrollbar-h {\toverflow-x: scroll;\toverflow-y: hidden;\tleft: 0;\t}\t.ace_print-margin {\tposition: absolute;\theight: 100%;\t}\t.ace_text-input {\tposition: absolute;\tz-index: 0;\twidth: 0.5em;\theight: 1em;\topacity: 0;\tbackground: transparent;\t-moz-appearance: none;\tappearance: none;\tborder: none;\tresize: none;\toutline: none;\toverflow: hidden;\tfont: inherit;\tpadding: 0 1px;\tmargin: 0 -1px;\ttext-indent: -1em;\t-ms-user-select: text;\t-moz-user-select: text;\t-webkit-user-select: text;\tuser-select: text;\twhite-space: pre!important;\t}\t.ace_text-input.ace_composition {\tbackground: inherit;\tcolor: inherit;\tz-index: 1000;\topacity: 1;\ttext-indent: 0;\t}\t.ace_layer {\tz-index: 1;\tposition: absolute;\toverflow: hidden;\tword-wrap: normal;\twhite-space: pre;\theight: 100%;\twidth: 100%;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tpointer-events: none;\t}\t.ace_gutter-layer {\tposition: relative;\twidth: auto;\ttext-align: right;\tpointer-events: auto;\t}\t.ace_text-layer {\tfont: inherit !important;\t}\t.ace_cjk {\tdisplay: inline-block;\ttext-align: center;\t}\t.ace_cursor-layer {\tz-index: 4;\t}\t.ace_cursor {\tz-index: 4;\tposition: absolute;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tborder-left: 2px solid;\ttransform: translatez(0);\t}\t.ace_slim-cursors .ace_cursor {\tborder-left-width: 1px;\t}\t.ace_overwrite-cursors .ace_cursor {\tborder-left-width: 0;\tborder-bottom: 1px solid;\t}\t.ace_hidden-cursors .ace_cursor {\topacity: 0.2;\t}\t.ace_smooth-blinking .ace_cursor {\t-webkit-transition: opacity 0.18s;\ttransition: opacity 0.18s;\t}\t.ace_editor.ace_multiselect .ace_cursor {\tborder-left-width: 1px;\t}\t.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\tposition: absolute;\tz-index: 3;\t}\t.ace_marker-layer .ace_selection {\tposition: absolute;\tz-index: 5;\t}\t.ace_marker-layer .ace_bracket {\tposition: absolute;\tz-index: 6;\t}\t.ace_marker-layer .ace_active-line {\tposition: absolute;\tz-index: 2;\t}\t.ace_marker-layer .ace_selected-word {\tposition: absolute;\tz-index: 4;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\t}\t.ace_line .ace_fold {\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tdisplay: inline-block;\theight: 11px;\tmargin-top: -2px;\tvertical-align: middle;\tbackground-image:\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\tbackground-repeat: no-repeat, repeat-x;\tbackground-position: center center, top left;\tcolor: transparent;\tborder: 1px solid black;\tborder-radius: 2px;\tcursor: pointer;\tpointer-events: auto;\t}\t.ace_dark .ace_fold {\t}\t.ace_fold:hover{\tbackground-image:\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\t}\t.ace_tooltip {\tbackground-color: #FFF;\tbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\tbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\tborder: 1px solid gray;\tborder-radius: 1px;\tbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\tcolor: black;\tmax-width: 100%;\tpadding: 3px 4px;\tposition: fixed;\tz-index: 999999;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tcursor: default;\twhite-space: pre;\tword-wrap: break-word;\tline-height: normal;\tfont-style: normal;\tfont-weight: normal;\tletter-spacing: normal;\tpointer-events: none;\t}\t.ace_folding-enabled > .ace_gutter-cell {\tpadding-right: 13px;\t}\t.ace_fold-widget {\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tmargin: 0 -12px 0 1px;\tdisplay: none;\twidth: 11px;\tvertical-align: top;\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\tbackground-repeat: no-repeat;\tbackground-position: center;\tborder-radius: 3px;\tborder: 1px solid transparent;\tcursor: pointer;\t}\t.ace_folding-enabled .ace_fold-widget {\tdisplay: inline-block; \t}\t.ace_fold-widget.ace_end {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\t}\t.ace_fold-widget.ace_closed {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\t}\t.ace_fold-widget:hover {\tborder: 1px solid rgba(0, 0, 0, 0.3);\tbackground-color: rgba(255, 255, 255, 0.2);\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\t}\t.ace_fold-widget:active {\tborder: 1px solid rgba(0, 0, 0, 0.4);\tbackground-color: rgba(0, 0, 0, 0.05);\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\t}\t.ace_dark .ace_fold-widget {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\t}\t.ace_dark .ace_fold-widget.ace_end {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\t}\t.ace_dark .ace_fold-widget.ace_closed {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\t}\t.ace_dark .ace_fold-widget:hover {\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\tbackground-color: rgba(255, 255, 255, 0.1);\t}\t.ace_dark .ace_fold-widget:active {\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\t}\t.ace_fold-widget.ace_invalid {\tbackground-color: #FFB4B4;\tborder-color: #DE5555;\t}\t.ace_fade-fold-widgets .ace_fold-widget {\t-webkit-transition: opacity 0.4s ease 0.05s;\ttransition: opacity 0.4s ease 0.05s;\topacity: 0;\t}\t.ace_fade-fold-widgets:hover .ace_fold-widget {\t-webkit-transition: opacity 0.05s ease 0.05s;\ttransition: opacity 0.05s ease 0.05s;\topacity:1;\t}\t.ace_underline {\ttext-decoration: underline;\t}\t.ace_bold {\tfont-weight: bold;\t}\t.ace_nobold .ace_bold {\tfont-weight: normal;\t}\t.ace_italic {\tfont-style: italic;\t}\t.ace_error-marker {\tbackground-color: rgba(255, 0, 0,0.2);\tposition: absolute;\tz-index: 9;\t}\t.ace_highlight-marker {\tbackground-color: rgba(255, 255, 0,0.2);\tposition: absolute;\tz-index: 8;\t}\t.ace_br1 {border-top-left-radius : 3px;}\t.ace_br2 {border-top-right-radius : 3px;}\t.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\t.ace_br4 {border-bottom-right-radius: 3px;}\t.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\t.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\t.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\t.ace_br8 {border-bottom-left-radius : 3px;}\t.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\t.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\t.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\t.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\t.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\t.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\t.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\t',"ace_editor.css");var g=function(e,t){var i=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new c(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;n||(n=r.clientHeight||r.scrollHeight),i||(i=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var r=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,r|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(r|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!i||!n,r&&this._signal("resize",s),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)n.top=n.left="0";else{var o=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(s)[0]+2,r+=2}(i-=this.scrollLeft)>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=r+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-r)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight());var n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var r=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,h=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=h;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,n-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var d=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+h<0||this.scrollTop>u.top),f=a!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,m,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),y=v+g,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var b=e.getFoldLine(v);b&&(v=b.start.row),p=e.documentToScreenRow(v,0),m=e.getRowLength(v)*w,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(y)*w+m,l=this.scrollTop-p*w;var C=0;return this.layerConfig.width!=r&&(C=this.CHANGE_H_SCROLL),(s||f)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:y,lineHeight:w,characterWidth:this.characterWidth,minHeight:c,maxHeight:n,offset:l,gutterOffset:Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/w)),height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,e,t),!0)},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),r=n.left,o=n.top,s=i&&i.top||0,a=i&&i.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var c=this.scrollLeft;c>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var i=this.$cursorLayer.getPixelPosition(e),n=this.$size.scrollerHeight-this.lineHeight,r=i.top-n*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var i=0,n=this.STEPS,r=[],o=function(e,t,i){return i*(Math.pow(e-1,3)+1)+t};for(i=0;i<n;++i)r.push(o(i/this.STEPS,e,t-e));return r},this.scrollToLine=function(e,t,i,n){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==i&&this.animateScrolling(o,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==i)return}var o=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=(e+this.scrollLeft-i.left-this.$padding)/this.characterWidth,r=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),o=Math.round(n);return{row:r,column:o,side:n-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=Math.round((e+this.scrollLeft-i.left-this.$padding)/this.characterWidth),r=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(n,0))},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),r=this.$padding+Math.round(n.column*this.characterWidth),o=n.row*this.lineHeight;return{pageX:i.left+r-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var n=e||this.$options.theme.initialValue;o.loadModule(["theme",n],s)}function s(n){if(i.$themeId!=e)return t&&t();if(n.cssClass){r.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),o.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config"),l=function(t,n,r,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(n.id,"worker");else{var s=this.$normalizePath;o=o||s(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach(function(t){l[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var c=n.src,h=new(i(66))([c],{type:"application/javascript"}),u=(window.URL||window.webkitURL).createObjectURL(h);this.$worker=new Worker(u)}catch(e){if(!(e instanceof window.DOMException))throw e;h=this.$workerBlob(o);var d=window.URL||window.webkitURL,f=d.createObjectURL(h);this.$worker=new Worker(f),d.revokeObjectURL(f)}this.$worker.postMessage({init:!0,tlns:l,module:n.id,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return i.append(t),i.getBlob("application/javascript")}}}).call(l.prototype);var c=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,r=!1,o=Object.create(s),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(r?setTimeout(c):c())},this.setEmitSync=function(e){r=e};var c=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&o._signal(e.event,e.data)};o.postMessage=function(e){l.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(n=new e[i](o);l.messageBuffer.length;)c()})};c.prototype=l.prototype,t.UIWorkerClient=c,t.WorkerClient=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,i,n,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=i.addMarker(new n(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=i),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new n(a.row,a.column,a.row,a.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,r){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),r,null,!1)};i(this.pos,this.mainClass);for(var r=this.others.length;r--;)i(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,i=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&r.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||i||l){if(0===c){var h,u=e.editor,d=u.selection,f=u.inMultiSelectMode,p=e.getDocumentPosition(),m=d.getCursor(),g=e.inSelection()||d.isEmpty()&&o(p,m),v=e.x,y=e.y,w=u.session,b=u.renderer.pixelToScreenCoordinates(v,y),C=b;if(u.$mouseHandler.$enableJumpToDef)a&&i||l&&i?h=s?"block":"add":i&&u.$blockSelectEnabled&&(h="block");else if(l&&!i){if(h="add",!f&&s)return}else i&&u.$blockSelectEnabled&&(h="block");if(h&&r.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==h){if(!f&&g)return;if(!f){var A=d.toOrientedRange();u.addSelectionMarker(A)}var x=d.rangeList.rangeAtPoint(p);u.$blockScrolling++,u.inVirtualSelectionMode=!0,s&&(x=null,A=d.ranges[0]||A,u.removeSelectionMarker(A)),u.once("mouseup",function(){var e=d.toOrientedRange();x&&e.isEmpty()&&o(x.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(A.cursor):A&&(u.removeSelectionMarker(A),d.addRange(A)),d.addRange(e)),u.$blockScrolling--,u.inVirtualSelectionMode=!1})}else if("block"==h){var E;e.stop(),u.inVirtualSelectionMode=!0;var F=[];u.$blockScrolling++,f&&!l?d.toSingleRange():!f&&l&&(E=d.toOrientedRange(),u.addSelectionMarker(E)),s?b=w.documentToScreenPosition(d.lead):d.moveToPosition(p),u.$blockScrolling--,C={row:-1,column:-1};var _=function(){var e=u.renderer.pixelToScreenCoordinates(v,y),t=w.screenToDocumentPosition(e.row,e.column);o(C,e)&&o(t,d.lead)||(C=e,u.$blockScrolling++,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(F),F=d.rectangularRangeBlock(C,b),u.$mouseHandler.$clickSelection&&1==F.length&&F[0].isEmpty()&&(F[0]=u.$mouseHandler.$clickSelection.clone()),F.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers(),u.$blockScrolling--)};n.capture(u.container,function(e){v=e.clientX,y=e.clientY},function(e){clearInterval(S),u.removeSelectionMarkers(F),F.length||(F=[d.toOrientedRange()]),u.$blockScrolling++,E&&(u.removeSelectionMarker(E),d.toSingleRange(E));for(var t=0;t<F.length;t++)d.addRange(F[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null,u.$blockScrolling--});var S=setInterval(function(){_()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,i){var n=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,s=i.end.row;if(o==s){if(n)var a=i.end,l=i.start;else a=i.start,l=i.end;return this.addRange(r.fromPoints(l,l)),void this.addRange(r.fromPoints(a,a))}var c=[],h=this.getLineRange(o,!0);h.start.column=i.start.column,c.push(h);for(var u=o+1;u<s;u++)c.push(this.getLineRange(u,!0));(h=this.getLineRange(s,!0)).end.column=i.end.column,c.push(h),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column<t.column;if(o)var s=e.column,a=t.column;else s=t.column,a=e.column;var l=e.row<t.row;if(l)var c=e.row,h=t.row;else c=t.row,h=e.row;s<0&&(s=0),c<0&&(c=0),c==h&&(i=!0);for(var u=c;u<=h;u++){var d=r.fromPoints(this.session.screenToDocumentPosition(u,s),this.session.screenToDocumentPosition(u,a));if(d.isEmpty()){if(p&&f(d.end,p))break;var p=d.end}d.cursor=o?d.start:d.end,n.push(d)}if(l&&n.reverse(),!i){for(var m=n.length-1;n[m].isEmpty()&&m>0;)m--;if(m>0)for(var g=0;n[g].isEmpty();)g++;for(var v=m;v>=g;v--)n[v].isEmpty()&&n.splice(v,1)}return n}}.call(o.prototype);var d=e("./editor").Editor;function f(e,t){return e.row==t.row&&e.column==t.column}function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}a.addListener(t,"keydown",function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()}),a.addListener(t,"keyup",n),a.addListener(t,"blur",n)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var r=t.indexOf(n);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,r=i&&i.keepOrder,s=1==i||i&&i.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(r?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=h.length;f--;){if(s)for(;f>0&&h[f].start.row==h[f-1].end.row;)f--;d.fromOrientedRange(h[f]),d.index=f,this.selection=a.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===p||(n=p),d.toOrientedRange(h[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var r=this.session.getDocument().getNewLineCharacter();(e=i.join(r)).length==(i.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var i=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var n=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;n.row==t.row&&this.session.$clipPositionToDocument(n.row,n.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,i){if((t=t||{}).needle=e||t.needle,void 0==t.needle){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(n)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;i||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return n&&o.rangeList.rangeAtPoint(n.start)&&o.addRange(n,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,o=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(i.isEmpty())c=a;else var l=this.session.documentToScreenPosition(n?i.end:i.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);n?(s=r.fromPoints(a,c)).cursor=s.start:(s=r.fromPoints(c,a)).cursor=s.end;if(s.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var h=i.cursor}else this.selection.addRange(i);this.selection.addRange(s),h&&this.selection.substractPoint(h)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,r=n.length;r--;){if((a=n[r]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}i.mergeOverlappingRanges();var s=[];for(r=n.length;r--;){var a=n[r];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=n.length;r--;){o=(a=n[r]).clone();t.replace(a,s[r]),a.start.row=o.start.row,a.start.column=o.start.column}},this.selectMore=function(e,t,i){var n=this.session,r=n.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=n.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!i)){var o=function(e,t,i){return h.$options.wrap=!0,h.$options.needle=t,h.$options.backwards=-1==i,h.find(e)}(n,n.getTextRange(r),e);o&&(o.cursor=-1==e?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,o=i.filter(function(e){if(e.cursor.row==n)return!0;n=e.cursor.row});if(i.length&&o.length!=i.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,c=i.map(function(t){var i=t.cursor,n=e.getLine(i.row).substr(i.column).search(/\S/g);return-1==n&&(n=0),i.column>s&&(s=i.column),n<a&&(a=n),n});i.forEach(function(t,i){var n=t.cursor,o=s-n.column,h=c[i]-a;o>h?e.insert(n,l.stringRepeat(" ",o-h)):e.remove(new r(n.row,n.column,n.row,n.column-o+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,f=u==d;if(f){var p,m=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<m);do{p=this.session.getLine(u)}while(/[=:]/.test(p)&&--u>0);u<0&&(u=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(u,d);g=this.$reAlignText(g,f),this.session.insert({row:u,column:0},g.join("\n")+"\n"),f||(h.start.column=0,h.end.column=g[g.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var i,n,r,o=!0,s=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,r=t[3].length,t):(i+n+r!=t[1].length+t[2].length+t[3].length&&(s=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),n<t[2].length&&(n=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]}).map(t?c:o?s?function(e){return e[2]?a(i+n-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(i)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(i)+e[2]+a(n-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=i||o.length,l=e.getLength(),c=t,h=t;++t<l;){var u=e.getLine(t).search(r);if(-1!=u){if(u<=s)break;h=t}}if(h>c){var d=e.getLine(h).length;return new n(c,a,h,d)}}},this.openingBracketBlock=function(e,t,i,r,o){var s={row:i,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,i,r,o){var s={row:i,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,n.fromPoints(a,s)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {\tbackground: #f0f0f0;\tcolor: #333;\t}\t.ace-tm .ace_print-margin {\twidth: 1px;\tbackground: #e8e8e8;\t}\t.ace-tm .ace_fold {\tbackground-color: #6B72E6;\t}\t.ace-tm {\tbackground-color: #FFFFFF;\tcolor: black;\t}\t.ace-tm .ace_cursor {\tcolor: black;\t}\t.ace-tm .ace_invisible {\tcolor: rgb(191, 191, 191);\t}\t.ace-tm .ace_storage,\t.ace-tm .ace_keyword {\tcolor: blue;\t}\t.ace-tm .ace_constant {\tcolor: rgb(197, 6, 11);\t}\t.ace-tm .ace_constant.ace_buildin {\tcolor: rgb(88, 72, 246);\t}\t.ace-tm .ace_constant.ace_language {\tcolor: rgb(88, 92, 246);\t}\t.ace-tm .ace_constant.ace_library {\tcolor: rgb(6, 150, 14);\t}\t.ace-tm .ace_invalid {\tbackground-color: rgba(255, 0, 0, 0.1);\tcolor: red;\t}\t.ace-tm .ace_support.ace_function {\tcolor: rgb(60, 76, 114);\t}\t.ace-tm .ace_support.ace_constant {\tcolor: rgb(6, 150, 14);\t}\t.ace-tm .ace_support.ace_type,\t.ace-tm .ace_support.ace_class {\tcolor: rgb(109, 121, 222);\t}\t.ace-tm .ace_keyword.ace_operator {\tcolor: rgb(104, 118, 135);\t}\t.ace-tm .ace_string {\tcolor: rgb(3, 106, 7);\t}\t.ace-tm .ace_comment {\tcolor: rgb(76, 136, 107);\t}\t.ace-tm .ace_comment.ace_doc {\tcolor: rgb(0, 102, 255);\t}\t.ace-tm .ace_comment.ace_doc.ace_tag {\tcolor: rgb(128, 159, 191);\t}\t.ace-tm .ace_constant.ace_numeric {\tcolor: rgb(0, 0, 205);\t}\t.ace-tm .ace_variable {\tcolor: rgb(49, 132, 149);\t}\t.ace-tm .ace_xml-pe {\tcolor: rgb(104, 104, 91);\t}\t.ace-tm .ace_entity.ace_name.ace_function {\tcolor: #0000A2;\t}\t.ace-tm .ace_heading {\tcolor: rgb(12, 7, 255);\t}\t.ace-tm .ace_list {\tcolor:rgb(185, 6, 144);\t}\t.ace-tm .ace_meta.ace_tag {\tcolor:rgb(0, 22, 142);\t}\t.ace-tm .ace_string.ace_regex {\tcolor: rgb(255, 0, 0)\t}\t.ace-tm .ace_marker-layer .ace_selection {\tbackground: rgb(181, 213, 255);\t}\t.ace-tm.ace_multiselect .ace_selection.ace_start {\tbox-shadow: 0 0 3px 0px white;\t}\t.ace-tm .ace_marker-layer .ace_step {\tbackground: rgb(252, 255, 0);\t}\t.ace-tm .ace_marker-layer .ace_stack {\tbackground: rgb(164, 229, 101);\t}\t.ace-tm .ace_marker-layer .ace_bracket {\tmargin: -1px 0 0 -1px;\tborder: 1px solid rgb(192, 192, 192);\t}\t.ace-tm .ace_marker-layer .ace_active-line {\tbackground: rgba(0, 0, 0, 0.07);\t}\t.ace-tm .ace_gutter-active-line {\tbackground-color : #dcdcdc;\t}\t.ace-tm .ace_marker-layer .ace_selected-word {\tbackground: rgb(250, 250, 255);\tborder: 1px solid rgb(200, 200, 250);\t}\t.ace-tm .ace_indent-guide {\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\t}\t',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");e("./range").Range;function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,r=n.start.row,o=n.end.row,s="add"==e.action,a=r+1;a<o;a++)i[a]&&(i[a].hidden=s);i[o]&&(s?i[r]?i[o].hidden=s:i[r]=i[o]:(i[r]==i[o]&&(i[r]=void 0),i[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.start.row,n=e.end.row-i;if(0===n);else if("remove"==e.action){t.splice(i+1,n).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var r=new Array(n);r.unshift(i,0),t.splice.apply(t,r),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){if(e)for(t=!1,e.row=i;e.$oldWidget;)e.$oldWidget.row=i,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var i=this.editor.renderer;e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,i.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/i.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);if(e.$fold=r,r){var o=this.session.lineWidgets;e.row!=r.end.row||o[r.start.row]?e.hidden=!0:o[r.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,i),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var r=1/0,o=0;o<i.length;o++){var s=i[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/n.characterWidth));var a=s.h/n.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,i.firstRow),o=Math.max(this.lastRow,i.lastRow,n.length);r>0&&!n[r];)r--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var s=r;s<=o;s++){var a=n[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";var n=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=i.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,h=function(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var r=function(e,t,i){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,s=i(t,e[o]);if(s>0)n=o+1;else{if(!(s<0))return o;r=o-1}}return-(n+1)}(n,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=n.length?r=i>0?0:n.length-1:0===r&&i<0&&(r=n.length-1);var s=n[r];if(s&&i){if(s.row===t){do{s=n[r+=i]}while(s&&s.row===t);if(!s)return n.slice()}var a=[];t=s.row;do{a[i<0?"unshift":"push"](s),s=n[r+=i]}while(s&&s.row==t);return a.length&&a}}}(i,a,t);if(h){var u=h[0];s.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,s.row=u.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("<br>"),f.appendChild(r.createElement("div"));var g=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString("\t .error_widget_wrapper {\t background: inherit;\t color: inherit;\t border:none\t }\t .error_widget {\t border-top: solid 2px;\t border-bottom: solid 2px;\t margin: 5px 0;\t padding: 10px 40px;\t white-space: pre-wrap;\t }\t .error_widget.ace_error, .error_widget_arrow.ace_error{\t border-color: #ff5a5a\t }\t .error_widget.ace_warning, .error_widget_arrow.ace_warning{\t border-color: #F1D817\t }\t .error_widget.ace_info, .error_widget_arrow.ace_info{\t border-color: #5a5a5a\t }\t .error_widget.ace_ok, .error_widget_arrow.ace_ok{\t border-color: #5aaa5a\t }\t .error_widget_arrow {\t position: absolute;\t border: solid 5px;\t border-top-color: transparent!important;\t border-right-color: transparent!important;\t border-left-color: transparent!important;\t top: -5px;\t }\t","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),r=e("./lib/event"),o=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(e){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=n.getInnerText(e),e.innerHTML="");var c=t.createEditSession(s),h=new o(new l(e));h.setSession(c);var u={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),r.addListener(window,"resize",u.onResize),h.on("destroy",function(){r.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var i=new s(e,t);return i.setUndoManager(new a),i},t.EditSession=s,t.UndoManager=a,t.version="1.2.3"}),ace.acequire(["ace/ace"],function(e){for(var t in e&&e.config.init(!0),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),e.exports=window.ace.acequire("ace/ace")},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=function(){if(t.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch(e){}var e=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;return function(t,i){var n=new e,r=i.endings,o=i.type;if(r)for(var s=0,a=t.length;s<a;++s)n.append(t[s],r);else for(var s=0,a=t.length;s<a;++s)n.append(t[s]);return o?n.getBlob(o):n.getBlob()}}()}).call(t,function(){return this}())},function(e,t,i){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};n.inherits(o,r),t.JsonHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new n(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";var n,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],h={},u=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return n=h[t];n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(e,t,i,n){var r=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},f=function(){this.add("braces","insertion",function(e,t,i,r,o){var s=i.getCursorPosition(),l=r.doc.getLine(s.row);if("{"==o){u(i);var c=i.getSelectionRange(),h=r.doc.getTextRange(c);if(""!==h&&"{"!==h&&i.getWrapBehavioursEnabled())return d(c,h,"{","}");if(f.isSaneInsertion(i,r))return/[\]\}\)]/.test(l[s.column])||i.inMultiSelectMode?(f.recordAutoInsert(i,r,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(i,r,"{"),{text:"{",selection:[1,1]})}else if("}"==o){if(u(i),"}"==l.substring(s.column,s.column+1))if(null!==r.$findOpeningBracket("}",{column:s.column+1,row:s.row})&&f.isAutoInsertedClosing(s,l,o))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==o||"\r\n"==o){u(i);var p="";if(f.isMaybeInsertedClosing(s,l)&&(p=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing()),"}"===l.substring(s.column,s.column+1)){var m=r.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!m)return null;var g=this.$getIndent(r.getLine(m.row))}else{if(!p)return void f.clearMaybeInsertedClosing();g=this.$getIndent(l)}var v=g+r.getTabString();return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}f.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(u(i),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,i,n,r){if("("==r){u(i);var o=i.getSelectionRange(),s=n.doc.getTextRange(o);if(""!==s&&i.getWrapBehavioursEnabled())return d(o,s,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==r){u(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(u(i),")"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,i,n,r){if("["==r){u(i);var o=i.getSelectionRange(),s=n.doc.getTextRange(o);if(""!==s&&i.getWrapBehavioursEnabled())return d(o,s,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){u(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(u(i),"]"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,i,n,r){if('"'==r||"'"==r){u(i);var o=r,s=i.getSelectionRange(),a=n.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&i.getWrapBehavioursEnabled())return d(s,a,o,o);if(!a){var l=i.getCursorPosition(),c=n.doc.getLine(l.row),h=c.substring(l.column-1,l.column),f=c.substring(l.column,l.column+1),p=n.getTokenAt(l.row,l.column),m=n.getTokenAt(l.row,l.column+1);if("\\"==h&&p&&/escape/.test(p.type))return null;var g,v=p&&/string|escape/.test(p.type),y=!m||/string|escape/.test(m.type);if(f==o)g=v!==y;else{if(v&&!y)return null;if(v&&y)return null;var w=n.$mode.tokenRe;w.lastIndex=0;var b=w.test(h);w.lastIndex=0;var C=w.test(h);if(b||C)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;g=!0}return{text:g?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)&&(u(i),n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new s(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var r=new s(t,i.row,i.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=r.row,n.autoInsertedLineEnd=i+o.substr(r.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=r.row,n.maybeInsertedLineStart=o.substr(0,r.column)+i,n.maybeInsertedLineEnd=o.substr(r.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},r.inherits(f,o),t.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var n=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var r=this._getFoldWidgetBase(e,t,i);return!r&&this.startRegionRe.test(n)?"start":r},this.getFoldWidgetRange=function(e,t,i,n){var r,o=e.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,i);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,s);var a=e.getCommentFoldRange(i,s+r[0].length,1);return a&&!a.isMultiLine()&&(n?a=this.getSectionRange(e,i):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],i,s):e.getCommentFoldRange(i,s,-1)}},this.getSectionRange=function(e,t){for(var i=e.getLine(t),n=i.search(/\S/),o=t,s=i.length,a=t+=1,l=e.getLength();++t<l;){var c=(i=e.getLine(t)).search(/\S/);if(-1!==c){if(n>c)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=o)break;if(h.isMultiLine())t=h.end.row;else if(n==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,i){for(var n=t.search(/\s*$/),o=e.getLength(),s=i,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++i<o;){t=e.getLine(i);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(i>s)return new r(s,n,i,t.length)}}.call(s.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(n+=i));return n},this.checkOutdent=function(e,t,i){return this.$outdent.checkOutdent(t,i)},this.autoOutdent=function(e,t,i){this.$outdent.autoOutdent(t,i)},this.createWorker=function(e){var t=new h(["ace"],i(68),"JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(u.prototype),t.Mode=u})},function(e,t){e.exports.id="ace/mode/json_worker",e.exports.src='"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r    \\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(e,t){ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/dom"),r=e("../lib/lang"),o=e("../lib/event"),s=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");n.importCssString("\t.ace_search {\tbackground-color: #ddd;\tborder: 1px solid #cbcbcb;\tborder-top: 0 none;\tmax-width: 325px;\toverflow: hidden;\tmargin: 0;\tpadding: 4px;\tpadding-right: 6px;\tpadding-bottom: 0;\tposition: absolute;\ttop: 0px;\tz-index: 99;\twhite-space: normal;\t}\t.ace_search.left {\tborder-left: 0 none;\tborder-radius: 0px 0px 5px 0px;\tleft: 0;\t}\t.ace_search.right {\tborder-radius: 0px 0px 0px 5px;\tborder-right: 0 none;\tright: 0;\t}\t.ace_search_form, .ace_replace_form {\tborder-radius: 3px;\tborder: 1px solid #cbcbcb;\tfloat: left;\tmargin-bottom: 4px;\toverflow: hidden;\t}\t.ace_search_form.ace_nomatch {\toutline: 1px solid red;\t}\t.ace_search_field {\tbackground-color: white;\tborder-right: 1px solid #cbcbcb;\tborder: 0 none;\t-webkit-box-sizing: border-box;\t-moz-box-sizing: border-box;\tbox-sizing: border-box;\tfloat: left;\theight: 22px;\toutline: 0;\tpadding: 0 7px;\twidth: 214px;\tmargin: 0;\t}\t.ace_searchbtn,\t.ace_replacebtn {\tbackground: #fff;\tborder: 0 none;\tborder-left: 1px solid #dcdcdc;\tcursor: pointer;\tfloat: left;\theight: 22px;\tmargin: 0;\tposition: relative;\t}\t.ace_searchbtn:last-child,\t.ace_replacebtn:last-child {\tborder-top-right-radius: 3px;\tborder-bottom-right-radius: 3px;\t}\t.ace_searchbtn:disabled {\tbackground: none;\tcursor: default;\t}\t.ace_searchbtn {\tbackground-position: 50% 50%;\tbackground-repeat: no-repeat;\twidth: 27px;\t}\t.ace_searchbtn.prev {\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \t}\t.ace_searchbtn.next {\tbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \t}\t.ace_searchbtn_close {\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\tborder-radius: 50%;\tborder: 0 none;\tcolor: #656565;\tcursor: pointer;\tfloat: right;\tfont: 16px/16px Arial;\theight: 14px;\tmargin: 5px 1px 9px 5px;\tpadding: 0;\ttext-align: center;\twidth: 14px;\t}\t.ace_searchbtn_close:hover {\tbackground-color: #656565;\tbackground-position: 50% 100%;\tcolor: white;\t}\t.ace_replacebtn.prev {\twidth: 54px\t}\t.ace_replacebtn.next {\twidth: 27px\t}\t.ace_button {\tmargin-left: 2px;\tcursor: pointer;\t-webkit-user-select: none;\t-moz-user-select: none;\t-o-user-select: none;\t-ms-user-select: none;\tuser-select: none;\toverflow: hidden;\topacity: 0.7;\tborder: 1px solid rgba(100,100,100,0.23);\tpadding: 1px;\t-moz-box-sizing: border-box;\tbox-sizing: border-box;\tcolor: black;\t}\t.ace_button:hover {\tbackground-color: #eee;\topacity:1;\t}\t.ace_button:active {\tbackground-color: #ddd;\t}\t.ace_button.checked {\tborder-color: #3399ff;\topacity:1;\t}\t.ace_search_options{\tmargin-bottom: 3px;\ttext-align: right;\t-webkit-user-select: none;\t-moz-user-select: none;\t-o-user-select: none;\t-ms-user-select: none;\tuser-select: none;\t}","ace_searchbox");var l='<div class="ace_search right">\t <button type="button" action="hide" class="ace_searchbtn_close"></button>\t <div class="ace_search_form">\t <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\t <button type="button" action="findNext" class="ace_searchbtn next"></button>\t <button type="button" action="findPrev" class="ace_searchbtn prev"></button>\t <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\t </div>\t <div class="ace_replace_form">\t <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\t <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\t <button type="button" action="replaceAll" class="ace_replacebtn">All</button>\t </div>\t <div class="ace_search_options">\t <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\t <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\t <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\t </div>\t</div>'.replace(/>\s+/g,">"),c=function(e,t,i){var r=n.createElement("div");r.innerHTML=l,this.element=r.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;o.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),o.stopPropagation(e)}),o.addListener(e,"click",function(e){var i=(e.target||e.srcElement).getAttribute("action");i&&t[i]?t[i]():t.$searchBarKb.commands[i]&&t.$searchBarKb.commands[i].exec(t),o.stopPropagation(e)}),o.addCommandKeyListener(e,function(e,i,n){var r=a.keyCodeToString(n),s=t.$searchBarKb.findKeyCommand(i,r);s&&s.exec&&(s.exec(t),o.stopEvent(e))}),this.$onChange=r.delayedCall(function(){t.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),o.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new s,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceBox.style.display="",e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,i){var r=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:i})&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.find(!1,!1,!0),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){(e.searchBox||new c(e)).show(e.session.getTextRange(),t)}}),ace.acequire(["ace/ext/searchbox"],function(){})},function(e,t){ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(e,t,i){t.isDark=!1,t.cssClass="ace-jsoneditor",t.cssText='.ace-jsoneditor .ace_gutter {\tbackground: #ebebeb;\tcolor: #333\t}\t\t.ace-jsoneditor.ace_editor {\tfont-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;\tline-height: 1.3;\t}\t.ace-jsoneditor .ace_print-margin {\twidth: 1px;\tbackground: #e8e8e8\t}\t.ace-jsoneditor .ace_scroller {\tbackground-color: #FFFFFF\t}\t.ace-jsoneditor .ace_text-layer {\tcolor: gray\t}\t.ace-jsoneditor .ace_variable {\tcolor: #1a1a1a\t}\t.ace-jsoneditor .ace_cursor {\tborder-left: 2px solid #000000\t}\t.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\tborder-left: 0px;\tborder-bottom: 1px solid #000000\t}\t.ace-jsoneditor .ace_marker-layer .ace_selection {\tbackground: lightgray\t}\t.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\tbox-shadow: 0 0 3px 0px #FFFFFF;\tborder-radius: 2px\t}\t.ace-jsoneditor .ace_marker-layer .ace_step {\tbackground: rgb(255, 255, 0)\t}\t.ace-jsoneditor .ace_marker-layer .ace_bracket {\tmargin: -1px 0 0 -1px;\tborder: 1px solid #BFBFBF\t}\t.ace-jsoneditor .ace_marker-layer .ace_active-line {\tbackground: #FFFBD1\t}\t.ace-jsoneditor .ace_gutter-active-line {\tbackground-color : #dcdcdc\t}\t.ace-jsoneditor .ace_marker-layer .ace_selected-word {\tborder: 1px solid lightgray\t}\t.ace-jsoneditor .ace_invisible {\tcolor: #BFBFBF\t}\t.ace-jsoneditor .ace_keyword,\t.ace-jsoneditor .ace_meta,\t.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\tcolor: #AF956F\t}\t.ace-jsoneditor .ace_keyword.ace_operator {\tcolor: #484848\t}\t.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\tcolor: #96DC5F\t}\t.ace-jsoneditor .ace_constant.ace_language {\tcolor: darkorange\t}\t.ace-jsoneditor .ace_constant.ace_numeric {\tcolor: red\t}\t.ace-jsoneditor .ace_constant.ace_character.ace_entity {\tcolor: #BF78CC\t}\t.ace-jsoneditor .ace_invalid {\tcolor: #FFFFFF;\tbackground-color: #FF002A;\t}\t.ace-jsoneditor .ace_fold {\tbackground-color: #AF956F;\tborder-color: #000000\t}\t.ace-jsoneditor .ace_storage,\t.ace-jsoneditor .ace_support.ace_class,\t.ace-jsoneditor .ace_support.ace_function,\t.ace-jsoneditor .ace_support.ace_other,\t.ace-jsoneditor .ace_support.ace_type {\tcolor: #C52727\t}\t.ace-jsoneditor .ace_string {\tcolor: green\t}\t.ace-jsoneditor .ace_comment {\tcolor: #BCC8BA\t}\t.ace-jsoneditor .ace_entity.ace_name.ace_tag,\t.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\tcolor: #606060\t}\t.ace-jsoneditor .ace_markup.ace_underline {\ttext-decoration: underline\t}\t.ace-jsoneditor .ace_indent-guide {\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\t}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})}])})},"8sUK":function(e,t,i){},CWhn:function(e,t,i){},IP1Z:function(e,t,i){"use strict";var n=i("2faE"),r=i("rr1i");e.exports=function(e,t,i){t in e?n.f(e,t,r(0,i)):e[t]=i}},RaMD:function(e,t,i){"use strict";i("CWhn");var n=i("6B/5"),r=i.n(n),o={props:{value:[String,Number,Object,Array],showBtns:[Boolean],expandedOnStart:{type:Boolean,default:!1},mode:{type:String,default:"tree"},modes:{type:Array,default:function(){return["tree","code","form","text","view"]}},lang:{type:String,default:"en"}},watch:{value:{immediate:!0,async handler(e){this.internalChange||(await this.setEditor(e),this.error=!1,this.expandAll())},deep:!0}},data(){return{editor:null,error:!1,json:this.value,internalChange:!1,expandedModes:["tree","view","form"],locale:{it:{save:"SALVA"},en:{save:"SAVE"},zh:{save:"保存"}}}},mounted(){let e=this,t={mode:this.mode,modes:this.modes,onChange(){try{let t=e.editor.get();e.json=t,e.error=!1,e.$emit("json-change",t),e.internalChange=!0,e.$emit("input",t),e.$nextTick(function(){e.internalChange=!1})}catch(t){e.error=!0,e.$emit("has-error",t)}},onModeChange(){e.expandAll()}};this.editor=new r.a(this.$el.querySelector(".jsoneditor-vue"),t,this.json)},methods:{expandAll(){this.expandedOnStart&&this.expandedModes.includes(this.editor.getMode())&&this.editor.expandAll()},onSave(){this.$emit("json-save",this.json)},async setEditor(e){this.editor&&this.editor.set(e)}}},s=(i("u/oj"),i("KHd+")),a=Object(s.a)(o,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"jsoneditor-vue"}),e._v(" "),!1!==e.showBtns?i("div",{staticClass:"jsoneditor-btns"},[i("button",{staticClass:"json-save-btn",attrs:{type:"button",disabled:e.error},on:{click:function(t){return e.onSave()}}},[e._v(e._s(e.locale[e.lang].save))])]):e._e()])},[],!1,null,"723cff9b",null);a.options.__file="vue-json-editor.vue";t.a=a.exports},VJsP:function(e,t,i){"use strict";var n=i("2GTP"),r=i("Y7ZC"),o=i("JB68"),s=i("sNwI"),a=i("NwJ3"),l=i("tEej"),c=i("IP1Z"),h=i("fNZA");r(r.S+r.F*!i("TuGD")(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,r,u,d=o(e),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=h(d);if(g&&(m=n(m,p>2?arguments[2]:void 0,2)),void 0==y||f==Array&&a(y))for(i=new f(t=l(d.length));t>v;v++)c(i,v,g?m(d[v],v):d[v]);else for(u=y.call(d),i=new f;!(r=u.next()).done;v++)c(i,v,g?s(u,m,[r.value,v],!0):r.value);return i.length=v,i}})},"VrN/":function(e,t,i){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),s=n||r||o,a=s&&(n?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),h=!o&&/Chrome\/(\d+)/.exec(e),u=h&&+h[1],d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),C=/win/i.test(t),A=d&&e.match(/Version\/(\d*\.\d*)/);A&&(A=Number(A[1])),A&&A>=15&&(d=!1,l=!0);var x=w&&(c||d&&(null==A||A<12.11)),E=i||s&&a>=9;function F(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,S=function(e,t){var i=e.className,n=F(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function k(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return k(e).appendChild(t)}function $(e,t,i,n){var r=document.createElement(e);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)r.appendChild(t[o]);return r}function L(e,t,i,n){var r=$(e,t,i,n);return r.setAttribute("role","presentation"),r}function B(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function R(e){var t;try{t=e.activeElement}catch(i){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function T(e,t){var i=e.className;F(t).test(i)||(e.className+=(i?" ":"")+t)}function M(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!F(i[n]).test(t)&&(t+=" "+i[n]);return t}_=document.createRange?function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};var P=function(e){e.select()};function O(e){return e.display.wrapper.ownerDocument}function N(e){return O(e).defaultView}function I(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,i){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===i&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function W(e,t,i,n,r){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,s=r||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=i-s%i,o=a+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(P=function(e){try{e.select()}catch(e){}});var H=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}H.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},H.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};var V=50,U={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},K={origin:"*mouse"},G={origin:"+move"};function Y(e,t,i){for(var n=0,r=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var s=o-n;if(o==e.length||r+s>=t)return n+Math.min(s,t-r);if(r+=o-n,n=o+1,(r+=i-r%i)>=t)return n}}var Q=[""];function X(e){for(;Q.length<=e;)Q.push(J(Q)+" ");return Q[e]}function J(e){return e[e.length-1]}function Z(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function ee(){}function te(e,t){var i;return Object.create?i=Object.create(e):(ee.prototype=e,i=new ee),t&&j(t,i),i}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ne(e))||t.test(e):ne(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\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 ae(e){return e.charCodeAt(0)>=768&&se.test(e)}function le(e,t,i){for(;(i<0?t>0:t<e.length)&&ae(e.charAt(t));)t+=i;return t}function ce(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var r=(t+i)/2,o=n<0?Math.ceil(r):Math.floor(r);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+n}}var he=null;function ue(e,t,i){var n;he=null;for(var r=0;r<e.length;++r){var o=e[r];if(o.from<t&&o.to>t)return r;o.to==t&&(o.from!=o.to&&"before"==i?n=r:he=r),o.from==t&&(o.from!=o.to&&"before"!=i?n=r:he=r)}return null!=n?n:he}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){return i<=247?e.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?t.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(e,t,i){this.level=e,this.from=t,this.to=i}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var h=e.length,u=[],d=0;d<h;++d)u.push(i(e.charCodeAt(d)));for(var f=0,p=c;f<h;++f){var m=u[f];"m"==m?u[f]=p:p=m}for(var g=0,v=c;g<h;++g){var y=u[g];"1"==y&&"r"==v?u[g]="n":o.test(y)&&(v=y,"r"==y&&(u[g]="R"))}for(var w=1,b=u[0];w<h-1;++w){var C=u[w];"+"==C&&"1"==b&&"1"==u[w+1]?u[w]="1":","!=C||b!=u[w+1]||"1"!=b&&"n"!=b||(u[w]=b),b=C}for(var A=0;A<h;++A){var x=u[A];if(","==x)u[A]="N";else if("%"==x){var E=void 0;for(E=A+1;E<h&&"%"==u[E];++E);for(var F=A&&"!"==u[A-1]||E<h&&"1"==u[E]?"1":"N",_=A;_<E;++_)u[_]=F;A=E-1}}for(var S=0,k=c;S<h;++S){var D=u[S];"L"==k&&"1"==D?u[S]="L":o.test(D)&&(k=D)}for(var $=0;$<h;++$)if(r.test(u[$])){var L=void 0;for(L=$+1;L<h&&r.test(u[L]);++L);for(var B="L"==($?u[$-1]:c),R="L"==(L<h?u[L]:c),T=B==R?B?"L":"R":c,M=$;M<L;++M)u[M]=T;$=L-1}for(var P,O=[],N=0;N<h;)if(s.test(u[N])){var I=N;for(++N;N<h&&s.test(u[N]);++N);O.push(new l(0,I,N))}else{var j=N,W=O.length,H="rtl"==t?1:0;for(++N;N<h&&"L"!=u[N];++N);for(var z=j;z<N;)if(a.test(u[z])){j<z&&(O.splice(W,0,new l(1,j,z)),W+=H);var V=z;for(++z;z<N&&a.test(u[z]);++z);O.splice(W,0,new l(2,V,z)),W+=H,j=z}else++z;j<N&&O.splice(W,0,new l(1,j,N))}return"ltr"==t&&(1==O[0].level&&(P=e.match(/^\s+/))&&(O[0].from=P[0].length,O.unshift(new l(0,0,P[0].length))),1==J(O).level&&(P=e.match(/\s+$/))&&(J(O).to-=P[0].length,O.push(new l(0,h-P[0].length,h)))),"rtl"==t?O.reverse():O}}();function fe(e,t){var i=e.order;return null==i&&(i=e.order=de(e.text,t)),i}var pe=[],me=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||pe).concat(i)}};function ge(e,t){return e._handlers&&e._handlers[t]||pe}function ve(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,r=n&&n[t];if(r){var o=z(r,i);o>-1&&(n[t]=r.slice(0,o).concat(r.slice(o+1)))}}}function ye(e,t){var i=ge(e,t);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function we(e,t,i){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,i||t.type,e,t),Fe(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==z(i,t[n])&&i.push(t[n])}function Ce(e,t){return ge(e,t).length>0}function Ae(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Fe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){xe(e),Ee(e)}function Se(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var De,$e,Le=function(){if(s&&a<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}();function Be(e){if(null==De){var t=$("span","");D(e,$("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(De=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var i=De?$("span",""):$("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Re(e){if(null!=$e)return $e;var t=D(e,document.createTextNode("AخA")),i=_(t,0,1).getBoundingClientRect(),n=_(t,1,2).getBoundingClientRect();return k(e),!(!i||i.left==i.right)&&($e=n.right-i.right<3)}var Te=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,i=[],n=e.length;t<=n;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(i.push(o.slice(0,s)),t+=s+1):(i.push(o),t=r+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe=function(){var e=$("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Oe=null,Ne={},Ie={};function je(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=te(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function We(e,t){t=je(t);var i=Ne[t.name];if(!i)return We(e,"text/plain");var n=i(e,t);if(He.hasOwnProperty(t.name)){var r=He[t.name];for(var o in r)r.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=r[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)n[s]=t.modeProps[s];return n}var He={};function ze(e,t){var i=He.hasOwnProperty(e)?He[e]:He[e]={};j(t,i)}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Ue(e,t){for(var i;e.innerMode&&(i=e.innerMode(t))&&i.mode!=e;)t=i.state,e=i.mode;return i||{mode:e,state:t}}function qe(e,t,i){return!e.startState||e.startState(t,i)}var Ke=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function Ge(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var r=i.children[n],o=r.chunkSize();if(t<o){i=r;break}t-=o}return i.lines[t]}function Ye(e,t,i){var n=[],r=t.line;return e.iter(t.line,i.line+1,function(e){var o=e.text;r==i.line&&(o=o.slice(0,i.ch)),r==t.line&&(o=o.slice(t.ch)),n.push(o),++r}),n}function Qe(e,t,i){var n=[];return e.iter(t,i,function(e){n.push(e.text)}),n}function Xe(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Je(e){if(null==e.parent)return null;for(var t=e.parent,i=z(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;n.children[r]!=t;++r)i+=n.children[r].chunkSize();return i+t.first}function Ze(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],o=r.height;if(t<o){e=r;continue e}t-=o,i+=r.chunkSize()}return i}while(!e.lines);for(var s=0;s<e.lines.length;++s){var a=e.lines[s],l=a.height;if(t<l)break;t-=l}return i+s}function et(e,t){return t>=e.first&&t<e.first+e.size}function tt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,i){if(void 0===i&&(i=null),!(this instanceof it))return new it(e,t,i);this.line=e,this.ch=t,this.sticky=i}function nt(e,t){return e.line-t.line||e.ch-t.ch}function rt(e,t){return e.sticky==t.sticky&&0==nt(e,t)}function ot(e){return it(e.line,e.ch)}function st(e,t){return nt(e,t)<0?t:e}function at(e,t){return nt(e,t)<0?e:t}function lt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ct(e,t){if(t.line<e.first)return it(e.first,0);var i=e.first+e.size-1;return t.line>i?it(i,Ge(e,i).text.length):function(e,t){var i=e.ch;return null==i||i>t?it(e.line,t):i<0?it(e.line,0):e}(t,Ge(e,t.line).text.length)}function ht(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=ct(e,t[n]);return i}Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ke.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,i){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var r=function(e){return i?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},dt=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,i,n){var r=[e.state.modeGen],o={};At(e,t.text,e.doc.mode,i,function(e,t){return r.push(e,t)},o,n);for(var s=i.state,a=function(n){i.baseTokens=r;var a=e.state.overlays[n],l=1,c=0;i.state=!0,At(e,t.text,a.mode,i,function(e,t){for(var i=l;c<e;){var n=r[l];n>e&&r.splice(l,1,e,r[l+1],n),l+=2,c=Math.min(e,n)}if(t)if(a.opaque)r.splice(i,l-i,e,"overlay "+t),l=i+2;else for(;i<l;i+=2){var o=r[i+1];r[i+1]=(o?o+" ":"")+"overlay "+t}},o),i.state=s,i.baseTokens=null,i.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)a(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function pt(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=mt(e,Je(t)),r=t.text.length>e.options.maxHighlightLength&&Ve(e.doc.mode,n.state),o=ft(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function mt(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new dt(n,!0,t);var o=function(e,t,i){for(var n,r,o=e.doc,s=i?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=Ge(o,a-1),c=l.stateAfter;if(c&&(!i||a+(c instanceof ut?c.lookAhead:0)<=o.modeFrontier))return a;var h=W(l.text,null,e.options.tabSize);(null==r||n>h)&&(r=a-1,n=h)}return r}(e,t,i),s=o>n.first&&Ge(n,o-1).stateAfter,a=s?dt.fromSaved(n,s,o):new dt(n,qe(n.mode),o);return n.iter(o,t,function(i){gt(e,i.text,a);var n=a.line;i.stateAfter=n==t-1||n%5==0||n>=r.viewFrom&&n<r.viewTo?a.save():null,a.nextLine()}),i&&(n.modeFrontier=a.line),a}function gt(e,t,i,n){var r=e.doc.mode,o=new Ke(t,e.options.tabSize,i);for(o.start=o.pos=n||0,""==t&&vt(r,i.state);!o.eol();)yt(r,o,i.state),o.start=o.pos}function vt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=Ue(e,t);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function yt(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=Ue(e,i).mode);var o=e.token(t,i);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}dt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},dt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},dt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dt.fromSaved=function(e,t,i){return t instanceof ut?new dt(e,Ve(e.mode,t.state),i,t.lookAhead):new dt(e,Ve(e.mode,t),i)},dt.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var wt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function bt(e,t,i,n){var r,o=e.doc,s=o.mode;t=ct(o,t);var a,l=Ge(o,t.line),c=mt(e,t.line,i),h=new Ke(l.text,e.options.tabSize,c);for(n&&(a=[]);(n||h.pos<t.ch)&&!h.eol();)h.start=h.pos,r=yt(s,h,c.state),n&&a.push(new wt(h,r,Ve(o.mode,c.state)));return n?a:new wt(h,r,c.state)}function Ct(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";null==t[n]?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function At(e,t,i,n,r,o,s){var a=i.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,c=0,h=null,u=new Ke(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&Ct(vt(i,n.state),o);!u.eol();){if(u.pos>e.options.maxHighlightLength?(a=!1,s&&gt(e,t,n,u.pos),u.pos=t.length,l=null):l=Ct(yt(i,u,n.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||h!=l){for(;c<u.start;)c=Math.min(u.start,c+5e3),r(c,h);h=l}u.start=u.pos}for(;c<u.pos;){var p=Math.min(u.pos,c+5e3);r(p,h),c=p}}var xt=!1,Et=!1;function Ft(e,t,i){this.marker=e,this.from=t,this.to=i}function _t(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function St(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function kt(e,t){if(t.full)return null;var i=et(e,t.from.line)&&Ge(e,t.from.line).markedSpans,n=et(e,t.to.line)&&Ge(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,o=t.to.ch,s=0==nt(t.from,t.to),a=function(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var o=e[r],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&"bookmark"==s.type&&(!i||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Ft(s,o.from,l?null:o.to))}}return n}(i,r,s),l=function(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var o=e[r],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!i||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Ft(s,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,s),c=1==t.text.length,h=J(t.text).length+(c?r:0);if(a)for(var u=0;u<a.length;++u){var d=a[u];if(null==d.to){var f=_t(l,d.marker);f?c&&(d.to=null==f.to?null:f.to+h):d.to=r}}if(l)for(var p=0;p<l.length;++p){var m=l[p];if(null!=m.to&&(m.to+=h),null==m.from){var g=_t(a,m.marker);g||(m.from=h,c&&(a||(a=[])).push(m))}else m.from+=h,c&&(a||(a=[])).push(m)}a&&(a=Dt(a)),l&&l!=a&&(l=Dt(l));var v=[a];if(!c){var y,w=t.text.length-2;if(w>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(y||(y=[])).push(new Ft(a[b].marker,null,null));for(var C=0;C<w;++C)v.push(y);v.push(l)}return v}function Dt(e){for(var t=0;t<e.length;++t){var i=e[t];null!=i.from&&i.from==i.to&&!1!==i.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function $t(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Lt(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function Bt(e){return e.inclusiveLeft?-1:0}function Rt(e){return e.inclusiveRight?1:0}function Tt(e,t){var i=e.lines.length-t.lines.length;if(0!=i)return i;var n=e.find(),r=t.find(),o=nt(n.from,r.from)||Bt(e)-Bt(t);if(o)return-o;var s=nt(n.to,r.to)||Rt(e)-Rt(t);return s||t.id-e.id}function Mt(e,t){var i,n=Et&&e.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)(r=n[o]).marker.collapsed&&null==(t?r.from:r.to)&&(!i||Tt(i,r.marker)<0)&&(i=r.marker);return i}function Pt(e){return Mt(e,!0)}function Ot(e){return Mt(e,!1)}function Nt(e,t){var i,n=Et&&e.markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!i||Tt(i,o.marker)<0)&&(i=o.marker)}return i}function It(e,t,i,n,r){var o=Ge(e,t),s=Et&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),h=nt(c.from,i)||Bt(l.marker)-Bt(r),u=nt(c.to,n)||Rt(l.marker)-Rt(r);if(!(h>=0&&u<=0||h<=0&&u>=0)&&(h<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?nt(c.to,i)>=0:nt(c.to,i)>0)||h>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?nt(c.from,n)<=0:nt(c.from,n)<0)))return!0}}}function jt(e){for(var t;t=Pt(e);)e=t.find(-1,!0).line;return e}function Wt(e,t){var i=Ge(e,t),n=jt(i);return i==n?t:Je(n)}function Ht(e,t){if(t>e.lastLine())return t;var i,n=Ge(e,t);if(!zt(e,n))return t;for(;i=Ot(n);)n=i.find(1,!0).line;return Je(n)+1}function zt(e,t){var i=Et&&t.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r)if((n=i[r]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Vt(e,t,n))return!0}}function Vt(e,t,i){if(null==i.to){var n=i.marker.find(1,!0);return Vt(e,n.line,_t(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var r=void 0,o=0;o<t.markedSpans.length;++o)if((r=t.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(null==r.to||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&Vt(e,t,r))return!0}function Ut(e){for(var t=0,i=(e=jt(e)).parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e)break;t+=r.height}for(var o=i.parent;o;o=(i=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==i)break;t+=a.height}return t}function qt(e){if(0==e.height)return 0;for(var t,i=e.text.length,n=e;t=Pt(n);){var r=t.find(0,!0);n=r.from.line,i+=r.from.ch-r.to.ch}for(n=e;t=Ot(n);){var o=t.find(0,!0);i-=n.text.length-o.from.ch,n=o.to.line,i+=n.text.length-o.to.ch}return i}function Kt(e){var t=e.display,i=e.doc;t.maxLine=Ge(i,i.first),t.maxLineLength=qt(t.maxLine),t.maxLineChanged=!0,i.iter(function(e){var i=qt(e);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=e)})}var Gt=function(e,t,i){this.text=e,Lt(this,t),this.height=i?i(this):1};function Yt(e){e.parent=null,$t(e)}Gt.prototype.lineNo=function(){return Je(this)},Ae(Gt);var Qt={},Xt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Xt:Qt;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var i=L("span",null,null,l?"padding-right: .1px":null),n={pre:L("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o=r?t.rest[r-1]:t.line,s=void 0;n.pos=0,n.addToken=ti,Re(e.display.measure)&&(s=fe(o,e.doc.direction))&&(n.addToken=ii(n.addToken,s)),n.map=[];var a=t!=e.display.externalMeasured&&Je(o);ri(o,n,pt(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=M(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=M(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Be(e.display.measure))),0==r?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=M(n.pre.className,n.textClass||"")),n}function ei(e){var t=$("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ti(e,t,i,n,r,o,l){if(t){var c,h=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",r=0;r<e.length;r++){var o=e.charAt(r);" "!=o||!i||r!=e.length-1&&32!=e.charCodeAt(r+1)||(o=" "),n+=o,i=" "==o}return n}(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){c=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var p=u.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(h.slice(f,f+m));s&&a<9?c.appendChild($("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,w=y-e.col%y;(v=c.appendChild($("span",X(w),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=w}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild($("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),s&&a<9?c.appendChild($("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,c),s&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==h.charCodeAt(t.length-1),i||n||r||d||o||l){var b=i||"";n&&(b+=n),r&&(b+=r);var C=$("span",[c],b,o);if(l)for(var A in l)l.hasOwnProperty(A)&&"style"!=A&&"class"!=A&&C.setAttribute(A,l[A]);return e.content.appendChild(C)}e.content.appendChild(c)}}function ii(e,t){return function(i,n,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=i.pos,h=c+n.length;;){for(var u=void 0,d=0;d<t.length&&!((u=t[d]).to>c&&u.from<=c);d++);if(u.to>=h)return e(i,n,r,o,s,a,l);e(i,n.slice(0,u.to-c),r,o,null,a,l),o=null,n=n.slice(u.to-c),c=u.to}}}function ni(e,t,i,n){var r=!n&&i.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function ri(e,t,i){var n=e.markedSpans,r=e.text,o=0;if(n)for(var s,a,l,c,h,u,d,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=h=a="",d=null,u=null,v=1/0;for(var y=[],w=void 0,b=0;b<n.length;++b){var C=n[b],A=C.marker;if("bookmark"==A.type&&C.from==p&&A.widgetNode)y.push(A);else if(C.from<=p&&(null==C.to||C.to>p||A.collapsed&&C.to==p&&C.from==p)){if(null!=C.to&&C.to!=p&&v>C.to&&(v=C.to,c=""),A.className&&(l+=" "+A.className),A.css&&(a=(a?a+";":"")+A.css),A.startStyle&&C.from==p&&(h+=" "+A.startStyle),A.endStyle&&C.to==v&&(w||(w=[])).push(A.endStyle,C.to),A.title&&((d||(d={})).title=A.title),A.attributes)for(var x in A.attributes)(d||(d={}))[x]=A.attributes[x];A.collapsed&&(!u||Tt(u.marker,A)<0)&&(u=C)}else C.from>p&&v>C.from&&(v=C.from)}if(w)for(var E=0;E<w.length;E+=2)w[E+1]==v&&(c+=" "+w[E]);if(!u||u.from==p)for(var F=0;F<y.length;++F)ni(t,0,y[F]);if(u&&(u.from||0)==p){if(ni(t,(null==u.to?f+1:u.to)-p,u.marker,null==u.from),null==u.to)return;u.to==p&&(u=!1)}}if(p>=f)break;for(var _=Math.min(f,v);;){if(g){var S=p+g.length;if(!u){var k=S>_?g.slice(0,_-p):g;t.addToken(t,k,s?s+l:l,h,p+k.length==v?c:"",a,d)}if(S>=_){g=g.slice(_-p),p=_;break}p=S,h=""}g=r.slice(o,o=i[m++]),s=Jt(i[m++],t.cm.options)}}else for(var D=1;D<i.length;D+=2)t.addToken(t,r.slice(o,o=i[D]),Jt(i[D+1],t.cm.options))}function oi(e,t,i){this.line=t,this.rest=function(e){for(var t,i;t=Ot(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}(t),this.size=this.rest?Je(J(this.rest))-i+1:1,this.node=this.text=null,this.hidden=zt(e,t)}function si(e,t,i){for(var n,r=[],o=t;o<i;o=n){var s=new oi(e.doc,Ge(e.doc,o),o);n=o+s.size,r.push(s)}return r}var ai=null,li=null;function ci(e,t){var i=ge(e,t);if(i.length){var n,r=Array.prototype.slice.call(arguments,2);ai?n=ai.delayedCallbacks:li?n=li:(n=li=[],setTimeout(hi,0));for(var o=function(e){n.push(function(){return i[e].apply(null,r)})},s=0;s<i.length;++s)o(s)}}function hi(){var e=li;li=null;for(var t=0;t<e.length;++t)e[t]()}function ui(e,t,i,n){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];"text"==o?pi(e,t):"gutter"==o?gi(e,t,i,n):"class"==o?mi(e,t):"widget"==o&&vi(e,t,n)}t.changes=null}function di(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&a<8&&(e.node.style.zIndex=2)),e.node}function fi(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Zt(e,t)}function pi(e,t){var i=t.text.className,n=fi(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,mi(e,t)):i&&(t.text.className=i)}function mi(e,t){!function(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=di(t);t.background=n.insertBefore($("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?di(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function gi(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=di(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var s=di(t),a=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild($("div",tt(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,h=o.hasOwnProperty(c)&&o[c];h&&a.appendChild($("div",[h],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function vi(e,t,i){t.alignable&&(t.alignable=null);for(var n=F("CodeMirror-linewidget"),r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);wi(e,t,i)}function yi(e,t,i,n){var r=fi(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),mi(e,t),gi(e,t,i,n),wi(e,t,n),t.node}function wi(e,t,i){if(bi(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)bi(e,t.rest[n],t,i,!1)}function bi(e,t,i,n,r){if(t.widgets)for(var o=di(i),s=0,a=t.widgets;s<a.length;++s){var l=a[s],c=$("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ci(l,c,i,n),e.display.input.setUneditable(c),r&&l.above?o.insertBefore(c,i.gutter||i.text):o.appendChild(c),ci(l,"redraw")}}function Ci(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ai(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!B(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),D(t.display.measure,$("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function xi(e,t){for(var i=Se(t);i!=e.wrapper;i=i.parentNode)if(!i||1==i.nodeType&&"true"==i.getAttribute("cm-ignore-events")||i.parentNode==e.sizer&&i!=e.mover)return!0}function Ei(e){return e.lineSpace.offsetTop}function Fi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _i(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=D(e.measure,$("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Si(e){return V-e.display.nativeBarWidth}function ki(e){return e.display.scroller.clientWidth-Si(e)-e.display.barWidth}function Di(e){return e.display.scroller.clientHeight-Si(e)-e.display.barHeight}function $i(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var r=0;r<e.rest.length;r++)if(Je(e.rest[r])>i)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}}function Li(e,t,i,n){return Ti(e,Ri(e,t),i,n)}function Bi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hn(e,t)];var i=e.display.externalMeasured;return i&&t>=i.lineN&&t<i.lineN+i.size?i:void 0}function Ri(e,t){var i=Je(t),n=Bi(e,i);n&&!n.text?n=null:n&&n.changes&&(ui(e,n,i,on(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var i=Je(t=jt(t)),n=e.display.externalMeasured=new oi(e.doc,t,i);n.lineN=i;var r=n.built=Zt(e,n);return n.text=r.pre,D(e.display.lineMeasure,r.pre),n}(e,t));var r=$i(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ti(e,t,i,n,r){t.before&&(i=-1);var o,l=i+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,i){var n=e.options.lineWrapping,r=n&&ki(e);if(!t.measure.heights||n&&t.measure.width!=r){var o=t.measure.heights=[];if(n){t.measure.width=r;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-i.top)}}o.push(i.bottom-i.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,i,n){var r,o=Oi(t.map,i,n),l=o.node,c=o.start,h=o.end,u=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&ae(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&ae(t.line.text.charAt(o.coverStart+h));)++h;if((r=s&&a<9&&0==c&&h==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Ni(_(l,c,h).getClientRects(),n)).left||r.right||0==c)break;h=c,c-=1,u="right"}s&&a<11&&(r=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Oe)return Oe;var t=D(e,$("span","x")),i=t.getBoundingClientRect(),n=_(t,0,1).getBoundingClientRect();return Oe=Math.abs(i.left-n.left)>1}(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,r))}else{var f;c>0&&(u=n="right"),r=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var p=l.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+rn(e.display),top:p.top,bottom:p.bottom}:Pi}for(var m=r.top-t.rect.top,g=r.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,w=0;w<y.length-1&&!(v<y[w]);w++);var b=w?y[w-1]:0,C=y[w],A={left:("right"==u?r.right:r.left)-t.rect.left,right:("left"==u?r.left:r.right)-t.rect.left,top:b,bottom:C};return r.left||r.right||(A.bogus=!0),e.options.singleCursorHeightPerLine||(A.rtop=m,A.rbottom=g),A}(e,t,i,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var Mi,Pi={left:0,right:0,top:0,bottom:0};function Oi(e,t,i){for(var n,r,o,s,a,l,c=0;c<e.length;c+=3)if(a=e[c],l=e[c+1],t<a?(r=0,o=1,s="left"):t<l?o=1+(r=t-a):(c==e.length-3||t==l&&e[c+3]>t)&&(r=(o=l-a)-1,t>=l&&(s="right")),null!=r){if(n=e[c+2],a==l&&i==(n.insertLeft?"left":"right")&&(s=i),"left"==i&&0==r)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],s="left";if("right"==i&&r==l-a)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],s="right";break}return{node:n,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function Ni(e,t){var i=Pi;if("left"==t)for(var n=0;n<e.length&&(i=e[n]).left==i.right;n++);else for(var r=e.length-1;r>=0&&(i=e[r]).left==i.right;r--);return i}function Ii(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ji(e){e.display.externalMeasure=null,k(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Ii(e.display.view[t])}function Wi(e){ji(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hi(e){return h&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function zi(e){return h&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Vi(e){var t=jt(e),i=t.widgets,n=0;if(i)for(var r=0;r<i.length;++r)i[r].above&&(n+=Ai(i[r]));return n}function Ui(e,t,i,n,r){if(!r){var o=Vi(t);i.top+=o,i.bottom+=o}if("line"==n)return i;n||(n="local");var s=Ut(t);if("local"==n?s+=Ei(e.display):s-=e.display.viewOffset,"page"==n||"window"==n){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==n?0:zi(O(e)));var l=a.left+("window"==n?0:Hi(O(e)));i.left+=l,i.right+=l}return i.top+=s,i.bottom+=s,i}function qi(e,t,i){if("div"==i)return t;var n=t.left,r=t.top;if("page"==i)n-=Hi(O(e)),r-=zi(O(e));else if("local"==i||!i){var o=e.display.sizer.getBoundingClientRect();n+=o.left,r+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:n-s.left,top:r-s.top}}function Ki(e,t,i,n,r){return n||(n=Ge(e.doc,t.line)),Ui(e,n,Li(e,n,t.ch,r),i)}function Gi(e,t,i,n,r,o){function s(t,s){var a=Ti(e,r,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,Ui(e,n,a,i)}n=n||Ge(e.doc,t.line),r||(r=Ri(e,n));var a=fe(n,e.doc.direction),l=t.ch,c=t.sticky;if(l>=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function h(e,t,i){var n=a[t],r=1==n.level;return s(i?e-1:e,r!=i)}var u=ue(a,l,c),d=he,f=h(l,u,"before"==c);return null!=d&&(f.other=h(l,d,"before"!=c)),f}function Yi(e,t){var i=0;t=ct(e.doc,t),e.options.lineWrapping||(i=rn(e.display)*t.ch);var n=Ge(e.doc,t.line),r=Ut(n)+Ei(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function Qi(e,t,i,n,r){var o=it(e,t,i);return o.xRel=r,n&&(o.outside=n),o}function Xi(e,t,i){var n=e.doc;if((i+=e.display.viewOffset)<0)return Qi(n.first,0,null,-1,-1);var r=Ze(n,i),o=n.first+n.size-1;if(r>o)return Qi(n.first+n.size-1,Ge(n,o).text.length,null,1,1);t<0&&(t=0);for(var s=Ge(n,r);;){var a=tn(e,s,r,t,i),l=Nt(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=Ge(n,r=c.line)}}function Ji(e,t,i,n){n-=Vi(t);var r=t.text.length,o=ce(function(t){return Ti(e,i,t-1).bottom<=n},r,0);return r=ce(function(t){return Ti(e,i,t).top>n},o,r),{begin:o,end:r}}function Zi(e,t,i,n){i||(i=Ri(e,t));var r=Ui(e,t,Ti(e,i,n),"line").top;return Ji(e,t,i,r)}function en(e,t,i,n){return!(e.bottom<=i)&&(e.top>i||(n?e.left:e.right)>t)}function tn(e,t,i,n,r){r-=Ut(t);var o=Ri(e,t),s=Vi(t),a=0,l=t.text.length,c=!0,h=fe(t,e.doc.direction);if(h){var u=(e.options.lineWrapping?function(e,t,i,n,r,o,s){var a=Ji(e,t,n,s),l=a.begin,c=a.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var h=null,u=null,d=0;d<r.length;d++){var f=r[d];if(!(f.from>=c||f.to<=l)){var p=1!=f.level,m=Ti(e,n,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=m<o?o-m+1e9:m-o;(!h||u>g)&&(h=f,u=g)}}return h||(h=r[r.length-1]),h.from<l&&(h={from:l,to:h.to,level:h.level}),h.to>c&&(h={from:h.from,to:c,level:h.level}),h}:function(e,t,i,n,r,o,s){var a=ce(function(a){var l=r[a],c=1!=l.level;return en(Gi(e,it(i,c?l.to:l.from,c?"before":"after"),"line",t,n),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,h=Gi(e,it(i,c?l.from:l.to,c?"after":"before"),"line",t,n);en(h,o,s,!0)&&h.top>s&&(l=r[a-1])}return l})(e,t,i,o,h,n,r);c=1!=u.level,a=c?u.from:u.to-1,l=c?u.to:u.from-1}var d,f,p=null,m=null,g=ce(function(t){var i=Ti(e,o,t);return i.top+=s,i.bottom+=s,!!en(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(p=t,m=i),!0)},a,l),v=!1;if(m){var y=n-m.left<m.right-n,w=y==c;g=p+(w?0:1),f=w?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=a||g++,f=0==g?"after":g==t.text.length?"before":Ti(e,o,g-(c?1:0)).bottom+s<=r==c?"after":"before";var b=Gi(e,it(i,g,f),"line",t,o);d=b.left,v=r<b.top?-1:r>=b.bottom?1:0}return g=le(t.text,g,1),Qi(i,g,f,v,n-d)}function nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mi){Mi=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mi.appendChild(document.createTextNode("x")),Mi.appendChild($("br"));Mi.appendChild(document.createTextNode("x"))}D(e.measure,Mi);var i=Mi.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),k(e.measure),i||1}function rn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),i=$("pre",[t],"CodeMirror-line-like");D(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function on(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=e.display.gutterSpecs[s].className;i[a]=o.offsetLeft+o.clientLeft+r,n[a]=o.clientWidth}return{fixedPos:sn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function sn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function an(e){var t=nn(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/rn(e.display)-3);return function(r){if(zt(e.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s<r.widgets.length;s++)r.widgets[s].height&&(o+=r.widgets[s].height);return i?o+(Math.ceil(r.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,i=an(e);t.iter(function(e){var t=i(e);t!=e.height&&Xe(e,t)})}function cn(e,t,i,n){var r=e.display;if(!i&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}var l,c=Xi(e,o,s);if(n&&c.xRel>0&&(l=Ge(e.doc,c.line).text).length==c.ch){var h=W(l,l.length,e.options.tabSize)-l.length;c=it(c.line,Math.max(0,Math.round((o-_i(e.display).left)/rn(e.display))-h))}return c}function hn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if((t-=i[n].size)<0)return n}function un(e,t,i,n){null==t&&(t=e.doc.first),null==i&&(i=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&i<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Et&&Wt(e.doc,t)<r.viewTo&&fn(e);else if(i<=r.viewFrom)Et&&Ht(e.doc,i+n)>r.viewFrom?fn(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)fn(e);else if(t<=r.viewFrom){var o=pn(e,i,i+n,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=n):fn(e)}else if(i>=r.viewTo){var s=pn(e,t,t,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):fn(e)}else{var a=pn(e,t,t,-1),l=pn(e,i,i+n,1);a&&l?(r.view=r.view.slice(0,a.index).concat(si(e,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):fn(e)}var c=r.externalMeasured;c&&(i<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(r.externalMeasured=null))}function dn(e,t,i){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hn(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==z(s,i)&&s.push(i)}}}function fn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pn(e,t,i,n){var r,o=hn(e,t),s=e.display.view;if(!Et||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var a=e.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=t){if(n>0){if(o==s.length-1)return null;r=a+s[o].size-t,o++}else r=a-t;t+=r,i+=r}for(;Wt(e.doc,i)!=i;){if(o==(n<0?0:s.length-1))return null;i+=n*s[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function mn(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var r=t[n];r.hidden||r.node&&!r.changes||++i}return i}function gn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vn(e,t){void 0===t&&(t=!0);var i=e.doc,n={},r=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),s=e.options.$customCursor;s&&(t=!0);for(var a=0;a<i.sel.ranges.length;a++)if(t||a!=i.sel.primIndex){var l=i.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(s){var h=s(e,l);h&&yn(e,h,r)}else(c||e.options.showCursorWhenSelecting)&&yn(e,l.head,r);c||bn(e,l,o)}}return n}function yn(e,t,i){var n=Gi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild($("div"," ","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Ki(e,t,"div",null,null),s=o.right-o.left;r.style.width=(s>0?s:e.defaultCharWidth())+"px"}if(n.other){var a=i.appendChild($("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function wn(e,t){return e.top-t.top||e.left-t.left}function bn(e,t,i){var n=e.display,r=e.doc,o=document.createDocumentFragment(),s=_i(e.display),a=s.left,l=Math.max(n.sizerWidth,ki(e)-n.sizer.offsetLeft)-s.right,c="ltr"==r.direction;function h(e,t,i,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==i?l-e:i)+"px;\n height: "+(n-t)+"px"))}function u(t,i,n){var o,s,u=Ge(r,t),d=u.text.length;function f(i,n){return Ki(e,it(t,i),"div",u,n)}function p(t,i,n){var r=Zi(e,u,null,t),o="ltr"==i==("after"==n)?"left":"right",s="after"==n?r.begin:r.end-(/\s/.test(u.text.charAt(r.end-1))?2:1);return f(s,o)[o]}var m=fe(u,r.direction);return function(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var r=!1,o=0;o<e.length;++o){var s=e[o];(s.from<i&&s.to>t||t==i&&s.to==t)&&(n(Math.max(s.from,t),Math.min(s.to,i),1==s.level?"rtl":"ltr",o),r=!0)}r||n(t,i,"ltr")}(m,i||0,null==n?d:n,function(e,t,r,u){var g="ltr"==r,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),w=null==i&&0==e,b=null==n&&t==d,C=0==u,A=!m||u==m.length-1;if(y.top-v.top<=3){var x=(c?w:b)&&C,E=(c?b:w)&&A,F=x?a:(g?v:y).left,_=E?l:(g?y:v).right;h(F,v.top,_-F,v.bottom)}else{var S,k,D,$;g?(S=c&&w&&C?a:v.left,k=c?l:p(e,r,"before"),D=c?a:p(t,r,"after"),$=c&&b&&A?l:y.right):(S=c?p(e,r,"before"):a,k=!c&&w&&C?l:v.right,D=!c&&b&&A?a:y.left,$=c?p(t,r,"after"):l),h(S,v.top,k-S,v.bottom),v.bottom<y.top&&h(a,v.bottom,null,y.top),h(D,y.top,$-D,y.bottom)}(!o||wn(v,o)<0)&&(o=v),wn(y,o)<0&&(o=y),(!s||wn(v,s)<0)&&(s=v),wn(y,s)<0&&(s=y)}),{start:o,end:s}}var d=t.from(),f=t.to();if(d.line==f.line)u(d.line,d.ch,f.ch);else{var p=Ge(r,d.line),m=Ge(r,f.line),g=jt(p)==jt(m),v=u(d.line,d.ch,g?p.text.length+1:null).end,y=u(f.line,g?0:null,f.ch).start;g&&(v.top<y.top-2?(h(v.right,v.top,null,v.bottom),h(a,y.top,y.left,y.bottom)):h(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&h(a,v.bottom,null,y.top)}i.appendChild(o)}function Cn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Fn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function An(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||En(e))}function xn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Fn(e))},100)}function En(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,T(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Cn(e))}function Fn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function _n(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),r=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],h=e.options.lineWrapping,u=void 0,d=0;if(!c.hidden){if(r+=c.line.height,s&&a<8){var f=c.node.offsetTop+c.node.offsetHeight;u=f-i,i=f}else{var p=c.node.getBoundingClientRect();u=p.bottom-p.top,!h&&c.text.firstChild&&(d=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var m=c.line.height-u;if((m>.005||m<-.005)&&(r<n&&(o-=m),Xe(c.line,u),Sn(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Sn(c.rest[g]);if(d>e.display.sizerWidth){var v=Math.ceil(d/rn(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Sn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function kn(e,t,i){var n=i&&null!=i.top?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Ei(e));var r=i&&null!=i.bottom?i.bottom:n+e.wrapper.clientHeight,o=Ze(t,n),s=Ze(t,r);if(i&&i.ensure){var a=i.ensure.from.line,l=i.ensure.to.line;a<o?(o=a,s=Ze(t,Ut(Ge(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=Ze(t,Ut(Ge(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Dn(e,t){var i=e.display,n=nn(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:i.scroller.scrollTop,o=Di(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Fi(i),l=t.top<n,c=t.bottom>a-n;if(t.top<r)s.scrollTop=l?0:t.top;else if(t.bottom>r+o){var h=Math.min(t.top,(c?a:t.bottom)-o);h!=r&&(s.scrollTop=h)}var u=e.options.fixedGutter?0:i.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:i.scroller.scrollLeft-u,f=ki(e)-i.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?s.scrollLeft=0:t.left<d?s.scrollLeft=Math.max(0,t.left+u-(p?0:10)):t.right>f+d-3&&(s.scrollLeft=t.right+(p?0:10)-f),s}function $n(e,t){null!=t&&(Rn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ln(e){Rn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Bn(e,t,i){null==t&&null==i||Rn(e),null!=t&&(e.curOp.scrollLeft=t),null!=i&&(e.curOp.scrollTop=i)}function Rn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Yi(e,t.from),n=Yi(e,t.to);Tn(e,i,n,t.margin)}}function Tn(e,t,i,n){var r=Dn(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Bn(e,r.scrollLeft,r.scrollTop)}function Mn(e,t){Math.abs(e.doc.scrollTop-t)<2||(i||cr(e,{top:t}),Pn(e,t,!0),i&&cr(e),nr(e,100))}function Pn(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function On(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,dr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Nn(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+Fi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Si(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var In=function(e,t,i){this.cm=i;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),me(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),me(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};In.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},In.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},In.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},In.prototype.zeroWidthHack=function(){var e=w&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new H,this.disableVert=new H},In.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="",t.set(1e3,function n(){var r=e.getBoundingClientRect(),o="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,n)})},In.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var jn=function(){};function Wn(e,t){t||(t=Nn(e));var i=e.display.barWidth,n=e.display.barHeight;Hn(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&_n(e),Hn(e,Nn(e)),i=e.display.barWidth,n=e.display.barHeight}function Hn(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}jn.prototype.update=function(){return{bottom:0,right:0}},jn.prototype.setScrollLeft=function(){},jn.prototype.setScrollTop=function(){},jn.prototype.clear=function(){};var zn={native:In,null:jn};function Vn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){"horizontal"==i?On(e,t):Mn(e,t)},e),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)}var Un=0;function qn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Un,markArrays:null},function(e){ai?ai.ops.push(e):e.ownsGroup=ai={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Kn(e){var t=e.curOp;t&&function(e,t){var i=e.ownsGroup;if(i)try{!function(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<t.length)}(i)}finally{ai=null,t(i)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,i=0;i<t.length;i++)Gn(t[i]);for(var n=0;n<t.length;n++)Yn(t[n]);for(var r=0;r<t.length;r++)Qn(t[r]);for(var o=0;o<t.length;o++)Xn(t[o]);for(var s=0;s<t.length;s++)Jn(t[s])}(e)})}function Gn(e){var t=e.cm,i=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Si(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Si(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Kt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new or(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yn(e){e.updatedDisplay=e.mustUpdate&&ar(e.cm,e.update)}function Qn(e){var t=e.cm,i=t.display;e.updatedDisplay&&_n(t),e.barMeasure=Nn(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Li(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Si(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-ki(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Xn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&On(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==R(O(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Wn(t,e.barMeasure),e.updatedDisplay&&ur(t,e.barMeasure),e.selectionChanged&&Cn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&An(e.cm)}function Jn(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&lr(t,e.update),null==i.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(i.wheelStartX=i.wheelStartY=null),null!=e.scrollTop&&Pn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&On(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=function(e,t,i,n){var r;null==n&&(n=0),e.options.lineWrapping||t!=i||(i="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var s=!1,a=Gi(e,t),l=i&&i!=t?Gi(e,i):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-n,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+n};var c=Dn(e,r),h=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=c.scrollTop&&(Mn(e,c.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(s=!0)),null!=c.scrollLeft&&(On(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(s=!0)),!s)break}return r}(t,ct(n,e.scrollToPos.from),ct(n,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!we(e,"scrollCursorIntoView")){var i=e.display,n=i.sizer.getBoundingClientRect(),r=null,o=i.wrapper.ownerDocument;if(t.top+n.top<0?r=!0:t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(r=!1),null!=r&&!m){var s=$("div","",null,"position: absolute;\n top: "+(t.top-i.viewOffset-Ei(e.display))+"px;\n height: "+(t.bottom-t.top+Si(e)+i.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(r),e.display.lineSpace.removeChild(s)}}}(t,r)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(s)for(var l=0;l<s.length;++l)s[l].lines.length&&ye(s[l],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Zn(e,t){if(e.curOp)return t();qn(e);try{return t()}finally{Kn(e)}}function er(e,t){return function(){if(e.curOp)return t.apply(e,arguments);qn(e);try{return t.apply(e,arguments)}finally{Kn(e)}}}function tr(e){return function(){if(this.curOp)return e.apply(this,arguments);qn(this);try{return e.apply(this,arguments)}finally{Kn(this)}}}function ir(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);qn(t);try{return e.apply(this,arguments)}finally{Kn(t)}}}function nr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,I(rr,e))}function rr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=mt(e,t.highlightFrontier),r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?Ve(t.mode,n.state):null,l=ft(e,o,n,!0);a&&(n.state=a),o.styles=l.styles;var c=o.styleClasses,h=l.classes;h?o.styleClasses=h:c&&(o.styleClasses=null);for(var u=!s||s.length!=o.styles.length||c!=h&&(!c||!h||c.bgClass!=h.bgClass||c.textClass!=h.textClass),d=0;!u&&d<s.length;++d)u=s[d]!=o.styles[d];u&&r.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&gt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return nr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&Zn(e,function(){for(var t=0;t<r.length;t++)dn(e,r[t],"text")})}}var or=function(e,t,i){var n=e.display;this.viewport=t,this.visible=kn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ki(e),this.force=i,this.dims=on(e),this.events=[]};function sr(e){if(e.hasFocus())return null;var t=R(O(e));if(!t||!B(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=N(e).getSelection();n.anchorNode&&n.extend&&B(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function ar(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return fn(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==mn(e))return!1;fr(e)&&(fn(e),t.dims=on(e));var r=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);i.viewFrom<o&&o-i.viewFrom<20&&(o=Math.max(n.first,i.viewFrom)),i.viewTo>s&&i.viewTo-s<20&&(s=Math.min(r,i.viewTo)),Et&&(o=Wt(e.doc,o),s=Ht(e.doc,s));var a=o!=i.viewFrom||s!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;!function(e,t,i){var n=e.display;0==n.view.length||t>=n.viewTo||i<=n.viewFrom?(n.view=si(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=si(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(si(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,hn(e,i)))),n.viewTo=i}(e,o,s),i.viewOffset=Ut(Ge(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var c=mn(e);if(!a&&0==c&&!t.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var h=sr(e);return c>4&&(i.lineDiv.style.display="none"),function(e,t,i){var n=e.display,r=e.options.lineNumbers,o=n.lineDiv,s=o.firstChild;function a(t){var i=t.nextSibling;return l&&w&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),i}for(var c=n.view,h=n.viewFrom,u=0;u<c.length;u++){var d=c[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;s!=d.node;)s=a(s);var f=r&&null!=t&&t<=h&&d.lineNumber;d.changes&&(z(d.changes,"gutter")>-1&&(f=!1),ui(e,d,h,i)),f&&(k(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(tt(e.options,h)))),s=d.node.nextSibling}else{var p=yi(e,d,h,i);o.insertBefore(p,s)}h+=d.size}for(;s;)s=a(s)}(e,i.updateLineNumbers,t.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,function(e){if(e&&e.activeElt&&e.activeElt!=R(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&B(document.body,e.anchorNode)&&B(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,i=t.defaultView.getSelection(),n=t.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),i.removeAllRanges(),i.addRange(n),i.extend(e.focusNode,e.focusOffset)}}(h),k(i.cursorDiv),k(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,nr(e,400)),i.updateLineNumbers=null,!0}function lr(e,t){for(var i=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=ki(e))n&&(t.visible=kn(e.display,e.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(e.doc.height+Fi(e.display)-Di(e),i.top)}),t.visible=kn(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ar(e,t))break;_n(e);var r=Nn(e);gn(e),Wn(e,r),ur(e,r),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function cr(e,t){var i=new or(e,t);if(ar(e,i)){_n(e),lr(e,i);var n=Nn(e);gn(e),Wn(e,n),ur(e,n),i.finish()}}function hr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ci(e,"gutterChanged",e)}function ur(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Si(e)+"px"}function dr(e){var t=e.display,i=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=sn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=n+"px",s=0;s<i.length;s++)if(!i[s].hidden){e.options.fixedGutter&&(i[s].gutter&&(i[s].gutter.style.left=o),i[s].gutterBackground&&(i[s].gutterBackground.style.left=o));var a=i[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}}function fr(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=tt(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild($("div",[$("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,s=r.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-s)+1,n.lineNumWidth=n.lineNumInnerWidth+s,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",hr(e.display),!0}return!1}function pr(e,t){for(var i=[],n=!1,r=0;r<e.length;r++){var o=e[r],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}i.push({className:o,style:s})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function mr(e){var t=e.gutters,i=e.gutterSpecs;k(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],o=r.className,s=r.style,a=t.appendChild($("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",hr(e)}function gr(e){mr(e.display),un(e),dr(e)}or.prototype.signal=function(e,t){Ce(e,t)&&this.events.push(arguments)},or.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var vr=0,yr=null;function wr(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==i&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:null==i&&(i=e.wheelDelta),{x:t,y:i}}function br(e){var t=wr(e);return t.x*=yr,t.y*=yr,t}function Cr(e,t){h&&102==u&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=wr(t),r=n.x,o=n.y,s=yr;0===t.deltaMode&&(r=t.deltaX,o=t.deltaY,s=1);var a=e.display,c=a.scroller,f=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight;if(r&&f||o&&p){if(o&&w&&l)e:for(var m=t.target,g=a.view;m!=c;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(r&&!i&&!d&&null!=s)return o&&p&&Mn(e,Math.max(0,c.scrollTop+o*s)),On(e,Math.max(0,c.scrollLeft+r*s)),(!o||o&&p)&&xe(t),void(a.wheelStartX=null);if(o&&null!=s){var y=o*s,b=e.doc.scrollTop,C=b+a.wrapper.clientHeight;y<0?b=Math.max(0,b+y-50):C=Math.min(e.doc.height,C+y+50),cr(e,{top:b,bottom:C})}vr<20&&0!==t.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=c.scrollLeft,a.wheelStartY=c.scrollTop,a.wheelDX=r,a.wheelDY=o,setTimeout(function(){if(null!=a.wheelStartX){var e=c.scrollLeft-a.wheelStartX,t=c.scrollTop-a.wheelStartY,i=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,i&&(yr=(yr*vr+i)/(vr+1),++vr)}},200)):(a.wheelDX+=r,a.wheelDY+=o))}}s?yr=-.53:i?yr=15:h?yr=-.7:f&&(yr=-1/3);var Ar=function(e,t){this.ranges=e,this.primIndex=t};Ar.prototype.primary=function(){return this.ranges[this.primIndex]},Ar.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!rt(i.anchor,n.anchor)||!rt(i.head,n.head))return!1}return!0},Ar.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new xr(ot(this.ranges[t].anchor),ot(this.ranges[t].head));return new Ar(e,this.primIndex)},Ar.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ar.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(nt(t,n.from())>=0&&nt(e,n.to())<=0)return i}return-1};var xr=function(e,t){this.anchor=e,this.head=t};function Er(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(e,t){return nt(e.from(),t.from())}),i=z(t,r);for(var o=1;o<t.length;o++){var s=t[o],a=t[o-1],l=nt(a.to(),s.from());if(n&&!s.empty()?l>0:l>=0){var c=at(a.from(),s.from()),h=st(a.to(),s.to()),u=a.empty()?s.from()==s.head:a.from()==a.head;o<=i&&--i,t.splice(--o,2,new xr(u?h:c,u?c:h))}}return new Ar(t,i)}function Fr(e,t){return new Ar([new xr(e,t||e)],0)}function _r(e){return e.text?it(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Sr(e,t){if(nt(e,t.from)<0)return e;if(nt(e,t.to)<=0)return _r(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=_r(t).ch-t.to.ch),it(i,n)}function kr(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new xr(Sr(r.anchor,t),Sr(r.head,t)))}return Er(e.cm,i,e.sel.primIndex)}function Dr(e,t,i){return e.line==t.line?it(i.line,e.ch-t.ch+i.ch):it(i.line+(e.line-t.line),e.ch)}function $r(e){e.doc.mode=We(e.options,e.doc.modeOption),Lr(e)}function Lr(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,nr(e,100),e.state.modeGen++,e.curOp&&un(e)}function Br(e,t){return 0==t.from.ch&&0==t.to.ch&&""==J(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Rr(e,t,i,n){function r(e){return i?i[e]:null}function o(e,i,r){!function(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),$t(e),Lt(e,i);var r=n?n(e):1;r!=e.height&&Xe(e,r)}(e,i,r,n),ci(e,"change",e,t)}function s(e,t){for(var i=[],o=e;o<t;++o)i.push(new Gt(c[o],r(o),n));return i}var a=t.from,l=t.to,c=t.text,h=Ge(e,a.line),u=Ge(e,l.line),d=J(c),f=r(c.length-1),p=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(Br(e,t)){var m=s(0,c.length-1);o(u,u.text,f),p&&e.remove(a.line,p),m.length&&e.insert(a.line,m)}else if(h==u)if(1==c.length)o(h,h.text.slice(0,a.ch)+d+h.text.slice(l.ch),f);else{var g=s(1,c.length-1);g.push(new Gt(d+h.text.slice(l.ch),f,n)),o(h,h.text.slice(0,a.ch)+c[0],r(0)),e.insert(a.line+1,g)}else if(1==c.length)o(h,h.text.slice(0,a.ch)+c[0]+u.text.slice(l.ch),r(0)),e.remove(a.line+1,p);else{o(h,h.text.slice(0,a.ch)+c[0],r(0)),o(u,d+u.text.slice(l.ch),f);var v=s(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,v)}ci(e,"change",e,t)}function Tr(e,t,i){!function e(n,r,o){if(n.linked)for(var s=0;s<n.linked.length;++s){var a=n.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;i&&!l||(t(a.doc,l),e(a.doc,n,l))}}}(e,null,!0)}function Mr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),$r(e),Pr(e),e.options.direction=t.direction,e.options.lineWrapping||Kt(e),e.options.mode=t.modeOption,un(e)}function Pr(e){("rtl"==e.doc.direction?T:S)(e.display.lineDiv,"CodeMirror-rtl")}function Or(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Nr(e,t){var i={from:ot(t.from),to:_r(t),text:Ye(e,t.from,t.to)};return zr(e,i,t.from.line,t.to.line+1),Tr(e,function(e){return zr(e,i,t.from.line,t.to.line+1)},!0),i}function Ir(e){for(;e.length;){var t=J(e);if(!t.ranges)break;e.pop()}}function jr(e,t,i,n){var r=e.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&r.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Ir(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(r,r.lastOp==n)))s=J(o.changes),0==nt(t.from,t.to)&&0==nt(t.from,s.to)?s.to=_r(t):o.changes.push(Nr(e,t));else{var l=J(r.done);for(l&&l.ranges||Hr(e.sel,r.done),o={changes:[Nr(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,s||ye(e,"historyAdded")}function Wr(e,t,i,n){var r=e.history,o=n&&n.origin;i==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(e,t,i,n){var r=t.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,J(r.done),t))?r.done[r.done.length-1]=t:Hr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ir(r.undone)}function Hr(e,t){var i=J(t);i&&i.ranges&&i.equals(e)||t.push(e)}function zr(e,t,i,n){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(i){i.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=i.markedSpans),++o})}function Vr(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function Ur(e,t){var i=function(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(Vr(i[r]));return n}(e,t),n=kt(e,t);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var o=i[r],s=n[r];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else s&&(i[r]=s)}return i}function qr(e,t,i){for(var n=[],r=0;r<e.length;++r){var o=e[r];if(o.ranges)n.push(i?Ar.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];n.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],h=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var u in c)(h=u.match(/^spans_(\d+)$/))&&z(t,Number(h[1]))>-1&&(J(a)[u]=c[u],delete c[u])}}}return n}function Kr(e,t,i,n){if(n){var r=e.anchor;if(i){var o=nt(t,r)<0;o!=nt(i,r)<0?(r=t,t=i):o!=nt(t,i)<0&&(t=i)}return new xr(r,t)}return new xr(i||t,t)}function Gr(e,t,i,n,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),Zr(e,new Ar([Kr(e.sel.primary(),t,i,r)],0),n)}function Yr(e,t,i){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Kr(e.sel.ranges[o],t[o],null,r);var s=Er(e.cm,n,e.sel.primIndex);Zr(e,s,i)}function Qr(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,Zr(e,Er(e.cm,r,e.sel.primIndex),n)}function Xr(e,t,i,n){Zr(e,Fr(t,i),n)}function Jr(e,t,i){var n=e.history.done,r=J(n);r&&r.ranges?(n[n.length-1]=t,eo(e,t,i)):Zr(e,t,i)}function Zr(e,t,i){eo(e,t,i),Wr(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function eo(e,t,i){(Ce(e,"beforeSelectionChange")||e.cm&&Ce(e.cm,"beforeSelectionChange"))&&(t=function(e,t,i){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var i=0;i<t.length;i++)this.ranges[i]=new xr(ct(e,t[i].anchor),ct(e,t[i].head))},origin:i&&i.origin};return ye(e,"beforeSelectionChange",e,n),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Er(e.cm,n.ranges,n.ranges.length-1):t}(e,t,i));var n=i&&i.bias||(nt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,no(e,t,n,!0)),i&&!1===i.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Ln(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),ci(e,"cursorActivity",e))}function io(e){to(e,no(e,e.sel,null,!1))}function no(e,t,i,n){for(var r,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=oo(e,s.anchor,a&&a.anchor,i,n),c=s.head==s.anchor?l:oo(e,s.head,a&&a.head,i,n);(r||l!=s.anchor||c!=s.head)&&(r||(r=t.ranges.slice(0,o)),r[o]=new xr(l,c))}return r?Er(e.cm,r,t.primIndex):t}function ro(e,t,i,n,r){var o=Ge(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,h="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(c?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(h?a.to>=t.ch:a.to>t.ch))){if(r&&(ye(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(i){var u=l.find(n<0?1:-1),d=void 0;if((n<0?h:c)&&(u=so(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(d=nt(u,i))&&(n<0?d<0:d>0))return ro(e,u,t,n,r)}var f=l.find(n<0?-1:1);return(n<0?c:h)&&(f=so(e,f,n,f.line==t.line?o:null)),f?ro(e,f,t,n,r):null}}return t}function oo(e,t,i,n,r){var o=n||1,s=ro(e,t,i,o,r)||!r&&ro(e,t,i,o,!0)||ro(e,t,i,-o,r)||!r&&ro(e,t,i,-o,!0);return s||(e.cantEdit=!0,it(e.first,0))}function so(e,t,i,n){return i<0&&0==t.ch?t.line>e.first?ct(e,it(t.line-1)):null:i>0&&t.ch==(n||Ge(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+i)}function ao(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),q)}function lo(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(t,i,r,o){t&&(n.from=ct(e,t)),i&&(n.to=ct(e,i)),r&&(n.text=r),void 0!==o&&(n.origin=o)}),ye(e,"beforeChange",e,n),e.cm&&ye(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function co(e,t,i){if(e.cm){if(!e.cm.curOp)return er(e.cm,co)(e,t,i);if(e.cm.state.suppressEdits)return}if(!(Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"))||(t=lo(e,t,!0))){var n=xt&&!i&&function(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var i=e.markedSpans[t].marker;!i.readOnly||n&&-1!=z(n,i)||(n||(n=[])).push(i)}}),!n)return null;for(var r=[{from:t,to:i}],o=0;o<n.length;++o)for(var s=n[o],a=s.find(0),l=0;l<r.length;++l){var c=r[l];if(!(nt(c.to,a.from)<0||nt(c.from,a.to)>0)){var h=[l,1],u=nt(c.from,a.from),d=nt(c.to,a.to);(u<0||!s.inclusiveLeft&&!u)&&h.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&h.push({from:a.to,to:c.to}),r.splice.apply(r,h),l+=h.length-3}}return r}(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)ho(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else ho(e,t)}}function ho(e,t){if(1!=t.text.length||""!=t.text[0]||0!=nt(t.from,t.to)){var i=kr(e,t);jr(e,t,i,e.cm?e.cm.curOp.id:NaN),po(e,t,i,kt(e,t));var n=[];Tr(e,function(e,i){i||-1!=z(n,e.history)||(yo(e.history,t),n.push(e.history)),po(e,t,null,kt(e,t))})}}function uo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!n||i){for(var r,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<a.length&&(r=a[c],i?!r.ranges||r.equals(e.sel):r.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=a.pop()).ranges){if(n)return void a.push(r);break}if(Hr(r,l),i&&!r.equals(e.sel))return void Zr(e,r,{clearRedo:!1});s=r}var h=[];Hr(s,l),l.push({changes:h,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var u=Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"),d=function(i){var n=r.changes[i];if(n.origin=t,u&&!lo(e,n,!1))return a.length=0,{};h.push(Nr(e,n));var o=i?kr(e,n):J(a);po(e,n,o,Ur(e,n)),!i&&e.cm&&e.cm.scrollIntoView({from:n.from,to:_r(n)});var s=[];Tr(e,function(e,t){t||-1!=z(s,e.history)||(yo(e.history,n),s.push(e.history)),po(e,n,null,Ur(e,n))})},f=r.changes.length-1;f>=0;--f){var p=d(f);if(p)return p.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ar(Z(e.sel.ranges,function(e){return new xr(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){un(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)dn(e.cm,n,"gutter")}}function po(e,t,i,n){if(e.cm&&!e.cm.curOp)return er(e.cm,po)(e,t,i,n);if(t.to.line<e.first)fo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);fo(e,r),t={from:it(e.first,0),to:it(t.to.line+r,t.to.ch),text:[J(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),i||(i=kr(e,t)),e.cm?function(e,t,i){var n=e.doc,r=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=Je(jt(Ge(n,o.line))),n.iter(l,s.line+1,function(e){if(e==r.maxLine)return a=!0,!0})),n.sel.contains(t.from,t.to)>-1&&be(e),Rr(n,t,i,an(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,function(e){var t=qt(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,n=t-1;n>i;n--){var r=Ge(e,n).stateAfter;if(r&&(!(r instanceof ut)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}(n,o.line),nr(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?un(e):o.line!=s.line||1!=t.text.length||Br(e.doc,t)?un(e,o.line,s.line+1,c):dn(e,o.line,"text");var h=Ce(e,"changes"),u=Ce(e,"change");if(u||h){var d={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};u&&ci(e,"change",e,d),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,n):Rr(e,t,n),eo(e,i,q),e.cantEdit&&oo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function mo(e,t,i,n,r){var o;n||(n=i),nt(n,i)<0&&(i=(o=[n,i])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),co(e,{from:i,to:n,text:t,origin:r})}function go(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,i,n){for(var r=0;r<e.length;++r){var o=e[r],s=!0;if(o.ranges){o.copied||((o=e[r]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)go(o.ranges[a].anchor,t,i,n),go(o.ranges[a].head,t,i,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(i<c.from.line)c.from=it(c.from.line+n,c.from.ch),c.to=it(c.to.line+n,c.to.ch);else if(t<=c.to.line){s=!1;break}}s||(e.splice(0,r+1),r=0)}}}function yo(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;vo(e.done,i,n,r),vo(e.undone,i,n,r)}function wo(e,t,i,n){var r=t,o=t;return"number"==typeof t?o=Ge(e,lt(e,t)):r=Je(t),null==r?null:(n(o,r)&&e.cm&&dn(e.cm,r,i),o)}function bo(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}function Co(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),i+=r.height,r.parent=this}this.size=t,this.height=i,this.parent=null}xr.prototype.from=function(){return at(this.anchor,this.head)},xr.prototype.to=function(){return st(this.anchor,this.head)},xr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height,Yt(r),ci(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}},Co.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var o=Math.min(t,r-e),s=n.height;if(n.removeInner(e,o),this.height-=s-n.height,r==o&&(this.children.splice(i--,1),n.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var a=[];this.collapse(a),this.children=[new bo(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<=o){if(r.insertInner(e,t,i),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a<r.lines.length;){var l=new bo(r.lines.slice(a,a+=25));r.height-=l.height,this.children.splice(++n,0,l),l.parent=this}r.lines=r.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Co(t);if(e.parent){e.size-=i.size,e.height-=i.height;var n=z(e.parent.children,e);e.parent.children.splice(n+1,0,i)}else{var r=new Co(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var s=Math.min(t,o-e);if(r.iterN(e,s,i))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Ao=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};function xo(e,t,i){Ut(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$n(e,i)}Ao.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Je(i);if(null!=n&&t){for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(i.widgets=null);var o=Ai(this);Xe(i,Math.max(0,i.height-o)),e&&(Zn(e,function(){xo(e,i,-o),dn(e,n,"widget")}),ci(e,"lineWidgetCleared",e,this,n))}},Ao.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=Ai(this)-t;r&&(zt(this.doc,n)||Xe(n,n.height+r),i&&Zn(i,function(){i.curOp.forceUpdate=!0,xo(i,n,r),ci(i,"lineWidgetChanged",i,e,Je(n))}))},Ae(Ao);var Eo=0,Fo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Eo};function _o(e,t,i,n,r){if(n&&n.shared)return function(e,t,i,n,r){(n=j(n)).shared=!1;var o=[_o(e,t,i,n,r)],s=o[0],a=n.widgetNode;return Tr(e,function(e){a&&(n.widgetNode=a.cloneNode(!0)),o.push(_o(e,ct(e,t),ct(e,i),n,r));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=J(o)}),new So(o,s)}(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return er(e.cm,_o)(e,t,i,n,r);var o=new Fo(e,r),s=nt(t,i);if(n&&j(n,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(e,t.line,t,i,o)||t.line!=i.line&&It(e,i.line,t,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&jr(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,i.line+1,function(n){c&&o.collapsed&&!c.options.lineWrapping&&jt(n)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&Xe(n,0),function(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}(n,new Ft(o,l==t.line?t.ch:null,l==i.line?i.ch:null),e.cm&&e.cm.curOp),++l}),o.collapsed&&e.iter(t.line,i.line+1,function(t){zt(e,t)&&Xe(t,0)}),o.clearOnEnter&&me(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)un(c,t.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=i.line;h++)dn(c,h,"text");o.atomic&&io(c.doc),ci(c,"markerAdded",c,o)}return o}Fo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&qn(e),Ce(this,"clear")){var i=this.find();i&&ci(this,"clear",i.from,i.to)}for(var n=null,r=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=_t(s.markedSpans,this);e&&!this.collapsed?dn(e,Je(s),"text"):e&&(null!=a.to&&(r=Je(s)),null!=a.from&&(n=Je(s))),s.markedSpans=St(s.markedSpans,a),null==a.from&&this.collapsed&&!zt(this.doc,s)&&e&&Xe(s,nn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=jt(this.lines[l]),h=qt(c);h>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&un(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&io(e.doc)),e&&ci(e,"markerCleared",e,this,n,r),t&&Kn(e),this.parent&&this.parent.clear()}},Fo.prototype.find=function(e,t){var i,n;null==e&&"bookmark"==this.type&&(e=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],s=_t(o.markedSpans,this);if(null!=s.from&&(i=it(t?o:Je(o),s.from),-1==e))return i;if(null!=s.to&&(n=it(t?o:Je(o),s.to),1==e))return n}return i&&{from:i,to:n}},Fo.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;t&&n&&Zn(n,function(){var r=t.line,o=Je(t.line),s=Bi(n,o);if(s&&(Ii(s),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!zt(i.doc,r)&&null!=i.height){var a=i.height;i.height=null;var l=Ai(i)-a;l&&Xe(r,r.height+l)}ci(n,"markerChanged",n,e)})},Fo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=z(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Fo.prototype.detachLine=function(e){if(this.lines.splice(z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Fo);var So=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};function ko(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),function(e){return e.parent})}function Do(e){for(var t=function(t){var i=e[t],n=[i.primary.doc];Tr(i.primary.doc,function(e){return n.push(e)});for(var r=0;r<i.markers.length;r++){var o=i.markers[r];-1==z(n,o.doc)&&(o.parent=null,i.markers.splice(r--,1))}},i=0;i<e.length;i++)t(i)}So.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ci(this,"clear")}},So.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(So);var $o=0,Lo=function(e,t,i,n,r){if(!(this instanceof Lo))return new Lo(e,t,i,n,r);null==i&&(i=0),Co.call(this,[new bo([new Gt("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var o=it(i,0);this.sel=Fr(o),this.history=new Or(null),this.id=++$o,this.modeOption=t,this.lineSep=n,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Rr(this,{from:o,to:o,text:e}),Zr(this,Fr(o),q)};Lo.prototype=te(Co.prototype,{constructor:Lo,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ir(function(e){var t=it(this.first,0),i=this.first+this.size-1;co(this,{from:t,to:it(i,Ge(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Bn(this.cm,0,0),Zr(this,Fr(t),q)}),replaceRange:function(e,t,i,n){t=ct(this,t),i=i?ct(this,i):t,mo(this,e,t,i,n)},getRange:function(e,t,i){var n=Ye(this,ct(this,e),ct(this,t));return!1===i?n:""===i?n.join(""):n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(et(this,e))return Ge(this,e)},getLineNumber:function(e){return Je(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ge(this,e)),jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ct(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ir(function(e,t,i){Xr(this,ct(this,"number"==typeof e?it(e,t||0):e),null,i)}),setSelection:ir(function(e,t,i){Xr(this,ct(this,e),ct(this,t||e),i)}),extendSelection:ir(function(e,t,i){Gr(this,ct(this,e),t&&ct(this,t),i)}),extendSelections:ir(function(e,t){Yr(this,ht(this,e),t)}),extendSelectionsBy:ir(function(e,t){var i=Z(this.sel.ranges,e);Yr(this,ht(this,i),t)}),setSelections:ir(function(e,t,i){if(e.length){for(var n=[],r=0;r<e.length;r++)n[r]=new xr(ct(this,e[r].anchor),ct(this,e[r].head||e[r].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Zr(this,Er(this.cm,n,t),i)}}),addSelection:ir(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new xr(ct(this,e),ct(this,t||e))),Zr(this,Er(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t,i=this.sel.ranges,n=0;n<i.length;n++){var r=Ye(this,i[n].from(),i[n].to());t=t?t.concat(r):r}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=Ye(this,i[n].from(),i[n].to());!1!==e&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:ir(function(e,t,i){for(var n=[],r=this.sel,o=0;o<r.ranges.length;o++){var s=r.ranges[o];n[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:i}}for(var a=t&&"end"!=t&&function(e,t,i){for(var n=[],r=it(e.first,0),o=r,s=0;s<t.length;s++){var a=t[s],l=Dr(a.from,r,o),c=Dr(_r(a),r,o);if(r=a.to,o=c,"around"==i){var h=e.sel.ranges[s],u=nt(h.head,h.anchor)<0;n[s]=new xr(u?c:l,u?l:c)}else n[s]=new xr(l,l)}return new Ar(n,e.sel.primIndex)}(this,n,t),l=n.length-1;l>=0;l--)co(this,n[l]);a?Jr(this,a):this.cm&&Ln(this.cm)}),undo:ir(function(){uo(this,"undo")}),redo:ir(function(){uo(this,"redo")}),undoSelection:ir(function(){uo(this,"undo",!0)}),redoSelection:ir(function(){uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Or(this.history),Tr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qr(this.history.done),undone:qr(this.history.undone)}},setHistory:function(e){var t=this.history=new Or(this.history);t.done=qr(e.done.slice(0),null,!0),t.undone=qr(e.undone.slice(0),null,!0)},setGutterMarker:ir(function(e,t,i){return wo(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=i,!i&&oe(n)&&(e.gutterMarkers=null),!0})}),clearGutter:ir(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&wo(t,i,"gutter",function(){return i.gutterMarkers[e]=null,oe(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!et(this,e))return null;if(t=e,!(e=Ge(this,e)))return null}else if(null==(t=Je(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ir(function(e,t,i){return wo(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(F(i).test(e[n]))return!1;e[n]+=" "+i}else e[n]=i;return!0})}),removeLineClass:ir(function(e,t,i){return wo(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",r=e[n];if(!r)return!1;if(null==i)e[n]=null;else{var o=r.match(F(i));if(!o)return!1;var s=o.index+o[0].length;e[n]=r.slice(0,o.index)+(o.index&&s!=r.length?" ":"")+r.slice(s)||null}return!0})}),addLineWidget:ir(function(e,t,i){return function(e,t,i,n){var r=new Ao(e,i,n),o=e.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),wo(e,t,"widget",function(t){var i=t.widgets||(t.widgets=[]);if(null==r.insertAt?i.push(r):i.splice(Math.min(i.length,Math.max(0,r.insertAt)),0,r),r.line=t,o&&!zt(e,t)){var n=Ut(t)<e.scrollTop;Xe(t,t.height+Ai(r)),n&&$n(o,r.height),o.curOp.forceUpdate=!0}return!0}),o&&ci(o,"lineWidgetAdded",o,r,"number"==typeof t?t:Je(t)),r}(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return _o(this,ct(this,e),ct(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return _o(this,e=ct(this,e),e,i,"bookmark")},findMarksAt:function(e){var t=[],i=Ge(this,(e=ct(this,e)).line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,i){e=ct(this,e),t=ct(this,t);var n=[],r=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&r==e.line&&e.ch>=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)null!=i[n].from&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var o=r.text.length+n;if(o>e)return t=e,!0;e-=o,++i}),ct(this,it(i,t))},indexFromPos:function(e){var t=(e=ct(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+i}),t},copy:function(e){var t=new Lo(Qe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<i&&(i=e.to);var n=new Lo(Qe(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find(),o=e.clipPos(r.from),s=e.clipPos(r.to);if(nt(o,s)){var a=_o(e,o,s,n.primary,n.primary.type);n.markers.push(a),a.parent=n}}}(n,ko(this)),n},unlinkDoc:function(e){if(e instanceof Ss&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Do(ko(this));break}}if(e.history==this.history){var n=[e.id];Tr(e,function(e){return n.push(e.id)},!0),e.history=new Or(null),e.history.done=qr(this.history.done,n),e.history.undone=qr(this.history.undone,n)}},iterLinkedDocs:function(e){Tr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Te(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ir(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){Zn(e,function(){Pr(e),un(e)})}(this.cm))})}),Lo.prototype.eachLine=Lo.prototype.iter;var Bo=0;function Ro(e){var t=this;if(To(t),!we(t,e)&&!xi(t.display,e)){xe(e),s&&(Bo=+new Date);var i=cn(t,e,!0),n=e.dataTransfer.files;if(i&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,o=Array(r),a=0,l=function(){++a==r&&er(t,function(){var e={from:i=ct(t.doc,i),to:i,text:t.doc.splitLines(o.filter(function(e){return null!=e}).join(t.doc.lineSeparator())),origin:"paste"};co(t.doc,e),Jr(t.doc,Fr(ct(t.doc,i),ct(t.doc,_r(e))))})()},c=function(e,i){if(t.options.allowDropFileTypes&&-1==z(t.options.allowDropFileTypes,e.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)?l():(o[i]=e,l())},n.readAsText(e)}},h=0;h<n.length;h++)c(n[h],h);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),eo(t.doc,Fr(i,i)),d)for(var f=0;f<d.length;++f)mo(t.doc,"",d[f].anchor,d[f].head,"drag");t.replaceSelection(u,"around","paste"),t.display.input.focus()}}catch(e){}}}}function To(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Mo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var t=0;t<i.length;t++)e(i[t])})}}var Po=!1;function Oo(){Po||(function(){var e;me(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Mo(No)},100))}),me(window,"blur",function(){return Mo(Fn)})}(),Po=!0)}function No(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Io={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},jo=0;jo<10;jo++)Io[jo+48]=Io[jo+96]=String(jo);for(var Wo=65;Wo<=90;Wo++)Io[Wo]=String.fromCharCode(Wo);for(var Ho=1;Ho<=12;Ho++)Io[Ho+111]=Io[Ho+63235]="F"+Ho;var zo={};function Vo(e){var t,i,n,r,o=e.split(/-(?!$)/);e=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))r=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);n=!0}}return t&&(e="Alt-"+e),i&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Uo(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if("..."==n){delete e[i];continue}for(var r=Z(i.split(" "),Vo),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=n):(a=r.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[i]}for(var c in t)e[c]=t[c];return e}function qo(e,t,i,n){var r=(t=Qo(t)).call?t.call(e,n):t[e];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&i(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return qo(e,t.fallthrough,i,n);for(var o=0;o<t.fallthrough.length;o++){var s=qo(e,t.fallthrough[o],i,n);if(s)return s}}}function Ko(e){var t="string"==typeof e?e:Io[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Go(e,t,i){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!i&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Yo(e,t){if(d&&34==e.keyCode&&e.char)return!1;var i=Io[e.keyCode];return null!=i&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(i=e.code),Go(i,e,t))}function Qo(e){return"string"==typeof e?zo[e]:e}function Xo(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var o=t(i[r]);n.length&&nt(o.from,J(n).to)<=0;){var s=n.pop();if(nt(s.from,o.from)<0){o.from=s.from;break}}n.push(o)}Zn(e,function(){for(var t=n.length-1;t>=0;t--)mo(e.doc,"",n[t].from,n[t].to,"+delete");Ln(e)})}function Jo(e,t,i){var n=le(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Zo(e,t,i){var n=Jo(e,t.ch,i);return null==n?null:new it(t.line,n,i<0?"after":"before")}function es(e,t,i,n,r){if(e){"rtl"==t.doc.direction&&(r=-r);var o=fe(i,t.doc.direction);if(o){var s,a=r<0?J(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var h=Ri(t,i);s=r<0?i.text.length-1:0;var u=Ti(t,h,s).top;s=ce(function(e){return Ti(t,h,e).top==u},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=Jo(i,s,1))}else s=r<0?a.to:a.from;return new it(n,s,c)}}return new it(n,r<0?i.text.length:0,r<0?"before":"after")}zo.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"},zo.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"},zo.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"},zo.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"]},zo.default=w?zo.macDefault:zo.pcDefault;var ts={selectAll:ao,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var i=Ge(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,i)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:it(t.from().line,0),to:ct(e.doc,it(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:it(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ns(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var i=Ge(e.doc,t),n=function(e){for(var t;t=Ot(e);)e=t.find(1,!0).line;return e}(i);return n!=i&&(t=Je(n)),es(!0,e,i,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},G)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},G)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?ns(e,t.head):n},G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,r=0;r<i.length;r++){var o=i[r].from(),s=W(e.getLine(o.line),o.ch,n);t.push(X(n-s%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Zn(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)if(t[n].empty()){var r=t[n].head,o=Ge(e.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new it(r.line,r.ch-1)),r.ch>0)r=new it(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),it(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var s=Ge(e.doc,r.line-1).text;s&&(r=new it(r.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),it(r.line-1,s.length-1),r,"+transpose"))}i.push(new xr(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return Zn(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ln(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var i=Ge(e.doc,t),n=jt(i);return n!=i&&(t=Je(n)),es(!0,e,n,t,1)}function ns(e,t){var i=is(e,t.line),n=Ge(e.doc,i.line),r=fe(n,e.doc.direction);if(!r||0==r[0].level){var o=Math.max(i.ch,n.text.search(/\S/)),s=t.line==i.line&&t.ch<=o&&t.ch;return it(i.line,s?0:o,i.sticky)}return i}function rs(e,t,i){if("string"==typeof t&&!(t=ts[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),r=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}var os=new H;function ss(e,t,i,n){var r=e.state.keySeq;if(r){if(Ko(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:os.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),as(e,r+" "+t,i,n))return!0}return as(e,t,i,n)}function as(e,t,i,n){var r=function(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=qo(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&qo(t,e.options.extraKeys,i,e)||qo(t,e.options.keyMap,i,e)}(e,t,n);return"multi"==r&&(e.state.keySeq=t),"handled"==r&&ci(e,"keyHandled",e,t,i),"handled"!=r&&"multi"!=r||(xe(i),Cn(e)),!!r}function ls(e,t){var i=Yo(t,!0);return!!i&&(t.shiftKey&&!e.state.keySeq?ss(e,"Shift-"+i,t,function(t){return rs(e,t,!0)})||ss(e,i,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return rs(e,t)}):ss(e,i,t,function(t){return rs(e,t)}))}var cs=null;function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=R(O(t)),we(t,e)))){s&&a<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=ls(t,e);d&&(cs=r?n:null,!r&&88==n&&!Pe&&(w?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),i&&!w&&!r&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function i(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),ve(document,"keyup",i),ve(document,"mouseover",i))}T(t,"CodeMirror-crosshair"),me(document,"keyup",i),me(document,"mouseover",i)}(t)}}function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),we(this,e)}function ds(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||xi(t.display,e)||we(t,e)||e.ctrlKey&&!e.altKey||w&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(d&&i==cs)return cs=null,void xe(e);if(!d||e.which&&!(e.which<10)||!ls(t,e)){var r=String.fromCharCode(null==n?i:n);"\b"!=r&&(function(e,t,i){return ss(e,"'"+i+"'",t,function(t){return rs(e,t,!0)})}(t,e,r)||t.display.input.onKeyPress(e))}}}var fs,ps,ms=function(e,t,i){this.time=e,this.pos=t,this.button=i};function gs(e){var t=this,i=t.display;if(!(we(t,e)||i.activeTouch&&i.input.supportsTouch()))if(i.input.ensurePolled(),i.shift=e.shiftKey,xi(i,e))l||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));else if(!ws(t,e)){var n=cn(t,e),r=ke(e),o=n?function(e,t){var i=+new Date;return ps&&ps.compare(i,e,t)?(fs=ps=null,"triple"):fs&&fs.compare(i,e,t)?(ps=new ms(i,e,t),fs=null,"double"):(fs=new ms(i,e,t),ps=null,"single")}(n,r):"single";N(t).focus(),1==r&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,i,n,r){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),ss(e,Go(o=(1==t?"Left":2==t?"Middle":"Right")+o,r),r,function(t){if("string"==typeof t&&(t=ts[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,i)!=U}finally{e.state.suppressEdits=!1}return n})}(t,r,n,o,e)||(1==r?n?function(e,t,i,n){s?setTimeout(I(An,e),0):e.curOp.focus=R(O(e));var r,o=function(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(null==r.unit){var o=b?i.shiftKey&&i.metaKey:i.altKey;r.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||i.shiftKey),null==r.addNew&&(r.addNew=w?i.metaKey:i.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(w?i.altKey:i.ctrlKey)),r}(e,i,n),c=e.doc.sel;e.options.dragDrop&&Le&&!e.isReadOnly()&&"single"==i&&(r=c.contains(t))>-1&&(nt((r=c.ranges[r]).from(),t)<0||t.xRel>0)&&(nt(r.to(),t)>0||t.xRel<0)?function(e,t,i,n){var r=e.display,o=!1,c=er(e,function(t){l&&(r.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:xn(e)),ve(r.wrapper.ownerDocument,"mouseup",c),ve(r.wrapper.ownerDocument,"mousemove",h),ve(r.scroller,"dragstart",u),ve(r.scroller,"drop",c),o||(xe(t),n.addNew||Gr(e.doc,i,null,null,n.extend),l&&!f||s&&9==a?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),h=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},u=function(){return o=!0};l&&(r.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,me(r.wrapper.ownerDocument,"mouseup",c),me(r.wrapper.ownerDocument,"mousemove",h),me(r.scroller,"dragstart",u),me(r.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return r.input.focus()},20),r.scroller.dragDrop&&r.scroller.dragDrop()}(e,n,t,o):function(e,t,i,n){s&&xn(e);var r=e.display,o=e.doc;xe(t);var a,l,c=o.sel,h=c.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(i),a=l>-1?h[l]:new xr(i,i)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new xr(i,i)),i=cn(e,t,!0,!0),l=-1;else{var u=vs(e,i,n.unit);a=n.extend?Kr(a,u.anchor,u.head,n.extend):u}n.addNew?-1==l?(l=h.length,Zr(o,Er(e,h.concat([a]),l),{scroll:!1,origin:"*mouse"})):h.length>1&&h[l].empty()&&"char"==n.unit&&!n.extend?(Zr(o,Er(e,h.slice(0,l).concat(h.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Qr(o,l,a,K):(l=0,Zr(o,new Ar([a],0),K),c=o.sel);var d=i;function f(t){if(0!=nt(d,t))if(d=t,"rectangle"==n.unit){for(var r=[],s=e.options.tabSize,h=W(Ge(o,i.line).text,i.ch,s),u=W(Ge(o,t.line).text,t.ch,s),f=Math.min(h,u),p=Math.max(h,u),m=Math.min(i.line,t.line),g=Math.min(e.lastLine(),Math.max(i.line,t.line));m<=g;m++){var v=Ge(o,m).text,y=Y(v,f,s);f==p?r.push(new xr(it(m,y),it(m,y))):v.length>y&&r.push(new xr(it(m,y),it(m,Y(v,p,s))))}r.length||r.push(new xr(i,i)),Zr(o,Er(e,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,b=a,C=vs(e,t,n.unit),A=b.anchor;nt(C.anchor,A)>0?(w=C.head,A=at(b.from(),C.anchor)):(w=C.anchor,A=st(b.to(),C.head));var x=c.ranges.slice(0);x[l]=function(e,t){var i=t.anchor,n=t.head,r=Ge(e.doc,i.line);if(0==nt(i,n)&&i.sticky==n.sticky)return t;var o=fe(r);if(!o)return t;var s=ue(o,i.ch,i.sticky),a=o[s];if(a.from!=i.ch&&a.to!=i.ch)return t;var l,c=s+(a.from==i.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==e.doc.direction?1:-1)>0;else{var h=ue(o,n.ch,n.sticky),u=h-s||(n.ch-i.ch)*(1==a.level?-1:1);l=h==c-1||h==c?u<0:u>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return i.ch==p&&i.sticky==m?t:new xr(new it(i.line,p,m),n)}(e,new xr(ct(o,A),w)),Zr(o,Er(e,x,l),K)}}var p=r.wrapper.getBoundingClientRect(),m=0;function g(t){e.state.selectingText=!1,m=1/0,t&&(xe(t),r.input.focus()),ve(r.wrapper.ownerDocument,"mousemove",v),ve(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=er(e,function(t){0!==t.buttons&&ke(t)?function t(i){var s=++m,a=cn(e,i,!0,"rectangle"==n.unit);if(a)if(0!=nt(a,d)){e.curOp.focus=R(O(e)),f(a);var l=kn(r,o);(a.line>=l.to||a.line<l.from)&&setTimeout(er(e,function(){m==s&&t(i)}),150)}else{var c=i.clientY<p.top?-20:i.clientY>p.bottom?20:0;c&&setTimeout(er(e,function(){m==s&&(r.scroller.scrollTop+=c,t(i))}),50)}}(t):g(t)}),y=er(e,g);e.state.selectingText=y,me(r.wrapper.ownerDocument,"mousemove",v),me(r.wrapper.ownerDocument,"mouseup",y)}(e,n,t,o)}(t,n,o,e):Se(e)==i.scroller&&xe(e):2==r?(n&&Gr(t.doc,n),setTimeout(function(){return i.input.focus()},20)):3==r&&(E?t.display.input.onContextMenu(e):xn(t)))}}function vs(e,t,i){if("char"==i)return new xr(t,t);if("word"==i)return e.findWordAt(t);if("line"==i)return new xr(it(t.line,0),ct(e.doc,it(t.line+1,0)));var n=i(e,t);return new xr(n.from,n.to)}function ys(e,t,i,n){var r,o;if(t.touches)r=t.touches[0].clientX,o=t.touches[0].clientY;else try{r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&xe(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ce(e,i))return Fe(t);o-=a.top-s.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r){var h=Ze(e.doc,o),u=e.display.gutterSpecs[l];return ye(e,i,e,h,u.className,t),Fe(t)}}}function ws(e,t){return ys(e,t,"gutterClick",!0)}function bs(e,t){xi(e.display,t)||function(e,t){return!!Ce(e,"gutterContextMenu")&&ys(e,t,"gutterContextMenu",!1)}(e,t)||we(e,t,"contextmenu")||E||e.display.input.onContextMenu(t)}function Cs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wi(e)}ms.prototype.compare=function(e,t,i){return this.time+400>e&&0==nt(t,this.pos)&&i==this.button};var As={toString:function(){return"CodeMirror.Init"}},xs={},Es={};function Fs(e,t,i){var n=i&&i!=As;if(!t!=!n){var r=e.display.dragFunctions,o=t?me:ve;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function _s(e){e.options.lineWrapping?(T(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),ln(e),un(e),Wi(e),setTimeout(function(){return Wn(e)},100)}function Ss(e,t){var n=this;if(!(this instanceof Ss))return new Ss(e,t);this.options=t=t?j(t):{},j(xs,t,!1);var r=t.value;"string"==typeof r?r=new Lo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ss.inputStyles[t.inputStyle](this),c=this.display=new function(e,t,n,r){var o=this;this.input=n,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=L("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=L("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=L("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[c],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+V+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),h&&u>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||i&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=pr(r.gutters,r.lineNumbers),mr(o),n.init(o)}(e,r,o,t);for(var p in c.wrapper.CodeMirror=this,Cs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},t.autofocus&&!y&&c.input.focus(),s&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;me(t.scroller,"mousedown",er(e,gs)),me(t.scroller,"dblclick",s&&a<11?er(e,function(t){if(!we(e,t)){var i=cn(e,t);if(i&&!ws(e,t)&&!xi(e.display,t)){xe(t);var n=e.findWordAt(i);Gr(e.doc,n.anchor,n.head)}}}):function(t){return we(e,t)||xe(t)}),me(t.scroller,"contextmenu",function(t){return bs(e,t)}),me(t.input.getField(),"contextmenu",function(i){t.scroller.contains(i.target)||bs(e,i)});var i,n={end:0};function r(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var i=t.left-e.left,n=t.top-e.top;return i*i+n*n>400}me(t.scroller,"touchstart",function(r){if(!we(e,r)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(r)&&!ws(e,r)){t.input.ensurePolled(),clearTimeout(i);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==r.touches.length&&(t.activeTouch.left=r.touches[0].pageX,t.activeTouch.top=r.touches[0].pageY)}}),me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),me(t.scroller,"touchend",function(i){var n=t.activeTouch;if(n&&!xi(t,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var s,a=e.coordsChar(t.activeTouch,"page");s=!n.prev||o(n,n.prev)?new xr(a,a):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(a):new xr(it(a.line,0),ct(e.doc,it(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),xe(i)}r()}),me(t.scroller,"touchcancel",r),me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Mn(e,t.scroller.scrollTop),On(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))}),me(t.scroller,"mousewheel",function(t){return Cr(e,t)}),me(t.scroller,"DOMMouseScroll",function(t){return Cr(e,t)}),me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){we(e,t)||_e(t)},over:function(t){we(e,t)||(function(e,t){var i=cn(e,t);if(i){var n=document.createDocumentFragment();yn(e,i,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,n)}}(e,t),_e(t))},start:function(t){return function(e,t){if(s&&(!e.state.draggingText||+new Date-Bo<100))_e(t);else if(!we(e,t)&&!xi(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var i=$("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),d&&i.parentNode.removeChild(i)}}(e,t)},drop:er(e,Ro),leave:function(t){we(e,t)||To(e)}};var l=t.input.getField();me(l,"keyup",function(t){return us.call(e,t)}),me(l,"keydown",er(e,hs)),me(l,"keypress",er(e,ds)),me(l,"focus",function(t){return En(e,t)}),me(l,"blur",function(t){return Fn(e,t)})}(this),Oo(),qn(this),this.curOp.forceUpdate=!0,Mr(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&En(n)},20):Fn(this),Es)Es.hasOwnProperty(p)&&Es[p](this,t[p],As);fr(this),t.finishInit&&t.finishInit(this);for(var m=0;m<ks.length;++m)ks[m](this);Kn(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(c.lineDiv).textRendering&&(c.lineDiv.style.textRendering="auto")}Ss.defaults=xs,Ss.optionHandlers=Es;var ks=[];function Ds(e,t,i,n){var r,o=e.doc;null==i&&(i="add"),"smart"==i&&(o.mode.indent?r=mt(e,t).state:i="prev");var s=e.options.tabSize,a=Ge(o,t),l=W(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,h=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==i&&((c=o.mode.indent(r,a.text.slice(h.length),a.text))==U||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=t>o.first?W(Ge(o,t-1).text,null,s):0:"add"==i?c=l+e.options.indentUnit:"subtract"==i?c=l-e.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var u="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,u+="\t";if(d<c&&(u+=X(c-d)),u!=h)return mo(o,u,it(t,0),it(t,h.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<h.length){var g=it(t,h.length);Qr(o,p,new xr(g,g));break}}}Ss.defineInitHook=function(e){return ks.push(e)};var $s=null;function Ls(e){$s=e}function Bs(e,t,i,n,r){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var s=+new Date-200,a="paste"==r||e.state.pasteIncoming>s,l=Te(t),c=null;if(a&&n.ranges.length>1)if($s&&$s.text.join("\n")==t){if(n.ranges.length%$s.text.length==0){c=[];for(var h=0;h<$s.text.length;h++)c.push(o.splitLines($s.text[h]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=Z(l,function(e){return[e]}));for(var u=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],p=f.from(),m=f.to();f.empty()&&(i&&i>0?p=it(p.line,p.ch-i):e.state.overwrite&&!a?m=it(m.line,Math.min(Ge(o,m.line).text.length,m.ch+J(l).length)):a&&$s&&$s.lineWise&&$s.text.join("\n")==l.join("\n")&&(p=m=it(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:r||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};co(e.doc,g),ci(e,"inputRead",e,g)}t&&!a&&Ts(e,t),Ln(e),e.curOp.updateInput<2&&(e.curOp.updateInput=u),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Rs(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Zn(t,function(){return Bs(t,i,0,null,"paste")}),!0}function Ts(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var o=e.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Ds(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ge(e.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ds(e,r.head.line,"smart"));s&&ci(e,"electricInput",e,r.head.line)}}}function Ms(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,o={anchor:it(r,0),head:it(r+1,0)};i.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:i}}function Ps(e,t,i,n){e.setAttribute("autocorrect",i?"on":"off"),e.setAttribute("autocapitalize",n?"on":"off"),e.setAttribute("spellcheck",!!t)}function Os(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function Ns(e,t,i,n,r){var o=t,s=i,a=Ge(e,t.line),l=r&&"rtl"==e.direction?-i:i;function c(o){var s;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(c))s=null;else{var h=i>0?c>=55296&&c<56320:c>=56320&&c<57343;s=new it(t.line,Math.max(0,Math.min(a.text.length,t.ch+i*(h?2:1))),-i)}}else s=r?function(e,t,i,n){var r=fe(t,e.doc.direction);if(!r)return Zo(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=ue(r,i.ch,i.sticky),s=r[o];if("ltr"==e.doc.direction&&s.level%2==0&&(n>0?s.to>i.ch:s.from<i.ch))return Zo(t,i,n);var a,l=function(e,i){return Jo(t,e instanceof it?e.ch:e,i)},c=function(i){return e.options.lineWrapping?(a=a||Ri(e,t),Zi(e,t,a,i)):{begin:0,end:t.text.length}},h=c("before"==i.sticky?l(i,-1):i.ch);if("rtl"==e.doc.direction||1==s.level){var u=1==s.level==n<0,d=l(i,u?1:-1);if(null!=d&&(u?d<=s.to&&d<=h.end:d>=s.from&&d>=h.begin)){var f=u?"before":"after";return new it(i.line,d,f)}}var p=function(e,t,n){for(var o=function(e,t){return t?new it(i.line,l(e,1),"before"):new it(i.line,e,"after")};e>=0&&e<r.length;e+=t){var s=r[e],a=t>0==(1!=s.level),c=a?n.begin:l(n.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),n.begin<=c&&c<n.end)return o(c,a)}},m=p(o+n,n,h);if(m)return m;var g=n>0?h.end:l(h.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:r.length-1,n,c(g)))?null:m}(e.cm,a,t,i):Zo(a,t,i);if(null==s){if(o||!function(){var i=t.line+l;return!(i<e.first||i>=e.first+e.size)&&(t=new it(i,t.ch,t.sticky),a=Ge(e,i))}())return!1;t=es(r,e.cm,a,t.line,l)}else t=s;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var h=null,u="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(i<0)||c(!f);f=!1){var p=a.text.charAt(t.ch)||"\n",m=re(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||f||m||(m="s"),h&&h!=m){i<0&&(i=1,c(),t.sticky="after");break}if(m&&(h=m),i>0&&!c(!f))break}var g=oo(e,t,o,s,!0);return rt(o,g)&&(g.hitSide=!0),g}function Is(e,t,i,n){var r,o,s=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,N(e).innerHeight||s(e).documentElement.clientHeight),c=Math.max(l-.5*nn(e.display),3);r=(i>0?t.bottom:t.top)+i*c}else"line"==n&&(r=i>0?t.bottom+3:t.top-3);for(;(o=Xi(e,a,r)).outside;){if(i<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*i}return o}var js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ws(e,t){var i=Bi(e,t.line);if(!i||i.hidden)return null;var n=Ge(e.doc,t.line),r=$i(i,n,t.line),o=fe(n,e.doc.direction),s="left";if(o){var a=ue(o,t.ch);s=a%2?"right":"left"}var l=Oi(r.map,t.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function Hs(e,t){return t&&(e.bad=!0),e}function zs(e,t,i){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[i]))return Hs(e.clipPos(it(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var o=e.display.view[r];if(o.node==n)return Vs(o,t,i)}}function Vs(e,t,i){var n=e.text.firstChild,r=!1;if(!t||!B(n,t))return Hs(it(Je(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var o=e.rest?J(e.rest):e.line;return Hs(it(Je(o),o.text.length),r)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,i&&(i=s.nodeValue.length));a.parentNode!=n;)a=a.parentNode;var l=e.measure,c=l.maps;function h(t,i,n){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?l.map:c[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==i){var h=Je(r<0?e.line:e.rest[r]),u=o[s]+n;return(n<0||a!=t)&&(u=o[s+(n?1:0)]),it(h,u)}}}var u=h(s,a,i);if(u)return Hs(u,r);for(var d=a.nextSibling,f=s?s.nodeValue.length-i:0;d;d=d.nextSibling){if(u=h(d,d.firstChild,0))return Hs(it(u.line,u.ch-f),r);f+=d.textContent.length}for(var p=a.previousSibling,m=i;p;p=p.previousSibling){if(u=h(p,p.firstChild,-1))return Hs(it(u.line,u.ch+m),r);m+=p.textContent.length}}js.prototype.init=function(e){var t=this,i=this,n=i.cm,r=i.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function s(e){if(o(e)&&!we(n,e)){if(n.somethingSelected())Ls({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Ms(n);Ls({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,q),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var s=$s.text.join("\n");if(e.clipboardData.setData("Text",s),e.clipboardData.getData("Text")==s)return void e.preventDefault()}var a=Os(),l=a.firstChild;Ps(l),n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),l.value=$s.text.join("\n");var c=R(r.ownerDocument);P(l),setTimeout(function(){n.display.lineSpace.removeChild(a),c.focus(),c==r&&i.showPrimarySelection()},50)}}r.contentEditable=!0,Ps(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),me(r,"paste",function(e){!o(e)||we(n,e)||Rs(e,n)||a<=11&&setTimeout(er(n,function(){return t.updateFromDOM()}),20)}),me(r,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),me(r,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),me(r,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),me(r,"touchstart",function(){return i.forceCompositionEnd()}),me(r,"input",function(){t.composing||t.readFromDOMSoon()}),me(r,"copy",s),me(r,"cut",s)},js.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},js.prototype.prepareSelection=function(){var e=vn(this.cm,!1);return e.focus=R(this.div.ownerDocument)==this.div,e},js.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},js.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var s=zs(t,e.anchorNode,e.anchorOffset),a=zs(t,e.focusNode,e.focusOffset);if(!s||s.bad||!a||a.bad||0!=nt(at(s,a),r)||0!=nt(st(s,a),o)){var l=t.display.view,c=r.line>=t.display.viewFrom&&Ws(t,r)||{node:l[0].measure.map[2],offset:0},h=o.line<t.display.viewTo&&Ws(t,o);if(!h){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;h={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&h){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=_(c.node,c.offset,h.offset,h.node)}catch(e){}f&&(!i&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):i&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},js.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},js.prototype.showMultipleSelections=function(e){D(this.cm.display.cursorDiv,e.cursors),D(this.cm.display.selectionDiv,e.selection)},js.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},js.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return B(this.div,t)},js.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&R(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},js.prototype.blur=function(){this.div.blur()},js.prototype.getField=function(){return this.div},js.prototype.supportsTouch=function(){return!0},js.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Zn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},js.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},js.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&h&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var i=zs(t,e.anchorNode,e.anchorOffset),n=zs(t,e.focusNode,e.focusOffset);i&&n&&Zn(t,function(){Zr(t.doc,Fr(i,n),q),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},js.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,i,n=this.cm,r=n.display,o=n.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>n.firstLine()&&(s=it(s.line-1,Ge(n.doc,s.line-1).length)),a.ch==Ge(n.doc,a.line).text.length&&a.line<n.lastLine()&&(a=it(a.line+1,0)),s.line<r.viewFrom||a.line>r.viewTo-1)return!1;s.line==r.viewFrom||0==(e=hn(n,s.line))?(t=Je(r.view[0].line),i=r.view[0].node):(t=Je(r.view[e].line),i=r.view[e-1].node.nextSibling);var l,c,h=hn(n,a.line);if(h==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=Je(r.view[h+1].line)-1,c=r.view[h+1].node.previousSibling),!i)return!1;for(var u=n.doc.splitLines(function(e,t,i,n,r){var o="",s=!1,a=e.doc.lineSeparator(),l=!1;function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function h(e){e&&(c(),o+=e)}function u(t){if(1==t.nodeType){var i=t.getAttribute("cm-text");if(i)return void h(i);var o,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(it(n,0),it(r+1,0),function(e){return function(t){return t.id==e}}(+d));return void(f.length&&(o=f[0].find(0))&&h(Ye(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m<t.childNodes.length;m++)u(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(s=!0)}else 3==t.nodeType&&h(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;u(t),t!=i;)t=t.nextSibling,l=!1;return o}(n,i,c,t,l)),d=Ye(n.doc,it(t,0),it(l,Ge(n.doc,l).text.length));u.length>1&&d.length>1;)if(J(u)==J(d))u.pop(),d.pop(),l--;else{if(u[0]!=d[0])break;u.shift(),d.shift(),t++}for(var f=0,p=0,m=u[0],g=d[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=J(u),w=J(d),b=Math.min(y.length-(1==u.length?f:0),w.length-(1==d.length?f:0));p<b&&y.charCodeAt(y.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==u.length&&1==d.length&&t==s.line)for(;f&&f>s.ch&&y.charCodeAt(y.length-p-1)==w.charCodeAt(w.length-p-1);)f--,p++;u[u.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),u[0]=u[0].slice(f).replace(/\u200b+$/,"");var C=it(t,f),A=it(l,d.length?J(d).length-p:0);return u.length>1||u[0]||nt(C,A)?(mo(n.doc,u,C,A,"+input"),!0):void 0},js.prototype.ensurePolled=function(){this.forceCompositionEnd()},js.prototype.reset=function(){this.forceCompositionEnd()},js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zn(this.cm,function(){return un(e.cm)})},js.prototype.setUneditable=function(e){e.contentEditable="false"},js.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||er(this.cm,Bs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},js.prototype.onContextMenu=function(){},js.prototype.resetPosition=function(){},js.prototype.needsContentAttribute=!0;var Us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.hasSelection=!1,this.composing=null,this.resetting=!1};Us.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var r=this.textarea;function o(e){if(!we(n,e)){if(n.somethingSelected())Ls({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ms(n);Ls({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,q):(i.prevInput="",r.value=t.text.join("\n"),P(r))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(r.style.width="0px"),me(r,"input",function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),me(r,"paste",function(e){we(n,e)||Rs(e,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),me(r,"cut",o),me(r,"copy",o),me(e.scroller,"paste",function(t){if(!xi(e,t)&&!we(n,t)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,r.dispatchEvent(o)}}),me(e.lineSpace,"selectstart",function(t){xi(e,t)||xe(t)}),me(r,"compositionstart",function(){var e=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),me(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Us.prototype.createField=function(e){this.wrapper=Os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ps(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=vn(e);if(e.options.moveInputWithCursor){var r=Gi(e,i.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-o.left))}return n},Us.prototype.showSelection=function(e){var t=this.cm,i=t.display;D(i.cursorDiv,e.cursors),D(i.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&P(this.textarea),s&&a>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null));this.resetting=!1}},Us.prototype.getField=function(){return this.textarea},Us.prototype.supportsTouch=function(){return!1},Us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||R(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},Us.prototype.blur=function(){this.textarea.blur()},Us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Us.prototype.receivedFocus=function(){this.slowPoll()},Us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Us.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function i(){var n=t.poll();n||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,i))})},Us.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Me(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=i.value;if(r==n&&!t.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||w&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(n.length,r.length);l<c&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return Zn(t,function(){Bs(t,r.slice(l),n.length-l,null,e.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?i.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Us.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Us.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cn(i,e),c=n.scroller.scrollTop;if(o&&!d){var h=i.options.resetSelectionOnContextMenu;h&&-1==i.doc.sel.contains(o)&&er(i,Zr)(i.doc,Fr(o),q);var u,f=r.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=r.ownerDocument.defaultView.scrollY),n.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,u),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=y,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),s&&a>=9&&v(),E){_e(e);var g=function(){ve(window,"mouseup",g),setTimeout(y,20)};me(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=r.selectionStart){var e=i.somethingSelected(),o=""+(e?r.value:"");r.value="⇚",r.value=o,t.prevInput=e?"":"",r.selectionStart=1,r.selectionEnd=o.length,n.selForContextMenu=i.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,r.style.cssText=f,s&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!s||s&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==t.prevInput?er(i,ao)(i):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Us.prototype.setUneditable=function(){},Us.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function i(i,n,r,o){e.defaults[i]=n,r&&(t[i]=o?function(e,t,i){i!=As&&r(e,t,i)}:r)}e.defineOption=i,e.Init=As,i("value","",function(e,t){return e.setValue(t)},!0),i("mode",null,function(e,t){e.doc.modeOption=t,$r(e)},!0),i("indentUnit",2,$r,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(e){Lr(e),Wi(e),un(e)},!0),i("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var i=[],n=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,i.push(it(n,o))}n++});for(var r=i.length-1;r>=0;r--)mo(e.doc,t,i[r],it(i[r].line,i[r].ch+t.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,i){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),i!=As&&e.refresh()}),i("specialCharPlaceholder",ei,function(e){return e.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),i("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),i("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),i("rtlMoveVisually",!C),i("wholeLineUpdateBefore",!0),i("theme","default",function(e){Cs(e),gr(e)},!0),i("keyMap","default",function(e,t,i){var n=Qo(t),r=i!=As&&Qo(i);r&&r.detach&&r.detach(e,n),n.attach&&n.attach(e,r||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,_s,!0),i("gutters",[],function(e,t){e.display.gutterSpecs=pr(t,e.options.lineNumbers),gr(e)},!0),i("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?sn(e.display)+"px":"0",e.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(e){return Wn(e)},!0),i("scrollbarStyle","native",function(e){Vn(e),Wn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),i("lineNumbers",!1,function(e,t){e.display.gutterSpecs=pr(e.options.gutters,t),gr(e)},!0),i("firstLineNumber",1,gr,!0),i("lineNumberFormatter",function(e){return e},gr,!0),i("showCursorWhenSelecting",!1,gn,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(e,t){"nocursor"==t&&(Fn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),i("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),i("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),i("dragDrop",!0,Fs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,gn,!0),i("singleCursorHeightPerLine",!0,gn,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Lr,!0),i("addModeClass",!1,Lr,!0),i("pollInterval",100),i("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),i("historyEventDelay",1250),i("viewportMargin",10,function(e){return e.refresh()},!0),i("maxHighlightLength",1e4,Lr,!0),i("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),i("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),i("autofocus",null),i("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),i("phrases",null)}(Ss),function(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){N(this).focus(),this.display.input.focus()},setOption:function(e,i){var n=this.options,r=n[e];n[e]==i&&"mode"!=e||(n[e]=i,t.hasOwnProperty(e)&&er(this,t[e])(this,i,r),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,i=0;i<t.length;++i)if(t[i]==e||t[i].name==e)return t.splice(i,1),!0},addOverlay:tr(function(t,i){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,i){for(var n=0,r=i(t);n<e.length&&i(e[n])<=r;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:i&&i.opaque,priority:i&&i.priority||0},function(e){return e.priority}),this.state.modeGen++,un(this)}),removeOverlay:tr(function(e){for(var t=this.state.overlays,i=0;i<t.length;++i){var n=t[i].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(i,1),this.state.modeGen++,void un(this)}}),indentLine:tr(function(e,t,i){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),et(this.doc,e)&&Ds(this,e,t,i)}),indentSelection:tr(function(e){for(var t=this.doc.sel.ranges,i=-1,n=0;n<t.length;n++){var r=t[n];if(r.empty())r.head.line>i&&(Ds(this,r.head.line,e,!0),i=r.head.line,n==this.doc.sel.primIndex&&Ln(this));else{var o=r.from(),s=r.to(),a=Math.max(i,o.line);i=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<i;++l)Ds(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&Qr(this.doc,n,new xr(o,c[n].to()),q)}}}),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=ct(this.doc,e);var t,i=pt(this,Ge(this.doc,e.line)),n=0,r=(i.length-1)/2,o=e.ch;if(0==o)t=i[2];else for(;;){var s=n+r>>1;if((s?i[2*s-1]:0)>=o)r=s;else{if(!(i[2*s+1]<o)){t=i[2*s+2];break}n=s+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(t).state).mode:i},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!i.hasOwnProperty(t))return n;var r=i[t],o=this.getModeAt(e);if("string"==typeof o[t])r[o[t]]&&n.push(r[o[t]]);else if(o[t])for(var s=0;s<o[t].length;s++){var a=r[o[t][s]];a&&n.push(a)}else o.helperType&&r[o.helperType]?n.push(r[o.helperType]):r[o.name]&&n.push(r[o.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(o,this)&&-1==z(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var i=this.doc;return mt(this,(e=lt(i,null==e?i.first+i.size-1:e))+1,t).state},cursorCoords:function(e,t){var i=this.doc.sel.primary();return Gi(this,null==e?i.head:"object"==typeof e?ct(this.doc,e):e?i.from():i.to(),t||"page")},charCoords:function(e,t){return Ki(this,ct(this.doc,e),t||"page")},coordsChar:function(e,t){return Xi(this,(e=qi(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=qi(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,i){var n,r=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,r=!0),n=Ge(this.doc,e)}else n=e;return Ui(this,n,{top:0,left:0},t||"page",i||r).top+(r?this.doc.height-Ut(n):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,i,n,r){var o=this.display,s=(e=Gi(this,ct(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)s=e.top;else if("above"==n||"near"==n){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),i&&function(e,t){var i=Dn(e,t);null!=i.scrollTop&&Mn(e,i.scrollTop),null!=i.scrollLeft&&On(e,i.scrollLeft)}(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:tr(hs),triggerOnKeyPress:tr(ds),triggerOnKeyUp:us,triggerOnMouseDown:tr(gs),execCommand:function(e){if(ts.hasOwnProperty(e))return ts[e].call(null,this)},triggerElectric:tr(function(e){Ts(this,e)}),findPosH:function(e,t,i,n){var r=1;t<0&&(r=-1,t=-t);for(var o=ct(this.doc,e),s=0;s<t&&!(o=Ns(this.doc,o,r,i,n)).hitSide;++s);return o},moveH:tr(function(e,t){var i=this;this.extendSelectionsBy(function(n){return i.display.shift||i.doc.extend||n.empty()?Ns(i.doc,n.head,e,t,i.options.rtlMoveVisually):e<0?n.from():n.to()},G)}),deleteH:tr(function(e,t){var i=this.doc.sel,n=this.doc;i.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,function(i){var r=Ns(n,i.head,e,t,!1);return e<0?{from:r,to:i.head}:{from:i.head,to:r}})}),findPosV:function(e,t,i,n){var r=1,o=n;t<0&&(r=-1,t=-t);for(var s=ct(this.doc,e),a=0;a<t;++a){var l=Gi(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Is(this,l,r,i)).hitSide)break}return s},moveV:tr(function(e,t){var i=this,n=this.doc,r=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(s){if(o)return e<0?s.from():s.to();var a=Gi(i,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=Is(i,a,e,t);return"page"==t&&s==n.sel.primary()&&$n(i,Ki(i,l,"div").top-a.top),l},G),r.length)for(var s=0;s<n.sel.ranges.length;s++)n.sel.ranges[s].goalColumn=r[s]}),findWordAt:function(e){var t=this.doc,i=Ge(t,e.line).text,n=e.ch,r=e.ch;if(i){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=i.length||!n?++r:--n;for(var s=i.charAt(n),a=re(s,o)?function(e){return re(e,o)}:/\s/.test(s)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};n>0&&a(i.charAt(n-1));)--n;for(;r<i.length&&a(i.charAt(r));)++r}return new xr(it(e.line,n),it(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?T(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==R(O(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:tr(function(e,t){Bn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Si(this)-this.display.barHeight,width:e.scrollWidth-Si(this)-this.display.barWidth,clientHeight:Di(this),clientWidth:ki(this)}},scrollIntoView:tr(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Rn(e),e.curOp.scrollToPos=t}(this,e):Tn(this,e.from,e.to,e.margin)}),setSize:tr(function(e,t){var i=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&ji(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dn(i,r,"widget");break}++r}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(e){return Zn(this,e)},startOperation:function(){return qn(this)},endOperation:function(){return Kn(this)},refresh:tr(function(){var e=this.display.cachedTextHeight;un(this),this.curOp.forceUpdate=!0,Wi(this),Bn(this,this.doc.scrollLeft,this.doc.scrollTop),hr(this.display),(null==e||Math.abs(e-nn(this.display))>.5||this.options.lineWrapping)&&ln(this),ye(this,"refresh",this)}),swapDoc:tr(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mr(this,e),Wi(this),this.display.input.reset(),Bn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ci(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(t,n,r){i.hasOwnProperty(t)||(i[t]=e[t]={_global:[]}),i[t][n]=r},e.registerGlobalHelper=function(t,n,r,o){e.registerHelper(t,n,o),i[t]._global.push({pred:r,val:o})}}(Ss);var qs="iter insert remove copy getEditor constructor".split(" ");for(var Ks in Lo.prototype)Lo.prototype.hasOwnProperty(Ks)&&z(qs,Ks)<0&&(Ss.prototype[Ks]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lo.prototype[Ks]));return Ae(Lo),Ss.inputStyles={textarea:Us,contenteditable:js},Ss.defineMode=function(e){Ss.defaults.mode||"null"==e||(Ss.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}.apply(this,arguments)},Ss.defineMIME=function(e,t){Ie[e]=t},Ss.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ss.defineMIME("text/plain","null"),Ss.defineExtension=function(e,t){Ss.prototype[e]=t},Ss.defineDocExtension=function(e,t){Lo.prototype[e]=t},Ss.fromTextArea=function(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var i=R(e.ownerDocument);t.autofocus=i==e||null!=e.getAttribute("autofocus")&&i==document.body}function n(){e.value=a.getValue()}var r;if(e.form&&(me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var s=o.submit=function(){n(),o.submit=r,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(i){i.save=n,i.getTextArea=function(){return e},i.toTextArea=function(){i.toTextArea=isNaN,n(),e.parentNode.removeChild(i.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=r))}},e.style.display="none";var a=Ss(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a},function(e){e.off=ve,e.on=me,e.wheelEventPixels=br,e.Doc=Lo,e.splitLines=Te,e.countColumn=W,e.findColumn=Y,e.isWordChar=ne,e.Pass=U,e.signal=ye,e.Line=Gt,e.changeEnd=_r,e.scrollbarModel=zn,e.Pos=it,e.cmpPos=nt,e.modes=Ne,e.mimeModes=Ie,e.resolveMode=je,e.getMode=We,e.modeExtensions=He,e.extendMode=ze,e.copyState=Ve,e.startState=qe,e.innerMode=Ue,e.commands=ts,e.keyMap=zo,e.keyName=Yo,e.isModifierKey=Ko,e.lookupKey=qo,e.normalizeKeyMap=Uo,e.StringStream=Ke,e.SharedTextMarker=So,e.TextMarker=Fo,e.LineWidget=Ao,e.e_preventDefault=xe,e.e_stopPropagation=Ee,e.e_stop=_e,e.addClass=T,e.contains=B,e.rmClass=S,e.keyNames=Io}(Ss),Ss.version="5.65.12",Ss}()},m1cH:function(e,t,i){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(i("rfXi"));t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return(0,n.default)(e)}},"p77/":function(e,t,i){},qNmG:function(e,t,i){},rfXi:function(e,t,i){e.exports={default:i("0tVQ"),__esModule:!0}},"u/oj":function(e,t,i){"use strict";var n=i("8sUK");i.n(n).a}}]);