text: var QRCode,au=Object.defineProperty,lu=Object.defineProperties,uu=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,cu=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable,Zl=(_,ue,De)=>ue in _?au(_,ue,{enumerable:!0,configurable:!0,writable:!0,value:De}):_[ue]=De,Ht=(_,ue)=>{for(var De in ue||(ue={}))cu.call(ue,De)&&Zl(_,De,ue[De]);if(Jl)for(var De of Jl(ue))du.call(ue,De)&&Zl(_,De,ue[De]);return _},xl=(_,ue)=>lu(_,uu(ue));!function(_,ue){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=_.document?ue(_,!0):function(De){if(!De.document)throw new Error("jQuery requires a window with a document");return ue(De)}:ue(_)}("undefined"!=typeof window?window:this,function(_,ue){"use strict";var De=[],Be=Object.getPrototypeOf,Qe=De.slice,je=De.flat?function(u){return De.flat.call(u)}:function(u){return De.concat.apply([],u)},pe=De.push,xe=De.indexOf,$={},ye=$.toString,Z=$.hasOwnProperty,oe=Z.toString,fe=oe.call(Object),V={},z=function(u){return"function"==typeof u&&"number"!=typeof u.nodeType&&"function"!=typeof u.item},ke=function(u){return null!=u&&u===u.window},G=_.document,i={type:!0,src:!0,nonce:!0,noModule:!0};function f(u,p,k){var x,O,F=(k=k||G).createElement("script");if(F.text=u,p)for(x in i)(O=p[x]||p.getAttribute&&p.getAttribute(x))&&F.setAttribute(x,O);k.head.appendChild(F).parentNode.removeChild(F)}function o(u){return null==u?u+"":"object"==typeof u||"function"==typeof u?$[ye.call(u)]||"object":typeof u}var c="3.6.0",s=function(u,p){return new s.fn.init(u,p)};function g(u){var p=!!u&&"length"in u&&u.length,k=o(u);return!z(u)&&!ke(u)&&("array"===k||0===p||"number"==typeof p&&0<p&&p-1 in u)}s.fn=s.prototype={jquery:c,constructor:s,length:0,toArray:function(){return Qe.call(this)},get:function(u){return null==u?Qe.call(this):u<0?this[u+this.length]:this[u]},pushStack:function(u){var p=s.merge(this.constructor(),u);return p.prevObject=this,p},each:function(u){return s.each(this,u)},map:function(u){return this.pushStack(s.map(this,function(p,k){return u.call(p,k,p)}))},slice:function(){return this.pushStack(Qe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(s.grep(this,function(u,p){return(p+1)%2}))},odd:function(){return this.pushStack(s.grep(this,function(u,p){return p%2}))},eq:function(u){var p=this.length,k=+u+(u<0?p:0);return this.pushStack(0<=k&&k<p?[this[k]]:[])},end:function(){return this.prevObject||this.constructor()},push:pe,sort:De.sort,splice:De.splice},s.extend=s.fn.extend=function(){var u,p,k,x,O,F,I=arguments[0]||{},X=1,J=arguments.length,ie=!1;for("boolean"==typeof I&&(ie=I,I=arguments[X]||{},X++),"object"==typeof I||z(I)||(I={}),X===J&&(I=this,X--);X<J;X++)if(null!=(u=arguments[X]))for(p in u)x=u[p],"__proto__"!==p&&I!==x&&(ie&&x&&(s.isPlainObject(x)||(O=Array.isArray(x)))?(k=I[p],F=O&&!Array.isArray(k)?[]:O||s.isPlainObject(k)?k:{},O=!1,I[p]=s.extend(ie,F,x)):void 0!==x&&(I[p]=x));return I},s.extend({expando:"jQuery"+(c+Math.random()).replace(/\D/g,""),isReady:!0,error:function(u){throw new Error(u)},noop:function(){},isPlainObject:function(u){var p,k;return!(!u||"[object Object]"!==ye.call(u)||(p=Be(u))&&("function"!=typeof(k=Z.call(p,"constructor")&&p.constructor)||oe.call(k)!==fe))},isEmptyObject:function(u){var p;for(p in u)return!1;return!0},globalEval:function(u,p,k){f(u,{nonce:p&&p.nonce},k)},each:function(u,p){var k,x=0;if(g(u))for(k=u.length;x<k&&!1!==p.call(u[x],x,u[x]);x++);else for(x in u)if(!1===p.call(u[x],x,u[x]))break;return u},makeArray:function(u,p){var k=p||[];return null!=u&&(g(Object(u))?s.merge(k,"string"==typeof u?[u]:u):pe.call(k,u)),k},inArray:function(u,p,k){return null==p?-1:xe.call(p,u,k)},merge:function(u,p){for(var k=+p.length,x=0,O=u.length;x<k;x++)u[O++]=p[x];return u.length=O,u},grep:function(u,p,k){for(var x=[],O=0,F=u.length,I=!k;O<F;O++)!p(u[O],O)!==I&&x.push(u[O]);return x},map:function(u,p,k){var x,O,F=0,I=[];if(g(u))for(x=u.length;F<x;F++)null!=(O=p(u[F],F,k))&&I.push(O);else for(F in u)null!=(O=p(u[F],F,k))&&I.push(O);return je(I)},guid:1,support:V}),"function"==typeof Symbol&&(s.fn[Symbol.iterator]=De[Symbol.iterator]),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(u,p){$["[object "+p+"]"]=p.toLowerCase()});var m=function(u){var p,k,x,O,F,I,X,J,ie,me,Oe,U,ve,tt,ht,Ze,on,Ln,Ar,nn="sizzle"+1*new Date,St=u.document,kr=0,Dt=0,wn=Cs(),os=Cs(),Ur=Cs(),Fn=Cs(),hi=function(B,Y){return B===Y&&(Oe=!0),0},Sn={}.hasOwnProperty,dt=[],Kr=dt.pop,Qt=dt.push,bn=dt.push,ur=dt.slice,Xn=function(B,Y){for(var ne=0,Se=B.length;ne<Se;ne++)if(B[ne]===Y)return ne;return-1},er="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",wt="[\\x20\\t\\r\\n\\f]",Bt="(?:\\\\[\\da-fA-F]{1,6}"+wt+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",fn="\\["+wt+"*("+Bt+")(?:"+wt+"*([*^$|!~]?=)"+wt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Bt+"))|)"+wt+"*\\]",wr=":("+Bt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fn+")*)|.*)\\)|)",On=new RegExp(wt+"+","g"),br=new RegExp("^"+wt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+wt+"+$","g"),Wi=new RegExp("^"+wt+"*,"+wt+"*"),bs=new RegExp("^"+wt+"*([>+~]|"+wt+")"+wt+"*"),ca=new RegExp(wt+"|>"),xs=new RegExp(wr),fi=new RegExp("^"+Bt+"$"),zi={ID:new RegExp("^#("+Bt+")"),CLASS:new RegExp("^\\.("+Bt+")"),TAG:new RegExp("^("+Bt+"|[*])"),ATTR:new RegExp("^"+fn),PSEUDO:new RegExp("^"+wr),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+wt+"*(even|odd|(([+-]|)(\\d*)n|)"+wt+"*(?:([+-]|)"+wt+"*(\\d+)|))"+wt+"*\\)|)","i"),bool:new RegExp("^(?:"+er+")$","i"),needsContext:new RegExp("^"+wt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+wt+"*((?:-\\d)?\\d*)"+wt+"*\\)|)(?=[^-]|$)","i")},ho=/HTML$/i,Uo=/^(?:input|select|textarea|button)$/i,ei=/^h\d$/i,Gr=/^[^{]+\{\s*\[native \w/,pi=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,fo=/[+~]/,ti=new RegExp("\\\\[\\da-fA-F]{1,6}"+wt+"?|\\\\([^\\r\\n\\f])","g"),gi=function(B,Y){var ne="0x"+B.slice(1)-65536;return Y||(ne<0?String.fromCharCode(ne+65536):String.fromCharCode(ne>>10|55296,1023&ne|56320))},po=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,$s=function(B,Y){return Y?"\0"===B?"\ufffd":B.slice(0,-1)+"\\"+B.charCodeAt(B.length-1).toString(16)+" ":"\\"+B},qi=function(){U()},ni=Ui(function(B){return!0===B.disabled&&"fieldset"===B.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{bn.apply(dt=ur.call(St.childNodes),St.childNodes)}catch(B){bn={apply:dt.length?function(Y,ne){Qt.apply(Y,ur.call(ne))}:function(Y,ne){for(var Se=Y.length,he=0;Y[Se++]=ne[he++];);Y.length=Se-1}}}function Yt(B,Y,ne,Se){var he,Fe,Ie,We,$e,Ct,mt,gt=Y&&Y.ownerDocument,Lt=Y?Y.nodeType:9;if(ne=ne||[],"string"!=typeof B||!B||1!==Lt&&9!==Lt&&11!==Lt)return ne;if(!Se&&(U(Y),Y=Y||ve,ht)){if(11!==Lt&&($e=pi.exec(B)))if(he=$e[1]){if(9===Lt){if(!(Ie=Y.getElementById(he)))return ne;if(Ie.id===he)return ne.push(Ie),ne}else if(gt&&(Ie=gt.getElementById(he))&&Ar(Y,Ie)&&Ie.id===he)return ne.push(Ie),ne}else{if($e[2])return bn.apply(ne,Y.getElementsByTagName(B)),ne;if((he=$e[3])&&k.getElementsByClassName&&Y.getElementsByClassName)return bn.apply(ne,Y.getElementsByClassName(he)),ne}if(k.qsa&&!Fn[B+" "]&&(!Ze||!Ze.test(B))&&(1!==Lt||"object"!==Y.nodeName.toLowerCase())){if(mt=B,gt=Y,1===Lt&&(ca.test(B)||bs.test(B))){for((gt=fo.test(B)&&as(Y.parentNode)||Y)===Y&&k.scope||((We=Y.getAttribute("id"))?We=We.replace(po,$s):Y.setAttribute("id",We=nn)),Fe=(Ct=I(B)).length;Fe--;)Ct[Fe]=(We?"#"+We:":scope")+" "+ls(Ct[Fe]);mt=Ct.join(",")}try{return bn.apply(ne,gt.querySelectorAll(mt)),ne}catch(Jt){Fn(B,!0)}finally{We===nn&&Y.removeAttribute("id")}}}return J(B.replace(br,"$1"),Y,ne,Se)}function Cs(){var B=[];return function Y(ne,Se){return B.push(ne+" ")>x.cacheLength&&delete Y[B.shift()],Y[ne+" "]=Se}}function Xr(B){return B[nn]=!0,B}function Yr(B){var Y=ve.createElement("fieldset");try{return!!B(Y)}catch(ne){return!1}finally{Y.parentNode&&Y.parentNode.removeChild(Y),Y=null}}function go(B,Y){for(var ne=B.split("|"),Se=ne.length;Se--;)x.attrHandle[ne[Se]]=Y}function vo(B,Y){var ne=Y&&B,Se=ne&&1===B.nodeType&&1===Y.nodeType&&B.sourceIndex-Y.sourceIndex;if(Se)return Se;if(ne)for(;ne=ne.nextSibling;)if(ne===Y)return-1;return B?1:-1}function Ko(B){return function(Y){return"input"===Y.nodeName.toLowerCase()&&Y.type===B}}function Ts(B){return function(Y){var ne=Y.nodeName.toLowerCase();return("input"===ne||"button"===ne)&&Y.type===B}}function Mr(B){return function(Y){return"form"in Y?Y.parentNode&&!1===Y.disabled?"label"in Y?"label"in Y.parentNode?Y.parentNode.disabled===B:Y.disabled===B:Y.isDisabled===B||Y.isDisabled!==!B&&ni(Y)===B:Y.disabled===B:"label"in Y&&Y.disabled===B}}function vi(B){return Xr(function(Y){return Y=+Y,Xr(function(ne,Se){for(var he,Fe=B([],ne.length,Y),Ie=Fe.length;Ie--;)ne[he=Fe[Ie]]&&(ne[he]=!(Se[he]=ne[he]))})})}function as(B){return B&&void 0!==B.getElementsByTagName&&B}for(p in k=Yt.support={},F=Yt.isXML=function(B){var ne=B&&(B.ownerDocument||B).documentElement;return!ho.test(B&&B.namespaceURI||ne&&ne.nodeName||"HTML")},U=Yt.setDocument=function(B){var Y,ne,Se=B?B.ownerDocument||B:St;return Se!=ve&&9===Se.nodeType&&Se.documentElement&&(tt=(ve=Se).documentElement,ht=!F(ve),St!=ve&&(ne=ve.defaultView)&&ne.top!==ne&&(ne.addEventListener?ne.addEventListener("unload",qi,!1):ne.attachEvent&&ne.attachEvent("onunload",qi)),k.scope=Yr(function(he){return tt.appendChild(he).appendChild(ve.createElement("div")),void 0!==he.querySelectorAll&&!he.querySelectorAll(":scope fieldset div").length}),k.attributes=Yr(function(he){return he.className="i",!he.getAttribute("className")}),k.getElementsByTagName=Yr(function(he){return he.appendChild(ve.createComment("")),!he.getElementsByTagName("*").length}),k.getElementsByClassName=Gr.test(ve.getElementsByClassName),k.getById=Yr(function(he){return tt.appendChild(he).id=nn,!ve.getElementsByName||!ve.getElementsByName(nn).length}),k.getById?(x.filter.ID=function(he){var Fe=he.replace(ti,gi);return function(Ie){return Ie.getAttribute("id")===Fe}},x.find.ID=function(he,Fe){if(void 0!==Fe.getElementById&&ht){var Ie=Fe.getElementById(he);return Ie?[Ie]:[]}}):(x.filter.ID=function(he){var Fe=he.replace(ti,gi);return function(Ie){var We=void 0!==Ie.getAttributeNode&&Ie.getAttributeNode("id");return We&&We.value===Fe}},x.find.ID=function(he,Fe){if(void 0!==Fe.getElementById&&ht){var Ie,We,$e,Ct=Fe.getElementById(he);if(Ct){if((Ie=Ct.getAttributeNode("id"))&&Ie.value===he)return[Ct];for($e=Fe.getElementsByName(he),We=0;Ct=$e[We++];)if((Ie=Ct.getAttributeNode("id"))&&Ie.value===he)return[Ct]}return[]}}),x.find.TAG=k.getElementsByTagName?function(he,Fe){return void 0!==Fe.getElementsByTagName?Fe.getElementsByTagName(he):k.qsa?Fe.querySelectorAll(he):void 0}:function(he,Fe){var Ie,We=[],$e=0,Ct=Fe.getElementsByTagName(he);if("*"===he){for(;Ie=Ct[$e++];)1===Ie.nodeType&&We.push(Ie);return We}return Ct},x.find.CLASS=k.getElementsByClassName&&function(he,Fe){if(void 0!==Fe.getElementsByClassName&&ht)return Fe.getElementsByClassName(he)},on=[],Ze=[],(k.qsa=Gr.test(ve.querySelectorAll))&&(Yr(function(he){var Fe;tt.appendChild(he).innerHTML="<a id='"+nn+"'></a><select id='"+nn+"-\r\\' msallowcapture=''><option selected=''></option></select>",he.querySelectorAll("[msallowcapture^='']").length&&Ze.push("[*^$]="+wt+"*(?:''|\"\")"),he.querySelectorAll("[selected]").length||Ze.push("\\["+wt+"*(?:value|"+er+")"),he.querySelectorAll("[id~="+nn+"-]").length||Ze.push("~="),(Fe=ve.createElement("input")).setAttribute("name",""),he.appendChild(Fe),he.querySelectorAll("[name='']").length||Ze.push("\\["+wt+"*name"+wt+"*="+wt+"*(?:''|\"\")"),he.querySelectorAll(":checked").length||Ze.push(":checked"),he.querySelectorAll("a#"+nn+"+*").length||Ze.push(".#.+[+~]"),he.querySelectorAll("\\\f"),Ze.push("[\\r\\n\\f]")}),Yr(function(he){he.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var Fe=ve.createElement("input");Fe.setAttribute("type","hidden"),he.appendChild(Fe).setAttribute("name","D"),he.querySelectorAll("[name=d]").length&&Ze.push("name"+wt+"*[*^$|!~]?="),2!==he.querySelectorAll(":enabled").length&&Ze.push(":enabled",":disabled"),tt.appendChild(he).disabled=!0,2!==he.querySelectorAll(":disabled").length&&Ze.push(":enabled",":disabled"),he.querySelectorAll("*,:x"),Ze.push(",.*:")})),(k.matchesSelector=Gr.test(Ln=tt.matches||tt.webkitMatchesSelector||tt.mozMatchesSelector||tt.oMatchesSelector||tt.msMatchesSelector))&&Yr(function(he){k.disconnectedMatch=Ln.call(he,"*"),Ln.call(he,"[s!='']:x"),on.push("!=",wr)}),Ze=Ze.length&&new RegExp(Ze.join("|")),on=on.length&&new RegExp(on.join("|")),Y=Gr.test(tt.compareDocumentPosition),Ar=Y||Gr.test(tt.contains)?function(he,Fe){var Ie=9===he.nodeType?he.documentElement:he,We=Fe&&Fe.parentNode;return he===We||!(!We||1!==We.nodeType||!(Ie.contains?Ie.contains(We):he.compareDocumentPosition&&16&he.compareDocumentPosition(We)))}:function(he,Fe){if(Fe)for(;Fe=Fe.parentNode;)if(Fe===he)return!0;return!1},hi=Y?function(he,Fe){if(he===Fe)return Oe=!0,0;var Ie=!he.compareDocumentPosition-!Fe.compareDocumentPosition;return Ie||(1&(Ie=(he.ownerDocument||he)==(Fe.ownerDocument||Fe)?he.compareDocumentPosition(Fe):1)||!k.sortDetached&&Fe.compareDocumentPosition(he)===Ie?he==ve||he.ownerDocument==St&&Ar(St,he)?-1:Fe==ve||Fe.ownerDocument==St&&Ar(St,Fe)?1:me?Xn(me,he)-Xn(me,Fe):0:4&Ie?-1:1)}:function(he,Fe){if(he===Fe)return Oe=!0,0;var Ie,We=0,$e=he.parentNode,Ct=Fe.parentNode,mt=[he],gt=[Fe];if(!$e||!Ct)return he==ve?-1:Fe==ve?1:$e?-1:Ct?1:me?Xn(me,he)-Xn(me,Fe):0;if($e===Ct)return vo(he,Fe);for(Ie=he;Ie=Ie.parentNode;)mt.unshift(Ie);for(Ie=Fe;Ie=Ie.parentNode;)gt.unshift(Ie);for(;mt[We]===gt[We];)We++;return We?vo(mt[We],gt[We]):mt[We]==St?-1:gt[We]==St?1:0}),ve},Yt.matches=function(B,Y){return Yt(B,null,null,Y)},Yt.matchesSelector=function(B,Y){if(U(B),k.matchesSelector&&ht&&!Fn[Y+" "]&&(!on||!on.test(Y))&&(!Ze||!Ze.test(Y)))try{var ne=Ln.call(B,Y);if(ne||k.disconnectedMatch||B.document&&11!==B.document.nodeType)return ne}catch(Se){Fn(Y,!0)}return 0<Yt(Y,ve,null,[B]).length},Yt.contains=function(B,Y){return(B.ownerDocument||B)!=ve&&U(B),Ar(B,Y)},Yt.attr=function(B,Y){(B.ownerDocument||B)!=ve&&U(B);var ne=x.attrHandle[Y.toLowerCase()],Se=ne&&Sn.call(x.attrHandle,Y.toLowerCase())?ne(B,Y,!ht):void 0;return void 0!==Se?Se:k.attributes||!ht?B.getAttribute(Y):(Se=B.getAttributeNode(Y))&&Se.specified?Se.value:null},Yt.escape=function(B){return(B+"").replace(po,$s)},Yt.error=function(B){throw new Error("Syntax error, unrecognized expression: "+B)},Yt.uniqueSort=function(B){var Y,ne=[],Se=0,he=0;if(Oe=!k.detectDuplicates,me=!k.sortStable&&B.slice(0),B.sort(hi),Oe){for(;Y=B[he++];)Y===B[he]&&(Se=ne.push(he));for(;Se--;)B.splice(ne[Se],1)}return me=null,B},O=Yt.getText=function(B){var Y,ne="",Se=0,he=B.nodeType;if(he){if(1===he||9===he||11===he){if("string"==typeof B.textContent)return B.textContent;for(B=B.firstChild;B;B=B.nextSibling)ne+=O(B)}else if(3===he||4===he)return B.nodeValue}else for(;Y=B[Se++];)ne+=O(Y);return ne},(x=Yt.selectors={cacheLength:50,createPseudo:Xr,match:zi,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(B){return B[1]=B[1].replace(ti,gi),B[3]=(B[3]||B[4]||B[5]||"").replace(ti,gi),"~="===B[2]&&(B[3]=" "+B[3]+" "),B.slice(0,4)},CHILD:function(B){return B[1]=B[1].toLowerCase(),"nth"===B[1].slice(0,3)?(B[3]||Yt.error(B[0]),B[4]=+(B[4]?B[5]+(B[6]||1):2*("even"===B[3]||"odd"===B[3])),B[5]=+(B[7]+B[8]||"odd"===B[3])):B[3]&&Yt.error(B[0]),B},PSEUDO:function(B){var Y,ne=!B[6]&&B[2];return zi.CHILD.test(B[0])?null:(B[3]?B[2]=B[4]||B[5]||"":ne&&xs.test(ne)&&(Y=I(ne,!0))&&(Y=ne.indexOf(")",ne.length-Y)-ne.length)&&(B[0]=B[0].slice(0,Y),B[2]=ne.slice(0,Y)),B.slice(0,3))}},filter:{TAG:function(B){var Y=B.replace(ti,gi).toLowerCase();return"*"===B?function(){return!0}:function(ne){return ne.nodeName&&ne.nodeName.toLowerCase()===Y}},CLASS:function(B){var Y=wn[B+" "];return Y||(Y=new RegExp("(^|"+wt+")"+B+"("+wt+"|$)"))&&wn(B,function(ne){return Y.test("string"==typeof ne.className&&ne.className||void 0!==ne.getAttribute&&ne.getAttribute("class")||"")})},ATTR:function(B,Y,ne){return function(Se){var he=Yt.attr(Se,B);return null==he?"!="===Y:!Y||(he+="","="===Y?he===ne:"!="===Y?he!==ne:"^="===Y?ne&&0===he.indexOf(ne):"*="===Y?ne&&-1<he.indexOf(ne):"$="===Y?ne&&he.slice(-ne.length)===ne:"~="===Y?-1<(" "+he.replace(On," ")+" ").indexOf(ne):"|="===Y&&(he===ne||he.slice(0,ne.length+1)===ne+"-"))}},CHILD:function(B,Y,ne,Se,he){var Fe="nth"!==B.slice(0,3),Ie="last"!==B.slice(-4),We="of-type"===Y;return 1===Se&&0===he?function($e){return!!$e.parentNode}:function($e,Ct,mt){var gt,Lt,Jt,xt,Wt,an,pn=Fe!==Ie?"nextSibling":"previousSibling",Zt=$e.parentNode,ri=We&&$e.nodeName.toLowerCase(),Yn=!mt&&!We,mn=!1;if(Zt){if(Fe){for(;pn;){for(xt=$e;xt=xt[pn];)if(We?xt.nodeName.toLowerCase()===ri:1===xt.nodeType)return!1;an=pn="only"===B&&!an&&"nextSibling"}return!0}if(an=[Ie?Zt.firstChild:Zt.lastChild],Ie&&Yn){for(mn=(Wt=(gt=(Lt=(Jt=(xt=Zt)[nn]||(xt[nn]={}))[xt.uniqueID]||(Jt[xt.uniqueID]={}))[B]||[])[0]===kr&&gt[1])&&gt[2],xt=Wt&&Zt.childNodes[Wt];xt=++Wt&&xt&&xt[pn]||(mn=Wt=0)||an.pop();)if(1===xt.nodeType&&++mn&&xt===$e){Lt[B]=[kr,Wt,mn];break}}else if(Yn&&(mn=Wt=(gt=(Lt=(Jt=(xt=$e)[nn]||(xt[nn]={}))[xt.uniqueID]||(Jt[xt.uniqueID]={}))[B]||[])[0]===kr&&gt[1]),!1===mn)for(;(xt=++Wt&&xt&&xt[pn]||(mn=Wt=0)||an.pop())&&((We?xt.nodeName.toLowerCase()!==ri:1!==xt.nodeType)||!++mn||(Yn&&((Lt=(Jt=xt[nn]||(xt[nn]={}))[xt.uniqueID]||(Jt[xt.uniqueID]={}))[B]=[kr,mn]),xt!==$e)););return(mn-=he)===Se||mn%Se==0&&0<=mn/Se}}},PSEUDO:function(B,Y){var ne,Se=x.pseudos[B]||x.setFilters[B.toLowerCase()]||Yt.error("unsupported pseudo: "+B);return Se[nn]?Se(Y):1<Se.length?(ne=[B,B,"",Y],x.setFilters.hasOwnProperty(B.toLowerCase())?Xr(function(he,Fe){for(var Ie,We=Se(he,Y),$e=We.length;$e--;)he[Ie=Xn(he,We[$e])]=!(Fe[Ie]=We[$e])}):function(he){return Se(he,0,ne)}):Se}},pseudos:{not:Xr(function(B){var Y=[],ne=[],Se=X(B.replace(br,"$1"));return Se[nn]?Xr(function(he,Fe,Ie,We){for(var $e,Ct=Se(he,null,We,[]),mt=he.length;mt--;)($e=Ct[mt])&&(he[mt]=!(Fe[mt]=$e))}):function(he,Fe,Ie){return Y[0]=he,Se(Y,null,Ie,ne),Y[0]=null,!ne.pop()}}),has:Xr(function(B){return function(Y){return 0<Yt(B,Y).length}}),contains:Xr(function(B){return B=B.replace(ti,gi),function(Y){return-1<(Y.textContent||O(Y)).indexOf(B)}}),lang:Xr(function(B){return fi.test(B||"")||Yt.error("unsupported lang: "+B),B=B.replace(ti,gi).toLowerCase(),function(Y){var ne;do{if(ne=ht?Y.lang:Y.getAttribute("xml:lang")||Y.getAttribute("lang"))return(ne=ne.toLowerCase())===B||0===ne.indexOf(B+"-")}while((Y=Y.parentNode)&&1===Y.nodeType);return!1}}),target:function(B){var Y=u.location&&u.location.hash;return Y&&Y.slice(1)===B.id},root:function(B){return B===tt},focus:function(B){return B===ve.activeElement&&(!ve.hasFocus||ve.hasFocus())&&!!(B.type||B.href||~B.tabIndex)},enabled:Mr(!1),disabled:Mr(!0),checked:function(B){var Y=B.nodeName.toLowerCase();return"input"===Y&&!!B.checked||"option"===Y&&!!B.selected},selected:function(B){return!0===B.selected},empty:function(B){for(B=B.firstChild;B;B=B.nextSibling)if(B.nodeType<6)return!1;return!0},parent:function(B){return!x.pseudos.empty(B)},header:function(B){return ei.test(B.nodeName)},input:function(B){return Uo.test(B.nodeName)},button:function(B){var Y=B.nodeName.toLowerCase();return"input"===Y&&"button"===B.type||"button"===Y},text:function(B){var Y;return"input"===B.nodeName.toLowerCase()&&"text"===B.type&&(null==(Y=B.getAttribute("type"))||"text"===Y.toLowerCase())},first:vi(function(){return[0]}),last:vi(function(B,Y){return[Y-1]}),eq:vi(function(B,Y,ne){return[ne<0?ne+Y:ne]}),even:vi(function(B,Y){for(var ne=0;ne<Y;ne+=2)B.push(ne);return B}),odd:vi(function(B,Y){for(var ne=1;ne<Y;ne+=2)B.push(ne);return B}),lt:vi(function(B,Y,ne){for(var Se=ne<0?ne+Y:Y<ne?Y:ne;0<=--Se;)B.push(Se);return B}),gt:vi(function(B,Y,ne){for(var Se=ne<0?ne+Y:ne;++Se<Y;)B.push(Se);return B})}}).pseudos.nth=x.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[p]=Ko(p);for(p in{submit:!0,reset:!0})x.pseudos[p]=Ts(p);function mi(){}function ls(B){for(var Y=0,ne=B.length,Se="";Y<ne;Y++)Se+=B[Y].value;return Se}function Ui(B,Y,ne){var Se=Y.dir,he=Y.next,Fe=he||Se,Ie=ne&&"parentNode"===Fe,We=Dt++;return Y.first?function($e,Ct,mt){for(;$e=$e[Se];)if(1===$e.nodeType||Ie)return B($e,Ct,mt);return!1}:function($e,Ct,mt){var gt,Lt,Jt,xt=[kr,We];if(mt){for(;$e=$e[Se];)if((1===$e.nodeType||Ie)&&B($e,Ct,mt))return!0}else for(;$e=$e[Se];)if(1===$e.nodeType||Ie)if(Lt=(Jt=$e[nn]||($e[nn]={}))[$e.uniqueID]||(Jt[$e.uniqueID]={}),he&&he===$e.nodeName.toLowerCase())$e=$e[Se]||$e;else{if((gt=Lt[Fe])&&gt[0]===kr&&gt[1]===We)return xt[2]=gt[2];if((Lt[Fe]=xt)[2]=B($e,Ct,mt))return!0}return!1}}function Er(B){return 1<B.length?function(Y,ne,Se){for(var he=B.length;he--;)if(!B[he](Y,ne,Se))return!1;return!0}:B[0]}function Ss(B,Y,ne,Se,he){for(var Fe,Ie=[],We=0,$e=B.length,Ct=null!=Y;We<$e;We++)(Fe=B[We])&&(ne&&!ne(Fe,Se,he)||(Ie.push(Fe),Ct&&Y.push(We)));return Ie}function As(B,Y,ne,Se,he,Fe){return Se&&!Se[nn]&&(Se=As(Se)),he&&!he[nn]&&(he=As(he,Fe)),Xr(function(Ie,We,$e,Ct){var mt,gt,Lt,Jt=[],xt=[],Wt=We.length,an=Ie||function(ri,Yn,mn){for(var Pr=0,us=Yn.length;Pr<us;Pr++)Yt(ri,Yn[Pr],mn);return mn}(Y||"*",$e.nodeType?[$e]:$e,[]),pn=!B||!Ie&&Y?an:Ss(an,Jt,B,$e,Ct),Zt=ne?he||(Ie?B:Wt||Se)?[]:We:pn;if(ne&&ne(pn,Zt,$e,Ct),Se)for(mt=Ss(Zt,xt),Se(mt,[],$e,Ct),gt=mt.length;gt--;)(Lt=mt[gt])&&(Zt[xt[gt]]=!(pn[xt[gt]]=Lt));if(Ie){if(he||B){if(he){for(mt=[],gt=Zt.length;gt--;)(Lt=Zt[gt])&&mt.push(pn[gt]=Lt);he(null,Zt=[],mt,Ct)}for(gt=Zt.length;gt--;)(Lt=Zt[gt])&&-1<(mt=he?Xn(Ie,Lt):Jt[gt])&&(Ie[mt]=!(We[mt]=Lt))}}else Zt=Ss(Zt===We?Zt.splice(Wt,Zt.length):Zt),he?he(null,We,Zt,Ct):bn.apply(We,Zt)})}function Es(B){for(var Y,ne,Se,he=B.length,Fe=x.relative[B[0].type],Ie=Fe||x.relative[" "],We=Fe?1:0,$e=Ui(function(gt){return gt===Y},Ie,!0),Ct=Ui(function(gt){return-1<Xn(Y,gt)},Ie,!0),mt=[function(gt,Lt,Jt){var xt=!Fe&&(Jt||Lt!==ie)||((Y=Lt).nodeType?$e(gt,Lt,Jt):Ct(gt,Lt,Jt));return Y=null,xt}];We<he;We++)if(ne=x.relative[B[We].type])mt=[Ui(Er(mt),ne)];else{if((ne=x.filter[B[We].type].apply(null,B[We].matches))[nn]){for(Se=++We;Se<he&&!x.relative[B[Se].type];Se++);return As(1<We&&Er(mt),1<We&&ls(B.slice(0,We-1).concat({value:" "===B[We-2].type?"*":""})).replace(br,"$1"),ne,We<Se&&Es(B.slice(We,Se)),Se<he&&Es(B=B.slice(Se)),Se<he&&ls(B))}mt.push(ne)}return Er(mt)}return mi.prototype=x.filters=x.pseudos,x.setFilters=new mi,I=Yt.tokenize=function(B,Y){var ne,Se,he,Fe,Ie,We,$e,Ct=os[B+" "];if(Ct)return Y?0:Ct.slice(0);for(Ie=B,We=[],$e=x.preFilter;Ie;){for(Fe in ne&&!(Se=Wi.exec(Ie))||(Se&&(Ie=Ie.slice(Se[0].length)||Ie),We.push(he=[])),ne=!1,(Se=bs.exec(Ie))&&(ne=Se.shift(),he.push({value:ne,type:Se[0].replace(br," ")}),Ie=Ie.slice(ne.length)),x.filter)!(Se=zi[Fe].exec(Ie))||$e[Fe]&&!(Se=$e[Fe](Se))||(ne=Se.shift(),he.push({value:ne,type:Fe,matches:Se}),Ie=Ie.slice(ne.length));if(!ne)break}return Y?Ie.length:Ie?Yt.error(B):os(B,We).slice(0)},X=Yt.compile=function(B,Y){var ne,Se,he,Fe,Ie,We,$e=[],Ct=[],mt=Ur[B+" "];if(!mt){for(Y||(Y=I(B)),ne=Y.length;ne--;)(mt=Es(Y[ne]))[nn]?$e.push(mt):Ct.push(mt);(mt=Ur(B,(Se=Ct,Fe=0<(he=$e).length,Ie=0<Se.length,We=function(gt,Lt,Jt,xt,Wt){var an,pn,Zt,ri=0,Yn="0",mn=gt&&[],Pr=[],us=ie,ii=gt||Ie&&x.find.TAG("*",Wt),Go=kr+=null==us?1:Math.random()||.1,mo=ii.length;for(Wt&&(ie=Lt==ve||Lt||Wt);Yn!==mo&&null!=(an=ii[Yn]);Yn++){if(Ie&&an){for(pn=0,Lt||an.ownerDocument==ve||(U(an),Jt=!ht);Zt=Se[pn++];)if(Zt(an,Lt||ve,Jt)){xt.push(an);break}Wt&&(kr=Go)}Fe&&((an=!Zt&&an)&&ri--,gt&&mn.push(an))}if(ri+=Yn,Fe&&Yn!==ri){for(pn=0;Zt=he[pn++];)Zt(mn,Pr,Lt,Jt);if(gt){if(0<ri)for(;Yn--;)mn[Yn]||Pr[Yn]||(Pr[Yn]=Kr.call(xt));Pr=Ss(Pr)}bn.apply(xt,Pr),Wt&&!gt&&0<Pr.length&&1<ri+he.length&&Yt.uniqueSort(xt)}return Wt&&(kr=Go,ie=us),mn},Fe?Xr(We):We))).selector=B}return mt},J=Yt.select=function(B,Y,ne,Se){var he,Fe,Ie,We,$e,Ct="function"==typeof B&&B,mt=!Se&&I(B=Ct.selector||B);if(ne=ne||[],1===mt.length){if(2<(Fe=mt[0]=mt[0].slice(0)).length&&"ID"===(Ie=Fe[0]).type&&9===Y.nodeType&&ht&&x.relative[Fe[1].type]){if(!(Y=(x.find.ID(Ie.matches[0].replace(ti,gi),Y)||[])[0]))return ne;Ct&&(Y=Y.parentNode),B=B.slice(Fe.shift().value.length)}for(he=zi.needsContext.test(B)?0:Fe.length;he--&&!x.relative[We=(Ie=Fe[he]).type];)if(($e=x.find[We])&&(Se=$e(Ie.matches[0].replace(ti,gi),fo.test(Fe[0].type)&&as(Y.parentNode)||Y))){if(Fe.splice(he,1),!(B=Se.length&&ls(Fe)))return bn.apply(ne,Se),ne;break}}return(Ct||X(B,mt))(Se,Y,!ht,ne,!Y||fo.test(B)&&as(Y.parentNode)||Y),ne},k.sortStable=nn.split("").sort(hi).join("")===nn,k.detectDuplicates=!!Oe,U(),k.sortDetached=Yr(function(B){return 1&B.compareDocumentPosition(ve.createElement("fieldset"))}),Yr(function(B){return B.innerHTML="<a href='#'></a>","#"===B.firstChild.getAttribute("href")})||go("type|href|height|width",function(B,Y,ne){if(!ne)return B.getAttribute(Y,"type"===Y.toLowerCase()?1:2)}),k.attributes&&Yr(function(B){return B.innerHTML="<input/>",B.firstChild.setAttribute("value",""),""===B.firstChild.getAttribute("value")})||go("value",function(B,Y,ne){if(!ne&&"input"===B.nodeName.toLowerCase())return B.defaultValue}),Yr(function(B){return null==B.getAttribute("disabled")})||go(er,function(B,Y,ne){var Se;if(!ne)return!0===B[Y]?Y.toLowerCase():(Se=B.getAttributeNode(Y))&&Se.specified?Se.value:null}),Yt}(_);s.find=m,s.expr=m.selectors,s.expr[":"]=s.expr.pseudos,s.uniqueSort=s.unique=m.uniqueSort,s.text=m.getText,s.isXMLDoc=m.isXML,s.contains=m.contains,s.escapeSelector=m.escape;var A=function(u,p,k){for(var x=[],O=void 0!==k;(u=u[p])&&9!==u.nodeType;)if(1===u.nodeType){if(O&&s(u).is(k))break;x.push(u)}return x},E=function(u,p){for(var k=[];u;u=u.nextSibling)1===u.nodeType&&u!==p&&k.push(u);return k},T=s.expr.match.needsContext;function j(u,p){return u.nodeName&&u.nodeName.toLowerCase()===p.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(u,p,k){return z(p)?s.grep(u,function(x,O){return!!p.call(x,O,x)!==k}):p.nodeType?s.grep(u,function(x){return x===p!==k}):"string"!=typeof p?s.grep(u,function(x){return-1<xe.call(p,x)!==k}):s.filter(p,u,k)}s.filter=function(u,p,k){var x=p[0];return k&&(u=":not("+u+")"),1===p.length&&1===x.nodeType?s.find.matchesSelector(x,u)?[x]:[]:s.find.matches(u,s.grep(p,function(O){return 1===O.nodeType}))},s.fn.extend({find:function(u){var p,k,x=this.length,O=this;if("string"!=typeof u)return this.pushStack(s(u).filter(function(){for(p=0;p<x;p++)if(s.contains(O[p],this))return!0}));for(k=this.pushStack([]),p=0;p<x;p++)s.find(u,O[p],k);return 1<x?s.uniqueSort(k):k},filter:function(u){return this.pushStack(N(this,u||[],!1))},not:function(u){return this.pushStack(N(this,u||[],!0))},is:function(u){return!!N(this,"string"==typeof u&&T.test(u)?s(u):u||[],!1).length}});var te,Q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(s.fn.init=function(u,p,k){var x,O;if(!u)return this;if(k=k||te,"string"==typeof u){if(!(x="<"===u[0]&&">"===u[u.length-1]&&3<=u.length?[null,u,null]:Q.exec(u))||!x[1]&&p)return!p||p.jquery?(p||k).find(u):this.constructor(p).find(u);if(x[1]){if(s.merge(this,s.parseHTML(x[1],(p=p instanceof s?p[0]:p)&&p.nodeType?p.ownerDocument||p:G,!0)),M.test(x[1])&&s.isPlainObject(p))for(x in p)z(this[x])?this[x](p[x]):this.attr(x,p[x]);return this}return(O=G.getElementById(x[2]))&&(this[0]=O,this.length=1),this}return u.nodeType?(this[0]=u,this.length=1,this):z(u)?void 0!==k.ready?k.ready(u):u(s):s.makeArray(u,this)}).prototype=s.fn,te=s(G);var ae=/^(?:parents|prev(?:Until|All))/,le={children:!0,contents:!0,next:!0,prev:!0};function Re(u,p){for(;(u=u[p])&&1!==u.nodeType;);return u}s.fn.extend({has:function(u){var p=s(u,this),k=p.length;return this.filter(function(){for(var x=0;x<k;x++)if(s.contains(this,p[x]))return!0})},closest:function(u,p){var k,x=0,O=this.length,F=[],I="string"!=typeof u&&s(u);if(!T.test(u))for(;x<O;x++)for(k=this[x];k&&k!==p;k=k.parentNode)if(k.nodeType<11&&(I?-1<I.index(k):1===k.nodeType&&s.find.matchesSelector(k,u))){F.push(k);break}return this.pushStack(1<F.length?s.uniqueSort(F):F)},index:function(u){return u?"string"==typeof u?xe.call(s(u),this[0]):xe.call(this,u.jquery?u[0]:u):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(u,p){return this.pushStack(s.uniqueSort(s.merge(this.get(),s(u,p))))},addBack:function(u){return this.add(null==u?this.prevObject:this.prevObject.filter(u))}}),s.each({parent:function(u){var p=u.parentNode;return p&&11!==p.nodeType?p:null},parents:function(u){return A(u,"parentNode")},parentsUntil:function(u,p,k){return A(u,"parentNode",k)},next:function(u){return Re(u,"nextSibling")},prev:function(u){return Re(u,"previousSibling")},nextAll:function(u){return A(u,"nextSibling")},prevAll:function(u){return A(u,"previousSibling")},nextUntil:function(u,p,k){return A(u,"nextSibling",k)},prevUntil:function(u,p,k){return A(u,"previousSibling",k)},siblings:function(u){return E((u.parentNode||{}).firstChild,u)},children:function(u){return E(u.firstChild)},contents:function(u){return null!=u.contentDocument&&Be(u.contentDocument)?u.contentDocument:(j(u,"template")&&(u=u.content||u),s.merge([],u.childNodes))}},function(u,p){s.fn[u]=function(k,x){var O=s.map(this,p,k);return"Until"!==u.slice(-5)&&(x=k),x&&"string"==typeof x&&(O=s.filter(x,O)),1<this.length&&(le[u]||s.uniqueSort(O),ae.test(u)&&O.reverse()),this.pushStack(O)}});var et=/[^\x20\t\r\n\f]+/g;function Ve(u){return u}function Ge(u){throw u}function jt(u,p,k,x){var O;try{u&&z(O=u.promise)?O.call(u).done(p).fail(k):u&&z(O=u.then)?O.call(u,p,k):p.apply(void 0,[u].slice(x))}catch(F){k.apply(void 0,[F])}}s.Callbacks=function(u){var k;u="string"==typeof u?(k={},s.each(u.match(et)||[],function(U,ve){k[ve]=!0}),k):s.extend({},u);var x,O,F,I,X=[],J=[],ie=-1,me=function(){for(I=I||u.once,F=x=!0;J.length;ie=-1)for(O=J.shift();++ie<X.length;)!1===X[ie].apply(O[0],O[1])&&u.stopOnFalse&&(ie=X.length,O=!1);u.memory||(O=!1),x=!1,I&&(X=O?[]:"")},Oe={add:function(){return X&&(O&&!x&&(ie=X.length-1,J.push(O)),function U(ve){s.each(ve,function(tt,ht){z(ht)?u.unique&&Oe.has(ht)||X.push(ht):ht&&ht.length&&"string"!==o(ht)&&U(ht)})}(arguments),O&&!x&&me()),this},remove:function(){return s.each(arguments,function(U,ve){for(var tt;-1<(tt=s.inArray(ve,X,tt));)X.splice(tt,1),tt<=ie&&ie--}),this},has:function(U){return U?-1<s.inArray(U,X):0<X.length},empty:function(){return X&&(X=[]),this},disable:function(){return I=J=[],X=O="",this},disabled:function(){return!X},lock:function(){return I=J=[],O||x||(X=O=""),this},locked:function(){return!!I},fireWith:function(U,ve){return I||(ve=[U,(ve=ve||[]).slice?ve.slice():ve],J.push(ve),x||me()),this},fire:function(){return Oe.fireWith(this,arguments),this},fired:function(){return!!F}};return Oe},s.extend({Deferred:function(u){var p=[["notify","progress",s.Callbacks("memory"),s.Callbacks("memory"),2],["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),0,"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),1,"rejected"]],k="pending",x={state:function(){return k},always:function(){return O.done(arguments).fail(arguments),this},catch:function(F){return x.then(null,F)},pipe:function(){var F=arguments;return s.Deferred(function(I){s.each(p,function(X,J){var ie=z(F[J[4]])&&F[J[4]];O[J[1]](function(){var me=ie&&ie.apply(this,arguments);me&&z(me.promise)?me.promise().progress(I.notify).done(I.resolve).fail(I.reject):I[J[0]+"With"](this,ie?[me]:arguments)})}),F=null}).promise()},then:function(F,I,X){var J=0;function ie(me,Oe,U,ve){return function(){var tt=this,ht=arguments,Ze=function(){var Ln,Ar;if(!(me<J)){if((Ln=U.apply(tt,ht))===Oe.promise())throw new TypeError("Thenable self-resolution");z(Ar=Ln&&("object"==typeof Ln||"function"==typeof Ln)&&Ln.then)?ve?Ar.call(Ln,ie(J,Oe,Ve,ve),ie(J,Oe,Ge,ve)):(J++,Ar.call(Ln,ie(J,Oe,Ve,ve),ie(J,Oe,Ge,ve),ie(J,Oe,Ve,Oe.notifyWith))):(U!==Ve&&(tt=void 0,ht=[Ln]),(ve||Oe.resolveWith)(tt,ht))}},on=ve?Ze:function(){try{Ze()}catch(Ln){s.Deferred.exceptionHook&&s.Deferred.exceptionHook(Ln,on.stackTrace),J<=me+1&&(U!==Ge&&(tt=void 0,ht=[Ln]),Oe.rejectWith(tt,ht))}};me?on():(s.Deferred.getStackHook&&(on.stackTrace=s.Deferred.getStackHook()),_.setTimeout(on))}}return s.Deferred(function(me){p[0][3].add(ie(0,me,z(X)?X:Ve,me.notifyWith)),p[1][3].add(ie(0,me,z(F)?F:Ve)),p[2][3].add(ie(0,me,z(I)?I:Ge))}).promise()},promise:function(F){return null!=F?s.extend(F,x):x}},O={};return s.each(p,function(F,I){var X=I[2],J=I[5];x[I[1]]=X.add,J&&X.add(function(){k=J},p[3-F][2].disable,p[3-F][3].disable,p[0][2].lock,p[0][3].lock),X.add(I[3].fire),O[I[0]]=function(){return O[I[0]+"With"](this===O?void 0:this,arguments),this},O[I[0]+"With"]=X.fireWith}),x.promise(O),u&&u.call(O,O),O},when:function(u){var p=arguments.length,k=p,x=Array(k),O=Qe.call(arguments),F=s.Deferred(),I=function(X){return function(J){x[X]=this,O[X]=1<arguments.length?Qe.call(arguments):J,--p||F.resolveWith(x,O)}};if(p<=1&&(jt(u,F.done(I(k)).resolve,F.reject,!p),"pending"===F.state()||z(O[k]&&O[k].then)))return F.then();for(;k--;)jt(O[k],I(k),F.reject);return F.promise()}});var Tt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;s.Deferred.exceptionHook=function(u,p){_.console&&_.console.warn&&u&&Tt.test(u.name)&&_.console.warn("jQuery.Deferred exception: "+u.message,u.stack,p)},s.readyException=function(u){_.setTimeout(function(){throw u})};var Le=s.Deferred();function Xe(){G.removeEventListener("DOMContentLoaded",Xe),_.removeEventListener("load",Xe),s.ready()}s.fn.ready=function(u){return Le.then(u).catch(function(p){s.readyException(p)}),this},s.extend({isReady:!1,readyWait:1,ready:function(u){(!0===u?--s.readyWait:s.isReady)||(s.isReady=!0)!==u&&0<--s.readyWait||Le.resolveWith(G,[s])}}),s.ready.then=Le.then,"complete"===G.readyState||"loading"!==G.readyState&&!G.documentElement.doScroll?_.setTimeout(s.ready):(G.addEventListener("DOMContentLoaded",Xe),_.addEventListener("load",Xe));var ot=function(u,p,k,x,O,F,I){var X=0,J=u.length,ie=null==k;if("object"===o(k))for(X in O=!0,k)ot(u,p,X,k[X],!0,F,I);else if(void 0!==x&&(O=!0,z(x)||(I=!0),ie&&(I?(p.call(u,x),p=null):(ie=p,p=function(me,Oe,U){return ie.call(s(me),U)})),p))for(;X<J;X++)p(u[X],k,I?x:x.call(u[X],X,p(u[X],k)));return O?u:ie?p.call(u):J?p(u[0],k):F},ft=/^-ms-/,_t=/-([a-z])/g;function _e(u,p){return p.toUpperCase()}function Et(u){return u.replace(ft,"ms-").replace(_t,_e)}var zt=function(u){return 1===u.nodeType||9===u.nodeType||!+u.nodeType};function un(){this.expando=s.expando+un.uid++}un.uid=1,un.prototype={cache:function(u){var p=u[this.expando];return p||(p={},zt(u)&&(u.nodeType?u[this.expando]=p:Object.defineProperty(u,this.expando,{value:p,configurable:!0}))),p},set:function(u,p,k){var x,O=this.cache(u);if("string"==typeof p)O[Et(p)]=k;else for(x in p)O[Et(x)]=p[x];return O},get:function(u,p){return void 0===p?this.cache(u):u[this.expando]&&u[this.expando][Et(p)]},access:function(u,p,k){return void 0===p||p&&"string"==typeof p&&void 0===k?this.get(u,p):(this.set(u,p,k),void 0!==k?k:p)},remove:function(u,p){var k,x=u[this.expando];if(void 0!==x){if(void 0!==p)for((k=(p=Array.isArray(p)?p.map(Et):(p=Et(p))in x?[p]:p.match(et)||[]).length);k--;)delete x[p[k]];(void 0===p||s.isEmptyObject(x))&&(u.nodeType?u[this.expando]=void 0:delete u[this.expando])}},hasData:function(u){var p=u[this.expando];return void 0!==p&&!s.isEmptyObject(p)}};var we=new un,yt=new un,sn=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Cn=/[A-Z]/g;function ze(u,p,k){var x,O;if(void 0===k&&1===u.nodeType)if(x="data-"+p.replace(Cn,"-$&").toLowerCase(),"string"==typeof(k=u.getAttribute(x))){try{k="true"===(O=k)||"false"!==O&&("null"===O?null:O===+O+""?+O:sn.test(O)?JSON.parse(O):O)}catch(F){}yt.set(u,p,k)}else k=void 0;return k}s.extend({hasData:function(u){return yt.hasData(u)||we.hasData(u)},data:function(u,p,k){return yt.access(u,p,k)},removeData:function(u,p){yt.remove(u,p)},_data:function(u,p,k){return we.access(u,p,k)},_removeData:function(u,p){we.remove(u,p)}}),s.fn.extend({data:function(u,p){var k,x,O,F=this[0],I=F&&F.attributes;if(void 0===u){if(this.length&&(O=yt.get(F),1===F.nodeType&&!we.get(F,"hasDataAttrs"))){for(k=I.length;k--;)I[k]&&0===(x=I[k].name).indexOf("data-")&&(x=Et(x.slice(5)),ze(F,x,O[x]));we.set(F,"hasDataAttrs",!0)}return O}return"object"==typeof u?this.each(function(){yt.set(this,u)}):ot(this,function(X){var J;if(F&&void 0===X)return void 0!==(J=yt.get(F,u))||void 0!==(J=ze(F,u))?J:void 0;this.each(function(){yt.set(this,u,X)})},null,p,1<arguments.length,null,!0)},removeData:function(u){return this.each(function(){yt.remove(this,u)})}}),s.extend({queue:function(u,p,k){var x;if(u)return x=we.get(u,p=(p||"fx")+"queue"),k&&(!x||Array.isArray(k)?x=we.access(u,p,s.makeArray(k)):x.push(k)),x||[]},dequeue:function(u,p){var k=s.queue(u,p=p||"fx"),x=k.length,O=k.shift(),F=s._queueHooks(u,p);"inprogress"===O&&(O=k.shift(),x--),O&&("fx"===p&&k.unshift("inprogress"),delete F.stop,O.call(u,function(){s.dequeue(u,p)},F)),!x&&F&&F.empty.fire()},_queueHooks:function(u,p){var k=p+"queueHooks";return we.get(u,k)||we.access(u,k,{empty:s.Callbacks("once memory").add(function(){we.remove(u,[p+"queue",k])})})}}),s.fn.extend({queue:function(u,p){var k=2;return"string"!=typeof u&&(p=u,u="fx",k--),arguments.length<k?s.queue(this[0],u):void 0===p?this:this.each(function(){var x=s.queue(this,u,p);s._queueHooks(this,u),"fx"===u&&"inprogress"!==x[0]&&s.dequeue(this,u)})},dequeue:function(u){return this.each(function(){s.dequeue(this,u)})},clearQueue:function(u){return this.queue(u||"fx",[])},promise:function(u,p){var k,x=1,O=s.Deferred(),F=this,I=this.length,X=function(){--x||O.resolveWith(F,[F])};for("string"!=typeof u&&(p=u,u=void 0),u=u||"fx";I--;)(k=we.get(F[I],u+"queueHooks"))&&k.empty&&(x++,k.empty.add(X));return X(),O.promise(p)}});var Ci=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,qt=new RegExp("^(?:([+-])=|)("+Ci+")([a-z%]*)$","i"),de=["Top","Right","Bottom","Left"],Pe=G.documentElement,ge=function(u){return s.contains(u.ownerDocument,u)},bt={composed:!0};Pe.getRootNode&&(ge=function(u){return s.contains(u.ownerDocument,u)||u.getRootNode(bt)===u.ownerDocument});var Xt=function(u,p){return"none"===(u=p||u).style.display||""===u.style.display&&ge(u)&&"none"===s.css(u,"display")};function gn(u,p,k,x){var O,F,I=20,X=x?function(){return x.cur()}:function(){return s.css(u,p,"")},J=X(),ie=k&&k[3]||(s.cssNumber[p]?"":"px"),me=u.nodeType&&(s.cssNumber[p]||"px"!==ie&&+J)&&qt.exec(s.css(u,p));if(me&&me[3]!==ie){for(ie=ie||me[3],me=+(J/=2)||1;I--;)s.style(u,p,me+ie),(1-F)*(1-(F=X()/J||.5))<=0&&(I=0),me/=F;s.style(u,p,(me*=2)+ie),k=k||[]}return k&&(me=+me||+J||0,O=k[1]?me+(k[1]+1)*k[2]:+k[2],x&&(x.unit=ie,x.start=me,x.end=O)),O}var Mi={};function kn(u,p){for(var k,x,O,F,I,X,J,ie=[],me=0,Oe=u.length;me<Oe;me++)(x=u[me]).style&&(k=x.style.display,p?("none"===k&&(ie[me]=we.get(x,"display")||null,ie[me]||(x.style.display="")),""===x.style.display&&Xt(x)&&(ie[me]=(J=I=F=void 0,I=(O=x).ownerDocument,(J=Mi[X=O.nodeName])||(F=I.body.appendChild(I.createElement(X)),J=s.css(F,"display"),F.parentNode.removeChild(F),"none"===J&&(J="block"),Mi[X]=J)))):"none"!==k&&(ie[me]="none",we.set(x,"display",k)));for(me=0;me<Oe;me++)null!=ie[me]&&(u[me].style.display=ie[me]);return u}s.fn.extend({show:function(){return kn(this,!0)},hide:function(){return kn(this)},toggle:function(u){return"boolean"==typeof u?u?this.show():this.hide():this.each(function(){Xt(this)?s(this).show():s(this).hide()})}});var Rt,rr,Nn=/^(?:checkbox|radio)$/i,Dr=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ut=/^$|^module$|\/(?:java|ecma)script/i;Rt=G.createDocumentFragment().appendChild(G.createElement("div")),(rr=G.createElement("input")).setAttribute("type","radio"),rr.setAttribute("checked","checked"),rr.setAttribute("name","t"),Rt.appendChild(rr),V.checkClone=Rt.cloneNode(!0).cloneNode(!0).lastChild.checked,Rt.innerHTML="<textarea>x</textarea>",V.noCloneChecked=!!Rt.cloneNode(!0).lastChild.defaultValue,Rt.innerHTML="<option></option>",V.option=!!Rt.lastChild;var Bn={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function $t(u,p){var k;return k=void 0!==u.getElementsByTagName?u.getElementsByTagName(p||"*"):void 0!==u.querySelectorAll?u.querySelectorAll(p||"*"):[],void 0===p||p&&j(u,p)?s.merge([u],k):k}function vt(u,p){for(var k=0,x=u.length;k<x;k++)we.set(u[k],"globalEval",!p||we.get(p[k],"globalEval"))}Bn.tbody=Bn.tfoot=Bn.colgroup=Bn.caption=Bn.thead,Bn.th=Bn.td,V.option||(Bn.optgroup=Bn.option=[1,"<select multiple='multiple'>","</select>"]);var Tn=/<|&#?\w+;/;function Jn(u,p,k,x,O){for(var F,I,X,J,ie,me,Oe=p.createDocumentFragment(),U=[],ve=0,tt=u.length;ve<tt;ve++)if((F=u[ve])||0===F)if("object"===o(F))s.merge(U,F.nodeType?[F]:F);else if(Tn.test(F)){for(I=I||Oe.appendChild(p.createElement("div")),X=(Dr.exec(F)||["",""])[1].toLowerCase(),I.innerHTML=(J=Bn[X]||Bn._default)[1]+s.htmlPrefilter(F)+J[2],me=J[0];me--;)I=I.lastChild;s.merge(U,I.childNodes),(I=Oe.firstChild).textContent=""}else U.push(p.createTextNode(F));for(Oe.textContent="",ve=0;F=U[ve++];)if(x&&-1<s.inArray(F,x))O&&O.push(F);else if(ie=ge(F),I=$t(Oe.appendChild(F),"script"),ie&&vt(I),k)for(me=0;F=I[me++];)ut.test(F.type||"")&&k.push(F);return Oe}var tn=/^([^.]*)(?:\.(.+)|)/;function Mn(){return!0}function Ut(){return!1}function Pi(u,p){return u===function(){try{return G.activeElement}catch(k){}}()==("focus"===p)}function Un(u,p,k,x,O,F){var I,X;if("object"==typeof p){for(X in"string"!=typeof k&&(x=x||k,k=void 0),p)Un(u,X,k,x,p[X],F);return u}if(null==x&&null==O?(O=k,x=k=void 0):null==O&&("string"==typeof k?(O=x,x=void 0):(O=x,x=k,k=void 0)),!1===O)O=Ut;else if(!O)return u;return 1===F&&(I=O,(O=function(J){return s().off(J),I.apply(this,arguments)}).guid=I.guid||(I.guid=s.guid++)),u.each(function(){s.event.add(this,p,O,x,k)})}function Pn(u,p,k){k?(we.set(u,p,!1),s.event.add(u,p,{namespace:!1,handler:function(x){var O,F,I=we.get(this,p);if(1&x.isTrigger&&this[p]){if(I.length)(s.event.special[p]||{}).delegateType&&x.stopPropagation();else if(I=Qe.call(arguments),we.set(this,p,I),O=k(this,p),this[p](),I!==(F=we.get(this,p))||O?we.set(this,p,!1):F={},I!==F)return x.stopImmediatePropagation(),x.preventDefault(),F&&F.value}else I.length&&(we.set(this,p,{value:s.event.trigger(s.extend(I[0],s.Event.prototype),I.slice(1),this)}),x.stopImmediatePropagation())}})):void 0===we.get(u,p)&&s.event.add(u,p,Mn)}s.event={global:{},add:function(u,p,k,x,O){var F,I,X,J,ie,me,Oe,U,ve,tt,ht,Ze=we.get(u);if(zt(u))for(k.handler&&(k=(F=k).handler,O=F.selector),O&&s.find.matchesSelector(Pe,O),k.guid||(k.guid=s.guid++),(J=Ze.events)||(J=Ze.events=Object.create(null)),(I=Ze.handle)||(I=Ze.handle=function(on){return void 0!==s&&s.event.triggered!==on.type?s.event.dispatch.apply(u,arguments):void 0}),ie=(p=(p||"").match(et)||[""]).length;ie--;)ve=ht=(X=tn.exec(p[ie])||[])[1],tt=(X[2]||"").split(".").sort(),ve&&(Oe=s.event.special[ve]||{},Oe=s.event.special[ve=(O?Oe.delegateType:Oe.bindType)||ve]||{},me=s.extend({type:ve,origType:ht,data:x,handler:k,guid:k.guid,selector:O,needsContext:O&&s.expr.match.needsContext.test(O),namespace:tt.join(".")},F),(U=J[ve])||((U=J[ve]=[]).delegateCount=0,Oe.setup&&!1!==Oe.setup.call(u,x,tt,I)||u.addEventListener&&u.addEventListener(ve,I)),Oe.add&&(Oe.add.call(u,me),me.handler.guid||(me.handler.guid=k.guid)),O?U.splice(U.delegateCount++,0,me):U.push(me),s.event.global[ve]=!0)},remove:function(u,p,k,x,O){var F,I,X,J,ie,me,Oe,U,ve,tt,ht,Ze=we.hasData(u)&&we.get(u);if(Ze&&(J=Ze.events)){for(ie=(p=(p||"").match(et)||[""]).length;ie--;)if(ve=ht=(X=tn.exec(p[ie])||[])[1],tt=(X[2]||"").split(".").sort(),ve){for(Oe=s.event.special[ve]||{},U=J[ve=(x?Oe.delegateType:Oe.bindType)||ve]||[],X=X[2]&&new RegExp("(^|\\.)"+tt.join("\\.(?:.*\\.|)")+"(\\.|$)"),I=F=U.length;F--;)me=U[F],!O&&ht!==me.origType||k&&k.guid!==me.guid||X&&!X.test(me.namespace)||x&&x!==me.selector&&("**"!==x||!me.selector)||(U.splice(F,1),me.selector&&U.delegateCount--,Oe.remove&&Oe.remove.call(u,me));I&&!U.length&&(Oe.teardown&&!1!==Oe.teardown.call(u,tt,Ze.handle)||s.removeEvent(u,ve,Ze.handle),delete J[ve])}else for(ve in J)s.event.remove(u,ve+p[ie],k,x,!0);s.isEmptyObject(J)&&we.remove(u,"handle events")}},dispatch:function(u){var p,k,x,O,F,I,X=new Array(arguments.length),J=s.event.fix(u),ie=(we.get(this,"events")||Object.create(null))[J.type]||[],me=s.event.special[J.type]||{};for(X[0]=J,p=1;p<arguments.length;p++)X[p]=arguments[p];if(J.delegateTarget=this,!me.preDispatch||!1!==me.preDispatch.call(this,J)){for(I=s.event.handlers.call(this,J,ie),p=0;(O=I[p++])&&!J.isPropagationStopped();)for(J.currentTarget=O.elem,k=0;(F=O.handlers[k++])&&!J.isImmediatePropagationStopped();)J.rnamespace&&!1!==F.namespace&&!J.rnamespace.test(F.namespace)||(J.handleObj=F,J.data=F.data,void 0!==(x=((s.event.special[F.origType]||{}).handle||F.handler).apply(O.elem,X))&&!1===(J.result=x)&&(J.preventDefault(),J.stopPropagation()));return me.postDispatch&&me.postDispatch.call(this,J),J.result}},handlers:function(u,p){var k,x,O,F,I,X=[],J=p.delegateCount,ie=u.target;if(J&&ie.nodeType&&!("click"===u.type&&1<=u.button))for(;ie!==this;ie=ie.parentNode||this)if(1===ie.nodeType&&("click"!==u.type||!0!==ie.disabled)){for(F=[],I={},k=0;k<J;k++)void 0===I[O=(x=p[k]).selector+" "]&&(I[O]=x.needsContext?-1<s(O,this).index(ie):s.find(O,this,null,[ie]).length),I[O]&&F.push(x);F.length&&X.push({elem:ie,handlers:F})}return ie=this,J<p.length&&X.push({elem:ie,handlers:p.slice(J)}),X},addProp:function(u,p){Object.defineProperty(s.Event.prototype,u,{enumerable:!0,configurable:!0,get:z(p)?function(){if(this.originalEvent)return p(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[u]},set:function(k){Object.defineProperty(this,u,{enumerable:!0,configurable:!0,writable:!0,value:k})}})},fix:function(u){return u[s.expando]?u:new s.Event(u)},special:{load:{noBubble:!0},click:{setup:function(u){var p=this||u;return Nn.test(p.type)&&p.click&&j(p,"input")&&Pn(p,"click",Mn),!1},trigger:function(u){var p=this||u;return Nn.test(p.type)&&p.click&&j(p,"input")&&Pn(p,"click"),!0},_default:function(u){var p=u.target;return Nn.test(p.type)&&p.click&&j(p,"input")&&we.get(p,"click")||j(p,"a")}},beforeunload:{postDispatch:function(u){void 0!==u.result&&u.originalEvent&&(u.originalEvent.returnValue=u.result)}}}},s.removeEvent=function(u,p,k){u.removeEventListener&&u.removeEventListener(p,k)},s.Event=function(u,p){if(!(this instanceof s.Event))return new s.Event(u,p);u&&u.type?(this.originalEvent=u,this.type=u.type,this.isDefaultPrevented=u.defaultPrevented||void 0===u.defaultPrevented&&!1===u.returnValue?Mn:Ut,this.target=u.target&&3===u.target.nodeType?u.target.parentNode:u.target,this.currentTarget=u.currentTarget,this.relatedTarget=u.relatedTarget):this.type=u,p&&s.extend(this,p),this.timeStamp=u&&u.timeStamp||Date.now(),this[s.expando]=!0},s.Event.prototype={constructor:s.Event,isDefaultPrevented:Ut,isPropagationStopped:Ut,isImmediatePropagationStopped:Ut,isSimulated:!1,preventDefault:function(){var u=this.originalEvent;this.isDefaultPrevented=Mn,u&&!this.isSimulated&&u.preventDefault()},stopPropagation:function(){var u=this.originalEvent;this.isPropagationStopped=Mn,u&&!this.isSimulated&&u.stopPropagation()},stopImmediatePropagation:function(){var u=this.originalEvent;this.isImmediatePropagationStopped=Mn,u&&!this.isSimulated&&u.stopImmediatePropagation(),this.stopPropagation()}},s.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},s.event.addProp),s.each({focus:"focusin",blur:"focusout"},function(u,p){s.event.special[u]={setup:function(){return Pn(this,u,Pi),!1},trigger:function(){return Pn(this,u),!0},_default:function(){return!0},delegateType:p}}),s.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(u,p){s.event.special[u]={delegateType:p,bindType:p,handle:function(k){var x,O=k.relatedTarget,F=k.handleObj;return O&&(O===this||s.contains(this,O))||(k.type=F.origType,x=F.handler.apply(this,arguments),k.type=p),x}}}),s.fn.extend({on:function(u,p,k,x){return Un(this,u,p,k,x)},one:function(u,p,k,x){return Un(this,u,p,k,x,1)},off:function(u,p,k){var x,O;if(u&&u.preventDefault&&u.handleObj)return x=u.handleObj,s(u.delegateTarget).off(x.namespace?x.origType+"."+x.namespace:x.origType,x.selector,x.handler),this;if("object"==typeof u){for(O in u)this.off(O,p,u[O]);return this}return!1!==p&&"function"!=typeof p||(k=p,p=void 0),!1===k&&(k=Ut),this.each(function(){s.event.remove(this,u,k,p)})}});var Cr=/<script|<style|<link/i,Ji=/checked\s*(?:[^=]|=\s*.checked.)/i,Zi=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function vn(u,p){return j(u,"table")&&j(11!==p.nodeType?p:p.firstChild,"tr")&&s(u).children("tbody")[0]||u}function Us(u){return u.type=(null!==u.getAttribute("type"))+"/"+u.type,u}function Nr(u){return"true/"===(u.type||"").slice(0,5)?u.type=u.type.slice(5):u.removeAttribute("type"),u}function vr(u,p){var k,x,O,F,I,X;if(1===p.nodeType){if(we.hasData(u)&&(X=we.get(u).events))for(O in we.remove(p,"handle events"),X)for(k=0,x=X[O].length;k<x;k++)s.event.add(p,O,X[O][k]);yt.hasData(u)&&(F=yt.access(u),I=s.extend({},F),yt.set(p,I))}}function Hr(u,p,k,x){p=je(p);var O,F,I,X,J,ie,me=0,Oe=u.length,U=Oe-1,ve=p[0],tt=z(ve);if(tt||1<Oe&&"string"==typeof ve&&!V.checkClone&&Ji.test(ve))return u.each(function(ht){var Ze=u.eq(ht);tt&&(p[0]=ve.call(this,ht,Ze.html())),Hr(Ze,p,k,x)});if(Oe&&(F=(O=Jn(p,u[0].ownerDocument,!1,u,x)).firstChild,1===O.childNodes.length&&(O=F),F||x)){for(X=(I=s.map($t(O,"script"),Us)).length;me<Oe;me++)J=O,me!==U&&(J=s.clone(J,!0,!0),X&&s.merge(I,$t(J,"script"))),k.call(u[me],J,me);if(X)for(ie=I[I.length-1].ownerDocument,s.map(I,Nr),me=0;me<X;me++)ut.test((J=I[me]).type||"")&&!we.access(J,"globalEval")&&s.contains(ie,J)&&(J.src&&"module"!==(J.type||"").toLowerCase()?s._evalUrl&&!J.noModule&&s._evalUrl(J.src,{nonce:J.nonce||J.getAttribute("nonce")},ie):f(J.textContent.replace(Zi,""),J,ie))}return u}function ai(u,p,k){for(var x,O=p?s.filter(p,u):u,F=0;null!=(x=O[F]);F++)k||1!==x.nodeType||s.cleanData($t(x)),x.parentNode&&(k&&ge(x)&&vt($t(x,"script")),x.parentNode.removeChild(x));return u}s.extend({htmlPrefilter:function(u){return u},clone:function(u,p,k){var x,O,F,I,X,J,ie,me=u.cloneNode(!0),Oe=ge(u);if(!(V.noCloneChecked||1!==u.nodeType&&11!==u.nodeType||s.isXMLDoc(u)))for(I=$t(me),x=0,O=(F=$t(u)).length;x<O;x++)X=F[x],"input"===(ie=(J=I[x]).nodeName.toLowerCase())&&Nn.test(X.type)?J.checked=X.checked:"input"!==ie&&"textarea"!==ie||(J.defaultValue=X.defaultValue);if(p)if(k)for(F=F||$t(u),I=I||$t(me),x=0,O=F.length;x<O;x++)vr(F[x],I[x]);else vr(u,me);return 0<(I=$t(me,"script")).length&&vt(I,!Oe&&$t(u,"script")),me},cleanData:function(u){for(var p,k,x,O=s.event.special,F=0;void 0!==(k=u[F]);F++)if(zt(k)){if(p=k[we.expando]){if(p.events)for(x in p.events)O[x]?s.event.remove(k,x):s.removeEvent(k,x,p.handle);k[we.expando]=void 0}k[yt.expando]&&(k[yt.expando]=void 0)}}}),s.fn.extend({detach:function(u){return ai(this,u,!0)},remove:function(u){return ai(this,u)},text:function(u){return ot(this,function(p){return void 0===p?s.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=p)})},null,u,arguments.length)},append:function(){return Hr(this,arguments,function(u){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||vn(this,u).appendChild(u)})},prepend:function(){return Hr(this,arguments,function(u){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var p=vn(this,u);p.insertBefore(u,p.firstChild)}})},before:function(){return Hr(this,arguments,function(u){this.parentNode&&this.parentNode.insertBefore(u,this)})},after:function(){return Hr(this,arguments,function(u){this.parentNode&&this.parentNode.insertBefore(u,this.nextSibling)})},empty:function(){for(var u,p=0;null!=(u=this[p]);p++)1===u.nodeType&&(s.cleanData($t(u,!1)),u.textContent="");return this},clone:function(u,p){return u=null!=u&&u,p=null==p?u:p,this.map(function(){return s.clone(this,u,p)})},html:function(u){return ot(this,function(p){var k=this[0]||{},x=0,O=this.length;if(void 0===p&&1===k.nodeType)return k.innerHTML;if("string"==typeof p&&!Cr.test(p)&&!Bn[(Dr.exec(p)||["",""])[1].toLowerCase()]){p=s.htmlPrefilter(p);try{for(;x<O;x++)1===(k=this[x]||{}).nodeType&&(s.cleanData($t(k,!1)),k.innerHTML=p);k=0}catch(F){}}k&&this.empty().append(p)},null,u,arguments.length)},replaceWith:function(){var u=[];return Hr(this,arguments,function(p){var k=this.parentNode;s.inArray(this,u)<0&&(s.cleanData($t(this)),k&&k.replaceChild(p,this))},u)}}),s.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(u,p){s.fn[u]=function(k){for(var x,O=[],F=s(k),I=F.length-1,X=0;X<=I;X++)x=X===I?this:this.clone(!0),s(F[X])[p](x),pe.apply(O,x.get());return this.pushStack(O)}});var Ti=new RegExp("^("+Ci+")(?!px)[a-z%]+$","i"),ir=function(u){var p=u.ownerDocument.defaultView;return p&&p.opener||(p=_),p.getComputedStyle(u)},Tr=function(u,p,k){var x,O,F={};for(O in p)F[O]=u.style[O],u.style[O]=p[O];for(O in x=k.call(u),p)u.style[O]=F[O];return x},sr=new RegExp(de.join("|"),"i");function En(u,p,k){var x,O,F,I,X=u.style;return(k=k||ir(u))&&(""!==(I=k.getPropertyValue(p)||k[p])||ge(u)||(I=s.style(u,p)),!V.pixelBoxStyles()&&Ti.test(I)&&sr.test(p)&&(x=X.width,O=X.minWidth,F=X.maxWidth,X.minWidth=X.maxWidth=X.width=I,I=k.width,X.width=x,X.minWidth=O,X.maxWidth=F)),void 0!==I?I+"":I}function es(u,p){return{get:function(){if(!u())return(this.get=p).apply(this,arguments);delete this.get}}}!function(){function u(){if(ie){J.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",ie.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Pe.appendChild(J).appendChild(ie);var me=_.getComputedStyle(ie);k="1%"!==me.top,X=12===p(me.marginLeft),ie.style.right="60%",F=36===p(me.right),x=36===p(me.width),ie.style.position="absolute",O=12===p(ie.offsetWidth/3),Pe.removeChild(J),ie=null}}function p(me){return Math.round(parseFloat(me))}var k,x,O,F,I,X,J=G.createElement("div"),ie=G.createElement("div");ie.style&&(ie.style.backgroundClip="content-box",ie.cloneNode(!0).style.backgroundClip="",V.clearCloneStyle="content-box"===ie.style.backgroundClip,s.extend(V,{boxSizingReliable:function(){return u(),x},pixelBoxStyles:function(){return u(),F},pixelPosition:function(){return u(),k},reliableMarginLeft:function(){return u(),X},scrollboxSize:function(){return u(),O},reliableTrDimensions:function(){var me,Oe,U,ve;return null==I&&(me=G.createElement("table"),Oe=G.createElement("tr"),U=G.createElement("div"),me.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Oe.style.cssText="border:1px solid",Oe.style.height="1px",U.style.height="9px",U.style.display="block",Pe.appendChild(me).appendChild(Oe).appendChild(U),ve=_.getComputedStyle(Oe),I=parseInt(ve.height,10)+parseInt(ve.borderTopWidth,10)+parseInt(ve.borderBottomWidth,10)===Oe.offsetHeight,Pe.removeChild(me)),I}}))}();var Rr=["Webkit","Moz","ms"],Fi=G.createElement("div").style,Si={};function Hn(u){return s.cssProps[u]||Si[u]||(u in Fi?u:Si[u]=function(k){for(var x=k[0].toUpperCase()+k.slice(1),O=Rr.length;O--;)if((k=Rr[O]+x)in Fi)return k}(u)||u)}var Wr=/^(none|table(?!-c[ea]).+)/,or=/^--/,Ii={position:"absolute",visibility:"hidden",display:"block"},li={letterSpacing:"0",fontWeight:"400"};function cn(u,p,k){var x=qt.exec(p);return x?Math.max(0,x[2]-(k||0))+(x[3]||"px"):p}function st(u,p,k,x,O,F){var I="width"===p?1:0,X=0,J=0;if(k===(x?"border":"content"))return 0;for(;I<4;I+=2)"margin"===k&&(J+=s.css(u,k+de[I],!0,O)),x?("content"===k&&(J-=s.css(u,"padding"+de[I],!0,O)),"margin"!==k&&(J-=s.css(u,"border"+de[I]+"Width",!0,O))):(J+=s.css(u,"padding"+de[I],!0,O),"padding"!==k?J+=s.css(u,"border"+de[I]+"Width",!0,O):X+=s.css(u,"border"+de[I]+"Width",!0,O));return!x&&0<=F&&(J+=Math.max(0,Math.ceil(u["offset"+p[0].toUpperCase()+p.slice(1)]-F-J-X-.5))||0),J}function mr(u,p,k){var x=ir(u),O=(!V.boxSizingReliable()||k)&&"border-box"===s.css(u,"boxSizing",!1,x),F=O,I=En(u,p,x),X="offset"+p[0].toUpperCase()+p.slice(1);if(Ti.test(I)){if(!k)return I;I="auto"}return(!V.boxSizingReliable()&&O||!V.reliableTrDimensions()&&j(u,"tr")||"auto"===I||!parseFloat(I)&&"inline"===s.css(u,"display",!1,x))&&u.getClientRects().length&&(O="border-box"===s.css(u,"boxSizing",!1,x),(F=X in u)&&(I=u[X])),(I=parseFloat(I)||0)+st(u,p,k||(O?"border":"content"),F,x,I)+"px"}function ar(u,p,k,x,O){return new ar.prototype.init(u,p,k,x,O)}s.extend({cssHooks:{opacity:{get:function(u,p){if(p){var k=En(u,"opacity");return""===k?"1":k}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(u,p,k,x){if(u&&3!==u.nodeType&&8!==u.nodeType&&u.style){var O,F,I,X=Et(p),J=or.test(p),ie=u.style;if(J||(p=Hn(X)),I=s.cssHooks[p]||s.cssHooks[X],void 0===k)return I&&"get"in I&&void 0!==(O=I.get(u,!1,x))?O:ie[p];"string"==(F=typeof k)&&(O=qt.exec(k))&&O[1]&&(k=gn(u,p,O),F="number"),null!=k&&k==k&&("number"!==F||J||(k+=O&&O[3]||(s.cssNumber[X]?"":"px")),V.clearCloneStyle||""!==k||0!==p.indexOf("background")||(ie[p]="inherit"),I&&"set"in I&&void 0===(k=I.set(u,k,x))||(J?ie.setProperty(p,k):ie[p]=k))}},css:function(u,p,k,x){var O,F,I,X=Et(p);return or.test(p)||(p=Hn(X)),(I=s.cssHooks[p]||s.cssHooks[X])&&"get"in I&&(O=I.get(u,!0,k)),void 0===O&&(O=En(u,p,x)),"normal"===O&&p in li&&(O=li[p]),""===k||k?(F=parseFloat(O),!0===k||isFinite(F)?F||0:O):O}}),s.each(["height","width"],function(u,p){s.cssHooks[p]={get:function(k,x,O){if(x)return!Wr.test(s.css(k,"display"))||k.getClientRects().length&&k.getBoundingClientRect().width?mr(k,p,O):Tr(k,Ii,function(){return mr(k,p,O)})},set:function(k,x,O){var F,I=ir(k),X=!V.scrollboxSize()&&"absolute"===I.position,J=(X||O)&&"border-box"===s.css(k,"boxSizing",!1,I),ie=O?st(k,p,O,J,I):0;return J&&X&&(ie-=Math.ceil(k["offset"+p[0].toUpperCase()+p.slice(1)]-parseFloat(I[p])-st(k,p,"border",!1,I)-.5)),ie&&(F=qt.exec(x))&&"px"!==(F[3]||"px")&&(k.style[p]=x,x=s.css(k,p)),cn(0,x,ie)}}}),s.cssHooks.marginLeft=es(V.reliableMarginLeft,function(u,p){if(p)return(parseFloat(En(u,"marginLeft"))||u.getBoundingClientRect().left-Tr(u,{marginLeft:0},function(){return u.getBoundingClientRect().left}))+"px"}),s.each({margin:"",padding:"",border:"Width"},function(u,p){s.cssHooks[u+p]={expand:function(k){for(var x=0,O={},F="string"==typeof k?k.split(" "):[k];x<4;x++)O[u+de[x]+p]=F[x]||F[x-2]||F[0];return O}},"margin"!==u&&(s.cssHooks[u+p].set=cn)}),s.fn.extend({css:function(u,p){return ot(this,function(k,x,O){var F,I,X={},J=0;if(Array.isArray(x)){for(F=ir(k),I=x.length;J<I;J++)X[x[J]]=s.css(k,x[J],!1,F);return X}return void 0!==O?s.style(k,x,O):s.css(k,x)},u,p,1<arguments.length)}}),((s.Tween=ar).prototype={constructor:ar,init:function(u,p,k,x,O,F){this.elem=u,this.prop=k,this.easing=O||s.easing._default,this.options=p,this.start=this.now=this.cur(),this.end=x,this.unit=F||(s.cssNumber[k]?"":"px")},cur:function(){var u=ar.propHooks[this.prop];return u&&u.get?u.get(this):ar.propHooks._default.get(this)},run:function(u){var p,k=ar.propHooks[this.prop];return this.pos=p=this.options.duration?s.easing[this.easing](u,this.options.duration*u,0,1,this.options.duration):u,this.now=(this.end-this.start)*p+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),k&&k.set?k.set(this):ar.propHooks._default.set(this),this}}).init.prototype=ar.prototype,(ar.propHooks={_default:{get:function(u){var p;return 1!==u.elem.nodeType||null!=u.elem[u.prop]&&null==u.elem.style[u.prop]?u.elem[u.prop]:(p=s.css(u.elem,u.prop,""))&&"auto"!==p?p:0},set:function(u){s.fx.step[u.prop]?s.fx.step[u.prop](u):1!==u.elem.nodeType||!s.cssHooks[u.prop]&&null==u.elem.style[Hn(u.prop)]?u.elem[u.prop]=u.now:s.style(u.elem,u.prop,u.now+u.unit)}}}).scrollTop=ar.propHooks.scrollLeft={set:function(u){u.elem.nodeType&&u.elem.parentNode&&(u.elem[u.prop]=u.now)}},s.easing={linear:function(u){return u},swing:function(u){return.5-Math.cos(u*Math.PI)/2},_default:"swing"},s.fx=ar.prototype.init,s.fx.step={};var jn,It,Kn,Zr,ui=/^(?:toggle|show|hide)$/,Ne=/queueHooks$/;function D(){It&&(!1===G.hidden&&_.requestAnimationFrame?_.requestAnimationFrame(D):_.setTimeout(D,s.fx.interval),s.fx.tick())}function q(){return _.setTimeout(function(){jn=void 0}),jn=Date.now()}function Ce(u,p){var k,x=0,O={height:u};for(p=p?1:0;x<4;x+=2-p)O["margin"+(k=de[x])]=O["padding"+k]=u;return p&&(O.opacity=O.width=u),O}function Me(u,p,k){for(var x,O=(ct.tweeners[p]||[]).concat(ct.tweeners["*"]),F=0,I=O.length;F<I;F++)if(x=O[F].call(k,p,u))return x}function ct(u,p,k){var x,O,F=0,I=ct.prefilters.length,X=s.Deferred().always(function(){delete J.elem}),J=function(){if(O)return!1;for(var Oe=jn||q(),U=Math.max(0,ie.startTime+ie.duration-Oe),ve=1-(U/ie.duration||0),tt=0,ht=ie.tweens.length;tt<ht;tt++)ie.tweens[tt].run(ve);return X.notifyWith(u,[ie,ve,U]),ve<1&&ht?U:(ht||X.notifyWith(u,[ie,1,0]),X.resolveWith(u,[ie]),!1)},ie=X.promise({elem:u,props:s.extend({},p),opts:s.extend(!0,{specialEasing:{},easing:s.easing._default},k),originalProperties:p,originalOptions:k,startTime:jn||q(),duration:k.duration,tweens:[],createTween:function(Oe,U){var ve=s.Tween(u,ie.opts,Oe,U,ie.opts.specialEasing[Oe]||ie.opts.easing);return ie.tweens.push(ve),ve},stop:function(Oe){var U=0,ve=Oe?ie.tweens.length:0;if(O)return this;for(O=!0;U<ve;U++)ie.tweens[U].run(1);return Oe?(X.notifyWith(u,[ie,1,0]),X.resolveWith(u,[ie,Oe])):X.rejectWith(u,[ie,Oe]),this}}),me=ie.props;for(function(Oe,U){var ve,tt,ht,Ze,on;for(ve in Oe)if(ht=U[tt=Et(ve)],Ze=Oe[ve],Array.isArray(Ze)&&(ht=Ze[1],Ze=Oe[ve]=Ze[0]),ve!==tt&&(Oe[tt]=Ze,delete Oe[ve]),(on=s.cssHooks[tt])&&"expand"in on)for(ve in Ze=on.expand(Ze),delete Oe[tt],Ze)ve in Oe||(Oe[ve]=Ze[ve],U[ve]=ht);else U[tt]=ht}(me,ie.opts.specialEasing);F<I;F++)if(x=ct.prefilters[F].call(ie,u,me,ie.opts))return z(x.stop)&&(s._queueHooks(ie.elem,ie.opts.queue).stop=x.stop.bind(x)),x;return s.map(me,Me,ie),z(ie.opts.start)&&ie.opts.start.call(u,ie),ie.progress(ie.opts.progress).done(ie.opts.done,ie.opts.complete).fail(ie.opts.fail).always(ie.opts.always),s.fx.timer(s.extend(J,{elem:u,anim:ie,queue:ie.opts.queue})),ie}s.Animation=s.extend(ct,{tweeners:{"*":[function(u,p){var k=this.createTween(u,p);return gn(k.elem,u,qt.exec(p),k),k}]},tweener:function(u,p){z(u)?(p=u,u=["*"]):u=u.match(et);for(var k,x=0,O=u.length;x<O;x++)(ct.tweeners[k=u[x]]=ct.tweeners[k]||[]).unshift(p)},prefilters:[function(u,p,k){var x,O,F,I,X,J,ie,me,Oe="width"in p||"height"in p,U=this,ve={},tt=u.style,ht=u.nodeType&&Xt(u),Ze=we.get(u,"fxshow");for(x in k.queue||(null==(I=s._queueHooks(u,"fx")).unqueued&&(I.unqueued=0,X=I.empty.fire,I.empty.fire=function(){I.unqueued||X()}),I.unqueued++,U.always(function(){U.always(function(){I.unqueued--,s.queue(u,"fx").length||I.empty.fire()})})),p)if(ui.test(O=p[x])){if(delete p[x],F=F||"toggle"===O,O===(ht?"hide":"show")){if("show"!==O||!Ze||void 0===Ze[x])continue;ht=!0}ve[x]=Ze&&Ze[x]||s.style(u,x)}if((J=!s.isEmptyObject(p))||!s.isEmptyObject(ve))for(x in Oe&&1===u.nodeType&&(k.overflow=[tt.overflow,tt.overflowX,tt.overflowY],null==(ie=Ze&&Ze.display)&&(ie=we.get(u,"display")),"none"===(me=s.css(u,"display"))&&(ie?me=ie:(kn([u],!0),ie=u.style.display||ie,me=s.css(u,"display"),kn([u]))),("inline"===me||"inline-block"===me&&null!=ie)&&"none"===s.css(u,"float")&&(J||(U.done(function(){tt.display=ie}),null==ie&&(ie="none"===(me=tt.display)?"":me)),tt.display="inline-block")),k.overflow&&(tt.overflow="hidden",U.always(function(){tt.overflow=k.overflow[0],tt.overflowX=k.overflow[1],tt.overflowY=k.overflow[2]})),J=!1,ve)J||(Ze?"hidden"in Ze&&(ht=Ze.hidden):Ze=we.access(u,"fxshow",{display:ie}),F&&(Ze.hidden=!ht),ht&&kn([u],!0),U.done(function(){for(x in ht||kn([u]),we.remove(u,"fxshow"),ve)s.style(u,x,ve[x])})),J=Me(ht?Ze[x]:0,x,U),x in Ze||(Ze[x]=J.start,ht&&(J.end=J.start,J.start=0))}],prefilter:function(u,p){p?ct.prefilters.unshift(u):ct.prefilters.push(u)}}),s.speed=function(u,p,k){var x=u&&"object"==typeof u?s.extend({},u):{complete:k||!k&&p||z(u)&&u,duration:u,easing:k&&p||p&&!z(p)&&p};return s.fx.off?x.duration=0:"number"!=typeof x.duration&&(x.duration=x.duration in s.fx.speeds?s.fx.speeds[x.duration]:s.fx.speeds._default),null!=x.queue&&!0!==x.queue||(x.queue="fx"),x.old=x.complete,x.complete=function(){z(x.old)&&x.old.call(this),x.queue&&s.dequeue(this,x.queue)},x},s.fn.extend({fadeTo:function(u,p,k,x){return this.filter(Xt).css("opacity",0).show().end().animate({opacity:p},u,k,x)},animate:function(u,p,k,x){var O=s.isEmptyObject(u),F=s.speed(p,k,x),I=function(){var X=ct(this,s.extend({},u),F);(O||we.get(this,"finish"))&&X.stop(!0)};return I.finish=I,O||!1===F.queue?this.each(I):this.queue(F.queue,I)},stop:function(u,p,k){var x=function(O){var F=O.stop;delete O.stop,F(k)};return"string"!=typeof u&&(k=p,p=u,u=void 0),p&&this.queue(u||"fx",[]),this.each(function(){var O=!0,F=null!=u&&u+"queueHooks",I=s.timers,X=we.get(this);if(F)X[F]&&X[F].stop&&x(X[F]);else for(F in X)X[F]&&X[F].stop&&Ne.test(F)&&x(X[F]);for(F=I.length;F--;)I[F].elem!==this||null!=u&&I[F].queue!==u||(I[F].anim.stop(k),O=!1,I.splice(F,1));!O&&k||s.dequeue(this,u)})},finish:function(u){return!1!==u&&(u=u||"fx"),this.each(function(){var p,k=we.get(this),x=k[u+"queue"],O=k[u+"queueHooks"],F=s.timers,I=x?x.length:0;for(k.finish=!0,s.queue(this,u,[]),O&&O.stop&&O.stop.call(this,!0),p=F.length;p--;)F[p].elem===this&&F[p].queue===u&&(F[p].anim.stop(!0),F.splice(p,1));for(p=0;p<I;p++)x[p]&&x[p].finish&&x[p].finish.call(this);delete k.finish})}}),s.each(["toggle","show","hide"],function(u,p){var k=s.fn[p];s.fn[p]=function(x,O,F){return null==x||"boolean"==typeof x?k.apply(this,arguments):this.animate(Ce(p,!0),x,O,F)}}),s.each({slideDown:Ce("show"),slideUp:Ce("hide"),slideToggle:Ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(u,p){s.fn[u]=function(k,x,O){return this.animate(p,k,x,O)}}),s.timers=[],s.fx.tick=function(){var u,p=0,k=s.timers;for(jn=Date.now();p<k.length;p++)(u=k[p])()||k[p]!==u||k.splice(p--,1);k.length||s.fx.stop(),jn=void 0},s.fx.timer=function(u){s.timers.push(u),s.fx.start()},s.fx.interval=13,s.fx.start=function(){It||(It=!0,D())},s.fx.stop=function(){It=null},s.fx.speeds={slow:600,fast:200,_default:400},s.fn.delay=function(u,p){return u=s.fx&&s.fx.speeds[u]||u,this.queue(p=p||"fx",function(k,x){var O=_.setTimeout(k,u);x.stop=function(){_.clearTimeout(O)}})},Kn=G.createElement("input"),Zr=G.createElement("select").appendChild(G.createElement("option")),Kn.type="checkbox",V.checkOn=""!==Kn.value,V.optSelected=Zr.selected,(Kn=G.createElement("input")).value="t",Kn.type="radio",V.radioValue="t"===Kn.value;var Ot,Ke=s.expr.attrHandle;s.fn.extend({attr:function(u,p){return ot(this,s.attr,u,p,1<arguments.length)},removeAttr:function(u){return this.each(function(){s.removeAttr(this,u)})}}),s.extend({attr:function(u,p,k){var x,O,F=u.nodeType;if(3!==F&&8!==F&&2!==F)return void 0===u.getAttribute?s.prop(u,p,k):(1===F&&s.isXMLDoc(u)||(O=s.attrHooks[p.toLowerCase()]||(s.expr.match.bool.test(p)?Ot:void 0)),void 0!==k?null===k?void s.removeAttr(u,p):O&&"set"in O&&void 0!==(x=O.set(u,k,p))?x:(u.setAttribute(p,k+""),k):O&&"get"in O&&null!==(x=O.get(u,p))?x:null==(x=s.find.attr(u,p))?void 0:x)},attrHooks:{type:{set:function(u,p){if(!V.radioValue&&"radio"===p&&j(u,"input")){var k=u.value;return u.setAttribute("type",p),k&&(u.value=k),p}}}},removeAttr:function(u,p){var k,x=0,O=p&&p.match(et);if(O&&1===u.nodeType)for(;k=O[x++];)u.removeAttribute(k)}}),Ot={set:function(u,p,k){return!1===p?s.removeAttr(u,k):u.setAttribute(k,k),k}},s.each(s.expr.match.bool.source.match(/\w+/g),function(u,p){var k=Ke[p]||s.find.attr;Ke[p]=function(x,O,F){var I,X,J=O.toLowerCase();return F||(X=Ke[J],Ke[J]=I,I=null!=k(x,O,F)?J:null,Ke[J]=X),I}});var Rn=/^(?:input|select|textarea|button)$/i,_r=/^(?:a|area)$/i;function Sr(u){return(u.match(et)||[]).join(" ")}function Wn(u){return u.getAttribute&&u.getAttribute("class")||""}function _s(u){return Array.isArray(u)?u:"string"==typeof u&&u.match(et)||[]}s.fn.extend({prop:function(u,p){return ot(this,s.prop,u,p,1<arguments.length)},removeProp:function(u){return this.each(function(){delete this[s.propFix[u]||u]})}}),s.extend({prop:function(u,p,k){var x,O,F=u.nodeType;if(3!==F&&8!==F&&2!==F)return 1===F&&s.isXMLDoc(u)||(O=s.propHooks[p=s.propFix[p]||p]),void 0!==k?O&&"set"in O&&void 0!==(x=O.set(u,k,p))?x:u[p]=k:O&&"get"in O&&null!==(x=O.get(u,p))?x:u[p]},propHooks:{tabIndex:{get:function(u){var p=s.find.attr(u,"tabindex");return p?parseInt(p,10):Rn.test(u.nodeName)||_r.test(u.nodeName)&&u.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),V.optSelected||(s.propHooks.selected={get:function(u){return null},set:function(u){}}),s.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){s.propFix[this.toLowerCase()]=this}),s.fn.extend({addClass:function(u){var p,k,x,O,F,I,X,J=0;if(z(u))return this.each(function(ie){s(this).addClass(u.call(this,ie,Wn(this)))});if((p=_s(u)).length)for(;k=this[J++];)if(O=Wn(k),x=1===k.nodeType&&" "+Sr(O)+" "){for(I=0;F=p[I++];)x.indexOf(" "+F+" ")<0&&(x+=F+" ");O!==(X=Sr(x))&&k.setAttribute("class",X)}return this},removeClass:function(u){var p,k,x,O,F,I,X,J=0;if(z(u))return this.each(function(ie){s(this).removeClass(u.call(this,ie,Wn(this)))});if(!arguments.length)return this.attr("class","");if((p=_s(u)).length)for(;k=this[J++];)if(O=Wn(k),x=1===k.nodeType&&" "+Sr(O)+" "){for(I=0;F=p[I++];)for(;-1<x.indexOf(" "+F+" ");)x=x.replace(" "+F+" "," ");O!==(X=Sr(x))&&k.setAttribute("class",X)}return this},toggleClass:function(u,p){var k=typeof u,x="string"===k||Array.isArray(u);return"boolean"==typeof p&&x?p?this.addClass(u):this.removeClass(u):z(u)?this.each(function(O){s(this).toggleClass(u.call(this,O,Wn(this),p),p)}):this.each(function(){var O,F,I,X;if(x)for(F=0,I=s(this),X=_s(u);O=X[F++];)I.hasClass(O)?I.removeClass(O):I.addClass(O);else void 0!==u&&"boolean"!==k||((O=Wn(this))&&we.set(this,"__className__",O),this.setAttribute&&this.setAttribute("class",O||!1===u?"":we.get(this,"__className__")||""))})},hasClass:function(u){var p,k,x=0;for(p=" "+u+" ";k=this[x++];)if(1===k.nodeType&&-1<(" "+Sr(Wn(k))+" ").indexOf(p))return!0;return!1}});var Ho=/\r/g;s.fn.extend({val:function(u){var p,k,x,O=this[0];return arguments.length?(x=z(u),this.each(function(F){var I;1===this.nodeType&&(null==(I=x?u.call(this,F,s(this).val()):u)?I="":"number"==typeof I?I+="":Array.isArray(I)&&(I=s.map(I,function(X){return null==X?"":X+""})),(p=s.valHooks[this.type]||s.valHooks[this.nodeName.toLowerCase()])&&"set"in p&&void 0!==p.set(this,I,"value")||(this.value=I))})):O?(p=s.valHooks[O.type]||s.valHooks[O.nodeName.toLowerCase()])&&"get"in p&&void 0!==(k=p.get(O,"value"))?k:"string"==typeof(k=O.value)?k.replace(Ho,""):null==k?"":k:void 0}}),s.extend({valHooks:{option:{get:function(u){var p=s.find.attr(u,"value");return null!=p?p:Sr(s.text(u))}},select:{get:function(u){var p,k,x,O=u.options,F=u.selectedIndex,I="select-one"===u.type,X=I?null:[],J=I?F+1:O.length;for(x=F<0?J:I?F:0;x<J;x++)if(((k=O[x]).selected||x===F)&&!k.disabled&&(!k.parentNode.disabled||!j(k.parentNode,"optgroup"))){if(p=s(k).val(),I)return p;X.push(p)}return X},set:function(u,p){for(var k,x,O=u.options,F=s.makeArray(p),I=O.length;I--;)((x=O[I]).selected=-1<s.inArray(s.valHooks.option.get(x),F))&&(k=!0);return k||(u.selectedIndex=-1),F}}}}),s.each(["radio","checkbox"],function(){s.valHooks[this]={set:function(u,p){if(Array.isArray(p))return u.checked=-1<s.inArray(s(u).val(),p)}},V.checkOn||(s.valHooks[this].get=function(u){return null===u.getAttribute("value")?"on":u.value})}),V.focusin="onfocusin"in _;var ts=/^(?:focusinfocus|focusoutblur)$/,ys=function(u){u.stopPropagation()};s.extend(s.event,{trigger:function(u,p,k,x){var O,F,I,X,J,ie,me,Oe,U=[k||G],ve=Z.call(u,"type")?u.type:u,tt=Z.call(u,"namespace")?u.namespace.split("."):[];if(F=Oe=I=k=k||G,3!==k.nodeType&&8!==k.nodeType&&!ts.test(ve+s.event.triggered)&&(-1<ve.indexOf(".")&&(ve=(tt=ve.split(".")).shift(),tt.sort()),J=ve.indexOf(":")<0&&"on"+ve,(u=u[s.expando]?u:new s.Event(ve,"object"==typeof u&&u)).isTrigger=x?2:3,u.namespace=tt.join("."),u.rnamespace=u.namespace?new RegExp("(^|\\.)"+tt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=void 0,u.target||(u.target=k),p=null==p?[u]:s.makeArray(p,[u]),me=s.event.special[ve]||{},x||!me.trigger||!1!==me.trigger.apply(k,p))){if(!x&&!me.noBubble&&!ke(k)){for(ts.test((X=me.delegateType||ve)+ve)||(F=F.parentNode);F;F=F.parentNode)U.push(F),I=F;I===(k.ownerDocument||G)&&U.push(I.defaultView||I.parentWindow||_)}for(O=0;(F=U[O++])&&!u.isPropagationStopped();)Oe=F,u.type=1<O?X:me.bindType||ve,(ie=(we.get(F,"events")||Object.create(null))[u.type]&&we.get(F,"handle"))&&ie.apply(F,p),(ie=J&&F[J])&&ie.apply&&zt(F)&&(u.result=ie.apply(F,p),!1===u.result&&u.preventDefault());return u.type=ve,x||u.isDefaultPrevented()||me._default&&!1!==me._default.apply(U.pop(),p)||!zt(k)||J&&z(k[ve])&&!ke(k)&&((I=k[J])&&(k[J]=null),s.event.triggered=ve,u.isPropagationStopped()&&Oe.addEventListener(ve,ys),k[ve](),u.isPropagationStopped()&&Oe.removeEventListener(ve,ys),s.event.triggered=void 0,I&&(k[J]=I)),u.result}},simulate:function(u,p,k){var x=s.extend(new s.Event,k,{type:u,isSimulated:!0});s.event.trigger(x,null,p)}}),s.fn.extend({trigger:function(u,p){return this.each(function(){s.event.trigger(u,p,this)})},triggerHandler:function(u,p){var k=this[0];if(k)return s.event.trigger(u,p,k,!0)}}),V.focusin||s.each({focus:"focusin",blur:"focusout"},function(u,p){var k=function(x){s.event.simulate(p,x.target,s.event.fix(x))};s.event.special[p]={setup:function(){var x=this.ownerDocument||this.document||this,O=we.access(x,p);O||x.addEventListener(u,k,!0),we.access(x,p,(O||0)+1)},teardown:function(){var x=this.ownerDocument||this.document||this,O=we.access(x,p)-1;O?we.access(x,p,O):(x.removeEventListener(u,k,!0),we.remove(x,p))}}});var Bi=_.location,Hi={guid:Date.now()},Ks=/\?/;s.parseXML=function(u){var p,k;if(!u||"string"!=typeof u)return null;try{p=(new _.DOMParser).parseFromString(u,"text/xml")}catch(x){}return k=p&&p.getElementsByTagName("parsererror")[0],p&&!k||s.error("Invalid XML: "+(k?s.map(k.childNodes,function(x){return x.textContent}).join("\n"):u)),p};var Ro=/\[\]$/,ks=/\r?\n/g,uo=/^(?:submit|button|image|reset|file)$/i,ua=/^(?:input|select|textarea|keygen)/i;function Gs(u,p,k,x){var O;if(Array.isArray(p))s.each(p,function(F,I){k||Ro.test(u)?x(u,I):Gs(u+"["+("object"==typeof I&&null!=I?F:"")+"]",I,k,x)});else if(k||"object"!==o(p))x(u,p);else for(O in p)Gs(u+"["+O+"]",p[O],k,x)}s.param=function(u,p){var k,x=[],O=function(F,I){var X=z(I)?I():I;x[x.length]=encodeURIComponent(F)+"="+encodeURIComponent(null==X?"":X)};if(null==u)return"";if(Array.isArray(u)||u.jquery&&!s.isPlainObject(u))s.each(u,function(){O(this.name,this.value)});else for(k in u)Gs(k,u[k],p,O);return x.join("&")},s.fn.extend({serialize:function(){return s.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var u=s.prop(this,"elements");return u?s.makeArray(u):this}).filter(function(){var u=this.type;return this.name&&!s(this).is(":disabled")&&ua.test(this.nodeName)&&!uo.test(u)&&(this.checked||!Nn.test(u))}).map(function(u,p){var k=s(this).val();return null==k?null:Array.isArray(k)?s.map(k,function(x){return{name:p.name,value:x.replace(ks,"\r\n")}}):{name:p.name,value:k.replace(ks,"\r\n")}}).get()}});var Xs=/%20/g,Zn=/#.*$/,Wo=/([?&])_=[^&]*/,Ri=/^(.*?):[ \t]*([^\r\n]*)$/gm,zr=/^(?:GET|HEAD)$/,yr=/^\/\//,ns={},ci={},co="*/".concat("*"),rs=G.createElement("a");function di(u){return function(p,k){"string"!=typeof p&&(k=p,p="*");var x,O=0,F=p.toLowerCase().match(et)||[];if(z(k))for(;x=F[O++];)"+"===x[0]?(x=x.slice(1)||"*",(u[x]=u[x]||[]).unshift(k)):(u[x]=u[x]||[]).push(k)}}function Ys(u,p,k,x){var O={},F=u===ci;function I(X){var J;return O[X]=!0,s.each(u[X]||[],function(ie,me){var Oe=me(p,k,x);return"string"!=typeof Oe||F||O[Oe]?F?!(J=Oe):void 0:(p.dataTypes.unshift(Oe),I(Oe),!1)}),J}return I(p.dataTypes[0])||!O["*"]&&I("*")}function ws(u,p){var k,x,O=s.ajaxSettings.flatOptions||{};for(k in p)void 0!==p[k]&&((O[k]?u:x||(x={}))[k]=p[k]);return x&&s.extend(!0,u,x),u}rs.href=Bi.href,s.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Bi.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Bi.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":co,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":s.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(u,p){return p?ws(ws(u,s.ajaxSettings),p):ws(s.ajaxSettings,u)},ajaxPrefilter:di(ns),ajaxTransport:di(ci),ajax:function(u,p){"object"==typeof u&&(p=u,u=void 0);var k,x,O,F,I,X,J,ie,me,Oe,U=s.ajaxSetup({},p=p||{}),ve=U.context||U,tt=U.context&&(ve.nodeType||ve.jquery)?s(ve):s.event,ht=s.Deferred(),Ze=s.Callbacks("once memory"),on=U.statusCode||{},Ln={},Ar={},nn="canceled",St={readyState:0,getResponseHeader:function(Dt){var wn;if(J){if(!F)for(F={};wn=Ri.exec(O);)F[wn[1].toLowerCase()+" "]=(F[wn[1].toLowerCase()+" "]||[]).concat(wn[2]);wn=F[Dt.toLowerCase()+" "]}return null==wn?null:wn.join(", ")},getAllResponseHeaders:function(){return J?O:null},setRequestHeader:function(Dt,wn){return null==J&&(Dt=Ar[Dt.toLowerCase()]=Ar[Dt.toLowerCase()]||Dt,Ln[Dt]=wn),this},overrideMimeType:function(Dt){return null==J&&(U.mimeType=Dt),this},statusCode:function(Dt){var wn;if(Dt)if(J)St.always(Dt[St.status]);else for(wn in Dt)on[wn]=[on[wn],Dt[wn]];return this},abort:function(Dt){var wn=Dt||nn;return k&&k.abort(wn),kr(0,wn),this}};if(ht.promise(St),U.url=((u||U.url||Bi.href)+"").replace(yr,Bi.protocol+"//"),U.type=p.method||p.type||U.method||U.type,U.dataTypes=(U.dataType||"*").toLowerCase().match(et)||[""],null==U.crossDomain){X=G.createElement("a");try{X.href=U.url,X.href=X.href,U.crossDomain=rs.protocol+"//"+rs.host!=X.protocol+"//"+X.host}catch(Dt){U.crossDomain=!0}}if(U.data&&U.processData&&"string"!=typeof U.data&&(U.data=s.param(U.data,U.traditional)),Ys(ns,U,p,St),J)return St;for(me in(ie=s.event&&U.global)&&0==s.active++&&s.event.trigger("ajaxStart"),U.type=U.type.toUpperCase(),U.hasContent=!zr.test(U.type),x=U.url.replace(Zn,""),U.hasContent?U.data&&U.processData&&0===(U.contentType||"").indexOf("application/x-www-form-urlencoded")&&(U.data=U.data.replace(Xs,"+")):(Oe=U.url.slice(x.length),U.data&&(U.processData||"string"==typeof U.data)&&(x+=(Ks.test(x)?"&":"?")+U.data,delete U.data),!1===U.cache&&(x=x.replace(Wo,"$1"),Oe=(Ks.test(x)?"&":"?")+"_="+Hi.guid+++Oe),U.url=x+Oe),U.ifModified&&(s.lastModified[x]&&St.setRequestHeader("If-Modified-Since",s.lastModified[x]),s.etag[x]&&St.setRequestHeader("If-None-Match",s.etag[x])),(U.data&&U.hasContent&&!1!==U.contentType||p.contentType)&&St.setRequestHeader("Content-Type",U.contentType),St.setRequestHeader("Accept",U.dataTypes[0]&&U.accepts[U.dataTypes[0]]?U.accepts[U.dataTypes[0]]+("*"!==U.dataTypes[0]?", "+co+"; q=0.01":""):U.accepts["*"]),U.headers)St.setRequestHeader(me,U.headers[me]);if(U.beforeSend&&(!1===U.beforeSend.call(ve,St,U)||J))return St.abort();if(nn="abort",Ze.add(U.complete),St.done(U.success),St.fail(U.error),k=Ys(ci,U,p,St)){if(St.readyState=1,ie&&tt.trigger("ajaxSend",[St,U]),J)return St;U.async&&0<U.timeout&&(I=_.setTimeout(function(){St.abort("timeout")},U.timeout));try{J=!1,k.send(Ln,kr)}catch(Dt){if(J)throw Dt;kr(-1,Dt)}}else kr(-1,"No Transport");function kr(Dt,wn,os,Ur){var Fn,hi,Sn,dt,Kr,Qt=wn;J||(J=!0,I&&_.clearTimeout(I),k=void 0,O=Ur||"",St.readyState=0<Dt?4:0,Fn=200<=Dt&&Dt<300||304===Dt,os&&(dt=function(bn,ur,Xn){for(var er,wt,Bt,fn,wr=bn.contents,On=bn.dataTypes;"*"===On[0];)On.shift(),void 0===er&&(er=bn.mimeType||ur.getResponseHeader("Content-Type"));if(er)for(wt in wr)if(wr[wt]&&wr[wt].test(er)){On.unshift(wt);break}if(On[0]in Xn)Bt=On[0];else{for(wt in Xn){if(!On[0]||bn.converters[wt+" "+On[0]]){Bt=wt;break}fn||(fn=wt)}Bt=Bt||fn}if(Bt)return Bt!==On[0]&&On.unshift(Bt),Xn[Bt]}(U,St,os)),!Fn&&-1<s.inArray("script",U.dataTypes)&&s.inArray("json",U.dataTypes)<0&&(U.converters["text script"]=function(){}),dt=function(bn,ur,Xn,er){var wt,Bt,fn,wr,On,br={},Wi=bn.dataTypes.slice();if(Wi[1])for(fn in bn.converters)br[fn.toLowerCase()]=bn.converters[fn];for(Bt=Wi.shift();Bt;)if(bn.responseFields[Bt]&&(Xn[bn.responseFields[Bt]]=ur),!On&&er&&bn.dataFilter&&(ur=bn.dataFilter(ur,bn.dataType)),On=Bt,Bt=Wi.shift())if("*"===Bt)Bt=On;else if("*"!==On&&On!==Bt){if(!(fn=br[On+" "+Bt]||br["* "+Bt]))for(wt in br)if((wr=wt.split(" "))[1]===Bt&&(fn=br[On+" "+wr[0]]||br["* "+wr[0]])){!0===fn?fn=br[wt]:!0!==br[wt]&&(Bt=wr[0],Wi.unshift(wr[1]));break}if(!0!==fn)if(fn&&bn.throws)ur=fn(ur);else try{ur=fn(ur)}catch(bs){return{state:"parsererror",error:fn?bs:"No conversion from "+On+" to "+Bt}}}return{state:"success",data:ur}}(U,dt,St,Fn),Fn?(U.ifModified&&((Kr=St.getResponseHeader("Last-Modified"))&&(s.lastModified[x]=Kr),(Kr=St.getResponseHeader("etag"))&&(s.etag[x]=Kr)),204===Dt||"HEAD"===U.type?Qt="nocontent":304===Dt?Qt="notmodified":(Qt=dt.state,hi=dt.data,Fn=!(Sn=dt.error))):(Sn=Qt,!Dt&&Qt||(Qt="error",Dt<0&&(Dt=0))),St.status=Dt,St.statusText=(wn||Qt)+"",Fn?ht.resolveWith(ve,[hi,Qt,St]):ht.rejectWith(ve,[St,Qt,Sn]),St.statusCode(on),on=void 0,ie&&tt.trigger(Fn?"ajaxSuccess":"ajaxError",[St,U,Fn?hi:Sn]),Ze.fireWith(ve,[St,Qt]),ie&&(tt.trigger("ajaxComplete",[St,U]),--s.active||s.event.trigger("ajaxStop")))}return St},getJSON:function(u,p,k){return s.get(u,p,k,"json")},getScript:function(u,p){return s.get(u,void 0,p,"script")}}),s.each(["get","post"],function(u,p){s[p]=function(k,x,O,F){return z(x)&&(F=F||O,O=x,x=void 0),s.ajax(s.extend({url:k,type:p,dataType:F,data:x,success:O},s.isPlainObject(k)&&k))}}),s.ajaxPrefilter(function(u){var p;for(p in u.headers)"content-type"===p.toLowerCase()&&(u.contentType=u.headers[p]||"")}),s._evalUrl=function(u,p,k){return s.ajax({url:u,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(x){s.globalEval(x,p,k)}})},s.fn.extend({wrapAll:function(u){var p;return this[0]&&(z(u)&&(u=u.call(this[0])),p=s(u,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&p.insertBefore(this[0]),p.map(function(){for(var k=this;k.firstElementChild;)k=k.firstElementChild;return k}).append(this)),this},wrapInner:function(u){return z(u)?this.each(function(p){s(this).wrapInner(u.call(this,p))}):this.each(function(){var p=s(this),k=p.contents();k.length?k.wrapAll(u):p.append(u)})},wrap:function(u){var p=z(u);return this.each(function(k){s(this).wrapAll(p?u.call(this,k):u)})},unwrap:function(u){return this.parent(u).not("body").each(function(){s(this).replaceWith(this.childNodes)}),this}}),s.expr.pseudos.hidden=function(u){return!s.expr.pseudos.visible(u)},s.expr.pseudos.visible=function(u){return!!(u.offsetWidth||u.offsetHeight||u.getClientRects().length)},s.ajaxSettings.xhr=function(){try{return new _.XMLHttpRequest}catch(u){}};var lr={0:200,1223:204},Gn=s.ajaxSettings.xhr();V.cors=!!Gn&&"withCredentials"in Gn,V.ajax=Gn=!!Gn,s.ajaxTransport(function(u){var p,k;if(V.cors||Gn&&!u.crossDomain)return{send:function(x,O){var F,I=u.xhr();if(I.open(u.type,u.url,u.async,u.username,u.password),u.xhrFields)for(F in u.xhrFields)I[F]=u.xhrFields[F];for(F in u.mimeType&&I.overrideMimeType&&I.overrideMimeType(u.mimeType),u.crossDomain||x["X-Requested-With"]||(x["X-Requested-With"]="XMLHttpRequest"),x)I.setRequestHeader(F,x[F]);p=function(X){return function(){p&&(p=k=I.onload=I.onerror=I.onabort=I.ontimeout=I.onreadystatechange=null,"abort"===X?I.abort():"error"===X?"number"!=typeof I.status?O(0,"error"):O(I.status,I.statusText):O(lr[I.status]||I.status,I.statusText,"text"!==(I.responseType||"text")||"string"!=typeof I.responseText?{binary:I.response}:{text:I.responseText},I.getAllResponseHeaders()))}},I.onload=p(),k=I.onerror=I.ontimeout=p("error"),void 0!==I.onabort?I.onabort=k:I.onreadystatechange=function(){4===I.readyState&&_.setTimeout(function(){p&&k()})},p=p("abort");try{I.send(u.hasContent&&u.data||null)}catch(X){if(p)throw X}},abort:function(){p&&p()}}}),s.ajaxPrefilter(function(u){u.crossDomain&&(u.contents.script=!1)}),s.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(u){return s.globalEval(u),u}}}),s.ajaxPrefilter("script",function(u){void 0===u.cache&&(u.cache=!1),u.crossDomain&&(u.type="GET")}),s.ajaxTransport("script",function(u){var p,k;if(u.crossDomain||u.scriptAttrs)return{send:function(x,O){p=s("<script>").attr(u.scriptAttrs||{}).prop({charset:u.scriptCharset,src:u.url}).on("load error",k=function(F){p.remove(),k=null,F&&O("error"===F.type?404:200,F.type)}),G.head.appendChild(p[0])},abort:function(){k&&k()}}});var qr,is=[],ss=/(=)\?(?=&|$)|\?\?/;s.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var u=is.pop()||s.expando+"_"+Hi.guid++;return this[u]=!0,u}}),s.ajaxPrefilter("json jsonp",function(u,p,k){var x,O,F,I=!1!==u.jsonp&&(ss.test(u.url)?"url":"string"==typeof u.data&&0===(u.contentType||"").indexOf("application/x-www-form-urlencoded")&&ss.test(u.data)&&"data");if(I||"jsonp"===u.dataTypes[0])return x=u.jsonpCallback=z(u.jsonpCallback)?u.jsonpCallback():u.jsonpCallback,I?u[I]=u[I].replace(ss,"$1"+x):!1!==u.jsonp&&(u.url+=(Ks.test(u.url)?"&":"?")+u.jsonp+"="+x),u.converters["script json"]=function(){return F||s.error(x+" was not called"),F[0]},u.dataTypes[0]="json",O=_[x],_[x]=function(){F=arguments},k.always(function(){void 0===O?s(_).removeProp(x):_[x]=O,u[x]&&(u.jsonpCallback=p.jsonpCallback,is.push(x)),F&&z(O)&&O(F[0]),F=O=void 0}),"script"}),V.createHTMLDocument=((qr=G.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===qr.childNodes.length),s.parseHTML=function(u,p,k){return"string"!=typeof u?[]:("boolean"==typeof p&&(k=p,p=!1),p||(V.createHTMLDocument?((x=(p=G.implementation.createHTMLDocument("")).createElement("base")).href=G.location.href,p.head.appendChild(x)):p=G),F=!k&&[],(O=M.exec(u))?[p.createElement(O[1])]:(O=Jn([u],p,F),F&&F.length&&s(F).remove(),s.merge([],O.childNodes)));var x,O,F},s.fn.load=function(u,p,k){var x,O,F,I=this,X=u.indexOf(" ");return-1<X&&(x=Sr(u.slice(X)),u=u.slice(0,X)),z(p)?(k=p,p=void 0):p&&"object"==typeof p&&(O="POST"),0<I.length&&s.ajax({url:u,type:O||"GET",dataType:"html",data:p}).done(function(J){F=arguments,I.html(x?s("<div>").append(s.parseHTML(J)).find(x):J)}).always(k&&function(J,ie){I.each(function(){k.apply(this,F||[J.responseText,ie,J])})}),this},s.expr.pseudos.animated=function(u){return s.grep(s.timers,function(p){return u===p.elem}).length},s.offset={setOffset:function(u,p,k){var x,O,F,I,X,J,ie=s.css(u,"position"),me=s(u),Oe={};"static"===ie&&(u.style.position="relative"),X=me.offset(),F=s.css(u,"top"),J=s.css(u,"left"),("absolute"===ie||"fixed"===ie)&&-1<(F+J).indexOf("auto")?(I=(x=me.position()).top,O=x.left):(I=parseFloat(F)||0,O=parseFloat(J)||0),z(p)&&(p=p.call(u,k,s.extend({},X))),null!=p.top&&(Oe.top=p.top-X.top+I),null!=p.left&&(Oe.left=p.left-X.left+O),"using"in p?p.using.call(u,Oe):me.css(Oe)}},s.fn.extend({offset:function(u){if(arguments.length)return void 0===u?this:this.each(function(O){s.offset.setOffset(this,u,O)});var p,k,x=this[0];return x?x.getClientRects().length?{top:(p=x.getBoundingClientRect()).top+(k=x.ownerDocument.defaultView).pageYOffset,left:p.left+k.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var u,p,k,x=this[0],O={top:0,left:0};if("fixed"===s.css(x,"position"))p=x.getBoundingClientRect();else{for(p=this.offset(),k=x.ownerDocument,u=x.offsetParent||k.documentElement;u&&(u===k.body||u===k.documentElement)&&"static"===s.css(u,"position");)u=u.parentNode;u&&u!==x&&1===u.nodeType&&((O=s(u).offset()).top+=s.css(u,"borderTopWidth",!0),O.left+=s.css(u,"borderLeftWidth",!0))}return{top:p.top-O.top-s.css(x,"marginTop",!0),left:p.left-O.left-s.css(x,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var u=this.offsetParent;u&&"static"===s.css(u,"position");)u=u.offsetParent;return u||Pe})}}),s.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(u,p){var k="pageYOffset"===p;s.fn[u]=function(x){return ot(this,function(O,F,I){var X;if(ke(O)?X=O:9===O.nodeType&&(X=O.defaultView),void 0===I)return X?X[p]:O[F];X?X.scrollTo(k?X.pageXOffset:I,k?I:X.pageYOffset):O[F]=I},u,x,arguments.length)}}),s.each(["top","left"],function(u,p){s.cssHooks[p]=es(V.pixelPosition,function(k,x){if(x)return x=En(k,p),Ti.test(x)?s(k).position()[p]+"px":x})}),s.each({Height:"height",Width:"width"},function(u,p){s.each({padding:"inner"+u,content:p,"":"outer"+u},function(k,x){s.fn[x]=function(O,F){var I=arguments.length&&(k||"boolean"!=typeof O),X=k||(!0===O||!0===F?"margin":"border");return ot(this,function(J,ie,me){var Oe;return ke(J)?0===x.indexOf("outer")?J["inner"+u]:J.document.documentElement["client"+u]:9===J.nodeType?(Oe=J.documentElement,Math.max(J.body["scroll"+u],Oe["scroll"+u],J.body["offset"+u],Oe["offset"+u],Oe["client"+u])):void 0===me?s.css(J,ie,X):s.style(J,ie,me,X)},p,I?O:void 0,I)}})}),s.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(u,p){s.fn[p]=function(k){return this.on(p,k)}}),s.fn.extend({bind:function(u,p,k){return this.on(u,null,p,k)},unbind:function(u,p){return this.off(u,null,p)},delegate:function(u,p,k,x){return this.on(p,u,k,x)},undelegate:function(u,p,k){return 1===arguments.length?this.off(u,"**"):this.off(p,u||"**",k)},hover:function(u,p){return this.mouseenter(u).mouseleave(p||u)}}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(u,p){s.fn[p]=function(k,x){return 0<arguments.length?this.on(p,null,k,x):this.trigger(p)}});var zo=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;s.proxy=function(u,p){var k,x,O;if("string"==typeof p&&(k=u[p],p=u,u=k),z(u))return x=Qe.call(arguments,2),(O=function(){return u.apply(p||this,x.concat(Qe.call(arguments)))}).guid=u.guid=u.guid||s.guid++,O},s.holdReady=function(u){u?s.readyWait++:s.ready(!0)},s.isArray=Array.isArray,s.parseJSON=JSON.parse,s.nodeName=j,s.isFunction=z,s.isWindow=ke,s.camelCase=Et,s.type=o,s.now=Date.now,s.isNumeric=function(u){var p=s.type(u);return("number"===p||"string"===p)&&!isNaN(u-parseFloat(u))},s.trim=function(u){return null==u?"":(u+"").replace(zo,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return s});var qo=_.jQuery,Vs=_.$;return s.noConflict=function(u){return _.$===s&&(_.$=Vs),u&&_.jQuery===s&&(_.jQuery=qo),s},void 0===ue&&(_.jQuery=_.$=s),s}),function(_){"function"==typeof define&&define.amd?define(_):_()}(function(){"use strict";var _,ue,De="function"==typeof Map?new Map:(_=[],ue=[],{has:function(w){return _.indexOf(w)>-1},get:function(w){return ue[_.indexOf(w)]},set:function(w,l){-1===_.indexOf(w)&&(_.push(w),ue.push(l))},delete:function(w){var l=_.indexOf(w);l>-1&&(_.splice(l,1),ue.splice(l,1))}}),Be=function(w){return new Event(w,{bubbles:!0})};try{new Event("test")}catch(w){Be=function(l){var h=document.createEvent("Event");return h.initEvent(l,!0,!1),h}}function Qe(w){var l=De.get(w);l&&l.destroy()}function je(w){var l=De.get(w);l&&l.update()}var pe=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((pe=function(w){return w}).destroy=function(w){return w},pe.update=function(w){return w}):((pe=function(w,l){return w&&Array.prototype.forEach.call(w.length?w:[w],function(h){return function(v){if(v&&v.nodeName&&"TEXTAREA"===v.nodeName&&!De.has(v)){var C,P=null,H=null,W=null,re=function(){v.clientWidth!==H&&lt()},ce=function(rt){window.removeEventListener("resize",re,!1),v.removeEventListener("input",lt,!1),v.removeEventListener("keyup",lt,!1),v.removeEventListener("autosize:destroy",ce,!1),v.removeEventListener("autosize:update",lt,!1),Object.keys(rt).forEach(function(Ye){v.style[Ye]=rt[Ye]}),De.delete(v)}.bind(v,{height:v.style.height,resize:v.style.resize,overflowY:v.style.overflowY,overflowX:v.style.overflowX,wordWrap:v.style.wordWrap});v.addEventListener("autosize:destroy",ce,!1),"onpropertychange"in v&&"oninput"in v&&v.addEventListener("keyup",lt,!1),window.addEventListener("resize",re,!1),v.addEventListener("input",lt,!1),v.addEventListener("autosize:update",lt,!1),v.style.overflowX="hidden",v.style.wordWrap="break-word",De.set(v,{destroy:ce,update:lt}),"vertical"===(C=window.getComputedStyle(v,null)).resize?v.style.resize="none":"both"===C.resize&&(v.style.resize="horizontal"),P="content-box"===C.boxSizing?-(parseFloat(C.paddingTop)+parseFloat(C.paddingBottom)):parseFloat(C.borderTopWidth)+parseFloat(C.borderBottomWidth),isNaN(P)&&(P=0),lt()}function Ee(rt){var Ye=v.style.width;v.style.width="0px",v.style.width=Ye,v.style.overflowY=rt}function Te(){if(0!==v.scrollHeight){var rt=function(nt){for(var at=[];nt&&nt.parentNode&&nt.parentNode instanceof Element;)nt.parentNode.scrollTop&&at.push({node:nt.parentNode,scrollTop:nt.parentNode.scrollTop}),nt=nt.parentNode;return at}(v),Ye=document.documentElement&&document.documentElement.scrollTop;v.style.height="",v.style.height=v.scrollHeight+P+"px",H=v.clientWidth,rt.forEach(function(nt){nt.node.scrollTop=nt.scrollTop}),Ye&&(document.documentElement.scrollTop=Ye)}}function lt(){Te();var rt=Math.round(parseFloat(v.style.height)),Ye=window.getComputedStyle(v,null),nt="content-box"===Ye.boxSizing?Math.round(parseFloat(Ye.height)):v.offsetHeight;if(nt<rt?"hidden"===Ye.overflowY&&(Ee("scroll"),Te(),nt="content-box"===Ye.boxSizing?Math.round(parseFloat(window.getComputedStyle(v,null).height)):v.offsetHeight):"hidden"!==Ye.overflowY&&(Ee("hidden"),Te(),nt="content-box"===Ye.boxSizing?Math.round(parseFloat(window.getComputedStyle(v,null).height)):v.offsetHeight),W!==nt){W=nt;var at=Be("autosize:resized");try{v.dispatchEvent(at)}catch(Gt){}}}}(h)}),w}).destroy=function(w){return w&&Array.prototype.forEach.call(w.length?w:[w],Qe),w},pe.update=function(w){return w&&Array.prototype.forEach.call(w.length?w:[w],je),w});var xe=pe,$=document.querySelectorAll('[data-bs-toggle="autosize"]');function ye(w){return(ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(w)}function Z(w,l){if(!(w instanceof l))throw new TypeError("Cannot call a class as a function")}function oe(w,l){for(var h=0;h<l.length;h++){var v=l[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function fe(w,l,h){return l&&oe(w.prototype,l),h&&oe(w,h),w}function V(w,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(l&&l.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),l&&ke(w,l)}function z(w){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(w)}function ke(w,l){return(ke=Object.setPrototypeOf||function(h,v){return h.__proto__=v,h})(w,l)}function G(w,l){if(null==w)return{};var h,v,C=function(H,W){if(null==H)return{};var re,ce,Ee={},Te=Object.keys(H);for(ce=0;ce<Te.length;ce++)W.indexOf(re=Te[ce])>=0||(Ee[re]=H[re]);return Ee}(w,l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);for(v=0;v<P.length;v++)l.indexOf(h=P[v])>=0||Object.prototype.propertyIsEnumerable.call(w,h)&&(C[h]=w[h])}return C}function i(w,l){if(l&&("object"==typeof l||"function"==typeof l))return l;if(void 0!==l)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(void 0===h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(w)}function f(w){var l=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}();return function(){var h,v=z(w);if(l){var C=z(this).constructor;h=Reflect.construct(v,arguments,C)}else h=v.apply(this,arguments);return i(this,h)}}function o(w,l){for(;!Object.prototype.hasOwnProperty.call(w,l)&&null!==(w=z(w)););return w}function c(w,l,h){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(v,C,P){var H=o(v,C);if(H){var W=Object.getOwnPropertyDescriptor(H,C);return W.get?W.get.call(P):W.value}})(w,l,h||w)}function s(w,l,h,v){return(s="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(C,P,H,W){var re,Ee,Te,lt,ce=o(C,P);if(ce){if((re=Object.getOwnPropertyDescriptor(ce,P)).set)return re.set.call(W,H),!0;if(!re.writable)return!1}if(re=Object.getOwnPropertyDescriptor(W,P)){if(!re.writable)return!1;re.value=H,Object.defineProperty(W,P,re)}else lt=H,(Te=P)in(Ee=W)?Object.defineProperty(Ee,Te,{value:lt,enumerable:!0,configurable:!0,writable:!0}):Ee[Te]=lt;return!0})(w,l,h,v)}function g(w,l,h,v,C){if(!s(w,l,h,v||w)&&C)throw new Error("failed to set property");return h}function m(w,l){return function(h){if(Array.isArray(h))return h}(w)||function(h,v){var C=null==h?null:"undefined"!=typeof Symbol&&h[Symbol.iterator]||h["@@iterator"];if(null!=C){var P,H,W=[],re=!0,ce=!1;try{for(C=C.call(h);!(re=(P=C.next()).done)&&(W.push(P.value),!v||W.length!==v);re=!0);}catch(Ee){ce=!0,H=Ee}finally{try{re||null==C.return||C.return()}finally{if(ce)throw H}}return W}}(w,l)||function(h,v){if(h){if("string"==typeof h)return A(h,v);var C=Object.prototype.toString.call(h).slice(8,-1);if("Object"===C&&h.constructor&&(C=h.constructor.name),"Map"===C||"Set"===C)return Array.from(h);if("Arguments"===C||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return A(h,v)}}(w,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(w,l){(null==l||l>w.length)&&(l=w.length);for(var h=0,v=new Array(l);h<l;h++)v[h]=w[h];return v}function E(w){return"string"==typeof w||w instanceof String}$.length&&$.forEach(function(w){xe(w)});function j(w){return w.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var M=function(){function w(l,h,v,C){for(Z(this,w),this.value=l,this.cursorPos=h,this.oldValue=v,this.oldSelection=C;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return fe(w,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?"NONE":this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?"RIGHT":"LEFT"}}]),w}(),N=function(){function w(l){Z(this,w),Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},l)}return fe(w,[{key:"aggregate",value:function(l){return this.rawInserted+=l.rawInserted,this.skip=this.skip||l.skip,this.inserted+=l.inserted,this.tailShift+=l.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),w}(),te=function(){function w(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,v=arguments.length>2?arguments[2]:void 0;Z(this,w),this.value=l,this.from=h,this.stop=v}return fe(w,[{key:"toString",value:function(){return this.value}},{key:"extend",value:function(l){this.value+=String(l)}},{key:"appendTo",value:function(l){return l.append(this.toString(),{tail:!0}).aggregate(l._appendPlaceholder())}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(l){Object.assign(this,l)}},{key:"shiftBefore",value:function(l){if(this.from>=l||!this.value.length)return"";var h=this.value[0];return this.value=this.value.slice(1),h}}]),w}();function Q(w){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Q.InputMask(w,l)}var ae=function(){function w(l){Z(this,w),this._value="",this._update(Object.assign({},w.DEFAULTS,l)),this.isInitialized=!0}return fe(w,[{key:"updateOptions",value:function(l){Object.keys(l).length&&this.withValueRefresh(this._update.bind(this,l))}},{key:"_update",value:function(l){Object.assign(this,l)}},{key:"state",get:function(){return{_value:this.value}},set:function(l){this._value=l._value}},{key:"reset",value:function(){this._value=""}},{key:"value",get:function(){return this._value},set:function(l){this.resolve(l)}},{key:"resolve",value:function(l){return this.reset(),this.append(l,{input:!0},""),this.doCommit(),this.value}},{key:"unmaskedValue",get:function(){return this.value},set:function(l){this.reset(),this.append(l,{},""),this.doCommit()}},{key:"typedValue",get:function(){return this.doParse(this.value)},set:function(l){this.value=this.doFormat(l)}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(l){this.reset(),this.append(l,{raw:!0},""),this.doCommit()}},{key:"isComplete",get:function(){return!0}},{key:"nearestInputPos",value:function(l,h){return l}},{key:"extractInput",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(l,h)}},{key:"extractTail",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new te(this.extractInput(l,h),l)}},{key:"appendTail",value:function(l){return E(l)&&(l=new te(String(l))),l.appendTo(this)}},{key:"_appendCharRaw",value:function(l){return l?(this._value+=l,new N({inserted:l,rawInserted:l})):new N}},{key:"_appendChar",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,C=this.state,P=this._appendCharRaw(this.doPrepare(l,h),h);if(P.inserted){var H,W=!1!==this.doValidate(h);if(W&&null!=v){var re=this.state;this.overwrite&&(H=v.state,v.shiftBefore(this.value.length));var ce=this.appendTail(v);(W=ce.rawInserted===v.toString())&&ce.inserted&&(this.state=re)}W||(P=new N,this.state=C,v&&H&&(v.state=H))}return P}},{key:"_appendPlaceholder",value:function(){return new N}},{key:"append",value:function(l,h,v){if(!E(l))throw new Error("value should be string");var C=new N,P=E(v)?new te(String(v)):v;h&&h.tail&&(h._beforeTailState=this.state);for(var H=0;H<l.length;++H)C.aggregate(this._appendChar(l[H],h,P));return null!=P&&(C.tailShift+=this.appendTail(P).tailShift),C}},{key:"remove",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,l)+this.value.slice(h),new N}},{key:"withValueRefresh",value:function(l){if(this._refreshing||!this.isInitialized)return l();this._refreshing=!0;var h=this.rawInputValue,v=this.value,C=l();return this.rawInputValue=h,this.value&&this.value!==v&&0===v.indexOf(this.value)&&this.append(v.slice(this.value.length),{},""),delete this._refreshing,C}},{key:"runIsolated",value:function(l){if(this._isolated||!this.isInitialized)return l(this);this._isolated=!0;var h=this.state,v=l(this);return this.state=h,delete this._isolated,v}},{key:"doPrepare",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(l,this,h):l}},{key:"doValidate",value:function(l){return(!this.validate||this.validate(this.value,this,l))&&(!this.parent||this.parent.doValidate(l))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"doFormat",value:function(l){return this.format?this.format(l,this):l}},{key:"doParse",value:function(l){return this.parse?this.parse(l,this):l}},{key:"splice",value:function(l,h,v,C){var H=this.extractTail(l+h),W=this.nearestInputPos(l,C);return new N({tailShift:W-l}).aggregate(this.remove(W)).aggregate(this.append(v,{input:!0},H))}}]),w}();function le(w){if(null==w)throw new Error("mask property should be defined");return w instanceof RegExp?Q.MaskedRegExp:E(w)?Q.MaskedPattern:w instanceof Date||w===Date?Q.MaskedDate:w instanceof Number||"number"==typeof w||w===Number?Q.MaskedNumber:Array.isArray(w)||w===Array?Q.MaskedDynamic:Q.Masked&&w.prototype instanceof Q.Masked?w:w instanceof Function?Q.MaskedFunction:w instanceof Q.Masked?w.constructor:(console.warn("Mask not found for mask",w),Q.Masked)}function Re(w){if(Q.Masked&&w instanceof Q.Masked)return w;var l=(w=Object.assign({},w)).mask;if(Q.Masked&&l instanceof Q.Masked)return l;var h=le(l);if(!h)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new h(w)}ae.DEFAULTS={format:function(w){return w},parse:function(w){return w}},Q.Masked=ae,Q.createMask=Re;var et=["mask"],Ve={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},Ge=function(){function w(l){Z(this,w);var h=l.mask,v=G(l,et);this.masked=Re({mask:h}),Object.assign(this,v)}return fe(w,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===l&&h>=1?(this._isFilled=!1,this.masked.remove(l,h)):new N}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"_appendChar",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new N;var v=this.masked.state,C=this.masked._appendChar(l,h);return C.inserted&&!1===this.doValidate(h)&&(C.inserted=C.rawInserted="",this.masked.state=v),C.inserted||this.isOptional||this.lazy||h.input||(C.inserted=this.placeholderChar),C.skip=!C.inserted&&!this.isOptional,this._isFilled=Boolean(C.inserted),C}},{key:"append",value:function(){var l;return(l=this.masked).append.apply(l,arguments)}},{key:"_appendPlaceholder",value:function(){var l=new N;return this._isFilled||this.isOptional||(this._isFilled=!0,l.inserted=this.placeholderChar),l}},{key:"extractTail",value:function(){var l;return(l=this.masked).extractTail.apply(l,arguments)}},{key:"appendTail",value:function(){var l;return(l=this.masked).appendTail.apply(l,arguments)}},{key:"extractInput",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,v=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(l,h,v)}},{key:"nearestInputPos",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",v=this.value.length,C=Math.min(Math.max(l,0),v);switch(h){case"LEFT":case"FORCE_LEFT":return this.isComplete?C:0;case"RIGHT":case"FORCE_RIGHT":return this.isComplete?C:v;default:return C}}},{key:"doValidate",value:function(){var l,h;return(l=this.masked).doValidate.apply(l,arguments)&&(!this.parent||(h=this.parent).doValidate.apply(h,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(l){this.masked.state=l.masked,this._isFilled=l._isFilled}}]),w}(),jt=function(){function w(l){Z(this,w),Object.assign(this,l),this._value=""}return fe(w,[{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,l)+this._value.slice(h),this._value||(this._isRawInput=!1),new N}},{key:"nearestInputPos",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",v=this._value.length;switch(h){case"LEFT":case"FORCE_LEFT":return 0;default:return v}}},{key:"extractInput",value:function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(l,h)||""}},{key:"isComplete",get:function(){return!0}},{key:"_appendChar",value:function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=new N;if(this._value)return v;var C=this.char===l[0]&&(this.isUnmasking||h.input||h.raw)&&!h.tail;return C&&(v.rawInserted=this.char),this._value=v.inserted=this.char,this._isRawInput=C&&(h.raw||h.input),v}},{key:"_appendPlaceholder",value:function(){var l=new N;return this._value||(this._value=l.inserted=this.char),l}},{key:"extractTail",value:function(){return new te("")}},{key:"appendTail",value:function(l){return E(l)&&(l=new te(String(l))),l.appendTo(this)}},{key:"append",value:function(l,h,v){var C=this._appendChar(l,h);return null!=v&&(C.tailShift+=this.appendTail(v).tailShift),C}},{key:"doCommit",value:function(){}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(l){Object.assign(this,l)}}]),w}(),Tt=["chunks"],Le=function(){function w(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Z(this,w),this.chunks=l,this.from=h}return fe(w,[{key:"toString",value:function(){return this.chunks.map(String).join("")}},{key:"extend",value:function(l){if(String(l)){E(l)&&(l=new te(String(l)));var h=this.chunks[this.chunks.length-1],v=h&&(h.stop===l.stop||null==l.stop)&&l.from===h.from+h.toString().length;if(l instanceof te)v?h.extend(l.toString()):this.chunks.push(l);else if(l instanceof w){if(null==l.stop)for(var C;l.chunks.length&&null==l.chunks[0].stop;)(C=l.chunks.shift()).from+=l.from,this.extend(C);l.toString()&&(l.stop=l.blockIndex,this.chunks.push(l))}}}},{key:"appendTo",value:function(l){if(!(l instanceof Q.MaskedPattern))return new te(this.toString()).appendTo(l);for(var h=new N,v=0;v<this.chunks.length&&!h.skip;++v){var C=this.chunks[v],P=l._mapPosToBlock(l.value.length),H=C.stop,W=void 0;if(null!=H&&(!P||P.index<=H)&&((C instanceof w||l._stops.indexOf(H)>=0)&&h.aggregate(l._appendPlaceholder(H)),W=C instanceof w&&l._blocks[H]),W){var re=W.appendTail(C);re.skip=!1,h.aggregate(re),l._value+=re.inserted;var ce=C.toString().slice(re.rawInserted.length);ce&&h.aggregate(l.append(ce,{tail:!0}))}else h.aggregate(l.append(C.toString(),{tail:!0}))}return h}},{key:"state",get:function(){return{chunks:this.chunks.map(function(l){return l.state}),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(l){var h=l.chunks,v=G(l,Tt);Object.assign(this,v),this.chunks=h.map(function(C){var P="chunks"in C?new w:new te;return P.state=C,P})}},{key:"shiftBefore",value:function(l){if(this.from>=l||!this.chunks.length)return"";for(var h=l-this.from,v=0;v<this.chunks.length;){var C=this.chunks[v],P=C.shiftBefore(h);if(C.toString()){if(!P)break;++v}else this.chunks.splice(v,1);if(P)return P}return""}}]),w}(),Xe=function(w){V(h,ae);var l=f(h);function h(){return Z(this,h),l.apply(this,arguments)}return fe(h,[{key:"_update",value:function(v){v.mask&&(v.validate=function(C){return C.search(v.mask)>=0}),c(z(h.prototype),"_update",this).call(this,v)}}]),h}();Q.MaskedRegExp=Xe;var ot=["_blocks"],ft=function(w){V(h,ae);var l=f(h);function h(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Z(this,h),v.definitions=Object.assign({},Ve,v.definitions),l.call(this,Object.assign({},h.DEFAULTS,v))}return fe(h,[{key:"_update",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v.definitions=Object.assign({},this.definitions,v.definitions),c(z(h.prototype),"_update",this).call(this,v),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var v=this,C=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var P=this.mask;if(P&&C)for(var H=!1,W=!1,re=0;re<P.length;++re)if(!this.blocks||"continue"!==function(){var lt=P.slice(re),rt=Object.keys(v.blocks).filter(function(at){return 0===lt.indexOf(at)});rt.sort(function(at,Gt){return Gt.length-at.length});var Ye=rt[0];if(Ye){var nt=Re(Object.assign({parent:v,lazy:v.lazy,placeholderChar:v.placeholderChar,overwrite:v.overwrite},v.blocks[Ye]));return nt&&(v._blocks.push(nt),v._maskedBlocks[Ye]||(v._maskedBlocks[Ye]=[]),v._maskedBlocks[Ye].push(v._blocks.length-1)),re+=Ye.length-1,"continue"}}()){var ce=P[re],Ee=ce in C;if(ce!==h.STOP_CHAR)if("{"!==ce&&"}"!==ce)if("["!==ce&&"]"!==ce){if(ce===h.ESCAPE_CHAR){if(!(ce=P[++re]))break;Ee=!1}var Te=Ee?new Ge({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:C[ce],isOptional:W}):new jt({char:ce,isUnmasking:H});this._blocks.push(Te)}else W=!W;else H=!H;else this._stops.push(this._blocks.length)}}},{key:"state",get:function(){return Object.assign({},c(z(h.prototype),"state",this),{_blocks:this._blocks.map(function(v){return v.state})})},set:function(v){var C=v._blocks,P=G(v,ot);this._blocks.forEach(function(H,W){return H.state=C[W]}),g(z(h.prototype),"state",P,this,!0)}},{key:"reset",value:function(){c(z(h.prototype),"reset",this).call(this),this._blocks.forEach(function(v){return v.reset()})}},{key:"isComplete",get:function(){return this._blocks.every(function(v){return v.isComplete})}},{key:"doCommit",value:function(){this._blocks.forEach(function(v){return v.doCommit()}),c(z(h.prototype),"doCommit",this).call(this)}},{key:"unmaskedValue",get:function(){return this._blocks.reduce(function(v,C){return v+C.unmaskedValue},"")},set:function(v){g(z(h.prototype),"unmaskedValue",v,this,!0)}},{key:"value",get:function(){return this._blocks.reduce(function(v,C){return v+C.value},"")},set:function(v){g(z(h.prototype),"value",v,this,!0)}},{key:"appendTail",value:function(v){return c(z(h.prototype),"appendTail",this).call(this,v).aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},P=this._mapPosToBlock(this.value.length),H=new N;if(!P)return H;for(var W=P.index;;++W){var re=this._blocks[W];if(!re)break;var ce=re._appendChar(v,C),Ee=ce.skip;if(H.aggregate(ce),Ee||ce.rawInserted)break}return H}},{key:"extractTail",value:function(){var v=this,C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,P=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,H=new Le;return C===P||this._forEachBlocksInRange(C,P,function(W,re,ce,Ee){var Te=W.extractTail(ce,Ee);Te.stop=v._findStopBefore(re),Te.from=v._blockStartPos(re),Te instanceof Le&&(Te.blockIndex=re),H.extend(Te)}),H}},{key:"extractInput",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,P=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(v===C)return"";var H="";return this._forEachBlocksInRange(v,C,function(W,re,ce,Ee){H+=W.extractInput(ce,Ee,P)}),H}},{key:"_findStopBefore",value:function(v){for(var C,P=0;P<this._stops.length;++P){var H=this._stops[P];if(!(H<=v))break;C=H}return C}},{key:"_appendPlaceholder",value:function(v){var C=this,P=new N;if(this.lazy&&null==v)return P;var H=this._mapPosToBlock(this.value.length);return H?(this._blocks.slice(H.index,null!=v?v:this._blocks.length).forEach(function(ce){if(!ce.lazy||null!=v){var Te=ce._appendPlaceholder.apply(ce,null!=ce._blocks?[ce._blocks.length]:[]);C._value+=Te.inserted,P.aggregate(Te)}}),P):P}},{key:"_mapPosToBlock",value:function(v){for(var C="",P=0;P<this._blocks.length;++P){var W=C.length;if(v<=(C+=this._blocks[P].value).length)return{index:P,offset:v-W}}}},{key:"_blockStartPos",value:function(v){return this._blocks.slice(0,v).reduce(function(C,P){return C+P.value.length},0)}},{key:"_forEachBlocksInRange",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,P=arguments.length>2?arguments[2]:void 0,H=this._mapPosToBlock(v);if(H){var W=this._mapPosToBlock(C),re=W&&H.index===W.index,ce=H.offset,Ee=W&&re?W.offset:this._blocks[H.index].value.length;if(P(this._blocks[H.index],H.index,ce,Ee),W&&!re){for(var Te=H.index+1;Te<W.index;++Te)P(this._blocks[Te],Te,0,this._blocks[Te].value.length);P(this._blocks[W.index],W.index,0,W.offset)}}}},{key:"remove",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,P=c(z(h.prototype),"remove",this).call(this,v,C);return this._forEachBlocksInRange(v,C,function(H,W,re,ce){P.aggregate(H.remove(re,ce))}),P}},{key:"nearestInputPos",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",P=this._mapPosToBlock(v)||{index:0,offset:0},H=P.offset,W=P.index,re=this._blocks[W];if(!re)return v;var ce=H;0!==ce&&ce<re.value.length&&(ce=re.nearestInputPos(H,function(bi){switch(bi){case"LEFT":return"FORCE_LEFT";case"RIGHT":return"FORCE_RIGHT";default:return bi}}(C)));var Ee=ce===re.value.length;if(0!==ce&&!Ee)return this._blockStartPos(W)+ce;var Te=Ee?W+1:W;if("NONE"===C){if(Te>0){var lt=Te-1,rt=this._blocks[lt],Ye=rt.nearestInputPos(0,"NONE");if(!rt.value.length||Ye!==rt.value.length)return this._blockStartPos(Te)}for(var nt=Te;nt<this._blocks.length;++nt){var at=this._blocks[nt],Gt=at.nearestInputPos(0,"NONE");if(!at.value.length||Gt!==at.value.length)return this._blockStartPos(nt)+Gt}for(var Nt=Te-1;Nt>=0;--Nt){var At=this._blocks[Nt],Kt=At.nearestInputPos(0,"NONE");if(!At.value.length||Kt!==At.value.length)return this._blockStartPos(Nt)+At.value.length}return v}if("LEFT"===C||"FORCE_LEFT"===C){for(var Mt,Pt=Te;Pt<this._blocks.length;++Pt)if(this._blocks[Pt].value){Mt=Pt;break}if(null!=Mt){var Vt=this._blocks[Mt],dn=Vt.nearestInputPos(0,"RIGHT");if(0===dn&&Vt.unmaskedValue.length)return this._blockStartPos(Mt)+dn}for(var rn,_n=-1,tr=Te-1;tr>=0;--tr){var Lr=this._blocks[tr],An=Lr.nearestInputPos(Lr.value.length,"FORCE_LEFT");if(Lr.value&&0===An||(rn=tr),0!==An){if(An!==Lr.value.length)return this._blockStartPos(tr)+An;_n=tr;break}}if("LEFT"===C)for(var Li=_n+1;Li<=Math.min(Te,this._blocks.length-1);++Li){var $i=this._blocks[Li],Oi=$i.nearestInputPos(0,"NONE"),gs=this._blockStartPos(Li)+Oi;if(gs>v)break;if(Oi!==$i.value.length)return gs}if(_n>=0)return this._blockStartPos(_n)+this._blocks[_n].value.length;if("FORCE_LEFT"===C||this.lazy&&!this.extractInput()&&!function(bi){if(!bi)return!1;var vs=bi.value;return!vs||bi.nearestInputPos(0,"NONE")!==vs.length}(this._blocks[Te]))return 0;if(null!=rn)return this._blockStartPos(rn);for(var wi=Te;wi<this._blocks.length;++wi){var Hs=this._blocks[wi],Di=Hs.nearestInputPos(0,"NONE");if(!Hs.value.length||Di!==Hs.value.length)return this._blockStartPos(wi)+Di}return 0}if("RIGHT"===C||"FORCE_RIGHT"===C){for(var hr,fr,Ni=Te;Ni<this._blocks.length;++Ni){var Qi=this._blocks[Ni],Ir=Qi.nearestInputPos(0,"NONE");if(Ir!==Qi.value.length){fr=this._blockStartPos(Ni)+Ir,hr=Ni;break}}if(null!=hr&&null!=fr){for(var Rs=hr;Rs<this._blocks.length;++Rs){var Ws=this._blocks[Rs],oo=Ws.nearestInputPos(0,"FORCE_RIGHT");if(oo!==Ws.value.length)return this._blockStartPos(Rs)+oo}return"FORCE_RIGHT"===C?this.value.length:fr}for(var ao=Math.min(Te,this._blocks.length-1);ao>=0;--ao){var Po=this._blocks[ao],ln=Po.nearestInputPos(Po.value.length,"LEFT");if(0!==ln){var Fo=this._blockStartPos(ao)+ln;if(Fo>=v)return Fo;break}}}return v}},{key:"maskedBlock",value:function(v){return this.maskedBlocks(v)[0]}},{key:"maskedBlocks",value:function(v){var C=this,P=this._maskedBlocks[v];return P?P.map(function(H){return C._blocks[H]}):[]}}]),h}();ft.DEFAULTS={lazy:!0,placeholderChar:"_"},ft.STOP_CHAR="`",ft.ESCAPE_CHAR="\\",ft.InputDefinition=Ge,ft.FixedDefinition=jt,Q.MaskedPattern=ft;var _t=function(w){V(h,ft);var l=f(h);function h(){return Z(this,h),l.apply(this,arguments)}return fe(h,[{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"_update",value:function(v){v=Object.assign({to:this.to||0,from:this.from||0},v);var C=String(v.to).length;null!=v.maxLength&&(C=Math.max(C,v.maxLength)),v.maxLength=C;for(var P=String(v.from).padStart(C,"0"),H=String(v.to).padStart(C,"0"),W=0;W<H.length&&H[W]===P[W];)++W;v.mask=H.slice(0,W).replace(/0/g,"\\0")+"0".repeat(C-W),c(z(h.prototype),"_update",this).call(this,v)}},{key:"isComplete",get:function(){return c(z(h.prototype),"isComplete",this)&&Boolean(this.value)}},{key:"boundaries",value:function(v){var C="",P="",H=m(v.match(/^(\D*)(\d*)(\D*)/)||[],3),W=H[1],re=H[2];return re&&(C="0".repeat(W.length)+re,P="9".repeat(W.length)+re),[C=C.padEnd(this.maxLength,"0"),P=P.padEnd(this.maxLength,"9")]}},{key:"doPrepare",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(v=c(z(h.prototype),"doPrepare",this).call(this,v,C).replace(/\D/g,""),!this.autofix)return v;for(var P=String(this.from).padStart(this.maxLength,"0"),H=String(this.to).padStart(this.maxLength,"0"),W=this.value,re="",ce=0;ce<v.length;++ce){var Ee=W+re+v[ce],Te=m(this.boundaries(Ee),2),lt=Te[0],rt=Te[1];Number(rt)<this.from?re+=P[Ee.length-1]:Number(lt)>this.to?re+=H[Ee.length-1]:re+=v[ce]}return re}},{key:"doValidate",value:function(){var v,C=this.value;if(-1===C.search(/[^0]/)&&C.length<=this._matchFrom)return!0;for(var P=m(this.boundaries(C),2),H=P[0],W=P[1],re=arguments.length,ce=new Array(re),Ee=0;Ee<re;Ee++)ce[Ee]=arguments[Ee];return this.from<=Number(W)&&Number(H)<=this.to&&(v=c(z(h.prototype),"doValidate",this)).call.apply(v,[this].concat(ce))}}]),h}();Q.MaskedRange=_t;var _e=function(w){V(h,ft);var l=f(h);function h(v){return Z(this,h),l.call(this,Object.assign({},h.DEFAULTS,v))}return fe(h,[{key:"_update",value:function(v){v.mask===Date&&delete v.mask,v.pattern&&(v.mask=v.pattern);var C=v.blocks;v.blocks=Object.assign({},h.GET_DEFAULT_BLOCKS()),v.min&&(v.blocks.Y.from=v.min.getFullYear()),v.max&&(v.blocks.Y.to=v.max.getFullYear()),v.min&&v.max&&v.blocks.Y.from===v.blocks.Y.to&&(v.blocks.m.from=v.min.getMonth()+1,v.blocks.m.to=v.max.getMonth()+1,v.blocks.m.from===v.blocks.m.to&&(v.blocks.d.from=v.min.getDate(),v.blocks.d.to=v.max.getDate())),Object.assign(v.blocks,C),Object.keys(v.blocks).forEach(function(P){var H=v.blocks[P];"autofix"in H||(H.autofix=v.autofix)}),c(z(h.prototype),"_update",this).call(this,v)}},{key:"doValidate",value:function(){for(var v,C=this.date,P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return(v=c(z(h.prototype),"doValidate",this)).call.apply(v,[this].concat(H))&&(!this.isComplete||this.isDateExist(this.value)&&null!=C&&(null==this.min||this.min<=C)&&(null==this.max||C<=this.max))}},{key:"isDateExist",value:function(v){return this.format(this.parse(v,this),this).indexOf(v)>=0}},{key:"date",get:function(){return this.typedValue},set:function(v){this.typedValue=v}},{key:"typedValue",get:function(){return this.isComplete?c(z(h.prototype),"typedValue",this):null},set:function(v){g(z(h.prototype),"typedValue",v,this,!0)}}]),h}();_e.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(w){return[String(w.getDate()).padStart(2,"0"),String(w.getMonth()+1).padStart(2,"0"),w.getFullYear()].join(".")},parse:function(w){var l=m(w.split("."),3);return new Date(l[2],l[1]-1,l[0])}},_e.GET_DEFAULT_BLOCKS=function(){return{d:{mask:_t,from:1,to:31,maxLength:2},m:{mask:_t,from:1,to:12,maxLength:2},Y:{mask:_t,from:1900,to:9999}}},Q.MaskedDate=_e;var Et=function(){function w(){Z(this,w)}return fe(w,[{key:"selectionStart",get:function(){var l;try{l=this._unsafeSelectionStart}catch(h){}return null!=l?l:this.value.length}},{key:"selectionEnd",get:function(){var l;try{l=this._unsafeSelectionEnd}catch(h){}return null!=l?l:this.value.length}},{key:"select",value:function(l,h){if(null!=l&&null!=h&&(l!==this.selectionStart||h!==this.selectionEnd))try{this._unsafeSelect(l,h)}catch(v){}}},{key:"_unsafeSelect",value:function(l,h){}},{key:"isActive",get:function(){return!1}},{key:"bindEvents",value:function(l){}},{key:"unbindEvents",value:function(){}}]),w}();Q.MaskElement=Et;var zt=function(w){V(h,Et);var l=f(h);function h(v){var C;return Z(this,h),(C=l.call(this)).input=v,C._handlers={},C}return fe(h,[{key:"rootElement",get:function(){return this.input.getRootNode?this.input.getRootNode():document}},{key:"isActive",get:function(){return this.input===this.rootElement.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"_unsafeSelect",value:function(v,C){this.input.setSelectionRange(v,C)}},{key:"value",get:function(){return this.input.value},set:function(v){this.input.value=v}},{key:"bindEvents",value:function(v){var C=this;Object.keys(v).forEach(function(P){return C._toggleEventHandler(h.EVENTS_MAP[P],v[P])})}},{key:"unbindEvents",value:function(){var v=this;Object.keys(this._handlers).forEach(function(C){return v._toggleEventHandler(C)})}},{key:"_toggleEventHandler",value:function(v,C){this._handlers[v]&&(this.input.removeEventListener(v,this._handlers[v]),delete this._handlers[v]),C&&(this.input.addEventListener(v,C),this._handlers[v]=C)}}]),h}();zt.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Q.HTMLMaskElement=zt;var un=function(w){V(h,zt);var l=f(h);function h(){return Z(this,h),l.apply(this,arguments)}return fe(h,[{key:"_unsafeSelectionStart",get:function(){var v=this.rootElement,C=v.getSelection&&v.getSelection();return C&&C.anchorOffset}},{key:"_unsafeSelectionEnd",get:function(){var v=this.rootElement,C=v.getSelection&&v.getSelection();return C&&this._unsafeSelectionStart+String(C).length}},{key:"_unsafeSelect",value:function(v,C){if(this.rootElement.createRange){var P=this.rootElement.createRange();P.setStart(this.input.firstChild||this.input,v),P.setEnd(this.input.lastChild||this.input,C);var H=this.rootElement,W=H.getSelection&&H.getSelection();W&&(W.removeAllRanges(),W.addRange(P))}}},{key:"value",get:function(){return this.input.textContent},set:function(v){this.input.textContent=v}}]),h}();Q.HTMLContenteditableMaskElement=un;var we=["mask"],yt=function(){function w(l,h){Z(this,w),this.el=l instanceof Et?l:l.isContentEditable&&"INPUT"!==l.tagName&&"TEXTAREA"!==l.tagName?new un(l):new zt(l),this.masked=Re(h),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return fe(w,[{key:"mask",get:function(){return this.masked.mask},set:function(l){if(!this.maskEquals(l))if(l instanceof Q.Masked||this.masked.constructor!==le(l)){var h=Re({mask:l});h.unmaskedValue=this.masked.unmaskedValue,this.masked=h}else this.masked.updateOptions({mask:l})}},{key:"maskEquals",value:function(l){return null==l||l===this.masked.mask||l===Date&&this.masked instanceof _e}},{key:"value",get:function(){return this._value},set:function(l){this.masked.value=l,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(l){this.masked.unmaskedValue=l,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(l){this.masked.typedValue=l,this.updateControl(),this.alignCursor()}},{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el&&this.el.unbindEvents()}},{key:"_fireEvent",value:function(l){for(var h=arguments.length,v=new Array(h>1?h-1:0),C=1;C<h;C++)v[C-1]=arguments[C];var P=this._listeners[l];P&&P.forEach(function(H){return H.apply(void 0,v)})}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(l){this.el&&this.el.isActive&&(this.el.select(l,l),this._saveSelection())}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var l=this.masked.unmaskedValue,h=this.masked.value,v=this.unmaskedValue!==l||this.value!==h;this._unmaskedValue=l,this._value=h,this.el.value!==h&&(this.el.value=h),v&&this._fireChangeEvents()}},{key:"updateOptions",value:function(l){var h=l.mask,v=G(l,we),C=!this.maskEquals(h),P=!function H(W,re){if(re===W)return!0;var ce,Ee=Array.isArray(re),Te=Array.isArray(W);if(Ee&&Te){if(re.length!=W.length)return!1;for(ce=0;ce<re.length;ce++)if(!H(re[ce],W[ce]))return!1;return!0}if(Ee!=Te)return!1;if(re&&W&&"object"===ye(re)&&"object"===ye(W)){var lt=re instanceof Date,rt=W instanceof Date;if(lt&&rt)return re.getTime()==W.getTime();if(lt!=rt)return!1;var Ye=re instanceof RegExp,nt=W instanceof RegExp;if(Ye&&nt)return re.toString()==W.toString();if(Ye!=nt)return!1;var at=Object.keys(re);for(ce=0;ce<at.length;ce++)if(!Object.prototype.hasOwnProperty.call(W,at[ce]))return!1;for(ce=0;ce<at.length;ce++)if(!H(W[at[ce]],re[at[ce]]))return!1;return!0}return!(!re||!W||"function"!=typeof re||"function"!=typeof W)&&re.toString()===W.toString()}(this.masked,v);C&&(this.mask=h),P&&this.masked.updateOptions(v),(C||P)&&this.updateControl()}},{key:"updateCursor",value:function(l){null!=l&&(this.cursorPos=l,this._delayUpdateCursor(l))}},{key:"_delayUpdateCursor",value:function(l){var h=this;this._abortUpdateCursor(),this._changingCursorPos=l,this._cursorChanging=setTimeout(function(){h.el&&(h.cursorPos=h._changingCursorPos,h._abortUpdateCursor())},10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,"LEFT")}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(l,h){return this._listeners[l]||(this._listeners[l]=[]),this._listeners[l].push(h),this}},{key:"off",value:function(l,h){if(!this._listeners[l])return this;if(!h)return delete this._listeners[l],this;var v=this._listeners[l].indexOf(h);return v>=0&&this._listeners[l].splice(v,1),this}},{key:"_onInput",value:function(l){if(this._inputEvent=l,this._abortUpdateCursor(),!this._selection)return this.updateValue();var h=new M(this.el.value,this.cursorPos,this.value,this._selection),v=this.masked.rawInputValue,C=this.masked.splice(h.startChangePos,h.removed.length,h.inserted,h.removeDirection).offset,H=this.masked.nearestInputPos(h.startChangePos+C,v===this.masked.rawInputValue?h.removeDirection:"NONE");this.updateControl(),this.updateCursor(H),delete this._inputEvent}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}},{key:"_onDrop",value:function(l){l.preventDefault(),l.stopPropagation()}},{key:"_onFocus",value:function(l){this.alignCursorFriendly()}},{key:"_onClick",value:function(l){this.alignCursorFriendly()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}}]),w}();Q.InputMask=yt;var sn=function(w){V(h,ft);var l=f(h);function h(){return Z(this,h),l.apply(this,arguments)}return fe(h,[{key:"_update",value:function(v){v.enum&&(v.mask="*".repeat(v.enum[0].length)),c(z(h.prototype),"_update",this).call(this,v)}},{key:"doValidate",value:function(){for(var v,C=this,P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return this.enum.some(function(re){return re.indexOf(C.unmaskedValue)>=0})&&(v=c(z(h.prototype),"doValidate",this)).call.apply(v,[this].concat(H))}}]),h}();Q.MaskedEnum=sn;var Cn=function(w){V(h,ae);var l=f(h);function h(v){return Z(this,h),l.call(this,Object.assign({},h.DEFAULTS,v))}return fe(h,[{key:"_update",value:function(v){c(z(h.prototype),"_update",this).call(this,v),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var v="^"+(this.allowNegative?"[+|\\-]?":""),C=(this.scale?"("+j(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp(v+"(0|([1-9]+\\d*))?"+C),this._numberRegExp=new RegExp(v+"\\d*"+C),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(j).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(j(this.thousandsSeparator),"g")}},{key:"_removeThousandsSeparators",value:function(v){return v.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(v){var C=v.split(this.radix);return C[0]=C[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),C.join(this.radix)}},{key:"doPrepare",value:function(v){for(var C,P=arguments.length,H=new Array(P>1?P-1:0),W=1;W<P;W++)H[W-1]=arguments[W];return(C=c(z(h.prototype),"doPrepare",this)).call.apply(C,[this,this._removeThousandsSeparators(v.replace(this._mapToRadixRegExp,this.radix))].concat(H))}},{key:"_separatorsCount",value:function(v){for(var C=arguments.length>1&&void 0!==arguments[1]&&arguments[1],P=0,H=0;H<v;++H)this._value.indexOf(this.thousandsSeparator,H)===H&&(++P,C&&(v+=this.thousandsSeparator.length));return P}},{key:"_separatorsCountFromSlice",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(v).length,!0)}},{key:"extractInput",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,P=arguments.length>2?arguments[2]:void 0,H=m(this._adjustRangeWithSeparators(v,C),2);return v=H[0],C=H[1],this._removeThousandsSeparators(c(z(h.prototype),"extractInput",this).call(this,v,C,P))}},{key:"_appendCharRaw",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return c(z(h.prototype),"_appendCharRaw",this).call(this,v,C);var P=C.tail&&C._beforeTailState?C._beforeTailState._value:this._value,H=this._separatorsCountFromSlice(P);this._value=this._removeThousandsSeparators(this.value);var W=c(z(h.prototype),"_appendCharRaw",this).call(this,v,C);this._value=this._insertThousandsSeparators(this._value);var re=C.tail&&C._beforeTailState?C._beforeTailState._value:this._value,ce=this._separatorsCountFromSlice(re);return W.tailShift+=(ce-H)*this.thousandsSeparator.length,W.skip=!W.rawInserted&&v===this.thousandsSeparator,W}},{key:"_findSeparatorAround",value:function(v){if(this.thousandsSeparator){var P=this.value.indexOf(this.thousandsSeparator,v-this.thousandsSeparator.length+1);if(P<=v)return P}return-1}},{key:"_adjustRangeWithSeparators",value:function(v,C){var P=this._findSeparatorAround(v);P>=0&&(v=P);var H=this._findSeparatorAround(C);return H>=0&&(C=H+this.thousandsSeparator.length),[v,C]}},{key:"remove",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,P=m(this._adjustRangeWithSeparators(v,C),2);C=P[1];var H=this.value.slice(0,v=P[0]),W=this.value.slice(C),re=this._separatorsCount(H.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(H+W));var ce=this._separatorsCountFromSlice(H);return new N({tailShift:(ce-re)*this.thousandsSeparator.length})}},{key:"nearestInputPos",value:function(v,C){if(!this.thousandsSeparator)return v;switch(C){case"NONE":case"LEFT":case"FORCE_LEFT":var P=this._findSeparatorAround(v-1);if(P>=0){var H=P+this.thousandsSeparator.length;if(v<H||this.value.length<=H||"FORCE_LEFT"===C)return P}break;case"RIGHT":case"FORCE_RIGHT":var W=this._findSeparatorAround(v);if(W>=0)return W+this.thousandsSeparator.length}return v}},{key:"doValidate",value:function(v){var C=(v.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));return C&&(C=C&&!isNaN(this.number)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)),C&&c(z(h.prototype),"doValidate",this).call(this,v)}},{key:"doCommit",value:function(){if(this.value){var v=this.number,C=v;null!=this.min&&(C=Math.max(C,this.min)),null!=this.max&&(C=Math.min(C,this.max)),C!==v&&(this.unmaskedValue=String(C));var P=this.value;this.normalizeZeros&&(P=this._normalizeZeros(P)),this.padFractionalZeros&&(P=this._padFractionalZeros(P)),this._value=P}c(z(h.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(v){var C=this._removeThousandsSeparators(v).split(this.radix);return C[0]=C[0].replace(/^(\D*)(0*)(\d*)/,function(P,H,W,re){return H+re}),v.length&&!/\d$/.test(C[0])&&(C[0]=C[0]+"0"),C.length>1&&(C[1]=C[1].replace(/0*$/,""),C[1].length||(C.length=1)),this._insertThousandsSeparators(C.join(this.radix))}},{key:"_padFractionalZeros",value:function(v){if(!v)return v;var C=v.split(this.radix);return C.length<2&&C.push(""),C[1]=C[1].padEnd(this.scale,"0"),C.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(v){g(z(h.prototype),"unmaskedValue",v.replace(".",this.radix),this,!0)}},{key:"typedValue",get:function(){return Number(this.unmaskedValue)},set:function(v){g(z(h.prototype),"unmaskedValue",String(v),this,!0)}},{key:"number",get:function(){return this.typedValue},set:function(v){this.typedValue=v}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),h}();Cn.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1},Q.MaskedNumber=Cn;var ze=function(w){V(h,ae);var l=f(h);function h(){return Z(this,h),l.apply(this,arguments)}return fe(h,[{key:"_update",value:function(v){v.mask&&(v.validate=v.mask),c(z(h.prototype),"_update",this).call(this,v)}}]),h}();Q.MaskedFunction=ze;var Ci=["compiledMasks","currentMaskRef","currentMask"],qt=function(w){V(h,ae);var l=f(h);function h(v){var C;return Z(this,h),(C=l.call(this,Object.assign({},h.DEFAULTS,v))).currentMask=null,C}return fe(h,[{key:"_update",value:function(v){c(z(h.prototype),"_update",this).call(this,v),"mask"in v&&(this.compiledMasks=Array.isArray(v.mask)?v.mask.map(function(C){return Re(C)}):[])}},{key:"_appendCharRaw",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},P=this._applyDispatch(v,C);return this.currentMask&&P.aggregate(this.currentMask._appendChar(v,C)),P}},{key:"_applyDispatch",value:function(){var v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},P=C.tail&&null!=C._beforeTailState?C._beforeTailState._value:this.value,H=this.rawInputValue,W=C.tail&&null!=C._beforeTailState?C._beforeTailState._rawInputValue:H,re=H.slice(W.length),ce=this.currentMask,Ee=new N,Te=ce&&ce.state;if(this.currentMask=this.doDispatch(v,Object.assign({},C)),this.currentMask)if(this.currentMask!==ce){if(this.currentMask.reset(),W){var lt=this.currentMask.append(W,{raw:!0});Ee.tailShift=lt.inserted.length-P.length}re&&(Ee.tailShift+=this.currentMask.append(re,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=Te;return Ee}},{key:"_appendPlaceholder",value:function(){var v=this._applyDispatch.apply(this,arguments);return this.currentMask&&v.aggregate(this.currentMask._appendPlaceholder()),v}},{key:"doDispatch",value:function(v){var C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(v,this,C)}},{key:"doValidate",value:function(){for(var v,C,P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return(v=c(z(h.prototype),"doValidate",this)).call.apply(v,[this].concat(H))&&(!this.currentMask||(C=this.currentMask).doValidate.apply(C,H))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach(function(v){return v.reset()})}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(v){g(z(h.prototype),"value",v,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(v){g(z(h.prototype),"unmaskedValue",v,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(v){var C=String(v);this.currentMask&&(this.currentMask.typedValue=v,C=this.currentMask.unmaskedValue),this.unmaskedValue=C}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"remove",value:function(){var v,C=new N;return this.currentMask&&C.aggregate((v=this.currentMask).remove.apply(v,arguments)).aggregate(this._applyDispatch()),C}},{key:"state",get:function(){return Object.assign({},c(z(h.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(function(v){return v.state}),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(v){var C=v.compiledMasks,P=v.currentMaskRef,H=v.currentMask,W=G(v,Ci);this.compiledMasks.forEach(function(re,ce){return re.state=C[ce]}),null!=P&&(this.currentMask=P,this.currentMask.state=H),g(z(h.prototype),"state",W,this,!0)}},{key:"extractInput",value:function(){var v;return this.currentMask?(v=this.currentMask).extractInput.apply(v,arguments):""}},{key:"extractTail",value:function(){for(var v,C,P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return this.currentMask?(v=this.currentMask).extractTail.apply(v,H):(C=c(z(h.prototype),"extractTail",this)).call.apply(C,[this].concat(H))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),c(z(h.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var v,C,P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return this.currentMask?(v=this.currentMask).nearestInputPos.apply(v,H):(C=c(z(h.prototype),"nearestInputPos",this)).call.apply(C,[this].concat(H))}},{key:"overwrite",get:function(){return this.currentMask?this.currentMask.overwrite:c(z(h.prototype),"overwrite",this)},set:function(v){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}}]),h}();qt.DEFAULTS={dispatch:function(w,l,h){if(l.compiledMasks.length){var v=l.rawInputValue,C=l.compiledMasks.map(function(P,H){return P.reset(),P.append(v,{raw:!0}),P.append(w,h),{weight:P.rawInputValue.length,index:H}});return C.sort(function(P,H){return H.weight-P.weight}),l.compiledMasks[C[0].index]}}},Q.MaskedDynamic=qt;var de={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Pe(w){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:de.MASKED,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:de.MASKED,v=Re(w);return function(C){return v.runIsolated(function(P){return P[l]=C,P[h]})}}Q.PIPE_TYPE=de,Q.createPipe=Pe,Q.pipe=function(w){for(var l=arguments.length,h=new Array(l>1?l-1:0),v=1;v<l;v++)h[v-1]=arguments[v];return Pe.apply(void 0,h)(w)};try{globalThis.IMask=Q}catch(w){}[].slice.call(document.querySelectorAll("[data-mask]")).map(function(w){return new Q(w,{mask:w.dataset.mask,lazy:"true"===w.dataset["mask-visible"]})});var ge="top",bt="bottom",Xt="right",gn="left",Mi="auto",kn=[ge,bt,Xt,gn],Rt="start",rr="end",Nn="clippingParents",Dr="viewport",ut="popper",Bn="reference",$t=kn.reduce(function(w,l){return w.concat([l+"-"+Rt,l+"-"+rr])},[]),vt=[].concat(kn,[Mi]).reduce(function(w,l){return w.concat([l,l+"-"+Rt,l+"-"+rr])},[]),Tn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Jn(w){return w?(w.nodeName||"").toLowerCase():null}function tn(w){if(null==w)return window;if("[object Window]"!==w.toString()){var l=w.ownerDocument;return l&&l.defaultView||window}return w}function Mn(w){return w instanceof tn(w).Element||w instanceof Element}function Ut(w){return w instanceof tn(w).HTMLElement||w instanceof HTMLElement}function Pi(w){return"undefined"!=typeof ShadowRoot&&(w instanceof tn(w).ShadowRoot||w instanceof ShadowRoot)}var Un={name:"applyStyles",enabled:!0,phase:"write",fn:function(w){var l=w.state;Object.keys(l.elements).forEach(function(h){var v=l.styles[h]||{},C=l.attributes[h]||{},P=l.elements[h];Ut(P)&&Jn(P)&&(Object.assign(P.style,v),Object.keys(C).forEach(function(H){var W=C[H];!1===W?P.removeAttribute(H):P.setAttribute(H,!0===W?"":W)}))})},effect:function(w){var l=w.state,h={popper:{position:l.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(l.elements.popper.style,h.popper),l.styles=h,l.elements.arrow&&Object.assign(l.elements.arrow.style,h.arrow),function(){Object.keys(l.elements).forEach(function(v){var C=l.elements[v],P=l.attributes[v]||{},H=Object.keys(l.styles.hasOwnProperty(v)?l.styles[v]:h[v]).reduce(function(W,re){return W[re]="",W},{});Ut(C)&&Jn(C)&&(Object.assign(C.style,H),Object.keys(P).forEach(function(W){C.removeAttribute(W)}))})}},requires:["computeStyles"]};function Pn(w){return w.split("-")[0]}function Cr(w,l){var h=w.getBoundingClientRect();return{width:h.width/1,height:h.height/1,top:h.top/1,right:h.right/1,bottom:h.bottom/1,left:h.left/1,x:h.left/1,y:h.top/1}}function Ji(w){var l=Cr(w),h=w.offsetWidth,v=w.offsetHeight;return Math.abs(l.width-h)<=1&&(h=l.width),Math.abs(l.height-v)<=1&&(v=l.height),{x:w.offsetLeft,y:w.offsetTop,width:h,height:v}}function Zi(w,l){var h=l.getRootNode&&l.getRootNode();if(w.contains(l))return!0;if(h&&Pi(h)){var v=l;do{if(v&&w.isSameNode(v))return!0;v=v.parentNode||v.host}while(v)}return!1}function vn(w){return tn(w).getComputedStyle(w)}function Us(w){return["table","td","th"].indexOf(Jn(w))>=0}function Nr(w){return((Mn(w)?w.ownerDocument:w.document)||window.document).documentElement}function vr(w){return"html"===Jn(w)?w:w.assignedSlot||w.parentNode||(Pi(w)?w.host:null)||Nr(w)}function Hr(w){return Ut(w)&&"fixed"!==vn(w).position?w.offsetParent:null}function ai(w){for(var l=tn(w),h=Hr(w);h&&Us(h)&&"static"===vn(h).position;)h=Hr(h);return h&&("html"===Jn(h)||"body"===Jn(h)&&"static"===vn(h).position)?l:h||function(v){var C=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Ut(v)&&"fixed"===vn(v).position)return null;for(var P=vr(v);Ut(P)&&["html","body"].indexOf(Jn(P))<0;){var H=vn(P);if("none"!==H.transform||"none"!==H.perspective||"paint"===H.contain||-1!==["transform","perspective"].indexOf(H.willChange)||C&&"filter"===H.willChange||C&&H.filter&&"none"!==H.filter)return P;P=P.parentNode}return null}(w)||l}function Ti(w){return["top","bottom"].indexOf(w)>=0?"x":"y"}var ir=Math.max,Tr=Math.min,sr=Math.round;function En(w,l,h){return ir(w,Tr(l,h))}function es(w){return Object.assign({},{top:0,right:0,bottom:0,left:0},w)}function Rr(w,l){return l.reduce(function(h,v){return h[v]=w,h},{})}var Si={name:"arrow",enabled:!0,phase:"main",fn:function(w){var l,h=w.state,v=w.name,C=w.options,P=h.elements.arrow,H=h.modifiersData.popperOffsets,W=Pn(h.placement),re=Ti(W),ce=[gn,Xt].indexOf(W)>=0?"height":"width";if(P&&H){var Ee=function(w,l){return es("number"!=typeof(w="function"==typeof w?w(Object.assign({},l.rects,{placement:l.placement})):w)?w:Rr(w,kn))}(C.padding,h),Te=Ji(P),lt="y"===re?ge:gn,rt="y"===re?bt:Xt,Ye=h.rects.reference[ce]+h.rects.reference[re]-H[re]-h.rects.popper[ce],nt=H[re]-h.rects.reference[re],at=ai(P),Gt=at?"y"===re?at.clientHeight||0:at.clientWidth||0:0,Mt=Gt/2-Te[ce]/2+(Ye/2-nt/2),Pt=En(Ee[lt],Mt,Gt-Te[ce]-Ee[rt]);h.modifiersData[v]=((l={})[re]=Pt,l.centerOffset=Pt-Mt,l)}},effect:function(w){var l=w.state,h=w.options.element,v=void 0===h?"[data-popper-arrow]":h;null!=v&&("string"!=typeof v||(v=l.elements.popper.querySelector(v)))&&Zi(l.elements.popper,v)&&(l.elements.arrow=v)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Hn(w){return w.split("-")[1]}var Wr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function or(w){var l,_n,Lr,An,h=w.popper,v=w.popperRect,C=w.placement,P=w.variation,H=w.offsets,W=w.position,re=w.gpuAcceleration,ce=w.adaptive,Ee=w.roundOffsets,Te=!0===Ee?(Lr=(_n=H).y,An=window.devicePixelRatio||1,{x:sr(sr(_n.x*An)/An)||0,y:sr(sr(Lr*An)/An)||0}):"function"==typeof Ee?Ee(H):H,lt=Te.x,rt=void 0===lt?0:lt,Ye=Te.y,nt=void 0===Ye?0:Ye,at=H.hasOwnProperty("x"),Gt=H.hasOwnProperty("y"),Nt=gn,At=ge,Kt=window;if(ce){var Mt=ai(h),Pt="clientHeight",Vt="clientWidth";Mt===tn(h)&&"static"!==vn(Mt=Nr(h)).position&&"absolute"===W&&(Pt="scrollHeight",Vt="scrollWidth"),Mt=Mt,C!==ge&&(C!==gn&&C!==Xt||P!==rr)||(At=bt,nt-=Mt[Pt]-v.height,nt*=re?1:-1),C!==gn&&(C!==ge&&C!==bt||P!==rr)||(Nt=Xt,rt-=Mt[Vt]-v.width,rt*=re?1:-1)}var dn,rn=Object.assign({position:W},ce&&Wr);return Object.assign({},rn,re?((dn={})[At]=Gt?"0":"",dn[Nt]=at?"0":"",dn.transform=(Kt.devicePixelRatio||1)<=1?"translate("+rt+"px, "+nt+"px)":"translate3d("+rt+"px, "+nt+"px, 0)",dn):((l={})[At]=Gt?nt+"px":"",l[Nt]=at?rt+"px":"",l.transform="",l))}var Ii={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(w){var l=w.state,h=w.options,v=h.gpuAcceleration,C=void 0===v||v,P=h.adaptive,H=void 0===P||P,W=h.roundOffsets,re=void 0===W||W,ce={placement:Pn(l.placement),variation:Hn(l.placement),popper:l.elements.popper,popperRect:l.rects.popper,gpuAcceleration:C};null!=l.modifiersData.popperOffsets&&(l.styles.popper=Object.assign({},l.styles.popper,or(Object.assign({},ce,{offsets:l.modifiersData.popperOffsets,position:l.options.strategy,adaptive:H,roundOffsets:re})))),null!=l.modifiersData.arrow&&(l.styles.arrow=Object.assign({},l.styles.arrow,or(Object.assign({},ce,{offsets:l.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:re})))),l.attributes.popper=Object.assign({},l.attributes.popper,{"data-popper-placement":l.placement})},data:{}},li={passive:!0},cn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(w){var l=w.state,h=w.instance,v=w.options,C=v.scroll,P=void 0===C||C,H=v.resize,W=void 0===H||H,re=tn(l.elements.popper),ce=[].concat(l.scrollParents.reference,l.scrollParents.popper);return P&&ce.forEach(function(Ee){Ee.addEventListener("scroll",h.update,li)}),W&&re.addEventListener("resize",h.update,li),function(){P&&ce.forEach(function(Ee){Ee.removeEventListener("scroll",h.update,li)}),W&&re.removeEventListener("resize",h.update,li)}},data:{}},st={left:"right",right:"left",bottom:"top",top:"bottom"};function mr(w){return w.replace(/left|right|bottom|top/g,function(l){return st[l]})}var ar={start:"end",end:"start"};function jn(w){return w.replace(/start|end/g,function(l){return ar[l]})}function It(w){var l=tn(w);return{scrollLeft:l.pageXOffset,scrollTop:l.pageYOffset}}function Kn(w){return Cr(Nr(w)).left+It(w).scrollLeft}function Zr(w){var l=vn(w);return/auto|scroll|overlay|hidden/.test(l.overflow+l.overflowY+l.overflowX)}function ui(w,l){var h;void 0===l&&(l=[]);var v=function re(ce){return["html","body","#document"].indexOf(Jn(ce))>=0?ce.ownerDocument.body:Ut(ce)&&Zr(ce)?ce:re(vr(ce))}(w),C=v===(null==(h=w.ownerDocument)?void 0:h.body),P=tn(v),H=C?[P].concat(P.visualViewport||[],Zr(v)?v:[]):v,W=l.concat(H);return C?W:W.concat(ui(vr(H)))}function Ne(w){return Object.assign({},w,{left:w.x,top:w.y,right:w.x+w.width,bottom:w.y+w.height})}function D(w,l){return l===Dr?Ne((v=tn(h=w),H=(C=Nr(h)).clientWidth,W=C.clientHeight,re=0,ce=0,(P=v.visualViewport)&&(H=P.width,W=P.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(re=P.offsetLeft,ce=P.offsetTop)),{width:H,height:W,x:re+Kn(h),y:ce})):Ut(l)?function(h){var v=Cr(h);return v.top=v.top+h.clientTop,v.left=v.left+h.clientLeft,v.bottom=v.top+h.clientHeight,v.right=v.left+h.clientWidth,v.width=h.clientWidth,v.height=h.clientHeight,v.x=v.left,v.y=v.top,v}(l):Ne(function(h){var v,C=Nr(h),P=It(h),H=null==(v=h.ownerDocument)?void 0:v.body,W=ir(C.scrollWidth,C.clientWidth,H?H.scrollWidth:0,H?H.clientWidth:0),re=ir(C.scrollHeight,C.clientHeight,H?H.scrollHeight:0,H?H.clientHeight:0),ce=-P.scrollLeft+Kn(h),Ee=-P.scrollTop;return"rtl"===vn(H||C).direction&&(ce+=ir(C.clientWidth,H?H.clientWidth:0)-W),{width:W,height:re,x:ce,y:Ee}}(Nr(w)));var h,v,C,P,H,W,re,ce}function Ce(w){var l,h=w.reference,v=w.element,C=w.placement,P=C?Pn(C):null,H=C?Hn(C):null,W=h.x+h.width/2-v.width/2,re=h.y+h.height/2-v.height/2;switch(P){case ge:l={x:W,y:h.y-v.height};break;case bt:l={x:W,y:h.y+h.height};break;case Xt:l={x:h.x+h.width,y:re};break;case gn:l={x:h.x-v.width,y:re};break;default:l={x:h.x,y:h.y}}var ce=P?Ti(P):null;if(null!=ce){var Ee="y"===ce?"height":"width";switch(H){case Rt:l[ce]=l[ce]-(h[Ee]/2-v[Ee]/2);break;case rr:l[ce]=l[ce]+(h[Ee]/2-v[Ee]/2)}}return l}function Me(w,l){void 0===l&&(l={});var v=l.placement,C=void 0===v?w.placement:v,P=l.boundary,H=void 0===P?Nn:P,W=l.rootBoundary,re=void 0===W?Dr:W,ce=l.elementContext,Ee=void 0===ce?ut:ce,Te=l.altBoundary,lt=void 0!==Te&&Te,rt=l.padding,Ye=void 0===rt?0:rt,nt=es("number"!=typeof Ye?Ye:Rr(Ye,kn)),Gt=w.rects.popper,Nt=w.elements[lt?Ee===ut?Bn:ut:Ee],At=function(w,l,h){var W,re,ce,v="clippingParents"===l?(re=ui(vr(W=w)),Mn(ce=["absolute","fixed"].indexOf(vn(W).position)>=0&&Ut(W)?ai(W):W)?re.filter(function(Ee){return Mn(Ee)&&Zi(Ee,ce)&&"body"!==Jn(Ee)}):[]):[].concat(l),C=[].concat(v,[h]),H=C.reduce(function(W,re){var ce=D(w,re);return W.top=ir(ce.top,W.top),W.right=Tr(ce.right,W.right),W.bottom=Tr(ce.bottom,W.bottom),W.left=ir(ce.left,W.left),W},D(w,C[0]));return H.width=H.right-H.left,H.height=H.bottom-H.top,H.x=H.left,H.y=H.top,H}(Mn(Nt)?Nt:Nt.contextElement||Nr(w.elements.popper),H,re),Kt=Cr(w.elements.reference),Mt=Ce({reference:Kt,element:Gt,strategy:"absolute",placement:C}),Pt=Ne(Object.assign({},Gt,Mt)),Vt=Ee===ut?Pt:Kt,dn={top:At.top-Vt.top+nt.top,bottom:Vt.bottom-At.bottom+nt.bottom,left:At.left-Vt.left+nt.left,right:Vt.right-At.right+nt.right},rn=w.modifiersData.offset;if(Ee===ut&&rn){var _n=rn[C];Object.keys(dn).forEach(function(tr){var Lr=[Xt,bt].indexOf(tr)>=0?1:-1,An=[ge,bt].indexOf(tr)>=0?"y":"x";dn[tr]+=_n[An]*Lr})}return dn}var Ot={name:"flip",enabled:!0,phase:"main",fn:function(w){var l=w.state,h=w.options,v=w.name;if(!l.modifiersData[v]._skip){for(var C=h.mainAxis,P=void 0===C||C,H=h.altAxis,W=void 0===H||H,re=h.fallbackPlacements,ce=h.padding,Ee=h.boundary,Te=h.rootBoundary,lt=h.altBoundary,rt=h.flipVariations,Ye=void 0===rt||rt,nt=h.allowedAutoPlacements,at=l.options.placement,Gt=Pn(at),Nt=re||(Gt!==at&&Ye?function(hr){if(Pn(hr)===Mi)return[];var fr=mr(hr);return[jn(hr),fr,jn(fr)]}(at):[mr(at)]),At=[at].concat(Nt).reduce(function(hr,fr){return hr.concat(Pn(fr)===Mi?function(w,l){void 0===l&&(l={});var C=l.boundary,P=l.rootBoundary,H=l.padding,W=l.flipVariations,re=l.allowedAutoPlacements,ce=void 0===re?vt:re,Ee=Hn(l.placement),Te=Ee?W?$t:$t.filter(function(Ye){return Hn(Ye)===Ee}):kn,lt=Te.filter(function(Ye){return ce.indexOf(Ye)>=0});0===lt.length&&(lt=Te);var rt=lt.reduce(function(Ye,nt){return Ye[nt]=Me(w,{placement:nt,boundary:C,rootBoundary:P,padding:H})[Pn(nt)],Ye},{});return Object.keys(rt).sort(function(Ye,nt){return rt[Ye]-rt[nt]})}(l,{placement:fr,boundary:Ee,rootBoundary:Te,padding:ce,flipVariations:Ye,allowedAutoPlacements:nt}):fr)},[]),Kt=l.rects.reference,Mt=l.rects.popper,Pt=new Map,Vt=!0,dn=At[0],rn=0;rn<At.length;rn++){var _n=At[rn],tr=Pn(_n),Lr=Hn(_n)===Rt,An=[ge,bt].indexOf(tr)>=0,Li=An?"width":"height",$i=Me(l,{placement:_n,boundary:Ee,rootBoundary:Te,altBoundary:lt,padding:ce}),Oi=An?Lr?Xt:gn:Lr?bt:ge;Kt[Li]>Mt[Li]&&(Oi=mr(Oi));var gs=mr(Oi),wi=[];if(P&&wi.push($i[tr]<=0),W&&wi.push($i[Oi]<=0,$i[gs]<=0),wi.every(function(hr){return hr})){dn=_n,Vt=!1;break}Pt.set(_n,wi)}if(Vt)for(var Hs=function(hr){var fr=At.find(function(Ni){var Qi=Pt.get(Ni);if(Qi)return Qi.slice(0,hr).every(function(Ir){return Ir})});if(fr)return dn=fr,"break"},Di=Ye?3:1;Di>0&&"break"!==Hs(Di);Di--);l.placement!==dn&&(l.modifiersData[v]._skip=!0,l.placement=dn,l.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ke(w,l,h){return void 0===h&&(h={x:0,y:0}),{top:w.top-l.height-h.y,right:w.right-l.width+h.x,bottom:w.bottom-l.height+h.y,left:w.left-l.width-h.x}}function Rn(w){return[ge,Xt,bt,gn].some(function(l){return w[l]>=0})}var _r={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(w){var l=w.state,h=w.name,v=l.rects.reference,C=l.rects.popper,P=l.modifiersData.preventOverflow,H=Me(l,{elementContext:"reference"}),W=Me(l,{altBoundary:!0}),re=Ke(H,v),ce=Ke(W,C,P),Ee=Rn(re),Te=Rn(ce);l.modifiersData[h]={referenceClippingOffsets:re,popperEscapeOffsets:ce,isReferenceHidden:Ee,hasPopperEscaped:Te},l.attributes.popper=Object.assign({},l.attributes.popper,{"data-popper-reference-hidden":Ee,"data-popper-escaped":Te})}},Sr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(w){var l=w.state,v=w.name,C=w.options.offset,P=void 0===C?[0,0]:C,H=vt.reduce(function(Ee,Te){return Ee[Te]=(rt=l.rects,Ye=P,nt=Pn(lt=Te),at=[gn,ge].indexOf(nt)>=0?-1:1,Nt=(Nt=(Gt="function"==typeof Ye?Ye(Object.assign({},rt,{placement:lt})):Ye)[0])||0,At=((At=Gt[1])||0)*at,[gn,Xt].indexOf(nt)>=0?{x:At,y:Nt}:{x:Nt,y:At}),Ee;var lt,rt,Ye,nt,at,Gt,Nt,At},{}),W=H[l.placement],ce=W.y;null!=l.modifiersData.popperOffsets&&(l.modifiersData.popperOffsets.x+=W.x,l.modifiersData.popperOffsets.y+=ce),l.modifiersData[v]=H}},Wn={name:"popperOffsets",enabled:!0,phase:"read",fn:function(w){var l=w.state;l.modifiersData[w.name]=Ce({reference:l.rects.reference,element:l.rects.popper,strategy:"absolute",placement:l.placement})},data:{}},_s={name:"preventOverflow",enabled:!0,phase:"main",fn:function(w){var l=w.state,h=w.options,v=w.name,C=h.mainAxis,P=void 0===C||C,H=h.altAxis,W=void 0!==H&&H,lt=h.tether,rt=void 0===lt||lt,Ye=h.tetherOffset,nt=void 0===Ye?0:Ye,at=Me(l,{boundary:h.boundary,rootBoundary:h.rootBoundary,padding:h.padding,altBoundary:h.altBoundary}),Gt=Pn(l.placement),Nt=Hn(l.placement),At=!Nt,Kt=Ti(Gt),Mt="x"===Kt?"y":"x",Pt=l.modifiersData.popperOffsets,Vt=l.rects.reference,dn=l.rects.popper,rn="function"==typeof nt?nt(Object.assign({},l.rects,{placement:l.placement})):nt,_n={x:0,y:0};if(Pt){if(P||W){var tr="y"===Kt?ge:gn,Lr="y"===Kt?bt:Xt,An="y"===Kt?"height":"width",Li=Pt[Kt],$i=Pt[Kt]+at[tr],Oi=Pt[Kt]-at[Lr],gs=rt?-dn[An]/2:0,wi=Nt===Rt?Vt[An]:dn[An],Hs=Nt===Rt?-dn[An]:-Vt[An],Di=l.elements.arrow,hr=rt&&Di?Ji(Di):{width:0,height:0},fr=l.modifiersData["arrow#persistent"]?l.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Ni=fr[tr],Qi=fr[Lr],Ir=En(0,Vt[An],hr[An]),Rs=At?Vt[An]/2-gs-Ir-Ni-rn:wi-Ir-Ni-rn,Ws=At?-Vt[An]/2+gs+Ir+Qi+rn:Hs+Ir+Qi+rn,oo=l.elements.arrow&&ai(l.elements.arrow),Po=l.modifiersData.offset?l.modifiersData.offset[l.placement][Kt]:0,ln=Pt[Kt]+Rs-Po-(oo?"y"===Kt?oo.clientTop||0:oo.clientLeft||0:0),Fo=Pt[Kt]+Ws-Po;if(P){var bi=En(rt?Tr($i,ln):$i,Li,rt?ir(Oi,Fo):Oi);Pt[Kt]=bi,_n[Kt]=bi-Li}if(W){var zs=Pt[Mt],sa=zs+at["x"===Kt?ge:gn],La=zs-at["x"===Kt?bt:Xt],Oa=En(rt?Tr(sa,ln):sa,zs,rt?ir(La,Fo):La);Pt[Mt]=Oa,_n[Mt]=Oa-zs}}l.modifiersData[v]=_n}},requiresIfExists:["offset"]};function Ho(w,l,h){void 0===h&&(h=!1);var v=Ut(l);Ut(l)&&l.getBoundingClientRect();var C,P,H=Nr(l),W=Cr(w),re={scrollLeft:0,scrollTop:0},ce={x:0,y:0};return(v||!v&&!h)&&(("body"!==Jn(l)||Zr(H))&&(re=(C=l)!==tn(C)&&Ut(C)?{scrollLeft:(P=C).scrollLeft,scrollTop:P.scrollTop}:It(C)),Ut(l)?((ce=Cr(l)).x+=l.clientLeft,ce.y+=l.clientTop):H&&(ce.x=Kn(H))),{x:W.left+re.scrollLeft-ce.x,y:W.top+re.scrollTop-ce.y,width:W.width,height:W.height}}var ys={placement:"bottom",modifiers:[],strategy:"absolute"};function Bi(){for(var w=arguments.length,l=new Array(w),h=0;h<w;h++)l[h]=arguments[h];return!l.some(function(v){return!(v&&"function"==typeof v.getBoundingClientRect)})}function Hi(w){void 0===w&&(w={});var h=w.defaultModifiers,v=void 0===h?[]:h,C=w.defaultOptions,P=void 0===C?ys:C;return function(H,W,re){void 0===re&&(re=P);var ce,Ee,Te={placement:"bottom",orderedModifiers:[],options:Object.assign({},ys,P),modifiersData:{},elements:{reference:H,popper:W},attributes:{},styles:{}},lt=[],rt=!1,Ye={state:Te,setOptions:function(at){var Gt="function"==typeof at?at(Te.options):at;nt(),Te.options=Object.assign({},P,Te.options,Gt),Te.scrollParents={reference:Mn(H)?ui(H):H.contextElement?ui(H.contextElement):[],popper:ui(W)};var Nt,At,Mt,Pt,Kt=(Nt=[].concat(v,Te.options.modifiers),At=Nt.reduce(function(Mt,Pt){var Vt=Mt[Pt.name];return Mt[Pt.name]=Vt?Object.assign({},Vt,Pt,{options:Object.assign({},Vt.options,Pt.options),data:Object.assign({},Vt.data,Pt.data)}):Pt,Mt},{}),Mt=Object.keys(At).map(function(Mt){return At[Mt]}),Pt=function(w){var l=new Map,h=new Set,v=[];return w.forEach(function(C){l.set(C.name,C)}),w.forEach(function(C){h.has(C.name)||function P(H){h.add(H.name),[].concat(H.requires||[],H.requiresIfExists||[]).forEach(function(W){if(!h.has(W)){var re=l.get(W);re&&P(re)}}),v.push(H)}(C)}),v}(Mt),Tn.reduce(function(Vt,dn){return Vt.concat(Pt.filter(function(rn){return rn.phase===dn}))},[]));return Te.orderedModifiers=Kt.filter(function(Mt){return Mt.enabled}),Te.orderedModifiers.forEach(function(Mt){var Vt=Mt.options,rn=Mt.effect;if("function"==typeof rn){var _n=rn({state:Te,name:Mt.name,instance:Ye,options:void 0===Vt?{}:Vt});lt.push(_n||function(){})}}),Ye.update()},forceUpdate:function(){if(!rt){var at=Te.elements,Gt=at.reference,Nt=at.popper;if(Bi(Gt,Nt)){Te.rects={reference:Ho(Gt,ai(Nt),"fixed"===Te.options.strategy),popper:Ji(Nt)},Te.reset=!1,Te.placement=Te.options.placement,Te.orderedModifiers.forEach(function(rn){return Te.modifiersData[rn.name]=Object.assign({},rn.data)});for(var At=0;At<Te.orderedModifiers.length;At++)if(!0!==Te.reset){var Kt=Te.orderedModifiers[At],Mt=Kt.fn,Pt=Kt.options;"function"==typeof Mt&&(Te=Mt({state:Te,options:void 0===Pt?{}:Pt,name:Kt.name,instance:Ye})||Te)}else Te.reset=!1,At=-1}}},update:(ce=function(){return new Promise(function(at){Ye.forceUpdate(),at(Te)})},function(){return Ee||(Ee=new Promise(function(at){Promise.resolve().then(function(){Ee=void 0,at(ce())})})),Ee}),destroy:function(){nt(),rt=!0}};if(!Bi(H,W))return Ye;function nt(){lt.forEach(function(at){return at()}),lt=[]}return Ye.setOptions(re).then(function(at){!rt&&re.onFirstUpdate&&re.onFirstUpdate(at)}),Ye}}var Ks=Hi(),Ro=Hi({defaultModifiers:[cn,Wn,Ii,Un]}),ks=Hi({defaultModifiers:[cn,Wn,Ii,Un,Sr,Ot,_s,Si,_r]}),uo=Object.freeze({__proto__:null,popperGenerator:Hi,detectOverflow:Me,createPopperBase:Ks,createPopper:ks,createPopperLite:Ro,top:ge,bottom:bt,right:Xt,left:gn,auto:Mi,basePlacements:kn,start:Rt,end:rr,clippingParents:Nn,viewport:Dr,popper:ut,reference:Bn,variationPlacements:$t,placements:vt,beforeRead:"beforeRead",read:"read",afterRead:"afterRead",beforeMain:"beforeMain",main:"main",afterMain:"afterMain",beforeWrite:"beforeWrite",write:"write",afterWrite:"afterWrite",modifierPhases:Tn,applyStyles:Un,arrow:Si,computeStyles:Ii,eventListeners:cn,flip:Ot,hide:_r,offset:Sr,popperOffsets:Wn,preventOverflow:_s});const Gs=w=>{let l=w.getAttribute("data-bs-target");if(!l||"#"===l){let h=w.getAttribute("href");if(!h||!h.includes("#")&&!h.startsWith("."))return null;h.includes("#")&&!h.startsWith("#")&&(h=`#${h.split("#")[1]}`),l=h&&"#"!==h?h.trim():null}return l},Xs=w=>{const l=Gs(w);return l&&document.querySelector(l)?l:null},Zn=w=>{const l=Gs(w);return l?document.querySelector(l):null},Wo=w=>{w.dispatchEvent(new Event("transitionend"))},Ri=w=>!(!w||"object"!=typeof w)&&(void 0!==w.jquery&&(w=w[0]),void 0!==w.nodeType),zr=w=>Ri(w)?w.jquery?w[0]:w:"string"==typeof w&&w.length>0?document.querySelector(w):null,yr=(w,l,h)=>{Object.keys(h).forEach(v=>{const C=h[v],P=l[v],H=P&&Ri(P)?"element":null==(W=P)?`${W}`:{}.toString.call(W).match(/\s([a-z]+)/i)[1].toLowerCase();var W;if(!new RegExp(C).test(H))throw new TypeError(`${w.toUpperCase()}: Option "${v}" provided type "${H}" but expected type "${C}".`)})},ns=w=>!(!Ri(w)||0===w.getClientRects().length)&&"visible"===getComputedStyle(w).getPropertyValue("visibility"),ci=w=>!w||w.nodeType!==Node.ELEMENT_NODE||!!w.classList.contains("disabled")||(void 0!==w.disabled?w.disabled:w.hasAttribute("disabled")&&"false"!==w.getAttribute("disabled")),co=w=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof w.getRootNode){const l=w.getRootNode();return l instanceof ShadowRoot?l:null}return w instanceof ShadowRoot?w:w.parentNode?co(w.parentNode):null},rs=()=>{},Ys=()=>{const{jQuery:w}=window;return w&&!document.body.hasAttribute("data-bs-no-jquery")?w:null},ws=[],lr=()=>"rtl"===document.documentElement.dir,Gn=w=>{var l;l=()=>{const l=Ys();if(l){const h=w.NAME,v=l.fn[h];l.fn[h]=w.jQueryInterface,l.fn[h].Constructor=w,l.fn[h].noConflict=()=>(l.fn[h]=v,w.jQueryInterface)}},"loading"===document.readyState?(ws.length||document.addEventListener("DOMContentLoaded",()=>{ws.forEach(h=>h())}),ws.push(l)):l()},qr=w=>{"function"==typeof w&&w()},is=(w,l,h=!0)=>{if(!h)return void qr(w);const v=(H=>{if(!H)return 0;let{transitionDuration:W,transitionDelay:re}=window.getComputedStyle(H);const ce=Number.parseFloat(W),Ee=Number.parseFloat(re);return ce||Ee?(W=W.split(",")[0],re=re.split(",")[0],1e3*(Number.parseFloat(W)+Number.parseFloat(re))):0})(l)+5;let C=!1;const P=({target:H})=>{H===l&&(C=!0,l.removeEventListener("transitionend",P),qr(w))};l.addEventListener("transitionend",P),setTimeout(()=>{C||Wo(l)},v)},ss=(w,l,h,v)=>{let C=w.indexOf(l);if(-1===C)return w[!h&&v?w.length-1:0];const P=w.length;return C+=h?1:-1,v&&(C=(C+P)%P),w[Math.max(0,Math.min(C,P-1))]},zo=/[^.]*(?=\..*)\.|.*/,qo=/\..*/,Vs=/::\d+$/,u={};let p=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},x=/^(mouseenter|mouseleave)/i,O=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function F(w,l){return l&&`${l}::${p++}`||w.uidEvent||p++}function I(w){const l=F(w);return w.uidEvent=l,u[l]=u[l]||{},u[l]}function X(w,l,h=null){const v=Object.keys(w);for(let C=0,P=v.length;C<P;C++){const H=w[v[C]];if(H.originalHandler===l&&H.delegationSelector===h)return H}return null}function J(w,l,h){const v="string"==typeof l,C=v?h:l;let P=Oe(w);return O.has(P)||(P=w),[v,C,P]}function ie(w,l,h,v,C){if("string"!=typeof l||!w)return;if(h||(h=v,v=null),x.test(l)){const rt=Ye=>function(nt){if(!nt.relatedTarget||nt.relatedTarget!==nt.delegateTarget&&!nt.delegateTarget.contains(nt.relatedTarget))return Ye.call(this,nt)};v?v=rt(v):h=rt(h)}const[P,H,W]=J(l,h,v),re=I(w),ce=re[W]||(re[W]={}),Ee=X(ce,H,P?h:null);if(Ee)return void(Ee.oneOff=Ee.oneOff&&C);const Te=F(H,l.replace(zo,"")),lt=P?(rt=w,Ye=h,nt=v,function at(Gt){const Nt=rt.querySelectorAll(Ye);for(let{target:At}=Gt;At&&At!==this;At=At.parentNode)for(let Kt=Nt.length;Kt--;)if(Nt[Kt]===At)return Gt.delegateTarget=At,at.oneOff&&U.off(rt,Gt.type,Ye,nt),nt.apply(At,[Gt]);return null}):function(rt,Ye){return function nt(at){return at.delegateTarget=rt,nt.oneOff&&U.off(rt,at.type,Ye),Ye.apply(rt,[at])}}(w,h);var rt,Ye,nt;lt.delegationSelector=P?h:null,lt.originalHandler=H,lt.oneOff=C,lt.uidEvent=Te,ce[Te]=lt,w.addEventListener(W,lt,P)}function me(w,l,h,v,C){const P=X(l[h],v,C);P&&(w.removeEventListener(h,P,Boolean(C)),delete l[h][P.uidEvent])}function Oe(w){return w=w.replace(qo,""),k[w]||w}const U={on(w,l,h,v){ie(w,l,h,v,!1)},one(w,l,h,v){ie(w,l,h,v,!0)},off(w,l,h,v){if("string"!=typeof l||!w)return;const[C,P,H]=J(l,h,v),W=H!==l,re=I(w),ce=l.startsWith(".");if(void 0!==P)return re&&re[H]?void me(w,re,H,P,C?h:null):void 0;ce&&Object.keys(re).forEach(Te=>{!function(lt,rt,Ye,nt){const at=rt[Ye]||{};Object.keys(at).forEach(Gt=>{if(Gt.includes(nt)){const Nt=at[Gt];me(lt,rt,Ye,Nt.originalHandler,Nt.delegationSelector)}})}(w,re,Te,l.slice(1))});const Ee=re[H]||{};Object.keys(Ee).forEach(Te=>{const lt=Te.replace(Vs,"");if(!W||l.includes(lt)){const rt=Ee[Te];me(w,re,H,rt.originalHandler,rt.delegationSelector)}})},trigger(w,l,h){if("string"!=typeof l||!w)return null;const v=Ys(),C=Oe(l),P=l!==C,H=O.has(C);let W,re=!0,ce=!0,Ee=!1,Te=null;return P&&v&&(W=v.Event(l,h),v(w).trigger(W),re=!W.isPropagationStopped(),ce=!W.isImmediatePropagationStopped(),Ee=W.isDefaultPrevented()),H?(Te=document.createEvent("HTMLEvents")).initEvent(C,re,!0):Te=new CustomEvent(l,{bubbles:re,cancelable:!0}),void 0!==h&&Object.keys(h).forEach(lt=>{Object.defineProperty(Te,lt,{get:()=>h[lt]})}),Ee&&Te.preventDefault(),ce&&w.dispatchEvent(Te),Te.defaultPrevented&&void 0!==W&&W.preventDefault(),Te}},ve=new Map,tt={set(w,l,h){ve.has(w)||ve.set(w,new Map);const v=ve.get(w);v.has(l)||0===v.size?v.set(l,h):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(v.keys())[0]}.`)},get:(w,l)=>ve.has(w)&&ve.get(w).get(l)||null,remove(w,l){if(!ve.has(w))return;const h=ve.get(w);h.delete(l),0===h.size&&ve.delete(w)}};class Ze{constructor(l){(l=zr(l))&&(this._element=l,tt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){tt.remove(this._element,this.constructor.DATA_KEY),U.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(l=>{this[l]=null})}_queueCallback(l,h,v=!0){is(l,h,v)}static getInstance(l){return tt.get(zr(l),this.DATA_KEY)}static getOrCreateInstance(l,h={}){return this.getInstance(l)||new this(l,"object"==typeof h?h:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const on=(w,l="hide")=>{const v=w.NAME;U.on(document,`click.dismiss${w.EVENT_KEY}`,`[data-bs-dismiss="${v}"]`,function(C){if(["A","AREA"].includes(this.tagName)&&C.preventDefault(),ci(this))return;const P=Zn(this)||this.closest(`.${v}`);w.getOrCreateInstance(P)[l]()})};class Dt extends Ze{static get NAME(){return"alert"}close(){if(U.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const l=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,l)}_destroyElement(){this._element.remove(),U.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(l){return this.each(function(){const h=Dt.getOrCreateInstance(this);if("string"==typeof l){if(void 0===h[l]||l.startsWith("_")||"constructor"===l)throw new TypeError(`No method named "${l}"`);h[l](this)}})}}on(Dt,"close"),Gn(Dt);class Ur extends Ze{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(l){return this.each(function(){const h=Ur.getOrCreateInstance(this);"toggle"===l&&h[l]()})}}function Fn(w){return"true"===w||"false"!==w&&(w===Number(w).toString()?Number(w):""===w||"null"===w?null:w)}function hi(w){return w.replace(/[A-Z]/g,l=>`-${l.toLowerCase()}`)}U.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',w=>{w.preventDefault();const l=w.target.closest('[data-bs-toggle="button"]');Ur.getOrCreateInstance(l).toggle()}),Gn(Ur);const Sn={setDataAttribute(w,l,h){w.setAttribute(`data-bs-${hi(l)}`,h)},removeDataAttribute(w,l){w.removeAttribute(`data-bs-${hi(l)}`)},getDataAttributes(w){if(!w)return{};const l={};return Object.keys(w.dataset).filter(h=>h.startsWith("bs")).forEach(h=>{let v=h.replace(/^bs/,"");v=v.charAt(0).toLowerCase()+v.slice(1,v.length),l[v]=Fn(w.dataset[h])}),l},getDataAttribute:(w,l)=>Fn(w.getAttribute(`data-bs-${hi(l)}`)),offset(w){const l=w.getBoundingClientRect();return{top:l.top+window.pageYOffset,left:l.left+window.pageXOffset}},position:w=>({top:w.offsetTop,left:w.offsetLeft})},dt={find:(w,l=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(l,w)),findOne:(w,l=document.documentElement)=>Element.prototype.querySelector.call(l,w),children:(w,l)=>[].concat(...w.children).filter(h=>h.matches(l)),parents(w,l){const h=[];let v=w.parentNode;for(;v&&v.nodeType===Node.ELEMENT_NODE&&3!==v.nodeType;)v.matches(l)&&h.push(v),v=v.parentNode;return h},prev(w,l){let h=w.previousElementSibling;for(;h;){if(h.matches(l))return[h];h=h.previousElementSibling}return[]},next(w,l){let h=w.nextElementSibling;for(;h;){if(h.matches(l))return[h];h=h.nextElementSibling}return[]},focusableChildren(w){const l=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(h=>`${h}:not([tabindex^="-"])`).join(", ");return this.find(l,w).filter(h=>!ci(h)&&ns(h))}},Kr="carousel",ur={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Xn={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},er="next",wt="prev",Bt="left",fn="right",wr={ArrowLeft:fn,ArrowRight:Bt},br="slid.bs.carousel",pi="active",Yt=".active.carousel-item";class Mr extends Ze{constructor(l,h){super(l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(h),this._indicatorsElement=dt.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return ur}static get NAME(){return Kr}next(){this._slide(er)}nextWhenVisible(){!document.hidden&&ns(this._element)&&this.next()}prev(){this._slide(wt)}pause(l){l||(this._isPaused=!0),dt.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(Wo(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(l){l||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(l){this._activeElement=dt.findOne(Yt,this._element);const h=this._getItemIndex(this._activeElement);if(!(l>this._items.length-1||l<0)){if(!this._isSliding)return h===l?(this.pause(),void this.cycle()):void this._slide(l>h?er:wt,this._items[l]);U.one(this._element,br,()=>this.to(l))}}_getConfig(l){return l=Ht(Ht(Ht({},ur),Sn.getDataAttributes(this._element)),"object"==typeof l?l:{}),yr(Kr,l,Xn),l}_handleSwipe(){const l=Math.abs(this.touchDeltaX);if(l<=40)return;const h=l/this.touchDeltaX;this.touchDeltaX=0,h&&this._slide(h>0?fn:Bt)}_addEventListeners(){this._config.keyboard&&U.on(this._element,"keydown.bs.carousel",l=>this._keydown(l)),"hover"===this._config.pause&&(U.on(this._element,"mouseenter.bs.carousel",l=>this.pause(l)),U.on(this._element,"mouseleave.bs.carousel",l=>this.cycle(l))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const l=P=>this._pointerEvent&&("pen"===P.pointerType||"touch"===P.pointerType),h=P=>{l(P)?this.touchStartX=P.clientX:this._pointerEvent||(this.touchStartX=P.touches[0].clientX)},v=P=>{this.touchDeltaX=P.touches&&P.touches.length>1?0:P.touches[0].clientX-this.touchStartX},C=P=>{l(P)&&(this.touchDeltaX=P.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(H=>this.cycle(H),500+this._config.interval))};dt.find(".carousel-item img",this._element).forEach(P=>{U.on(P,"dragstart.bs.carousel",H=>H.preventDefault())}),this._pointerEvent?(U.on(this._element,"pointerdown.bs.carousel",P=>h(P)),U.on(this._element,"pointerup.bs.carousel",P=>C(P)),this._element.classList.add("pointer-event")):(U.on(this._element,"touchstart.bs.carousel",P=>h(P)),U.on(this._element,"touchmove.bs.carousel",P=>v(P)),U.on(this._element,"touchend.bs.carousel",P=>C(P)))}_keydown(l){if(/input|textarea/i.test(l.target.tagName))return;const h=wr[l.key];h&&(l.preventDefault(),this._slide(h))}_getItemIndex(l){return this._items=l&&l.parentNode?dt.find(".carousel-item",l.parentNode):[],this._items.indexOf(l)}_getItemByOrder(l,h){return ss(this._items,h,l===er,this._config.wrap)}_triggerSlideEvent(l,h){const v=this._getItemIndex(l),C=this._getItemIndex(dt.findOne(Yt,this._element));return U.trigger(this._element,"slide.bs.carousel",{relatedTarget:l,direction:h,from:C,to:v})}_setActiveIndicatorElement(l){if(this._indicatorsElement){const h=dt.findOne(".active",this._indicatorsElement);h.classList.remove(pi),h.removeAttribute("aria-current");const v=dt.find("[data-bs-target]",this._indicatorsElement);for(let C=0;C<v.length;C++)if(Number.parseInt(v[C].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(l)){v[C].classList.add(pi),v[C].setAttribute("aria-current","true");break}}}_updateInterval(){const l=this._activeElement||dt.findOne(Yt,this._element);if(!l)return;const h=Number.parseInt(l.getAttribute("data-bs-interval"),10);h?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=h):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(l,h){const v=this._directionToOrder(l),C=dt.findOne(Yt,this._element),P=this._getItemIndex(C),H=h||this._getItemByOrder(v,C),W=this._getItemIndex(H),re=Boolean(this._interval),ce=v===er,Ee=ce?"carousel-item-start":"carousel-item-end",Te=ce?"carousel-item-next":"carousel-item-prev",lt=this._orderToDirection(v);if(H&&H.classList.contains(pi))return void(this._isSliding=!1);if(this._isSliding||this._triggerSlideEvent(H,lt).defaultPrevented||!C||!H)return;this._isSliding=!0,re&&this.pause(),this._setActiveIndicatorElement(H),this._activeElement=H;const rt=()=>{U.trigger(this._element,br,{relatedTarget:H,direction:lt,from:P,to:W})};this._element.classList.contains("slide")?(H.classList.add(Te),C.classList.add(Ee),H.classList.add(Ee),this._queueCallback(()=>{H.classList.remove(Ee,Te),H.classList.add(pi),C.classList.remove(pi,Te,Ee),this._isSliding=!1,setTimeout(rt,0)},C,!0)):(C.classList.remove(pi),H.classList.add(pi),this._isSliding=!1,rt()),re&&this.cycle()}_directionToOrder(l){return[fn,Bt].includes(l)?lr()?l===Bt?wt:er:l===Bt?er:wt:l}_orderToDirection(l){return[er,wt].includes(l)?lr()?l===wt?Bt:fn:l===wt?fn:Bt:l}static carouselInterface(l,h){const v=Mr.getOrCreateInstance(l,h);let{_config:C}=v;"object"==typeof h&&(C=Ht(Ht({},C),h));const P="string"==typeof h?h:C.slide;if("number"==typeof h)v.to(h);else if("string"==typeof P){if(void 0===v[P])throw new TypeError(`No method named "${P}"`);v[P]()}else C.interval&&C.ride&&(v.pause(),v.cycle())}static jQueryInterface(l){return this.each(function(){Mr.carouselInterface(this,l)})}static dataApiClickHandler(l){const h=Zn(this);if(!h||!h.classList.contains("carousel"))return;const v=Ht(Ht({},Sn.getDataAttributes(h)),Sn.getDataAttributes(this)),C=this.getAttribute("data-bs-slide-to");C&&(v.interval=!1),Mr.carouselInterface(h,v),C&&Mr.getInstance(h).to(C),l.preventDefault()}}U.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",Mr.dataApiClickHandler),U.on(window,"load.bs.carousel.data-api",()=>{const w=dt.find('[data-bs-ride="carousel"]');for(let l=0,h=w.length;l<h;l++)Mr.carouselInterface(w[l],Mr.getInstance(w[l]))}),Gn(Mr);const vi="collapse",as="bs.collapse",mi=`.${as}`,ls={toggle:!0,parent:null},Ui={toggle:"boolean",parent:"(null|element)"},Er=`show${mi}`,Ss=`shown${mi}`,As=`hide${mi}`,Es=`hidden${mi}`,B=`click${mi}.data-api`,Y="show",ne="collapse",Se="collapsing",he="collapsed",Fe=`:scope .${ne} .${ne}`,mt='[data-bs-toggle="collapse"]';class gt extends Ze{constructor(l,h){super(l),this._isTransitioning=!1,this._config=this._getConfig(h),this._triggerArray=[];const v=dt.find(mt);for(let C=0,P=v.length;C<P;C++){const H=v[C],W=Xs(H),re=dt.find(W).filter(ce=>ce===this._element);null!==W&&re.length&&(this._selector=W,this._triggerArray.push(H))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ls}static get NAME(){return vi}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let l,h=[];if(this._config.parent){const H=dt.find(Fe,this._config.parent);h=dt.find(".collapse.show, .collapse.collapsing",this._config.parent).filter(W=>!H.includes(W))}const v=dt.findOne(this._selector);if(h.length){const H=h.find(W=>v!==W);if((l=H?gt.getInstance(H):null)&&l._isTransitioning)return}if(U.trigger(this._element,Er).defaultPrevented)return;h.forEach(H=>{v!==H&&gt.getOrCreateInstance(H,{toggle:!1}).hide(),l||tt.set(H,as,null)});const C=this._getDimension();this._element.classList.remove(ne),this._element.classList.add(Se),this._element.style[C]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const P=`scroll${C[0].toUpperCase()+C.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Se),this._element.classList.add(ne,Y),this._element.style[C]="",U.trigger(this._element,Ss)},this._element,!0),this._element.style[C]=`${this._element[P]}px`}hide(){if(this._isTransitioning||!this._isShown()||U.trigger(this._element,As).defaultPrevented)return;const l=this._getDimension();this._element.style[l]=`${this._element.getBoundingClientRect()[l]}px`,this._element.classList.add(Se),this._element.classList.remove(ne,Y);const h=this._triggerArray.length;for(let v=0;v<h;v++){const C=this._triggerArray[v],P=Zn(C);P&&!this._isShown(P)&&this._addAriaAndCollapsedClass([C],!1)}this._isTransitioning=!0,this._element.style[l]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Se),this._element.classList.add(ne),U.trigger(this._element,Es)},this._element,!0)}_isShown(l=this._element){return l.classList.contains(Y)}_getConfig(l){return(l=Ht(Ht(Ht({},ls),Sn.getDataAttributes(this._element)),l)).toggle=Boolean(l.toggle),l.parent=zr(l.parent),yr(vi,l,Ui),l}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const l=dt.find(Fe,this._config.parent);dt.find(mt,this._config.parent).filter(h=>!l.includes(h)).forEach(h=>{const v=Zn(h);v&&this._addAriaAndCollapsedClass([h],this._isShown(v))})}_addAriaAndCollapsedClass(l,h){l.length&&l.forEach(v=>{h?v.classList.remove(he):v.classList.add(he),v.setAttribute("aria-expanded",h)})}static jQueryInterface(l){return this.each(function(){const h={};"string"==typeof l&&/show|hide/.test(l)&&(h.toggle=!1);const v=gt.getOrCreateInstance(this,h);if("string"==typeof l){if(void 0===v[l])throw new TypeError(`No method named "${l}"`);v[l]()}})}}U.on(document,B,mt,function(w){("A"===w.target.tagName||w.delegateTarget&&"A"===w.delegateTarget.tagName)&&w.preventDefault();const l=Xs(this);dt.find(l).forEach(h=>{gt.getOrCreateInstance(h,{toggle:!1}).toggle()})}),Gn(gt);const Lt="dropdown",Jt="Escape",an="ArrowUp",pn="ArrowDown",ri=new RegExp(`${an}|${pn}|${Jt}`),ii="show",js='[data-bs-toggle="dropdown"]',cs=".dropdown-menu",Yo=lr()?"top-end":"top-start",Cl=lr()?"top-start":"top-end",Tl=lr()?"bottom-end":"bottom-start",Sl=lr()?"bottom-start":"bottom-end",ha=lr()?"left-start":"right-start",fa=lr()?"right-start":"left-start",Qs={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},_o={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Fr extends Ze{constructor(l,h){super(l),this._popper=null,this._config=this._getConfig(h),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Qs}static get DefaultType(){return _o}static get NAME(){return Lt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(ci(this._element)||this._isShown(this._menu))return;const l={relatedTarget:this._element};if(U.trigger(this._element,"show.bs.dropdown",l).defaultPrevented)return;const h=Fr.getParentFromElement(this._element);this._inNavbar?Sn.setDataAttribute(this._menu,"popper","none"):this._createPopper(h),"ontouchstart"in document.documentElement&&!h.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(v=>U.on(v,"mouseover",rs)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ii),this._element.classList.add(ii),U.trigger(this._element,"shown.bs.dropdown",l)}hide(){!ci(this._element)&&this._isShown(this._menu)&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(l){U.trigger(this._element,"hide.bs.dropdown",l).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(h=>U.off(h,"mouseover",rs)),this._popper&&this._popper.destroy(),this._menu.classList.remove(ii),this._element.classList.remove(ii),this._element.setAttribute("aria-expanded","false"),Sn.removeDataAttribute(this._menu,"popper"),U.trigger(this._element,"hidden.bs.dropdown",l))}_getConfig(l){if(l=Ht(Ht(Ht({},this.constructor.Default),Sn.getDataAttributes(this._element)),l),yr(Lt,l,this.constructor.DefaultType),"object"==typeof l.reference&&!Ri(l.reference)&&"function"!=typeof l.reference.getBoundingClientRect)throw new TypeError(`${Lt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return l}_createPopper(l){if(void 0===uo)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let h=this._element;"parent"===this._config.reference?h=l:Ri(this._config.reference)?h=zr(this._config.reference):"object"==typeof this._config.reference&&(h=this._config.reference);const v=this._getPopperConfig(),C=v.modifiers.find(P=>"applyStyles"===P.name&&!1===P.enabled);this._popper=ks(h,this._menu,v),C&&Sn.setDataAttribute(this._menu,"popper","static")}_isShown(l=this._element){return l.classList.contains(ii)}_getMenuElement(){return dt.next(this._element,cs)[0]}_getPlacement(){const l=this._element.parentNode;if(l.classList.contains("dropend"))return ha;if(l.classList.contains("dropstart"))return fa;const h="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return l.classList.contains("dropup")?h?Cl:Yo:h?Sl:Tl}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:l}=this._config;return"string"==typeof l?l.split(",").map(h=>Number.parseInt(h,10)):"function"==typeof l?h=>l(h,this._element):l}_getPopperConfig(){const l={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(l.modifiers=[{name:"applyStyles",enabled:!1}]),Ht(Ht({},l),"function"==typeof this._config.popperConfig?this._config.popperConfig(l):this._config.popperConfig)}_selectMenuItem({key:l,target:h}){const v=dt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(ns);v.length&&ss(v,h,l===pn,!v.includes(h)).focus()}static jQueryInterface(l){return this.each(function(){const h=Fr.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l]()}})}static clearMenus(l){if(l&&(2===l.button||"keyup"===l.type&&"Tab"!==l.key))return;const h=dt.find(js);for(let v=0,C=h.length;v<C;v++){const P=Fr.getInstance(h[v]);if(!P||!1===P._config.autoClose||!P._isShown())continue;const H={relatedTarget:P._element};if(l){const W=l.composedPath(),re=W.includes(P._menu);if(W.includes(P._element)||"inside"===P._config.autoClose&&!re||"outside"===P._config.autoClose&&re||P._menu.contains(l.target)&&("keyup"===l.type&&"Tab"===l.key||/input|select|option|textarea|form/i.test(l.target.tagName)))continue;"click"===l.type&&(H.clickEvent=l)}P._completeHide(H)}}static getParentFromElement(l){return Zn(l)||l.parentNode}static dataApiKeydownHandler(l){if(/input|textarea/i.test(l.target.tagName)?"Space"===l.key||l.key!==Jt&&(l.key!==pn&&l.key!==an||l.target.closest(cs)):!ri.test(l.key))return;const h=this.classList.contains(ii);if(!h&&l.key===Jt||(l.preventDefault(),l.stopPropagation(),ci(this)))return;const v=this.matches(js)?this:dt.prev(this,js)[0],C=Fr.getOrCreateInstance(v);if(l.key!==Jt)return l.key===an||l.key===pn?(h||C.show(),void C._selectMenuItem(l)):void(h&&"Space"!==l.key||Fr.clearMenus());C.hide()}}U.on(document,"keydown.bs.dropdown.data-api",js,Fr.dataApiKeydownHandler),U.on(document,"keydown.bs.dropdown.data-api",cs,Fr.dataApiKeydownHandler),U.on(document,"click.bs.dropdown.data-api",Fr.clearMenus),U.on(document,"keyup.bs.dropdown.data-api",Fr.clearMenus),U.on(document,"click.bs.dropdown.data-api",js,function(w){w.preventDefault(),Fr.getOrCreateInstance(this).toggle()}),Gn(Fr);const yo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pa=".sticky-top";class Ls{constructor(){this._element=document.body}getWidth(){const l=document.documentElement.clientWidth;return Math.abs(window.innerWidth-l)}hide(){const l=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",h=>h+l),this._setElementAttributes(yo,"paddingRight",h=>h+l),this._setElementAttributes(pa,"marginRight",h=>h-l)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(l,h,v){const C=this.getWidth();this._applyManipulationCallback(l,P=>{if(P!==this._element&&window.innerWidth>P.clientWidth+C)return;this._saveInitialAttribute(P,h);const H=window.getComputedStyle(P)[h];P.style[h]=`${v(Number.parseFloat(H))}px`})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(yo,"paddingRight"),this._resetElementAttributes(pa,"marginRight")}_saveInitialAttribute(l,h){const v=l.style[h];v&&Sn.setDataAttribute(l,h,v)}_resetElementAttributes(l,h){this._applyManipulationCallback(l,v=>{const C=Sn.getDataAttribute(v,h);void 0===C?v.style.removeProperty(h):(Sn.removeDataAttribute(v,h),v.style[h]=C)})}_applyManipulationCallback(l,h){Ri(l)?h(l):dt.find(l,this._element).forEach(h)}isOverflowing(){return this.getWidth()>0}}const Ma={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Os={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Js="backdrop",Ns=`mousedown.bs.${Js}`;class ga{constructor(l){this._config=this._getConfig(l),this._isAppended=!1,this._element=null}show(l){this._config.isVisible?(this._append(),this._config.isAnimated&&this._getElement(),this._getElement().classList.add("show"),this._emulateAnimation(()=>{qr(l)})):qr(l)}hide(l){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),qr(l)})):qr(l)}_getElement(){if(!this._element){const l=document.createElement("div");l.className=this._config.className,this._config.isAnimated&&l.classList.add("fade"),this._element=l}return this._element}_getConfig(l){return(l=Ht(Ht({},Ma),"object"==typeof l?l:{})).rootElement=zr(l.rootElement),yr(Js,l,Os),l}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),U.on(this._getElement(),Ns,()=>{qr(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(U.off(this._element,Ns),this._element.remove(),this._isAppended=!1)}_emulateAnimation(l){is(l,this._getElement(),this._config.isAnimated)}}const Pa={trapElement:null,autofocus:!0},Fa={trapElement:"element",autofocus:"boolean"},Ai=".bs.focustrap",Ms=`focusin${Ai}`,El=`keydown.tab${Ai}`,Ia="backward";class Ba{constructor(l){this._config=this._getConfig(l),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:l,autofocus:h}=this._config;this._isActive||(h&&l.focus(),U.off(document,Ai),U.on(document,Ms,v=>this._handleFocusin(v)),U.on(document,El,v=>this._handleKeydown(v)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,U.off(document,Ai))}_handleFocusin(l){const{target:h}=l,{trapElement:v}=this._config;if(h===document||h===v||v.contains(h))return;const C=dt.focusableChildren(v);0===C.length?v.focus():this._lastTabNavDirection===Ia?C[C.length-1].focus():C[0].focus()}_handleKeydown(l){"Tab"===l.key&&(this._lastTabNavDirection=l.shiftKey?Ia:"forward")}_getConfig(l){return l=Ht(Ht({},Pa),"object"==typeof l?l:{}),yr("focustrap",l,Fa),l}}const xn=".bs.modal",cr={backdrop:!0,keyboard:!0,focus:!0},Vn={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},ko=`hide${xn}`,Ol=`hidePrevented${xn}`,wo=`hidden${xn}`,Ra=`show${xn}`,Dl=`shown${xn}`,Wa=`resize${xn}`,Vo=`click.dismiss${xn}`,va=`keydown.dismiss${xn}`,ma=`mouseup.dismiss${xn}`,za=`mousedown.dismiss${xn}`,_a=`click${xn}.data-api`,$o="modal-open",bo="modal-static";class Ps extends Ze{constructor(l,h){super(l),this._config=this._getConfig(h),this._dialog=dt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Ls}static get Default(){return cr}static get NAME(){return"modal"}toggle(l){return this._isShown?this.hide():this.show(l)}show(l){this._isShown||this._isTransitioning||U.trigger(this._element,Ra,{relatedTarget:l}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add($o),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),U.on(this._dialog,za,()=>{U.one(this._element,ma,h=>{h.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(l)))}hide(){if(!this._isShown||this._isTransitioning||U.trigger(this._element,ko).defaultPrevented)return;this._isShown=!1;const l=this._isAnimated();l&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove("show"),U.off(this._element,Vo),U.off(this._dialog,za),this._queueCallback(()=>this._hideModal(),this._element,l)}dispose(){[window,this._dialog].forEach(l=>U.off(l,xn)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ga({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ba({trapElement:this._element})}_getConfig(l){return l=Ht(Ht(Ht({},cr),Sn.getDataAttributes(this._element)),"object"==typeof l?l:{}),yr("modal",l,Vn),l}_showElement(l){const h=this._isAnimated(),v=dt.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,v&&(v.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,U.trigger(this._element,Dl,{relatedTarget:l})},this._dialog,h)}_setEscapeEvent(){this._isShown?U.on(this._element,va,l=>{this._config.keyboard&&"Escape"===l.key?(l.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==l.key||this._triggerBackdropTransition()}):U.off(this._element,va)}_setResizeEvent(){this._isShown?U.on(window,Wa,()=>this._adjustDialog()):U.off(window,Wa)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove($o),this._resetAdjustments(),this._scrollBar.reset(),U.trigger(this._element,wo)})}_showBackdrop(l){U.on(this._element,Vo,h=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:h.target===h.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(l)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(U.trigger(this._element,Ol).defaultPrevented)return;const{classList:l,scrollHeight:h,style:v}=this._element,C=h>document.documentElement.clientHeight;!C&&"hidden"===v.overflowY||l.contains(bo)||(C||(v.overflowY="hidden"),l.add(bo),this._queueCallback(()=>{l.remove(bo),C||this._queueCallback(()=>{v.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const l=this._element.scrollHeight>document.documentElement.clientHeight,h=this._scrollBar.getWidth(),v=h>0;(!v&&l&&!lr()||v&&!l&&lr())&&(this._element.style.paddingLeft=`${h}px`),(v&&!l&&!lr()||!v&&l&&lr())&&(this._element.style.paddingRight=`${h}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(l,h){return this.each(function(){const v=Ps.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===v[l])throw new TypeError(`No method named "${l}"`);v[l](h)}})}}U.on(document,_a,'[data-bs-toggle="modal"]',function(w){const l=Zn(this);["A","AREA"].includes(this.tagName)&&w.preventDefault(),U.one(l,Ra,v=>{v.defaultPrevented||U.one(l,wo,()=>{ns(this)&&this.focus()})});const h=dt.findOne(".modal.show");h&&Ps.getInstance(h).hide(),Ps.getOrCreateInstance(l).toggle(this)}),on(Ps),Gn(Ps);const Co="offcanvas",ka={backdrop:!0,keyboard:!0,scroll:!1},Nl={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Gi="hidden.bs.offcanvas";class Ei extends Ze{constructor(l,h){super(l),this._config=this._getConfig(h),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return Co}static get Default(){return ka}toggle(l){return this._isShown?this.hide():this.show(l)}show(l){this._isShown||U.trigger(this._element,"show.bs.offcanvas",{relatedTarget:l}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new Ls).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),U.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:l})},this._element,!0))}hide(){!this._isShown||U.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new Ls).reset(),U.trigger(this._element,Gi)},this._element,!0))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(l){return l=Ht(Ht(Ht({},ka),Sn.getDataAttributes(this._element)),"object"==typeof l?l:{}),yr(Co,l,Nl),l}_initializeBackDrop(){return new ga({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ba({trapElement:this._element})}_addEventListeners(){U.on(this._element,"keydown.dismiss.bs.offcanvas",l=>{this._config.keyboard&&"Escape"===l.key&&this.hide()})}static jQueryInterface(l){return this.each(function(){const h=Ei.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l]||l.startsWith("_")||"constructor"===l)throw new TypeError(`No method named "${l}"`);h[l](this)}})}}U.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',function(w){const l=Zn(this);if(["A","AREA"].includes(this.tagName)&&w.preventDefault(),ci(this))return;U.one(l,Gi,()=>{ns(this)&&this.focus()});const h=dt.findOne(".offcanvas.show");h&&h!==l&&Ei.getInstance(h).hide(),Ei.getOrCreateInstance(l).toggle(this)}),U.on(window,"load.bs.offcanvas.data-api",()=>dt.find(".offcanvas.show").forEach(w=>Ei.getOrCreateInstance(w).show())),on(Ei),Gn(Ei);const Ga=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ml=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ba=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,To=(w,l)=>{const h=w.nodeName.toLowerCase();if(l.includes(h))return!Ga.has(h)||Boolean(Ml.test(w.nodeValue)||ba.test(w.nodeValue));const v=l.filter(C=>C instanceof RegExp);for(let C=0,P=v.length;C<P;C++)if(v[C].test(h))return!0;return!1};function Qo(w,l,h){if(!w.length)return w;if(h&&"function"==typeof h)return h(w);const v=(new window.DOMParser).parseFromString(w,"text/html"),C=[].concat(...v.body.querySelectorAll("*"));for(let P=0,H=C.length;P<H;P++){const W=C[P],re=W.nodeName.toLowerCase();if(!Object.keys(l).includes(re)){W.remove();continue}const ce=[].concat(...W.attributes),Ee=[].concat(l["*"]||[],l[re]||[]);ce.forEach(Te=>{To(Te,Ee)||W.removeAttribute(Te.nodeName)})}return v.body.innerHTML}const Xi="tooltip",Va=new Set(["sanitize","allowList","sanitizeFn"]),Pl={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Jo={AUTO:"auto",TOP:"top",RIGHT:lr()?"left":"right",BOTTOM:"bottom",LEFT:lr()?"right":"left"},xa={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},$a={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Zo="fade",eo="show",So="show",Ao=".tooltip-inner",Qa="hide.bs.modal",Eo="hover",ea="focus";class yi extends Ze{constructor(l,h){if(void 0===uo)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(h),this.tip=null,this._setListeners()}static get Default(){return xa}static get NAME(){return Xi}static get Event(){return $a}static get DefaultType(){return Pl}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(l){if(this._isEnabled)if(l){const h=this._initializeOnDelegatedTarget(l);h._activeTrigger.click=!h._activeTrigger.click,h._isWithActiveTrigger()?h._enter(null,h):h._leave(null,h)}else{if(this.getTipElement().classList.contains(eo))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),U.off(this._element.closest(".modal"),Qa,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const l=U.trigger(this._element,this.constructor.Event.SHOW),h=co(this._element),v=null===h?this._element.ownerDocument.documentElement.contains(this._element):h.contains(this._element);if(l.defaultPrevented||!v)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Ao).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const C=this.getTipElement(),P=(w=>{do{w+=Math.floor(1e6*Math.random())}while(document.getElementById(w));return w})(this.constructor.NAME);C.setAttribute("id",P),this._element.setAttribute("aria-describedby",P),this._config.animation&&C.classList.add(Zo);const H="function"==typeof this._config.placement?this._config.placement.call(this,C,this._element):this._config.placement,W=this._getAttachment(H);this._addAttachmentClass(W);const{container:re}=this._config;tt.set(C,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(re.append(C),U.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=ks(this._element,C,this._getPopperConfig(W)),C.classList.add(eo);const ce=this._resolvePossibleFunction(this._config.customClass);ce&&C.classList.add(...ce.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(Te=>{U.on(Te,"mouseover",rs)});const Ee=this.tip.classList.contains(Zo);this._queueCallback(()=>{const Te=this._hoverState;this._hoverState=null,U.trigger(this._element,this.constructor.Event.SHOWN),"out"===Te&&this._leave(null,this)},this.tip,Ee)}hide(){if(!this._popper)return;const l=this.getTipElement();if(U.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;l.classList.remove(eo),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(v=>U.off(v,"mouseover",rs)),this._activeTrigger.click=!1,this._activeTrigger[ea]=!1,this._activeTrigger[Eo]=!1;const h=this.tip.classList.contains(Zo);this._queueCallback(()=>{this._isWithActiveTrigger()||(this._hoverState!==So&&l.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),U.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())},this.tip,h),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const l=document.createElement("div");l.innerHTML=this._config.template;const h=l.children[0];return this.setContent(h),h.classList.remove(Zo,eo),this.tip=h,this.tip}setContent(l){this._sanitizeAndSetContent(l,this.getTitle(),Ao)}_sanitizeAndSetContent(l,h,v){const C=dt.findOne(v,l);h||!C?this.setElementContent(C,h):C.remove()}setElementContent(l,h){if(null!==l)return Ri(h)?(h=zr(h),void(this._config.html?h.parentNode!==l&&(l.innerHTML="",l.append(h)):l.textContent=h.textContent)):void(this._config.html?(this._config.sanitize&&(h=Qo(h,this._config.allowList,this._config.sanitizeFn)),l.innerHTML=h):l.textContent=h)}getTitle(){const l=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(l)}updateAttachment(l){return"right"===l?"end":"left"===l?"start":l}_initializeOnDelegatedTarget(l,h){return h||this.constructor.getOrCreateInstance(l.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:l}=this._config;return"string"==typeof l?l.split(",").map(h=>Number.parseInt(h,10)):"function"==typeof l?h=>l(h,this._element):l}_resolvePossibleFunction(l){return"function"==typeof l?l.call(this._element):l}_getPopperConfig(l){const h={placement:l,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:v=>this._handlePopperPlacementChange(v)}],onFirstUpdate:v=>{v.options.placement!==v.placement&&this._handlePopperPlacementChange(v)}};return Ht(Ht({},h),"function"==typeof this._config.popperConfig?this._config.popperConfig(h):this._config.popperConfig)}_addAttachmentClass(l){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(l)}`)}_getAttachment(l){return Jo[l.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(l=>{if("click"===l)U.on(this._element,this.constructor.Event.CLICK,this._config.selector,h=>this.toggle(h));else if("manual"!==l){const v=l===Eo?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;U.on(this._element,l===Eo?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,this._config.selector,C=>this._enter(C)),U.on(this._element,v,this._config.selector,C=>this._leave(C))}}),this._hideModalHandler=()=>{this._element&&this.hide()},U.on(this._element.closest(".modal"),Qa,this._hideModalHandler),this._config.selector?this._config=xl(Ht({},this._config),{trigger:"manual",selector:""}):this._fixTitle()}_fixTitle(){const l=this._element.getAttribute("title"),h=typeof this._element.getAttribute("data-bs-original-title");(l||"string"!==h)&&(this._element.setAttribute("data-bs-original-title",l||""),!l||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",l),this._element.setAttribute("title",""))}_enter(l,h){h=this._initializeOnDelegatedTarget(l,h),l&&(h._activeTrigger["focusin"===l.type?ea:Eo]=!0),h.getTipElement().classList.contains(eo)||h._hoverState===So?h._hoverState=So:(clearTimeout(h._timeout),h._hoverState=So,h._config.delay&&h._config.delay.show?h._timeout=setTimeout(()=>{h._hoverState===So&&h.show()},h._config.delay.show):h.show())}_leave(l,h){h=this._initializeOnDelegatedTarget(l,h),l&&(h._activeTrigger["focusout"===l.type?ea:Eo]=h._element.contains(l.relatedTarget)),h._isWithActiveTrigger()||(clearTimeout(h._timeout),h._hoverState="out",h._config.delay&&h._config.delay.hide?h._timeout=setTimeout(()=>{"out"===h._hoverState&&h.hide()},h._config.delay.hide):h.hide())}_isWithActiveTrigger(){for(const l in this._activeTrigger)if(this._activeTrigger[l])return!0;return!1}_getConfig(l){const h=Sn.getDataAttributes(this._element);return Object.keys(h).forEach(v=>{Va.has(v)&&delete h[v]}),(l=Ht(Ht(Ht({},this.constructor.Default),h),"object"==typeof l&&l?l:{})).container=!1===l.container?document.body:zr(l.container),"number"==typeof l.delay&&(l.delay={show:l.delay,hide:l.delay}),"number"==typeof l.title&&(l.title=l.title.toString()),"number"==typeof l.content&&(l.content=l.content.toString()),yr(Xi,l,this.constructor.DefaultType),l.sanitize&&(l.template=Qo(l.template,l.allowList,l.sanitizeFn)),l}_getDelegateConfig(){const l={};for(const h in this._config)this.constructor.Default[h]!==this._config[h]&&(l[h]=this._config[h]);return l}_cleanTipClass(){const l=this.getTipElement(),h=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),v=l.getAttribute("class").match(h);null!==v&&v.length>0&&v.map(C=>C.trim()).forEach(C=>l.classList.remove(C))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(l){const{state:h}=l;h&&(this.tip=h.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(h.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(l){return this.each(function(){const h=yi.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l]()}})}}Gn(yi);const Za=xl(Ht({},yi.Default),{placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Fl=xl(Ht({},yi.DefaultType),{content:"(string|element|function)"}),el={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class no extends yi{static get Default(){return Za}static get NAME(){return"popover"}static get Event(){return el}static get DefaultType(){return Fl}isWithContent(){return this.getTitle()||this._getContent()}setContent(l){this._sanitizeAndSetContent(l,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(l,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(l){return this.each(function(){const h=no.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l]()}})}}Gn(no);const Ea="scrollspy",jo=".bs.scrollspy",Fs={offset:10,method:"auto",target:""},na={offset:"number",method:"string",target:"(string|element)"},tl=`activate${jo}`,nl=`scroll${jo}`,rl=`load${jo}.data-api`,Is="dropdown-item",Bs="active",ia=".nav-link",il=".list-group-item",hs=`${ia}, ${il}, .${Is}`,ro="position";class Yi extends Ze{constructor(l,h){super(l),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(h),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,U.on(this._scrollElement,nl,()=>this._process()),this.refresh(),this._process()}static get Default(){return Fs}static get NAME(){return Ea}refresh(){const h="auto"===this._config.method?this._scrollElement===this._scrollElement.window?"offset":ro:this._config.method,v=h===ro?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),dt.find(hs,this._config.target).map(C=>{const P=Xs(C),H=P?dt.findOne(P):null;if(H){const W=H.getBoundingClientRect();if(W.width||W.height)return[Sn[h](H).top+v,P]}return null}).filter(C=>C).sort((C,P)=>C[0]-P[0]).forEach(C=>{this._offsets.push(C[0]),this._targets.push(C[1])})}dispose(){U.off(this._scrollElement,jo),super.dispose()}_getConfig(l){return(l=Ht(Ht(Ht({},Fs),Sn.getDataAttributes(this._element)),"object"==typeof l&&l?l:{})).target=zr(l.target)||document.documentElement,yr(Ea,l,na),l}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const l=this._getScrollTop()+this._config.offset,h=this._getScrollHeight(),v=this._config.offset+h-this._getOffsetHeight();if(this._scrollHeight!==h&&this.refresh(),l>=v){const C=this._targets[this._targets.length-1];this._activeTarget!==C&&this._activate(C)}else{if(this._activeTarget&&l<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let C=this._offsets.length;C--;)this._activeTarget!==this._targets[C]&&l>=this._offsets[C]&&(void 0===this._offsets[C+1]||l<this._offsets[C+1])&&this._activate(this._targets[C])}}_activate(l){this._activeTarget=l,this._clear();const h=hs.split(",").map(C=>`${C}[data-bs-target="${l}"],${C}[href="${l}"]`),v=dt.findOne(h.join(","),this._config.target);v.classList.add(Bs),v.classList.contains(Is)?dt.findOne(".dropdown-toggle",v.closest(".dropdown")).classList.add(Bs):dt.parents(v,".nav, .list-group").forEach(C=>{dt.prev(C,`${ia}, ${il}`).forEach(P=>P.classList.add(Bs)),dt.prev(C,".nav-item").forEach(P=>{dt.children(P,ia).forEach(H=>H.classList.add(Bs))})}),U.trigger(this._scrollElement,tl,{relatedTarget:l})}_clear(){dt.find(hs,this._config.target).filter(l=>l.classList.contains(Bs)).forEach(l=>l.classList.remove(Bs))}static jQueryInterface(l){return this.each(function(){const h=Yi.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l]()}})}}U.on(window,rl,()=>{dt.find('[data-bs-spy="scroll"]').forEach(w=>new Yi(w))}),Gn(Yi);const ji="active",hl=".active",fl=":scope > li > .active";class so extends Ze{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(ji))return;let l;const h=Zn(this._element),v=this._element.closest(".nav, .list-group");v&&(l=(l=dt.find("UL"===v.nodeName||"OL"===v.nodeName?fl:hl,v))[l.length-1]);const C=l?U.trigger(l,"hide.bs.tab",{relatedTarget:this._element}):null;if(U.trigger(this._element,"show.bs.tab",{relatedTarget:l}).defaultPrevented||null!==C&&C.defaultPrevented)return;this._activate(this._element,v);const P=()=>{U.trigger(l,"hidden.bs.tab",{relatedTarget:this._element}),U.trigger(this._element,"shown.bs.tab",{relatedTarget:l})};h?this._activate(h,h.parentNode,P):P()}_activate(l,h,v){const C=(!h||"UL"!==h.nodeName&&"OL"!==h.nodeName?dt.children(h,hl):dt.find(fl,h))[0],P=v&&C&&C.classList.contains("fade"),H=()=>this._transitionComplete(l,C,v);C&&P?(C.classList.remove("show"),this._queueCallback(H,l,!0)):H()}_transitionComplete(l,h,v){if(h){h.classList.remove(ji);const P=dt.findOne(":scope > .dropdown-menu .active",h.parentNode);P&&P.classList.remove(ji),"tab"===h.getAttribute("role")&&h.setAttribute("aria-selected",!1)}l.classList.add(ji),"tab"===l.getAttribute("role")&&l.setAttribute("aria-selected",!0),l.classList.contains("fade")&&l.classList.add("show");let C=l.parentNode;if(C&&"LI"===C.nodeName&&(C=C.parentNode),C&&C.classList.contains("dropdown-menu")){const P=l.closest(".dropdown");P&&dt.find(".dropdown-toggle",P).forEach(H=>H.classList.add(ji)),l.setAttribute("aria-expanded",!0)}v&&v()}static jQueryInterface(l){return this.each(function(){const h=so.getOrCreateInstance(this);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l]()}})}}U.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',function(w){["A","AREA"].includes(this.tagName)&&w.preventDefault(),!ci(this)&&so.getOrCreateInstance(this).show()}),Gn(so);const Vi="show",si="showing",ql={animation:"boolean",autohide:"boolean",delay:"number"},yl={animation:!0,autohide:!0,delay:5e3};class ki extends Ze{constructor(l,h){super(l),this._config=this._getConfig(h),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ql}static get Default(){return yl}static get NAME(){return"toast"}show(){U.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),this._element.classList.add(Vi),this._element.classList.add(si),this._queueCallback(()=>{this._element.classList.remove(si),U.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){!this._element.classList.contains(Vi)||U.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(si),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(si),this._element.classList.remove(Vi),U.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation))}dispose(){this._clearTimeout(),this._element.classList.contains(Vi)&&this._element.classList.remove(Vi),super.dispose()}_getConfig(l){return l=Ht(Ht(Ht({},yl),Sn.getDataAttributes(this._element)),"object"==typeof l&&l?l:{}),yr("toast",l,this.constructor.DefaultType),l}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(l,h){switch(l.type){case"mouseover":case"mouseout":this._hasMouseInteraction=h;break;case"focusin":case"focusout":this._hasKeyboardInteraction=h}if(h)return void this._clearTimeout();const v=l.relatedTarget;this._element===v||this._element.contains(v)||this._maybeScheduleHide()}_setListeners(){U.on(this._element,"mouseover.bs.toast",l=>this._onInteraction(l,!0)),U.on(this._element,"mouseout.bs.toast",l=>this._onInteraction(l,!1)),U.on(this._element,"focusin.bs.toast",l=>this._onInteraction(l,!0)),U.on(this._element,"focusout.bs.toast",l=>this._onInteraction(l,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(l){return this.each(function(){const h=ki.getOrCreateInstance(this,l);if("string"==typeof l){if(void 0===h[l])throw new TypeError(`No method named "${l}"`);h[l](this)}})}}on(ki),Gn(ki);var ja,kl=Object.freeze({__proto__:null,Alert:Dt,Button:Ur,Carousel:Mr,Collapse:gt,Dropdown:Fr,Modal:Ps,Offcanvas:Ei,Popover:no,ScrollSpy:Yi,Tab:so,Toast:ki,Tooltip:yi});[].slice.call(document.querySelectorAll('[data-bs-toggle="dropdown"]')).map(function(w){return new Fr(w)}),[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map(function(w){var l,h,v={delay:{show:50,hide:50},html:null!==(l="true"===w.getAttribute("data-bs-html"))&&void 0!==l&&l,placement:null!==(h=w.getAttribute("data-bs-placement"))&&void 0!==h?h:"auto"};return new yi(w,v)}),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(w){var l,h,v={delay:{show:50,hide:50},html:null!==(l="true"===w.getAttribute("data-bs-html"))&&void 0!==l&&l,placement:null!==(h=w.getAttribute("data-bs-placement"))&&void 0!==h?h:"auto"};return new no(w,v)}),[].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]')).map(function(w){w.addEventListener("click",function(l){l.stopPropagation(),w.classList.toggle("active")})}),[].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]')).map(function(w){return new ki(w)}),window.bootstrap=kl,(ja=window.location.hash)&&[].slice.call(document.querySelectorAll('[data-bs-toggle="tab"]')).filter(function(w){return w.hash===ja}).map(function(w){new so(w).show()})}),function(){function _(o){this.mode=ye.MODE_8BIT_BYTE,this.data=o,this.parsedData=[];for(var c=[],s=0,g=this.data.length;g>s;s++){var m=this.data.charCodeAt(s);m>65536?(c[0]=240|(1835008&m)>>>18,c[1]=128|(258048&m)>>>12,c[2]=128|(4032&m)>>>6,c[3]=128|63&m):m>2048?(c[0]=224|(61440&m)>>>12,c[1]=128|(4032&m)>>>6,c[2]=128|63&m):m>128?(c[0]=192|(1984&m)>>>6,c[1]=128|63&m):c[0]=m,this.parsedData=this.parsedData.concat(c)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function ue(o,c){this.typeNumber=o,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function De(o,c){if(null==o.length)throw new Error(o.length+"/"+c);for(var s=0;s<o.length&&0==o[s];)s++;this.num=new Array(o.length-s+c);for(var g=0;g<o.length-s;g++)this.num[g]=o[g+s]}function Be(o,c){this.totalCount=o,this.dataCount=c}function Qe(){this.buffer=[],this.length=0}function pe(){var o=!1,c=navigator.userAgent;return/android/i.test(c)&&(o=!0,aMat=c.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(o=parseFloat(aMat[1]))),o}_.prototype={getLength:function(){return this.parsedData.length},write:function(o){for(var c=0,s=this.parsedData.length;s>c;c++)o.put(this.parsedData[c],8)}},ue.prototype={addData:function(o){var c=new _(o);this.dataList.push(c),this.dataCache=null},isDark:function(o,c){if(0>o||this.moduleCount<=o||0>c||this.moduleCount<=c)throw new Error(o+","+c);return this.modules[o][c]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(o,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var s=0;s<this.moduleCount;s++){this.modules[s]=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++)this.modules[s][g]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,c),this.typeNumber>=7&&this.setupTypeNumber(o),null==this.dataCache&&(this.dataCache=ue.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(o,c){for(var s=-1;7>=s;s++)if(!(-1>=o+s||this.moduleCount<=o+s))for(var g=-1;7>=g;g++)-1>=c+g||this.moduleCount<=c+g||(this.modules[o+s][c+g]=s>=0&&6>=s&&(0==g||6==g)||g>=0&&6>=g&&(0==s||6==s)||s>=2&&4>=s&&g>=2&&4>=g)},getBestMaskPattern:function(){for(var o=0,c=0,s=0;8>s;s++){this.makeImpl(!0,s);var g=fe.getLostPoint(this);(0==s||o>g)&&(o=g,c=s)}return c},createMovieClip:function(o,c,s){var g=o.createEmptyMovieClip(c,s);this.make();for(var A=0;A<this.modules.length;A++)for(var E=1*A,T=0;T<this.modules[A].length;T++){var j=1*T;this.modules[A][T]&&(g.beginFill(0,100),g.moveTo(j,E),g.lineTo(j+1,E),g.lineTo(j+1,E+1),g.lineTo(j,E+1),g.endFill())}return g},setupTimingPattern:function(){for(var o=8;o<this.moduleCount-8;o++)null==this.modules[o][6]&&(this.modules[o][6]=o%2==0);for(var c=8;c<this.moduleCount-8;c++)null==this.modules[6][c]&&(this.modules[6][c]=c%2==0)},setupPositionAdjustPattern:function(){for(var o=fe.getPatternPosition(this.typeNumber),c=0;c<o.length;c++)for(var s=0;s<o.length;s++){var g=o[c],m=o[s];if(null==this.modules[g][m])for(var A=-2;2>=A;A++)for(var E=-2;2>=E;E++)this.modules[g+A][m+E]=-2==A||2==A||-2==E||2==E||0==A&&0==E}},setupTypeNumber:function(o){for(var c=fe.getBCHTypeNumber(this.typeNumber),s=0;18>s;s++){var g=!o&&1==(1&c>>s);this.modules[Math.floor(s/3)][s%3+this.moduleCount-8-3]=g}for(s=0;18>s;s++)g=!o&&1==(1&c>>s),this.modules[s%3+this.moduleCount-8-3][Math.floor(s/3)]=g},setupTypeInfo:function(o,c){for(var g=fe.getBCHTypeInfo(this.errorCorrectLevel<<3|c),m=0;15>m;m++){var A=!o&&1==(1&g>>m);6>m?this.modules[m][8]=A:8>m?this.modules[m+1][8]=A:this.modules[this.moduleCount-15+m][8]=A}for(m=0;15>m;m++)A=!o&&1==(1&g>>m),8>m?this.modules[8][this.moduleCount-m-1]=A:9>m?this.modules[8][15-m-1+1]=A:this.modules[8][15-m-1]=A;this.modules[this.moduleCount-8][8]=!o},mapData:function(o,c){for(var s=-1,g=this.moduleCount-1,m=7,A=0,E=this.moduleCount-1;E>0;E-=2)for(6==E&&E--;;){for(var T=0;2>T;T++)if(null==this.modules[g][E-T]){var j=!1;A<o.length&&(j=1==(1&o[A]>>>m)),fe.getMask(c,g,E-T)&&(j=!j),this.modules[g][E-T]=j,-1==--m&&(A++,m=7)}if(0>(g+=s)||this.moduleCount<=g){g-=s,s=-s;break}}}},ue.PAD0=236,ue.PAD1=17,ue.createData=function(o,c,s){for(var g=Be.getRSBlocks(o,c),m=new Qe,A=0;A<s.length;A++){var E=s[A];m.put(E.mode,4),m.put(E.getLength(),fe.getLengthInBits(E.mode,o)),E.write(m)}var T=0;for(A=0;A<g.length;A++)T+=g[A].dataCount;if(m.getLengthInBits()>8*T)throw new Error("code length overflow. ("+m.getLengthInBits()+">"+8*T+")");for(m.getLengthInBits()+4<=8*T&&m.put(0,4);m.getLengthInBits()%8!=0;)m.putBit(!1);for(;!(m.getLengthInBits()>=8*T||(m.put(ue.PAD0,8),m.getLengthInBits()>=8*T));)m.put(ue.PAD1,8);return ue.createBytes(m,g)},ue.createBytes=function(o,c){for(var s=0,g=0,m=0,A=new Array(c.length),E=new Array(c.length),T=0;T<c.length;T++){var j=c[T].dataCount,M=c[T].totalCount-j;g=Math.max(g,j),m=Math.max(m,M),A[T]=new Array(j);for(var N=0;N<A[T].length;N++)A[T][N]=255&o.buffer[N+s];s+=j;var te=fe.getErrorCorrectPolynomial(M),ae=new De(A[T],te.getLength()-1).mod(te);for(E[T]=new Array(te.getLength()-1),N=0;N<E[T].length;N++){var le=N+ae.getLength()-E[T].length;E[T][N]=le>=0?ae.get(le):0}}var Re=0;for(N=0;N<c.length;N++)Re+=c[N].totalCount;var et=new Array(Re),Ve=0;for(N=0;g>N;N++)for(T=0;T<c.length;T++)N<A[T].length&&(et[Ve++]=A[T][N]);for(N=0;m>N;N++)for(T=0;T<c.length;T++)N<E[T].length&&(et[Ve++]=E[T][N]);return et};for(var ye={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Z={L:1,M:0,Q:3,H:2},oe={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},fe={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(o){for(var c=o<<10;fe.getBCHDigit(c)-fe.getBCHDigit(fe.G15)>=0;)c^=fe.G15<<fe.getBCHDigit(c)-fe.getBCHDigit(fe.G15);return(o<<10|c)^fe.G15_MASK},getBCHTypeNumber:function(o){for(var c=o<<12;fe.getBCHDigit(c)-fe.getBCHDigit(fe.G18)>=0;)c^=fe.G18<<fe.getBCHDigit(c)-fe.getBCHDigit(fe.G18);return o<<12|c},getBCHDigit:function(o){for(var c=0;0!=o;)c++,o>>>=1;return c},getPatternPosition:function(o){return fe.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,c,s){switch(o){case oe.PATTERN000:return(c+s)%2==0;case oe.PATTERN001:return c%2==0;case oe.PATTERN010:return s%3==0;case oe.PATTERN011:return(c+s)%3==0;case oe.PATTERN100:return(Math.floor(c/2)+Math.floor(s/3))%2==0;case oe.PATTERN101:return c*s%2+c*s%3==0;case oe.PATTERN110:return(c*s%2+c*s%3)%2==0;case oe.PATTERN111:return(c*s%3+(c+s)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var c=new De([1],0),s=0;o>s;s++)c=c.multiply(new De([1,V.gexp(s)],0));return c},getLengthInBits:function(o,c){if(c>=1&&10>c)switch(o){case ye.MODE_NUMBER:return 10;case ye.MODE_ALPHA_NUM:return 9;case ye.MODE_8BIT_BYTE:case ye.MODE_KANJI:return 8;default:throw new Error("mode:"+o)}else if(27>c)switch(o){case ye.MODE_NUMBER:return 12;case ye.MODE_ALPHA_NUM:return 11;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 10;default:throw new Error("mode:"+o)}else{if(!(41>c))throw new Error("type:"+c);switch(o){case ye.MODE_NUMBER:return 14;case ye.MODE_ALPHA_NUM:return 13;case ye.MODE_8BIT_BYTE:return 16;case ye.MODE_KANJI:return 12;default:throw new Error("mode:"+o)}}},getLostPoint:function(o){for(var c=o.getModuleCount(),s=0,g=0;c>g;g++)for(var m=0;c>m;m++){for(var A=0,E=o.isDark(g,m),T=-1;1>=T;T++)if(!(0>g+T||g+T>=c))for(var j=-1;1>=j;j++)0>m+j||m+j>=c||(0!=T||0!=j)&&E==o.isDark(g+T,m+j)&&A++;A>5&&(s+=3+A-5)}for(g=0;c-1>g;g++)for(m=0;c-1>m;m++){var M=0;o.isDark(g,m)&&M++,o.isDark(g+1,m)&&M++,o.isDark(g,m+1)&&M++,o.isDark(g+1,m+1)&&M++,(0==M||4==M)&&(s+=3)}for(g=0;c>g;g++)for(m=0;c-6>m;m++)o.isDark(g,m)&&!o.isDark(g,m+1)&&o.isDark(g,m+2)&&o.isDark(g,m+3)&&o.isDark(g,m+4)&&!o.isDark(g,m+5)&&o.isDark(g,m+6)&&(s+=40);for(m=0;c>m;m++)for(g=0;c-6>g;g++)o.isDark(g,m)&&!o.isDark(g+1,m)&&o.isDark(g+2,m)&&o.isDark(g+3,m)&&o.isDark(g+4,m)&&!o.isDark(g+5,m)&&o.isDark(g+6,m)&&(s+=40);var N=0;for(m=0;c>m;m++)for(g=0;c>g;g++)o.isDark(g,m)&&N++;return s+Math.abs(100*N/c/c-50)/5*10}},V={glog:function(o){if(1>o)throw new Error("glog("+o+")");return V.LOG_TABLE[o]},gexp:function(o){for(;0>o;)o+=255;for(;o>=256;)o-=255;return V.EXP_TABLE[o]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},z=0;8>z;z++)V.EXP_TABLE[z]=1<<z;for(z=8;256>z;z++)V.EXP_TABLE[z]=V.EXP_TABLE[z-4]^V.EXP_TABLE[z-5]^V.EXP_TABLE[z-6]^V.EXP_TABLE[z-8];for(z=0;255>z;z++)V.LOG_TABLE[V.EXP_TABLE[z]]=z;De.prototype={get:function(o){return this.num[o]},getLength:function(){return this.num.length},multiply:function(o){for(var c=new Array(this.getLength()+o.getLength()-1),s=0;s<this.getLength();s++)for(var g=0;g<o.getLength();g++)c[s+g]^=V.gexp(V.glog(this.get(s))+V.glog(o.get(g)));return new De(c,0)},mod:function(o){if(this.getLength()-o.getLength()<0)return this;for(var c=V.glog(this.get(0))-V.glog(o.get(0)),s=new Array(this.getLength()),g=0;g<this.getLength();g++)s[g]=this.get(g);for(g=0;g<o.getLength();g++)s[g]^=V.gexp(V.glog(o.get(g))+c);return new De(s,0).mod(o)}},Be.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],Be.getRSBlocks=function(o,c){var s=Be.getRsBlockTable(o,c);if(null==s)throw new Error("bad rs block @ typeNumber:"+o+"/errorCorrectLevel:"+c);for(var g=s.length/3,m=[],A=0;g>A;A++)for(var E=s[3*A+0],T=s[3*A+1],j=s[3*A+2],M=0;E>M;M++)m.push(new Be(T,j));return m},Be.getRsBlockTable=function(o,c){switch(c){case Z.L:return Be.RS_BLOCK_TABLE[4*(o-1)+0];case Z.M:return Be.RS_BLOCK_TABLE[4*(o-1)+1];case Z.Q:return Be.RS_BLOCK_TABLE[4*(o-1)+2];case Z.H:return Be.RS_BLOCK_TABLE[4*(o-1)+3];default:return}},Qe.prototype={get:function(o){var c=Math.floor(o/8);return 1==(1&this.buffer[c]>>>7-o%8)},put:function(o,c){for(var s=0;c>s;s++)this.putBit(1==(1&o>>>c-s-1))},getLengthInBits:function(){return this.length},putBit:function(o){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0),o&&(this.buffer[c]|=128>>>this.length%8),this.length++}};var o,ke=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],G=((o=function(c,s){this._el=c,this._htOption=s}).prototype.draw=function(c){function s(N,te){var Q=document.createElementNS("http://www.w3.org/2000/svg",N);for(var ae in te)te.hasOwnProperty(ae)&&Q.setAttribute(ae,te[ae]);return Q}var g=this._htOption,m=this._el,A=c.getModuleCount();Math.floor(g.width/A),Math.floor(g.height/A),this.clear();var E=s("svg",{viewBox:"0 0 "+String(A)+" "+String(A),width:"100%",height:"100%",fill:g.colorLight});E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),m.appendChild(E),E.appendChild(s("rect",{fill:g.colorDark,width:"1",height:"1",id:"template"}));for(var T=0;A>T;T++)for(var j=0;A>j;j++)if(c.isDark(T,j)){var M=s("use",{x:String(T),y:String(j)});M.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),E.appendChild(M)}},o.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},o),f="svg"===document.documentElement.tagName.toLowerCase()?G:"undefined"!=typeof CanvasRenderingContext2D?function(){function o(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function c(A,E){var T=this;if(T._fFail=E,T._fSuccess=A,null===T._bSupportDataURI){var j=document.createElement("img"),M=function(){T._bSupportDataURI=!1,T._fFail&&_fFail.call(T)};return j.onabort=M,j.onerror=M,j.onload=function(){T._bSupportDataURI=!0,T._fSuccess&&T._fSuccess.call(T)},void(j.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===T._bSupportDataURI&&T._fSuccess?T._fSuccess.call(T):!1===T._bSupportDataURI&&T._fFail&&T._fFail.call(T)}if(this._android&&this._android<=2.1){var s=1/window.devicePixelRatio,g=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(A,E,T,j,M,N,te,Q){if("nodeName"in A&&/img/i.test(A.nodeName))for(var ae=arguments.length-1;ae>=1;ae--)arguments[ae]=arguments[ae]*s;else void 0===Q&&(arguments[1]*=s,arguments[2]*=s,arguments[3]*=s,arguments[4]*=s);g.apply(this,arguments)}}var m=function(A,E){this._bIsPainted=!1,this._android=pe(),this._htOption=E,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=E.width,this._elCanvas.height=E.height,A.appendChild(this._elCanvas),this._el=A,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return m.prototype.draw=function(A){var E=this._elImage,T=this._oContext,j=this._htOption,M=A.getModuleCount(),N=j.width/M,te=j.height/M,Q=Math.round(N),ae=Math.round(te);E.style.display="none",this.clear();for(var le=0;M>le;le++)for(var Re=0;M>Re;Re++){var et=A.isDark(le,Re),Ve=Re*N,Ge=le*te;T.strokeStyle=et?j.colorDark:j.colorLight,T.lineWidth=1,T.fillStyle=et?j.colorDark:j.colorLight,T.fillRect(Ve,Ge,N,te),T.strokeRect(Math.floor(Ve)+.5,Math.floor(Ge)+.5,Q,ae),T.strokeRect(Math.ceil(Ve)-.5,Math.ceil(Ge)-.5,Q,ae)}this._bIsPainted=!0},m.prototype.makeImage=function(){this._bIsPainted&&c.call(this,o)},m.prototype.isPainted=function(){return this._bIsPainted},m.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},m.prototype.round=function(A){return A&&Math.floor(1e3*A)/1e3},m}():function(){var o=function(c,s){this._el=c,this._htOption=s};return o.prototype.draw=function(c){for(var s=this._htOption,g=this._el,m=c.getModuleCount(),A=Math.floor(s.width/m),E=Math.floor(s.height/m),T=['<table style="border:0;border-collapse:collapse;">'],j=0;m>j;j++){T.push("<tr>");for(var M=0;m>M;M++)T.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+A+"px;height:"+E+"px;background-color:"+(c.isDark(j,M)?s.colorDark:s.colorLight)+';"></td>');T.push("</tr>")}T.push("</table>"),g.innerHTML=T.join("");var N=g.childNodes[0],te=(s.width-N.offsetWidth)/2,Q=(s.height-N.offsetHeight)/2;te>0&&Q>0&&(N.style.margin=Q+"px "+te+"px")},o.prototype.clear=function(){this._el.innerHTML=""},o}();QRCode=function(o,c){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:Z.H},"string"==typeof c&&(c={text:c}),c)for(var s in c)this._htOption[s]=c[s];"string"==typeof o&&(o=document.getElementById(o)),this._android=pe(),this._el=o,this._oQRCode=null,this._oDrawing=new f(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(o){this._oQRCode=new ue(function(o,c){for(var s=1,g=function(o){var c=encodeURI(o).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return c.length+(c.length!=o?3:0)}(o),m=0,A=ke.length;A>=m;m++){var E=0;switch(c){case Z.L:E=ke[m][0];break;case Z.M:E=ke[m][1];break;case Z.Q:E=ke[m][2];break;case Z.H:E=ke[m][3]}if(E>=g)break;s++}if(s>ke.length)throw new Error("Too long data");return s}(o,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(o),this._oQRCode.make(),this._el.title=o,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=Z}(),function(_,ue){"object"==typeof exports&&"undefined"!=typeof module?module.exports=ue():"function"==typeof define&&define.amd?define(ue):(_=_||self).CodeMirror=ue()}(this,function(){"use strict";var _=navigator.userAgent,ue=navigator.platform,De=/gecko\/\d/i.test(_),Be=/MSIE \d/.test(_),Qe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_),je=/Edge\/(\d+)/.exec(_),pe=Be||Qe||je,xe=pe&&(Be?document.documentMode||6:+(je||Qe)[1]),$=!je&&/WebKit\//.test(_),ye=$&&/Qt\/\d+\.\d+/.test(_),Z=!je&&/Chrome\//.test(_),oe=/Opera\//.test(_),fe=/Apple Computer/.test(navigator.vendor),V=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(_),z=/PhantomJS/.test(_),ke=fe&&(/Mobile\/\w+/.test(_)||navigator.maxTouchPoints>2),G=/Android/.test(_),i=ke||G||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(_),f=ke||/Mac/.test(ue),o=/\bCrOS\b/.test(_),c=/win/i.test(ue),s=oe&&_.match(/Version\/(\d*\.\d*)/);s&&(s=Number(s[1])),s&&s>=15&&(oe=!1,$=!0);var g=f&&(ye||oe&&(null==s||s<12.11)),m=De||pe&&xe>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var te,E=function(e,t){var r=e.className,n=A(t).exec(r);if(n){var a=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(a?n[1]+a:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return T(e).appendChild(t)}function M(e,t,r,n){var a=document.createElement(e);if(r&&(a.className=r),n&&(a.style.cssText=n),"string"==typeof t)a.appendChild(document.createTextNode(t));else if(t)for(var d=0;d<t.length;++d)a.appendChild(t[d]);return a}function N(e,t,r,n){var a=M(e,t,r,n);return a.setAttribute("role","presentation"),a}function Q(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 ae(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function le(e,t){var r=e.className;A(t).test(r)||(e.className+=(r?" ":"")+t)}function Re(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!A(r[n]).test(t)&&(t+=" "+r[n]);return t}te=document.createRange?function(e,t,r,n){var a=document.createRange();return a.setEnd(n||e,r),a.setStart(e,t),a}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(a){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var et=function(e){e.select()};function Ve(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ge(e,t,r){for(var n in t||(t={}),e)e.hasOwnProperty(n)&&(!1!==r||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function jt(e,t,r,n,a){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var d=n||0,y=a||0;;){var b=e.indexOf("\t",d);if(b<0||b>=t)return y+(t-d);y+=b-d,y+=r-y%r,d=b+1}}ke?et=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:pe&&(et=function(e){try{e.select()}catch(t){}});var Tt=function(){this.id=null,this.f=null,this.time=0,this.handler=Ve(this.onTimeout,this)};function Le(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}Tt.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Tt.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var ot={toString:function(){return"CodeMirror.Pass"}},ft={scroll:!1},_t={origin:"*mouse"},_e={origin:"+move"};function Et(e,t,r){for(var n=0,a=0;;){var d=e.indexOf("\t",n);-1==d&&(d=e.length);var y=d-n;if(d==e.length||a+y>=t)return n+Math.min(y,t-a);if(a+=d-n,n=d+1,(a+=r-a%r)>=t)return n}}var zt=[""];function un(e){for(;zt.length<=e;)zt.push(we(zt)+" ");return zt[e]}function we(e){return e[e.length-1]}function yt(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Cn(){}function ze(e,t){var r;return Object.create?r=Object.create(e):(Cn.prototype=e,r=new Cn),t&&Ge(t,r),r}var Ci=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function qt(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ci.test(e))}function de(e,t){return t?!!(t.source.indexOf("\\w")>-1&&qt(e))||t.test(e):qt(e)}function Pe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ge=/[\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 bt(e){return e.charCodeAt(0)>=768&&ge.test(e)}function Xt(e,t,r){for(;(r<0?t>0:t<e.length)&&bt(e.charAt(t));)t+=r;return t}function gn(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var a=(t+r)/2,d=n<0?Math.ceil(a):Math.floor(a);if(d==t)return e(d)?t:r;e(d)?r=d:t=d+n}}var kn=null;function Rt(e,t,r){var n;kn=null;for(var a=0;a<e.length;++a){var d=e[a];if(d.from<t&&d.to>t)return a;d.to==t&&(d.from!=d.to&&"before"==r?n=a:kn=a),d.from==t&&(d.from!=d.to&&"before"!=r?n=a:kn=a)}return null!=n?n:kn}var rr=function(){function r(L){return L<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(L):1424<=L&&L<=1524?"R":1536<=L&&L<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(L-1536):1774<=L&&L<=2220?"r":8192<=L&&L<=8203?"w":8204==L?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,d=/[LRr]/,y=/[Lb1n]/,b=/[1n]/;function S(L,R,K){this.level=L,this.from=R,this.to=K}return function(L,R){var K="ltr"==R?"L":"R";if(0==L.length||"ltr"==R&&!n.test(L))return!1;for(var se=L.length,ee=[],be=0;be<se;++be)ee.push(r(L.charCodeAt(be)));for(var Ae=0,He=K;Ae<se;++Ae){var qe=ee[Ae];"m"==qe?ee[Ae]=He:He=qe}for(var Je=0,Ue=K;Je<se;++Je){var it=ee[Je];"1"==it&&"r"==Ue?ee[Je]="n":d.test(it)&&(Ue=it,"r"==it&&(ee[Je]="R"))}for(var kt=1,pt=ee[0];kt<se-1;++kt){var Ft=ee[kt];"+"==Ft&&"1"==pt&&"1"==ee[kt+1]?ee[kt]="1":","==Ft&&pt==ee[kt+1]&&("1"==pt||"n"==pt)&&(ee[kt]=pt),pt=Ft}for(var yn=0;yn<se;++yn){var pr=ee[yn];if(","==pr)ee[yn]="N";else if("%"==pr){var Dn=void 0;for(Dn=yn+1;Dn<se&&"%"==ee[Dn];++Dn);for(var oi=yn&&"!"==ee[yn-1]||Dn<se&&"1"==ee[Dn]?"1":"N",$r=yn;$r<Dn;++$r)ee[$r]=oi;yn=Dn-1}}for(var $n=0,Qr=K;$n<se;++$n){var xr=ee[$n];"L"==Qr&&"1"==xr?ee[$n]="L":d.test(xr)&&(Qr=xr)}for(var nr=0;nr<se;++nr)if(a.test(ee[nr])){var Qn=void 0;for(Qn=nr+1;Qn<se&&a.test(ee[Qn]);++Qn);for(var In="L"==(nr?ee[nr-1]:K),aa=In==("L"==(Qn<se?ee[Qn]:K))?In?"L":"R":K,lo=nr;lo<Qn;++lo)ee[lo]=aa;nr=Qn-1}for(var ms,Or=[],gr=0;gr<se;)if(y.test(ee[gr])){var Kl=gr;for(++gr;gr<se&&y.test(ee[gr]);++gr);Or.push(new S(0,Kl,gr))}else{var qs=gr,Io=Or.length,Bo="rtl"==R?1:0;for(++gr;gr<se&&"L"!=ee[gr];++gr);for(var Br=qs;Br<gr;)if(b.test(ee[Br])){qs<Br&&(Or.splice(Io,0,new S(1,qs,Br)),Io+=Bo);var la=Br;for(++Br;Br<gr&&b.test(ee[Br]);++Br);Or.splice(Io,0,new S(2,la,Br)),Io+=Bo,qs=Br}else++Br;qs<gr&&Or.splice(Io,0,new S(1,qs,gr))}return"ltr"==R&&(1==Or[0].level&&(ms=L.match(/^\s+/))&&(Or[0].from=ms[0].length,Or.unshift(new S(0,0,ms[0].length))),1==we(Or).level&&(ms=L.match(/\s+$/))&&(we(Or).to-=ms[0].length,Or.push(new S(0,se-ms[0].length,se)))),"rtl"==R?Or.reverse():Or}}();function Nn(e,t){var r=e.order;return null==r&&(r=e.order=rr(e.text,t)),r}var Dr=[],ut=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Dr).concat(r)}};function Bn(e,t){return e._handlers&&e._handlers[t]||Dr}function $t(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,a=n&&n[t];if(a){var d=Le(a,r);d>-1&&(n[t]=a.slice(0,d).concat(a.slice(d+1)))}}}function vt(e,t){var r=Bn(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),a=0;a<r.length;++a)r[a].apply(null,n)}function Tn(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),vt(e,r||t.type,e,t),Un(t)||t.codemirrorIgnore}function Jn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==Le(r,t[n])&&r.push(t[n])}function tn(e,t){return Bn(e,t).length>0}function Mn(e){e.prototype.on=function(t,r){ut(this,t,r)},e.prototype.off=function(t,r){$t(this,t,r)}}function Ut(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pi(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Un(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Pn(e){Ut(e),Pi(e)}function Cr(e){return e.target||e.srcElement}function Ji(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),f&&e.ctrlKey&&1==t&&(t=3),t}var vn,Nr,Zi=function(){if(pe&&xe<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}();function Us(e){if(null==vn){var t=M("span","\u200b");j(e,M("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(vn=t.offsetWidth<=1&&t.offsetHeight>2&&!(pe&&xe<8))}var r=vn?M("span","\u200b"):M("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function vr(e){if(null!=Nr)return Nr;var t=j(e,document.createTextNode("A\u062eA")),r=te(t,0,1).getBoundingClientRect(),n=te(t,1,2).getBoundingClientRect();return T(e),!(!r||r.left==r.right)&&(Nr=n.right-r.right<3)}var e,Hr=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var a=e.indexOf("\n",t);-1==a&&(a=e.length);var d=e.slice(t,"\r"==e.charAt(a-1)?a-1:a),y=d.indexOf("\r");-1!=y?(r.push(d.slice(0,y)),t+=y+1):(r.push(d),t=a+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ai=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ti="oncopy"in(e=M("div"))||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy),ir=null,sr={},En={};function es(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),sr[e]=t}function Fi(e){if("string"==typeof e&&En.hasOwnProperty(e))e=En[e];else if(e&&"string"==typeof e.name&&En.hasOwnProperty(e.name)){var t=En[e.name];"string"==typeof t&&(t={name:t}),(e=ze(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fi("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fi("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Si(e,t){t=Fi(t);var r=sr[t.name];if(!r)return Si(e,"text/plain");var n=r(e,t);if(Hn.hasOwnProperty(t.name)){var a=Hn[t.name];for(var d in a)!a.hasOwnProperty(d)||(n.hasOwnProperty(d)&&(n["_"+d]=n[d]),n[d]=a[d])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var y in t.modeProps)n[y]=t.modeProps[y];return n}var Hn={};function Wr(e,t){Ge(t,Hn.hasOwnProperty(e)?Hn[e]:Hn[e]={})}function or(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var a=t[n];a instanceof Array&&(a=a.concat([])),r[n]=a}return r}function Ii(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function li(e,t,r){return!e.startState||e.startState(t,r)}var cn=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function st(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 r=e;!r.lines;)for(var n=0;;++n){var a=r.children[n],d=a.chunkSize();if(t<d){r=a;break}t-=d}return r.lines[t]}function mr(e,t,r){var n=[],a=t.line;return e.iter(t.line,r.line+1,function(d){var y=d.text;a==r.line&&(y=y.slice(0,r.ch)),a==t.line&&(y=y.slice(t.ch)),n.push(y),++a}),n}function ar(e,t,r){var n=[];return e.iter(t,r,function(a){n.push(a.text)}),n}function jn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function It(e){if(null==e.parent)return null;for(var t=e.parent,r=Le(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var a=0;n.children[a]!=t;++a)r+=n.children[a].chunkSize();return r+t.first}function Kn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var a=e.children[n],d=a.height;if(t<d){e=a;continue e}t-=d,r+=a.chunkSize()}return r}while(!e.lines);for(var y=0;y<e.lines.length;++y){var S=e.lines[y].height;if(t<S)break;t-=S}return r+y}function Zr(e,t){return t>=e.first&&t<e.first+e.size}function ui(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ne(e,t,r){if(void 0===r&&(r=null),!(this instanceof Ne))return new Ne(e,t,r);this.line=e,this.ch=t,this.sticky=r}function D(e,t){return e.line-t.line||e.ch-t.ch}function q(e,t){return e.sticky==t.sticky&&0==D(e,t)}function Ce(e){return Ne(e.line,e.ch)}function Me(e,t){return D(e,t)<0?t:e}function ct(e,t){return D(e,t)<0?e:t}function Ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ke(e,t){if(t.line<e.first)return Ne(e.first,0);var r=e.first+e.size-1;return t.line>r?Ne(r,st(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?Ne(e.line,t):r<0?Ne(e.line,0):e}(t,st(e,t.line).text.length)}function _r(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ke(e,t[n]);return r}cn.prototype.eol=function(){return this.pos>=this.string.length},cn.prototype.sol=function(){return this.pos==this.lineStart},cn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},cn.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},cn.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},cn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},cn.prototype.skipToEnd=function(){this.pos=this.string.length},cn.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cn.prototype.backUp=function(e){this.pos-=e},cn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=jt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?jt(this.string,this.lineStart,this.tabSize):0)},cn.prototype.indentation=function(){return jt(this.string,null,this.tabSize)-(this.lineStart?jt(this.string,this.lineStart,this.tabSize):0)},cn.prototype.match=function(e,t,r){if("string"!=typeof e){var d=this.string.slice(this.pos).match(e);return d&&d.index>0?null:(d&&!1!==t&&(this.pos+=d[0].length),d)}var n=function(y){return r?y.toLowerCase():y};if(n(this.string.substr(this.pos,e.length))==n(e))return!1!==t&&(this.pos+=e.length),!0},cn.prototype.current=function(){return this.string.slice(this.start,this.pos)},cn.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cn.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Sr=function(e,t){this.state=e,this.lookAhead=t},Wn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function _s(e,t,r,n){var a=[e.state.modeGen],d={};uo(e,t.text,e.doc.mode,r,function(L,R){return a.push(L,R)},d,n);for(var y=r.state,b=function(L){r.baseTokens=a;var R=e.state.overlays[L],K=1,se=0;r.state=!0,uo(e,t.text,R.mode,r,function(ee,be){for(var Ae=K;se<ee;){var He=a[K];He>ee&&a.splice(K,1,ee,a[K+1],He),K+=2,se=Math.min(ee,He)}if(be)if(R.opaque)a.splice(Ae,K-Ae,ee,"overlay "+be),K=Ae+2;else for(;Ae<K;Ae+=2){var qe=a[Ae+1];a[Ae+1]=(qe?qe+" ":"")+"overlay "+be}},d),r.state=y,r.baseTokens=null,r.baseTokenPos=1},S=0;S<e.state.overlays.length;++S)b(S);return{styles:a,classes:d.bgClass||d.textClass?d:null}}function Ho(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ts(e,It(t)),a=t.text.length>e.options.maxHighlightLength&&or(e.doc.mode,n.state),d=_s(e,t,n);a&&(n.state=a),t.stateAfter=n.save(!a),t.styles=d.styles,d.classes?t.styleClasses=d.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ts(e,t,r){var n=e.doc,a=e.display;if(!n.mode.startState)return new Wn(n,!0,t);var d=function(e,t,r){for(var n,a,d=e.doc,y=r?-1:t-(e.doc.mode.innerMode?1e3:100),b=t;b>y;--b){if(b<=d.first)return d.first;var S=st(d,b-1),L=S.stateAfter;if(L&&(!r||b+(L instanceof Sr?L.lookAhead:0)<=d.modeFrontier))return b;var R=jt(S.text,null,e.options.tabSize);(null==a||n>R)&&(a=b-1,n=R)}return a}(e,t,r),y=d>n.first&&st(n,d-1).stateAfter,b=y?Wn.fromSaved(n,y,d):new Wn(n,li(n.mode),d);return n.iter(d,t,function(S){ys(e,S.text,b);var L=b.line;S.stateAfter=L==t-1||L%5==0||L>=a.viewFrom&&L<a.viewTo?b.save():null,b.nextLine()}),r&&(n.modeFrontier=b.line),b}function ys(e,t,r,n){var a=e.doc.mode,d=new cn(t,e.options.tabSize,r);for(d.start=d.pos=n||0,""==t&&Bi(a,r.state);!d.eol();)Hi(a,d,r.state),d.start=d.pos}function Bi(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ii(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Hi(e,t,r,n){for(var a=0;a<10;a++){n&&(n[0]=Ii(e,r).mode);var d=e.token(t,r);if(t.pos>t.start)return d}throw new Error("Mode "+e.name+" failed to advance stream.")}Wn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Wn.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}},Wn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Wn.fromSaved=function(e,t,r){return t instanceof Sr?new Wn(e,or(e.mode,t.state),r,t.lookAhead):new Wn(e,or(e.mode,t),r)},Wn.prototype.save=function(e){var t=!1!==e?or(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Sr(t,this.maxLookAhead):t};var Ks=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ro(e,t,r,n){var y,R,a=e.doc,d=a.mode,b=st(a,(t=Ke(a,t)).line),S=ts(e,t.line,r),L=new cn(b.text,e.options.tabSize,S);for(n&&(R=[]);(n||L.pos<t.ch)&&!L.eol();)L.start=L.pos,y=Hi(d,L,S.state),n&&R.push(new Ks(L,y,or(a.mode,S.state)));return n?R:new Ks(L,y,S.state)}function ks(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function uo(e,t,r,n,a,d,y){var b=r.flattenSpans;null==b&&(b=e.options.flattenSpans);var K,S=0,L=null,R=new cn(t,e.options.tabSize,n),se=e.options.addModeClass&&[null];for(""==t&&ks(Bi(r,n.state),d);!R.eol();){if(R.pos>e.options.maxHighlightLength?(b=!1,y&&ys(e,t,n,R.pos),R.pos=t.length,K=null):K=ks(Hi(r,R,n.state,se),d),se){var ee=se[0].name;ee&&(K="m-"+(K?ee+" "+K:ee))}if(!b||L!=K){for(;S<R.start;)a(S=Math.min(R.start,S+5e3),L);L=K}R.start=R.pos}for(;S<R.pos;){var be=Math.min(R.pos,S+5e3);a(be,L),S=be}}var Xs=!1,Zn=!1;function zr(e,t,r){this.marker=e,this.from=t,this.to=r}function yr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function ns(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function di(e,t){if(t.full)return null;var r=Zr(e,t.from.line)&&st(e,t.from.line).markedSpans,n=Zr(e,t.to.line)&&st(e,t.to.line).markedSpans;if(!r&&!n)return null;var a=t.from.ch,d=t.to.ch,y=0==D(t.from,t.to),b=function(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var d=e[a],y=d.marker;null!=d.from&&!(y.inclusiveLeft?d.from<=t:d.from<t)&&(d.from!=t||"bookmark"!=y.type||r&&d.marker.insertLeft)||(n||(n=[])).push(new zr(y,d.from,null==d.to||(y.inclusiveRight?d.to>=t:d.to>t)?null:d.to))}return n}(r,a,y),S=function(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var d=e[a],y=d.marker;(null==d.to||(y.inclusiveRight?d.to>=t:d.to>t)||d.from==t&&"bookmark"==y.type&&(!r||d.marker.insertLeft))&&(n||(n=[])).push(new zr(y,null==d.from||(y.inclusiveLeft?d.from<=t:d.from<t)?null:d.from-t,null==d.to?null:d.to-t))}return n}(n,d,y),L=1==t.text.length,R=we(t.text).length+(L?a:0);if(b)for(var K=0;K<b.length;++K){var se=b[K];if(null==se.to){var ee=yr(S,se.marker);ee?L&&(se.to=null==ee.to?null:ee.to+R):se.to=a}}if(S)for(var be=0;be<S.length;++be){var Ae=S[be];null!=Ae.to&&(Ae.to+=R),null==Ae.from?yr(b,Ae.marker)||(Ae.from=R,L&&(b||(b=[])).push(Ae)):(Ae.from+=R,L&&(b||(b=[])).push(Ae))}b&&(b=Ys(b)),S&&S!=b&&(S=Ys(S));var qe=[b];if(!L){var Ue,Je=t.text.length-2;if(Je>0&&b)for(var it=0;it<b.length;++it)null==b[it].to&&(Ue||(Ue=[])).push(new zr(b[it].marker,null,null));for(var kt=0;kt<Je;++kt)qe.push(Ue);qe.push(S)}return qe}function Ys(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function lr(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Gn(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function qr(e){return e.inclusiveLeft?-1:0}function is(e){return e.inclusiveRight?1:0}function ss(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),a=t.find(),d=D(n.from,a.from)||qr(e)-qr(t);return d?-d:D(n.to,a.to)||is(e)-is(t)||t.id-e.id}function zo(e,t){var n,r=Zn&&e.markedSpans;if(r)for(var a=void 0,d=0;d<r.length;++d)(a=r[d]).marker.collapsed&&null==(t?a.from:a.to)&&(!n||ss(n,a.marker)<0)&&(n=a.marker);return n}function qo(e){return zo(e,!0)}function Vs(e){return zo(e,!1)}function u(e,t){var n,r=Zn&&e.markedSpans;if(r)for(var a=0;a<r.length;++a){var d=r[a];d.marker.collapsed&&(null==d.from||d.from<t)&&(null==d.to||d.to>t)&&(!n||ss(n,d.marker)<0)&&(n=d.marker)}return n}function p(e,t,r,n,a){var d=st(e,t),y=Zn&&d.markedSpans;if(y)for(var b=0;b<y.length;++b){var S=y[b];if(S.marker.collapsed){var L=S.marker.find(0),R=D(L.from,r)||qr(S.marker)-qr(a),K=D(L.to,n)||is(S.marker)-is(a);if(!(R>=0&&K<=0||R<=0&&K>=0)&&(R<=0&&(S.marker.inclusiveRight&&a.inclusiveLeft?D(L.to,r)>=0:D(L.to,r)>0)||R>=0&&(S.marker.inclusiveRight&&a.inclusiveLeft?D(L.from,n)<=0:D(L.from,n)<0)))return!0}}}function k(e){for(var t;t=qo(e);)e=t.find(-1,!0).line;return e}function F(e,t){var r=st(e,t),n=k(r);return r==n?t:It(n)}function I(e,t){if(t>e.lastLine())return t;var n,r=st(e,t);if(!X(e,r))return t;for(;n=Vs(r);)r=n.find(1,!0).line;return It(r)+1}function X(e,t){var r=Zn&&t.markedSpans;if(r)for(var n=void 0,a=0;a<r.length;++a)if((n=r[a]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&J(e,t,n))return!0}}function J(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return J(e,n.line,yr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var a=void 0,d=0;d<t.markedSpans.length;++d)if((a=t.markedSpans[d]).marker.collapsed&&!a.marker.widgetNode&&a.from==r.to&&(null==a.to||a.to!=r.from)&&(a.marker.inclusiveLeft||r.marker.inclusiveRight)&&J(e,t,a))return!0}function ie(e){for(var t=0,r=(e=k(e)).parent,n=0;n<r.lines.length;++n){var a=r.lines[n];if(a==e)break;t+=a.height}for(var d=r.parent;d;d=(r=d).parent)for(var y=0;y<d.children.length;++y){var b=d.children[y];if(b==r)break;t+=b.height}return t}function me(e){if(0==e.height)return 0;for(var r,t=e.text.length,n=e;r=qo(n);){var a=r.find(0,!0);n=a.from.line,t+=a.from.ch-a.to.ch}for(n=e;r=Vs(n);){var d=r.find(0,!0);t-=n.text.length-d.from.ch,t+=(n=d.to.line).text.length-d.to.ch}return t}function Oe(e){var t=e.display,r=e.doc;t.maxLine=st(r,r.first),t.maxLineLength=me(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var a=me(n);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=n)})}var U=function(e,t,r){this.text=e,Gn(this,t),this.height=r?r(this):1};function tt(e){e.parent=null,lr(e)}U.prototype.lineNo=function(){return It(this)},Mn(U);var ht={},Ze={};function on(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Ze:ht;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ln(e,t){var r=N("span",null,null,$?"padding-right: .1px":null),n={pre:N("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var d=a?t.rest[a-1]:t.line,y=void 0;n.pos=0,n.addToken=nn,vr(e.display.measure)&&(y=Nn(d,e.doc.direction))&&(n.addToken=kr(n.addToken,y)),n.map=[],wn(d,n,Ho(e,d,t!=e.display.externalMeasured&&It(d))),d.styleClasses&&(d.styleClasses.bgClass&&(n.bgClass=Re(d.styleClasses.bgClass,n.bgClass||"")),d.styleClasses.textClass&&(n.textClass=Re(d.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Us(e.display.measure))),0==a?(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($){var S=n.content.lastChild;(/\bcm-tab\b/.test(S.className)||S.querySelector&&S.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return vt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Re(n.pre.className,n.textClass||"")),n}function Ar(e){var t=M("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function nn(e,t,r,n,a,d,y){if(t){var R,b=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var r=t,n="",a=0;a<e.length;a++){var d=e.charAt(a);" "==d&&r&&(a==e.length-1||32==e.charCodeAt(a+1))&&(d="\xa0"),n+=d,r=" "==d}return n}(t,e.trailingSpace):t,S=e.cm.state.specialChars,L=!1;if(S.test(t)){R=document.createDocumentFragment();for(var K=0;;){S.lastIndex=K;var se=S.exec(t),ee=se?se.index-K:t.length-K;if(ee){var be=document.createTextNode(b.slice(K,K+ee));R.appendChild(pe&&xe<9?M("span",[be]):be),e.map.push(e.pos,e.pos+ee,be),e.col+=ee,e.pos+=ee}if(!se)break;K+=ee+1;var Ae=void 0;if("\t"==se[0]){var He=e.cm.options.tabSize,qe=He-e.col%He;(Ae=R.appendChild(M("span",un(qe),"cm-tab"))).setAttribute("role","presentation"),Ae.setAttribute("cm-text","\t"),e.col+=qe}else"\r"==se[0]||"\n"==se[0]?((Ae=R.appendChild(M("span","\r"==se[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",se[0]),e.col+=1):((Ae=e.cm.options.specialCharPlaceholder(se[0])).setAttribute("cm-text",se[0]),R.appendChild(pe&&xe<9?M("span",[Ae]):Ae),e.col+=1);e.map.push(e.pos,e.pos+1,Ae),e.pos++}}else e.col+=t.length,R=document.createTextNode(b),e.map.push(e.pos,e.pos+t.length,R),pe&&xe<9&&(L=!0),e.pos+=t.length;if(e.trailingSpace=32==b.charCodeAt(t.length-1),r||n||a||L||d||y){var Je=r||"";n&&(Je+=n),a&&(Je+=a);var Ue=M("span",[R],Je,d);if(y)for(var it in y)y.hasOwnProperty(it)&&"style"!=it&&"class"!=it&&Ue.setAttribute(it,y[it]);return e.content.appendChild(Ue)}e.content.appendChild(R)}}function kr(e,t){return function(r,n,a,d,y,b,S){a=a?a+" cm-force-border":"cm-force-border";for(var L=r.pos,R=L+n.length;;){for(var K=void 0,se=0;se<t.length&&!((K=t[se]).to>L&&K.from<=L);se++);if(K.to>=R)return e(r,n,a,d,y,b,S);e(r,n.slice(0,K.to-L),a,d,null,b,S),d=null,n=n.slice(K.to-L),L=K.to}}}function Dt(e,t,r,n){var a=!n&&r.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!n&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function wn(e,t,r){var n=e.markedSpans,a=e.text,d=0;if(n)for(var K,se,be,Ae,He,qe,Je,b=a.length,S=0,L=1,R="",ee=0;;){if(ee==S){be=Ae=He=se="",Je=null,qe=null,ee=1/0;for(var Ue=[],it=void 0,kt=0;kt<n.length;++kt){var pt=n[kt],Ft=pt.marker;if("bookmark"==Ft.type&&pt.from==S&&Ft.widgetNode)Ue.push(Ft);else if(pt.from<=S&&(null==pt.to||pt.to>S||Ft.collapsed&&pt.to==S&&pt.from==S)){if(null!=pt.to&&pt.to!=S&&ee>pt.to&&(ee=pt.to,Ae=""),Ft.className&&(be+=" "+Ft.className),Ft.css&&(se=(se?se+";":"")+Ft.css),Ft.startStyle&&pt.from==S&&(He+=" "+Ft.startStyle),Ft.endStyle&&pt.to==ee&&(it||(it=[])).push(Ft.endStyle,pt.to),Ft.title&&((Je||(Je={})).title=Ft.title),Ft.attributes)for(var yn in Ft.attributes)(Je||(Je={}))[yn]=Ft.attributes[yn];Ft.collapsed&&(!qe||ss(qe.marker,Ft)<0)&&(qe=pt)}else pt.from>S&&ee>pt.from&&(ee=pt.from)}if(it)for(var pr=0;pr<it.length;pr+=2)it[pr+1]==ee&&(Ae+=" "+it[pr]);if(!qe||qe.from==S)for(var Dn=0;Dn<Ue.length;++Dn)Dt(t,0,Ue[Dn]);if(qe&&(qe.from||0)==S){if(Dt(t,(null==qe.to?b+1:qe.to)-S,qe.marker,null==qe.from),null==qe.to)return;qe.to==S&&(qe=!1)}}if(S>=b)break;for(var oi=Math.min(b,ee);;){if(R){var $r=S+R.length;if(!qe){var $n=$r>oi?R.slice(0,oi-S):R;t.addToken(t,$n,K?K+be:be,He,S+$n.length==ee?Ae:"",se,Je)}if($r>=oi){R=R.slice(oi-S),S=oi;break}S=$r,He=""}R=a.slice(d,d=r[L++]),K=on(r[L++],t.cm.options)}}else for(var y=1;y<r.length;y+=2)t.addToken(t,a.slice(d,d=r[y]),on(r[y+1],t.cm.options))}function os(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Vs(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?It(we(this.rest))-r+1:1,this.node=this.text=null,this.hidden=X(e,t)}function Ur(e,t,r){for(var a,n=[],d=t;d<r;d=a){var y=new os(e.doc,st(e.doc,d),d);a=d+y.size,n.push(y)}return n}var Fn=null,Kr=null;function Qt(e,t){var r=Bn(e,t);if(r.length){var a,n=Array.prototype.slice.call(arguments,2);Fn?a=Fn.delayedCallbacks:Kr?a=Kr:(a=Kr=[],setTimeout(bn,0));for(var d=function(b){a.push(function(){return r[b].apply(null,n)})},y=0;y<r.length;++y)d(y)}}function bn(){var e=Kr;Kr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var a=0;a<t.changes.length;a++){var d=t.changes[a];"text"==d?Bt(e,t):"gutter"==d?wr(e,t,r,n):"class"==d?fn(e,t):"widget"==d&&On(e,t,n)}t.changes=null}function Xn(e){return e.node==e.text&&(e.node=M("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),pe&&xe<8&&(e.node.style.zIndex=2)),e.node}function wt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ln(e,t)}function Bt(e,t){var r=t.text.className,n=wt(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,fn(e,t)):r&&(t.text.className=r)}function fn(e,t){(function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Xn(t);t.background=n.insertBefore(M("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?Xn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=""),t.text.className=(t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass)||""}function wr(e,t,r,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 a=Xn(t);t.gutterBackground=M("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),a.insertBefore(t.gutterBackground,t.text)}var d=t.line.gutterMarkers;if(e.options.lineNumbers||d){var y=Xn(t),b=t.gutter=M("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(b.setAttribute("aria-hidden","true"),e.display.input.setUneditable(b),y.insertBefore(b,t.text),t.line.gutterClass&&(b.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!d||!d["CodeMirror-linenumbers"])&&(t.lineNumber=b.appendChild(M("div",ui(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),d)for(var S=0;S<e.display.gutterSpecs.length;++S){var L=e.display.gutterSpecs[S].className,R=d.hasOwnProperty(L)&&d[L];R&&b.appendChild(M("div",[R],"CodeMirror-gutter-elt","left: "+n.gutterLeft[L]+"px; width: "+n.gutterWidth[L]+"px"))}}}function On(e,t,r){t.alignable&&(t.alignable=null);for(var n=A("CodeMirror-linewidget"),a=t.node.firstChild,d=void 0;a;a=d)d=a.nextSibling,n.test(a.className)&&t.node.removeChild(a);Wi(e,t,r)}function br(e,t,r,n){var a=wt(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),fn(e,t),wr(e,t,r,n),Wi(e,t,n),t.node}function Wi(e,t,r){if(bs(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)bs(e,t.rest[n],t,r,!1)}function bs(e,t,r,n,a){if(t.widgets)for(var d=Xn(r),y=0,b=t.widgets;y<b.length;++y){var S=b[y],L=M("div",[S.node],"CodeMirror-linewidget"+(S.className?" "+S.className:""));S.handleMouseEvents||L.setAttribute("cm-ignore-events","true"),ca(S,L,r,n),e.display.input.setUneditable(L),a&&S.above?d.insertBefore(L,r.gutter||r.text):d.appendChild(L),Qt(S,"redraw")}}function ca(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var a=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(a-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function xs(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Q(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),j(t.display.measure,M("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function fi(e,t){for(var r=Cr(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function zi(e){return e.lineSpace.offsetTop}function ho(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Uo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,M("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function ei(e){return 50-e.display.nativeBarWidth}function Gr(e){return e.display.scroller.clientWidth-ei(e)-e.display.barWidth}function pi(e){return e.display.scroller.clientHeight-ei(e)-e.display.barHeight}function ti(e,t,r){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 a=0;a<e.rest.length;a++)if(It(e.rest[a])>r)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}}function po(e,t,r,n){return ni(e,qi(e,t),r,n)}function $s(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xt(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function qi(e,t){var r=It(t),n=$s(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,Ct(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=It(t=k(t)),n=e.display.externalMeasured=new os(e.doc,t,r);n.lineN=r;var a=n.built=Ln(e,n);return n.text=a.pre,j(e.display.lineMeasure,a.pre),n}(e,t));var a=ti(n,t,r);return{line:t,view:n,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function ni(e,t,r,n,a){t.before&&(r=-1);var y,d=r+(n||"");return t.cache.hasOwnProperty(d)?y=t.cache[d]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,r){var n=e.options.lineWrapping,a=n&&Gr(e);if(!t.measure.heights||n&&t.measure.width!=a){var d=t.measure.heights=[];if(n){t.measure.width=a;for(var y=t.text.firstChild.getClientRects(),b=0;b<y.length-1;b++){var S=y[b],L=y[b+1];Math.abs(S.bottom-L.bottom)>2&&d.push((S.bottom+L.top)/2-r.top)}}d.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),y=function(e,t,r,n){var L,a=Cs(t.map,r,n),d=a.node,y=a.start,b=a.end,S=a.collapse;if(3==d.nodeType){for(var R=0;R<4;R++){for(;y&&bt(t.line.text.charAt(a.coverStart+y));)--y;for(;a.coverStart+b<a.coverEnd&&bt(t.line.text.charAt(a.coverStart+b));)++b;if((L=pe&&xe<9&&0==y&&b==a.coverEnd-a.coverStart?d.parentNode.getBoundingClientRect():Xr(te(d,y,b).getClientRects(),n)).left||L.right||0==y)break;b=y,y-=1,S="right"}pe&&xe<11&&(L=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=ir)return ir;var t=j(e,M("span","x")),r=t.getBoundingClientRect(),n=te(t,0,1).getBoundingClientRect();return ir=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,L))}else{var K;y>0&&(S=n="right"),L=e.options.lineWrapping&&(K=d.getClientRects()).length>1?K["right"==n?K.length-1:0]:d.getBoundingClientRect()}if(pe&&xe<9&&!y&&(!L||!L.left&&!L.right)){var se=d.parentNode.getClientRects()[0];L=se?{left:se.left,right:se.left+$e(e.display),top:se.top,bottom:se.bottom}:Yt}for(var ee=L.top-t.rect.top,be=L.bottom-t.rect.top,Ae=(ee+be)/2,He=t.view.measure.heights,qe=0;qe<He.length-1&&!(Ae<He[qe]);qe++);var it={left:("right"==S?L.right:L.left)-t.rect.left,right:("left"==S?L.left:L.right)-t.rect.left,top:qe?He[qe-1]:0,bottom:He[qe]};return!L.left&&!L.right&&(it.bogus=!0),e.options.singleCursorHeightPerLine||(it.rtop=ee,it.rbottom=be),it}(e,t,r,n),y.bogus||(t.cache[d]=y)),{left:y.left,right:y.right,top:a?y.rtop:y.top,bottom:a?y.rbottom:y.bottom}}var Ie,Yt={left:0,right:0,top:0,bottom:0};function Cs(e,t,r){for(var n,a,d,y,b,S,L=0;L<e.length;L+=3)if(S=e[L+1],t<(b=e[L])?(a=0,d=1,y="left"):t<S?d=1+(a=t-b):(L==e.length-3||t==S&&e[L+3]>t)&&(a=(d=S-b)-1,t>=S&&(y="right")),null!=a){if(n=e[L+2],b==S&&r==(n.insertLeft?"left":"right")&&(y=r),"left"==r&&0==a)for(;L&&e[L-2]==e[L-3]&&e[L-1].insertLeft;)n=e[2+(L-=3)],y="left";if("right"==r&&a==S-b)for(;L<e.length-3&&e[L+3]==e[L+4]&&!e[L+5].insertLeft;)n=e[(L+=3)+2],y="right";break}return{node:n,start:a,end:d,collapse:y,coverStart:b,coverEnd:S}}function Xr(e,t){var r=Yt;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var a=e.length-1;a>=0&&(r=e[a]).left==r.right;a--);return r}function vo(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 Ko(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vo(e.display.view[t])}function Ts(e){Ko(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Mr(){return Z&&G?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function vi(){return Z&&G?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function as(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=xs(e.widgets[r]));return t}function mi(e,t,r,n,a){if(!a){var d=as(t);r.top+=d,r.bottom+=d}if("line"==n)return r;n||(n="local");var y=ie(t);if("local"==n?y+=zi(e.display):y-=e.display.viewOffset,"page"==n||"window"==n){var b=e.display.lineSpace.getBoundingClientRect();y+=b.top+("window"==n?0:vi());var S=b.left+("window"==n?0:Mr());r.left+=S,r.right+=S}return r.top+=y,r.bottom+=y,r}function ls(e,t,r){if("div"==r)return t;var n=t.left,a=t.top;if("page"==r)n-=Mr(),a-=vi();else if("local"==r||!r){var d=e.display.sizer.getBoundingClientRect();n+=d.left,a+=d.top}var y=e.display.lineSpace.getBoundingClientRect();return{left:n-y.left,top:a-y.top}}function Ui(e,t,r,n,a){return n||(n=st(e.doc,t.line)),mi(e,n,po(e,n,t.ch,a),r)}function Er(e,t,r,n,a,d){function y(be,Ae){var He=ni(e,a,be,Ae?"right":"left",d);return Ae?He.left=He.right:He.right=He.left,mi(e,n,He,r)}n=n||st(e.doc,t.line),a||(a=qi(e,n));var b=Nn(n,e.doc.direction),S=t.ch,L=t.sticky;if(S>=n.text.length?(S=n.text.length,L="before"):S<=0&&(S=0,L="after"),!b)return y("before"==L?S-1:S,"before"==L);function R(be,Ae,He){return y(He?be-1:be,1==b[Ae].level!=He)}var K=Rt(b,S,L),se=kn,ee=R(S,K,"before"==L);return null!=se&&(ee.other=R(S,se,"before"!=L)),ee}function Ss(e,t){var r=0;t=Ke(e.doc,t),e.options.lineWrapping||(r=$e(e.display)*t.ch);var n=st(e.doc,t.line),a=ie(n)+zi(e.display);return{left:r,right:r,top:a,bottom:a+n.height}}function As(e,t,r,n,a){var d=Ne(e,t,r);return d.xRel=a,n&&(d.outside=n),d}function Es(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return As(n.first,0,null,-1,-1);var a=Kn(n,r),d=n.first+n.size-1;if(a>d)return As(n.first+n.size-1,st(n,d).text.length,null,1,1);t<0&&(t=0);for(var y=st(n,a);;){var b=Se(e,y,a,t,r),S=u(y,b.ch+(b.xRel>0||b.outside>0?1:0));if(!S)return b;var L=S.find(1);if(L.line==a)return L;y=st(n,a=L.line)}}function B(e,t,r,n){n-=as(t);var a=t.text.length,d=gn(function(y){return ni(e,r,y-1).bottom<=n},a,0);return{begin:d,end:a=gn(function(y){return ni(e,r,y).top>n},d,a)}}function Y(e,t,r,n){return r||(r=qi(e,t)),B(e,t,r,mi(e,t,ni(e,r,n),"line").top)}function ne(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Se(e,t,r,n,a){a-=ie(t);var d=qi(e,t),y=as(t),b=0,S=t.text.length,L=!0,R=Nn(t,e.doc.direction);if(R){var K=(e.options.lineWrapping?Fe:he)(e,t,r,d,R,n,a);b=(L=1!=K.level)?K.from:K.to-1,S=L?K.to:K.from-1}var Ae,He,se=null,ee=null,be=gn(function(kt){var pt=ni(e,d,kt);return pt.top+=y,pt.bottom+=y,!!ne(pt,n,a,!1)&&(pt.top<=a&&pt.left<=n&&(se=kt,ee=pt),!0)},b,S),qe=!1;if(ee){var Je=n-ee.left<ee.right-n,Ue=Je==L;be=se+(Ue?0:1),He=Ue?"after":"before",Ae=Je?ee.left:ee.right}else{!L&&(be==S||be==b)&&be++,He=0==be?"after":be==t.text.length?"before":ni(e,d,be-(L?1:0)).bottom+y<=a==L?"after":"before";var it=Er(e,Ne(r,be,He),"line",t,d);Ae=it.left,qe=a<it.top?-1:a>=it.bottom?1:0}return As(r,be=Xt(t.text,be,1),He,qe,n-Ae)}function he(e,t,r,n,a,d,y){var b=gn(function(K){var se=a[K],ee=1!=se.level;return ne(Er(e,Ne(r,ee?se.to:se.from,ee?"before":"after"),"line",t,n),d,y,!0)},0,a.length-1),S=a[b];if(b>0){var L=1!=S.level,R=Er(e,Ne(r,L?S.from:S.to,L?"after":"before"),"line",t,n);ne(R,d,y,!0)&&R.top>y&&(S=a[b-1])}return S}function Fe(e,t,r,n,a,d,y){var b=B(e,t,n,y),S=b.begin,L=b.end;/\s/.test(t.text.charAt(L-1))&&L--;for(var R=null,K=null,se=0;se<a.length;se++){var ee=a[se];if(!(ee.from>=L||ee.to<=S)){var Ae=ni(e,n,1!=ee.level?Math.min(L,ee.to)-1:Math.max(S,ee.from)).right,He=Ae<d?d-Ae+1e9:Ae-d;(!R||K>He)&&(R=ee,K=He)}}return R||(R=a[a.length-1]),R.from<S&&(R={from:S,to:R.to,level:R.level}),R.to>L&&(R={from:R.from,to:L,level:R.level}),R}function We(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ie){Ie=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ie.appendChild(document.createTextNode("x")),Ie.appendChild(M("br"));Ie.appendChild(document.createTextNode("x"))}j(e.measure,Ie);var r=Ie.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),T(e.measure),r||1}function $e(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),r=M("pre",[t],"CodeMirror-line-like");j(e.measure,r);var n=t.getBoundingClientRect(),a=(n.right-n.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function Ct(e){for(var t=e.display,r={},n={},a=t.gutters.clientLeft,d=t.gutters.firstChild,y=0;d;d=d.nextSibling,++y){var b=e.display.gutterSpecs[y].className;r[b]=d.offsetLeft+d.clientLeft+a,n[b]=d.clientWidth}return{fixedPos:mt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function mt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function gt(e){var t=We(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/$e(e.display)-3);return function(a){if(X(e.doc,a))return 0;var d=0;if(a.widgets)for(var y=0;y<a.widgets.length;y++)a.widgets[y].height&&(d+=a.widgets[y].height);return r?d+(Math.ceil(a.text.length/n)||1)*t:d+t}}function Lt(e){var t=e.doc,r=gt(e);t.iter(function(n){var a=r(n);a!=n.height&&jn(n,a)})}function Jt(e,t,r,n){var a=e.display;if(!r&&"true"==Cr(t).getAttribute("cm-not-content"))return null;var d,y,b=a.lineSpace.getBoundingClientRect();try{d=t.clientX-b.left,y=t.clientY-b.top}catch(K){return null}var L,S=Es(e,d,y);if(n&&S.xRel>0&&(L=st(e.doc,S.line).text).length==S.ch){var R=jt(L,L.length,e.options.tabSize)-L.length;S=Ne(S.line,Math.max(0,Math.round((d-Uo(e.display).left)/$e(e.display))-R))}return S}function xt(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Wt(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var a=e.display;if(n&&r<a.viewTo&&(null==a.updateLineNumbers||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)Zn&&F(e.doc,t)<a.viewTo&&pn(e);else if(r<=a.viewFrom)Zn&&I(e.doc,r+n)>a.viewFrom?pn(e):(a.viewFrom+=n,a.viewTo+=n);else if(t<=a.viewFrom&&r>=a.viewTo)pn(e);else if(t<=a.viewFrom){var d=Zt(e,r,r+n,1);d?(a.view=a.view.slice(d.index),a.viewFrom=d.lineN,a.viewTo+=n):pn(e)}else if(r>=a.viewTo){var y=Zt(e,t,t,-1);y?(a.view=a.view.slice(0,y.index),a.viewTo=y.lineN):pn(e)}else{var b=Zt(e,t,t,-1),S=Zt(e,r,r+n,1);b&&S?(a.view=a.view.slice(0,b.index).concat(Ur(e,b.lineN,S.lineN)).concat(a.view.slice(S.index)),a.viewTo+=n):pn(e)}var L=a.externalMeasured;L&&(r<L.lineN?L.lineN+=n:t<L.lineN+L.size&&(a.externalMeasured=null))}function an(e,t,r){e.curOp.viewChanged=!0;var n=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var d=n.view[xt(e,t)];if(null!=d.node){var y=d.changes||(d.changes=[]);-1==Le(y,r)&&y.push(r)}}}function pn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zt(e,t,r,n){var d,a=xt(e,t),y=e.display.view;if(!Zn||r==e.doc.first+e.doc.size)return{index:a,lineN:r};for(var b=e.display.viewFrom,S=0;S<a;S++)b+=y[S].size;if(b!=t){if(n>0){if(a==y.length-1)return null;d=b+y[a].size-t,a++}else d=b-t;t+=d,r+=d}for(;F(e.doc,r)!=r;){if(a==(n<0?0:y.length-1))return null;r+=n*y[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:r}}function Yn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var a=t[n];!a.hidden&&(!a.node||a.changes)&&++r}return r}function mn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Pr(e,t){void 0===t&&(t=!0);var r=e.doc,n={},a=n.cursors=document.createDocumentFragment(),d=n.selection=document.createDocumentFragment(),y=e.options.$customCursor;y&&(t=!0);for(var b=0;b<r.sel.ranges.length;b++)if(t||b!=r.sel.primIndex){var S=r.sel.ranges[b];if(!(S.from().line>=e.display.viewTo||S.to().line<e.display.viewFrom)){var L=S.empty();if(y){var R=y(e,S);R&&us(e,R,a)}else(L||e.options.showCursorWhenSelecting)&&us(e,S.head,a);L||Go(e,S,d)}}return n}function us(e,t,r){var n=Er(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=r.appendChild(M("div","\xa0","CodeMirror-cursor"));if(a.style.left=n.left+"px",a.style.top=n.top+"px",a.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var d=Ui(e,t,"div",null,null),y=d.right-d.left;a.style.width=(y>0?y:e.defaultCharWidth())+"px"}if(n.other){var b=r.appendChild(M("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));b.style.display="",b.style.left=n.other.left+"px",b.style.top=n.other.top+"px",b.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function ii(e,t){return e.top-t.top||e.left-t.left}function Go(e,t,r){var n=e.display,a=e.doc,d=document.createDocumentFragment(),y=Uo(e.display),b=y.left,S=Math.max(n.sizerWidth,Gr(e)-n.sizer.offsetLeft)-y.right,L="ltr"==a.direction;function R(Ue,it,kt,pt){it<0&&(it=0),it=Math.round(it),pt=Math.round(pt),d.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+Ue+"px;\n                             top: "+it+"px; width: "+(null==kt?S-Ue:kt)+"px;\n                             height: "+(pt-it)+"px"))}function K(Ue,it,kt){var yn,pr,pt=st(a,Ue),Ft=pt.text.length;function Dn($n,Qr){return Ui(e,Ne(Ue,$n),"div",pt,Qr)}function oi($n,Qr,xr){var nr=Y(e,pt,null,$n),Qn="ltr"==Qr==("after"==xr)?"left":"right";return Dn("after"==xr?nr.begin:nr.end-(/\s/.test(pt.text.charAt(nr.end-1))?2:1),Qn)[Qn]}var $r=Nn(pt,a.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var a=!1,d=0;d<e.length;++d){var y=e[d];(y.from<r&&y.to>t||t==r&&y.to==t)&&(n(Math.max(y.from,t),Math.min(y.to,r),1==y.level?"rtl":"ltr",d),a=!0)}a||n(t,r,"ltr")}($r,it||0,null==kt?Ft:kt,function($n,Qr,xr,nr){var Qn="ltr"==xr,In=Dn($n,Qn?"left":"right"),Jr=Dn(Qr-1,Qn?"right":"left"),aa=null==it&&0==$n,lo=null==kt&&Qr==Ft,Or=0==nr,ms=!$r||nr==$r.length-1;if(Jr.top-In.top<=3){var qs=(L?aa:lo)&&Or?b:(Qn?In:Jr).left;R(qs,In.top,((L?lo:aa)&&ms?S:(Qn?Jr:In).right)-qs,In.bottom)}else{var Bo,Br,la,Gl;Qn?(Bo=L&&aa&&Or?b:In.left,Br=L?S:oi($n,xr,"before"),la=L?b:oi(Qr,xr,"after"),Gl=L&&lo&&ms?S:Jr.right):(Bo=L?oi($n,xr,"before"):b,Br=!L&&aa&&Or?S:In.right,la=!L&&lo&&ms?b:Jr.left,Gl=L?oi(Qr,xr,"after"):S),R(Bo,In.top,Br-Bo,In.bottom),In.bottom<Jr.top&&R(b,In.bottom,null,Jr.top),R(la,Jr.top,Gl-la,Jr.bottom)}(!yn||ii(In,yn)<0)&&(yn=In),ii(Jr,yn)<0&&(yn=Jr),(!pr||ii(In,pr)<0)&&(pr=In),ii(Jr,pr)<0&&(pr=Jr)}),{start:yn,end:pr}}var se=t.from(),ee=t.to();if(se.line==ee.line)K(se.line,se.ch,ee.ch);else{var be=st(a,se.line),Ae=st(a,ee.line),He=k(be)==k(Ae),qe=K(se.line,se.ch,He?be.text.length+1:null).end,Je=K(ee.line,He?0:null,ee.ch).start;He&&(qe.top<Je.top-2?(R(qe.right,qe.top,null,qe.bottom),R(b,Je.top,Je.left,Je.bottom)):R(qe.right,qe.top,Je.left-qe.right,qe.bottom)),qe.bottom<Je.top&&R(b,qe.bottom,null,Je.top)}r.appendChild(d)}function mo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||cs(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Da(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||js(e))}function da(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&cs(e))},100)}function js(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(vt(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),$&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),mo(e))}function cs(e,t){e.state.delayingBlurEvent||(e.state.focused&&(vt(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Xo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),a=t.lineDiv.getBoundingClientRect().top,d=0,y=0;y<t.view.length;y++){var b=t.view[y],S=e.options.lineWrapping,L=void 0,R=0;if(!b.hidden){if(a+=b.line.height,pe&&xe<8){var K=b.node.offsetTop+b.node.offsetHeight;L=K-r,r=K}else{var se=b.node.getBoundingClientRect();L=se.bottom-se.top,!S&&b.text.firstChild&&(R=b.text.firstChild.getBoundingClientRect().right-se.left-1)}var ee=b.line.height-L;if((ee>.005||ee<-.005)&&(a<n&&(d-=ee),jn(b.line,L),Na(b.line),b.rest))for(var be=0;be<b.rest.length;be++)Na(b.rest[be]);if(R>e.display.sizerWidth){var Ae=Math.ceil(R/$e(e.display));Ae>e.display.maxLineLength&&(e.display.maxLineLength=Ae,e.display.maxLine=b.line,e.display.maxLineChanged=!0)}}}Math.abs(d)>2&&(t.scroller.scrollTop+=d)}function Na(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Yo(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-zi(e));var a=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,d=Kn(t,n),y=Kn(t,a);if(r&&r.ensure){var b=r.ensure.from.line,S=r.ensure.to.line;b<d?(d=b,y=Kn(t,ie(st(t,b))+e.wrapper.clientHeight)):Math.min(S,t.lastLine())>=y&&(d=Kn(t,ie(st(t,S))-e.wrapper.clientHeight),y=S)}return{from:d,to:Math.max(y,d+1)}}function ha(e,t){var r=e.display,n=We(e.display);t.top<0&&(t.top=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,d=pi(e),y={};t.bottom-t.top>d&&(t.bottom=t.top+d);var b=e.doc.height+ho(r),L=t.bottom>b-n;if(t.top<a)y.scrollTop=t.top<n?0:t.top;else if(t.bottom>a+d){var R=Math.min(t.top,(L?b:t.bottom)-d);R!=a&&(y.scrollTop=R)}var K=e.options.fixedGutter?0:r.gutters.offsetWidth,se=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-K,ee=Gr(e)-r.gutters.offsetWidth,be=t.right-t.left>ee;return be&&(t.right=t.left+ee),t.left<10?y.scrollLeft=0:t.left<se?y.scrollLeft=Math.max(0,t.left+K-(be?0:10)):t.right>ee+se-3&&(y.scrollLeft=t.right+(be?0:10)-ee),y}function fa(e,t){null!=t&&(yo(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Qs(e){yo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _o(e,t,r){(null!=t||null!=r)&&yo(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function yo(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,pa(e,Ss(e,t.from),Ss(e,t.to),t.margin))}function pa(e,t,r,n){var a=ha(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});_o(e,a.scrollLeft,a.scrollTop)}function Ls(e,t){Math.abs(e.doc.scrollTop-t)<2||(De||ma(e,{top:t}),Ma(e,t,!0),De&&ma(e),ko(e,100))}function Ma(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Os(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(!(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||n)&&(e.doc.scrollLeft=t,qa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Js(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ho(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?r:0,docHeight:n,scrollHeight:n+ei(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Ds=function(e,t,r){this.cm=r;var n=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=a.tabIndex=-1,e(n),e(a),ut(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ut(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,pe&&xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ds.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;return r?(this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0",this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+(e.viewHeight-(t?n:0)))+"px"):(this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0"),t?(this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px",this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+(e.viewWidth-e.barLeft-(r?n:0)))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0"),!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Ds.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ds.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ds.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=f&&!V?"12px":"18px",this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Tt,this.disableVert=new Tt},Ds.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var a=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Ds.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Zs=function(){};function Ns(e,t){t||(t=Js(e));var r=e.display.barWidth,n=e.display.barHeight;ga(e,t);for(var a=0;a<4&&r!=e.display.barWidth||n!=e.display.barHeight;a++)r!=e.display.barWidth&&e.options.lineWrapping&&Xo(e),ga(e,Js(e)),r=e.display.barWidth,n=e.display.barHeight}function ga(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Zs.prototype.update=function(){return{bottom:0,right:0}},Zs.prototype.setScrollLeft=function(){},Zs.prototype.setScrollTop=function(){},Zs.prototype.clear=function(){};var Pa={native:Ds,null:Zs};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Pa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ut(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Os(e,t):Ls(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var Al=0;function Ai(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:++Al,markArrays:null},function(e){Fn?Fn.ops.push(e):e.ownsGroup=Fn={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Ms(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var a=e.ops[n];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(r<t.length)}(r)}finally{Fn=null,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)jl(t[r]);for(var n=0;n<t.length;n++)Ll(t[n]);for(var a=0;a<t.length;a++)Ia(t[a]);for(var d=0;d<t.length;d++)Ba(t[d]);for(var y=0;y<t.length;y++)Ha(t[y])}(r)}(r)}}(t)}function jl(e){var t=e.cm,r=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=ei(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ei(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&Oe(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new wo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ll(e){e.updatedDisplay=e.mustUpdate&&Vo(e.cm,e.update)}function Ia(e){var t=e.cm,r=t.display;e.updatedDisplay&&Xo(t),e.barMeasure=Js(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=po(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+ei(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Gr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ba(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Os(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ae();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ns(t,e.barMeasure),e.updatedDisplay&&$o(t,e.barMeasure),e.selectionChanged&&mo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Da(e.cm)}function Ha(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&va(t,e.update),null!=r.wheelStartX&&(null!=e.scrollTop||null!=e.scrollLeft||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Ma(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Os(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=function(e,t,r,n){var a;null==n&&(n=0),!e.options.lineWrapping&&t==r&&(r="before"==t.sticky?Ne(t.line,t.ch+1,"before"):t,t=t.ch?Ne(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var d=0;d<5;d++){var y=!1,b=Er(e,t),S=r&&r!=t?Er(e,r):b,L=ha(e,a={left:Math.min(b.left,S.left),top:Math.min(b.top,S.top)-n,right:Math.max(b.left,S.left),bottom:Math.max(b.bottom,S.bottom)+n}),R=e.doc.scrollTop,K=e.doc.scrollLeft;if(null!=L.scrollTop&&(Ls(e,L.scrollTop),Math.abs(e.doc.scrollTop-R)>1&&(y=!0)),null!=L.scrollLeft&&(Os(e,L.scrollLeft),Math.abs(e.doc.scrollLeft-K)>1&&(y=!0)),!y)break}return a}(t,Ke(n,e.scrollToPos.from),Ke(n,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!Tn(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),a=null;if(t.top+n.top<0?a=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),null!=a&&!z){var d=M("div","\u200b",null,"position: absolute;\n                         top: "+(t.top-r.viewOffset-zi(e.display))+"px;\n                         height: "+(t.bottom-t.top+ei(e)+r.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(d),d.scrollIntoView(a),e.display.lineSpace.removeChild(d)}}}(t,a)}var d=e.maybeHiddenMarkers,y=e.maybeUnhiddenMarkers;if(d)for(var b=0;b<d.length;++b)d[b].lines.length||vt(d[b],"hide");if(y)for(var S=0;S<y.length;++S)y[S].lines.length&&vt(y[S],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&vt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function xn(e,t){if(e.curOp)return t();Ai(e);try{return t()}finally{Ms(e)}}function zn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ai(e);try{return t.apply(e,arguments)}finally{Ms(e)}}}function cr(e){return function(){if(this.curOp)return e.apply(this,arguments);Ai(this);try{return e.apply(this,arguments)}finally{Ms(this)}}}function Vn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ai(t);try{return e.apply(this,arguments)}finally{Ms(t)}}}function ko(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Ve(Ol,e))}function Ol(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ts(e,t.highlightFrontier),a=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(d){if(n.line>=e.display.viewFrom){var y=d.styles,b=d.text.length>e.options.maxHighlightLength?or(t.mode,n.state):null,S=_s(e,d,n,!0);b&&(n.state=b),d.styles=S.styles;var L=d.styleClasses,R=S.classes;R?d.styleClasses=R:L&&(d.styleClasses=null);for(var K=!y||y.length!=d.styles.length||L!=R&&(!L||!R||L.bgClass!=R.bgClass||L.textClass!=R.textClass),se=0;!K&&se<y.length;++se)K=y[se]!=d.styles[se];K&&a.push(n.line),d.stateAfter=n.save(),n.nextLine()}else d.text.length<=e.options.maxHighlightLength&&ys(e,d.text,n),d.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ko(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),a.length&&xn(e,function(){for(var d=0;d<a.length;d++)an(e,a[d],"text")})}}var wo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Yo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Gr(e),this.force=r,this.dims=Ct(e),this.events=[]};function Vo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return pn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Yn(e))return!1;ya(e)&&(pn(e),t.dims=Ct(e));var a=n.first+n.size,d=Math.max(t.visible.from-e.options.viewportMargin,n.first),y=Math.min(a,t.visible.to+e.options.viewportMargin);r.viewFrom<d&&d-r.viewFrom<20&&(d=Math.max(n.first,r.viewFrom)),r.viewTo>y&&r.viewTo-y<20&&(y=Math.min(a,r.viewTo)),Zn&&(d=F(e.doc,d),y=I(e.doc,y));var b=d!=r.viewFrom||y!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;(function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Ur(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ur(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(xt(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ur(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,xt(e,r)))),n.viewTo=r})(e,d,y),r.viewOffset=ie(st(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var S=Yn(e);if(!b&&0==S&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var L=function(e){if(e.hasFocus())return null;var t=ae();if(!t||!Q(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Q(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return S>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,a=e.options.lineNumbers,d=n.lineDiv,y=d.firstChild;function b(be){var Ae=be.nextSibling;return $&&f&&e.display.currentWheelTarget==be?be.style.display="none":be.parentNode.removeChild(be),Ae}for(var S=n.view,L=n.viewFrom,R=0;R<S.length;R++){var K=S[R];if(!K.hidden)if(K.node&&K.node.parentNode==d){for(;y!=K.node;)y=b(y);var ee=a&&null!=t&&t<=L&&K.lineNumber;K.changes&&(Le(K.changes,"gutter")>-1&&(ee=!1),ur(e,K,L,r)),ee&&(T(K.lineNumber),K.lineNumber.appendChild(document.createTextNode(ui(e.options,L)))),y=K.node.nextSibling}else{var se=br(e,K,L,r);d.insertBefore(se,y)}L+=K.size}for(;y;)y=b(y)}(e,r.updateLineNumbers,t.dims),S>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=ae()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Q(document.body,e.anchorNode)&&Q(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(L),T(r.cursorDiv),T(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,b&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ko(e,400)),r.updateLineNumbers=null,!0}function va(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Gr(e))n&&(t.visible=Yo(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+ho(e.display)-pi(e),r.top)}),t.visible=Yo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Vo(e,t))break;Xo(e);var a=Js(e);mn(e),Ns(e,a),$o(e,a),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 ma(e,t){var r=new wo(e,t);if(Vo(e,r)){Xo(e),va(e,r);var n=Js(e);mn(e),Ns(e,n),$o(e,n),r.finish()}}function _a(e){e.sizer.style.marginLeft=e.gutters.offsetWidth+"px",Qt(e,"gutterChanged",e)}function $o(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+ei(e)+"px"}function qa(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=mt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,d=n+"px",y=0;y<r.length;y++)if(!r[y].hidden){e.options.fixedGutter&&(r[y].gutter&&(r[y].gutter.style.left=d),r[y].gutterBackground&&(r[y].gutterBackground.style.left=d));var b=r[y].alignable;if(b)for(var S=0;S<b.length;S++)b[S].style.left=d}e.options.fixedGutter&&(t.gutters.style.left=n+a+"px")}}function ya(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ui(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var a=n.measure.appendChild(M("div",[M("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),d=a.firstChild.offsetWidth,y=a.offsetWidth-d;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(d,n.lineGutter.offsetWidth-y)+1,n.lineNumWidth=n.lineNumInnerWidth+y,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",_a(e.display),!0}return!1}function bo(e,t){for(var r=[],n=!1,a=0;a<e.length;a++){var d=e[a],y=null;if("string"!=typeof d&&(y=d.style,d=d.className),"CodeMirror-linenumbers"==d){if(!t)continue;n=!0}r.push({className:d,style:y})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Ua(e){var t=e.gutters,r=e.gutterSpecs;T(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var a=r[n],d=a.className,y=a.style,b=t.appendChild(M("div",null,"CodeMirror-gutter "+d));y&&(b.style.cssText=y),"CodeMirror-linenumbers"==d&&(e.lineGutter=b,b.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",_a(e)}function xo(e){Ua(e.display),Wt(e),qa(e)}function Ps(e,t,r,n){var a=this;this.input=r,a.scrollbarFiller=M("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=M("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=N("div",null,"CodeMirror-code"),a.selectionDiv=M("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=M("div",null,"CodeMirror-cursors"),a.measure=M("div",null,"CodeMirror-measure"),a.lineMeasure=M("div",null,"CodeMirror-measure"),a.lineSpace=N("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var d=N("div",[a.lineSpace],"CodeMirror-lines");a.mover=M("div",[d],null,"position: relative"),a.sizer=M("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=M("div",null,null,"position: absolute; height: 50px; width: 1px;"),a.gutters=M("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=M("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=M("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),a.wrapper.setAttribute("translate","no"),pe&&xe<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!$&&!(De&&i)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=bo(n.gutters,n.lineNumbers),Ua(a),r.init(a)}wo.prototype.signal=function(e,t){tn(e,t)&&this.events.push(arguments)},wo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)vt.apply(null,this.events[e])};var Co=0,Ki=null;function ka(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Nl(e){var t=ka(e);return t.x*=Ki,t.y*=Ki,t}function wa(e,t){var r=ka(t),n=r.x,a=r.y,d=Ki;0===t.deltaMode&&(n=t.deltaX,a=t.deltaY,d=1);var y=e.display,b=y.scroller,L=b.scrollHeight>b.clientHeight;if(n&&b.scrollWidth>b.clientWidth||a&&L){if(a&&f&&$)e:for(var R=t.target,K=y.view;R!=b;R=R.parentNode)for(var se=0;se<K.length;se++)if(K[se].node==R){e.display.currentWheelTarget=R;break e}if(n&&!De&&!oe&&null!=d)return a&&L&&Ls(e,Math.max(0,b.scrollTop+a*d)),Os(e,Math.max(0,b.scrollLeft+n*d)),(!a||a&&L)&&Ut(t),void(y.wheelStartX=null);if(a&&null!=d){var ee=a*d,be=e.doc.scrollTop,Ae=be+y.wrapper.clientHeight;ee<0?be=Math.max(0,be+ee-50):Ae=Math.min(e.doc.height,Ae+ee+50),ma(e,{top:be,bottom:Ae})}Co<20&&0!==t.deltaMode&&(null==y.wheelStartX?(y.wheelStartX=b.scrollLeft,y.wheelStartY=b.scrollTop,y.wheelDX=n,y.wheelDY=a,setTimeout(function(){if(null!=y.wheelStartX){var He=b.scrollLeft-y.wheelStartX,qe=b.scrollTop-y.wheelStartY,Je=qe&&y.wheelDY&&qe/y.wheelDY||He&&y.wheelDX&&He/y.wheelDX;y.wheelStartX=y.wheelStartY=null,Je&&(Ki=(Ki*Co+Je)/(Co+1),++Co)}},200)):(y.wheelDX+=n,y.wheelDY+=a))}}pe?Ki=-.53:De?Ki=15:Z?Ki=-.7:fe&&(Ki=-1/3);var Vr=function(e,t){this.ranges=e,this.primIndex=t};Vr.prototype.primary=function(){return this.ranges[this.primIndex]},Vr.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 r=this.ranges[t],n=e.ranges[t];if(!q(r.anchor,n.anchor)||!q(r.head,n.head))return!1}return!0},Vr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new en(Ce(this.ranges[t].anchor),Ce(this.ranges[t].head));return new Vr(e,this.primIndex)},Vr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Vr.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(D(t,n.from())>=0&&D(e,n.to())<=0)return r}return-1};var en=function(e,t){this.anchor=e,this.head=t};function _i(e,t,r){var n=e&&e.options.selectionsMayTouch,a=t[r];t.sort(function(se,ee){return D(se.from(),ee.from())}),r=Le(t,a);for(var d=1;d<t.length;d++){var y=t[d],b=t[d-1],S=D(b.to(),y.from());if(n&&!y.empty()?S>0:S>=0){var L=ct(b.from(),y.from()),R=Me(b.to(),y.to()),K=b.empty()?y.from()==y.head:b.from()==b.head;d<=r&&--r,t.splice(--d,2,new en(K?R:L,K?L:R))}}return new Vr(t,r)}function ds(e,t){return new Vr([new en(e,t||e)],0)}function Gi(e){return e.text?Ne(e.from.line+e.text.length-1,we(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ka(e,t){if(D(e,t.from)<0)return e;if(D(e,t.to)<=0)return Gi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Gi(t).ch-t.to.ch),Ne(r,n)}function Ei(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var a=e.sel.ranges[n];r.push(new en(Ka(a.anchor,t),Ka(a.head,t)))}return _i(e.cm,r,e.sel.primIndex)}function Ga(e,t,r){return e.line==t.line?Ne(r.line,e.ch-t.ch+r.ch):Ne(r.line+(e.line-t.line),e.ch)}function ba(e){e.doc.mode=Si(e.options,e.doc.modeOption),To(e)}function To(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ko(e,100),e.state.modeGen++,e.curOp&&Wt(e)}function Xa(e,t){return 0==t.from.ch&&0==t.to.ch&&""==we(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Qo(e,t,r,n){function a(Je){return r?r[Je]:null}function d(Je,Ue,it){(function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),lr(e),Gn(e,r);var a=n?n(e):1;a!=e.height&&jn(e,a)})(Je,Ue,it,n),Qt(Je,"change",Je,t)}function y(Je,Ue){for(var it=[],kt=Je;kt<Ue;++kt)it.push(new U(L[kt],a(kt),n));return it}var b=t.from,S=t.to,L=t.text,R=st(e,b.line),K=st(e,S.line),se=we(L),ee=a(L.length-1),be=S.line-b.line;if(t.full)e.insert(0,y(0,L.length)),e.remove(L.length,e.size-L.length);else if(Xa(e,t)){var Ae=y(0,L.length-1);d(K,K.text,ee),be&&e.remove(b.line,be),Ae.length&&e.insert(b.line,Ae)}else if(R==K)if(1==L.length)d(R,R.text.slice(0,b.ch)+se+R.text.slice(S.ch),ee);else{var He=y(1,L.length-1);He.push(new U(se+R.text.slice(S.ch),ee,n)),d(R,R.text.slice(0,b.ch)+L[0],a(0)),e.insert(b.line+1,He)}else if(1==L.length)d(R,R.text.slice(0,b.ch)+L[0]+K.text.slice(S.ch),a(0)),e.remove(b.line+1,be);else{d(R,R.text.slice(0,b.ch)+L[0],a(0)),d(K,se+K.text.slice(S.ch),ee);var qe=y(1,L.length-1);be>1&&e.remove(b.line+1,be-1),e.insert(b.line+1,qe)}Qt(e,"change",e,t)}function Xi(e,t,r){!function n(a,d,y){if(a.linked)for(var b=0;b<a.linked.length;++b){var S=a.linked[b];if(S.doc!=d){var L=y&&S.sharedHist;r&&!L||(t(S.doc,L),n(S.doc,a,L))}}}(e,null,!0)}function Ya(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Lt(e),ba(e),Va(e),e.options.direction=t.direction,e.options.lineWrapping||Oe(e),e.options.mode=t.modeOption,Wt(e)}function Va(e){("rtl"==e.doc.direction?le:E)(e.display.lineDiv,"CodeMirror-rtl")}function Jo(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 xa(e,t){var r={from:Ce(t.from),to:Gi(t),text:mr(e,t.from,t.to)};return Ta(e,r,t.from.line,t.to.line+1),Xi(e,function(n){return Ta(n,r,t.from.line,t.to.line+1)},!0),r}function $a(e){for(;e.length&&we(e).ranges;)e.pop()}function eo(e,t,r,n){var a=e.history;a.undone.length=0;var y,b,d=+new Date;if((a.lastOp==n||a.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&a.lastModTime>d-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(y=function(e,t){return t?($a(e.done),we(e.done)):e.done.length&&!we(e.done).ranges?we(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),we(e.done)):void 0}(a,a.lastOp==n)))b=we(y.changes),0==D(t.from,t.to)&&0==D(t.from,b.to)?b.to=Gi(t):y.changes.push(xa(e,t));else{var S=we(a.done);for((!S||!S.ranges)&&Ao(e.sel,a.done),y={changes:[xa(e,t)],generation:a.generation},a.done.push(y);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(r),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=d,a.lastOp=a.lastSelOp=n,a.lastOrigin=a.lastSelOrigin=t.origin,b||vt(e,"historyAdded")}function Ao(e,t){var r=we(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ta(e,t,r,n){var a=t["spans_"+e.id],d=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(y){y.markedSpans&&((a||(a=t["spans_"+e.id]={}))[d]=y.markedSpans),++d})}function Qa(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ea(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],a=0;a<t.text.length;++a)n.push(Qa(r[a]));return n}(e,t),n=di(e,t);if(!r)return n;if(!n)return r;for(var a=0;a<r.length;++a){var d=r[a],y=n[a];if(d&&y)e:for(var b=0;b<y.length;++b){for(var S=y[b],L=0;L<d.length;++L)if(d[L].marker==S.marker)continue e;d.push(S)}else y&&(r[a]=y)}return r}function to(e,t,r){for(var n=[],a=0;a<e.length;++a){var d=e[a];if(d.ranges)n.push(r?Vr.prototype.deepCopy.call(d):d);else{var y=d.changes,b=[];n.push({changes:b});for(var S=0;S<y.length;++S){var L=y[S],R=void 0;if(b.push({from:L.from,to:L.to,text:L.text}),t)for(var K in L)(R=K.match(/^spans_(\d+)$/))&&Le(t,Number(R[1]))>-1&&(we(b)[K]=L[K],delete L[K])}}}return n}function Sa(e,t,r,n){if(n){var a=e.anchor;if(r){var d=D(t,a)<0;d!=D(r,a)<0?(a=t,t=r):d!=D(t,r)<0&&(t=r)}return new en(a,t)}return new en(r||t,t)}function yi(e,t,r,n,a){null==a&&(a=e.cm&&(e.cm.display.shift||e.extend)),dr(e,new Vr([Sa(e.sel.primary(),t,r,a)],0),n)}function Ja(e,t,r){for(var n=[],a=e.cm&&(e.cm.display.shift||e.extend),d=0;d<e.sel.ranges.length;d++)n[d]=Sa(e.sel.ranges[d],t[d],null,a);dr(e,_i(e.cm,n,e.sel.primIndex),r)}function Aa(e,t,r,n){var a=e.sel.ranges.slice(0);a[t]=r,dr(e,_i(e.cm,a,e.sel.primIndex),n)}function Za(e,t,r,n){dr(e,ds(t,r),n)}function el(e,t,r){var n=e.history.done,a=we(n);a&&a.ranges?(n[n.length-1]=t,ta(e,t,r)):dr(e,t,r)}function dr(e,t,r){ta(e,t,r),function(e,t,r,n){var a=e.history,d=n&&n.origin;r==a.lastSelOp||d&&a.lastSelOrigin==d&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==d||function(e,t,r,n){var a=t.charAt(0);return"*"==a||"+"==a&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,d,we(a.done),t))?a.done[a.done.length-1]=t:Ao(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=d,a.lastSelOp=r,n&&!1!==n.clearRedo&&$a(a.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function ta(e,t,r){(tn(e,"beforeSelectionChange")||e.cm&&tn(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(a){this.ranges=[];for(var d=0;d<a.length;d++)this.ranges[d]=new en(Ke(e,a[d].anchor),Ke(e,a[d].head))},origin:r&&r.origin};return vt(e,"beforeSelectionChange",e,n),e.cm&&vt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?_i(e.cm,n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(D(t.primary().head,e.sel.primary().head)<0?-1:1);no(e,jo(e,t,n,!0)),(!r||!1!==r.scroll)&&e.cm&&"nocursor"!=e.cm.getOption("readOnly")&&Qs(e.cm)}function no(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Jn(e.cm)),Qt(e,"cursorActivity",e))}function Ea(e){no(e,jo(e,e.sel,null,!1))}function jo(e,t,r,n){for(var a,d=0;d<t.ranges.length;d++){var y=t.ranges[d],b=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[d],S=na(e,y.anchor,b&&b.anchor,r,n),L=na(e,y.head,b&&b.head,r,n);(a||S!=y.anchor||L!=y.head)&&(a||(a=t.ranges.slice(0,d)),a[d]=new en(S,L))}return a?_i(e.cm,a,t.primIndex):t}function Fs(e,t,r,n,a){var d=st(e,t.line);if(d.markedSpans)for(var y=0;y<d.markedSpans.length;++y){var b=d.markedSpans[y],S=b.marker,L="selectLeft"in S?!S.selectLeft:S.inclusiveLeft,R="selectRight"in S?!S.selectRight:S.inclusiveRight;if((null==b.from||(L?b.from<=t.ch:b.from<t.ch))&&(null==b.to||(R?b.to>=t.ch:b.to>t.ch))){if(a&&(vt(S,"beforeCursorEnter"),S.explicitlyCleared)){if(d.markedSpans){--y;continue}break}if(!S.atomic)continue;if(r){var K=S.find(n<0?1:-1),se=void 0;if((n<0?R:L)&&(K=tl(e,K,-n,K&&K.line==t.line?d:null)),K&&K.line==t.line&&(se=D(K,r))&&(n<0?se<0:se>0))return Fs(e,K,t,n,a)}var ee=S.find(n<0?-1:1);return(n<0?L:R)&&(ee=tl(e,ee,n,ee.line==t.line?d:null)),ee?Fs(e,ee,t,n,a):null}}return t}function na(e,t,r,n,a){var d=n||1;return Fs(e,t,r,d,a)||!a&&Fs(e,t,r,d,!0)||Fs(e,t,r,-d,a)||!a&&Fs(e,t,r,-d,!0)||(e.cantEdit=!0,Ne(e.first,0))}function tl(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ke(e,Ne(t.line-1)):null:r>0&&t.ch==(n||st(e,t.line)).text.length?t.line<e.first+e.size-1?Ne(t.line+1,0):null:new Ne(t.line,t.ch+r)}function nl(e){e.setSelection(Ne(e.firstLine(),0),Ne(e.lastLine()),ft)}function rl(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(a,d,y,b){a&&(n.from=Ke(e,a)),d&&(n.to=Ke(e,d)),y&&(n.text=y),void 0!==b&&(n.origin=b)}),vt(e,"beforeChange",e,n),e.cm&&vt(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 Is(e,t,r){if(e.cm){if(!e.cm.curOp)return zn(e.cm,Is)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(tn(e,"beforeChange")||e.cm&&tn(e.cm,"beforeChange"))||(t=rl(e,t,!0))){var n=Xs&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(ee){if(ee.markedSpans)for(var be=0;be<ee.markedSpans.length;++be){var Ae=ee.markedSpans[be].marker;Ae.readOnly&&(!n||-1==Le(n,Ae))&&(n||(n=[])).push(Ae)}}),!n)return null;for(var a=[{from:t,to:r}],d=0;d<n.length;++d)for(var y=n[d],b=y.find(0),S=0;S<a.length;++S){var L=a[S];if(!(D(L.to,b.from)<0||D(L.from,b.to)>0)){var R=[S,1],K=D(L.from,b.from),se=D(L.to,b.to);(K<0||!y.inclusiveLeft&&!K)&&R.push({from:L.from,to:b.from}),(se>0||!y.inclusiveRight&&!se)&&R.push({from:b.to,to:L.to}),a.splice.apply(a,R),S+=R.length-3}}return a}(e,t.from,t.to);if(n)for(var a=n.length-1;a>=0;--a)Bs(e,{from:n[a].from,to:n[a].to,text:a?[""]:t.text,origin:t.origin});else Bs(e,t)}}function Bs(e,t){if(1!=t.text.length||""!=t.text[0]||0!=D(t.from,t.to)){var r=Ei(e,t);eo(e,t,r,e.cm?e.cm.curOp.id:NaN),Lo(e,t,r,di(e,t));var n=[];Xi(e,function(a,d){!d&&-1==Le(n,a.history)&&(al(a.history,t),n.push(a.history)),Lo(a,t,null,di(a,t))})}}function ra(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var d,a=e.history,y=e.sel,b="undo"==t?a.done:a.undone,S="undo"==t?a.undone:a.done,L=0;L<b.length&&(d=b[L],!(r?d.ranges&&!d.equals(e.sel):!d.ranges));L++);if(L!=b.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(d=b.pop()).ranges){if(n)return void b.push(d);break}if(Ao(d,S),r&&!d.equals(e.sel))return void dr(e,d,{clearRedo:!1});y=d}var R=[];Ao(y,S),S.push({changes:R,generation:a.generation}),a.generation=d.generation||++a.maxGeneration;for(var K=tn(e,"beforeChange")||e.cm&&tn(e.cm,"beforeChange"),se=function(Ae){var He=d.changes[Ae];if(He.origin=t,K&&!rl(e,He,!1))return b.length=0,{};R.push(xa(e,He));var qe=Ae?Ei(e,He):we(b);Lo(e,He,qe,ea(e,He)),!Ae&&e.cm&&e.cm.scrollIntoView({from:He.from,to:Gi(He)});var Je=[];Xi(e,function(Ue,it){!it&&-1==Le(Je,Ue.history)&&(al(Ue.history,He),Je.push(Ue.history)),Lo(Ue,He,null,ea(Ue,He))})},ee=d.changes.length-1;ee>=0;--ee){var be=se(ee);if(be)return be.v}}}}function ia(e,t){if(0!=t&&(e.first+=t,e.sel=new Vr(yt(e.sel.ranges,function(a){return new en(Ne(a.anchor.line+t,a.anchor.ch),Ne(a.head.line+t,a.head.ch))}),e.sel.primIndex),e.cm)){Wt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)an(e.cm,n,"gutter")}}function Lo(e,t,r,n){if(e.cm&&!e.cm.curOp)return zn(e.cm,Lo)(e,t,r,n);if(t.to.line<e.first)ia(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 a=t.text.length-1-(e.first-t.from.line);ia(e,a),t={from:Ne(e.first,0),to:Ne(t.to.line+a,t.to.ch),text:[we(t.text)],origin:t.origin}}var d=e.lastLine();t.to.line>d&&(t={from:t.from,to:Ne(d,st(e,d).text.length),text:[t.text[0]],origin:t.origin}),t.removed=mr(e,t.from,t.to),r||(r=Ei(e,t)),e.cm?function(e,t,r){var n=e.doc,a=e.display,d=t.from,y=t.to,b=!1,S=d.line;e.options.lineWrapping||(S=It(k(st(n,d.line))),n.iter(S,y.line+1,function(ee){if(ee==a.maxLine)return b=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Jn(e),Qo(n,t,r,gt(e)),e.options.lineWrapping||(n.iter(S,d.line+t.text.length,function(ee){var be=me(ee);be>a.maxLineLength&&(a.maxLine=ee,a.maxLineLength=be,a.maxLineChanged=!0,b=!1)}),b&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var a=st(e,n).stateAfter;if(a&&(!(a instanceof Sr)||n+a.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}(n,d.line),ko(e,400);var L=t.text.length-(y.line-d.line)-1;t.full?Wt(e):d.line!=y.line||1!=t.text.length||Xa(e.doc,t)?Wt(e,d.line,y.line+1,L):an(e,d.line,"text");var R=tn(e,"changes"),K=tn(e,"change");if(K||R){var se={from:d,to:y,text:t.text,removed:t.removed,origin:t.origin};K&&Qt(e,"change",e,se),R&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(se)}e.display.selForContextMenu=null}(e.cm,t,n):Qo(e,t,n),ta(e,r,ft),e.cantEdit&&na(e,Ne(e.firstLine(),0))&&(e.cantEdit=!1)}}function hs(e,t,r,n,a){var d;n||(n=r),D(n,r)<0&&(r=(d=[n,r])[0],n=d[1]),"string"==typeof t&&(t=e.splitLines(t)),Is(e,{from:r,to:n,text:t,origin:a})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ol(e,t,r,n){for(var a=0;a<e.length;++a){var d=e[a],y=!0;if(d.ranges){d.copied||((d=e[a]=d.deepCopy()).copied=!0);for(var b=0;b<d.ranges.length;b++)sl(d.ranges[b].anchor,t,r,n),sl(d.ranges[b].head,t,r,n)}else{for(var S=0;S<d.changes.length;++S){var L=d.changes[S];if(r<L.from.line)L.from=Ne(L.from.line+n,L.from.ch),L.to=Ne(L.to.line+n,L.to.ch);else if(t<=L.to.line){y=!1;break}}y||(e.splice(0,a+1),a=0)}}}function al(e,t){var r=t.from.line,n=t.to.line,a=t.text.length-(n-r)-1;ol(e.done,r,n,a),ol(e.undone,r,n,a)}function ro(e,t,r,n){var a=t,d=t;return"number"==typeof t?d=st(e,Ot(e,t)):a=It(t),null==a?null:(n(d,a)&&e.cm&&an(e.cm,a,r),d)}function Yi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function Oo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var a=e[n];t+=a.chunkSize(),r+=a.height,a.parent=this}this.size=t,this.height=r,this.parent=null}en.prototype.from=function(){return ct(this.anchor,this.head)},en.prototype.to=function(){return Me(this.anchor,this.head)},en.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Yi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var a=this.lines[r];this.height-=a.height,tt(a),Qt(a,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,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,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},Oo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<a){var d=Math.min(t,a-e),y=n.height;if(n.removeInner(e,d),this.height-=y-n.height,a==d&&(this.children.splice(r--,1),n.parent=null),0==(t-=d))break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Yi))){var b=[];this.collapse(b),this.children=[new Yi(b)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var a=this.children[n],d=a.chunkSize();if(e<=d){if(a.insertInner(e,t,r),a.lines&&a.lines.length>50){for(var y=a.lines.length%25+25,b=y;b<a.lines.length;){var S=new Yi(a.lines.slice(b,b+=25));a.height-=S.height,this.children.splice(++n,0,S),S.parent=this}a.lines=a.lines.slice(0,y),this.maybeSpill()}break}e-=d}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var r=new Oo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=r.size,e.height-=r.height;var a=Le(e.parent.children,e);e.parent.children.splice(a+1,0,r)}else{var n=new Oo(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var a=this.children[n],d=a.chunkSize();if(e<d){var y=Math.min(t,d-e);if(a.iterN(e,y,r))return!0;if(0==(t-=y))break;e=0}else e-=d}}};var Do=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function ll(e,t,r){ie(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&fa(e,r)}Do.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=It(r);if(null!=n&&t){for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(r.widgets=null);var d=xs(this);jn(r,Math.max(0,r.height-d)),e&&(xn(e,function(){ll(e,r,-d),an(e,n,"widget")}),Qt(e,"lineWidgetCleared",e,this,n))}},Do.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var a=xs(this)-t;!a||(X(this.doc,n)||jn(n,n.height+a),r&&xn(r,function(){r.curOp.forceUpdate=!0,ll(r,n,a),Qt(r,"lineWidgetChanged",r,e,It(n))}))},Mn(Do);var ul=0,fs=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ul};function ji(e,t,r,n,a){if(n&&n.shared)return function(e,t,r,n,a){(n=Ge(n)).shared=!1;var d=[ji(e,t,r,n,a)],y=d[0],b=n.widgetNode;return Xi(e,function(S){b&&(n.widgetNode=b.cloneNode(!0)),d.push(ji(S,Ke(S,t),Ke(S,r),n,a));for(var L=0;L<S.linked.length;++L)if(S.linked[L].isParent)return;y=we(d)}),new io(d,y)}(e,t,r,n,a);if(e.cm&&!e.cm.curOp)return zn(e.cm,ji)(e,t,r,n,a);var d=new fs(e,a),y=D(t,r);if(n&&Ge(n,d,!1),y>0||0==y&&!1!==d.clearWhenEmpty)return d;if(d.replacedWith&&(d.collapsed=!0,d.widgetNode=N("span",[d.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||d.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(d.widgetNode.insertLeft=!0)),d.collapsed){if(p(e,t.line,t,r,d)||t.line!=r.line&&p(e,r.line,t,r,d))throw new Error("Inserting collapsed marker partially overlapping an existing one");Zn=!0}d.addToHistory&&eo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var L,b=t.line,S=e.cm;if(e.iter(b,r.line+1,function(K){S&&d.collapsed&&!S.options.lineWrapping&&k(K)==S.display.maxLine&&(L=!0),d.collapsed&&b!=t.line&&jn(K,0),function(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&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)}(K,new zr(d,b==t.line?t.ch:null,b==r.line?r.ch:null),e.cm&&e.cm.curOp),++b}),d.collapsed&&e.iter(t.line,r.line+1,function(K){X(e,K)&&jn(K,0)}),d.clearOnEnter&&ut(d,"beforeCursorEnter",function(){return d.clear()}),d.readOnly&&(Xs=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),d.collapsed&&(d.id=++ul,d.atomic=!0),S){if(L&&(S.curOp.updateMaxLine=!0),d.collapsed)Wt(S,t.line,r.line+1);else if(d.className||d.startStyle||d.endStyle||d.css||d.attributes||d.title)for(var R=t.line;R<=r.line;R++)an(S,R,"text");d.atomic&&Ea(S.doc),Qt(S,"markerAdded",S,d)}return d}fs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ai(e),tn(this,"clear")){var r=this.find();r&&Qt(this,"clear",r.from,r.to)}for(var n=null,a=null,d=0;d<this.lines.length;++d){var y=this.lines[d],b=yr(y.markedSpans,this);e&&!this.collapsed?an(e,It(y),"text"):e&&(null!=b.to&&(a=It(y)),null!=b.from&&(n=It(y))),y.markedSpans=ns(y.markedSpans,b),null==b.from&&this.collapsed&&!X(this.doc,y)&&e&&jn(y,We(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var S=0;S<this.lines.length;++S){var L=k(this.lines[S]),R=me(L);R>e.display.maxLineLength&&(e.display.maxLine=L,e.display.maxLineLength=R,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Wt(e,n,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ea(e.doc)),e&&Qt(e,"markerCleared",e,this,n,a),t&&Ms(e),this.parent&&this.parent.clear()}},fs.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,a=0;a<this.lines.length;++a){var d=this.lines[a],y=yr(d.markedSpans,this);if(null!=y.from&&(r=Ne(t?d:It(d),y.from),-1==e))return r;if(null!=y.to&&(n=Ne(t?d:It(d),y.to),1==e))return n}return r&&{from:r,to:n}},fs.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||xn(n,function(){var a=t.line,d=It(t.line),y=$s(n,d);if(y&&(vo(y),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!X(r.doc,a)&&null!=r.height){var b=r.height;r.height=null;var S=xs(r)-b;S&&jn(a,a.height+S)}Qt(n,"markerChanged",n,e)})},fs.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||-1==Le(t.maybeHiddenMarkers,this))&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},fs.prototype.detachLine=function(e){if(this.lines.splice(Le(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Mn(fs);var io=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function dl(e){return e.findMarks(Ne(e.first,0),e.clipPos(Ne(e.lastLine())),function(t){return t.parent})}function hl(e){for(var t=function(n){var a=e[n],d=[a.primary.doc];Xi(a.primary.doc,function(S){return d.push(S)});for(var y=0;y<a.markers.length;y++){var b=a.markers[y];-1==Le(d,b.doc)&&(b.parent=null,a.markers.splice(y--,1))}},r=0;r<e.length;r++)t(r)}io.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qt(this,"clear")}},io.prototype.find=function(e,t){return this.primary.find(e,t)},Mn(io);var fl=0,jr=function(e,t,r,n,a){if(!(this instanceof jr))return new jr(e,t,r,n,a);null==r&&(r=0),Oo.call(this,[new Yi([new U("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var d=Ne(r,0);this.sel=ds(d),this.history=new Jo(null),this.id=++fl,this.modeOption=t,this.lineSep=n,this.direction="rtl"==a?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Qo(this,{from:d,to:d,text:e}),dr(this,ds(d),ft)};jr.prototype=ze(Oo.prototype,{constructor:jr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ar(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Vn(function(e){var t=Ne(this.first,0),r=this.first+this.size-1;Is(this,{from:t,to:Ne(r,st(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&_o(this.cm,0,0),dr(this,ds(t),ft)}),replaceRange:function(e,t,r,n){hs(this,e,t=Ke(this,t),r=r?Ke(this,r):t,n)},getRange:function(e,t,r){var n=mr(this,Ke(this,e),Ke(this,t));return!1===r?n:n.join(""===r?"":r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Zr(this,e))return st(this,e)},getLineNumber:function(e){return It(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=st(this,e)),k(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ke(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:Vn(function(e,t,r){Za(this,Ke(this,"number"==typeof e?Ne(e,t||0):e),null,r)}),setSelection:Vn(function(e,t,r){Za(this,Ke(this,e),Ke(this,t||e),r)}),extendSelection:Vn(function(e,t,r){yi(this,Ke(this,e),t&&Ke(this,t),r)}),extendSelections:Vn(function(e,t){Ja(this,_r(this,e),t)}),extendSelectionsBy:Vn(function(e,t){Ja(this,_r(this,yt(this.sel.ranges,e)),t)}),setSelections:Vn(function(e,t,r){if(e.length){for(var n=[],a=0;a<e.length;a++)n[a]=new en(Ke(this,e[a].anchor),Ke(this,e[a].head||e[a].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),dr(this,_i(this.cm,n,t),r)}}),addSelection:Vn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new en(Ke(this,e),Ke(this,t||e))),dr(this,_i(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var r,t=this.sel.ranges,n=0;n<t.length;n++){var a=mr(this,t[n].from(),t[n].to());r=r?r.concat(a):a}return!1===e?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var a=mr(this,r[n].from(),r[n].to());!1!==e&&(a=a.join(e||this.lineSeparator())),t[n]=a}return t},replaceSelection:function(e,t,r){for(var n=[],a=0;a<this.sel.ranges.length;a++)n[a]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Vn(function(e,t,r){for(var n=[],a=this.sel,d=0;d<a.ranges.length;d++){var y=a.ranges[d];n[d]={from:y.from(),to:y.to(),text:this.splitLines(e[d]),origin:r}}for(var b=t&&"end"!=t&&function(e,t,r){for(var n=[],a=Ne(e.first,0),d=a,y=0;y<t.length;y++){var b=t[y],S=Ga(b.from,a,d),L=Ga(Gi(b),a,d);if(a=b.to,d=L,"around"==r){var R=e.sel.ranges[y],K=D(R.head,R.anchor)<0;n[y]=new en(K?L:S,K?S:L)}else n[y]=new en(S,S)}return new Vr(n,e.sel.primIndex)}(this,n,t),S=n.length-1;S>=0;S--)Is(this,n[S]);b?el(this,b):this.cm&&Qs(this.cm)}),undo:Vn(function(){ra(this,"undo")}),redo:Vn(function(){ra(this,"redo")}),undoSelection:Vn(function(){ra(this,"undo",!0)}),redoSelection:Vn(function(){ra(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var a=0;a<e.undone.length;a++)e.undone[a].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Jo(this.history),Xi(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:to(this.history.done),undone:to(this.history.undone)}},setHistory:function(e){var t=this.history=new Jo(this.history);t.done=to(e.done.slice(0),null,!0),t.undone=to(e.undone.slice(0),null,!0)},setGutterMarker:Vn(function(e,t,r){return ro(this,e,"gutter",function(n){var a=n.gutterMarkers||(n.gutterMarkers={});return a[t]=r,!r&&Pe(a)&&(n.gutterMarkers=null),!0})}),clearGutter:Vn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ro(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Pe(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!(Zr(this,e)&&(t=e,e=st(this,e))))return null}else if(null==(t=It(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:Vn(function(e,t,r){return ro(this,e,"gutter"==t?"gutter":"class",function(n){var a="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(n[a]){if(A(r).test(n[a]))return!1;n[a]+=" "+r}else n[a]=r;return!0})}),removeLineClass:Vn(function(e,t,r){return ro(this,e,"gutter"==t?"gutter":"class",function(n){var a="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",d=n[a];if(!d)return!1;if(null==r)n[a]=null;else{var y=d.match(A(r));if(!y)return!1;var b=y.index+y[0].length;n[a]=d.slice(0,y.index)+(y.index&&b!=d.length?" ":"")+d.slice(b)||null}return!0})}),addLineWidget:Vn(function(e,t,r){return function(e,t,r,n){var a=new Do(e,r,n),d=e.cm;return d&&a.noHScroll&&(d.display.alignWidgets=!0),ro(e,t,"widget",function(y){var b=y.widgets||(y.widgets=[]);if(null==a.insertAt?b.push(a):b.splice(Math.min(b.length,Math.max(0,a.insertAt)),0,a),a.line=y,d&&!X(e,y)){var S=ie(y)<e.scrollTop;jn(y,y.height+xs(a)),S&&fa(d,a.height),d.curOp.forceUpdate=!0}return!0}),d&&Qt(d,"lineWidgetAdded",d,a,"number"==typeof t?t:It(t)),a}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ji(this,Ke(this,e),Ke(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ji(this,e=Ke(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=st(this,(e=Ke(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var a=r[n];(null==a.from||a.from<=e.ch)&&(null==a.to||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,r){e=Ke(this,e),t=Ke(this,t);var n=[],a=e.line;return this.iter(e.line,t.line+1,function(d){var y=d.markedSpans;if(y)for(var b=0;b<y.length;b++){var S=y[b];!(null!=S.to&&a==e.line&&e.ch>=S.to||null==S.from&&a!=e.line||null!=S.from&&a==t.line&&S.from>=t.ch)&&(!r||r(S.marker))&&n.push(S.marker.parent||S.marker)}++a}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(a){var d=a.text.length+n;if(d>e)return t=e,!0;e-=d,++r}),Ke(this,Ne(r,t))},indexFromPos:function(e){var t=(e=Ke(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new jr(ar(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,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new jr(ar(this,t,r),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 r=0;r<t.length;r++){var n=t[r],a=n.find(),d=e.clipPos(a.from),y=e.clipPos(a.to);if(D(d,y)){var b=ji(e,d,y,n.primary,n.primary.type);n.markers.push(b),b.parent=n}}}(n,dl(this)),n},unlinkDoc:function(e){if(e instanceof ln&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),hl(dl(this));break}if(e.history==this.history){var n=[e.id];Xi(e,function(a){return n.push(a.id)},!0),e.history=new Jo(null),e.history.done=to(this.history.done,n),e.history.undone=to(this.history.undone,n)}},iterLinkedDocs:function(e){Xi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Hr(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Vn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&function(e){xn(e,function(){Va(e),Wt(e)})}(this.cm))})}),jr.prototype.eachLine=jr.prototype.iter;var pl=0;function so(e){var t=this;if(vl(t),!Tn(t,e)&&!fi(t.display,e)){Ut(e),pe&&(pl=+new Date);var r=Jt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var a=n.length,d=Array(a),y=0,b=function(){++y==a&&zn(t,function(){var ee={from:r=Ke(t.doc,r),to:r,text:t.doc.splitLines(d.filter(function(be){return null!=be}).join(t.doc.lineSeparator())),origin:"paste"};Is(t.doc,ee),el(t.doc,ds(Ke(t.doc,r),Ke(t.doc,Gi(ee))))})()},S=function(ee,be){if(t.options.allowDropFileTypes&&-1==Le(t.options.allowDropFileTypes,ee.type))b();else{var Ae=new FileReader;Ae.onerror=function(){return b()},Ae.onload=function(){var He=Ae.result;/[\x00-\x08\x0e-\x1f]{2}/.test(He)||(d[be]=He),b()},Ae.readAsText(ee)}},L=0;L<n.length;L++)S(n[L],L);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var R=e.dataTransfer.getData("Text");if(R){var K;if(t.state.draggingText&&!t.state.draggingText.copy&&(K=t.listSelections()),ta(t.doc,ds(r,r)),K)for(var se=0;se<K.length;++se)hs(t.doc,"",K[se].anchor,K[se].head,"drag");t.replaceSelection(R,"around","paste"),t.display.input.focus()}}catch(ee){}}}}function vl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ml(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var a=t[n].CodeMirror;a&&r.push(a)}r.length&&r[0].operation(function(){for(var d=0;d<r.length;d++)e(r[d])})}}var _l=!1;function zl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ps={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"},No=0;No<10;No++)ps[No+48]=ps[No+96]=String(No);for(var Mo=65;Mo<=90;Mo++)ps[Mo]=String.fromCharCode(Mo);for(var Vi=1;Vi<=12;Vi++)ps[Vi+111]=ps[Vi+63235]="F"+Vi;var si={};function ql(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,a,d,y=0;y<t.length-1;y++){var b=t[y];if(/^(cmd|meta|m)$/i.test(b))d=!0;else if(/^a(lt)?$/i.test(b))r=!0;else if(/^(c|ctrl|control)$/i.test(b))n=!0;else{if(!/^s(hift)?$/i.test(b))throw new Error("Unrecognized modifier name: "+b);a=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),d&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function yl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var a=yt(r.split(" "),ql),d=0;d<a.length;d++){var y=void 0,b=void 0;d==a.length-1?(b=a.join(" "),y=n):(b=a.slice(0,d+1).join(" "),y="...");var S=t[b];if(S){if(S!=y)throw new Error("Inconsistent bindings for "+b)}else t[b]=y}delete e[r]}for(var L in t)e[L]=t[L];return e}function ki(e,t,r,n){var a=(t=l(t)).call?t.call(e,n):t[e];if(!1===a)return"nothing";if("..."===a)return"multi";if(null!=a&&r(a))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ki(e,t.fallthrough,r,n);for(var d=0;d<t.fallthrough.length;d++){var y=ki(e,t.fallthrough[d],r,n);if(y)return y}}}function kl(e){var t="string"==typeof e?e:ps[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ja(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(g?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(g?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function w(e,t){if(oe&&34==e.keyCode&&e.char)return!1;var r=ps[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),ja(r,e,t))}function l(e){return"string"==typeof e?si[e]:e}function h(e,t){for(var r=e.doc.sel.ranges,n=[],a=0;a<r.length;a++){for(var d=t(r[a]);n.length&&D(d.from,we(n).to)<=0;){var y=n.pop();if(D(y.from,d.from)<0){d.from=y.from;break}}n.push(d)}xn(e,function(){for(var b=n.length-1;b>=0;b--)hs(e.doc,"",n[b].from,n[b].to,"+delete");Qs(e)})}function v(e,t,r){var n=Xt(e.text,t+r,r);return n<0||n>e.text.length?null:n}function C(e,t,r){var n=v(e,t.ch,r);return null==n?null:new Ne(t.line,n,r<0?"after":"before")}function P(e,t,r,n,a){if(e){"rtl"==t.doc.direction&&(a=-a);var d=Nn(r,t.doc.direction);if(d){var L,y=a<0?we(d):d[0],S=a<0==(1==y.level)?"after":"before";if(y.level>0||"rtl"==t.doc.direction){var R=qi(t,r),K=ni(t,R,L=a<0?r.text.length-1:0).top;L=gn(function(se){return ni(t,R,se).top==K},a<0==(1==y.level)?y.from:y.to-1,L),"before"==S&&(L=v(r,L,1))}else L=a<0?y.to:y.from;return new Ne(n,L,S)}}return new Ne(n,a<0?r.text.length:0,a<0?"before":"after")}si.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"},si.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"},si.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"},si.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"]},si.default=f?si.macDefault:si.pcDefault;var W={selectAll:nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ft)},killLine:function(e){return h(e,function(t){if(t.empty()){var r=st(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ne(t.head.line+1,0)}:{from:t.head,to:Ne(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return h(e,function(t){return{from:Ne(t.from().line,0),to:Ke(e.doc,Ne(t.to().line+1,0))}})},delLineLeft:function(e){return h(e,function(t){return{from:Ne(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return h(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return h(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"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(Ne(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ne(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return re(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ee(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=st(e.doc,t),n=function(e){for(var t;t=Vs(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=It(n)),P(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},_e)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},_e)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Ee(e,t.head):n},_e)},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=[],r=e.listSelections(),n=e.options.tabSize,a=0;a<r.length;a++){var d=r[a].from(),y=jt(e.getLine(d.line),d.ch,n);t.push(un(n-y%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return xn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var a=t[n].head,d=st(e.doc,a.line).text;if(d)if(a.ch==d.length&&(a=new Ne(a.line,a.ch-1)),a.ch>0)a=new Ne(a.line,a.ch+1),e.replaceRange(d.charAt(a.ch-1)+d.charAt(a.ch-2),Ne(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var y=st(e.doc,a.line-1).text;y&&(a=new Ne(a.line,1),e.replaceRange(d.charAt(0)+e.doc.lineSeparator()+y.charAt(y.length-1),Ne(a.line-1,y.length-1),a,"+transpose"))}r.push(new en(a,a))}e.setSelections(r)})},newlineAndIndent:function(e){return xn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Qs(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function re(e,t){var r=st(e.doc,t),n=k(r);return n!=r&&(t=It(n)),P(!0,e,n,t,1)}function Ee(e,t){var r=re(e,t.line),n=st(e.doc,r.line),a=Nn(n,e.doc.direction);if(!a||0==a[0].level){var d=Math.max(r.ch,n.text.search(/\S/));return Ne(r.line,t.line==r.line&&t.ch<=d&&t.ch?0:d,r.sticky)}return r}function Te(e,t,r){if("string"==typeof t&&!(t=W[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),a=t(e)!=ot}finally{e.display.shift=n,e.state.suppressEdits=!1}return a}var rt=new Tt;function Ye(e,t,r,n){var a=e.state.keySeq;if(a){if(kl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:rt.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),nt(e,a+" "+t,r,n))return!0}return nt(e,t,r,n)}function nt(e,t,r,n){var a=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var a=ki(t,e.state.keyMaps[n],r,e);if(a)return a}return e.options.extraKeys&&ki(t,e.options.extraKeys,r,e)||ki(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==a&&(e.state.keySeq=t),"handled"==a&&Qt(e,"keyHandled",e,t,r),("handled"==a||"multi"==a)&&(Ut(r),mo(e)),!!a}function at(e,t){var r=w(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?Ye(e,"Shift-"+r,t,function(n){return Te(e,n,!0)})||Ye(e,r,t,function(n){if("string"==typeof n?/^go[A-Z]/.test(n):n.motion)return Te(e,n)}):Ye(e,r,t,function(n){return Te(e,n)}))}var Nt=null;function At(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=ae(),Tn(t,e)))){pe&&xe<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=at(t,e);oe&&(Nt=n?r:null,!n&&88==r&&!Ti&&(f?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),De&&!f&&!n&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18==r&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&function(e){var t=e.display.lineDiv;function r(n){(18==n.keyCode||!n.altKey)&&(E(t,"CodeMirror-crosshair"),$t(document,"keyup",r),$t(document,"mouseover",r))}le(t,"CodeMirror-crosshair"),ut(document,"keyup",r),ut(document,"mouseover",r)}(t)}}function Mt(e){16==e.keyCode&&(this.doc.sel.shift=!1),Tn(this,e)}function Pt(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||fi(t.display,e)||Tn(t,e)||e.ctrlKey&&!e.altKey||f&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(oe&&r==Nt)return Nt=null,void Ut(e);if(!oe||e.which&&!(e.which<10)||!at(t,e)){var a=String.fromCharCode(null==n?r:n);"\b"!=a&&(function(e,t,r){return Ye(e,"'"+r+"'",t,function(n){return Te(e,n,!0)})}(t,e,a)||t.display.input.onKeyPress(e))}}}var rn,_n,dn=function(e,t,r){this.time=e,this.pos=t,this.button=r};function Lr(e){var t=this,r=t.display;if(!(Tn(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,fi(r,e))return void($||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!hr(t,e)){var n=Jt(t,e),a=Ji(e),d=n?function(e,t){var r=+new Date;return _n&&_n.compare(r,e,t)?(rn=_n=null,"triple"):rn&&rn.compare(r,e,t)?(_n=new dn(r,e,t),rn=null,"double"):(rn=new dn(r,e,t),_n=null,"single")}(n,a):"single";window.focus(),1==a&&t.state.selectingText&&t.state.selectingText(e),(!n||!function(e,t,r,n,a){var d="Click";return"double"==n?d="Double"+d:"triple"==n&&(d="Triple"+d),Ye(e,ja(d=(1==t?"Left":2==t?"Middle":"Right")+d,a),a,function(y){if("string"==typeof y&&(y=W[y]),!y)return!1;var b=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),b=y(e,r)!=ot}finally{e.state.suppressEdits=!1}return b})}(t,a,n,d,e))&&(1==a?n?function(e,t,r,n){pe?setTimeout(Ve(Da,e),0):e.curOp.focus=ae();var y,a=function(e,t,r){var n=e.getOption("configureMouse"),a=n?n(e,t,r):{};return null==a.unit&&(a.unit=(o?r.shiftKey&&r.metaKey:r.altKey)?"rectangle":"single"==t?"char":"double"==t?"word":"line"),(null==a.extend||e.doc.extend)&&(a.extend=e.doc.extend||r.shiftKey),null==a.addNew&&(a.addNew=f?r.metaKey:r.ctrlKey),null==a.moveOnDrag&&(a.moveOnDrag=!(f?r.altKey:r.ctrlKey)),a}(e,r,n),d=e.doc.sel;e.options.dragDrop&&Zi&&!e.isReadOnly()&&"single"==r&&(y=d.contains(t))>-1&&(D((y=d.ranges[y]).from(),t)<0||t.xRel>0)&&(D(y.to(),t)>0||t.xRel<0)?function(e,t,r,n){var a=e.display,d=!1,y=zn(e,function(L){$&&(a.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:da(e)),$t(a.wrapper.ownerDocument,"mouseup",y),$t(a.wrapper.ownerDocument,"mousemove",b),$t(a.scroller,"dragstart",S),$t(a.scroller,"drop",y),d||(Ut(L),n.addNew||yi(e.doc,r,null,null,n.extend),$&&!fe||pe&&9==xe?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),b=function(L){d=d||Math.abs(t.clientX-L.clientX)+Math.abs(t.clientY-L.clientY)>=10},S=function(){return d=!0};$&&(a.scroller.draggable=!0),e.state.draggingText=y,y.copy=!n.moveOnDrag,ut(a.wrapper.ownerDocument,"mouseup",y),ut(a.wrapper.ownerDocument,"mousemove",b),ut(a.scroller,"dragstart",S),ut(a.scroller,"drop",y),e.state.delayingBlurEvent=!0,setTimeout(function(){return a.input.focus()},20),a.scroller.dragDrop&&a.scroller.dragDrop()}(e,n,t,a):function(e,t,r,n){pe&&da(e);var a=e.display,d=e.doc;Ut(t);var y,b,S=d.sel,L=S.ranges;if(n.addNew&&!n.extend?y=(b=d.sel.contains(r))>-1?L[b]:new en(r,r):(y=d.sel.primary(),b=d.sel.primIndex),"rectangle"==n.unit)n.addNew||(y=new en(r,r)),r=Jt(e,t,!0,!0),b=-1;else{var R=gs(e,r,n.unit);y=n.extend?Sa(y,R.anchor,R.head,n.extend):R}n.addNew?-1==b?(b=L.length,dr(d,_i(e,L.concat([y]),b),{scroll:!1,origin:"*mouse"})):L.length>1&&L[b].empty()&&"char"==n.unit&&!n.extend?(dr(d,_i(e,L.slice(0,b).concat(L.slice(b+1)),0),{scroll:!1,origin:"*mouse"}),S=d.sel):Aa(d,b,y,_t):(b=0,dr(d,new Vr([y],0),_t),S=d.sel);var K=r;var ee=a.wrapper.getBoundingClientRect(),be=0;function Ae(Ue){var it=++be,kt=Jt(e,Ue,!0,"rectangle"==n.unit);if(kt)if(0!=D(kt,K)){e.curOp.focus=ae(),function(Ue){if(0!=D(K,Ue))if(K=Ue,"rectangle"==n.unit){for(var it=[],kt=e.options.tabSize,pt=jt(st(d,r.line).text,r.ch,kt),Ft=jt(st(d,Ue.line).text,Ue.ch,kt),yn=Math.min(pt,Ft),pr=Math.max(pt,Ft),Dn=Math.min(r.line,Ue.line),oi=Math.min(e.lastLine(),Math.max(r.line,Ue.line));Dn<=oi;Dn++){var $r=st(d,Dn).text,$n=Et($r,yn,kt);yn==pr?it.push(new en(Ne(Dn,$n),Ne(Dn,$n))):$r.length>$n&&it.push(new en(Ne(Dn,$n),Ne(Dn,Et($r,pr,kt))))}it.length||it.push(new en(r,r)),dr(d,_i(e,S.ranges.slice(0,b).concat(it),b),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ue)}else{var Qn,Qr=y,xr=gs(e,Ue,n.unit),nr=Qr.anchor;D(xr.anchor,nr)>0?(Qn=xr.head,nr=ct(Qr.from(),xr.anchor)):(Qn=xr.anchor,nr=Me(Qr.to(),xr.head));var In=S.ranges.slice(0);In[b]=function(e,t){var r=t.anchor,n=t.head,a=st(e.doc,r.line);if(0==D(r,n)&&r.sticky==n.sticky)return t;var d=Nn(a);if(!d)return t;var y=Rt(d,r.ch,r.sticky),b=d[y];if(b.from!=r.ch&&b.to!=r.ch)return t;var L,S=y+(b.from==r.ch==(1!=b.level)?0:1);if(0==S||S==d.length)return t;if(n.line!=r.line)L=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var R=Rt(d,n.ch,n.sticky),K=R-y||(n.ch-r.ch)*(1==b.level?-1:1);L=R==S-1||R==S?K<0:K>0}var se=d[S+(L?-1:0)],ee=L==(1==se.level),be=ee?se.from:se.to,Ae=ee?"after":"before";return r.ch==be&&r.sticky==Ae?t:new en(new Ne(r.line,be,Ae),n)}(e,new en(Ke(d,nr),Qn)),dr(d,_i(e,In,b),_t)}}(kt);var pt=Yo(a,d);(kt.line>=pt.to||kt.line<pt.from)&&setTimeout(zn(e,function(){be==it&&Ae(Ue)}),150)}else{var Ft=Ue.clientY<ee.top?-20:Ue.clientY>ee.bottom?20:0;Ft&&setTimeout(zn(e,function(){be==it&&(a.scroller.scrollTop+=Ft,Ae(Ue))}),50)}}function He(Ue){e.state.selectingText=!1,be=1/0,Ue&&(Ut(Ue),a.input.focus()),$t(a.wrapper.ownerDocument,"mousemove",qe),$t(a.wrapper.ownerDocument,"mouseup",Je),d.history.lastSelOrigin=null}var qe=zn(e,function(Ue){0!==Ue.buttons&&Ji(Ue)?Ae(Ue):He(Ue)}),Je=zn(e,He);e.state.selectingText=Je,ut(a.wrapper.ownerDocument,"mousemove",qe),ut(a.wrapper.ownerDocument,"mouseup",Je)}(e,n,t,a)}(t,n,d,e):Cr(e)==r.scroller&&Ut(e):2==a?(n&&yi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==a&&(m?t.display.input.onContextMenu(e):da(t)))}}}function gs(e,t,r){if("char"==r)return new en(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new en(Ne(t.line,0),Ke(e.doc,Ne(t.line+1,0)));var n=r(e,t);return new en(n.from,n.to)}function Di(e,t,r,n){var a,d;if(t.touches)a=t.touches[0].clientX,d=t.touches[0].clientY;else try{a=t.clientX,d=t.clientY}catch(se){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ut(t);var y=e.display,b=y.lineDiv.getBoundingClientRect();if(d>b.bottom||!tn(e,r))return Un(t);d-=b.top-y.viewOffset;for(var S=0;S<e.display.gutterSpecs.length;++S){var L=y.gutters.childNodes[S];if(L&&L.getBoundingClientRect().right>=a)return vt(e,r,e,Kn(e.doc,d),e.display.gutterSpecs[S].className,t),Un(t)}}function hr(e,t){return Di(e,t,"gutterClick",!0)}function fr(e,t){fi(e.display,t)||function(e,t){return!!tn(e,"gutterContextMenu")&&Di(e,t,"gutterContextMenu",!1)}(e,t)||Tn(e,t,"contextmenu")||m||e.display.input.onContextMenu(t)}function Qi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ts(e)}dn.prototype.compare=function(e,t,r){return this.time+400>e&&0==D(t,this.pos)&&r==this.button};var Ir={toString:function(){return"CodeMirror.Init"}},Rs={},Ws={};function ao(e,t,r){if(!t!=!(r&&r!=Ir)){var a=e.display.dragFunctions,d=t?ut:$t;d(e.display.scroller,"dragstart",a.start),d(e.display.scroller,"dragenter",a.enter),d(e.display.scroller,"dragover",a.over),d(e.display.scroller,"dragleave",a.leave),d(e.display.scroller,"drop",a.drop)}}function Po(e){e.options.lineWrapping?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Oe(e)),Lt(e),Wt(e),Ts(e),setTimeout(function(){return Ns(e)},100)}function ln(e,t){var r=this;if(!(this instanceof ln))return new ln(e,t);this.options=t=t?Ge(t):{},Ge(Rs,t,!1);var n=t.value;"string"==typeof n?n=new jr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var a=new ln.inputStyles[t.inputStyle](this),d=this.display=new Ps(e,n,a,t);for(var y in d.wrapper.CodeMirror=this,Qi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 Tt,keySeq:null,specialChars:null},t.autofocus&&!i&&d.input.focus(),pe&&xe<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;ut(t.scroller,"mousedown",zn(e,Lr)),ut(t.scroller,"dblclick",pe&&xe<11?zn(e,function(S){if(!Tn(e,S)){var L=Jt(e,S);if(L&&!hr(e,S)&&!fi(e.display,S)){Ut(S);var R=e.findWordAt(L);yi(e.doc,R.anchor,R.head)}}}):function(S){return Tn(e,S)||Ut(S)}),ut(t.scroller,"contextmenu",function(S){return fr(e,S)}),ut(t.input.getField(),"contextmenu",function(S){t.scroller.contains(S.target)||fr(e,S)});var r,n={end:0};function a(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function y(S,L){if(null==L.left)return!0;var R=L.left-S.left,K=L.top-S.top;return R*R+K*K>400}ut(t.scroller,"touchstart",function(S){if(!Tn(e,S)&&!function(S){if(1!=S.touches.length)return!1;var L=S.touches[0];return L.radiusX<=1&&L.radiusY<=1}(S)&&!hr(e,S)){t.input.ensurePolled(),clearTimeout(r);var L=+new Date;t.activeTouch={start:L,moved:!1,prev:L-n.end<=300?n:null},1==S.touches.length&&(t.activeTouch.left=S.touches[0].pageX,t.activeTouch.top=S.touches[0].pageY)}}),ut(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ut(t.scroller,"touchend",function(S){var L=t.activeTouch;if(L&&!fi(t,S)&&null!=L.left&&!L.moved&&new Date-L.start<300){var K,R=e.coordsChar(t.activeTouch,"page");K=!L.prev||y(L,L.prev)?new en(R,R):!L.prev.prev||y(L,L.prev.prev)?e.findWordAt(R):new en(Ne(R.line,0),Ke(e.doc,Ne(R.line+1,0))),e.setSelection(K.anchor,K.head),e.focus(),Ut(S)}a()}),ut(t.scroller,"touchcancel",a),ut(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ls(e,t.scroller.scrollTop),Os(e,t.scroller.scrollLeft,!0),vt(e,"scroll",e))}),ut(t.scroller,"mousewheel",function(S){return wa(e,S)}),ut(t.scroller,"DOMMouseScroll",function(S){return wa(e,S)}),ut(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(S){Tn(e,S)||Pn(S)},over:function(S){Tn(e,S)||(function(e,t){var r=Jt(e,t);if(r){var n=document.createDocumentFragment();us(e,r,n),e.display.dragCursor||(e.display.dragCursor=M("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,n)}}(e,S),Pn(S))},start:function(S){return function(e,t){if(pe&&(!e.state.draggingText||+new Date-pl<100))Pn(t);else if(!Tn(e,t)&&!fi(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fe)){var r=M("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",oe&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),oe&&r.parentNode.removeChild(r)}}(e,S)},drop:zn(e,so),leave:function(S){Tn(e,S)||vl(e)}};var b=t.input.getField();ut(b,"keyup",function(S){return Mt.call(e,S)}),ut(b,"keydown",zn(e,At)),ut(b,"keypress",zn(e,Pt)),ut(b,"focus",function(S){return js(e,S)}),ut(b,"blur",function(S){return cs(e,S)})}(this),_l||(function(){var e;ut(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,ml(zl)},100))}),ut(window,"blur",function(){return ml(cs)})}(),_l=!0),Ai(this),this.curOp.forceUpdate=!0,Ya(this,n),t.autofocus&&!i||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&js(r)},20):cs(this),Ws)Ws.hasOwnProperty(y)&&Ws[y](this,t[y],Ir);ya(this),t.finishInit&&t.finishInit(this);for(var b=0;b<bi.length;++b)bi[b](this);Ms(this),$&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(d.lineDiv).textRendering&&(d.lineDiv.style.textRendering="auto")}ln.defaults=Rs,ln.optionHandlers=Ws;var bi=[];function vs(e,t,r,n){var d,a=e.doc;null==r&&(r="add"),"smart"==r&&(a.mode.indent?d=ts(e,t).state:r="prev");var y=e.options.tabSize,b=st(a,t),S=jt(b.text,null,y);b.stateAfter&&(b.stateAfter=null);var R,L=b.text.match(/^\s*/)[0];if(n||/\S/.test(b.text)){if("smart"==r&&((R=a.mode.indent(d,b.text.slice(L.length),b.text))==ot||R>150)){if(!n)return;r="prev"}}else R=0,r="not";"prev"==r?R=t>a.first?jt(st(a,t-1).text,null,y):0:"add"==r?R=S+e.options.indentUnit:"subtract"==r?R=S-e.options.indentUnit:"number"==typeof r&&(R=S+r),R=Math.max(0,R);var K="",se=0;if(e.options.indentWithTabs)for(var ee=Math.floor(R/y);ee;--ee)se+=y,K+="\t";if(se<R&&(K+=un(R-se)),K!=L)return hs(a,K,Ne(t,0),Ne(t,L.length),"+input"),b.stateAfter=null,!0;for(var be=0;be<a.sel.ranges.length;be++){var Ae=a.sel.ranges[be];if(Ae.head.line==t&&Ae.head.ch<L.length){var He=Ne(t,L.length);Aa(a,be,new en(He,He));break}}}ln.defineInitHook=function(e){return bi.push(e)};var xi=null;function zs(e){xi=e}function sa(e,t,r,n,a){var d=e.doc;e.display.shift=!1,n||(n=d.sel);var y=+new Date-200,b="paste"==a||e.state.pasteIncoming>y,S=Hr(t),L=null;if(b&&n.ranges.length>1)if(xi&&xi.text.join("\n")==t){if(n.ranges.length%xi.text.length==0){L=[];for(var R=0;R<xi.text.length;R++)L.push(d.splitLines(xi.text[R]))}}else S.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(L=yt(S,function(qe){return[qe]}));for(var K=e.curOp.updateInput,se=n.ranges.length-1;se>=0;se--){var ee=n.ranges[se],be=ee.from(),Ae=ee.to();ee.empty()&&(r&&r>0?be=Ne(be.line,be.ch-r):e.state.overwrite&&!b?Ae=Ne(Ae.line,Math.min(st(d,Ae.line).text.length,Ae.ch+we(S).length)):b&&xi&&xi.lineWise&&xi.text.join("\n")==S.join("\n")&&(be=Ae=Ne(be.line,0)));var He={from:be,to:Ae,text:L?L[se%L.length]:S,origin:a||(b?"paste":e.state.cutIncoming>y?"cut":"+input")};Is(e.doc,He),Qt(e,"inputRead",e,He)}t&&!b&&Oa(e,t),Qs(e),e.curOp.updateInput<2&&(e.curOp.updateInput=K),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function La(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&xn(t,function(){return sa(t,r,0,null,"paste")}),!0}function Oa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var a=r.ranges[n];if(!(a.head.ch>100||n&&r.ranges[n-1].head.line==a.head.line)){var d=e.getModeAt(a.head),y=!1;if(d.electricChars){for(var b=0;b<d.electricChars.length;b++)if(t.indexOf(d.electricChars.charAt(b))>-1){y=vs(e,a.head.line,"smart");break}}else d.electricInput&&d.electricInput.test(st(e.doc,a.head.line).text.slice(0,a.head.ch))&&(y=vs(e,a.head.line,"smart"));y&&Qt(e,"electricInput",e,a.head.line)}}}function Xl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var a=e.doc.sel.ranges[n].head.line,d={anchor:Ne(a,0),head:Ne(a+1,0)};r.push(d),t.push(e.getRange(d.anchor,d.head))}return{text:t,ranges:r}}function Yl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Vl(){var e=M("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=M("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return $?e.style.width="1000px":e.setAttribute("wrap","off"),ke&&(e.style.border="1px solid black"),Yl(e),t}function Ul(e,t,r,n,a){var d=t,y=r,b=st(e,t.line),S=a&&"rtl"==e.direction?-r:r;function R(Je){var Ue;if("codepoint"==n){var it=b.text.charCodeAt(t.ch+(r>0?0:-1));Ue=isNaN(it)?null:new Ne(t.line,Math.max(0,Math.min(b.text.length,t.ch+r*((r>0?it>=55296&&it<56320:it>=56320&&it<57343)?2:1))),-r)}else Ue=a?function(e,t,r,n){var a=Nn(t,e.doc.direction);if(!a)return C(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var d=Rt(a,r.ch,r.sticky),y=a[d];if("ltr"==e.doc.direction&&y.level%2==0&&(n>0?y.to>r.ch:y.from<r.ch))return C(t,r,n);var S,b=function(qe,Je){return v(t,qe instanceof Ne?qe.ch:qe,Je)},L=function(qe){return e.options.lineWrapping?(S=S||qi(e,t),Y(e,t,S,qe)):{begin:0,end:t.text.length}},R=L("before"==r.sticky?b(r,-1):r.ch);if("rtl"==e.doc.direction||1==y.level){var K=1==y.level==n<0,se=b(r,K?1:-1);if(null!=se&&(K?se<=y.to&&se<=R.end:se>=y.from&&se>=R.begin))return new Ne(r.line,se,K?"before":"after")}var be=function(qe,Je,Ue){for(;qe>=0&&qe<a.length;qe+=Je){var kt=a[qe],pt=Je>0==(1!=kt.level),Ft=pt?Ue.begin:b(Ue.end,-1);if(kt.from<=Ft&&Ft<kt.to||(Ft=pt?kt.from:b(kt.to,-1),Ue.begin<=Ft&&Ft<Ue.end))return yn=Ft,pt?new Ne(r.line,b(yn,1),"before"):new Ne(r.line,yn,"after")}var yn},Ae=be(d+n,n,R);if(Ae)return Ae;var He=n>0?R.end:b(R.begin,-1);return null==He||n>0&&He==t.text.length||!(Ae=be(n>0?0:a.length-1,n,L(He)))?null:Ae}(e.cm,b,t,r):C(b,t,r);if(null==Ue){if(Je||!function(){var Je=t.line+S;return!(Je<e.first||Je>=e.first+e.size)&&(t=new Ne(Je,t.ch,t.sticky),b=st(e,Je))}())return!1;t=P(a,e.cm,b,t.line,S)}else t=Ue;return!0}if("char"==n||"codepoint"==n)R();else if("column"==n)R(!0);else if("word"==n||"group"==n)for(var K=null,se="group"==n,ee=e.cm&&e.cm.getHelper(t,"wordChars"),be=!0;!(r<0)||R(!be);be=!1){var Ae=b.text.charAt(t.ch)||"\n",He=de(Ae,ee)?"w":se&&"\n"==Ae?"n":!se||/\s/.test(Ae)?null:"p";if(se&&!be&&!He&&(He="s"),K&&K!=He){r<0&&(r=1,R(),t.sticky="after");break}if(He&&(K=He),r>0&&!R(!be))break}var qe=na(e,t,d,y,!0);return q(d,qe)&&(qe.hitSide=!0),qe}function $l(e,t,r,n){var y,L,a=e.doc,d=t.left;if("page"==n){var b=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),S=Math.max(b-.5*We(e.display),3);y=(r>0?t.bottom:t.top)+r*S}else"line"==n&&(y=r>0?t.bottom+3:t.top-3);for(;(L=Es(e,d,y)).outside;){if(r<0?y<=0:y>=a.height){L.hitSide=!0;break}y+=5*r}return L}var hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Tt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ql(e,t){var r=$s(e,t.line);if(!r||r.hidden)return null;var n=st(e.doc,t.line),a=ti(r,n,t.line),d=Nn(n,e.doc.direction),y="left";d&&(y=Rt(d,t.ch)%2?"right":"left");var S=Cs(a.map,t.ch,y);return S.offset="right"==S.collapse?S.end:S.start,S}function oa(e,t){return t&&(e.bad=!0),e}function wl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return oa(e.clipPos(Ne(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var a=0;a<e.display.view.length;a++){var d=e.display.view[a];if(d.node==n)return ru(d,t,r)}}function ru(e,t,r){var n=e.text.firstChild,a=!1;if(!t||!Q(n,t))return oa(Ne(It(e.line),0),!0);if(t==n&&(a=!0,t=n.childNodes[r],r=0,!t)){var d=e.rest?we(e.rest):e.line;return oa(Ne(It(d),d.text.length),a)}var y=3==t.nodeType?t:null,b=t;for(!y&&1==t.childNodes.length&&3==t.firstChild.nodeType&&(y=t.firstChild,r&&(r=y.nodeValue.length));b.parentNode!=n;)b=b.parentNode;var S=e.measure,L=S.maps;function R(He,qe,Je){for(var Ue=-1;Ue<(L?L.length:0);Ue++)for(var it=Ue<0?S.map:L[Ue],kt=0;kt<it.length;kt+=3){var pt=it[kt+2];if(pt==He||pt==qe){var Ft=It(Ue<0?e.line:e.rest[Ue]),yn=it[kt]+Je;return(Je<0||pt!=He)&&(yn=it[kt+(Je?1:0)]),Ne(Ft,yn)}}}var K=R(y,b,r);if(K)return oa(K,a);for(var se=b.nextSibling,ee=y?y.nodeValue.length-r:0;se;se=se.nextSibling){if(K=R(se,se.firstChild,0))return oa(Ne(K.line,K.ch-ee),a);ee+=se.textContent.length}for(var be=b.previousSibling,Ae=r;be;be=be.previousSibling){if(K=R(be,be.firstChild,-1))return oa(Ne(K.line,K.ch+Ae),a);Ae+=be.textContent.length}}hn.prototype.init=function(e){var t=this,r=this,n=r.cm,a=r.div=e.lineDiv;function d(b){for(var S=b.target;S;S=S.parentNode){if(S==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(S.className))break}return!1}function y(b){if(d(b)&&!Tn(n,b)){if(n.somethingSelected())zs({lineWise:!1,text:n.getSelections()}),"cut"==b.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var S=Xl(n);zs({lineWise:!0,text:S.text}),"cut"==b.type&&n.operation(function(){n.setSelections(S.ranges,0,ft),n.replaceSelection("",null,"cut")})}if(b.clipboardData){b.clipboardData.clearData();var L=xi.text.join("\n");if(b.clipboardData.setData("Text",L),b.clipboardData.getData("Text")==L)return void b.preventDefault()}var R=Vl(),K=R.firstChild;n.display.lineSpace.insertBefore(R,n.display.lineSpace.firstChild),K.value=xi.text.join("\n");var se=ae();et(K),setTimeout(function(){n.display.lineSpace.removeChild(R),se.focus(),se==a&&r.showPrimarySelection()},50)}}a.contentEditable=!0,Yl(a,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),ut(a,"paste",function(b){!d(b)||Tn(n,b)||La(b,n)||xe<=11&&setTimeout(zn(n,function(){return t.updateFromDOM()}),20)}),ut(a,"compositionstart",function(b){t.composing={data:b.data,done:!1}}),ut(a,"compositionupdate",function(b){t.composing||(t.composing={data:b.data,done:!1})}),ut(a,"compositionend",function(b){t.composing&&(b.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ut(a,"touchstart",function(){return r.forceCompositionEnd()}),ut(a,"input",function(){t.composing||t.readFromDOMSoon()}),ut(a,"copy",y),ut(a,"cut",y)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Pr(this.cm,!1);return e.focus=ae()==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||a.line<t.display.viewFrom)e.removeAllRanges();else{var d=wl(t,e.anchorNode,e.anchorOffset),y=wl(t,e.focusNode,e.focusOffset);if(!d||d.bad||!y||y.bad||0!=D(ct(d,y),n)||0!=D(Me(d,y),a)){var b=t.display.view,S=n.line>=t.display.viewFrom&&Ql(t,n)||{node:b[0].measure.map[2],offset:0},L=a.line<t.display.viewTo&&Ql(t,a);if(!L){var R=b[b.length-1].measure,K=R.maps?R.maps[R.maps.length-1]:R.map;L={node:K[K.length-1],offset:K[K.length-2]-K[K.length-3]}}if(!S||!L)return void e.removeAllRanges();var ee,se=e.rangeCount&&e.getRangeAt(0);try{ee=te(S.node,S.offset,L.offset,L.node)}catch(be){}ee&&(!De&&t.state.focused?(e.collapse(S.node,S.offset),ee.collapsed||(e.removeAllRanges(),e.addRange(ee))):(e.removeAllRanges(),e.addRange(ee)),se&&null==e.anchorNode?e.addRange(se):De&&this.startGracePeriod()),this.rememberSelection()}}},hn.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)},hn.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Q(this.div,t)},hn.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&((!this.selectionInEditor()||ae()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):xn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))})},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(G&&Z&&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 r=wl(t,e.anchorNode,e.anchorOffset),n=wl(t,e.focusNode,e.focusOffset);r&&n&&xn(t,function(){dr(t.doc,ds(r,n),ft),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},hn.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var d,y,b,e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),a=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=Ne(n.line-1,st(e.doc,n.line-1).length)),a.ch==st(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=Ne(a.line+1,0)),n.line<t.viewFrom||a.line>t.viewTo-1)return!1;n.line==t.viewFrom||0==(d=xt(e,n.line))?(y=It(t.view[0].line),b=t.view[0].node):(y=It(t.view[d].line),b=t.view[d-1].node.nextSibling);var L,R,S=xt(e,a.line);if(S==t.view.length-1?(L=t.viewTo-1,R=t.lineDiv.lastChild):(L=It(t.view[S+1].line)-1,R=t.view[S+1].node.previousSibling),!b)return!1;for(var K=e.doc.splitLines(function(e,t,r,n,a){var d="",y=!1,b=e.doc.lineSeparator(),S=!1;function R(){y&&(d+=b,S&&(d+=b),y=S=!1)}function K(ee){ee&&(R(),d+=ee)}function se(ee){if(1==ee.nodeType){var be=ee.getAttribute("cm-text");if(be)return void K(be);var He,Ae=ee.getAttribute("cm-marker");if(Ae){var qe=e.findMarks(Ne(n,0),Ne(a+1,0),function(ee){return function(be){return be.id==ee}}(+Ae));return void(qe.length&&(He=qe[0].find(0))&&K(mr(e.doc,He.from,He.to).join(b)))}if("false"==ee.getAttribute("contenteditable"))return;var Je=/^(pre|div|p|li|table|br)$/i.test(ee.nodeName);if(!/^br$/i.test(ee.nodeName)&&0==ee.textContent.length)return;Je&&R();for(var Ue=0;Ue<ee.childNodes.length;Ue++)se(ee.childNodes[Ue]);/^(pre|p)$/i.test(ee.nodeName)&&(S=!0),Je&&(y=!0)}else 3==ee.nodeType&&K(ee.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;se(t),t!=r;)t=t.nextSibling,S=!1;return d}(e,b,R,y,L)),se=mr(e.doc,Ne(y,0),Ne(L,st(e.doc,L).text.length));K.length>1&&se.length>1;)if(we(K)==we(se))K.pop(),se.pop(),L--;else{if(K[0]!=se[0])break;K.shift(),se.shift(),y++}for(var ee=0,be=0,Ae=K[0],He=se[0],qe=Math.min(Ae.length,He.length);ee<qe&&Ae.charCodeAt(ee)==He.charCodeAt(ee);)++ee;for(var Je=we(K),Ue=we(se),it=Math.min(Je.length-(1==K.length?ee:0),Ue.length-(1==se.length?ee:0));be<it&&Je.charCodeAt(Je.length-be-1)==Ue.charCodeAt(Ue.length-be-1);)++be;if(1==K.length&&1==se.length&&y==n.line)for(;ee&&ee>n.ch&&Je.charCodeAt(Je.length-be-1)==Ue.charCodeAt(Ue.length-be-1);)ee--,be++;K[K.length-1]=Je.slice(0,Je.length-be).replace(/^\u200b+/,""),K[0]=K[0].slice(ee).replace(/\u200b+$/,"");var kt=Ne(y,ee),pt=Ne(L,se.length?we(se).length-be:0);return K.length>1||K[0]||D(kt,pt)?(hs(e.doc,K,kt,pt,"+input"),!0):void 0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},hn.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))},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&xn(this.cm,function(){return Wt(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||zn(this.cm,sa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;var qn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Tt,this.hasSelection=!1,this.composing=null};qn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var a=this.textarea;function d(y){if(!Tn(n,y)){if(n.somethingSelected())zs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var b=Xl(n);zs({lineWise:!0,text:b.text}),"cut"==y.type?n.setSelections(b.ranges,null,ft):(r.prevInput="",a.value=b.text.join("\n"),et(a))}"cut"==y.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),ke&&(a.style.width="0px"),ut(a,"input",function(){pe&&xe>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ut(a,"paste",function(y){Tn(n,y)||La(y,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())}),ut(a,"cut",d),ut(a,"copy",d),ut(e.scroller,"paste",function(y){if(!fi(e,y)&&!Tn(n,y)){if(!a.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var b=new Event("paste");b.clipboardData=y.clipboardData,a.dispatchEvent(b)}}),ut(e.lineSpace,"selectstart",function(y){fi(e,y)||Ut(y)}),ut(a,"compositionstart",function(){var y=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:y,range:n.markText(y,n.getCursor("to"),{className:"CodeMirror-composing"})}}),ut(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},qn.prototype.createField=function(e){this.wrapper=Vl(),this.textarea=this.wrapper.firstChild},qn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},qn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Pr(e);if(e.options.moveInputWithCursor){var a=Er(e,r.sel.primary().head,"div"),d=t.wrapper.getBoundingClientRect(),y=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+y.top-d.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+y.left-d.left))}return n},qn.prototype.showSelection=function(e){var r=this.cm.display;j(r.cursorDiv,e.cursors),j(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qn.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&et(this.textarea),pe&&xe>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",pe&&xe>=9&&(this.hasSelection=null))}},qn.prototype.getField=function(){return this.textarea},qn.prototype.supportsTouch=function(){return!1},qn.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!i||ae()!=this.textarea))try{this.textarea.focus()}catch(e){}},qn.prototype.blur=function(){this.textarea.blur()},qn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qn.prototype.receivedFocus=function(){this.slowPoll()},qn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},qn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},qn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ai(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=r.value;if(a==n&&!t.somethingSelected())return!1;if(pe&&xe>=9&&this.hasSelection===a||f&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var d=a.charCodeAt(0);if(8203==d&&!n&&(n="\u200b"),8666==d)return this.reset(),this.cm.execCommand("undo")}for(var y=0,b=Math.min(n.length,a.length);y<b&&n.charCodeAt(y)==a.charCodeAt(y);)++y;return xn(t,function(){sa(t,a.slice(y),n.length-y,null,e.composing?"*compose":null),a.length>1e3||a.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},qn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qn.prototype.onKeyPress=function(){pe&&xe>=9&&(this.hasSelection=null),this.fastPoll()},qn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var d=Jt(r,e),y=n.scroller.scrollTop;if(d&&!oe){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(d)&&zn(r,dr)(r.doc,ds(d),ft);var K,S=a.style.cssText,L=t.wrapper.style.cssText,R=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",a.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-R.top-5)+"px; left: "+(e.clientX-R.left-5)+"px;\n      z-index: 1000; background: "+(pe?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",$&&(K=window.scrollY),n.input.focus(),$&&window.scrollTo(null,K),n.input.reset(),r.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=ee,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),pe&&xe>=9&&se(),m){Pn(e);var be=function(){$t(window,"mouseup",be),setTimeout(ee,20)};ut(window,"mouseup",be)}else setTimeout(ee,50)}function se(){if(null!=a.selectionStart){var Ae=r.somethingSelected(),He="\u200b"+(Ae?a.value:"");a.value="\u21da",a.value=He,t.prevInput=Ae?"":"\u200b",a.selectionStart=1,a.selectionEnd=He.length,n.selForContextMenu=r.doc.sel}}function ee(){if(t.contextMenuPending==ee&&(t.contextMenuPending=!1,t.wrapper.style.cssText=L,a.style.cssText=S,pe&&xe<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=y),null!=a.selectionStart)){(!pe||pe&&xe<9)&&se();var Ae=0,He=function(){n.selForContextMenu==r.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"\u200b"==t.prevInput?zn(r,nl)(r):Ae++<10?n.detectingSelectAll=setTimeout(He,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(He,200)}}},qn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},qn.prototype.setUneditable=function(){},qn.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(n,a,d,y){e.defaults[n]=a,d&&(t[n]=y?function(b,S,L){L!=Ir&&d(b,S,L)}:d)}e.defineOption=r,e.Init=Ir,r("value","",function(n,a){return n.setValue(a)},!0),r("mode",null,function(n,a){n.doc.modeOption=a,ba(n)},!0),r("indentUnit",2,ba,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){To(n),Ts(n),Wt(n)},!0),r("lineSeparator",null,function(n,a){if(n.doc.lineSep=a,a){var d=[],y=n.doc.first;n.doc.iter(function(S){for(var L=0;;){var R=S.text.indexOf(a,L);if(-1==R)break;L=R+a.length,d.push(Ne(y,R))}y++});for(var b=d.length-1;b>=0;b--)hs(n.doc,a,d[b],Ne(d[b].line,d[b].ch+a.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,a,d){n.state.specialChars=new RegExp(a.source+(a.test("\t")?"":"|\t"),"g"),d!=Ir&&n.refresh()}),r("specialCharPlaceholder",Ar,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",i?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,a){return n.getInputField().spellcheck=a},!0),r("autocorrect",!1,function(n,a){return n.getInputField().autocorrect=a},!0),r("autocapitalize",!1,function(n,a){return n.getInputField().autocapitalize=a},!0),r("rtlMoveVisually",!c),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Qi(n),xo(n)},!0),r("keyMap","default",function(n,a,d){var y=l(a),b=d!=Ir&&l(d);b&&b.detach&&b.detach(n,y),y.attach&&y.attach(n,b||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Po,!0),r("gutters",[],function(n,a){n.display.gutterSpecs=bo(a,n.options.lineNumbers),xo(n)},!0),r("fixedGutter",!0,function(n,a){n.display.gutters.style.left=a?mt(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ns(n)},!0),r("scrollbarStyle","native",function(n){Fa(n),Ns(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,a){n.display.gutterSpecs=bo(n.options.gutters,a),xo(n)},!0),r("firstLineNumber",1,xo,!0),r("lineNumberFormatter",function(n){return n},xo,!0),r("showCursorWhenSelecting",!1,mn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,a){"nocursor"==a&&(cs(n),n.display.input.blur()),n.display.input.readOnlyChanged(a)}),r("screenReaderLabel",null,function(n,a){n.display.input.screenReaderLabelChanged(a=""===a?null:a)}),r("disableInput",!1,function(n,a){a||n.display.input.reset()},!0),r("dragDrop",!0,ao),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,mn,!0),r("singleCursorHeightPerLine",!0,mn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,To,!0),r("addModeClass",!1,To,!0),r("pollInterval",100),r("undoDepth",200,function(n,a){return n.doc.history.undoDepth=a}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,To,!0),r("moveInputWithCursor",!0,function(n,a){a||n.display.input.resetPosition()}),r("tabindex",null,function(n,a){return n.display.input.getField().tabIndex=a||""}),r("autofocus",null),r("direction","ltr",function(n,a){return n.doc.setDirection(a)},!0),r("phrases",null)}(ln),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,a){var d=this.options,y=d[n];d[n]==a&&"mode"!=n||(d[n]=a,t.hasOwnProperty(n)&&zn(this,t[n])(this,a,y),vt(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,a){this.state.keyMaps[a?"push":"unshift"](l(n))},removeKeyMap:function(n){for(var a=this.state.keyMaps,d=0;d<a.length;++d)if(a[d]==n||a[d].name==n)return a.splice(d,1),!0},addOverlay:cr(function(n,a){var d=n.token?n:e.getMode(this.options,n);if(d.startState)throw new Error("Overlays may not be stateful.");(function(e,t,r){for(var n=0,a=r(t);n<e.length&&r(e[n])<=a;)n++;e.splice(n,0,t)})(this.state.overlays,{mode:d,modeSpec:n,opaque:a&&a.opaque,priority:a&&a.priority||0},function(y){return y.priority}),this.state.modeGen++,Wt(this)}),removeOverlay:cr(function(n){for(var a=this.state.overlays,d=0;d<a.length;++d){var y=a[d].modeSpec;if(y==n||"string"==typeof n&&y.name==n)return a.splice(d,1),this.state.modeGen++,void Wt(this)}}),indentLine:cr(function(n,a,d){"string"!=typeof a&&"number"!=typeof a&&(a=null==a?this.options.smartIndent?"smart":"prev":a?"add":"subtract"),Zr(this.doc,n)&&vs(this,n,a,d)}),indentSelection:cr(function(n){for(var a=this.doc.sel.ranges,d=-1,y=0;y<a.length;y++){var b=a[y];if(b.empty())b.head.line>d&&(vs(this,b.head.line,n,!0),d=b.head.line,y==this.doc.sel.primIndex&&Qs(this));else{var S=b.from(),L=b.to(),R=Math.max(d,S.line);d=Math.min(this.lastLine(),L.line-(L.ch?0:1))+1;for(var K=R;K<d;++K)vs(this,K,n);var se=this.doc.sel.ranges;0==S.ch&&a.length==se.length&&se[y].from().ch>0&&Aa(this.doc,y,new en(S,se[y].to()),ft)}}}),getTokenAt:function(n,a){return Ro(this,n,a)},getLineTokens:function(n,a){return Ro(this,Ne(n),a,!0)},getTokenTypeAt:function(n){n=Ke(this.doc,n);var S,a=Ho(this,st(this.doc,n.line)),d=0,y=(a.length-1)/2,b=n.ch;if(0==b)S=a[2];else for(;;){var L=d+y>>1;if((L?a[2*L-1]:0)>=b)y=L;else{if(!(a[2*L+1]<b)){S=a[2*L+2];break}d=L+1}}var R=S?S.indexOf("overlay "):-1;return R<0?S:0==R?null:S.slice(0,R-1)},getModeAt:function(n){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(n).state).mode:a},getHelper:function(n,a){return this.getHelpers(n,a)[0]},getHelpers:function(n,a){var d=[];if(!r.hasOwnProperty(a))return d;var y=r[a],b=this.getModeAt(n);if("string"==typeof b[a])y[b[a]]&&d.push(y[b[a]]);else if(b[a])for(var S=0;S<b[a].length;S++){var L=y[b[a][S]];L&&d.push(L)}else b.helperType&&y[b.helperType]?d.push(y[b.helperType]):y[b.name]&&d.push(y[b.name]);for(var R=0;R<y._global.length;R++){var K=y._global[R];K.pred(b,this)&&-1==Le(d,K.val)&&d.push(K.val)}return d},getStateAfter:function(n,a){var d=this.doc;return ts(this,(n=Ot(d,null==n?d.first+d.size-1:n))+1,a).state},cursorCoords:function(n,a){var y=this.doc.sel.primary();return Er(this,null==n?y.head:"object"==typeof n?Ke(this.doc,n):n?y.from():y.to(),a||"page")},charCoords:function(n,a){return Ui(this,Ke(this.doc,n),a||"page")},coordsChar:function(n,a){return Es(this,(n=ls(this,n,a||"page")).left,n.top)},lineAtHeight:function(n,a){return n=ls(this,{top:n,left:0},a||"page").top,Kn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,a,d){var b,y=!1;if("number"==typeof n){var S=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>S&&(n=S,y=!0),b=st(this.doc,n)}else b=n;return mi(this,b,{top:0,left:0},a||"page",d||y).top+(y?this.doc.height-ie(b):0)},defaultTextHeight:function(){return We(this.display)},defaultCharWidth:function(){return $e(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,a,d,y,b){var S=this.display,L=(n=Er(this,Ke(this.doc,n))).bottom,R=n.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),S.sizer.appendChild(a),"over"==y)L=n.top;else if("above"==y||"near"==y){var K=Math.max(S.wrapper.clientHeight,this.doc.height),se=Math.max(S.sizer.clientWidth,S.lineSpace.clientWidth);("above"==y||n.bottom+a.offsetHeight>K)&&n.top>a.offsetHeight?L=n.top-a.offsetHeight:n.bottom+a.offsetHeight<=K&&(L=n.bottom),R+a.offsetWidth>se&&(R=se-a.offsetWidth)}a.style.top=L+"px",a.style.left=a.style.right="","right"==b?(R=S.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):("left"==b?R=0:"middle"==b&&(R=(S.sizer.clientWidth-a.offsetWidth)/2),a.style.left=R+"px"),d&&function(e,t){var r=ha(e,t);null!=r.scrollTop&&Ls(e,r.scrollTop),null!=r.scrollLeft&&Os(e,r.scrollLeft)}(this,{left:R,top:L,right:R+a.offsetWidth,bottom:L+a.offsetHeight})},triggerOnKeyDown:cr(At),triggerOnKeyPress:cr(Pt),triggerOnKeyUp:Mt,triggerOnMouseDown:cr(Lr),execCommand:function(n){if(W.hasOwnProperty(n))return W[n].call(null,this)},triggerElectric:cr(function(n){Oa(this,n)}),findPosH:function(n,a,d,y){var b=1;a<0&&(b=-1,a=-a);for(var S=Ke(this.doc,n),L=0;L<a&&!(S=Ul(this.doc,S,b,d,y)).hitSide;++L);return S},moveH:cr(function(n,a){var d=this;this.extendSelectionsBy(function(y){return d.display.shift||d.doc.extend||y.empty()?Ul(d.doc,y.head,n,a,d.options.rtlMoveVisually):n<0?y.from():y.to()},_e)}),deleteH:cr(function(n,a){var y=this.doc;this.doc.sel.somethingSelected()?y.replaceSelection("",null,"+delete"):h(this,function(b){var S=Ul(y,b.head,n,a,!1);return n<0?{from:S,to:b.head}:{from:b.head,to:S}})}),findPosV:function(n,a,d,y){var b=1,S=y;a<0&&(b=-1,a=-a);for(var L=Ke(this.doc,n),R=0;R<a;++R){var K=Er(this,L,"div");if(null==S?S=K.left:K.left=S,(L=$l(this,K,b,d)).hitSide)break}return L},moveV:cr(function(n,a){var d=this,y=this.doc,b=[],S=!this.display.shift&&!y.extend&&y.sel.somethingSelected();if(y.extendSelectionsBy(function(R){if(S)return n<0?R.from():R.to();var K=Er(d,R.head,"div");null!=R.goalColumn&&(K.left=R.goalColumn),b.push(K.left);var se=$l(d,K,n,a);return"page"==a&&R==y.sel.primary()&&fa(d,Ui(d,se,"div").top-K.top),se},_e),b.length)for(var L=0;L<y.sel.ranges.length;L++)y.sel.ranges[L].goalColumn=b[L]}),findWordAt:function(n){var d=st(this.doc,n.line).text,y=n.ch,b=n.ch;if(d){var S=this.getHelper(n,"wordChars");"before"!=n.sticky&&b!=d.length||!y?++b:--y;for(var L=d.charAt(y),R=de(L,S)?function(K){return de(K,S)}:/\s/.test(L)?function(K){return/\s/.test(K)}:function(K){return!/\s/.test(K)&&!de(K)};y>0&&R(d.charAt(y-1));)--y;for(;b<d.length&&R(d.charAt(b));)++b}return new en(Ne(n.line,y),Ne(n.line,b))},toggleOverwrite:function(n){null!=n&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?le(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),vt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ae()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:cr(function(n,a){_o(this,n,a)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-ei(this)-this.display.barHeight,width:n.scrollWidth-ei(this)-this.display.barWidth,clientHeight:pi(this),clientWidth:Gr(this)}},scrollIntoView:cr(function(n,a){null==n?(n={from:this.doc.sel.primary().head,to:null},null==a&&(a=this.options.cursorScrollMargin)):"number"==typeof n?n={from:Ne(n,0),to:null}:null==n.from&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=a||0,null!=n.from.line?function(e,t){yo(e),e.curOp.scrollToPos=t}(this,n):pa(this,n.from,n.to,n.margin)}),setSize:cr(function(n,a){var d=this,y=function(S){return"number"==typeof S||/^\d+$/.test(String(S))?S+"px":S};null!=n&&(this.display.wrapper.style.width=y(n)),null!=a&&(this.display.wrapper.style.height=y(a)),this.options.lineWrapping&&Ko(this);var b=this.display.viewFrom;this.doc.iter(b,this.display.viewTo,function(S){if(S.widgets)for(var L=0;L<S.widgets.length;L++)if(S.widgets[L].noHScroll){an(d,b,"widget");break}++b}),this.curOp.forceUpdate=!0,vt(this,"refresh",this)}),operation:function(n){return xn(this,n)},startOperation:function(){return Ai(this)},endOperation:function(){return Ms(this)},refresh:cr(function(){var n=this.display.cachedTextHeight;Wt(this),this.curOp.forceUpdate=!0,Ts(this),_o(this,this.doc.scrollLeft,this.doc.scrollTop),_a(this.display),(null==n||Math.abs(n-We(this.display))>.5||this.options.lineWrapping)&&Lt(this),vt(this,"refresh",this)}),swapDoc:cr(function(n){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Ya(this,n),Ts(this),this.display.input.reset(),_o(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,a),a}),phrase:function(n){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,n)?a[n]:n},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}},Mn(e),e.registerHelper=function(n,a,d){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][a]=d},e.registerGlobalHelper=function(n,a,d,y){e.registerHelper(n,a,y),r[n]._global.push({pred:d,val:y})}}(ln);var ou="iter insert remove copy getEditor constructor".split(" ");for(var bl in jr.prototype)jr.prototype.hasOwnProperty(bl)&&Le(ou,bl)<0&&(ln.prototype[bl]=function(e){return function(){return e.apply(this.doc,arguments)}}(jr.prototype[bl]));return Mn(jr),ln.inputStyles={textarea:qn,contenteditable:hn},ln.defineMode=function(e){!ln.defaults.mode&&"null"!=e&&(ln.defaults.mode=e),es.apply(this,arguments)},ln.defineMIME=function(e,t){En[e]=t},ln.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ln.defineMIME("text/plain","null"),ln.defineExtension=function(e,t){ln.prototype[e]=t},ln.defineDocExtension=function(e,t){jr.prototype[e]=t},ln.fromTextArea=function(e,t){if((t=t?Ge(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=ae();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=b.getValue()}var a;if(e.form&&(ut(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var d=e.form;a=d.submit;try{var y=d.submit=function(){n(),d.submit=a,d.submit(),d.submit=y}}catch(S){}}t.finishInit=function(S){S.save=n,S.getTextArea=function(){return e},S.toTextArea=function(){S.toTextArea=isNaN,n(),e.parentNode.removeChild(S.getWrapperElement()),e.style.display="",e.form&&($t(e.form,"submit",n),!t.leaveSubmitMethodAlone&&"function"==typeof e.form.submit&&(e.form.submit=a))}},e.style.display="none";var b=ln(function(S){return e.parentNode.insertBefore(S,e.nextSibling)},t);return b},function(e){e.off=$t,e.on=ut,e.wheelEventPixels=Nl,e.Doc=jr,e.splitLines=Hr,e.countColumn=jt,e.findColumn=Et,e.isWordChar=qt,e.Pass=ot,e.signal=vt,e.Line=U,e.changeEnd=Gi,e.scrollbarModel=Pa,e.Pos=Ne,e.cmpPos=D,e.modes=sr,e.mimeModes=En,e.resolveMode=Fi,e.getMode=Si,e.modeExtensions=Hn,e.extendMode=Wr,e.copyState=or,e.startState=li,e.innerMode=Ii,e.commands=W,e.keyMap=si,e.keyName=w,e.isModifierKey=kl,e.lookupKey=ki,e.normalizeKeyMap=yl,e.StringStream=cn,e.SharedTextMarker=io,e.TextMarker=fs,e.LineWidget=Do,e.e_preventDefault=Ut,e.e_stopPropagation=Pi,e.e_stop=Pn,e.addClass=le,e.contains=Q,e.rmClass=E,e.keyNames=ps}(ln),ln.version="5.64.0",ln}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){var ue=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),De=_.Pos,Be={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function Qe(Z){return Z&&Z.bracketRegex||/[(){}[\]]/}function je(Z,oe,fe){var V=Z.getLineHandle(oe.line),z=oe.ch-1,ke=fe&&fe.afterCursor;null==ke&&(ke=/(^| )cm-fat-cursor($| )/.test(Z.getWrapperElement().className));var G=Qe(fe),i=!ke&&z>=0&&G.test(V.text.charAt(z))&&Be[V.text.charAt(z)]||G.test(V.text.charAt(z+1))&&Be[V.text.charAt(++z)];if(!i)return null;var f=">"==i.charAt(1)?1:-1;if(fe&&fe.strict&&f>0!=(z==oe.ch))return null;var o=Z.getTokenTypeAt(De(oe.line,z+1)),c=pe(Z,De(oe.line,z+(f>0?1:0)),f,o,fe);return null==c?null:{from:De(oe.line,z),to:c&&c.pos,match:c&&c.ch==i.charAt(0),forward:f>0}}function pe(Z,oe,fe,V,z){for(var ke=z&&z.maxScanLineLength||1e4,G=z&&z.maxScanLines||1e3,i=[],f=Qe(z),o=fe>0?Math.min(oe.line+G,Z.lastLine()+1):Math.max(Z.firstLine()-1,oe.line-G),c=oe.line;c!=o;c+=fe){var s=Z.getLine(c);if(s){var g=fe>0?0:s.length-1,m=fe>0?s.length:-1;if(!(s.length>ke))for(c==oe.line&&(g=oe.ch-(fe<0?1:0));g!=m;g+=fe){var A=s.charAt(g);if(f.test(A)&&(void 0===V||(Z.getTokenTypeAt(De(c,g+1))||"")==(V||""))){var E=Be[A];if(E&&">"==E.charAt(1)==fe>0)i.push(A);else{if(!i.length)return{pos:De(c,g),ch:A};i.pop()}}}}}return c-fe!=(fe>0?Z.lastLine():Z.firstLine())&&null}function xe(Z,oe,fe){for(var V=Z.state.matchBrackets.maxHighlightLineLength||1e3,z=fe&&fe.highlightNonMatching,ke=[],G=Z.listSelections(),i=0;i<G.length;i++){var f=G[i].empty()&&je(Z,G[i].head,fe);if(f&&(f.match||!1!==z)&&Z.getLine(f.from.line).length<=V){var o=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";ke.push(Z.markText(f.from,De(f.from.line,f.from.ch+1),{className:o})),f.to&&Z.getLine(f.to.line).length<=V&&ke.push(Z.markText(f.to,De(f.to.line,f.to.ch+1),{className:o}))}}if(ke.length){ue&&Z.state.focused&&Z.focus();var c=function(){Z.operation(function(){for(var s=0;s<ke.length;s++)ke[s].clear()})};if(!oe)return c;setTimeout(c,800)}}function $(Z){Z.operation(function(){Z.state.matchBrackets.currentlyHighlighted&&(Z.state.matchBrackets.currentlyHighlighted(),Z.state.matchBrackets.currentlyHighlighted=null),Z.state.matchBrackets.currentlyHighlighted=xe(Z,!1,Z.state.matchBrackets)})}function ye(Z){Z.state.matchBrackets&&Z.state.matchBrackets.currentlyHighlighted&&(Z.state.matchBrackets.currentlyHighlighted(),Z.state.matchBrackets.currentlyHighlighted=null)}_.defineOption("matchBrackets",!1,function(Z,oe,fe){fe&&fe!=_.Init&&(Z.off("cursorActivity",$),Z.off("focus",$),Z.off("blur",ye),ye(Z)),oe&&(Z.state.matchBrackets="object"==typeof oe?oe:{},Z.on("cursorActivity",$),Z.on("focus",$),Z.on("blur",ye))}),_.defineExtension("matchBrackets",function(){xe(this,!0)}),_.defineExtension("findMatchingBracket",function(Z,oe,fe){return(fe||"boolean"==typeof oe)&&(fe?(fe.strict=oe,oe=fe):oe=oe?{strict:!0}:null),je(this,Z,oe)}),_.defineExtension("scanForBracket",function(Z,oe,fe,V){return pe(this,Z,oe,fe,V)})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){var ue=/\S/g,De=String.prototype.repeat||function(pe){return Array(pe+1).join(this)};function Be(pe){if(pe.getOption("disableInput"))return _.Pass;for(var $,xe=pe.listSelections(),ye=[],Z=0;Z<xe.length;Z++){var oe=xe[Z].head;if(!/\bcomment\b/.test(pe.getTokenTypeAt(oe)))return _.Pass;var fe=pe.getModeAt(oe);if($){if($!=fe)return _.Pass}else $=fe;var z,ke,V=null,G=$.blockCommentStart,i=$.lineComment;if(G&&$.blockCommentContinue){var f=(z=pe.getLine(oe.line)).lastIndexOf($.blockCommentEnd,oe.ch-$.blockCommentEnd.length);if(!(-1!=f&&f==oe.ch-$.blockCommentEnd.length||i&&(ke=z.lastIndexOf(i,oe.ch-1))>-1&&/\bcomment\b/.test(pe.getTokenTypeAt({line:oe.line,ch:ke+1}))))if(oe.ch>=G.length&&(ke=z.lastIndexOf(G,oe.ch-G.length))>-1&&ke>f)if(Qe(0,z)>=ke)V=z.slice(0,ke);else{var c,o=pe.options.tabSize;ke=_.countColumn(z,ke,o),V=pe.options.indentWithTabs?De.call("\t",c=Math.floor(ke/o))+De.call(" ",ke-o*c):De.call(" ",ke)}else(ke=z.indexOf($.blockCommentContinue))>-1&&ke<=oe.ch&&ke<=Qe(0,z)&&(V=z.slice(0,ke));null!=V&&(V+=$.blockCommentContinue)}if(null==V&&i&&je(pe))if(null==z&&(z=pe.getLine(oe.line)),ke=z.indexOf(i),oe.ch||ke){if(ke>-1&&Qe(0,z)>=ke){if(!(V=Qe(oe.ch,z)>-1)){var s=pe.getLine(oe.line+1)||"",g=s.indexOf(i);V=g>-1&&Qe(0,s)>=g||null}V&&(V=z.slice(0,ke)+i+z.slice(ke+i.length).match(/^\s*/)[0])}}else V="";if(null==V)return _.Pass;ye[Z]="\n"+V}pe.operation(function(){for(var m=xe.length-1;m>=0;m--)pe.replaceRange(ye[m],xe[m].from(),xe[m].to(),"+insert")})}function Qe(pe,xe){ue.lastIndex=pe;var $=ue.exec(xe);return $?$.index:-1}function je(pe){var xe=pe.getOption("continueComments");return!xe||"object"!=typeof xe||!1!==xe.continueLineComment}_.defineOption("continueComments",null,function(pe,xe,$){if($&&$!=_.Init&&pe.removeKeyMap("continueComment"),xe){var ye="Enter";"string"==typeof xe?ye=xe:"object"==typeof xe&&xe.key&&(ye=xe.key);var Z={name:"continueComment"};Z[ye]=Be,pe.addKeyMap(Z)}})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";var ue={},De=/[^\s\u00a0]/,Be=_.Pos,Qe=_.cmpPos;function je($){var ye=$.search(De);return-1==ye?0:ye}function xe($,ye){var Z=$.getMode();return!1!==Z.useInnerComments&&Z.innerMode?$.getModeAt(ye):Z}_.commands.toggleComment=function($){$.toggleComment()},_.defineExtension("toggleComment",function($){$||($=ue);for(var Z=1/0,oe=this.listSelections(),fe=null,V=oe.length-1;V>=0;V--){var z=oe[V].from(),ke=oe[V].to();z.line>=Z||(ke.line>=Z&&(ke=Be(Z,0)),Z=z.line,null==fe?this.uncomment(z,ke,$)?fe="un":(this.lineComment(z,ke,$),fe="line"):"un"==fe?this.uncomment(z,ke,$):this.lineComment(z,ke,$))}}),_.defineExtension("lineComment",function($,ye,Z){Z||(Z=ue);var oe=this,fe=xe(oe,$),V=oe.getLine($.line);if(null!=V&&!function($,ye,Z){return/\bstring\b/.test($.getTokenTypeAt(Be(ye.line,0)))&&!/^[\'\"\`]/.test(Z)}(oe,$,V)){var z=Z.lineComment||fe.lineComment;if(!z)return void((Z.blockCommentStart||fe.blockCommentStart)&&(Z.fullLines=!0,oe.blockComment($,ye,Z)));var ke=Math.min(0!=ye.ch||ye.line==$.line?ye.line+1:ye.line,oe.lastLine()+1),G=null==Z.padding?" ":Z.padding,i=Z.commentBlankLines||$.line==ye.line;oe.operation(function(){if(Z.indent){for(var f=null,o=$.line;o<ke;++o){var s=(c=oe.getLine(o)).slice(0,je(c));(null==f||f.length>s.length)&&(f=s)}for(o=$.line;o<ke;++o){var c=oe.getLine(o),g=f.length;!i&&!De.test(c)||(c.slice(0,g)!=f&&(g=je(c)),oe.replaceRange(f+z+G,Be(o,0),Be(o,g)))}}else for(o=$.line;o<ke;++o)(i||De.test(oe.getLine(o)))&&oe.replaceRange(z+G,Be(o,0))})}}),_.defineExtension("blockComment",function($,ye,Z){Z||(Z=ue);var oe=this,fe=xe(oe,$),V=Z.blockCommentStart||fe.blockCommentStart,z=Z.blockCommentEnd||fe.blockCommentEnd;if(V&&z){if(!/\bcomment\b/.test(oe.getTokenTypeAt(Be($.line,0)))){var ke=Math.min(ye.line,oe.lastLine());ke!=$.line&&0==ye.ch&&De.test(oe.getLine(ke))&&--ke;var G=null==Z.padding?" ":Z.padding;$.line>ke||oe.operation(function(){if(0!=Z.fullLines){var i=De.test(oe.getLine(ke));oe.replaceRange(G+z,Be(ke)),oe.replaceRange(V+G,Be($.line,0));var f=Z.blockCommentLead||fe.blockCommentLead;if(null!=f)for(var o=$.line+1;o<=ke;++o)(o!=ke||i)&&oe.replaceRange(f+G,Be(o,0))}else{var c=0==Qe(oe.getCursor("to"),ye),s=!oe.somethingSelected();oe.replaceRange(z,ye),c&&oe.setSelection(s?ye:oe.getCursor("from"),ye),oe.replaceRange(V,$)}})}}else(Z.lineComment||fe.lineComment)&&0!=Z.fullLines&&oe.lineComment($,ye,Z)}),_.defineExtension("uncomment",function($,ye,Z){Z||(Z=ue);var f,oe=this,fe=xe(oe,$),V=Math.min(0!=ye.ch||ye.line==$.line?ye.line:ye.line-1,oe.lastLine()),z=Math.min($.line,V),ke=Z.lineComment||fe.lineComment,G=[],i=null==Z.padding?" ":Z.padding;e:if(ke){for(var o=z;o<=V;++o){var c=oe.getLine(o),s=c.indexOf(ke);if(s>-1&&!/comment/.test(oe.getTokenTypeAt(Be(o,s+1)))&&(s=-1),-1==s&&De.test(c)||s>-1&&De.test(c.slice(0,s)))break e;G.push(c)}if(oe.operation(function(){for(var Re=z;Re<=V;++Re){var et=G[Re-z],Ve=et.indexOf(ke),Ge=Ve+ke.length;Ve<0||(et.slice(Ge,Ge+i.length)==i&&(Ge+=i.length),f=!0,oe.replaceRange("",Be(Re,Ve),Be(Re,Ge)))}}),f)return!0}var g=Z.blockCommentStart||fe.blockCommentStart,m=Z.blockCommentEnd||fe.blockCommentEnd;if(!g||!m)return!1;var A=Z.blockCommentLead||fe.blockCommentLead,E=oe.getLine(z),T=E.indexOf(g);if(-1==T)return!1;var j=V==z?E:oe.getLine(V),M=j.indexOf(m,V==z?T+g.length:0),N=Be(z,T+1),te=Be(V,M+1);if(-1==M||!/comment/.test(oe.getTokenTypeAt(N))||!/comment/.test(oe.getTokenTypeAt(te))||oe.getRange(N,te,"\n").indexOf(m)>-1)return!1;var Q=E.lastIndexOf(g,$.ch),ae=-1==Q?-1:E.slice(0,$.ch).indexOf(m,Q+g.length);if(-1!=Q&&-1!=ae&&ae+m.length!=$.ch)return!1;ae=j.indexOf(m,ye.ch);var le=j.slice(ye.ch).lastIndexOf(g,ae-ye.ch);return Q=-1==ae||-1==le?-1:ye.ch+le,(-1==ae||-1==Q||Q==ye.ch)&&(oe.operation(function(){oe.replaceRange("",Be(V,M-(i&&j.slice(M-i.length,M)==i?i.length:0)),Be(V,M+m.length));var Re=T+g.length;if(i&&E.slice(Re,Re+i.length)==i&&(Re+=i.length),oe.replaceRange("",Be(z,T),Be(z,Re)),A)for(var et=z+1;et<=V;++et){var Ve=oe.getLine(et),Ge=Ve.indexOf(A);if(-1!=Ge&&!De.test(Ve.slice(0,Ge))){var jt=Ge+A.length;i&&Ve.slice(jt,jt+i.length)==i&&(jt+=i.length),oe.replaceRange("",Be(et,Ge),Be(et,jt))}}}),!0)})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";function ue(je,pe,xe,$){if(xe&&xe.call){var ye=xe;xe=null}else ye=Qe(je,xe,"rangeFinder");"number"==typeof pe&&(pe=_.Pos(pe,0));var Z=Qe(je,xe,"minFoldSize");function oe(ke){var G=ye(je,pe);if(!G||G.to.line-G.from.line<Z)return null;if("fold"===$)return G;for(var i=je.findMarksAt(G.from),f=0;f<i.length;++f)if(i[f].__isFold){if(!ke)return null;G.cleared=!0,i[f].clear()}return G}var fe=oe(!0);if(Qe(je,xe,"scanUp"))for(;!fe&&pe.line>je.firstLine();)pe=_.Pos(pe.line-1,0),fe=oe(!1);if(fe&&!fe.cleared&&"unfold"!==$){var V=function(je,pe,xe){var $=Qe(je,pe,"widget");if("function"==typeof $&&($=$(xe.from,xe.to)),"string"==typeof $){var ye=document.createTextNode($);($=document.createElement("span")).appendChild(ye),$.className="CodeMirror-foldmarker"}else $&&($=$.cloneNode(!0));return $}(je,xe,fe);_.on(V,"mousedown",function(ke){z.clear(),_.e_preventDefault(ke)});var z=je.markText(fe.from,fe.to,{replacedWith:V,clearOnEnter:Qe(je,xe,"clearOnEnter"),__isFold:!0});z.on("clear",function(ke,G){_.signal(je,"unfold",je,ke,G)}),_.signal(je,"fold",je,fe.from,fe.to)}}_.newFoldFunction=function(je,pe){return function(xe,$){ue(xe,$,{rangeFinder:je,widget:pe})}},_.defineExtension("foldCode",function(je,pe,xe){ue(this,je,pe,xe)}),_.defineExtension("isFolded",function(je){for(var pe=this.findMarksAt(je),xe=0;xe<pe.length;++xe)if(pe[xe].__isFold)return!0}),_.commands.toggleFold=function(je){je.foldCode(je.getCursor())},_.commands.fold=function(je){je.foldCode(je.getCursor(),null,"fold")},_.commands.unfold=function(je){je.foldCode(je.getCursor(),{scanUp:!1},"unfold")},_.commands.foldAll=function(je){je.operation(function(){for(var pe=je.firstLine(),xe=je.lastLine();pe<=xe;pe++)je.foldCode(_.Pos(pe,0),{scanUp:!1},"fold")})},_.commands.unfoldAll=function(je){je.operation(function(){for(var pe=je.firstLine(),xe=je.lastLine();pe<=xe;pe++)je.foldCode(_.Pos(pe,0),{scanUp:!1},"unfold")})},_.registerHelper("fold","combine",function(){var je=Array.prototype.slice.call(arguments,0);return function(pe,xe){for(var $=0;$<je.length;++$){var ye=je[$](pe,xe);if(ye)return ye}}}),_.registerHelper("fold","auto",function(je,pe){for(var xe=je.getHelpers(pe,"fold"),$=0;$<xe.length;$++){var ye=xe[$](je,pe);if(ye)return ye}});var Be={rangeFinder:_.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function Qe(je,pe,xe){if(pe&&void 0!==pe[xe])return pe[xe];var $=je.options.foldOptions;return $&&void 0!==$[xe]?$[xe]:Be[xe]}_.defineOption("foldOptions",null),_.defineExtension("foldOption",function(je,pe){return Qe(this,je,pe)})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],_):_(CodeMirror)}(function(_){"use strict";_.defineOption("foldGutter",!1,function(V,z,ke){ke&&ke!=_.Init&&(V.clearGutter(V.state.foldGutter.options.gutter),V.state.foldGutter=null,V.off("gutterClick",ye),V.off("changes",Z),V.off("viewportChange",oe),V.off("fold",fe),V.off("unfold",fe),V.off("swapDoc",Z)),z&&(V.state.foldGutter=new De(function(V){return!0===V&&(V={}),null==V.gutter&&(V.gutter="CodeMirror-foldgutter"),null==V.indicatorOpen&&(V.indicatorOpen="CodeMirror-foldgutter-open"),null==V.indicatorFolded&&(V.indicatorFolded="CodeMirror-foldgutter-folded"),V}(z)),$(V),V.on("gutterClick",ye),V.on("changes",Z),V.on("viewportChange",oe),V.on("fold",fe),V.on("unfold",fe),V.on("swapDoc",Z))});var ue=_.Pos;function De(V){this.options=V,this.from=this.to=0}function Qe(V,z){for(var ke=V.findMarks(ue(z,0),ue(z+1,0)),G=0;G<ke.length;++G)if(ke[G].__isFold){var i=ke[G].find(-1);if(i&&i.line===z)return ke[G]}}function je(V){if("string"==typeof V){var z=document.createElement("div");return z.className=V+" CodeMirror-guttermarker-subtle",z}return V.cloneNode(!0)}function pe(V,z,ke){var G=V.state.foldGutter.options,i=z-1,f=V.foldOption(G,"minFoldSize"),o=V.foldOption(G,"rangeFinder"),c="string"==typeof G.indicatorFolded&&xe(G.indicatorFolded),s="string"==typeof G.indicatorOpen&&xe(G.indicatorOpen);V.eachLine(z,ke,function(g){++i;var m=null,A=g.gutterMarkers;if(A&&(A=A[G.gutter]),Qe(V,i)){if(c&&A&&c.test(A.className))return;m=je(G.indicatorFolded)}else{var E=ue(i,0),T=o&&o(V,E);if(T&&T.to.line-T.from.line>=f){if(s&&A&&s.test(A.className))return;m=je(G.indicatorOpen)}}!m&&!A||V.setGutterMarker(g,G.gutter,m)})}function xe(V){return new RegExp("(^|\\s)"+V+"(?:$|\\s)\\s*")}function $(V){var z=V.getViewport(),ke=V.state.foldGutter;!ke||(V.operation(function(){pe(V,z.from,z.to)}),ke.from=z.from,ke.to=z.to)}function ye(V,z,ke){var G=V.state.foldGutter;if(G){var i=G.options;if(ke==i.gutter){var f=Qe(V,z);f?f.clear():V.foldCode(ue(z,0),i)}}}function Z(V){var z=V.state.foldGutter;if(z){var ke=z.options;z.from=z.to=0,clearTimeout(z.changeUpdate),z.changeUpdate=setTimeout(function(){$(V)},ke.foldOnChangeTimeSpan||600)}}function oe(V){var z=V.state.foldGutter;if(z){var ke=z.options;clearTimeout(z.changeUpdate),z.changeUpdate=setTimeout(function(){var G=V.getViewport();z.from==z.to||G.from-z.to>20||z.from-G.to>20?$(V):V.operation(function(){G.from<z.from&&(pe(V,G.from,z.from),z.from=G.from),G.to>z.to&&(pe(V,z.to,G.to),z.to=G.to)})},ke.updateViewportTimeSpan||400)}}function fe(V,z){var ke=V.state.foldGutter;if(ke){var G=z.line;G>=ke.from&&G<ke.to&&pe(V,G,G+1)}}}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";_.registerHelper("fold","brace",function(ue,De){var je,Be=De.line,Qe=ue.getLine(Be);function pe(s){for(var g=De.ch,m=0;;){var A=g<=0?-1:Qe.lastIndexOf(s,g-1);if(-1!=A){if(1==m&&A<De.ch)break;if(je=ue.getTokenTypeAt(_.Pos(Be,A+1)),!/^(comment|string)/.test(je))return A+1;g=A-1}else{if(1==m)break;m=1,g=Qe.length}}}var ye,Z,oe,xe=pe("{"),$=pe("[");if(null!=xe&&(null==$||$>xe))oe=xe,ye="{",Z="}";else{if(null==$)return;oe=$,ye="[",Z="]"}var z,ke,fe=1,V=ue.lastLine();e:for(var G=Be;G<=V;++G)for(var i=ue.getLine(G),f=G==Be?oe:0;;){var o=i.indexOf(ye,f),c=i.indexOf(Z,f);if(o<0&&(o=i.length),c<0&&(c=i.length),(f=Math.min(o,c))==i.length)break;if(ue.getTokenTypeAt(_.Pos(G,f+1))==je)if(f==o)++fe;else if(!--fe){z=G,ke=f;break e}++f}if(null!=z&&Be!=z)return{from:_.Pos(Be,oe),to:_.Pos(z,ke)}}),_.registerHelper("fold","import",function(ue,De){function Be(ye){if(ye<ue.firstLine()||ye>ue.lastLine())return null;var Z=ue.getTokenAt(_.Pos(ye,1));if(/\S/.test(Z.string)||(Z=ue.getTokenAt(_.Pos(ye,Z.end+1))),"keyword"!=Z.type||"import"!=Z.string)return null;for(var oe=ye,fe=Math.min(ue.lastLine(),ye+10);oe<=fe;++oe){var z=ue.getLine(oe).indexOf(";");if(-1!=z)return{startCh:Z.end,end:_.Pos(oe,z)}}}var pe,Qe=De.line,je=Be(Qe);if(!je||Be(Qe-1)||(pe=Be(Qe-2))&&pe.end.line==Qe-1)return null;for(var xe=je.end;;){var $=Be(xe.line+1);if(null==$)break;xe=$.end}return{from:ue.clipPos(_.Pos(Qe,je.startCh+1)),to:xe}}),_.registerHelper("fold","include",function(ue,De){function Be($){if($<ue.firstLine()||$>ue.lastLine())return null;var ye=ue.getTokenAt(_.Pos($,1));return/\S/.test(ye.string)||(ye=ue.getTokenAt(_.Pos($,ye.end+1))),"meta"==ye.type&&"#include"==ye.string.slice(0,8)?ye.start+8:void 0}var Qe=De.line,je=Be(Qe);if(null==je||null!=Be(Qe-1))return null;for(var pe=Qe;null!=Be(pe+1);)++pe;return{from:_.Pos(Qe,je+1),to:ue.clipPos(_.Pos(pe))}})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";var ue=_.Pos;function De(G,i){return G.line-i.line||G.ch-i.ch}var je=new RegExp("<(/?)([A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function pe(G,i,f,o){this.line=i,this.ch=f,this.cm=G,this.text=G.getLine(i),this.min=o?Math.max(o.from,G.firstLine()):G.firstLine(),this.max=o?Math.min(o.to-1,G.lastLine()):G.lastLine()}function xe(G,i){var f=G.cm.getTokenTypeAt(ue(G.line,i));return f&&/\btag\b/.test(f)}function $(G){if(!(G.line>=G.max))return G.ch=0,G.text=G.cm.getLine(++G.line),!0}function ye(G){if(!(G.line<=G.min))return G.text=G.cm.getLine(--G.line),G.ch=G.text.length,!0}function Z(G){for(;;){var i=G.text.indexOf(">",G.ch);if(-1==i){if($(G))continue;return}if(xe(G,i+1)){var f=G.text.lastIndexOf("/",i),o=f>-1&&!/\S/.test(G.text.slice(f+1,i));return G.ch=i+1,o?"selfClose":"regular"}G.ch=i+1}}function oe(G){for(;;){var i=G.ch?G.text.lastIndexOf("<",G.ch-1):-1;if(-1==i){if(ye(G))continue;return}if(xe(G,i+1)){je.lastIndex=i,G.ch=i;var f=je.exec(G.text);if(f&&f.index==i)return f}else G.ch=i}}function fe(G){for(;;){je.lastIndex=G.ch;var i=je.exec(G.text);if(!i){if($(G))continue;return}if(xe(G,i.index+1))return G.ch=i.index+i[0].length,i;G.ch=i.index+1}}function V(G){for(;;){var i=G.ch?G.text.lastIndexOf(">",G.ch-1):-1;if(-1==i){if(ye(G))continue;return}if(xe(G,i+1)){var f=G.text.lastIndexOf("/",i),o=f>-1&&!/\S/.test(G.text.slice(f+1,i));return G.ch=i+1,o?"selfClose":"regular"}G.ch=i}}function z(G,i){for(var f=[];;){var c,o=fe(G),s=G.line,g=G.ch-(o?o[0].length:0);if(!o||!(c=Z(G)))return;if("selfClose"!=c)if(o[1]){for(var m=f.length-1;m>=0;--m)if(f[m]==o[2]){f.length=m;break}if(m<0&&(!i||i==o[2]))return{tag:o[2],from:ue(s,g),to:ue(G.line,G.ch)}}else f.push(o[2])}}function ke(G,i){for(var f=[];;){var o=V(G);if(!o)return;if("selfClose"!=o){var c=G.line,s=G.ch,g=oe(G);if(!g)return;if(g[1])f.push(g[2]);else{for(var m=f.length-1;m>=0;--m)if(f[m]==g[2]){f.length=m;break}if(m<0&&(!i||i==g[2]))return{tag:g[2],from:ue(G.line,G.ch),to:ue(c,s)}}}else oe(G)}}_.registerHelper("fold","xml",function(G,i){for(var f=new pe(G,i.line,0);;){var o=fe(f);if(!o||f.line!=i.line)return;var c=Z(f);if(!c)return;if(!o[1]&&"selfClose"!=c){var s=ue(f.line,f.ch),g=z(f,o[2]);return g&&De(g.from,s)>0?{from:s,to:g.from}:null}}}),_.findMatchingTag=function(G,i,f){var o=new pe(G,i.line,i.ch,f);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var c=Z(o),s=c&&ue(o.line,o.ch),g=c&&oe(o);if(c&&g&&!(De(o,i)>0)){var m={from:ue(o.line,o.ch),to:s,tag:g[2]};return"selfClose"==c?{open:m,close:null,at:"open"}:g[1]?{open:ke(o,g[2]),close:m,at:"close"}:{open:m,close:z(o=new pe(G,s.line,s.ch,f),g[2]),at:"open"}}}},_.findEnclosingTag=function(G,i,f,o){for(var c=new pe(G,i.line,i.ch,f);;){var s=ke(c,o);if(!s)break;var m=z(new pe(G,i.line,i.ch,f),s.tag);if(m)return{open:s,close:m}}},_.scanForClosingTag=function(G,i,f,o){return z(new pe(G,i.line,i.ch,o?{from:0,to:o}:null),f)}}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";_.registerHelper("fold","markdown",function(ue,De){function Qe(fe){var V=ue.getTokenTypeAt(_.Pos(fe,0));return V&&/\bheader\b/.test(V)}function je(fe,V,z){var ke=V&&V.match(/^#+/);return ke&&Qe(fe)?ke[0].length:(ke=z&&z.match(/^[=\-]+\s*$/))&&Qe(fe+1)?"="==z[0]?1:2:100}var pe=ue.getLine(De.line),xe=ue.getLine(De.line+1),$=je(De.line,pe,xe);if(100!==$){for(var ye=ue.lastLine(),Z=De.line,oe=ue.getLine(Z+2);Z<ye&&!(je(Z+1,xe,oe)<=$);)++Z,xe=oe,oe=ue.getLine(Z+2);return{from:_.Pos(De.line,pe.length),to:_.Pos(Z,ue.getLine(Z).length)}}})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";_.registerGlobalHelper("fold","comment",function(ue){return ue.blockCommentStart&&ue.blockCommentEnd},function(ue,De){var Be=ue.getModeAt(De),Qe=Be.blockCommentStart,je=Be.blockCommentEnd;if(Qe&&je){for(var $,pe=De.line,xe=ue.getLine(pe),ye=De.ch,Z=0;;){var oe=ye<=0?-1:xe.lastIndexOf(Qe,ye-1);if(-1!=oe){if(1==Z&&oe<De.ch)return;if(/comment/.test(ue.getTokenTypeAt(_.Pos(pe,oe+1)))&&(0==oe||xe.slice(oe-je.length,oe)==je||!/comment/.test(ue.getTokenTypeAt(_.Pos(pe,oe))))){$=oe+Qe.length;break}ye=oe-1}else{if(1==Z)return;Z=1,ye=xe.length}}var z,ke,fe=1,V=ue.lastLine();e:for(var G=pe;G<=V;++G)for(var i=ue.getLine(G),f=G==pe?$:0;;){var o=i.indexOf(Qe,f),c=i.indexOf(je,f);if(o<0&&(o=i.length),c<0&&(c=i.length),(f=Math.min(o,c))==i.length)break;if(f==o)++fe;else if(!--fe){z=G,ke=f;break e}++f}return null==z||pe==z&&ke==$?void 0:{from:_.Pos(pe,$),to:_.Pos(z,ke)}}})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";_.defineMode("javascript",function(ue,De){var z,ke,Be=ue.indentUnit,Qe=De.statementIndent,je=De.jsonld,pe=De.json||je,xe=!1!==De.trackScope,$=De.typescript,ye=De.wordCharacters||/[\w$\xa1-\uffff]/,Z=function(){function D(Rn){return{type:Rn,style:"keyword"}}var q=D("keyword a"),Ce=D("keyword b"),Me=D("keyword c"),ct=D("keyword d"),Ot=D("operator"),Ke={type:"atom",style:"atom"};return{if:D("if"),while:q,with:q,else:Ce,do:Ce,try:Ce,finally:Ce,return:ct,break:ct,continue:ct,new:D("new"),delete:Me,void:Me,throw:Me,debugger:D("debugger"),var:D("var"),const:D("var"),let:D("var"),function:D("function"),catch:D("catch"),for:D("for"),switch:D("switch"),case:D("case"),default:D("default"),in:Ot,typeof:Ot,instanceof:Ot,true:Ke,false:Ke,null:Ke,undefined:Ke,NaN:Ke,Infinity:Ke,this:D("this"),class:D("class"),super:D("atom"),yield:Me,export:D("export"),import:D("import"),extends:Me,await:Me}}(),oe=/[+\-*&%=<>!?|~^@]/,fe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function G(D,q,Ce){return z=D,ke=Ce,q}function i(D,q){var Ce=D.next();if('"'==Ce||"'"==Ce)return q.tokenize=function(D){return function(q,Ce){var ct,Me=!1;if(je&&"@"==q.peek()&&q.match(fe))return Ce.tokenize=i,G("jsonld-keyword","meta");for(;null!=(ct=q.next())&&(ct!=D||Me);)Me=!Me&&"\\"==ct;return Me||(Ce.tokenize=i),G("string","string")}}(Ce),q.tokenize(D,q);if("."==Ce&&D.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return G("number","number");if("."==Ce&&D.match(".."))return G("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Ce))return G(Ce);if("="==Ce&&D.eat(">"))return G("=>","operator");if("0"==Ce&&D.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return G("number","number");if(/\d/.test(Ce))return D.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),G("number","number");if("/"==Ce)return D.eat("*")?(q.tokenize=o,o(D,q)):D.eat("/")?(D.skipToEnd(),G("comment","comment")):Ne(D,q,1)?(function(D){for(var Ce,q=!1,Me=!1;null!=(Ce=D.next());){if(!q){if("/"==Ce&&!Me)return;"["==Ce?Me=!0:Me&&"]"==Ce&&(Me=!1)}q=!q&&"\\"==Ce}}(D),D.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),G("regexp","string-2")):(D.eat("="),G("operator","operator",D.current()));if("`"==Ce)return q.tokenize=c,c(D,q);if("#"==Ce&&"!"==D.peek())return D.skipToEnd(),G("meta","meta");if("#"==Ce&&D.eatWhile(ye))return G("variable","property");if("<"==Ce&&D.match("!--")||"-"==Ce&&D.match("->")&&!/\S/.test(D.string.slice(0,D.start)))return D.skipToEnd(),G("comment","comment");if(oe.test(Ce))return(">"!=Ce||!q.lexical||">"!=q.lexical.type)&&(D.eat("=")?("!"==Ce||"="==Ce)&&D.eat("="):/[<>*+\-|&?]/.test(Ce)&&(D.eat(Ce),">"==Ce&&D.eat(Ce))),"?"==Ce&&D.eat(".")?G("."):G("operator","operator",D.current());if(ye.test(Ce)){D.eatWhile(ye);var Me=D.current();if("."!=q.lastType){if(Z.propertyIsEnumerable(Me)){var ct=Z[Me];return G(ct.type,ct.style,Me)}if("async"==Me&&D.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return G("async","keyword",Me)}return G("variable","variable",Me)}}function o(D,q){for(var Me,Ce=!1;Me=D.next();){if("/"==Me&&Ce){q.tokenize=i;break}Ce="*"==Me}return G("comment","comment")}function c(D,q){for(var Me,Ce=!1;null!=(Me=D.next());){if(!Ce&&("`"==Me||"$"==Me&&D.eat("{"))){q.tokenize=i;break}Ce=!Ce&&"\\"==Me}return G("quasi","string-2",D.current())}function g(D,q){q.fatArrowAt&&(q.fatArrowAt=null);var Ce=D.string.indexOf("=>",D.start);if(!(Ce<0)){if($){var Me=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(D.string.slice(D.start,Ce));Me&&(Ce=Me.index)}for(var ct=0,Ot=!1,Ke=Ce-1;Ke>=0;--Ke){var Rn=D.string.charAt(Ke),_r="([{}])".indexOf(Rn);if(_r>=0&&_r<3){if(!ct){++Ke;break}if(0==--ct){"("==Rn&&(Ot=!0);break}}else if(_r>=3&&_r<6)++ct;else if(ye.test(Rn))Ot=!0;else if(/["'\/`]/.test(Rn))for(;;--Ke){if(0==Ke)return;if(D.string.charAt(Ke-1)==Rn&&"\\"!=D.string.charAt(Ke-2)){Ke--;break}}else if(Ot&&!ct){++Ke;break}}Ot&&!ct&&(q.fatArrowAt=Ke)}}var m={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function A(D,q,Ce,Me,ct,Ot){this.indented=D,this.column=q,this.type=Ce,this.prev=ct,this.info=Ot,null!=Me&&(this.align=Me)}function E(D,q){if(!xe)return!1;for(var Ce=D.localVars;Ce;Ce=Ce.next)if(Ce.name==q)return!0;for(var Me=D.context;Me;Me=Me.prev)for(Ce=Me.vars;Ce;Ce=Ce.next)if(Ce.name==q)return!0}function T(D,q,Ce,Me,ct){var Ot=D.cc;for(j.state=D,j.stream=ct,j.marked=null,j.cc=Ot,j.style=q,D.lexical.hasOwnProperty("align")||(D.lexical.align=!0);;)if((Ot.length?Ot.pop():pe?_e:ft)(Ce,Me)){for(;Ot.length&&Ot[Ot.length-1].lex;)Ot.pop()();return j.marked?j.marked:"variable"==Ce&&E(D,Me)?"variable-2":q}}var j={state:null,column:null,marked:null,cc:null};function M(){for(var D=arguments.length-1;D>=0;D--)j.cc.push(arguments[D])}function N(){return M.apply(null,arguments),!0}function te(D,q){for(var Ce=q;Ce;Ce=Ce.next)if(Ce.name==D)return!0;return!1}function Q(D){var q=j.state;if(j.marked="def",xe){if(q.context)if("var"==q.lexical.info&&q.context&&q.context.block){var Ce=ae(D,q.context);if(null!=Ce)return void(q.context=Ce)}else if(!te(D,q.localVars))return void(q.localVars=new et(D,q.localVars));De.globalVars&&!te(D,q.globalVars)&&(q.globalVars=new et(D,q.globalVars))}}function ae(D,q){if(q){if(q.block){var Ce=ae(D,q.prev);return Ce?Ce==q.prev?q:new Re(Ce,q.vars,!0):null}return te(D,q.vars)?q:new Re(q.prev,new et(D,q.vars),!1)}return null}function le(D){return"public"==D||"private"==D||"protected"==D||"abstract"==D||"readonly"==D}function Re(D,q,Ce){this.prev=D,this.vars=q,this.block=Ce}function et(D,q){this.name=D,this.next=q}var Ve=new et("this",new et("arguments",null));function Ge(){j.state.context=new Re(j.state.context,j.state.localVars,!1),j.state.localVars=Ve}function jt(){j.state.context=new Re(j.state.context,j.state.localVars,!0),j.state.localVars=null}function Tt(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function Le(D,q){var Ce=function(){var Me=j.state,ct=Me.indented;if("stat"==Me.lexical.type)ct=Me.lexical.indented;else for(var Ot=Me.lexical;Ot&&")"==Ot.type&&Ot.align;Ot=Ot.prev)ct=Ot.indented;Me.lexical=new A(ct,j.stream.column(),D,null,Me.lexical,q)};return Ce.lex=!0,Ce}function Xe(){var D=j.state;D.lexical.prev&&(")"==D.lexical.type&&(D.indented=D.lexical.indented),D.lexical=D.lexical.prev)}function ot(D){return function q(Ce){return Ce==D?N():";"==D||"}"==Ce||")"==Ce||"]"==Ce?M():N(q)}}function ft(D,q){return"var"==D?N(Le("vardef",q),Zi,ot(";"),Xe):"keyword a"==D?N(Le("form"),zt,ft,Xe):"keyword b"==D?N(Le("form"),ft,Xe):"keyword d"==D?j.stream.match(/^\s*$/,!1)?N():N(Le("stat"),we,ot(";"),Xe):"debugger"==D?N(ot(";")):"{"==D?N(Le("}"),jt,Nn,Xe,Tt):";"==D?N():"if"==D?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==Xe&&j.state.cc.pop()(),N(Le("form"),zt,ft,Xe,ai)):"function"==D?N(sr):"for"==D?N(Le("form"),jt,Ti,ft,Tt,Xe):"class"==D||$&&"interface"==q?(j.marked="keyword",N(Le("form","class"==D?D:q),Si,Xe)):"variable"==D?$&&"declare"==q?(j.marked="keyword",N(ft)):$&&("module"==q||"enum"==q||"type"==q)&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword","enum"==q?N(Kn):"type"==q?N(es,ot("operator"),vt,ot(";")):N(Le("form"),vn,ot("{"),Le("}"),Nn,Xe,Xe)):$&&"namespace"==q?(j.marked="keyword",N(Le("form"),_e,ft,Xe)):$&&"abstract"==q?(j.marked="keyword",N(ft)):N(Le("stat"),bt):"switch"==D?N(Le("form"),zt,ot("{"),Le("}","switch"),jt,Nn,Xe,Xe,Tt):"case"==D?N(_e,ot(":")):"default"==D?N(ot(":")):"catch"==D?N(Le("form"),Ge,_t,ft,Xe,Tt):"export"==D?N(Le("stat"),Ii,Xe):"import"==D?N(Le("stat"),cn,Xe):"async"==D?N(ft):"@"==q?N(_e,ft):M(Le("stat"),_e,ot(";"),Xe)}function _t(D){if("("==D)return N(Rr,ot(")"))}function _e(D,q){return un(D,q,!1)}function Et(D,q){return un(D,q,!0)}function zt(D){return"("!=D?M():N(Le(")"),we,ot(")"),Xe)}function un(D,q,Ce){if(j.state.fatArrowAt==j.stream.start){var Me=Ce?qt:Ci;if("("==D)return N(Ge,Le(")"),Rt(Rr,")"),Xe,ot("=>"),Me,Tt);if("variable"==D)return M(Ge,vn,ot("=>"),Me,Tt)}var ct=Ce?sn:yt;return m.hasOwnProperty(D)?N(ct):"function"==D?N(sr,ct):"class"==D||$&&"interface"==q?(j.marked="keyword",N(Le("form"),Fi,Xe)):"keyword c"==D||"async"==D?N(Ce?Et:_e):"("==D?N(Le(")"),we,ot(")"),Xe,ct):"operator"==D||"spread"==D?N(Ce?Et:_e):"["==D?N(Le("]"),It,Xe,ct):"{"==D?rr(gn,"}",null,ct):"quasi"==D?M(Cn,ct):"new"==D?N(function(D){return function(q){return"."==q?N(D?ge:Pe):"variable"==q&&$?N(Pn,D?sn:yt):M(D?Et:_e)}}(Ce)):N()}function we(D){return D.match(/[;\}\)\],]/)?M():M(_e)}function yt(D,q){return","==D?N(we):sn(D,q,!1)}function sn(D,q,Ce){var Me=0==Ce?yt:sn,ct=0==Ce?_e:Et;if("=>"==D)return N(Ge,Ce?qt:Ci,Tt);if("operator"==D)return/\+\+|--/.test(q)||$&&"!"==q?N(Me):$&&"<"==q&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(Le(">"),Rt(vt,">"),Xe,Me):"?"==q?N(_e,ot(":"),ct):N(ct);if("quasi"==D)return M(Cn,Me);if(";"!=D){if("("==D)return rr(Et,")","call",Me);if("."==D)return N(Xt,Me);if("["==D)return N(Le("]"),we,ot("]"),Xe,Me);if($&&"as"==q)return j.marked="keyword",N(vt,Me);if("regexp"==D)return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),N(ct)}}function Cn(D,q){return"quasi"!=D?M():"${"!=q.slice(q.length-2)?N(Cn):N(we,ze)}function ze(D){if("}"==D)return j.marked="string-2",j.state.tokenize=c,N(Cn)}function Ci(D){return g(j.stream,j.state),M("{"==D?ft:_e)}function qt(D){return g(j.stream,j.state),M("{"==D?ft:Et)}function Pe(D,q){if("target"==q)return j.marked="keyword",N(yt)}function ge(D,q){if("target"==q)return j.marked="keyword",N(sn)}function bt(D){return":"==D?N(Xe,ft):M(yt,ot(";"),Xe)}function Xt(D){if("variable"==D)return j.marked="property",N()}function gn(D,q){return"async"==D?(j.marked="property",N(gn)):"variable"==D||"keyword"==j.style?(j.marked="property","get"==q||"set"==q?N(Mi):($&&j.state.fatArrowAt==j.stream.start&&(Ce=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+Ce[0].length),N(kn))):"number"==D||"string"==D?(j.marked=je?"property":j.style+" property",N(kn)):"jsonld-keyword"==D?N(kn):$&&le(q)?(j.marked="keyword",N(gn)):"["==D?N(_e,Dr,ot("]"),kn):"spread"==D?N(Et,kn):"*"==q?(j.marked="keyword",N(gn)):":"==D?M(kn):void 0;var Ce}function Mi(D){return"variable"!=D?M(kn):(j.marked="property",N(sr))}function kn(D){return":"==D?N(Et):"("==D?M(sr):void 0}function Rt(D,q,Ce){function Me(ct,Ot){if(Ce?Ce.indexOf(ct)>-1:","==ct){var Ke=j.state.lexical;return"call"==Ke.info&&(Ke.pos=(Ke.pos||0)+1),N(function(Rn,_r){return Rn==q||_r==q?M():M(D)},Me)}return ct==q||Ot==q?N():Ce&&Ce.indexOf(";")>-1?M(D):N(ot(q))}return function(ct,Ot){return ct==q||Ot==q?N():M(D,Me)}}function rr(D,q,Ce){for(var Me=3;Me<arguments.length;Me++)j.cc.push(arguments[Me]);return N(Le(q,Ce),Rt(D,q),Xe)}function Nn(D){return"}"==D?N():M(ft,Nn)}function Dr(D,q){if($){if(":"==D)return N(vt);if("?"==q)return N(Dr)}}function ut(D,q){if($&&(":"==D||"in"==q))return N(vt)}function Bn(D){if($&&":"==D)return j.stream.match(/^\s*\w+\s+is\b/,!1)?N(_e,$t,vt):N(vt)}function $t(D,q){if("is"==q)return j.marked="keyword",N()}function vt(D,q){return"keyof"==q||"typeof"==q||"infer"==q||"readonly"==q?(j.marked="keyword",N("typeof"==q?Et:vt)):"variable"==D||"void"==q?(j.marked="type",N(Un)):"|"==q||"&"==q?N(vt):"string"==D||"number"==D||"atom"==D?N(Un):"["==D?N(Le("]"),Rt(vt,"]",","),Xe,Un):"{"==D?N(Le("}"),Jn,Xe,Un):"("==D?N(Rt(Pi,")"),Tn,Un):"<"==D?N(Rt(vt,">"),vt):"quasi"==D?M(Mn,Un):void 0}function Tn(D){if("=>"==D)return N(vt)}function Jn(D){return D.match(/[\}\)\]]/)?N():","==D||";"==D?N(Jn):M(tn,Jn)}function tn(D,q){return"variable"==D||"keyword"==j.style?(j.marked="property",N(tn)):"?"==q||"number"==D||"string"==D?N(tn):":"==D?N(vt):"["==D?N(ot("variable"),ut,ot("]"),tn):"("==D?M(En,tn):D.match(/[;\}\)\],]/)?void 0:N()}function Mn(D,q){return"quasi"!=D?M():"${"!=q.slice(q.length-2)?N(Mn):N(vt,Ut)}function Ut(D){if("}"==D)return j.marked="string-2",j.state.tokenize=c,N(Mn)}function Pi(D,q){return"variable"==D&&j.stream.match(/^\s*[?:]/,!1)||"?"==q?N(Pi):":"==D?N(vt):"spread"==D?N(Pi):M(vt)}function Un(D,q){return"<"==q?N(Le(">"),Rt(vt,">"),Xe,Un):"|"==q||"."==D||"&"==q?N(vt):"["==D?N(vt,ot("]"),Un):"extends"==q||"implements"==q?(j.marked="keyword",N(vt)):"?"==q?N(vt,ot(":"),vt):void 0}function Pn(D,q){if("<"==q)return N(Le(">"),Rt(vt,">"),Xe,Un)}function Cr(){return M(vt,Ji)}function Ji(D,q){if("="==q)return N(vt)}function Zi(D,q){return"enum"==q?(j.marked="keyword",N(Kn)):M(vn,Dr,vr,Hr)}function vn(D,q){return $&&le(q)?(j.marked="keyword",N(vn)):"variable"==D?(Q(q),N()):"spread"==D?N(vn):"["==D?rr(Nr,"]"):"{"==D?rr(Us,"}"):void 0}function Us(D,q){return"variable"!=D||j.stream.match(/^\s*:/,!1)?("variable"==D&&(j.marked="property"),"spread"==D?N(vn):"}"==D?M():"["==D?N(_e,ot("]"),ot(":"),Us):N(ot(":"),vn,vr)):(Q(q),N(vr))}function Nr(){return M(vn,vr)}function vr(D,q){if("="==q)return N(Et)}function Hr(D){if(","==D)return N(Zi)}function ai(D,q){if("keyword b"==D&&"else"==q)return N(Le("form","else"),ft,Xe)}function Ti(D,q){return"await"==q?N(Ti):"("==D?N(Le(")"),ir,Xe):void 0}function ir(D){return"var"==D?N(Zi,Tr):"variable"==D?N(Tr):M(Tr)}function Tr(D,q){return")"==D?N():";"==D?N(Tr):"in"==q||"of"==q?(j.marked="keyword",N(_e,Tr)):M(_e,Tr)}function sr(D,q){return"*"==q?(j.marked="keyword",N(sr)):"variable"==D?(Q(q),N(sr)):"("==D?N(Ge,Le(")"),Rt(Rr,")"),Xe,Bn,ft,Tt):$&&"<"==q?N(Le(">"),Rt(Cr,">"),Xe,sr):void 0}function En(D,q){return"*"==q?(j.marked="keyword",N(En)):"variable"==D?(Q(q),N(En)):"("==D?N(Ge,Le(")"),Rt(Rr,")"),Xe,Bn,Tt):$&&"<"==q?N(Le(">"),Rt(Cr,">"),Xe,En):void 0}function es(D,q){return"keyword"==D||"variable"==D?(j.marked="type",N(es)):"<"==q?N(Le(">"),Rt(Cr,">"),Xe):void 0}function Rr(D,q){return"@"==q&&N(_e,Rr),"spread"==D?N(Rr):$&&le(q)?(j.marked="keyword",N(Rr)):$&&"this"==D?N(Dr,vr):M(vn,Dr,vr)}function Fi(D,q){return"variable"==D?Si(D,q):Hn(D,q)}function Si(D,q){if("variable"==D)return Q(q),N(Hn)}function Hn(D,q){return"<"==q?N(Le(">"),Rt(Cr,">"),Xe,Hn):"extends"==q||"implements"==q||$&&","==D?("implements"==q&&(j.marked="keyword"),N($?vt:_e,Hn)):"{"==D?N(Le("}"),Wr,Xe):void 0}function Wr(D,q){return"async"==D||"variable"==D&&("static"==q||"get"==q||"set"==q||$&&le(q))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(j.marked="keyword",N(Wr)):"variable"==D||"keyword"==j.style?(j.marked="property",N(or,Wr)):"number"==D||"string"==D?N(or,Wr):"["==D?N(_e,Dr,ot("]"),or,Wr):"*"==q?(j.marked="keyword",N(Wr)):$&&"("==D?M(En,Wr):";"==D||","==D?N(Wr):"}"==D?N():"@"==q?N(_e,Wr):void 0}function or(D,q){if("!"==q||"?"==q)return N(or);if(":"==D)return N(vt,vr);if("="==q)return N(Et);var Ce=j.state.lexical.prev;return M(Ce&&"interface"==Ce.info?En:sr)}function Ii(D,q){return"*"==q?(j.marked="keyword",N(jn,ot(";"))):"default"==q?(j.marked="keyword",N(_e,ot(";"))):"{"==D?N(Rt(li,"}"),jn,ot(";")):M(ft)}function li(D,q){return"as"==q?(j.marked="keyword",N(ot("variable"))):"variable"==D?M(Et,li):void 0}function cn(D){return"string"==D?N():"("==D?M(_e):"."==D?M(yt):M(st,mr,jn)}function st(D,q){return"{"==D?rr(st,"}"):("variable"==D&&Q(q),"*"==q&&(j.marked="keyword"),N(ar))}function mr(D){if(","==D)return N(st,mr)}function ar(D,q){if("as"==q)return j.marked="keyword",N(st)}function jn(D,q){if("from"==q)return j.marked="keyword",N(_e)}function It(D){return"]"==D?N():M(Rt(Et,"]"))}function Kn(){return M(Le("form"),vn,ot("{"),Le("}"),Rt(Zr,"}"),Xe,Xe)}function Zr(){return M(vn,vr)}function Ne(D,q,Ce){return q.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(q.lastType)||"quasi"==q.lastType&&/\{\s*$/.test(D.string.slice(0,D.pos-(Ce||0)))}return Tt.lex=!0,Xe.lex=!0,{startState:function(D){var q={tokenize:i,lastType:"sof",cc:[],lexical:new A((D||0)-Be,0,"block",!1),localVars:De.localVars,context:De.localVars&&new Re(null,null,!1),indented:D||0};return De.globalVars&&"object"==typeof De.globalVars&&(q.globalVars=De.globalVars),q},token:function(D,q){if(D.sol()&&(q.lexical.hasOwnProperty("align")||(q.lexical.align=!1),q.indented=D.indentation(),g(D,q)),q.tokenize!=o&&D.eatSpace())return null;var Ce=q.tokenize(D,q);return"comment"==z?Ce:(q.lastType="operator"!=z||"++"!=ke&&"--"!=ke?z:"incdec",T(q,Ce,z,ke,D))},indent:function(D,q){if(D.tokenize==o||D.tokenize==c)return _.Pass;if(D.tokenize!=i)return 0;var ct,Ce=q&&q.charAt(0),Me=D.lexical;if(!/^\s*else\b/.test(q))for(var Ot=D.cc.length-1;Ot>=0;--Ot){var Ke=D.cc[Ot];if(Ke==Xe)Me=Me.prev;else if(Ke!=ai&&Ke!=Tt)break}for(;("stat"==Me.type||"form"==Me.type)&&("}"==Ce||(ct=D.cc[D.cc.length-1])&&(ct==yt||ct==sn)&&!/^[,\.=+\-*:?[\(]/.test(q));)Me=Me.prev;Qe&&")"==Me.type&&"stat"==Me.prev.type&&(Me=Me.prev);var Rn=Me.type,_r=Ce==Rn;return"vardef"==Rn?Me.indented+("operator"==D.lastType||","==D.lastType?Me.info.length+1:0):"form"==Rn&&"{"==Ce?Me.indented:"form"==Rn?Me.indented+Be:"stat"==Rn?Me.indented+(function(D,q){return"operator"==D.lastType||","==D.lastType||oe.test(q.charAt(0))||/[,.]/.test(q.charAt(0))}(D,q)?Qe||Be:0):"switch"!=Me.info||_r||0==De.doubleIndentSwitch?Me.align?Me.column+(_r?0:1):Me.indented+(_r?0:Be):Me.indented+(/^(?:case|default)\b/.test(q)?Be:2*Be)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:pe?null:"/*",blockCommentEnd:pe?null:"*/",blockCommentContinue:pe?null:" * ",lineComment:pe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:pe?"json":"javascript",jsonldMode:je,jsonMode:pe,expressionAllowed:Ne,skipExpression:function(D){T(D,"atom","atom","true",new _.StringStream("",2,null))}}}),_.registerHelper("wordChars","javascript",/[\w$]/),_.defineMIME("text/javascript","javascript"),_.defineMIME("text/ecmascript","javascript"),_.defineMIME("application/javascript","javascript"),_.defineMIME("application/x-javascript","javascript"),_.defineMIME("application/ecmascript","javascript"),_.defineMIME("application/json",{name:"javascript",json:!0}),_.defineMIME("application/x-json",{name:"javascript",json:!0}),_.defineMIME("application/manifest+json",{name:"javascript",json:!0}),_.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),_.defineMIME("text/typescript",{name:"javascript",typescript:!0}),_.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";function ue(A){for(var E={},T=0;T<A.length;++T)E[A[T].toLowerCase()]=!0;return E}_.defineMode("css",function(A,E){var T=E.inline;E.propertyKeywords||(E=_.resolveMode("text/css"));var ft,_t,j=A.indentUnit,M=E.tokenHooks,N=E.documentTypes||{},te=E.mediaTypes||{},Q=E.mediaFeatures||{},ae=E.mediaValueKeywords||{},le=E.propertyKeywords||{},Re=E.nonStandardPropertyKeywords||{},et=E.fontProperties||{},Ve=E.counterDescriptors||{},Ge=E.colorKeywords||{},jt=E.valueKeywords||{},Tt=E.allowNested,Xe=!0===E.supportsAtComponent,ot=!1!==A.highlightNonStandardPropertyKeywords;function _e(de,Pe){return ft=Pe,de}function Et(de,Pe){var ge=de.next();if(M[ge]){var bt=M[ge](de,Pe);if(!1!==bt)return bt}return"@"==ge?(de.eatWhile(/[\w\\\-]/),_e("def",de.current())):"="==ge||("~"==ge||"|"==ge)&&de.eat("=")?_e(null,"compare"):'"'==ge||"'"==ge?(Pe.tokenize=zt(ge),Pe.tokenize(de,Pe)):"#"==ge?(de.eatWhile(/[\w\\\-]/),_e("atom","hash")):"!"==ge?(de.match(/^\s*\w*/),_e("keyword","important")):/\d/.test(ge)||"."==ge&&de.eat(/\d/)?(de.eatWhile(/[\w.%]/),_e("number","unit")):"-"!==ge?/[,+>*\/]/.test(ge)?_e(null,"select-op"):"."==ge&&de.match(/^-?[_a-z][_a-z0-9-]*/i)?_e("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ge)?_e(null,ge):de.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(de.current())&&(Pe.tokenize=un),_e("variable callee","variable")):/[\w\\\-]/.test(ge)?(de.eatWhile(/[\w\\\-]/),_e("property","word")):_e(null,null):/[\d.]/.test(de.peek())?(de.eatWhile(/[\w.%]/),_e("number","unit")):de.match(/^-[\w\\\-]*/)?(de.eatWhile(/[\w\\\-]/),de.match(/^\s*:/,!1)?_e("variable-2","variable-definition"):_e("variable-2","variable")):de.match(/^\w+-/)?_e("meta","meta"):void 0}function zt(de){return function(Pe,ge){for(var Xt,bt=!1;null!=(Xt=Pe.next());){if(Xt==de&&!bt){")"==de&&Pe.backUp(1);break}bt=!bt&&"\\"==Xt}return(Xt==de||!bt&&")"!=de)&&(ge.tokenize=null),_e("string","string")}}function un(de,Pe){return de.next(),Pe.tokenize=de.match(/^\s*[\"\')]/,!1)?null:zt(")"),_e(null,"(")}function we(de,Pe,ge){this.type=de,this.indent=Pe,this.prev=ge}function yt(de,Pe,ge,bt){return de.context=new we(ge,Pe.indentation()+(!1===bt?0:j),de.context),ge}function sn(de){return de.context.prev&&(de.context=de.context.prev),de.context.type}function Cn(de,Pe,ge){return qt[ge.context.type](de,Pe,ge)}function ze(de,Pe,ge,bt){for(var Xt=bt||1;Xt>0;Xt--)ge.context=ge.context.prev;return Cn(de,Pe,ge)}function Ci(de){var Pe=de.current().toLowerCase();_t=jt.hasOwnProperty(Pe)?"atom":Ge.hasOwnProperty(Pe)?"keyword":"variable"}var qt={top:function(de,Pe,ge){if("{"==de)return yt(ge,Pe,"block");if("}"==de&&ge.context.prev)return sn(ge);if(Xe&&/@component/i.test(de))return yt(ge,Pe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(de))return yt(ge,Pe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(de))return yt(ge,Pe,"atBlock");if(/^@(font-face|counter-style)/i.test(de))return ge.stateArg=de,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(de))return"keyframes";if(de&&"@"==de.charAt(0))return yt(ge,Pe,"at");if("hash"==de)_t="builtin";else if("word"==de)_t="tag";else{if("variable-definition"==de)return"maybeprop";if("interpolation"==de)return yt(ge,Pe,"interpolation");if(":"==de)return"pseudo";if(Tt&&"("==de)return yt(ge,Pe,"parens")}return ge.context.type},block:function(de,Pe,ge){if("word"==de){var bt=Pe.current().toLowerCase();return le.hasOwnProperty(bt)?(_t="property","maybeprop"):Re.hasOwnProperty(bt)?(_t=ot?"string-2":"property","maybeprop"):Tt?(_t=Pe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(_t+=" error","maybeprop")}return"meta"==de?"block":Tt||"hash"!=de&&"qualifier"!=de?qt.top(de,Pe,ge):(_t="error","block")},maybeprop:function(de,Pe,ge){return":"==de?yt(ge,Pe,"prop"):Cn(de,Pe,ge)},prop:function(de,Pe,ge){if(";"==de)return sn(ge);if("{"==de&&Tt)return yt(ge,Pe,"propBlock");if("}"==de||"{"==de)return ze(de,Pe,ge);if("("==de)return yt(ge,Pe,"parens");if("hash"!=de||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(Pe.current())){if("word"==de)Ci(Pe);else if("interpolation"==de)return yt(ge,Pe,"interpolation")}else _t+=" error";return"prop"},propBlock:function(de,Pe,ge){return"}"==de?sn(ge):"word"==de?(_t="property","maybeprop"):ge.context.type},parens:function(de,Pe,ge){return"{"==de||"}"==de?ze(de,Pe,ge):")"==de?sn(ge):"("==de?yt(ge,Pe,"parens"):"interpolation"==de?yt(ge,Pe,"interpolation"):("word"==de&&Ci(Pe),"parens")},pseudo:function(de,Pe,ge){return"meta"==de?"pseudo":"word"==de?(_t="variable-3",ge.context.type):Cn(de,Pe,ge)},documentTypes:function(de,Pe,ge){return"word"==de&&N.hasOwnProperty(Pe.current())?(_t="tag",ge.context.type):qt.atBlock(de,Pe,ge)},atBlock:function(de,Pe,ge){if("("==de)return yt(ge,Pe,"atBlock_parens");if("}"==de||";"==de)return ze(de,Pe,ge);if("{"==de)return sn(ge)&&yt(ge,Pe,Tt?"block":"top");if("interpolation"==de)return yt(ge,Pe,"interpolation");if("word"==de){var bt=Pe.current().toLowerCase();_t="only"==bt||"not"==bt||"and"==bt||"or"==bt?"keyword":te.hasOwnProperty(bt)?"attribute":Q.hasOwnProperty(bt)?"property":ae.hasOwnProperty(bt)?"keyword":le.hasOwnProperty(bt)?"property":Re.hasOwnProperty(bt)?ot?"string-2":"property":jt.hasOwnProperty(bt)?"atom":Ge.hasOwnProperty(bt)?"keyword":"error"}return ge.context.type},atComponentBlock:function(de,Pe,ge){return"}"==de?ze(de,Pe,ge):"{"==de?sn(ge)&&yt(ge,Pe,Tt?"block":"top",!1):("word"==de&&(_t="error"),ge.context.type)},atBlock_parens:function(de,Pe,ge){return")"==de?sn(ge):"{"==de||"}"==de?ze(de,Pe,ge,2):qt.atBlock(de,Pe,ge)},restricted_atBlock_before:function(de,Pe,ge){return"{"==de?yt(ge,Pe,"restricted_atBlock"):"word"==de&&"@counter-style"==ge.stateArg?(_t="variable","restricted_atBlock_before"):Cn(de,Pe,ge)},restricted_atBlock:function(de,Pe,ge){return"}"==de?(ge.stateArg=null,sn(ge)):"word"==de?(_t="@font-face"==ge.stateArg&&!et.hasOwnProperty(Pe.current().toLowerCase())||"@counter-style"==ge.stateArg&&!Ve.hasOwnProperty(Pe.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(de,Pe,ge){return"word"==de?(_t="variable","keyframes"):"{"==de?yt(ge,Pe,"top"):Cn(de,Pe,ge)},at:function(de,Pe,ge){return";"==de?sn(ge):"{"==de||"}"==de?ze(de,Pe,ge):("word"==de?_t="tag":"hash"==de&&(_t="builtin"),"at")},interpolation:function(de,Pe,ge){return"}"==de?sn(ge):"{"==de||";"==de?ze(de,Pe,ge):("word"==de?_t="variable":"variable"!=de&&"("!=de&&")"!=de&&(_t="error"),"interpolation")}};return{startState:function(de){return{tokenize:null,state:T?"block":"top",stateArg:null,context:new we(T?"block":"top",de||0,null)}},token:function(de,Pe){if(!Pe.tokenize&&de.eatSpace())return null;var ge=(Pe.tokenize||Et)(de,Pe);return ge&&"object"==typeof ge&&(ft=ge[1],ge=ge[0]),_t=ge,"comment"!=ft&&(Pe.state=qt[Pe.state](ft,de,Pe)),_t},indent:function(de,Pe){var ge=de.context,bt=Pe&&Pe.charAt(0),Xt=ge.indent;return"prop"==ge.type&&("}"==bt||")"==bt)&&(ge=ge.prev),ge.prev&&("}"!=bt||"block"!=ge.type&&"top"!=ge.type&&"interpolation"!=ge.type&&"restricted_atBlock"!=ge.type?(")"==bt&&("parens"==ge.type||"atBlock_parens"==ge.type)||"{"==bt&&("at"==ge.type||"atBlock"==ge.type))&&(Xt=Math.max(0,ge.indent-j)):Xt=(ge=ge.prev).indent),Xt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:E.lineComment,fold:"brace"}});var De=["domain","regexp","url","url-prefix"],Be=ue(De),Qe=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],je=ue(Qe),pe=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],xe=ue(pe),$=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],ye=ue($),Z=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],oe=ue(Z),fe=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],V=ue(fe),ke=ue(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),i=ue(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),f=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],o=ue(f),c=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=ue(c),g=De.concat(Qe).concat(pe).concat($).concat(Z).concat(fe).concat(f).concat(c);function m(A,E){for(var j,T=!1;null!=(j=A.next());){if(T&&"/"==j){E.tokenize=null;break}T="*"==j}return["comment","comment"]}_.registerHelper("hintWords","css",g),_.defineMIME("text/css",{documentTypes:Be,mediaTypes:je,mediaFeatures:xe,mediaValueKeywords:ye,propertyKeywords:oe,nonStandardPropertyKeywords:V,fontProperties:ke,counterDescriptors:i,colorKeywords:o,valueKeywords:s,tokenHooks:{"/":function(A,E){return!!A.eat("*")&&(E.tokenize=m,m(A,E))}},name:"css"}),_.defineMIME("text/x-scss",{mediaTypes:je,mediaFeatures:xe,mediaValueKeywords:ye,propertyKeywords:oe,nonStandardPropertyKeywords:V,colorKeywords:o,valueKeywords:s,fontProperties:ke,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(A,E){return A.eat("/")?(A.skipToEnd(),["comment","comment"]):A.eat("*")?(E.tokenize=m,m(A,E)):["operator","operator"]},":":function(A){return!!A.match(/^\s*\{/,!1)&&[null,null]},$:function(A){return A.match(/^[\w-]+/),A.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(A){return!!A.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),_.defineMIME("text/x-less",{mediaTypes:je,mediaFeatures:xe,mediaValueKeywords:ye,propertyKeywords:oe,nonStandardPropertyKeywords:V,colorKeywords:o,valueKeywords:s,fontProperties:ke,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(A,E){return A.eat("/")?(A.skipToEnd(),["comment","comment"]):A.eat("*")?(E.tokenize=m,m(A,E)):["operator","operator"]},"@":function(A){return A.eat("{")?[null,"interpolation"]:!A.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(A.eatWhile(/[\w\\\-]/),A.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),_.defineMIME("text/x-gss",{documentTypes:Be,mediaTypes:je,mediaFeatures:xe,propertyKeywords:oe,nonStandardPropertyKeywords:V,fontProperties:ke,counterDescriptors:i,colorKeywords:o,valueKeywords:s,supportsAtComponent:!0,tokenHooks:{"/":function(A,E){return!!A.eat("*")&&(E.tokenize=m,m(A,E))}},name:"css",helperType:"gss"})}),function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],_):_(CodeMirror)}(function(_){"use strict";var ue={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},Be={};function je(ye,Z){var oe=ye.match(function(ye){return Be[ye]||(Be[ye]=new RegExp("\\s+"+ye+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(Z));return oe?/^\s*(.*?)\s*$/.exec(oe[2])[1]:""}function pe(ye,Z){return new RegExp((Z?"^":"")+"</s*"+ye+"s*>","i")}function xe(ye,Z){for(var oe in ye)for(var fe=Z[oe]||(Z[oe]=[]),V=ye[oe],z=V.length-1;z>=0;z--)fe.unshift(V[z])}_.defineMode("htmlmixed",function(ye,Z){var oe=_.getMode(ye,{name:"xml",htmlMode:!0,multilineTagIndentFactor:Z.multilineTagIndentFactor,multilineTagIndentPastTag:Z.multilineTagIndentPastTag,allowMissingTagName:Z.allowMissingTagName}),fe={},V=Z&&Z.tags,z=Z&&Z.scriptTypes;if(xe(ue,fe),V&&xe(V,fe),z)for(var ke=z.length-1;ke>=0;ke--)fe.script.unshift(["type",z[ke].matches,z[ke].mode]);function G(i,f){var s,o=oe.token(i,f.htmlState),c=/\btag\b/.test(o);if(c&&!/[<>\s\/]/.test(i.current())&&(s=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&fe.hasOwnProperty(s))f.inTag=s+" ";else if(f.inTag&&c&&/>$/.test(i.current())){var g=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var m=">"==i.current()&&function(ye,Z){for(var oe=0;oe<ye.length;oe++){var fe=ye[oe];if(!fe[0]||fe[1].test(je(Z,fe[0])))return fe[2]}}(fe[g[1]],g[2]),A=_.getMode(ye,m),E=pe(g[1],!0),T=pe(g[1],!1);f.token=function(j,M){return j.match(E,!1)?(M.token=G,M.localState=M.localMode=null,null):function(ye,Z,oe){var fe=ye.current(),V=fe.search(Z);return V>-1?ye.backUp(fe.length-V):fe.match(/<\/?$/)&&(ye.backUp(fe.length),ye.match(Z,!1)||ye.match(fe)),oe}(j,T,M.localMode.token(j,M.localState))},f.localMode=A,f.localState=_.startState(A,oe.indent(f.htmlState,"",""))}else f.inTag&&(f.inTag+=i.current(),i.eol()&&(f.inTag+=" "));return o}return{startState:function(){return{token:G,inTag:null,localMode:null,localState:null,htmlState:_.startState(oe)}},copyState:function(i){var f;return i.localState&&(f=_.copyState(i.localMode,i.localState)),{token:i.token,inTag:i.inTag,localMode:i.localMode,localState:f,htmlState:_.copyState(oe,i.htmlState)}},token:function(i,f){return f.token(i,f)},indent:function(i,f,o){return!i.localMode||/^\s*<\//.test(f)?oe.indent(i.htmlState,f,o):i.localMode.indent?i.localMode.indent(i.localState,f,o):_.Pass},innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||oe}}}},"xml","javascript","css"),_.defineMIME("text/html","htmlmixed")}),function(_){"use strict";"function"==typeof define&&define.amd?define(["jquery"],_):"undefined"!=typeof module&&module.exports?module.exports=_(require("jquery")):_(jQuery)}(function(_,ue){"use strict";if(!_.jstree){var De=0,Be=!1,Qe=!1,je=!1,pe=[],xe=_("script:last").attr("src"),$=window.document,ye=window.setImmediate,Z=window.Promise;!ye&&Z&&(ye=function(i,f){Z.resolve(f).then(i)}),_.jstree={version:"3.3.12",defaults:{plugins:[]},plugins:{},path:xe&&-1!==xe.indexOf("/")?xe.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},_.jstree.create=function(i,f){var o=new _.jstree.core(++De),c=f;return f=_.extend(!0,{},_.jstree.defaults,f),c&&c.plugins&&(f.plugins=c.plugins),_.each(f.plugins,function(s,g){"core"!==s&&(o=o.plugin(g,f[g]))}),_(i).data("jstree",o),o.init(i,f),o},_.jstree.destroy=function(){_(".jstree:jstree").jstree("destroy"),_($).off(".jstree")},_.jstree.core=function(i){this._id=i,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},_.jstree.reference=function(i){var f=null,o=null;if(!i||!i.id||i.tagName&&i.nodeType||(i=i.id),!o||!o.length)try{o=_(i)}catch(c){}if(!o||!o.length)try{o=_("#"+i.replace(_.jstree.idregex,"\\$&"))}catch(c){}return o&&o.length&&(o=o.closest(".jstree")).length&&(o=o.data("jstree"))?f=o:_(".jstree").each(function(){var c=_(this).data("jstree");return c&&c._model.data[i]?(f=c,!1):void 0}),f},_.fn.jstree=function(i){var f="string"==typeof i,o=Array.prototype.slice.call(arguments,1),c=null;return!(!0===i&&!this.length)&&(this.each(function(){var s=_.jstree.reference(this),g=f&&s?s[i]:null;return c=f&&g?g.apply(s,o):null,s||f||i!==ue&&!_.isPlainObject(i)||_.jstree.create(this,i),(s&&!f||!0===i)&&(c=s||!1),(null===c||c===ue)&&void 0}),null!==c&&c!==ue?c:this)},_.expr.pseudos.jstree=_.expr.createPseudo(function(i){return function(f){return _(f).hasClass("jstree")&&_(f).data("jstree")!==ue}}),_.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:_.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(i){i.type="click",_(i.currentTarget).trigger(i)},enter:function(i){i.type="click",_(i.currentTarget).trigger(i)},left:function(i){if(i.preventDefault(),this.is_open(i.currentTarget))this.close_node(i.currentTarget);else{var f=this.get_parent(i.currentTarget);f&&f.id!==_.jstree.root&&this.get_node(f,!0).children(".jstree-anchor").trigger("focus")}},up:function(i){i.preventDefault();var f=this.get_prev_dom(i.currentTarget);f&&f.length&&f.children(".jstree-anchor").trigger("focus")},right:function(i){if(i.preventDefault(),this.is_closed(i.currentTarget))this.open_node(i.currentTarget,function(o){this.get_node(o,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(i.currentTarget)){var f=this.get_node(i.currentTarget,!0).children(".jstree-children")[0];f&&_(this._firstChild(f)).children(".jstree-anchor").trigger("focus")}},down:function(i){i.preventDefault();var f=this.get_next_dom(i.currentTarget);f&&f.length&&f.children(".jstree-anchor").trigger("focus")},"*":function(i){this.open_all()},home:function(i){i.preventDefault();var f=this._firstChild(this.get_container_ul()[0]);f&&_(f).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(i){i.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(i){i.preventDefault(),this.edit(i.currentTarget)}}},_.jstree.core.prototype={plugin:function(i,f){var o=_.jstree.plugins[i];return o?(this._data[i]={},o.prototype=this,new o(f,this)):this},init:function(i,f){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[_.jstree.root]={id:_.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=_(i).addClass("jstree jstree-"+this._id),this.settings=f,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(_.jstree.root)},destroy:function(i){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(f){}i||this.element.empty(),this.teardown()},_create_prototype_node:function(){var f,o,i=$.createElement("LI");return i.setAttribute("role","none"),(f=$.createElement("I")).className="jstree-icon jstree-ocl",f.setAttribute("role","presentation"),i.appendChild(f),(f=$.createElement("A")).className="jstree-anchor",f.setAttribute("href","#"),f.setAttribute("tabindex","-1"),f.setAttribute("role","treeitem"),(o=$.createElement("I")).className="jstree-icon jstree-themeicon",o.setAttribute("role","presentation"),f.appendChild(o),i.appendChild(f),f=o=null,i},_kbevent_to_func:function(i){var o=[];if(i.ctrlKey&&o.push("ctrl"),i.altKey&&o.push("alt"),i.shiftKey&&o.push("shift"),o.push({8:"Backspace",9:"Tab",13:"Enter",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",16:"Shift",17:"Ctrl",18:"Alt",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:"*",173:"-"}[i.which]||i.which),"shift-shift"===(o=o.sort().join("-").toLowerCase())||"ctrl-ctrl"===o||"alt-alt"===o)return null;var s,g,c=this.settings.core.keyboard;for(s in c)if(c.hasOwnProperty(s)&&("-"!==(g=s)&&"+"!==g&&(g=(g=g.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),g===o))return c[s];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var i="",f=null,o=0;this.element.on("dblclick.jstree",function(c){if(c.target.tagName&&"input"===c.target.tagName.toLowerCase())return!0;if($.selection&&$.selection.empty)$.selection.empty();else if(window.getSelection){var s=window.getSelection();try{s.removeAllRanges(),s.collapse()}catch(g){}}}).on("mousedown.jstree",function(c){c.target===this.element[0]&&(c.preventDefault(),o=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(c){c.preventDefault()}).on("click.jstree",".jstree-ocl",function(c){this.toggle_node(c.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(c){return!(!c.target.tagName||"input"!==c.target.tagName.toLowerCase())||void(this.settings.core.dblclick_toggle&&this.toggle_node(c.target))}.bind(this)).on("click.jstree",".jstree-anchor",function(c){c.preventDefault(),c.currentTarget!==$.activeElement&&_(c.currentTarget).trigger("focus"),this.activate_node(c.currentTarget,c)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(c){if(c.target.tagName&&"input"===c.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===c.which?c.which=39:39===c.which&&(c.which=37));var s=this._kbevent_to_func(c);if(s){var g=s.call(this,c);if(!1===g||!0===g)return g}}.bind(this)).on("load_node.jstree",function(c,s){s.status&&(s.node.id!==_.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var m,A,g=[];for(m=0,A=this._data.core.selected.length;A>m;m++)g=g.concat(this._model.data[this._data.core.selected[m]].parents);for(m=0,A=(g=_.vakata.array_unique(g)).length;A>m;m++)this.open_node(g[m],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(c){if(c.target.tagName&&"input"===c.target.tagName.toLowerCase())return!0;f&&clearTimeout(f),f=setTimeout(function(){i=""},500);var s=String.fromCharCode(c.which).toLowerCase(),g=this.element.find(".jstree-anchor").filter(":visible"),m=g.index($.activeElement)||0,A=!1;(i+=s).length>1&&(g.slice(m).each(function(E,T){return 0===_(T).text().toLowerCase().indexOf(i)?(_(T).trigger("focus"),A=!0,!1):void 0}.bind(this)),A||(g.slice(0,m).each(function(E,T){return 0===_(T).text().toLowerCase().indexOf(i)?(_(T).trigger("focus"),A=!0,!1):void 0}.bind(this)),A))||new RegExp("^"+s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(i)&&(g.slice(m+1).each(function(E,T){return _(T).text().toLowerCase().charAt(0)===s?(_(T).trigger("focus"),A=!0,!1):void 0}.bind(this)),A||g.slice(0,m+1).each(function(E,T){return _(T).text().toLowerCase().charAt(0)===s?(_(T).trigger("focus"),A=!0,!1):void 0}.bind(this)))}.bind(this)).on("init.jstree",function(){var c=this.settings.core.themes;this._data.core.themes.dots=c.dots,this._data.core.themes.stripes=c.stripes,this._data.core.themes.icons=c.icons,this._data.core.themes.ellipsis=c.ellipsis,this.set_theme(c.name||"default",c.url),this.set_theme_variant(c.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(c){this._data.core.focused=null,_(c.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}.bind(this)).on("focus.jstree",".jstree-anchor",function(c){var s=this.get_node(c.currentTarget);s&&s.id&&(this._data.core.focused=s.id),this.element.find(".jstree-hovered").not(c.currentTarget).trigger("mouseleave"),_(c.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}.bind(this)).on("focus.jstree",function(){if(+new Date-o>500&&!this._data.core.focused&&this.settings.core.restore_focus){o=0;var c=this.get_node(this.element.attr("aria-activedescendant"),!0);c&&c.find("> .jstree-anchor").trigger("focus")}}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(c){this.hover_node(c.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(c){this.dehover_node(c.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),_($).off(".jstree-"+this._id)},trigger:function(i,f){f||(f={}),f.instance=this,this.element.triggerHandler(i.replace(".jstree","")+".jstree",f)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(i){var f=this.settings.core.strings;return _.vakata.is_function(f)?f.call(this,i):f&&f[i]?f[i]:i},_firstChild:function(i){for(i=i?i.firstChild:null;null!==i&&1!==i.nodeType;)i=i.nextSibling;return i},_nextSibling:function(i){for(i=i?i.nextSibling:null;null!==i&&1!==i.nodeType;)i=i.nextSibling;return i},_previousSibling:function(i){for(i=i?i.previousSibling:null;null!==i&&1!==i.nodeType;)i=i.previousSibling;return i},get_node:function(i,f){var o;i&&i.id&&(i=i.id),i instanceof _&&i.length&&i[0].id&&(i=i[0].id);try{if(this._model.data[i])i=this._model.data[i];else if("string"==typeof i&&this._model.data[i.replace(/^#/,"")])i=this._model.data[i.replace(/^#/,"")];else if("string"==typeof i&&(o=_("#"+i.replace(_.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[o.closest(".jstree-node").attr("id")])i=this._model.data[o.closest(".jstree-node").attr("id")];else if((o=this.element.find(i)).length&&this._model.data[o.closest(".jstree-node").attr("id")])i=this._model.data[o.closest(".jstree-node").attr("id")];else{if(!(o=this.element.find(i)).length||!o.hasClass("jstree"))return!1;i=this._model.data[_.jstree.root]}return f&&(i=i.id===_.jstree.root?this.element:_("#"+i.id.replace(_.jstree.idregex,"\\$&"),this.element)),i}catch(c){return!1}},get_path:function(i,f,o){if(!(i=i.parents?i:this.get_node(i))||i.id===_.jstree.root||!i.parents)return!1;var c,s,g=[];for(g.push(o?i.id:i.text),c=0,s=i.parents.length;s>c;c++)g.push(o?i.parents[c]:this.get_text(i.parents[c]));return g=g.reverse().slice(1),f?g.join(f):g},get_next_dom:function(i,f){var o;if((i=this.get_node(i,!0))[0]===this.element[0]){for(o=this._firstChild(this.get_container_ul()[0]);o&&0===o.offsetHeight;)o=this._nextSibling(o);return!!o&&_(o)}if(!i||!i.length)return!1;if(f){o=i[0];do{o=this._nextSibling(o)}while(o&&0===o.offsetHeight);return!!o&&_(o)}if(i.hasClass("jstree-open")){for(o=this._firstChild(i.children(".jstree-children")[0]);o&&0===o.offsetHeight;)o=this._nextSibling(o);if(null!==o)return _(o)}o=i[0];do{o=this._nextSibling(o)}while(o&&0===o.offsetHeight);return null!==o?_(o):i.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(i,f){var o;if((i=this.get_node(i,!0))[0]===this.element[0]){for(o=this.get_container_ul()[0].lastChild;o&&0===o.offsetHeight;)o=this._previousSibling(o);return!!o&&_(o)}if(!i||!i.length)return!1;if(f){o=i[0];do{o=this._previousSibling(o)}while(o&&0===o.offsetHeight);return!!o&&_(o)}o=i[0];do{o=this._previousSibling(o)}while(o&&0===o.offsetHeight);if(null!==o){for(i=_(o);i.hasClass("jstree-open");)i=i.children(".jstree-children").first().children(".jstree-node:visible:last");return i}return!(!(o=i[0].parentNode.parentNode)||!o.className||-1===o.className.indexOf("jstree-node"))&&_(o)},get_parent:function(i){return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&i.parent},get_children_dom:function(i){return(i=this.get_node(i,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!i||!i.length)&&i.children(".jstree-children").children(".jstree-node")},is_parent:function(i){return(i=this.get_node(i))&&(!1===i.state.loaded||i.children.length>0)},is_loaded:function(i){return(i=this.get_node(i))&&i.state.loaded},is_loading:function(i){return(i=this.get_node(i))&&i.state&&i.state.loading},is_open:function(i){return(i=this.get_node(i))&&i.state.opened},is_closed:function(i){return(i=this.get_node(i))&&this.is_parent(i)&&!i.state.opened},is_leaf:function(i){return!this.is_parent(i)},load_node:function(i,f){var o,c,s,g,m;if(_.vakata.is_array(i))return this._load_nodes(i.slice(),f),!0;if(!(i=this.get_node(i)))return f&&f.call(this,i,!1),!1;if(i.state.loaded){for(i.state.loaded=!1,s=0,g=i.parents.length;g>s;s++)this._model.data[i.parents[s]].children_d=_.vakata.array_filter(this._model.data[i.parents[s]].children_d,function(A){return-1===_.inArray(A,i.children_d)});for(o=0,c=i.children_d.length;c>o;o++)this._model.data[i.children_d[o]].state.selected&&(m=!0),delete this._model.data[i.children_d[o]];m&&(this._data.core.selected=_.vakata.array_filter(this._data.core.selected,function(A){return-1===_.inArray(A,i.children_d)})),i.children=[],i.children_d=[],m&&this.trigger("changed",{action:"load_node",node:i,selected:this._data.core.selected})}return i.state.failed=!1,i.state.loading=!0,this.get_node(i,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(i,function(A){(i=this._model.data[i.id]).state.loading=!1,i.state.loaded=A,i.state.failed=!i.state.loaded;var j,E=this.get_node(i,!0),T=0,M=this._model.data,N=!1;for(T=0,j=i.children.length;j>T;T++)if(M[i.children[T]]&&!M[i.children[T]].state.hidden){N=!0;break}i.state.loaded&&E&&E.length&&(E.removeClass("jstree-closed jstree-open jstree-leaf"),N?"#"!==i.id&&E.addClass(i.state.opened?"jstree-open":"jstree-closed"):E.addClass("jstree-leaf")),E.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:i,status:A}),f&&f.call(this,i,A)}.bind(this)),!0},_load_nodes:function(i,f,o,c){var A,E,s=!0,g=function(){this._load_nodes(i,f,!0)},m=this._model.data,T=[];for(A=0,E=i.length;E>A;A++)m[i[A]]&&(!m[i[A]].state.loaded&&!m[i[A]].state.failed||!o&&c)&&(this.is_loading(i[A])||this.load_node(i[A],g),s=!1);if(s){for(A=0,E=i.length;E>A;A++)m[i[A]]&&m[i[A]].state.loaded&&T.push(i[A]);f&&!f.done&&(f.call(this,T),f.done=!0)}},load_all:function(i,f){if(i||(i=_.jstree.root),!(i=this.get_node(i)))return!1;var g,m,o=[],c=this._model.data,s=c[i.id].children_d;for(i.state&&!i.state.loaded&&o.push(i.id),g=0,m=s.length;m>g;g++)c[s[g]]&&c[s[g]].state&&!c[s[g]].state.loaded&&o.push(s[g]);o.length?this._load_nodes(o,function(){this.load_all(i,f)}):(f&&f.call(this,i),this.trigger("load_all",{node:i}))},_load_node:function(i,f){var c,o=this.settings.core.data,s=function(){return 3!==this.nodeType&&8!==this.nodeType};return o?_.vakata.is_function(o)?o.call(this,i,function(g){!1===g?f.call(this,!1):this["string"==typeof g?"_append_html_data":"_append_json_data"](i,"string"==typeof g?_(_.parseHTML(g)).filter(s):g,function(m){f.call(this,m)})}.bind(this)):"object"==typeof o?o.url?(o=_.extend(!0,{},o),_.vakata.is_function(o.url)&&(o.url=o.url.call(this,i)),_.vakata.is_function(o.data)&&(o.data=o.data.call(this,i)),_.ajax(o).done(function(g,m,A){var E=A.getResponseHeader("Content-Type");return E&&-1!==E.indexOf("json")||"object"==typeof g?this._append_json_data(i,g,function(T){f.call(this,T)}):E&&-1!==E.indexOf("html")||"string"==typeof g?this._append_html_data(i,_(_.parseHTML(g)).filter(s),function(T){f.call(this,T)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:A})},this.settings.core.error.call(this,this._data.core.last_error),f.call(this,!1))}.bind(this)).fail(function(g){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:g})},f.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(c=_.vakata.is_array(o)?_.extend(!0,[],o):_.isPlainObject(o)?_.extend(!0,{},o):o,i.id===_.jstree.root?this._append_json_data(i,c,function(g){f.call(this,g)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),f.call(this,!1))):"string"==typeof o?i.id===_.jstree.root?this._append_html_data(i,_(_.parseHTML(o)).filter(s),function(g){f.call(this,g)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),f.call(this,!1)):f.call(this,!1):i.id===_.jstree.root?this._append_html_data(i,this._data.core.original_container_html.clone(!0),function(g){f.call(this,g)}):f.call(this,!1)},_node_changed:function(i){(i=this.get_node(i))&&-1===_.inArray(i.id,this._model.changed)&&this._model.changed.push(i.id)},_append_html_data:function(i,f,o){(i=this.get_node(i)).children=[],i.children_d=[];var j,M,N,c=f.is("ul")?f.children():f,s=i.id,g=[],m=[],A=this._model.data,E=A[s],T=this._data.core.selected.length;for(c.each(function(te,Q){(j=this._parse_model_from_html(_(Q),s,E.parents.concat()))&&(g.push(j),m.push(j),A[j].children_d.length&&(m=m.concat(A[j].children_d)))}.bind(this)),E.children=g,E.children_d=m,M=0,N=E.parents.length;N>M;M++)A[E.parents[M]].children_d=A[E.parents[M]].children_d.concat(m);this.trigger("model",{nodes:m,parent:s}),s!==_.jstree.root?(this._node_changed(s),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==T&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),o.call(this,!0)},_append_json_data:function(i,f,o,c){if(null!==this.element){(i=this.get_node(i)).children=[],i.children_d=[],f.d&&"string"==typeof(f=f.d)&&(f=JSON.parse(f)),_.vakata.is_array(f)||(f=[f]);var s=null,g={df:this._model.default_state,dat:f,par:i.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},m=this,A=function(T,j){T.data&&(T=T.data);var Tt,Le,Xe,ot,M=T.dat,N=T.par,te=[],Q=[],ae=[],le=T.df,Re=T.t_id,et=T.t_cnt,Ve=T.m,Ge=Ve[N],jt=T.sel,ft=function(_e,Et,zt){zt=zt?zt.concat():[],Et&&zt.unshift(Et);var we,yt,sn,Cn,un=_e.id.toString(),ze={id:un,text:_e.text||"",icon:_e.icon===j||_e.icon,parent:Et,parents:zt,children:_e.children||[],children_d:_e.children_d||[],data:_e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(we in le)le.hasOwnProperty(we)&&(ze.state[we]=le[we]);if(_e&&_e.data&&_e.data.jstree&&_e.data.jstree.icon&&(ze.icon=_e.data.jstree.icon),(ze.icon===j||null===ze.icon||""===ze.icon)&&(ze.icon=!0),_e&&_e.data&&(ze.data=_e.data,_e.data.jstree))for(we in _e.data.jstree)_e.data.jstree.hasOwnProperty(we)&&(ze.state[we]=_e.data.jstree[we]);if(_e&&"object"==typeof _e.state)for(we in _e.state)_e.state.hasOwnProperty(we)&&(ze.state[we]=_e.state[we]);if(_e&&"object"==typeof _e.li_attr)for(we in _e.li_attr)_e.li_attr.hasOwnProperty(we)&&(ze.li_attr[we]=_e.li_attr[we]);if(ze.li_attr.id||(ze.li_attr.id=un),_e&&"object"==typeof _e.a_attr)for(we in _e.a_attr)_e.a_attr.hasOwnProperty(we)&&(ze.a_attr[we]=_e.a_attr[we]);for(_e&&_e.children&&!0===_e.children&&(ze.state.loaded=!1,ze.children=[],ze.children_d=[]),Ve[ze.id]=ze,we=0,yt=ze.children.length;yt>we;we++)sn=ft(Ve[ze.children[we]],ze.id,zt),Cn=Ve[sn],ze.children_d.push(sn),Cn.children_d.length&&(ze.children_d=ze.children_d.concat(Cn.children_d));return delete _e.data,delete _e.children,Ve[ze.id].original=_e,ze.state.selected&&ae.push(ze.id),ze.id},_t=function(_e,Et,zt){zt=zt?zt.concat():[],Et&&zt.unshift(Et);var we,yt,sn,Cn,ze,un=!1;do{un="j"+Re+"_"+ ++et}while(Ve[un]);for(we in ze={id:!1,text:"string"==typeof _e?_e:"",icon:"object"!=typeof _e||_e.icon===j||_e.icon,parent:Et,parents:zt,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},le)le.hasOwnProperty(we)&&(ze.state[we]=le[we]);if(_e&&_e.id&&(ze.id=_e.id.toString()),_e&&_e.text&&(ze.text=_e.text),_e&&_e.data&&_e.data.jstree&&_e.data.jstree.icon&&(ze.icon=_e.data.jstree.icon),(ze.icon===j||null===ze.icon||""===ze.icon)&&(ze.icon=!0),_e&&_e.data&&(ze.data=_e.data,_e.data.jstree))for(we in _e.data.jstree)_e.data.jstree.hasOwnProperty(we)&&(ze.state[we]=_e.data.jstree[we]);if(_e&&"object"==typeof _e.state)for(we in _e.state)_e.state.hasOwnProperty(we)&&(ze.state[we]=_e.state[we]);if(_e&&"object"==typeof _e.li_attr)for(we in _e.li_attr)_e.li_attr.hasOwnProperty(we)&&(ze.li_attr[we]=_e.li_attr[we]);if(ze.li_attr.id&&!ze.id&&(ze.id=ze.li_attr.id.toString()),ze.id||(ze.id=un),ze.li_attr.id||(ze.li_attr.id=ze.id),_e&&"object"==typeof _e.a_attr)for(we in _e.a_attr)_e.a_attr.hasOwnProperty(we)&&(ze.a_attr[we]=_e.a_attr[we]);if(_e&&_e.children&&_e.children.length){for(we=0,yt=_e.children.length;yt>we;we++)sn=_t(_e.children[we],ze.id,zt),Cn=Ve[sn],ze.children.push(sn),Cn.children_d.length&&(ze.children_d=ze.children_d.concat(Cn.children_d));ze.children_d=ze.children_d.concat(ze.children)}return _e&&_e.children&&!0===_e.children&&(ze.state.loaded=!1,ze.children=[],ze.children_d=[]),delete _e.data,delete _e.children,ze.original=_e,Ve[ze.id]=ze,ze.state.selected&&ae.push(ze.id),ze.id};if(M.length&&M[0].id!==j&&M[0].parent!==j){for(Le=0,Xe=M.length;Xe>Le;Le++)M[Le].children||(M[Le].children=[]),M[Le].state||(M[Le].state={}),Ve[M[Le].id.toString()]=M[Le];for(Le=0,Xe=M.length;Xe>Le;Le++)Ve[M[Le].parent.toString()]?(Ve[M[Le].parent.toString()].children.push(M[Le].id.toString()),Ge.children_d.push(M[Le].id.toString())):void 0!==m&&(m._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:M[Le].id.toString(),parent:M[Le].parent.toString()})},m.settings.core.error.call(m,m._data.core.last_error));for(Le=0,Xe=Ge.children.length;Xe>Le;Le++)Tt=ft(Ve[Ge.children[Le]],N,Ge.parents.concat()),Q.push(Tt),Ve[Tt].children_d.length&&(Q=Q.concat(Ve[Tt].children_d));for(Le=0,Xe=Ge.parents.length;Xe>Le;Le++)Ve[Ge.parents[Le]].children_d=Ve[Ge.parents[Le]].children_d.concat(Q);ot={cnt:et,mod:Ve,sel:jt,par:N,dpc:Q,add:ae}}else{for(Le=0,Xe=M.length;Xe>Le;Le++)(Tt=_t(M[Le],N,Ge.parents.concat()))&&(te.push(Tt),Q.push(Tt),Ve[Tt].children_d.length&&(Q=Q.concat(Ve[Tt].children_d)));for(Ge.children=te,Ge.children_d=Q,Le=0,Xe=Ge.parents.length;Xe>Le;Le++)Ve[Ge.parents[Le]].children_d=Ve[Ge.parents[Le]].children_d.concat(Q);ot={cnt:et,mod:Ve,sel:jt,par:N,dpc:Q,add:ae}}return"undefined"!=typeof window&&void 0!==window.document?ot:void postMessage(ot)},E=function(T,j){if(null!==this.element){this._cnt=T.cnt;var M,N=this._model.data;for(M in N)N.hasOwnProperty(M)&&N[M].state&&N[M].state.loading&&T.mod[M]&&(T.mod[M].state.loading=!0);if(this._model.data=T.mod,j){var te,Q=T.add,ae=T.sel,le=this._data.core.selected.slice();if(N=this._model.data,ae.length!==le.length||_.vakata.array_unique(ae.concat(le)).length!==ae.length){for(M=0,te=ae.length;te>M;M++)-1===_.inArray(ae[M],Q)&&-1===_.inArray(ae[M],le)&&(N[ae[M]].state.selected=!1);for(M=0,te=le.length;te>M;M++)-1===_.inArray(le[M],ae)&&(N[le[M]].state.selected=!0)}}T.add.length&&(this._data.core.selected=this._data.core.selected.concat(T.add)),this.trigger("model",{nodes:T.dpc,parent:T.par}),T.par!==_.jstree.root?(this._node_changed(T.par),this.redraw()):this.redraw(!0),T.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!j&&ye?ye(function(){o.call(m,!0)}):o.call(m,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+A.toString()],{type:"text/javascript"}))),!this._data.core.working||c?(this._data.core.working=!0,(s=new window.Worker(this._wrk)).onmessage=function(T){E.call(this,T.data,!0);try{s.terminate(),s=null}catch(j){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),g.par?s.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([i,f,o,!0])}catch(T){E.call(this,A(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else E.call(this,A(g),!1)}},_parse_model_from_html:function(i,f,o){o=o?[].concat(o):[],f&&o.unshift(f);var c,s,A,E,T,g=this._model.data,m={id:!1,text:!1,icon:!0,parent:f,parents:o,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(A in this._model.default_state)this._model.default_state.hasOwnProperty(A)&&(m.state[A]=this._model.default_state[A]);if(E=_.vakata.attributes(i,!0),_.each(E,function(j,M){return!(M=_.vakata.trim(M)).length||(m.li_attr[j]=M,void("id"===j&&(m.id=M.toString())))}),(E=i.children("a").first()).length&&(E=_.vakata.attributes(E,!0),_.each(E,function(j,M){(M=_.vakata.trim(M)).length&&(m.a_attr[j]=M)})),(E=i.children("a").first().length?i.children("a").first().clone():i.clone()).children("ins, i, ul").remove(),E=E.html(),E=_("<div></div>").html(E),m.text=this.settings.core.force_text?E.text():E.html(),E=i.data(),m.data=E?_.extend(!0,{},E):null,m.state.opened=i.hasClass("jstree-open"),m.state.selected=i.children("a").hasClass("jstree-clicked"),m.state.disabled=i.children("a").hasClass("jstree-disabled"),m.data&&m.data.jstree)for(A in m.data.jstree)m.data.jstree.hasOwnProperty(A)&&(m.state[A]=m.data.jstree[A]);(E=i.children("a").children(".jstree-themeicon")).length&&(m.icon=!E.hasClass("jstree-themeicon-hidden")&&E.attr("rel")),m.state.icon!==ue&&(m.icon=m.state.icon),(m.icon===ue||null===m.icon||""===m.icon)&&(m.icon=!0),E=i.children("ul").children("li");do{T="j"+this._id+"_"+ ++this._cnt}while(g[T]);return m.id=m.li_attr.id?m.li_attr.id.toString():T,E.length?(E.each(function(j,M){c=this._parse_model_from_html(_(M),m.id,o),s=this._model.data[c],m.children.push(c),s.children_d.length&&(m.children_d=m.children_d.concat(s.children_d))}.bind(this)),m.children_d=m.children_d.concat(m.children)):i.hasClass("jstree-closed")&&(m.state.loaded=!1),m.li_attr.class&&(m.li_attr.class=m.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),m.a_attr.class&&(m.a_attr.class=m.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),g[m.id]=m,m.state.selected&&this._data.core.selected.push(m.id),m.id},_parse_model_from_flat_json:function(i,f,o){o=o?o.concat():[],f&&o.unshift(f);var m,A,E,T,c=i.id.toString(),s=this._model.data,g=this._model.default_state,j={id:c,text:i.text||"",icon:i.icon===ue||i.icon,parent:f,parents:o,children:i.children||[],children_d:i.children_d||[],data:i.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(m in g)g.hasOwnProperty(m)&&(j.state[m]=g[m]);if(i&&i.data&&i.data.jstree&&i.data.jstree.icon&&(j.icon=i.data.jstree.icon),(j.icon===ue||null===j.icon||""===j.icon)&&(j.icon=!0),i&&i.data&&(j.data=i.data,i.data.jstree))for(m in i.data.jstree)i.data.jstree.hasOwnProperty(m)&&(j.state[m]=i.data.jstree[m]);if(i&&"object"==typeof i.state)for(m in i.state)i.state.hasOwnProperty(m)&&(j.state[m]=i.state[m]);if(i&&"object"==typeof i.li_attr)for(m in i.li_attr)i.li_attr.hasOwnProperty(m)&&(j.li_attr[m]=i.li_attr[m]);if(j.li_attr.id||(j.li_attr.id=c),i&&"object"==typeof i.a_attr)for(m in i.a_attr)i.a_attr.hasOwnProperty(m)&&(j.a_attr[m]=i.a_attr[m]);for(i&&i.children&&!0===i.children&&(j.state.loaded=!1,j.children=[],j.children_d=[]),s[j.id]=j,m=0,A=j.children.length;A>m;m++)T=s[E=this._parse_model_from_flat_json(s[j.children[m]],j.id,o)],j.children_d.push(E),T.children_d.length&&(j.children_d=j.children_d.concat(T.children_d));return delete i.data,delete i.children,s[j.id].original=i,j.state.selected&&this._data.core.selected.push(j.id),j.id},_parse_model_from_json:function(i,f,o){o=o?o.concat():[],f&&o.unshift(f);var s,g,m,A,j,c=!1,E=this._model.data,T=this._model.default_state;do{c="j"+this._id+"_"+ ++this._cnt}while(E[c]);for(s in j={id:!1,text:"string"==typeof i?i:"",icon:"object"!=typeof i||i.icon===ue||i.icon,parent:f,parents:o,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},T)T.hasOwnProperty(s)&&(j.state[s]=T[s]);if(i&&i.id&&(j.id=i.id.toString()),i&&i.text&&(j.text=i.text),i&&i.data&&i.data.jstree&&i.data.jstree.icon&&(j.icon=i.data.jstree.icon),(j.icon===ue||null===j.icon||""===j.icon)&&(j.icon=!0),i&&i.data&&(j.data=i.data,i.data.jstree))for(s in i.data.jstree)i.data.jstree.hasOwnProperty(s)&&(j.state[s]=i.data.jstree[s]);if(i&&"object"==typeof i.state)for(s in i.state)i.state.hasOwnProperty(s)&&(j.state[s]=i.state[s]);if(i&&"object"==typeof i.li_attr)for(s in i.li_attr)i.li_attr.hasOwnProperty(s)&&(j.li_attr[s]=i.li_attr[s]);if(j.li_attr.id&&!j.id&&(j.id=j.li_attr.id.toString()),j.id||(j.id=c),j.li_attr.id||(j.li_attr.id=j.id),i&&"object"==typeof i.a_attr)for(s in i.a_attr)i.a_attr.hasOwnProperty(s)&&(j.a_attr[s]=i.a_attr[s]);if(i&&i.children&&i.children.length){for(s=0,g=i.children.length;g>s;s++)A=E[m=this._parse_model_from_json(i.children[s],j.id,o)],j.children.push(m),A.children_d.length&&(j.children_d=j.children_d.concat(A.children_d));j.children_d=j.children.concat(j.children_d)}return i&&i.children&&!0===i.children&&(j.state.loaded=!1,j.children=[],j.children_d=[]),delete i.data,delete i.children,j.original=i,E[j.id]=j,j.state.selected&&this._data.core.selected.push(j.id),j.id},_redraw:function(){var o,c,s,i=this._model.force_full_redraw?this._model.data[_.jstree.root].children.concat([]):this._model.changed.concat([]),f=$.createElement("UL"),g=this._data.core.focused;for(c=0,s=i.length;s>c;c++)(o=this.redraw_node(i[c],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&f.appendChild(o);this._model.force_full_redraw&&(f.className=this.get_container_ul()[0].className,f.setAttribute("role","group"),this.element.empty().append(f)),null!==g&&this.settings.core.restore_focus&&((o=this.get_node(g,!0))&&o.length&&o.children(".jstree-anchor")[0]!==$.activeElement?o.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:i})},redraw:function(i){i&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(i){var f=this.get_node(i),o=!1,c=!1,s=!1,g=$;if(!f)return!1;if(f.id===_.jstree.root)return this.redraw(!0);if(!(i=this.get_node(i,!0))||!i.length)return!1;if(i.children(".jstree-children").remove(),i=i[0],f.children.length&&f.state.loaded){for((s=g.createElement("UL")).setAttribute("role","group"),s.className="jstree-children",o=0,c=f.children.length;c>o;o++)s.appendChild(this.redraw_node(f.children[o],!0,!0));i.appendChild(s)}},redraw_node:function(i,f,o,c){var s=this.get_node(i),g=!1,m=!1,A=!1,E=!1,T=!1,j=!1,M="",N=$,te=this._model.data,Q=!1,le=null,Re=0,et=0,Ve=!1,Ge=!1;if(!s)return!1;if(s.id===_.jstree.root)return this.redraw(!0);if(f=f||0===s.children.length,i=$.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(s.id[0])?"\\3"+s.id[0]+" "+s.id.substr(1).replace(_.jstree.idregex,"\\$&"):s.id.replace(_.jstree.idregex,"\\$&"))):$.getElementById(s.id))i=_(i),o||((g=i.parent().parent()[0])===this.element[0]&&(g=null),m=i.index()),f||!s.children.length||i.children(".jstree-children").length||(f=!0),f||(A=i.children(".jstree-children")[0]),Q=i.children(".jstree-anchor")[0]===$.activeElement,i.remove();else if(f=!0,!o){if(!(null===(g=s.parent!==_.jstree.root?_("#"+s.parent.replace(_.jstree.idregex,"\\$&"),this.element)[0]:null)||g&&te[s.parent].state.opened))return!1;m=_.inArray(s.id,null===g?te[_.jstree.root].children:te[s.parent].children)}for(E in i=this._data.core.node.cloneNode(!0),M="jstree-node ",s.li_attr)if(s.li_attr.hasOwnProperty(E)){if("id"===E)continue;"class"!==E?i.setAttribute(E,s.li_attr[E]):M+=s.li_attr[E]}for(s.a_attr.id||(s.a_attr.id=s.id+"_anchor"),i.childNodes[1].setAttribute("aria-selected",!!s.state.selected),i.childNodes[1].setAttribute("aria-level",s.parents.length),this.settings.core.compute_elements_positions&&(i.childNodes[1].setAttribute("aria-setsize",te[s.parent].children.length),i.childNodes[1].setAttribute("aria-posinset",te[s.parent].children.indexOf(s.id)+1)),s.state.disabled&&i.childNodes[1].setAttribute("aria-disabled",!0),E=0,T=s.children.length;T>E;E++)if(!te[s.children[E]].state.hidden){Ve=!0;break}if(null!==s.parent&&te[s.parent]&&!s.state.hidden&&(E=_.inArray(s.id,te[s.parent].children),Ge=s.id,-1!==E))for(E++,T=te[s.parent].children.length;T>E&&(te[te[s.parent].children[E]].state.hidden||(Ge=te[s.parent].children[E]),Ge===s.id);E++);for(T in s.state.hidden&&(M+=" jstree-hidden"),s.state.loading&&(M+=" jstree-loading"),s.state.loaded&&!Ve?M+=" jstree-leaf":(M+=s.state.opened&&s.state.loaded?" jstree-open":" jstree-closed",i.childNodes[1].setAttribute("aria-expanded",s.state.opened&&s.state.loaded)),Ge===s.id&&(M+=" jstree-last"),i.id=s.id,i.className=M,M=(s.state.selected?" jstree-clicked":"")+(s.state.disabled?" jstree-disabled":""),s.a_attr)if(s.a_attr.hasOwnProperty(T)){if("href"===T&&"#"===s.a_attr[T])continue;"class"!==T?i.childNodes[1].setAttribute(T,s.a_attr[T]):M+=" "+s.a_attr[T]}if(M.length&&(i.childNodes[1].className="jstree-anchor "+M),(s.icon&&!0!==s.icon||!1===s.icon)&&(!1===s.icon?i.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===s.icon.indexOf("/")&&-1===s.icon.indexOf(".")?i.childNodes[1].childNodes[0].className+=" "+s.icon+" jstree-themeicon-custom":(i.childNodes[1].childNodes[0].style.backgroundImage='url("'+s.icon+'")',i.childNodes[1].childNodes[0].style.backgroundPosition="center center",i.childNodes[1].childNodes[0].style.backgroundSize="auto",i.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?i.childNodes[1].appendChild(N.createTextNode(s.text)):i.childNodes[1].innerHTML+=s.text,f&&s.children.length&&(s.state.opened||c)&&s.state.loaded){for((j=N.createElement("UL")).setAttribute("role","group"),j.className="jstree-children",E=0,T=s.children.length;T>E;E++)j.appendChild(this.redraw_node(s.children[E],f,!0));i.appendChild(j)}if(A&&i.appendChild(A),!o){for(g||(g=this.element[0]),E=0,T=g.childNodes.length;T>E;E++)if(g.childNodes[E]&&g.childNodes[E].className&&-1!==g.childNodes[E].className.indexOf("jstree-children")){le=g.childNodes[E];break}le||((le=N.createElement("UL")).setAttribute("role","group"),le.className="jstree-children",g.appendChild(le)),m<(g=le).childNodes.length?g.insertBefore(i,g.childNodes[m]):g.appendChild(i),Q&&(Re=this.element[0].scrollTop,et=this.element[0].scrollLeft,i.childNodes[1].focus(),this.element[0].scrollTop=Re,this.element[0].scrollLeft=et)}return s.state.opened&&!s.state.loaded&&(s.state.opened=!1,setTimeout(function(){this.open_node(s.id,!1,0)}.bind(this),0)),i},open_node:function(i,f,o){var c,s,g,m;if(_.vakata.is_array(i)){for(c=0,s=(i=i.slice()).length;s>c;c++)this.open_node(i[c],f,o);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&(o=o===ue?this.settings.core.animation:o,this.is_closed(i)?this.is_loaded(i)?(g=this.get_node(i,!0),m=this,g.length&&(o&&g.children(".jstree-children").length&&g.children(".jstree-children").stop(!0,!0),i.children.length&&!this._firstChild(g.children(".jstree-children")[0])&&this.draw_children(i),o?(this.trigger("before_open",{node:i}),g.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(o,function(){this.style.display="",m.element&&m.trigger("after_open",{node:i})})):(this.trigger("before_open",{node:i}),g[0].className=g[0].className.replace("jstree-closed","jstree-open"),g[0].childNodes[1].setAttribute("aria-expanded",!0))),i.state.opened=!0,f&&f.call(this,i,!0),g.length||this.trigger("before_open",{node:i}),this.trigger("open_node",{node:i}),o&&g.length||this.trigger("after_open",{node:i}),!0):this.is_loading(i)?setTimeout(function(){this.open_node(i,f,o)}.bind(this),500):void this.load_node(i,function(A,E){return E?this.open_node(A,f,o):!!f&&f.call(this,A,!1)}):(f&&f.call(this,i,!1),!1))},_open_to:function(i){if(!(i=this.get_node(i))||i.id===_.jstree.root)return!1;var f,o,c=i.parents;for(f=0,o=c.length;o>f;f+=1)f!==_.jstree.root&&this.open_node(c[f],!1,0);return _("#"+i.id.replace(_.jstree.idregex,"\\$&"),this.element)},close_node:function(i,f){var o,c,s,g;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.close_node(i[o],f);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&!this.is_closed(i)&&(f=f===ue?this.settings.core.animation:f,s=this,g=this.get_node(i,!0),i.state.opened=!1,this.trigger("close_node",{node:i}),void(g.length?f?g.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(f,function(){this.style.display="",g.children(".jstree-children").remove(),s.element&&s.trigger("after_close",{node:i})}):(g[0].className=g[0].className.replace("jstree-open","jstree-closed"),g.children(".jstree-anchor").attr("aria-expanded",!1),g.children(".jstree-children").remove(),this.trigger("after_close",{node:i})):this.trigger("after_close",{node:i})))},toggle_node:function(i){var f,o;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.toggle_node(i[f]);return!0}return this.is_closed(i)?this.open_node(i):this.is_open(i)?this.close_node(i):void 0},open_all:function(i,f,o){if(i||(i=_.jstree.root),!(i=this.get_node(i)))return!1;var s,g,m,c=i.id===_.jstree.root?this.get_container_ul():this.get_node(i,!0);if(!c.length){for(s=0,g=i.children_d.length;g>s;s++)this.is_closed(this._model.data[i.children_d[s]])&&(this._model.data[i.children_d[s]].state.opened=!0);return this.trigger("open_all",{node:i})}o=o||c,m=this,(c=this.is_closed(i)?c.find(".jstree-closed").addBack():c.find(".jstree-closed")).each(function(){m.open_node(this,function(A,E){E&&this.is_parent(A)&&this.open_all(A,f,o)},f||0)}),0===o.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(o)})},close_all:function(i,f){if(i||(i=_.jstree.root),!(i=this.get_node(i)))return!1;var s,g,o=i.id===_.jstree.root?this.get_container_ul():this.get_node(i,!0),c=this;for(o.length&&(o=this.is_open(i)?o.find(".jstree-open").addBack():o.find(".jstree-open"),_(o.get().reverse()).each(function(){c.close_node(this,f||0)})),s=0,g=i.children_d.length;g>s;s++)this._model.data[i.children_d[s]].state.opened=!1;this.trigger("close_all",{node:i})},is_disabled:function(i){return(i=this.get_node(i))&&i.state&&i.state.disabled},enable_node:function(i){var f,o;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.enable_node(i[f]);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&(i.state.disabled=!1,this.get_node(i,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:i}))},disable_node:function(i){var f,o;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.disable_node(i[f]);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&(i.state.disabled=!0,this.get_node(i,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:i}))},is_hidden:function(i){return!0===(i=this.get_node(i)).state.hidden},hide_node:function(i,f){var o,c;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.hide_node(i[o],!0);return f||this.redraw(),!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&void(i.state.hidden||(i.state.hidden=!0,this._node_changed(i.parent),f||this.redraw(),this.trigger("hide_node",{node:i})))},show_node:function(i,f){var o,c;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.show_node(i[o],!0);return f||this.redraw(),!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&void(i.state.hidden&&(i.state.hidden=!1,this._node_changed(i.parent),f||this.redraw(),this.trigger("show_node",{node:i})))},hide_all:function(i){var f,o=this._model.data,c=[];for(f in o)o.hasOwnProperty(f)&&f!==_.jstree.root&&!o[f].state.hidden&&(o[f].state.hidden=!0,c.push(f));return this._model.force_full_redraw=!0,i||this.redraw(),this.trigger("hide_all",{nodes:c}),c},show_all:function(i){var f,o=this._model.data,c=[];for(f in o)o.hasOwnProperty(f)&&f!==_.jstree.root&&o[f].state.hidden&&(o[f].state.hidden=!1,c.push(f));return this._model.force_full_redraw=!0,i||this.redraw(),this.trigger("show_all",{nodes:c}),c},activate_node:function(i,f){if(this.is_disabled(i))return!1;if(f&&"object"==typeof f||(f={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==ue?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(f.metaKey||f.ctrlKey||f.shiftKey)&&(!f.shiftKey||this._data.core.last_clicked&&this.get_parent(i)&&this.get_parent(i)===this._data.core.last_clicked.parent))if(f.shiftKey){var m,A,o=this.get_node(i).id,c=this._data.core.last_clicked.id,s=this.get_node(this._data.core.last_clicked.parent).children,g=!1;for(m=0,A=s.length;A>m;m+=1)s[m]===o&&(g=!g),s[m]===c&&(g=!g),this.is_disabled(s[m])||!g&&s[m]!==o&&s[m]!==c?this.deselect_node(s[m],!0,f):this.is_hidden(s[m])||this.select_node(s[m],!0,!1,f);this.trigger("changed",{action:"select_node",node:this.get_node(i),selected:this._data.core.selected,event:f})}else this.is_selected(i)?this.deselect_node(i,!1,f):this.select_node(i,!1,!1,f);else!this.settings.core.multiple&&(f.metaKey||f.ctrlKey||f.shiftKey)&&this.is_selected(i)?this.deselect_node(i,!1,f):(this.deselect_all(!0),this.select_node(i,!1,!1,f),this._data.core.last_clicked=this.get_node(i));this.trigger("activate_node",{node:this.get_node(i),event:f})},hover_node:function(i){if(!(i=this.get_node(i,!0))||!i.length||i.children(".jstree-hovered").length)return!1;var f=this.element.find(".jstree-hovered"),o=this.element;f&&f.length&&this.dehover_node(f),i.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(i)}),setTimeout(function(){o.attr("aria-activedescendant",i[0].id)},0)},dehover_node:function(i){return!!((i=this.get_node(i,!0))&&i.length&&i.children(".jstree-hovered").length)&&(i.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(i)}))},select_node:function(i,f,o,c){var s,g,m;if(_.vakata.is_array(i)){for(g=0,m=(i=i.slice()).length;m>g;g++)this.select_node(i[g],f,o,c);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&(s=this.get_node(i,!0),void(i.state.selected||(i.state.selected=!0,this._data.core.selected.push(i.id),o||(s=this._open_to(i)),s&&s.length&&s.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:i,selected:this._data.core.selected,event:c}),f||this.trigger("changed",{action:"select_node",node:i,selected:this._data.core.selected,event:c}))))},deselect_node:function(i,f,o){var c,s,g;if(_.vakata.is_array(i)){for(c=0,s=(i=i.slice()).length;s>c;c++)this.deselect_node(i[c],f,o);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&(g=this.get_node(i,!0),void(i.state.selected&&(i.state.selected=!1,this._data.core.selected=_.vakata.array_remove_item(this._data.core.selected,i.id),g.length&&g.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:i,selected:this._data.core.selected,event:o}),f||this.trigger("changed",{action:"deselect_node",node:i,selected:this._data.core.selected,event:o}))))},select_all:function(i){var o,c,f=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[_.jstree.root].children_d.concat(),o=0,c=this._data.core.selected.length;c>o;o++)this._model.data[this._data.core.selected[o]]&&(this._model.data[this._data.core.selected[o]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),i||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:f})},deselect_all:function(i){var o,c,f=this._data.core.selected.concat([]);for(o=0,c=this._data.core.selected.length;c>o;o++)this._model.data[this._data.core.selected[o]]&&(this._model.data[this._data.core.selected[o]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:f}),i||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:f})},is_selected:function(i){return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&i.state.selected},get_selected:function(i){return i?_.map(this._data.core.selected,function(f){return this.get_node(f)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(i){var c,s,g,m,f=this.get_selected(!0),o={};for(c=0,s=f.length;s>c;c++)o[f[c].id]=f[c];for(c=0,s=f.length;s>c;c++)for(g=0,m=f[c].children_d.length;m>g;g++)o[f[c].children_d[g]]&&delete o[f[c].children_d[g]];for(c in f=[],o)o.hasOwnProperty(c)&&f.push(c);return i?_.map(f,function(A){return this.get_node(A)}.bind(this)):f},get_bottom_selected:function(i){var c,s,f=this.get_selected(!0),o=[];for(c=0,s=f.length;s>c;c++)f[c].children.length||o.push(f[c].id);return i?_.map(o,function(g){return this.get_node(g)}.bind(this)):o},get_state:function(){var f,i={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(f in this._model.data)this._model.data.hasOwnProperty(f)&&f!==_.jstree.root&&(this._model.data[f].state.loaded&&this.settings.core.loaded_state&&i.core.loaded.push(f),this._model.data[f].state.opened&&i.core.open.push(f),this._model.data[f].state.selected&&i.core.selected.push(f));return i},set_state:function(i,f){if(i){if(i.core&&i.core.selected&&i.core.initial_selection===ue&&(i.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),i.core){var g,m;if(i.core.loaded)return this.settings.core.loaded_state&&_.vakata.is_array(i.core.loaded)&&i.core.loaded.length?this._load_nodes(i.core.loaded,function(A){delete i.core.loaded,this.set_state(i,f)}):(delete i.core.loaded,this.set_state(i,f)),!1;if(i.core.open)return _.vakata.is_array(i.core.open)&&i.core.open.length?this._load_nodes(i.core.open,function(A){this.open_node(A,!1,0),delete i.core.open,this.set_state(i,f)}):(delete i.core.open,this.set_state(i,f)),!1;if(i.core.scroll)return i.core.scroll&&i.core.scroll.left!==ue&&this.element.scrollLeft(i.core.scroll.left),i.core.scroll&&i.core.scroll.top!==ue&&this.element.scrollTop(i.core.scroll.top),delete i.core.scroll,this.set_state(i,f),!1;if(i.core.selected)return g=this,(i.core.initial_selection===ue||i.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),_.each(i.core.selected,function(A,E){g.select_node(E,!1,!0)})),delete i.core.initial_selection,delete i.core.selected,this.set_state(i,f),!1;for(m in i)i.hasOwnProperty(m)&&"core"!==m&&-1===_.inArray(m,this.settings.plugins)&&delete i[m];if(_.isEmptyObject(i.core))return delete i.core,this.set_state(i,f),!1}return!_.isEmptyObject(i)||(i=null,f&&f.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(i,f){this._data.core.state=!0===f?{}:this.get_state(),f&&_.vakata.is_function(f)&&(this._data.core.state=f.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[_.jstree.root]={id:_.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var o=this.get_container_ul()[0].className;i||(this.element.html("<ul class='"+o+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(_.jstree.root,function(c,s){s&&(this.get_container_ul()[0].className=o,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(_.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(i){if(!(i=this.get_node(i))||i.id===_.jstree.root)return!1;var f=[],o=[],c=this._data.core.selected.concat([]);o.push(i.id),!0===i.state.opened&&f.push(i.id),this.get_node(i,!0).find(".jstree-open").each(function(){o.push(this.id),f.push(this.id)}),this._load_nodes(o,function(s){this.open_node(f,!1,0),this.select_node(c),this.trigger("refresh_node",{node:i,nodes:s})}.bind(this),!1,!0)},set_id:function(i,f){if(!(i=this.get_node(i))||i.id===_.jstree.root)return!1;var o,c,s=this._model.data,g=i.id;for(f=f.toString(),s[i.parent].children[_.inArray(i.id,s[i.parent].children)]=f,o=0,c=i.parents.length;c>o;o++)s[i.parents[o]].children_d[_.inArray(i.id,s[i.parents[o]].children_d)]=f;for(o=0,c=i.children.length;c>o;o++)s[i.children[o]].parent=f;for(o=0,c=i.children_d.length;c>o;o++)s[i.children_d[o]].parents[_.inArray(i.id,s[i.children_d[o]].parents)]=f;return-1!==(o=_.inArray(i.id,this._data.core.selected))&&(this._data.core.selected[o]=f),(o=this.get_node(i.id,!0))&&(o.attr("id",f),this.element.attr("aria-activedescendant")===i.id&&this.element.attr("aria-activedescendant",f)),delete s[i.id],i.id=f,i.li_attr.id=f,s[f]=i,this.trigger("set_id",{node:i,new:i.id,old:g}),!0},get_text:function(i){return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&i.text},set_text:function(i,f){var o,c;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.set_text(i[o],f);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root||(i.text=f,this.get_node(i,!0).length&&this.redraw_node(i.id),this.trigger("set_text",{obj:i,text:f}),0))},get_json:function(i,f,o){if(!(i=this.get_node(i||_.jstree.root)))return!1;f&&f.flat&&!o&&(o=[]);var s,g,c={id:i.id,text:i.text,icon:this.get_icon(i),li_attr:_.extend(!0,{},i.li_attr),a_attr:_.extend(!0,{},i.a_attr),state:{},data:(!f||!f.no_data)&&_.extend(!0,_.vakata.is_array(i.data)?[]:{},i.data)};if(f&&f.flat?c.parent=i.parent:c.children=[],f&&f.no_state)delete c.state;else for(s in i.state)i.state.hasOwnProperty(s)&&(c.state[s]=i.state[s]);if(f&&f.no_li_attr&&delete c.li_attr,f&&f.no_a_attr&&delete c.a_attr,f&&f.no_id&&(delete c.id,c.li_attr&&c.li_attr.id&&delete c.li_attr.id,c.a_attr&&c.a_attr.id&&delete c.a_attr.id),f&&f.flat&&i.id!==_.jstree.root&&o.push(c),!f||!f.no_children)for(s=0,g=i.children.length;g>s;s++)f&&f.flat?this.get_json(i.children[s],f,o):c.children.push(this.get_json(i.children[s],f));return f&&f.flat?o:i.id===_.jstree.root?c.children:c},create_node:function(i,f,o,c,s){if(null===i&&(i=_.jstree.root),!(i=this.get_node(i)))return!1;if(!(o=o===ue?"last":o).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(i))return this.load_node(i,function(){this.create_node(i,f,o,c,!0)});var g,m,A,E;switch(f||(f={text:this.get_string("New node")}),(f="string"==typeof f?{text:f}:_.extend(!0,{},f)).text===ue&&(f.text=this.get_string("New node")),i.id===_.jstree.root&&("before"===o&&(o="first"),"after"===o&&(o="last")),o){case"before":g=this.get_node(i.parent),o=_.inArray(i.id,g.children),i=g;break;case"after":g=this.get_node(i.parent),o=_.inArray(i.id,g.children)+1,i=g;break;case"inside":case"first":o=0;break;case"last":o=i.children.length;break;default:o||(o=0)}if(o>i.children.length&&(o=i.children.length),f.id||(f.id=!0),!this.check("create_node",f,i,o))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===f.id&&delete f.id,!(f=this._parse_model_from_json(f,i.id,i.parents.concat())))return!1;for(g=this.get_node(f),(m=[]).push(f),m=m.concat(g.children_d),this.trigger("model",{nodes:m,parent:i.id}),i.children_d=i.children_d.concat(m),A=0,E=i.parents.length;E>A;A++)this._model.data[i.parents[A]].children_d=this._model.data[i.parents[A]].children_d.concat(m);for(f=g,g=[],A=0,E=i.children.length;E>A;A++)g[A>=o?A+1:A]=i.children[A];return g[o]=f.id,i.children=g,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(f),parent:i.id,position:o}),c&&c.call(this,this.get_node(f)),f.id},rename_node:function(i,f){var o,c,s;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.rename_node(i[o],f);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root||(s=i.text,this.check("rename_node",i,this.get_parent(i),f)?(this.set_text(i,f),this.trigger("rename_node",{node:i,text:f,old:s}),0):(this.settings.core.error.call(this,this._data.core.last_error),1)))},delete_node:function(i){var f,o,c,s,g,m,A,E,T,j,M,N;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.delete_node(i[f]);return!0}if(!(i=this.get_node(i))||i.id===_.jstree.root)return!1;if(c=this.get_node(i.parent),s=_.inArray(i.id,c.children),j=!1,!this.check("delete_node",i,c,s))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==s&&(c.children=_.vakata.array_remove(c.children,s)),(g=i.children_d.concat([])).push(i.id),m=0,A=i.parents.length;A>m;m++)this._model.data[i.parents[m]].children_d=_.vakata.array_filter(this._model.data[i.parents[m]].children_d,function(te){return-1===_.inArray(te,g)});for(E=0,T=g.length;T>E;E++)if(this._model.data[g[E]].state.selected){j=!0;break}for(j&&(this._data.core.selected=_.vakata.array_filter(this._data.core.selected,function(te){return-1===_.inArray(te,g)})),this.trigger("delete_node",{node:i,parent:c.id}),j&&this.trigger("changed",{action:"delete_node",node:i,selected:this._data.core.selected,parent:c.id}),E=0,T=g.length;T>E;E++)delete this._model.data[g[E]];return-1!==_.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,M=this.element[0].scrollTop,N=this.element[0].scrollLeft,c.id===_.jstree.root?this._model.data[_.jstree.root].children[0]&&this.get_node(this._model.data[_.jstree.root].children[0],!0).children(".jstree-anchor").triger("focus"):this.get_node(c,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=M,this.element[0].scrollLeft=N),this.redraw_node(c,!0),!0},check:function(i,f,o,c,s){f=f&&f.id?f:this.get_node(f),o=o&&o.id?o:this.get_node(o);var g=i.match(/^move_node|copy_node|create_node$/i)?o:f,m=this.settings.core.check_callback;if("move_node"===i||"copy_node"===i){if(!(s&&s.is_multi||"move_node"!==i||_.inArray(f.id,o.children)!==c))return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:i,pos:c,obj:!(!f||!f.id)&&f.id,par:!(!o||!o.id)&&o.id})},!1;if(!(s&&s.is_multi||f.id!==o.id&&("move_node"!==i||_.inArray(f.id,o.children)!==c)&&-1===_.inArray(o.id,f.children_d)))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:i,pos:c,obj:!(!f||!f.id)&&f.id,par:!(!o||!o.id)&&o.id})},!1}return g&&g.data&&(g=g.data),g&&g.functions&&(!1===g.functions[i]||!0===g.functions[i])?(!1===g.functions[i]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+i,data:JSON.stringify({chk:i,pos:c,obj:!(!f||!f.id)&&f.id,par:!(!o||!o.id)&&o.id})}),g.functions[i]):!(!1===m||_.vakata.is_function(m)&&!1===m.call(this,i,f,o,c,s)||m&&!1===m[i])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+i,data:JSON.stringify({chk:i,pos:c,obj:!(!f||!f.id)&&f.id,par:!(!o||!o.id)&&o.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(i,f,o,c,s,g,m){var A,E,T,j,M,N,te,Q,ae,le,Re,et,Ve,Ge;if(f=this.get_node(f),o=o===ue?0:o,!f)return!1;if(!o.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(f))return this.load_node(f,function(){this.move_node(i,f,o,c,!0,!1,m)});if(_.vakata.is_array(i)){if(1!==i.length){for(A=0,E=i.length;E>A;A++)(ae=this.move_node(i[A],f,o,c,s,!1,m))&&(f=ae,o="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===_.jstree.root)return!1;if(T=(i.parent||_.jstree.root).toString(),M=o.toString().match(/^(before|after)$/)&&f.id!==_.jstree.root?this.get_node(f.parent):f,te=!(N=m||(this._model.data[i.id]?this:_.jstree.reference(i.id)))||!N._id||this._id!==N._id,j=N&&N._id&&T&&N._model.data[T]&&N._model.data[T].children?_.inArray(i.id,N._model.data[T].children):-1,N&&N._id&&(i=N._model.data[i.id]),te)return!!(ae=this.copy_node(i,f,o,c,s,!1,m))&&(N&&N.delete_node(i),ae);switch(f.id===_.jstree.root&&("before"===o&&(o="first"),"after"===o&&(o="last")),o){case"before":o=_.inArray(f.id,M.children);break;case"after":o=_.inArray(f.id,M.children)+1;break;case"inside":case"first":o=0;break;case"last":o=M.children.length;break;default:o||(o=0)}if(o>M.children.length&&(o=M.children.length),!this.check("move_node",i,M,o,{core:!0,origin:m,is_multi:N&&N._id&&N._id!==this._id,is_foreign:!N||!N._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===M.id){for(Q=M.children.concat(),-1!==(ae=_.inArray(i.id,Q))&&(Q=_.vakata.array_remove(Q,ae),o>ae&&o--),ae=[],le=0,Re=Q.length;Re>le;le++)ae[le>=o?le+1:le]=Q[le];ae[o]=i.id,M.children=ae,this._node_changed(M.id),this.redraw(M.id===_.jstree.root)}else{for((ae=i.children_d.concat()).push(i.id),le=0,Re=i.parents.length;Re>le;le++){for(Q=[],et=0,Ve=(Ge=N._model.data[i.parents[le]].children_d).length;Ve>et;et++)-1===_.inArray(Ge[et],ae)&&Q.push(Ge[et]);N._model.data[i.parents[le]].children_d=Q}for(N._model.data[T].children=_.vakata.array_remove_item(N._model.data[T].children,i.id),le=0,Re=M.parents.length;Re>le;le++)this._model.data[M.parents[le]].children_d=this._model.data[M.parents[le]].children_d.concat(ae);for(Q=[],le=0,Re=M.children.length;Re>le;le++)Q[le>=o?le+1:le]=M.children[le];for(Q[o]=i.id,M.children=Q,M.children_d.push(i.id),M.children_d=M.children_d.concat(i.children_d),i.parent=M.id,(ae=M.parents.concat()).unshift(M.id),Ge=i.parents.length,i.parents=ae,ae=ae.concat(),le=0,Re=i.children_d.length;Re>le;le++)this._model.data[i.children_d[le]].parents=this._model.data[i.children_d[le]].parents.slice(0,-1*Ge),Array.prototype.push.apply(this._model.data[i.children_d[le]].parents,ae);(T===_.jstree.root||M.id===_.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(T),this._node_changed(M.id)),g||this.redraw()}return c&&c.call(this,i,M,o),this.trigger("move_node",{node:i,parent:M.id,position:o,old_parent:T,old_position:j,is_multi:N&&N._id&&N._id!==this._id,is_foreign:!N||!N._id,old_instance:N,new_instance:this}),i.id},copy_node:function(i,f,o,c,s,g,m){var A,E,T,j,M,N,te,Q,ae,le;if(f=this.get_node(f),o=o===ue?0:o,!f)return!1;if(!o.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(f))return this.load_node(f,function(){this.copy_node(i,f,o,c,!0,!1,m)});if(_.vakata.is_array(i)){if(1!==i.length){for(A=0,E=i.length;E>A;A++)(j=this.copy_node(i[A],f,o,c,s,!0,m))&&(f=j,o="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===_.jstree.root)return!1;switch(Q=(i.parent||_.jstree.root).toString(),ae=o.toString().match(/^(before|after)$/)&&f.id!==_.jstree.root?this.get_node(f.parent):f,(le=m||(this._model.data[i.id]?this:_.jstree.reference(i.id)))&&le._id&&(i=le._model.data[i.id]),f.id===_.jstree.root&&("before"===o&&(o="first"),"after"===o&&(o="last")),o){case"before":o=_.inArray(f.id,ae.children);break;case"after":o=_.inArray(f.id,ae.children)+1;break;case"inside":case"first":o=0;break;case"last":o=ae.children.length;break;default:o||(o=0)}if(o>ae.children.length&&(o=ae.children.length),!this.check("copy_node",i,ae,o,{core:!0,origin:m,is_multi:le&&le._id&&le._id!==this._id,is_foreign:!le||!le._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!((te=le?le.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i)&&(!0===te.id&&delete te.id,te=this._parse_model_from_json(te,ae.id,ae.parents.concat()))))return!1;for(j=this.get_node(te),i&&i.state&&!1===i.state.loaded&&(j.state.loaded=!1),(T=[]).push(te),T=T.concat(j.children_d),this.trigger("model",{nodes:T,parent:ae.id}),M=0,N=ae.parents.length;N>M;M++)this._model.data[ae.parents[M]].children_d=this._model.data[ae.parents[M]].children_d.concat(T);for(T=[],M=0,N=ae.children.length;N>M;M++)T[M>=o?M+1:M]=ae.children[M];return T[o]=j.id,ae.children=T,ae.children_d.push(j.id),ae.children_d=ae.children_d.concat(j.children_d),ae.id===_.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(ae.id),g||this.redraw(ae.id===_.jstree.root),c&&c.call(this,j,ae,o),this.trigger("copy_node",{node:j,original:i,parent:ae.id,position:o,old_parent:Q,old_position:le&&le._id&&Q&&le._model.data[Q]&&le._model.data[Q].children?_.inArray(i.id,le._model.data[Q].children):-1,is_multi:le&&le._id&&le._id!==this._id,is_foreign:!le||!le._id,old_instance:le,new_instance:this}),j.id},cut:function(i){if(i||(i=this._data.core.selected.concat()),_.vakata.is_array(i)||(i=[i]),!i.length)return!1;var o,c,s,f=[];for(c=0,s=i.length;s>c;c++)(o=this.get_node(i[c]))&&o.id&&o.id!==_.jstree.root&&f.push(o);return!!f.length&&(Be=f,je=this,Qe="move_node",void this.trigger("cut",{node:i}))},copy:function(i){if(i||(i=this._data.core.selected.concat()),_.vakata.is_array(i)||(i=[i]),!i.length)return!1;var o,c,s,f=[];for(c=0,s=i.length;s>c;c++)(o=this.get_node(i[c]))&&o.id&&o.id!==_.jstree.root&&f.push(o);return!!f.length&&(Be=f,je=this,Qe="copy_node",void this.trigger("copy",{node:i}))},get_buffer:function(){return{mode:Qe,node:Be,inst:je}},can_paste:function(){return!1!==Qe&&!1!==Be},paste:function(i,f){return!!((i=this.get_node(i))&&Qe&&Qe.match(/^(copy_node|move_node)$/)&&Be)&&(this[Qe](Be,i,f,!1,!1,!1,je)&&this.trigger("paste",{parent:i.id,node:Be,mode:Qe}),Be=!1,Qe=!1,void(je=!1))},clear_buffer:function(){Be=!1,Qe=!1,je=!1,this.trigger("clear_buffer")},edit:function(i,f,o){var c,s,g,m,A,E,T,j,M,N=!1;return!!(i=this.get_node(i))&&(this.check("edit",i,this.get_parent(i))?(M=i,f="string"==typeof f?f:i.text,this.set_text(i,""),i=this._open_to(i),M.text=f,c=this._data.core.rtl,s=this.element.width(),this._data.core.focused=M.id,g=i.children(".jstree-anchor").trigger("focus"),m=_("<span></span>"),A=f,E=_("<div></div>",{css:{position:"absolute",top:"-200px",left:c?"0px":"-1000px",visibility:"hidden"}}).appendTo($.body),T=_("<input />",{value:A,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:function(te){te.stopImmediatePropagation(),te.preventDefault();var Re,ae=m.children(".jstree-rename-input").val(),le=this.settings.core.force_text;""===ae&&(ae=A),E.remove(),m.replaceWith(g),m.remove(),A=le?A:_("<div></div>").append(_.parseHTML(A)).html(),i=this.get_node(i),this.set_text(i,A),(Re=!!this.rename_node(i,le?_("<div></div>").text(ae).text():_("<div></div>").append(_.parseHTML(ae)).html()))||this.set_text(i,A),this._data.core.focused=M.id,setTimeout(function(){var et=this.get_node(M.id,!0);et.length&&(this._data.core.focused=M.id,et.children(".jstree-anchor").trigger("focus"))}.bind(this),0),o&&o.call(this,M,Re,N,ae),T=null}.bind(this),keydown:function(te){var Q=te.which;27===Q&&(N=!0,this.value=A),(27===Q||13===Q||37===Q||38===Q||39===Q||40===Q||32===Q)&&te.stopImmediatePropagation(),(27===Q||13===Q)&&(te.preventDefault(),this.blur())},click:function(te){te.stopImmediatePropagation()},mousedown:function(te){te.stopImmediatePropagation()},keyup:function(te){T.width(Math.min(E.text("pW"+this.value).width(),s))},keypress:function(te){return 13!==te.which&&void 0}}),j={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},m.attr("class",g.attr("class")).append(g.contents().clone()).append(T),g.replaceWith(m),E.css(j),T.css(j).width(Math.min(E.text("pW"+T[0].value).width(),s))[0].select(),void _($).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(te){T&&te.target!==T&&_(T).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(i,f){if(!i)return!1;if(!0===f){var o=this.settings.core.themes.dir;o||(o=_.jstree.path+"/themes"),f=o+"/"+i+"/style.css"}f&&-1===_.inArray(f,pe)&&(_("head").append('<link rel="stylesheet" href="'+f+'" type="text/css" />'),pe.push(f)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=i,this.element.addClass("jstree-"+i),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+i+"-responsive"),this.trigger("set_theme",{theme:i})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(i){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=i,i&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,f){var o,c,s,g;if(_.vakata.is_array(i)){for(o=0,c=(i=i.slice()).length;c>o;o++)this.set_icon(i[o],f);return!0}return!(!(i=this.get_node(i))||i.id===_.jstree.root||(g=i.icon,i.icon=!0===f||null===f||f===ue||""===f||f,s=this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===f?(s.removeClass("jstree-themeicon-custom "+g).css("background","").removeAttr("rel"),this.hide_icon(i)):!0===f||null===f||f===ue||""===f?(s.removeClass("jstree-themeicon-custom "+g).css("background","").removeAttr("rel"),!1===g&&this.show_icon(i)):-1===f.indexOf("/")&&-1===f.indexOf(".")?(s.removeClass(g).css("background",""),s.addClass(f+" jstree-themeicon-custom").attr("rel",f),!1===g&&this.show_icon(i)):(s.removeClass(g).css("background",""),s.addClass("jstree-themeicon-custom").css("background","url('"+f+"') center center no-repeat").attr("rel",f),!1===g&&this.show_icon(i)),0))},get_icon:function(i){return!(!(i=this.get_node(i))||i.id===_.jstree.root)&&i.icon},hide_icon:function(i){var f,o;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.hide_icon(i[f]);return!0}return!(!(i=this.get_node(i))||i===_.jstree.root||(i.icon=!1,this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),0))},show_icon:function(i){var f,o,c;if(_.vakata.is_array(i)){for(f=0,o=(i=i.slice()).length;o>f;f++)this.show_icon(i[f]);return!0}return!(!(i=this.get_node(i))||i===_.jstree.root||(c=this.get_node(i,!0),i.icon=!c.length||c.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),i.icon||(i.icon=!0),c.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),0))}},_.vakata={},_.vakata.attributes=function(i,f){i=_(i)[0];var o=f?{}:[];return i&&i.attributes&&_.each(i.attributes,function(c,s){-1===_.inArray(s.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==s.value&&""!==_.vakata.trim(s.value)&&(f?o[s.name]=s.value:o.push(s.name))}),o},_.vakata.array_unique=function(i){var o,s,f=[],g={};for(o=0,s=i.length;s>o;o++)g[i[o]]===ue&&(f.push(i[o]),g[i[o]]=!0);return f},_.vakata.array_remove=function(i,f){return i.splice(f,1),i},_.vakata.array_remove_item=function(i,f){var o=_.inArray(f,i);return-1!==o?_.vakata.array_remove(i,o):i},_.vakata.array_filter=function(i,f,o,c,s){if(i.filter)return i.filter(f,o);for(s in c=[],i)~~s+""==s+""&&s>=0&&f.call(o,i[s],+s,i)&&c.push(i[s]);return c},_.vakata.trim=function(i){return String.prototype.trim?String.prototype.trim.call(i.toString()):i.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_.vakata.is_function=function(i){return"function"==typeof i&&"number"!=typeof i.nodeType},_.vakata.is_array=Array.isArray||function(i){return"[object Array]"===Object.prototype.toString.call(i)},Function.prototype.bind||(Function.prototype.bind=function(){var i=this,f=arguments[0],o=Array.prototype.slice.call(arguments,1);if("function"!=typeof i)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var c=o.concat(Array.prototype.slice.call(arguments));return i.apply(f,c)}}),_.jstree.plugins.changed=function(i,f){var o=[];this.trigger=function(c,s){var g,m;if(s||(s={}),"changed"===c.replace(".jstree","")){s.changed={selected:[],deselected:[]};var A={};for(g=0,m=o.length;m>g;g++)A[o[g]]=1;for(g=0,m=s.selected.length;m>g;g++)A[s.selected[g]]?A[s.selected[g]]=2:s.changed.selected.push(s.selected[g]);for(g=0,m=o.length;m>g;g++)1===A[o[g]]&&s.changed.deselected.push(o[g]);o=s.selected.slice()}f.trigger.call(this,c,s)},this.refresh=function(c,s){return o=[],f.refresh.apply(this,arguments)}};var fe,V,oe=$.createElement("I");oe.className="jstree-icon jstree-checkbox",oe.setAttribute("role","presentation"),_.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},_.jstree.plugins.checkbox=function(i,f){this.bind=function(){f.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(o,c){var A,E,s=this._model.data,m=c.nodes;for(A=0,E=m.length;E>A;A++)s[m[A]].state.checked=s[m[A]].state.checked||s[m[A]].original&&s[m[A]].original.state&&s[m[A]].original.state.checked,s[m[A]].state.checked&&this._data.checkbox.selected.push(m[A])}.bind(this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",function(o,c){var E,T,j,M,N,te,s=this._model.data,g=s[c.parent],m=c.nodes,A=[],Q=this.settings.checkbox.cascade,ae=this.settings.checkbox.tie_selection;if(-1!==Q.indexOf("down"))if(g.state[ae?"selected":"checked"]){for(T=0,j=m.length;j>T;T++)s[m[T]].state[ae?"selected":"checked"]=!0;this._data[ae?"core":"checkbox"].selected=this._data[ae?"core":"checkbox"].selected.concat(m)}else for(T=0,j=m.length;j>T;T++)if(s[m[T]].state[ae?"selected":"checked"]){for(M=0,N=s[m[T]].children_d.length;N>M;M++)s[s[m[T]].children_d[M]].state[ae?"selected":"checked"]=!0;this._data[ae?"core":"checkbox"].selected=this._data[ae?"core":"checkbox"].selected.concat(s[m[T]].children_d)}if(-1!==Q.indexOf("up")){for(T=0,j=g.children_d.length;j>T;T++)s[g.children_d[T]].children.length||A.push(s[g.children_d[T]].parent);for(M=0,N=(A=_.vakata.array_unique(A)).length;N>M;M++)for(g=s[A[M]];g&&g.id!==_.jstree.root;){for(E=0,T=0,j=g.children.length;j>T;T++)E+=s[g.children[T]].state[ae?"selected":"checked"];if(E!==j)break;g.state[ae?"selected":"checked"]=!0,this._data[ae?"core":"checkbox"].selected.push(g.id),(te=this.get_node(g,!0))&&te.length&&te.attr("aria-selected",!0).children(".jstree-anchor").addClass(ae?"jstree-clicked":"jstree-checked"),g=this.get_node(g.parent)}}this._data[ae?"core":"checkbox"].selected=_.vakata.array_unique(this._data[ae?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(o,c){var E,T,j,M,g=c.node,m=this._model.data,A=this.get_node(g.parent),N=this.settings.checkbox.cascade,te=this.settings.checkbox.tie_selection,Q={},ae=this._data[te?"core":"checkbox"].selected;for(E=0,T=ae.length;T>E;E++)Q[ae[E]]=!0;if(-1!==N.indexOf("down")){var le=this._cascade_new_checked_state(g.id,!0),Re=g.children_d.concat(g.id);for(E=0,T=Re.length;T>E;E++)le.indexOf(Re[E])>-1?Q[Re[E]]=!0:delete Q[Re[E]]}if(-1!==N.indexOf("up"))for(;A&&A.id!==_.jstree.root;){for(j=0,E=0,T=A.children.length;T>E;E++)j+=m[A.children[E]].state[te?"selected":"checked"];if(j!==T)break;A.state[te?"selected":"checked"]=!0,Q[A.id]=!0,(M=this.get_node(A,!0))&&M.length&&M.attr("aria-selected",!0).children(".jstree-anchor").addClass(te?"jstree-clicked":"jstree-checked"),A=this.get_node(A.parent)}for(E in ae=[],Q)Q.hasOwnProperty(E)&&ae.push(E);this._data[te?"core":"checkbox"].selected=ae}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(o,c){var m,A,E,s=this.get_node(_.jstree.root),g=this._model.data;for(m=0,A=s.children_d.length;A>m;m++)(E=g[s.children_d[m]])&&E.original&&E.original.state&&E.original.state.undetermined&&(E.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(o,c){var A,E,T,g=c.node,j=(this.get_node(g,!0),this.settings.checkbox.cascade),M=this.settings.checkbox.tie_selection,N=this._data[M?"core":"checkbox"].selected,ae=g.children_d.concat(g.id);if(-1!==j.indexOf("down")){var le=this._cascade_new_checked_state(g.id,!1);N=_.vakata.array_filter(N,function(Re){return-1===ae.indexOf(Re)||le.indexOf(Re)>-1})}if(-1!==j.indexOf("up")&&-1===N.indexOf(g.id)){for(A=0,E=g.parents.length;E>A;A++)(T=this._model.data[g.parents[A]]).state[M?"selected":"checked"]=!1,T&&T.original&&T.original.state&&T.original.state.undetermined&&(T.original.state.undetermined=!1),(T=this.get_node(g.parents[A],!0))&&T.length&&T.attr("aria-selected",!1).children(".jstree-anchor").removeClass(M?"jstree-clicked":"jstree-checked");N=_.vakata.array_filter(N,function(Re){return-1===g.parents.indexOf(Re)})}this._data[M?"core":"checkbox"].selected=N}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(o,c){for(var m,A,E,T,s=this.get_node(c.parent),g=this._model.data,j=this.settings.checkbox.tie_selection;s&&s.id!==_.jstree.root&&!s.state[j?"selected":"checked"];){for(E=0,m=0,A=s.children.length;A>m;m++)E+=g[s.children[m]].state[j?"selected":"checked"];if(!(A>0&&E===A))break;s.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(s.id),(T=this.get_node(s,!0))&&T.length&&T.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),s=this.get_node(s.parent)}}.bind(this)).on("move_node.jstree",function(o,c){var E,T,j,M,N,s=c.is_multi,g=c.old_parent,m=this.get_node(c.parent),A=this._model.data,te=this.settings.checkbox.tie_selection;if(!s)for(E=this.get_node(g);E&&E.id!==_.jstree.root&&!E.state[te?"selected":"checked"];){for(T=0,j=0,M=E.children.length;M>j;j++)T+=A[E.children[j]].state[te?"selected":"checked"];if(!(M>0&&T===M))break;E.state[te?"selected":"checked"]=!0,this._data[te?"core":"checkbox"].selected.push(E.id),(N=this.get_node(E,!0))&&N.length&&N.attr("aria-selected",!0).children(".jstree-anchor").addClass(te?"jstree-clicked":"jstree-checked"),E=this.get_node(E.parent)}for(E=m;E&&E.id!==_.jstree.root;){for(T=0,j=0,M=E.children.length;M>j;j++)T+=A[E.children[j]].state[te?"selected":"checked"];if(T===M)E.state[te?"selected":"checked"]||(E.state[te?"selected":"checked"]=!0,this._data[te?"core":"checkbox"].selected.push(E.id),(N=this.get_node(E,!0))&&N.length&&N.attr("aria-selected",!0).children(".jstree-anchor").addClass(te?"jstree-clicked":"jstree-checked"));else{if(!E.state[te?"selected":"checked"])break;E.state[te?"selected":"checked"]=!1,this._data[te?"core":"checkbox"].selected=_.vakata.array_remove_item(this._data[te?"core":"checkbox"].selected,E.id),(N=this.get_node(E,!0))&&N.length&&N.attr("aria-selected",!1).children(".jstree-anchor").removeClass(te?"jstree-clicked":"jstree-checked")}E=this.get_node(E.parent)}}.bind(this))},this.get_undetermined=function(o){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var c,s,g,m,A={},E=this._model.data,T=this.settings.checkbox.tie_selection,j=this._data[T?"core":"checkbox"].selected,M=[],N=this,te=[];for(c=0,s=j.length;s>c;c++)if(E[j[c]]&&E[j[c]].parents)for(g=0,m=E[j[c]].parents.length;m>g&&A[E[j[c]].parents[g]]===ue;g++)E[j[c]].parents[g]!==_.jstree.root&&(A[E[j[c]].parents[g]]=!0,M.push(E[j[c]].parents[g]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var ae,Q=N.get_node(this);if(Q)if(Q.state.loaded){for(c=0,s=Q.children_d.length;s>c;c++)if(!(ae=E[Q.children_d[c]]).state.loaded&&ae.original&&ae.original.state&&ae.original.state.undetermined&&!0===ae.original.state.undetermined)for(A[ae.id]===ue&&ae.id!==_.jstree.root&&(A[ae.id]=!0,M.push(ae.id)),g=0,m=ae.parents.length;m>g;g++)A[ae.parents[g]]===ue&&ae.parents[g]!==_.jstree.root&&(A[ae.parents[g]]=!0,M.push(ae.parents[g]))}else if(Q.original&&Q.original.state&&Q.original.state.undetermined&&!0===Q.original.state.undetermined)for(A[Q.id]===ue&&Q.id!==_.jstree.root&&(A[Q.id]=!0,M.push(Q.id)),g=0,m=Q.parents.length;m>g;g++)A[Q.parents[g]]===ue&&Q.parents[g]!==_.jstree.root&&(A[Q.parents[g]]=!0,M.push(Q.parents[g]))}),c=0,s=M.length;s>c;c++)E[M[c]].state[T?"selected":"checked"]||te.push(o?E[M[c]]:M[c]);return te},this._undetermined=function(){if(null!==this.element){var c,s,g,o=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),c=0,s=o.length;s>c;c++)(g=this.get_node(o[c],!0))&&g.length&&g.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(o,c,s,g){if(o=f.redraw_node.apply(this,arguments)){var m,A,E=null,T=null;for(m=0,A=o.childNodes.length;A>m;m++)if(o.childNodes[m]&&o.childNodes[m].className&&-1!==o.childNodes[m].className.indexOf("jstree-anchor")){E=o.childNodes[m];break}E&&(!this.settings.checkbox.tie_selection&&this._model.data[o.id].state.checked&&(E.className+=" jstree-checked"),T=oe.cloneNode(!1),this._model.data[o.id].state.checkbox_disabled&&(T.className+=" jstree-checkbox-disabled"),E.insertBefore(T,E.childNodes[0]))}return s||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),o},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(o){o=this.get_node(o);var s,g,c=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection,A=this._data[m?"core":"checkbox"].selected,E=this._model.data;if(!o||!0===o.state[m?"selected":"checked"]||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!o.state.loaded&&!0===o.original.state.undetermined)return!0;for(s=0,g=o.children_d.length;g>s;s++)if(-1!==_.inArray(o.children_d[s],A)||!E[o.children_d[s]].state.loaded&&E[o.children_d[s]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(o){var c,s,g;if(_.vakata.is_array(o)){for(c=0,s=(o=o.slice()).length;s>c;c++)this.disable_checkbox(o[c]);return!0}return!(!(o=this.get_node(o))||o.id===_.jstree.root)&&(g=this.get_node(o,!0),void(o.state.checkbox_disabled||(o.state.checkbox_disabled=!0,g&&g.length&&g.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:o}))))},this.enable_checkbox=function(o){var c,s,g;if(_.vakata.is_array(o)){for(c=0,s=(o=o.slice()).length;s>c;c++)this.enable_checkbox(o[c]);return!0}return!(!(o=this.get_node(o))||o.id===_.jstree.root)&&(g=this.get_node(o,!0),void(o.state.checkbox_disabled&&(o.state.checkbox_disabled=!1,g&&g.length&&g.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:o}))))},this.activate_node=function(o,c){return!_(c.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||_(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!_(c.target).hasClass("jstree-checkbox")?f.activate_node.call(this,o,c):!this.is_disabled(o)&&(this.is_checked(o)?this.uncheck_node(o,c):this.check_node(o,c),void this.trigger("activate_node",{node:this.get_node(o)})))},this._cascade_new_checked_state=function(o,c){var T,j,M,g=this.settings.checkbox.tie_selection,m=this._model.data[o],A=[],E=[];if(!this.settings.checkbox.cascade_to_disabled&&m.state.disabled||!this.settings.checkbox.cascade_to_hidden&&m.state.hidden)M=this.get_checked_descendants(o),m.state[g?"selected":"checked"]&&M.push(m.id),A=A.concat(M);else{if(m.children)for(T=0,j=m.children.length;j>T;T++){var N=m.children[T];M=this._cascade_new_checked_state(N,c),A=A.concat(M),M.indexOf(N)>-1&&E.push(N)}var te=this.get_node(m,!0),Q=E.length>0&&E.length<m.children.length;m.original&&m.original.state&&m.original.state.undetermined&&(m.original.state.undetermined=Q),Q?(m.state[g?"selected":"checked"]=!1,te.attr("aria-selected",!1).children(".jstree-anchor").removeClass(g?"jstree-clicked":"jstree-checked")):c&&E.length===m.children.length?(m.state[g?"selected":"checked"]=c,A.push(m.id),te.attr("aria-selected",!0).children(".jstree-anchor").addClass(g?"jstree-clicked":"jstree-checked")):(m.state[g?"selected":"checked"]=!1,te.attr("aria-selected",!1).children(".jstree-anchor").removeClass(g?"jstree-clicked":"jstree-checked"))}return A},this.get_checked_descendants=function(o){var c=this,s=c.settings.checkbox.tie_selection;return _.vakata.array_filter(c._model.data[o].children_d,function(m){return c._model.data[m].state[s?"selected":"checked"]})},this.check_node=function(o,c){if(this.settings.checkbox.tie_selection)return this.select_node(o,!1,!0,c);var s,g,m;if(_.vakata.is_array(o)){for(g=0,m=(o=o.slice()).length;m>g;g++)this.check_node(o[g],c);return!0}return!(!(o=this.get_node(o))||o.id===_.jstree.root)&&(s=this.get_node(o,!0),void(o.state.checked||(o.state.checked=!0,this._data.checkbox.selected.push(o.id),s&&s.length&&s.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:o,selected:this._data.checkbox.selected,event:c}))))},this.uncheck_node=function(o,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(o,!1,c);var s,g,m;if(_.vakata.is_array(o)){for(s=0,g=(o=o.slice()).length;g>s;s++)this.uncheck_node(o[s],c);return!0}return!(!(o=this.get_node(o))||o.id===_.jstree.root)&&(m=this.get_node(o,!0),void(o.state.checked&&(o.state.checked=!1,this._data.checkbox.selected=_.vakata.array_remove_item(this._data.checkbox.selected,o.id),m.length&&m.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:o,selected:this._data.checkbox.selected,event:c}))))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var c,s;for(this._data.checkbox.selected.concat([]),this._data.checkbox.selected=this._model.data[_.jstree.root].children_d.concat(),c=0,s=this._data.checkbox.selected.length;s>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var c,s,o=this._data.checkbox.selected.concat([]);for(c=0,s=this._data.checkbox.selected.length;s>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:o})},this.is_checked=function(o){return this.settings.checkbox.tie_selection?this.is_selected(o):!(!(o=this.get_node(o))||o.id===_.jstree.root)&&o.state.checked},this.get_checked=function(o){return this.settings.checkbox.tie_selection?this.get_selected(o):o?_.map(this._data.checkbox.selected,function(c){return this.get_node(c)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(o){if(this.settings.checkbox.tie_selection)return this.get_top_selected(o);var g,m,A,E,c=this.get_checked(!0),s={};for(g=0,m=c.length;m>g;g++)s[c[g].id]=c[g];for(g=0,m=c.length;m>g;g++)for(A=0,E=c[g].children_d.length;E>A;A++)s[c[g].children_d[A]]&&delete s[c[g].children_d[A]];for(g in c=[],s)s.hasOwnProperty(g)&&c.push(g);return o?_.map(c,function(T){return this.get_node(T)}.bind(this)):c},this.get_bottom_checked=function(o){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(o);var g,m,c=this.get_checked(!0),s=[];for(g=0,m=c.length;m>g;g++)c[g].children.length||s.push(c[g].id);return o?_.map(s,function(A){return this.get_node(A)}.bind(this)):s},this.load_node=function(o,c){var s,g,T;if(!_.vakata.is_array(o)&&!this.settings.checkbox.tie_selection&&(T=this.get_node(o))&&T.state.loaded)for(s=0,g=T.children_d.length;g>s;s++)this._model.data[T.children_d[s]].state.checked&&(this._data.checkbox.selected=_.vakata.array_remove_item(this._data.checkbox.selected,T.children_d[s]));return f.load_node.apply(this,arguments)},this.get_state=function(){var o=f.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(o.checkbox=this._data.checkbox.selected.slice()),o},this.set_state=function(o,c){var s=f.set_state.apply(this,arguments);if(s&&o.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var g=this;_.each(o.checkbox,function(m,A){g.check_node(A)})}return delete o.checkbox,this.set_state(o,c),!1}return s},this.refresh=function(o,c){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),f.refresh.apply(this,arguments)}},_.jstree.defaults.conditionalselect=function(){return!0},_.jstree.plugins.conditionalselect=function(i,f){this.activate_node=function(o,c){return this.settings.conditionalselect.call(this,this.get_node(o),c)?f.activate_node.call(this,o,c):void 0}},_.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(i,f){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.create_node(s,{},"last",function(g){try{c.edit(g)}catch(m){setTimeout(function(){c.edit(g)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.edit(s)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.is_selected(s)?c.delete_node(c.get_selected()):c.delete_node(s)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.is_selected(s)?c.cut(c.get_top_selected()):c.cut(s)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.is_selected(s)?c.copy(c.get_top_selected()):c.copy(s)}},paste:{separator_before:!1,icon:!1,_disabled:function(o){return!_.jstree.reference(o.reference).can_paste()},separator_after:!1,label:"Paste",action:function(o){var c=_.jstree.reference(o.reference),s=c.get_node(o.reference);c.paste(s)}}}}}}},_.jstree.plugins.contextmenu=function(i,f){this.bind=function(){f.bind.call(this);var s,g,o=0,c=null;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(m,A){"input"!==m.target.tagName.toLowerCase()&&(m.preventDefault(),o=m.ctrlKey?+new Date:0,(A||c)&&(o=+new Date+1e4),c&&clearTimeout(c),this.is_loading(m.currentTarget)||this.show_contextmenu(m.currentTarget,m.pageX,m.pageY,m))}.bind(this)).on("click.jstree",".jstree-anchor",function(m){this._data.contextmenu.visible&&(!o||+new Date-o>250)&&_.vakata.context.hide(),o=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(m){m.originalEvent&&m.originalEvent.changedTouches&&m.originalEvent.changedTouches[0]&&(s=m.originalEvent.changedTouches[0].clientX,g=m.originalEvent.changedTouches[0].clientY,c=setTimeout(function(){_(m.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(m){c&&m.originalEvent&&m.originalEvent.changedTouches&&m.originalEvent.changedTouches[0]&&(Math.abs(s-m.originalEvent.changedTouches[0].clientX)>10||Math.abs(g-m.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(c),_.vakata.context.hide())}).on("touchend.vakata.jstree",function(m){c&&clearTimeout(c)}),_($).on("context_hide.vakata.jstree",function(m,A){this._data.contextmenu.visible=!1,_(A.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&_.vakata.context.hide(),_($).off("context_hide.vakata.jstree"),f.teardown.call(this)},this.show_contextmenu=function(o,c,s,g){if(!(o=this.get_node(o))||o.id===_.jstree.root)return!1;var m=this.settings.contextmenu,E=this.get_node(o,!0).children(".jstree-anchor"),T=!1,j=!1;(m.show_at_node||c===ue||s===ue)&&(T=E.offset(),c=T.left,s=T.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(o)&&this.activate_node(o,g),_.vakata.is_function(j=m.items)&&(j=j.call(this,o,function(M){this._show_contextmenu(o,c,s,M)}.bind(this))),_.isPlainObject(j)&&this._show_contextmenu(o,c,s,j)},this._show_contextmenu=function(o,c,s,g){var A=this.get_node(o,!0).children(".jstree-anchor");_($).one("context_show.vakata.jstree",function(E,T){var j="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";_(T.element).addClass(j),A.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,_.vakata.context.show(A,{x:c,y:s},g),this.trigger("show_contextmenu",{node:o,x:c,y:s})}},f=!1,o={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1},(i=_).vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(c){i($).triggerHandler("context_"+c+".vakata",{reference:o.reference,element:o.element,position:{x:o.position_x,y:o.position_y}})},_execute:function(c){return!(!(c=o.items[c])||c._disabled&&(!i.vakata.is_function(c._disabled)||c._disabled({item:c,reference:o.reference,element:o.element}))||!c.action)&&c.action.call(null,{item:c,reference:o.reference,element:o.element,position:{x:o.position_x,y:o.position_y}})},_parse:function(c,s){if(!c)return!1;s||(o.html="",o.items=[]);var A,g="",m=!1;return s&&(g+="<ul>"),i.each(c,function(E,T){return!T||(o.items.push(T),!m&&T.separator_before&&(g+="<li class='vakata-context-separator'><a href='#' "+(i.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>"),m=!1,g+="<li class='"+(T._class||"")+(!0===T._disabled||i.vakata.is_function(T._disabled)&&T._disabled({item:T,reference:o.reference,element:o.element})?" vakata-contextmenu-disabled ":"")+"' "+(T.shortcut?" data-shortcut='"+T.shortcut+"' ":"")+">",g+="<a href='#' rel='"+(o.items.length-1)+"' "+(T.title?"title='"+T.title+"'":"")+">",i.vakata.context.settings.icons&&(g+="<i ",T.icon&&(g+=-1!==T.icon.indexOf("/")||-1!==T.icon.indexOf(".")?" style='background:url(\""+T.icon+"\") center center no-repeat' ":" class='"+T.icon+"' "),g+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),g+=(i.vakata.is_function(T.label)?T.label({item:E,reference:o.reference,element:o.element}):T.label)+(T.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+T.shortcut+'">'+(T.shortcut_label||"")+"</span>":"")+"</a>",T.submenu&&(A=i.vakata.context._parse(T.submenu,!0))&&(g+=A),g+="</li>",void(T.separator_after&&(g+="<li class='vakata-context-separator'><a href='#' "+(i.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>",m=!0)))}),g=g.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),s&&(g+="</ul>"),s||(o.html=g,i.vakata.context._trigger("parse")),g.length>10&&g},_show_submenu:function(c){if((c=i(c)).length&&c.children("ul").length){var s=c.children("ul"),g=c.offset().left,m=g+c.outerWidth(),A=c.offset().top,E=s.width(),T=s.height(),j=i(window).width()+i(window).scrollLeft(),M=i(window).height()+i(window).scrollTop();f?c[m-(E+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[m+E>j&&g>j-m?"addClass":"removeClass"]("vakata-context-right"),A+T+10>M&&s.css("bottom","-1px"),c.hasClass("vakata-context-right")?E>g&&s.css("margin-right",g-E):E>j-m&&s.css("margin-left",j-m-E),s.show()}},show:function(c,s,g){var m,A,E,T,j,M,N,te;switch(o.element&&o.element.length&&o.element.width(""),!0){case!s&&!c:return!1;case!!s&&!!c:o.reference=c,o.position_x=s.x,o.position_y=s.y;break;case!s&&!!c:o.reference=c,m=c.offset(),o.position_x=m.left+c.outerHeight(),o.position_y=m.top;break;case!!s&&!c:o.position_x=s.x,o.position_y=s.y}c&&!g&&i(c).data("vakata_contextmenu")&&(g=i(c).data("vakata_contextmenu")),i.vakata.context._parse(g)&&o.element.html(o.html),o.items.length&&(o.element.appendTo($.body),E=o.position_x,T=o.position_y,j=(A=o.element).width(),M=A.height(),N=i(window).width()+i(window).scrollLeft(),te=i(window).height()+i(window).scrollTop(),f&&(E-=A.outerWidth()-i(c).outerWidth())<i(window).scrollLeft()+20&&(E=i(window).scrollLeft()+20),E+j+20>N&&(E=N-(j+20)),T+M+20>te&&(T=te-(M+20)),o.element.css({left:E,top:T}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),o.is_visible=!0,i.vakata.context._trigger("show"))},hide:function(){o.is_visible&&(o.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),o.is_visible=!1,i.vakata.context._trigger("hide"))}},i(function(){f="rtl"===i($.body).css("direction");var c=!1;o.element=i("<ul class='vakata-context'></ul>"),o.element.on("mouseenter","li",function(s){s.stopImmediatePropagation(),i.contains(this,s.relatedTarget)||(c&&clearTimeout(c),o.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),i(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),i.vakata.context._show_submenu(this))}).on("mouseleave","li",function(s){i.contains(this,s.relatedTarget)||i(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(s){i(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),i.vakata.context.settings.hide_onmouseleave&&(c=setTimeout(function(){i.vakata.context.hide()},i.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(s){s.preventDefault(),i(this).trigger("blur").parent().hasClass("vakata-context-disabled")||!1===i.vakata.context._execute(i(this).attr("rel"))||i.vakata.context.hide()}).on("keydown","a",function(s){var g=null;switch(s.which){case 13:case 32:s.type="click",s.preventDefault(),i(s.currentTarget).trigger(s);break;case 37:o.is_visible&&(o.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),s.stopImmediatePropagation(),s.preventDefault());break;case 38:o.is_visible&&((g=o.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(g=o.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),g.addClass("vakata-context-hover").children("a").trigger("focus"),s.stopImmediatePropagation(),s.preventDefault());break;case 39:o.is_visible&&(o.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),s.stopImmediatePropagation(),s.preventDefault());break;case 40:o.is_visible&&((g=o.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(g=o.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),g.addClass("vakata-context-hover").children("a").trigger("focus"),s.stopImmediatePropagation(),s.preventDefault());break;case 27:i.vakata.context.hide(),s.preventDefault()}}).on("keydown",function(s){s.preventDefault();var g=o.element.find(".vakata-contextmenu-shortcut-"+s.which).parent();g.parent().not(".vakata-context-disabled")&&g.trigger("click")}),i($).on("mousedown.vakata.jstree",function(s){o.is_visible&&o.element[0]!==s.target&&!i.contains(o.element[0],s.target)&&i.vakata.context.hide()}).on("context_show.vakata.jstree",function(s,g){o.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),f&&o.element.addClass("vakata-context-rtl").css("direction","rtl"),o.element.find("ul").hide().end()})}),_.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},_.jstree.plugins.dnd=function(i,f){this.init=function(o,c){f.init.call(this,o,c),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in $.createElement("span")},this.bind=function(){f.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(o){if(this.settings.dnd.large_drag_target&&_(o.target).closest(".jstree-node")[0]!==o.currentTarget||"touchstart"===o.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!_(o.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(o.target),s=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,g=s>1?s+" "+this.get_string("nodes"):this.get_text(o.currentTarget);if(this.settings.core.force_text&&(g=_.vakata.html.escape(g)),c&&c.id&&c.id!==_.jstree.root&&(1===o.which||"touchstart"===o.type||"dragstart"===o.type)&&(!0===this.settings.dnd.is_draggable||_.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,s>1?this.get_top_selected(!0):[c],o))){if(fe={jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:s>1?this.get_top_selected():[c.id]},V=o.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),_.vakata.dnd.start(o,fe,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+g+'<ins class="jstree-copy">+</ins></div>');_.vakata.dnd._trigger("start",o,{helper:_(),element:V,data:fe})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(o){return o.preventDefault(),_.vakata.dnd._trigger("move",o,{helper:_(),element:V,data:fe}),!1}).on("drop.jstree",function(o){return o.preventDefault(),_.vakata.dnd._trigger("stop",o,{helper:_(),element:V,data:fe}),!1}.bind(this))},this.redraw_node=function(o,c,s,g){if((o=f.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)o.setAttribute("draggable",!0);else{var m,A,E=null;for(m=0,A=o.childNodes.length;A>m;m++)if(o.childNodes[m]&&o.childNodes[m].className&&-1!==o.childNodes[m].className.indexOf("jstree-anchor")){E=o.childNodes[m];break}E&&E.setAttribute("draggable",!0)}return o}},_(function(){var i=!1,f=!1,o=!1,c=!1,s=_('<div id="jstree-marker">&#160;</div>').hide();_($).on("dragover.vakata.jstree",function(g){V&&_.vakata.dnd._trigger("move",g,{helper:_(),element:V,data:fe})}).on("drop.vakata.jstree",function(g){V&&(_.vakata.dnd._trigger("stop",g,{helper:_(),element:V,data:fe}),V=null,fe=null)}).on("dnd_start.vakata.jstree",function(g,m){i=!1,o=!1,m&&m.data&&m.data.jstree&&s.appendTo($.body)}).on("dnd_move.vakata.jstree",function(g,m){var A=m.event.target!==o.target;if(c&&(!m.event||"dragover"!==m.event.type||A)&&clearTimeout(c),m&&m.data&&m.data.jstree&&(!m.event.target.id||"jstree-marker"!==m.event.target.id)){o=m.event;var te,Q,ae,le,Re,et,Ve,Ge,jt,Tt,Le,Xe,ot,ft,_t,_e,Et,E=_.jstree.reference(m.event.target),T=!1,j=!1,M=!1;if(E&&E._data&&E._data.dnd)if(s.attr("class","jstree-"+E.get_theme()+(E.settings.core.themes.responsive?" jstree-dnd-responsive":"")),_t=m.data.origin&&(m.data.origin.settings.dnd.always_copy||m.data.origin.settings.dnd.copy&&(m.event.metaKey||m.event.ctrlKey)),m.helper.children().attr("class","jstree-"+E.get_theme()+" jstree-"+E.get_theme()+"-"+E.get_theme_variant()+" "+(E.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[_t?"show":"hide"](),m.event.target!==E.element[0]&&m.event.target!==E.get_container_ul()[0]||0!==E.get_container_ul().children().length){if((T=E.settings.dnd.large_drop_target?_(m.event.target).closest(".jstree-node").children(".jstree-anchor"):_(m.event.target).closest(".jstree-anchor"))&&T.length&&T.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(j=T.offset(),M=(m.event.pageY!==ue?m.event.pageY:m.event.originalEvent.pageY)-j.top,ae=T.outerHeight(),_.each(et=ae/3>M?["b","i","a"]:M>ae-ae/3?["a","i","b"]:M>ae/2?["i","a","b"]:["i","b","a"],function(zt,un){switch(un){case"b":te=j.left-6,Q=j.top,le=E.get_parent(T),Re=T.parent().index(),Et="jstree-below";break;case"i":ot=E.settings.dnd.inside_pos,ft=E.get_node(T.parent()),te=j.left-2,Q=j.top+ae/2+1,le=ft.id,Re="first"===ot?0:"last"===ot?ft.children.length:Math.min(ot,ft.children.length),Et="jstree-inside";break;case"a":te=j.left-6,Q=j.top+ae,le=E.get_parent(T),Re=T.parent().index()+1,Et="jstree-above"}for(Ve=!0,Ge=0,jt=m.data.nodes.length;jt>Ge;Ge++)if(Le=Re,"move_node"==(Tt=m.data.origin&&(m.data.origin.settings.dnd.always_copy||m.data.origin.settings.dnd.copy&&(m.event.metaKey||m.event.ctrlKey))?"copy_node":"move_node")&&"a"===un&&m.data.origin&&m.data.origin===E&&le===E.get_parent(m.data.nodes[Ge])&&(Xe=E.get_node(le),Le>_.inArray(m.data.nodes[Ge],Xe.children)&&(Le-=1)),!(Ve=Ve&&(E&&E.settings&&E.settings.dnd&&!1===E.settings.dnd.check_while_dragging||E.check(Tt,m.data.origin&&m.data.origin!==E?m.data.origin.get_node(m.data.nodes[Ge]):m.data.nodes[Ge],le,Le,{dnd:!0,ref:E.get_node(T.parent()),pos:un,origin:m.data.origin,is_multi:m.data.origin&&m.data.origin!==E,is_foreign:!m.data.origin})))){E&&E.last_error&&(f=E.last_error());break}return"i"===un&&T.parent().is(".jstree-closed")&&E.settings.dnd.open_timeout&&(!m.event||"dragover"!==m.event.type||A)&&(c&&clearTimeout(c),c=setTimeout((we=E,yt=T,function(){we.open_node(yt)}),E.settings.dnd.open_timeout)),Ve?((_e=E.get_node(le,!0)).hasClass(".jstree-dnd-parent")||(_(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),_e.addClass("jstree-dnd-parent")),i={ins:E,par:le,pos:"i"!==un||"last"!==ot||0!==Re||E.is_loaded(ft)?Re:"last"},s.css({left:te+"px",top:Q+"px"}).show(),s.removeClass("jstree-above jstree-inside jstree-below").addClass(Et),m.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),m.event.originalEvent&&m.event.originalEvent.dataTransfer&&(m.event.originalEvent.dataTransfer.dropEffect=_t?"copy":"move"),f={},et=!0,!1):void 0;var we,yt}),!0===et))return}else{for(Ve=!0,Ge=0,jt=m.data.nodes.length;jt>Ge&&(Ve=Ve&&E.check(m.data.origin&&(m.data.origin.settings.dnd.always_copy||m.data.origin.settings.dnd.copy&&(m.event.metaKey||m.event.ctrlKey))?"copy_node":"move_node",m.data.origin&&m.data.origin!==E?m.data.origin.get_node(m.data.nodes[Ge]):m.data.nodes[Ge],_.jstree.root,"last",{dnd:!0,ref:E.get_node(_.jstree.root),pos:"i",origin:m.data.origin,is_multi:m.data.origin&&m.data.origin!==E,is_foreign:!m.data.origin}));Ge++);if(Ve)return i={ins:E,par:_.jstree.root,pos:"last"},s.hide(),m.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(m.event.originalEvent&&m.event.originalEvent.dataTransfer&&(m.event.originalEvent.dataTransfer.dropEffect=_t?"copy":"move"))}_(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),i=!1,m.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),s.hide()}}).on("dnd_scroll.vakata.jstree",function(g,m){m&&m.data&&m.data.jstree&&(s.hide(),i=!1,o=!1,m.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(g,m){if(_(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),c&&clearTimeout(c),m&&m.data&&m.data.jstree){s.hide().detach();var A,E,T=[];if(i){for(A=0,E=m.data.nodes.length;E>A;A++)T[A]=m.data.origin?m.data.origin.get_node(m.data.nodes[A]):m.data.nodes[A];i.ins[m.data.origin&&(m.data.origin.settings.dnd.always_copy||m.data.origin.settings.dnd.copy&&(m.event.metaKey||m.event.ctrlKey))?"copy_node":"move_node"](T,i.par,i.pos,!1,!1,!1,m.data.origin)}else(A=_(m.event.target).closest(".jstree")).length&&f&&f.error&&"check"===f.error&&(A=A.jstree(!0))&&A.settings.core.error.call(this,f);o=!1,i=!1}}).on("keyup.jstree keydown.jstree",function(g,m){(m=_.vakata.dnd._get())&&m.data&&m.data.jstree&&("keyup"===g.type&&27===g.which?(c&&clearTimeout(c),i=!1,f=!1,o=!1,c=!1,s.hide().detach(),_.vakata.dnd._clean()):(m.helper.find(".jstree-copy").first()[m.data.origin&&(m.data.origin.settings.dnd.always_copy||m.data.origin.settings.dnd.copy&&(g.metaKey||g.ctrlKey))?"show":"hide"](),o&&(o.metaKey=g.metaKey,o.ctrlKey=g.ctrlKey,_.vakata.dnd._trigger("move",o))))})}),function(i){i.vakata.html={div:i("<div></div>"),escape:function(o){return i.vakata.html.div.text(o).html()},strip:function(o){return i.vakata.html.div.empty().append(i.parseHTML(o)).text()}};var f={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};i.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(o,c,s){s===ue&&(s=i.vakata.dnd._get()),s.event=c,i($).triggerHandler("dnd_"+o+".vakata",s)},_get:function(){return{data:f.data,element:f.element,helper:f.helper}},_clean:function(){f.helper&&f.helper.remove(),f.scroll_i&&(clearInterval(f.scroll_i),f.scroll_i=!1),f={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},V=null,i($).off("mousemove.vakata.jstree touchmove.vakata.jstree",i.vakata.dnd.drag),i($).off("mouseup.vakata.jstree touchend.vakata.jstree",i.vakata.dnd.stop)},_scroll:function(o){if(!f.scroll_e||!f.scroll_l&&!f.scroll_t)return f.scroll_i&&(clearInterval(f.scroll_i),f.scroll_i=!1),!1;if(!f.scroll_i)return f.scroll_i=setInterval(i.vakata.dnd._scroll,100),!1;if(!0===o)return!1;var c=f.scroll_e.scrollTop(),s=f.scroll_e.scrollLeft();f.scroll_e.scrollTop(c+f.scroll_t*i.vakata.dnd.settings.scroll_speed),f.scroll_e.scrollLeft(s+f.scroll_l*i.vakata.dnd.settings.scroll_speed),(c!==f.scroll_e.scrollTop()||s!==f.scroll_e.scrollLeft())&&i.vakata.dnd._trigger("scroll",f.scroll_e)},start:function(o,c,s){"touchstart"===o.type&&o.originalEvent&&o.originalEvent.changedTouches&&o.originalEvent.changedTouches[0]&&(o.pageX=o.originalEvent.changedTouches[0].pageX,o.pageY=o.originalEvent.changedTouches[0].pageY,o.target=$.elementFromPoint(o.originalEvent.changedTouches[0].pageX-window.pageXOffset,o.originalEvent.changedTouches[0].pageY-window.pageYOffset)),f.is_drag&&i.vakata.dnd.stop({});try{o.currentTarget.unselectable="on",o.currentTarget.onselectstart=function(){return!1},o.currentTarget.style&&(o.currentTarget.style.touchAction="none",o.currentTarget.style.msTouchAction="none",o.currentTarget.style.MozUserSelect="none")}catch(g){}return f.init_x=o.pageX,f.init_y=o.pageY,f.data=c,f.is_down=!0,f.element=o.currentTarget,f.target=o.target,f.is_touch="touchstart"===o.type,!1!==s&&(f.helper=i("<div id='vakata-dnd'></div>").html(s).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),i($).on("mousemove.vakata.jstree touchmove.vakata.jstree",i.vakata.dnd.drag),i($).on("mouseup.vakata.jstree touchend.vakata.jstree",i.vakata.dnd.stop),!1},drag:function(o){if("touchmove"===o.type&&o.originalEvent&&o.originalEvent.changedTouches&&o.originalEvent.changedTouches[0]&&(o.pageX=o.originalEvent.changedTouches[0].pageX,o.pageY=o.originalEvent.changedTouches[0].pageY,o.target=$.elementFromPoint(o.originalEvent.changedTouches[0].pageX-window.pageXOffset,o.originalEvent.changedTouches[0].pageY-window.pageYOffset)),f.is_down){if(!f.is_drag){if(!(Math.abs(o.pageX-f.init_x)>(f.is_touch?i.vakata.dnd.settings.threshold_touch:i.vakata.dnd.settings.threshold)||Math.abs(o.pageY-f.init_y)>(f.is_touch?i.vakata.dnd.settings.threshold_touch:i.vakata.dnd.settings.threshold)))return;f.helper&&(f.helper.appendTo($.body),f.helper_w=f.helper.outerWidth()),f.is_drag=!0,i(f.target).one("click.vakata",!1),i.vakata.dnd._trigger("start",o)}var c=!1,s=!1,g=!1,m=!1,A=!1,E=!1,T=!1,j=!1,M=!1,N=!1;return f.scroll_t=0,f.scroll_l=0,f.scroll_e=!1,i(i(o.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(i(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var te=i(this),Q=te.offset();return this.scrollHeight>this.offsetHeight&&(Q.top+te.height()-o.pageY<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_t=1),o.pageY-Q.top<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(Q.left+te.width()-o.pageX<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_l=1),o.pageX-Q.left<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_l=-1)),f.scroll_t||f.scroll_l?(f.scroll_e=i(this),!1):void 0}),f.scroll_e||(c=i($),s=i(window),g=c.height(),m=s.height(),A=c.width(),E=s.width(),T=c.scrollTop(),j=c.scrollLeft(),g>m&&o.pageY-T<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_t=-1),g>m&&m-(o.pageY-T)<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_t=1),A>E&&o.pageX-j<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_l=-1),A>E&&E-(o.pageX-j)<i.vakata.dnd.settings.scroll_proximity&&(f.scroll_l=1),(f.scroll_t||f.scroll_l)&&(f.scroll_e=c)),f.scroll_e&&i.vakata.dnd._scroll(!0),f.helper&&(M=parseInt(o.pageY+i.vakata.dnd.settings.helper_top,10),N=parseInt(o.pageX+i.vakata.dnd.settings.helper_left,10),g&&M+25>g&&(M=g-50),A&&N+f.helper_w>A&&(N=A-(f.helper_w+2)),f.helper.css({left:N+"px",top:M+"px"})),i.vakata.dnd._trigger("move",o),!1}},stop:function(o){if("touchend"===o.type&&o.originalEvent&&o.originalEvent.changedTouches&&o.originalEvent.changedTouches[0]&&(o.pageX=o.originalEvent.changedTouches[0].pageX,o.pageY=o.originalEvent.changedTouches[0].pageY,o.target=$.elementFromPoint(o.originalEvent.changedTouches[0].pageX-window.pageXOffset,o.originalEvent.changedTouches[0].pageY-window.pageYOffset)),f.is_drag)o.target!==f.target&&i(f.target).off("click.vakata"),i.vakata.dnd._trigger("stop",o);else if("touchend"===o.type&&o.target===f.target){var c=setTimeout(function(){i(o.target).trigger("click")},100);i(o.target).one("click",function(){c&&clearTimeout(c)})}return i.vakata.dnd._clean(),!1}}}(_),_.jstree.defaults.massload=null,_.jstree.plugins.massload=function(i,f){this.init=function(o,c){this._data.massload={},f.init.call(this,o,c)},this._load_nodes=function(o,c,s,g){var T,j,M,m=this.settings.massload,A=[],E=this._model.data;if(!s){for(T=0,j=o.length;j>T;T++)(!E[o[T]]||!E[o[T]].state.loaded&&!E[o[T]].state.failed||g)&&(A.push(o[T]),(M=this.get_node(o[T],!0))&&M.length&&M.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},A.length){if(_.vakata.is_function(m))return m.call(this,A,function(N){var te,Q;if(N)for(te in N)N.hasOwnProperty(te)&&(this._data.massload[te]=N[te]);for(te=0,Q=o.length;Q>te;te++)(M=this.get_node(o[te],!0))&&M.length&&M.removeClass("jstree-loading").attr("aria-busy",!1);f._load_nodes.call(this,o,c,s,g)}.bind(this));if("object"==typeof m&&m&&m.url)return m=_.extend(!0,{},m),_.vakata.is_function(m.url)&&(m.url=m.url.call(this,A)),_.vakata.is_function(m.data)&&(m.data=m.data.call(this,A)),_.ajax(m).done(function(N,te,Q){var ae,le;if(N)for(ae in N)N.hasOwnProperty(ae)&&(this._data.massload[ae]=N[ae]);for(ae=0,le=o.length;le>ae;ae++)(M=this.get_node(o[ae],!0))&&M.length&&M.removeClass("jstree-loading").attr("aria-busy",!1);f._load_nodes.call(this,o,c,s,g)}.bind(this)).fail(function(N){f._load_nodes.call(this,o,c,s,g)}.bind(this))}}return f._load_nodes.call(this,o,c,s,g)},this._load_node=function(o,c){var m,s=this._data.massload[o.id],g=null;return s?(g=this["string"==typeof s?"_append_html_data":"_append_json_data"](o,"string"==typeof s?_(_.parseHTML(s)).filter(function(){return 3!==this.nodeType}):s,function(A){c.call(this,A)}),(m=this.get_node(o.id,!0))&&m.length&&m.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[o.id],g):f._load_node.call(this,o,c)}},_.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},_.jstree.plugins.search=function(i,f){this.bind=function(){f.bind.call(this),this._data.search.str="",this._data.search.dom=_(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(o,c){if(this._data.search.som&&c.res.length){var g,m,E,T,s=this._model.data,A=[];for(g=0,m=c.res.length;m>g;g++)if(s[c.res[g]]&&!s[c.res[g]].state.hidden&&(A.push(c.res[g]),A=A.concat(s[c.res[g]].parents),this._data.search.smc))for(E=0,T=s[c.res[g]].children_d.length;T>E;E++)s[s[c.res[g]].children_d[E]]&&!s[s[c.res[g]].children_d[E]].state.hidden&&A.push(s[c.res[g]].children_d[E]);A=_.vakata.array_remove_item(_.vakata.array_unique(A),_.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(A,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(o,c){this._data.search.som&&c.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(o,c,s,g,m,A){if(!1===o||""===_.vakata.trim(o.toString()))return this.clear_search();g=(g=this.get_node(g))&&g.id?g.id:null,o=o.toString();var Q,ae,E=this.settings.search,T=!!E.ajax&&E.ajax,j=this._model.data,M=null,N=[],te=[];if(this._data.search.res.length&&!m&&this.clear_search(),s===ue&&(s=E.show_only_matches),A===ue&&(A=E.show_only_matches_children),!c&&!1!==T)return _.vakata.is_function(T)?T.call(this,o,function(le){le&&le.d&&(le=le.d),this._load_nodes(_.vakata.is_array(le)?_.vakata.array_unique(le):[],function(){this.search(o,!0,s,g,m,A)})}.bind(this),g):((T=_.extend({},T)).data||(T.data={}),T.data.str=o,g&&(T.data.inside=g),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=_.ajax(T).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(T)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(le){le&&le.d&&(le=le.d),this._load_nodes(_.vakata.is_array(le)?_.vakata.array_unique(le):[],function(){this.search(o,!0,s,g,m,A)})}.bind(this)),this._data.search.lastRequest);if(m||(this._data.search.str=o,this._data.search.dom=_(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=s,this._data.search.smc=A),M=new _.vakata.search(o,!0,{caseSensitive:E.case_sensitive,fuzzy:E.fuzzy}),_.each(j[g||_.jstree.root].children_d,function(le,Re){var et=j[Re];et.text&&!et.state.hidden&&(!E.search_leaves_only||et.state.loaded&&0===et.children.length)&&(E.search_callback&&E.search_callback.call(this,o,et)||!E.search_callback&&M.search(et.text).isMatch)&&(N.push(Re),te=te.concat(et.parents))}),N.length){for(Q=0,ae=(te=_.vakata.array_unique(te)).length;ae>Q;Q++)te[Q]!==_.jstree.root&&j[te[Q]]&&!0===this.open_node(te[Q],null,0)&&this._data.search.opn.push(te[Q]);m?(this._data.search.dom=this._data.search.dom.add(_(this.element[0].querySelectorAll("#"+_.map(N,function(le){return-1!=="0123456789".indexOf(le[0])?"\\3"+le[0]+" "+le.substr(1).replace(_.jstree.idregex,"\\$&"):le.replace(_.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=_.vakata.array_unique(this._data.search.res.concat(N))):(this._data.search.dom=_(this.element[0].querySelectorAll("#"+_.map(N,function(le){return-1!=="0123456789".indexOf(le[0])?"\\3"+le[0]+" "+le.substr(1).replace(_.jstree.idregex,"\\$&"):le.replace(_.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=N),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:o,res:this._data.search.res,show_only_matches:s})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=_(this.element[0].querySelectorAll("#"+_.map(this._data.search.res,function(o){return-1!=="0123456789".indexOf(o[0])?"\\3"+o[0]+" "+o.substr(1).replace(_.jstree.idregex,"\\$&"):o.replace(_.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=_()},this.redraw_node=function(o,c,s,g){if((o=f.redraw_node.apply(this,arguments))&&-1!==_.inArray(o.id,this._data.search.res)){var m,A,E=null;for(m=0,A=o.childNodes.length;A>m;m++)if(o.childNodes[m]&&o.childNodes[m].className&&-1!==o.childNodes[m].className.indexOf("jstree-anchor")){E=o.childNodes[m];break}E&&(E.className+=" jstree-search")}return o}},function(i){i.vakata.search=function(f,o,c){!1!==(c=i.extend({},i.vakata.search.defaults,c=c||{})).fuzzy&&(c.fuzzy=!0),f=c.caseSensitive?f:f.toLowerCase();var E,T,j,M,s=c.location,g=c.distance,m=c.threshold,A=f.length;return A>32&&(c.fuzzy=!1),c.fuzzy&&(E=1<<A-1,T=function(){var N={},te=0;for(te=0;A>te;te++)N[f.charAt(te)]=0;for(te=0;A>te;te++)N[f.charAt(te)]|=1<<A-te-1;return N}(),j=function(N,te){var Q=N/A,ae=Math.abs(s-te);return g?Q+ae/g:ae?1:Q}),M=function(N){if(N=c.caseSensitive?N:N.toLowerCase(),f===N||-1!==N.indexOf(f))return{isMatch:!0,score:0};if(!c.fuzzy)return{isMatch:!1,score:1};var te,Q,et,Ve,jt,Tt,Le,Xe,ot,ae=N.length,le=m,Re=N.indexOf(f,s),Ge=A+ae,ft=1,_t=[];for(-1!==Re&&(le=Math.min(j(0,Re),le),-1!==(Re=N.lastIndexOf(f,s+A))&&(le=Math.min(j(0,Re),le))),Re=-1,te=0;A>te;te++){for(et=0,Ve=Ge;Ve>et;)j(te,s+Ve)<=le?et=Ve:Ge=Ve,Ve=Math.floor((Ge-et)/2+et);for(Ge=Ve,Tt=Math.max(1,s-Ve+1),Le=Math.min(s+Ve,ae)+A,(Xe=new Array(Le+2))[Le+1]=(1<<te)-1,Q=Le;Q>=Tt;Q--)if(ot=T[N.charAt(Q-1)],Xe[Q]=0===te?(Xe[Q+1]<<1|1)&ot:(Xe[Q+1]<<1|1)&ot|(jt[Q+1]|jt[Q])<<1|1|jt[Q+1],Xe[Q]&E&&le>=(ft=j(te,Q-1))){if(le=ft,_t.push(Re=Q-1),!(Re>s))break;Tt=Math.max(1,2*s-Re)}if(j(te+1,s)>le)break;jt=Xe}return{isMatch:Re>=0,score:ft}},!0===o?{search:M}:M(o)},i.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(_),_.jstree.defaults.sort=function(i,f){return this.get_text(i)>this.get_text(f)?1:-1},_.jstree.plugins.sort=function(i,f){this.bind=function(){f.bind.call(this),this.element.on("model.jstree",function(o,c){this.sort(c.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(o,c){this.sort(c.parent||c.node.parent,!1),this.redraw_node(c.parent||c.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(o,c){this.sort(c.parent,!1),this.redraw_node(c.parent,!0)}.bind(this))},this.sort=function(o,c){var s,g;if((o=this.get_node(o))&&o.children&&o.children.length&&(o.children.sort(this.settings.sort.bind(this)),c))for(s=0,g=o.children_d.length;g>s;s++)this.sort(o.children_d[s],!1)}};var z=!1;_.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},_.jstree.plugins.state=function(i,f){this.bind=function(){f.bind.call(this);var o=function(){this.element.on(this.settings.state.events,function(){z&&clearTimeout(z),z=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(c,s){this.element.one("restore_state.jstree",o),this.restore_state()||o()}.bind(this))},this.save_state=function(){var o=this.get_state();this.settings.state.preserve_loaded||delete o.core.loaded;var c={state:o,ttl:this.settings.state.ttl,sec:+new Date};_.vakata.storage.set(this.settings.state.key,JSON.stringify(c))},this.restore_state=function(){var o=_.vakata.storage.get(this.settings.state.key);if(o)try{o=JSON.parse(o)}catch(c){return!1}return!(o&&o.ttl&&o.sec&&+new Date-o.sec>o.ttl||(o&&o.state&&(o=o.state),o&&_.vakata.is_function(this.settings.state.filter)&&(o=this.settings.state.filter.call(this,o)),!o||(this.settings.state.preserve_loaded||delete o.core.loaded,this.element.one("set_state.jstree",function(c,s){s.instance.trigger("restore_state",{state:_.extend(!0,{},o)})}),this.set_state(o),0)))},this.clear_state=function(){return _.vakata.storage.del(this.settings.state.key)}},function(i,f){i.vakata.storage={set:function(o,c){return window.localStorage.setItem(o,c)},get:function(o){return window.localStorage.getItem(o)},del:function(o){return window.localStorage.removeItem(o)}}}(_),_.jstree.defaults.types={default:{}},_.jstree.defaults.types[_.jstree.root]={},_.jstree.plugins.types=function(i,f){this.init=function(o,c){var s,g;if(c&&c.types&&c.types.default)for(s in c.types)if("default"!==s&&s!==_.jstree.root&&c.types.hasOwnProperty(s))for(g in c.types.default)c.types.default.hasOwnProperty(g)&&c.types[s][g]===ue&&(c.types[s][g]=c.types.default[g]);f.init.call(this,o,c),this._model.data[_.jstree.root].type=_.jstree.root},this.refresh=function(o,c){f.refresh.call(this,o,c),this._model.data[_.jstree.root].type=_.jstree.root},this.bind=function(){this.element.on("model.jstree",function(o,c){var A,E,j,s=this._model.data,g=c.nodes,m=this.settings.types,T="default";for(A=0,E=g.length;E>A;A++){if(T="default",s[g[A]].original&&s[g[A]].original.type&&m[s[g[A]].original.type]&&(T=s[g[A]].original.type),s[g[A]].data&&s[g[A]].data.jstree&&s[g[A]].data.jstree.type&&m[s[g[A]].data.jstree.type]&&(T=s[g[A]].data.jstree.type),s[g[A]].type=T,!0===s[g[A]].icon&&m[T].icon!==ue&&(s[g[A]].icon=m[T].icon),m[T].li_attr!==ue&&"object"==typeof m[T].li_attr)for(j in m[T].li_attr)if(m[T].li_attr.hasOwnProperty(j)){if("id"===j)continue;s[g[A]].li_attr[j]===ue?s[g[A]].li_attr[j]=m[T].li_attr[j]:"class"===j&&(s[g[A]].li_attr.class=m[T].li_attr.class+" "+s[g[A]].li_attr.class)}if(m[T].a_attr!==ue&&"object"==typeof m[T].a_attr)for(j in m[T].a_attr)if(m[T].a_attr.hasOwnProperty(j)){if("id"===j)continue;s[g[A]].a_attr[j]===ue?s[g[A]].a_attr[j]=m[T].a_attr[j]:"href"===j&&"#"===s[g[A]].a_attr[j]?s[g[A]].a_attr.href=m[T].a_attr.href:"class"===j&&(s[g[A]].a_attr.class=m[T].a_attr.class+" "+s[g[A]].a_attr.class)}}s[_.jstree.root].type=_.jstree.root}.bind(this)),f.bind.call(this)},this.get_json=function(o,c,s){var g,m,A=this._model.data,E=c?_.extend(!0,{},c,{no_id:!1}):{},T=f.get_json.call(this,o,E,s);if(!1===T)return!1;if(_.vakata.is_array(T))for(g=0,m=T.length;m>g;g++)T[g].type=T[g].id&&A[T[g].id]&&A[T[g].id].type?A[T[g].id].type:"default",c&&c.no_id&&(delete T[g].id,T[g].li_attr&&T[g].li_attr.id&&delete T[g].li_attr.id,T[g].a_attr&&T[g].a_attr.id&&delete T[g].a_attr.id);else T.type=T.id&&A[T.id]&&A[T.id].type?A[T.id].type:"default",c&&c.no_id&&(T=this._delete_ids(T));return T},this._delete_ids=function(o){if(_.vakata.is_array(o)){for(var c=0,s=o.length;s>c;c++)o[c]=this._delete_ids(o[c]);return o}return delete o.id,o.li_attr&&o.li_attr.id&&delete o.li_attr.id,o.a_attr&&o.a_attr.id&&delete o.a_attr.id,o.children&&_.vakata.is_array(o.children)&&(o.children=this._delete_ids(o.children)),o},this.check=function(o,c,s,g,m){if(!1===f.check.call(this,o,c,s,g,m))return!1;c=c&&c.id?c:this.get_node(c),s=s&&s.id?s:this.get_node(s);var E,T,j,M,A=c&&c.id?m&&m.origin?m.origin:_.jstree.reference(c.id):null;switch(A=A&&A._model&&A._model.data?A._model.data:null,o){case"create_node":case"move_node":case"copy_node":if("move_node"!==o||-1===_.inArray(c.id,s.children)){if((E=this.get_rules(s)).max_children!==ue&&-1!==E.max_children&&E.max_children===s.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})},!1;if(E.valid_children!==ue&&-1!==E.valid_children&&-1===_.inArray(c.type||"default",E.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})},!1;if(A&&c.children_d&&c.parents){for(T=0,j=0,M=c.children_d.length;M>j;j++)T=Math.max(T,A[c.children_d[j]].parents.length);T=T-c.parents.length+1}(0>=T||T===ue)&&(T=1);do{if(E.max_depth!==ue&&-1!==E.max_depth&&E.max_depth<T)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})},!1;s=this.get_node(s.parent),E=this.get_rules(s),T++}while(s)}}return!0},this.get_rules=function(o){if(!(o=this.get_node(o)))return!1;var c=this.get_type(o,!0);return c.max_depth===ue&&(c.max_depth=-1),c.max_children===ue&&(c.max_children=-1),c.valid_children===ue&&(c.valid_children=-1),c},this.get_type=function(o,c){return!!(o=this.get_node(o))&&(c?_.extend({type:o.type},this.settings.types[o.type]):o.type)},this.set_type=function(o,c){var g,m,A,E,T,j,M,N,s=this._model.data;if(_.vakata.is_array(o)){for(m=0,A=(o=o.slice()).length;A>m;m++)this.set_type(o[m],c);return!0}if(g=this.settings.types,o=this.get_node(o),!g[c]||!o)return!1;if((M=this.get_node(o,!0))&&M.length&&(N=M.children(".jstree-anchor")),E=o.type,T=this.get_icon(o),o.type=c,(!0===T||!g[E]||g[E].icon!==ue&&T===g[E].icon)&&this.set_icon(o,g[c].icon===ue||g[c].icon),g[E]&&g[E].li_attr!==ue&&"object"==typeof g[E].li_attr)for(j in g[E].li_attr)if(g[E].li_attr.hasOwnProperty(j)){if("id"===j)continue;"class"===j?(s[o.id].li_attr.class=(s[o.id].li_attr.class||"").replace(g[E].li_attr[j],""),M&&M.removeClass(g[E].li_attr[j])):s[o.id].li_attr[j]===g[E].li_attr[j]&&(s[o.id].li_attr[j]=null,M&&M.removeAttr(j))}if(g[E]&&g[E].a_attr!==ue&&"object"==typeof g[E].a_attr)for(j in g[E].a_attr)if(g[E].a_attr.hasOwnProperty(j)){if("id"===j)continue;"class"===j?(s[o.id].a_attr.class=(s[o.id].a_attr.class||"").replace(g[E].a_attr[j],""),N&&N.removeClass(g[E].a_attr[j])):s[o.id].a_attr[j]===g[E].a_attr[j]&&("href"===j?(s[o.id].a_attr[j]="#",N&&N.attr("href","#")):(delete s[o.id].a_attr[j],N&&N.removeAttr(j)))}if(g[c].li_attr!==ue&&"object"==typeof g[c].li_attr)for(j in g[c].li_attr)if(g[c].li_attr.hasOwnProperty(j)){if("id"===j)continue;s[o.id].li_attr[j]===ue?(s[o.id].li_attr[j]=g[c].li_attr[j],M&&("class"===j?M.addClass(g[c].li_attr[j]):M.attr(j,g[c].li_attr[j]))):"class"===j&&(s[o.id].li_attr.class=g[c].li_attr[j]+" "+s[o.id].li_attr.class,M&&M.addClass(g[c].li_attr[j]))}if(g[c].a_attr!==ue&&"object"==typeof g[c].a_attr)for(j in g[c].a_attr)if(g[c].a_attr.hasOwnProperty(j)){if("id"===j)continue;s[o.id].a_attr[j]===ue?(s[o.id].a_attr[j]=g[c].a_attr[j],N&&("class"===j?N.addClass(g[c].a_attr[j]):N.attr(j,g[c].a_attr[j]))):"href"===j&&"#"===s[o.id].a_attr[j]?(s[o.id].a_attr.href=g[c].a_attr.href,N&&N.attr("href",g[c].a_attr.href)):"class"===j&&(s[o.id].a_attr.class=g[c].a_attr.class+" "+s[o.id].a_attr.class,N&&N.addClass(g[c].a_attr[j]))}return!0}},_.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(i,f){return i+" ("+f+")"}},_.jstree.plugins.unique=function(i,f){this.check=function(o,c,s,g,m){if(!1===f.check.call(this,o,c,s,g,m))return!1;if(c=c&&c.id?c:this.get_node(c),!(s=s&&s.id?s:this.get_node(s))||!s.children)return!0;var N,te,Q,A="rename_node"===o?g:c.text,E=[],T=this.settings.unique.case_sensitive,j=this.settings.unique.trim_whitespace,M=this._model.data;for(N=0,te=s.children.length;te>N;N++)Q=M[s.children[N]].text,T||(Q=Q.toLowerCase()),j&&(Q=Q.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),E.push(Q);switch(T||(A=A.toLowerCase()),j&&(A=A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),o){case"delete_node":return!0;case"rename_node":return Q=c.text||"",T||(Q=Q.toLowerCase()),j&&(Q=Q.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(N=-1===_.inArray(A,E)||c.text&&Q===A)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+A+" already exists. Preventing: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})}),N;case"create_node":return(N=-1===_.inArray(A,E))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+A+" already exists. Preventing: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})}),N;case"copy_node":return(N=-1===_.inArray(A,E))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+A+" already exists. Preventing: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})}),N;case"move_node":return(N=c.parent===s.id&&(!m||!m.is_multi)||-1===_.inArray(A,E))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+A+" already exists. Preventing: "+o,data:JSON.stringify({chk:o,pos:g,obj:!(!c||!c.id)&&c.id,par:!(!s||!s.id)&&s.id})}),N}return!0},this.create_node=function(o,c,s,g,m){if(!c||c.text===ue){if(null===o&&(o=_.jstree.root),!(o=this.get_node(o)))return f.create_node.call(this,o,c,s,g,m);if(!(s=s===ue?"last":s).toString().match(/^(before|after)$/)&&!m&&!this.is_loaded(o))return f.create_node.call(this,o,c,s,g,m);c||(c={});var A,E,T,j,M,le,N=this._model.data,te=this.settings.unique.case_sensitive,Q=this.settings.unique.trim_whitespace,ae=this.settings.unique.duplicate;for(E=A=this.get_string("New node"),T=[],j=0,M=o.children.length;M>j;j++)le=N[o.children[j]].text,te||(le=le.toLowerCase()),Q&&(le=le.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),T.push(le);for(j=1,le=E,te||(le=le.toLowerCase()),Q&&(le=le.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==_.inArray(le,T);)le=E=ae.call(this,A,++j).toString(),te||(le=le.toLowerCase()),Q&&(le=le.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));c.text=E}return f.create_node.call(this,o,c,s,g,m)}};var ke=$.createElement("DIV");if(ke.setAttribute("unselectable","on"),ke.setAttribute("role","presentation"),ke.className="jstree-wholerow",ke.innerHTML="&#160;",_.jstree.plugins.wholerow=function(i,f){this.bind=function(){f.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(o,c){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(o,c){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var g,m,s=!1;for(g=0,m=c.selected.length;m>g;g++)(s=this.get_node(c.selected[g],!0))&&s.length&&s.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(o,c){this.get_node(c.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(o,c){"hover_node"===o.type&&this.is_disabled(c.node)||this.get_node(c.node,!0).children(".jstree-wholerow")["hover_node"===o.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(o){if(this._data.contextmenu){o.preventDefault();var c=_.Event("contextmenu",{metaKey:o.metaKey,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey,pageX:o.pageX,pageY:o.pageY});_(o.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)}}.bind(this)).on("click.jstree",".jstree-wholerow",function(o){o.stopImmediatePropagation();var c=_.Event("click",{metaKey:o.metaKey,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey});_(o.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(o){o.stopImmediatePropagation();var c=_.Event("dblclick",{metaKey:o.metaKey,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey});_(o.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(o){o.stopImmediatePropagation();var c=_.Event("click",{metaKey:o.metaKey,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey});_(o.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(o){return o.stopImmediatePropagation(),this.is_disabled(o.currentTarget)||this.hover_node(o.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(o){this.dehover_node(o.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),f.teardown.call(this)},this.redraw_node=function(o,c,s,g){if(o=f.redraw_node.apply(this,arguments)){var m=ke.cloneNode(!0);-1!==_.inArray(o.id,this._data.core.selected)&&(m.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===o.id&&(m.className+=" jstree-wholerow-hovered"),o.insertBefore(m,o.childNodes[0])}return o}},window.customElements&&Object&&Object.create){var G=Object.create(HTMLElement.prototype);G.createdCallback=function(){var f,i={core:{},plugins:[]};for(f in _.jstree.plugins)_.jstree.plugins.hasOwnProperty(f)&&this.attributes[f]&&(i.plugins.push(f),this.getAttribute(f)&&JSON.parse(this.getAttribute(f))&&(i[f]=JSON.parse(this.getAttribute(f))));for(f in _.jstree.defaults.core)_.jstree.defaults.core.hasOwnProperty(f)&&this.attributes[f]&&(i.core[f]=JSON.parse(this.getAttribute(f))||this.getAttribute(f));_(this).jstree(i)};try{window.customElements.define("vakata-jstree",function(){},{prototype:G})}catch(i){}}}var i,f,o});