!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(T,e){"use strict";var t=[],S=T.document,r=Object.getPrototypeOf,s=t.slice,m=t.concat,l=t.push,i=t.indexOf,n={},o=n.toString,g=n.hasOwnProperty,a=g.toString,u=a.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,noModule:!0};function w(e,t,n){var r,i=(t=t||S).createElement("script");if(i.text=e,n)for(r in c)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var C=function(e,t){return new C.fn.init(e,t)},d=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function h(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!y(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}C.fn=C.prototype={jquery:"3.3.1",constructor:C,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(n){return this.pushStack(C.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:t.sort,splice:t.splice},C.extend=C.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||y(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(u&&r&&(C.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&C.isPlainObject(n)?n:{},a[t]=C.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},C.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e)||(t=r(e))&&("function"!=typeof(n=g.call(t,"constructor")&&t.constructor)||a.call(n)!==u))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){w(e)},each:function(e,t){var n,r=0;if(h(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(d,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(h(Object(e))?C.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(h(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return m.apply([],a)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=t[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var f=function(n){var e,f,w,o,i,p,d,m,x,l,u,k,T,a,S,g,s,c,v,C="sizzle"+1*new Date,y=n.document,L=0,r=0,h=ae(),b=ae(),E=ae(),_=function(e,t){return e===t&&(u=!0),0},N={}.hasOwnProperty,t=[],A=t.pop,M=t.push,O=t.push,R=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",z="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+z+"*("+I+")(?:"+z+"*([*^$|!~]?=)"+z+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+z+"*\\]",H=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(z+"+","g"),j=new RegExp("^"+z+"+|((?:^|[^\\\\])(?:\\\\.)*)"+z+"+$","g"),B=new RegExp("^"+z+"*,"+z+"*"),U=new RegExp("^"+z+"*([>+~]|"+z+")"+z+"*"),q=new RegExp("="+z+"*([^\\]'\"]*?)"+z+"*\\]","g"),V=new RegExp(H),Y=new RegExp("^"+I+"$"),$={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+z+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+z+"*((?:-\\d)?\\d*)"+z+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+z+"?|("+z+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){k()},ie=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{O.apply(t=R.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(n){O={apply:t.length?function(e,t){M.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,l,u,c,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:y)!==T&&k(t),t=t||T,S)){if(11!==h&&(l=Z.exec(e)))if(i=l[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&v(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return O.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&f.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(i)),n}if(f.qsa&&!E[e+" "]&&(!g||!g.test(e))){if(1!==h)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=C),o=(u=p(e)).length;o--;)u[o]="#"+s+" "+ve(u[o]);c=u.join(","),d=Q.test(e)&&me(t.parentNode)||t}if(c)try{return O.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===C&&t.removeAttribute("id")}}}return m(e.replace(j,"$1"),t,n,r)}function ae(){var r=[];return function e(t,n){return r.push(t+" ")>w.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function se(e){return e[C]=!0,e}function le(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=oe.support={},i=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:y;return r!==T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,S=!i(T),y!==T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",re,!1):n.attachEvent&&n.attachEvent("onunload",re)),f.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=le(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=X.test(T.getElementsByClassName),f.getById=le(function(e){return a.appendChild(e).id=C,!T.getElementsByName||!T.getElementsByName(C).length}),f.getById?(w.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var n=e.replace(J,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=f.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],g=[],(f.qsa=X.test(T.querySelectorAll))&&(le(function(e){a.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+z+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+z+"*(?:value|"+D+")"),e.querySelectorAll("[id~="+C+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+z+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(f.matchesSelector=X.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&le(function(e){f.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",H)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=X.test(a.compareDocumentPosition),v=t||X.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},_=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===y&&v(y,e)?-1:t===T||t.ownerDocument===y&&v(y,t)?1:l?P(l,e)-P(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===T?-1:t===T?1:i?-1:o?1:l?P(l,e)-P(l,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===y?-1:s[r]===y?1:0}),T},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&k(e),t=t.replace(q,"='$1']"),f.matchesSelector&&S&&!E[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,T,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==T&&k(e),v(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==T&&k(e);var n=w.attrHandle[t.toLowerCase()],r=n&&N.call(w.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==r?r:f.attributes||!S?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,i=0;if(u=!f.detectDuplicates,l=!f.sortStable&&e.slice(0),e.sort(_),u){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return l=null,e},o=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(w=oe.selectors={cacheLength:50,createPseudo:se,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=p(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=h[e+" "];return t||(t=new RegExp("(^|"+z+")"+e+"("+z+"|$)"))&&h(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(p,e,t,m,g){var v="nth"!==p.slice(0,3),y="last"!==p.slice(-4),b="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,l,u=v!==y?"nextSibling":"previousSibling",c=e.parentNode,d=b&&e.nodeName.toLowerCase(),h=!n&&!b,f=!1;if(c){if(v){for(;u;){for(a=e;a=a[u];)if(b?a.nodeName.toLowerCase()===d:1===a.nodeType)return!1;l=u="only"===p&&!l&&"nextSibling"}return!0}if(l=[y?c.firstChild:c.lastChild],y&&h){for(f=(s=(r=(i=(o=(a=c)[C]||(a[C]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]||[])[0]===L&&r[1])&&r[2],a=s&&c.childNodes[s];a=++s&&a&&a[u]||(f=s=0)||l.pop();)if(1===a.nodeType&&++f&&a===e){i[p]=[L,s,f];break}}else if(h&&(f=s=(r=(i=(o=(a=e)[C]||(a[C]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]||[])[0]===L&&r[1]),!1===f)for(;(a=++s&&a&&a[u]||(f=s=0)||l.pop())&&((b?a.nodeName.toLowerCase()!==d:1!==a.nodeType)||!++f||(h&&((i=(o=a[C]||(a[C]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]=[L,f]),a!==e)););return(f-=g)===m||f%m==0&&0<=f/m}}},PSEUDO:function(e,o){var t,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return a[C]?a(o):1<a.length?(t=[e,e,"",o],w.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var r=[],i=[],s=d(e.replace(j,"$1"));return s[C]?se(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:se(function(t){return function(e){return 0<oe(t,e).length}}),contains:se(function(t){return t=t.replace(J,ee),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:se(function(n){return Y.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(J,ee).toLowerCase(),function(e){var t;do{if(t=S?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})w.pseudos[e]=he(e);function ge(){}function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ye(s,e,t){var l=e.dir,u=e.next,c=u||l,d=t&&"parentNode"===c,h=r++;return e.first?function(e,t,n){for(;e=e[l];)if(1===e.nodeType||d)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[L,h];if(n){for(;e=e[l];)if((1===e.nodeType||d)&&s(e,t,n))return!0}else for(;e=e[l];)if(1===e.nodeType||d)if(i=(o=e[C]||(e[C]={}))[e.uniqueID]||(o[e.uniqueID]={}),u&&u===e.nodeName.toLowerCase())e=e[l]||e;else{if((r=i[c])&&r[0]===L&&r[1]===h)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function be(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function we(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function xe(f,p,m,g,v,e){return g&&!g[C]&&(g=xe(g)),v&&!v[C]&&(v=xe(v,e)),se(function(e,t,n,r){var i,o,a,s=[],l=[],u=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(p||"*",n.nodeType?[n]:n,[]),d=!f||!e&&p?c:we(c,s,f,n,r),h=m?v||(e?f:u||g)?[]:t:d;if(m&&m(d,h,n,r),g)for(i=we(h,l),g(i,[],n,r),o=i.length;o--;)(a=i[o])&&(h[l[o]]=!(d[l[o]]=a));if(e){if(v||f){if(v){for(i=[],o=h.length;o--;)(a=h[o])&&i.push(d[o]=a);v(null,h=[],i,r)}for(o=h.length;o--;)(a=h[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else h=we(h===t?h.splice(u,h.length):h),v?v(null,t,h,r):O.apply(t,h)})}function ke(e){for(var i,t,n,r=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=ye(function(e){return e===i},a,!0),u=ye(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==x)||((i=t).nodeType?l(e,t,n):u(e,t,n));return i=null,r}];s<r;s++)if(t=w.relative[e[s].type])c=[ye(be(c),t)];else{if((t=w.filter[e[s].type].apply(null,e[s].matches))[C]){for(n=++s;n<r&&!w.relative[e[n].type];n++);return xe(1<s&&be(c),1<s&&ve(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(j,"$1"),t,s<n&&ke(e.slice(s,n)),n<r&&ke(e=e.slice(n)),n<r&&ve(e))}c.push(t)}return be(c)}return ge.prototype=w.filters=w.pseudos,w.setFilters=new ge,p=oe.tokenize=function(e,t){var n,r,i,o,a,s,l,u=b[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],l=w.preFilter;a;){for(o in n&&!(r=B.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=U.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(j," ")}),a=a.slice(n.length)),w.filter)!(r=$[o].exec(a))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):b(e,s).slice(0)},d=oe.compile=function(e,t){var n,g,v,y,b,r,i=[],o=[],a=E[e+" "];if(!a){for(t||(t=p(e)),n=t.length;n--;)(a=ke(t[n]))[C]?i.push(a):o.push(a);(a=E(e,(g=o,v=i,y=0<v.length,b=0<g.length,r=function(e,t,n,r,i){var o,a,s,l=0,u="0",c=e&&[],d=[],h=x,f=e||b&&w.find.TAG("*",i),p=L+=null==h?1:Math.random()||.1,m=f.length;for(i&&(x=t===T||t||i);u!==m&&null!=(o=f[u]);u++){if(b&&o){for(a=0,t||o.ownerDocument===T||(k(o),n=!S);s=g[a++];)if(s(o,t||T,n)){r.push(o);break}i&&(L=p)}y&&((o=!s&&o)&&l--,e&&c.push(o))}if(l+=u,y&&u!==l){for(a=0;s=v[a++];)s(c,d,t,n);if(e){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=A.call(r));d=we(d)}O.apply(r,d),i&&!e&&0<d.length&&1<l+v.length&&oe.uniqueSort(r)}return i&&(L=p,x=h),c},y?se(r):r))).selector=e}return a},m=oe.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,c=!r&&p(e=u.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&S&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(J,ee),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=$.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(J,ee),Q.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&ve(o)))return O.apply(n,r),n;break}}return(u||d(e,c))(r,t,!S,n,!t||Q.test(e)&&me(t.parentNode)||t),n},f.sortStable=C.split("").sort(_).join("")===C,f.detectDuplicates=!!u,k(),f.sortDetached=le(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),le(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ue("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),f.attributes&&le(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ue("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),le(function(e){return null==e.getAttribute("disabled")})||ue(D,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(T);C.find=f,C.expr=f.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=f.uniqueSort,C.text=f.getText,C.isXMLDoc=f.isXML,C.contains=f.contains,C.escapeSelector=f.escape;var p=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&C(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},L=C.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,n,r){return y(n)?C.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?C.grep(e,function(e){return e===n!==r}):"string"!=typeof n?C.grep(e,function(e){return-1<i.call(n,e)!==r}):C.filter(n,e,r)}C.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?C.find.matchesSelector(r,e)?[r]:[]:C.find.matches(e,C.grep(t,function(e){return 1===e.nodeType}))},C.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(C(e).filter(function(){for(t=0;t<r;t++)if(C.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)C.find(e,i[t],n);return 1<r?C.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&L.test(e)?C(e):e||[],!1).length}});var A,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||A,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:M.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),_.test(r[1])&&C.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this)}).prototype=C.fn,A=C(S);var O=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(C.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&C(e);if(!L.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&C.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?C.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(C(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return p(e,"parentNode")},parentsUntil:function(e,t,n){return p(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return p(e,"nextSibling")},prevAll:function(e){return p(e,"previousSibling")},nextUntil:function(e,t,n){return p(e,"nextSibling",n)},prevUntil:function(e,t,n){return p(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return E(e,"iframe")?e.contentDocument:(E(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},function(r,i){C.fn[r]=function(e,t){var n=C.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=C.filter(t,n)),1<this.length&&(R[r]||C.uniqueSort(n),O.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function z(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},C.each(e.match(D)||[],function(e,t){n[t]=!0}),n):C.extend({},r);var i,t,o,a,s=[],l=[],u=-1,c=function(){for(a=a||r.once,o=i=!0;l.length;u=-1)for(t=l.shift();++u<s.length;)!1===s[u].apply(t[0],t[1])&&r.stopOnFalse&&(u=s.length,t=!1);r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},d={add:function(){return s&&(t&&!i&&(u=s.length-1,l.push(t)),function n(e){C.each(e,function(e,t){y(t)?r.unique&&d.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return C.each(arguments,function(e,t){for(var n;-1<(n=C.inArray(t,s,n));)s.splice(n,1),n<=u&&u--}),this},has:function(e){return e?-1<C.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=l=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=l=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),i||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},C.extend({Deferred:function(e){var o=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var i=arguments;return C.Deferred(function(r){C.each(o,function(e,t){var n=y(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&y(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var l=0;function u(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<l)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,y(t)?s?t.call(e,u(l,o,z,s),u(l,o,I,s)):(l++,t.call(e,u(l,o,z,s),u(l,o,I,s),u(l,o,z,o.notifyWith))):(a!==z&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(e,t.stackTrace),l<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(C.Deferred.getStackHook&&(t.stackTrace=C.Deferred.getStackHook()),T.setTimeout(t))}}return C.Deferred(function(e){o[0][3].add(u(0,e,y(r)?r:z,e.notifyWith)),o[1][3].add(u(0,e,y(t)?t:z)),o[2][3].add(u(0,e,y(n)?n:I))}).promise()},promise:function(e){return null!=e?C.extend(e,a):a}},s={};return C.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=C.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||y(i[t]&&i[t].then)))return o.then();for(;t--;)W(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&H.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){T.setTimeout(function(){throw e})};var F=C.Deferred();function j(){S.removeEventListener("DOMContentLoaded",j),T.removeEventListener("load",j),C.ready()}C.fn.ready=function(e){return F.then(e).catch(function(e){C.readyException(e)}),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||((C.isReady=!0)!==e&&0<--C.readyWait||F.resolveWith(S,[C]))}}),C.ready.then=F.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?T.setTimeout(C.ready):(S.addEventListener("DOMContentLoaded",j),T.addEventListener("load",j));var B=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===x(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(C(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},U=/^-ms-/,q=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function Y(e){return e.replace(U,"ms-").replace(q,V)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=C.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Y(t)]=n;else for(r in t)i[Y(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in r?[t]:t.match(D)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||C.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!C.isEmptyObject(t)}};var K=new G,X=new G,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function J(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Q,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:Z.test(i)?JSON.parse(i):i)}catch(e){}X.set(e,t,n)}else n=void 0;return n}C.extend({hasData:function(e){return X.hasData(e)||K.hasData(e)},data:function(e,t,n){return X.access(e,t,n)},removeData:function(e,t){X.remove(e,t)},_data:function(e,t,n){return K.access(e,t,n)},_removeData:function(e,t){K.remove(e,t)}}),C.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=X.get(o),1===o.nodeType&&!K.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=Y(r.slice(5)),J(o,r,i[r]));K.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){X.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e){if(void 0!==(t=X.get(o,n)))return t;if(void 0!==(t=J(o,n)))return t}else this.each(function(){X.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),C.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),r=n.length,i=n.shift(),o=C._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){C.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:C.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),C.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?C.queue(this[0],t):void 0===n?this:this.each(function(){var e=C.queue(this,t,n);C._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&C.dequeue(this,t)})},dequeue:function(e){return this.each(function(){C.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=C.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=K.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&C.contains(e.ownerDocument,e)&&"none"===C.css(e,"display")},ie=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function oe(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return C.css(e,t,"")},l=s(),u=n&&n[3]||(C.cssNumber[t]?"":"px"),c=(C.cssNumber[t]||"px"!==u&&+l)&&te.exec(C.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)C.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,C.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var ae={};function se(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=K.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&re(r)&&(i[o]=(d=u=l=void 0,u=(s=r).ownerDocument,c=s.nodeName,(d=ae[c])||(l=u.body.appendChild(u.createElement(c)),d=C.css(l,"display"),l.parentNode.removeChild(l),"none"===d&&(d="block"),ae[c]=d)))):"none"!==n&&(i[o]="none",K.set(r,"display",n)));var s,l,u,c,d;for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}C.fn.extend({show:function(){return se(this,!0)},hide:function(){return se(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){re(this)?C(this).show():C(this).hide()})}});var le=/^(?:checkbox|radio)$/i,ue=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ce=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,"<select multiple='multiple'>","</select>"],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 he(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?C.merge([e],n):n}function fe(e,t){for(var n=0,r=e.length;n<r;n++)K.set(e[n],"globalEval",!t||K.get(t[n],"globalEval"))}de.optgroup=de.option,de.tbody=de.tfoot=de.colgroup=de.caption=de.thead,de.th=de.td;var pe,me,ge=/<|&#?\w+;/;function ve(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===x(o))C.merge(h,o.nodeType?[o]:o);else if(ge.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(ue.exec(o)||["",""])[1].toLowerCase(),l=de[s]||de._default,a.innerHTML=l[1]+C.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;C.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&-1<C.inArray(o,r))i&&i.push(o);else if(u=C.contains(o.ownerDocument,o),a=he(d.appendChild(o),"script"),u&&fe(a),n)for(c=0;o=a[c++];)ce.test(o.type||"")&&n.push(o);return d}pe=S.createDocumentFragment().appendChild(S.createElement("div")),(me=S.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),pe.appendChild(me),v.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue;var ye=S.documentElement,be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Te(){return!1}function Se(){try{return S.activeElement}catch(e){}}function Ce(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ce(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return C().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),e.each(function(){C.event.add(this,t,i,r,n)})}C.event={global:{},add:function(t,e,n,r,i){var o,a,s,l,u,c,d,h,f,p,m,g=K.get(t);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(ye,i),n.guid||(n.guid=C.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(D)||[""]).length;u--;)f=m=(s=xe.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=C.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=C.event.special[f]||{},c=C.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,a)||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),C.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,h,f,p,m,g=K.hasData(e)&&K.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(D)||[""]).length;u--;)if(f=m=(s=xe.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=C.event.special[f]||{},h=l[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||C.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)C.event.remove(e,f+t[u],n,r,!0);C.isEmptyObject(l)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=C.event.fix(e),l=new Array(arguments.length),u=(K.get(this,"events")||{})[s.type]||[],c=C.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=C.event.handlers.call(this,s,u),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((C.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,l))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&1<=e.button))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<C(i,this).index(u):C.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[C.expando]?e:new C.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&E(this,"input"))return this.click(),!1},_default:function(e){return E(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},C.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},C.Event=function(e,t){if(!(this instanceof C.Event))return new C.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&C.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},C.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,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:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},C.event.addProp),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){C.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||C.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),C.fn.extend({on:function(e,t,n,r){return Ce(this,e,t,n,r)},one:function(e,t,n,r){return Ce(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,C(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){C.event.remove(this,e,n,t)})}});var Le=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ee=/<script|<style|<link/i,_e=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ae(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(K.hasData(e)&&(o=K.access(e),a=K.set(t,o),u=o.events))for(i in delete a.handle,a.events={},u)for(n=0,r=u[i].length;n<r;n++)C.event.add(t,i,u[i][n]);X.hasData(e)&&(s=X.access(e),l=C.extend({},s),X.set(t,l))}}function Pe(n,r,i,o){r=m.apply([],r);var e,t,a,s,l,u,c=0,d=n.length,h=d-1,f=r[0],p=y(f);if(p||1<d&&"string"==typeof f&&!v.checkClone&&_e.test(f))return n.each(function(e){var t=n.eq(e);p&&(r[0]=f.call(this,e,t.html())),Pe(t,r,i,o)});if(d&&(t=(e=ve(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=C.map(he(e,"script"),Me)).length;c<d;c++)l=e,c!==h&&(l=C.clone(l,!0,!0),s&&C.merge(a,he(l,"script"))),i.call(n[c],l,c);if(s)for(u=a[a.length-1].ownerDocument,C.map(a,Oe),c=0;c<s;c++)l=a[c],ce.test(l.type||"")&&!K.access(l,"globalEval")&&C.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?C._evalUrl&&C._evalUrl(l.src):w(l.textContent.replace(Ne,""),u,l))}return n}function De(e,t,n){for(var r,i=t?C.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||C.cleanData(he(r)),r.parentNode&&(n&&C.contains(r.ownerDocument,r)&&fe(he(r,"script")),r.parentNode.removeChild(r));return e}C.extend({htmlPrefilter:function(e){return e.replace(Le,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,l,u,c=e.cloneNode(!0),d=C.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(a=he(c),r=0,i=(o=he(e)).length;r<i;r++)s=o[r],l=a[r],void 0,"input"===(u=l.nodeName.toLowerCase())&&le.test(s.type)?l.checked=s.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=s.defaultValue);if(t)if(n)for(o=o||he(e),a=a||he(c),r=0,i=o.length;r<i;r++)Re(o[r],a[r]);else Re(e,c);return 0<(a=he(c,"script")).length&&fe(a,!d&&he(e,"script")),c},cleanData:function(e){for(var t,n,r,i=C.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),C.fn.extend({detach:function(e){return De(this,e,!0)},remove:function(e){return De(this,e)},text:function(e){return B(this,function(e){return void 0===e?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ae(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ae(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(C.cleanData(he(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return C.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!de[(ue.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(C.cleanData(he(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;C.inArray(this,n)<0&&(C.cleanData(he(this)),t&&t.replaceChild(e,this))},n)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){C.fn[e]=function(e){for(var t,n=[],r=C(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),C(r[o])[a](t),l.apply(n,t.get());return this.pushStack(n)}});var ze=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=T),t.getComputedStyle(e)},We=new RegExp(ne.join("|"),"i");function He(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||C.contains(e.ownerDocument,e)||(a=C.style(e,t)),!v.pixelBoxStyles()&&ze.test(a)&&We.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ye.appendChild(s).appendChild(l);var e=T.getComputedStyle(l);n="1%"!==e.top,a=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=36===l.offsetWidth||"absolute",ye.removeChild(s),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=S.createElement("div"),l=S.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var je=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},qe={letterSpacing:"0",fontWeight:"400"},Ve=["Webkit","Moz","ms"],Ye=S.createElement("div").style;function $e(e){var t=C.cssProps[e];return t||(t=C.cssProps[e]=function(e){if(e in Ye)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in Ye)return e}(e)||e),t}function Ge(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=C.css(e,n+ne[a],!0,i)),r?("content"===n&&(l-=C.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(l-=C.css(e,"border"+ne[a]+"Width",!0,i))):(l+=C.css(e,"padding"+ne[a],!0,i),"padding"!==n?l+=C.css(e,"border"+ne[a]+"Width",!0,i):s+=C.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))),l}function Xe(e,t,n){var r=Ie(e),i=He(e,t,r),o="border-box"===C.css(e,"boxSizing",!1,r),a=o;if(ze.test(i)){if(!n)return i;i="auto"}return a=a&&(v.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===C.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ke(e,t,n||(o?"border":"content"),a,r,i)+"px"}function Ze(e,t,n,r,i){return new Ze.prototype.init(e,t,n,r,i)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=He(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=Y(t),l=Be.test(t),u=e.style;if(l||(t=$e(s)),a=C.cssHooks[t]||C.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=oe(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(C.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=Y(t);return Be.test(t)||(t=$e(s)),(a=C.cssHooks[t]||C.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=He(e,t,r)),"normal"===i&&t in qe&&(i=qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),C.each(["height","width"],function(e,s){C.cssHooks[s]={get:function(e,t,n){if(t)return!je.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Xe(e,s,n):ie(e,Ue,function(){return Xe(e,s,n)})},set:function(e,t,n){var r,i=Ie(e),o="border-box"===C.css(e,"boxSizing",!1,i),a=n&&Ke(e,s,n,o,i);return o&&v.scrollboxSize()===i.position&&(a-=Math.ceil(e["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(i[s])-Ke(e,s,"border",!1,i)-.5)),a&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=C.css(e,s)),Ge(0,t,a)}}}),C.cssHooks.marginLeft=Fe(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(He(e,"marginLeft"))||e.getBoundingClientRect().left-ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(i,o){C.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(C.cssHooks[i+o].set=Ge)}),C.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=C.css(e,t[a],!1,r);return o}return void 0!==n?C.style(e,t,n):C.css(e,t)},e,t,1<arguments.length)}}),((C.Tween=Ze).prototype={constructor:Ze,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var e=Ze.propHooks[this.prop];return e&&e.get?e.get(this):Ze.propHooks._default.get(this)},run:function(e){var t,n=Ze.propHooks[this.prop];return this.options.duration?this.pos=t=C.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ze.propHooks._default.set(this),this}}).init.prototype=Ze.prototype,(Ze.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=C.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[C.cssProps[e.prop]]&&!C.cssHooks[e.prop]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ze.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=Ze.prototype.init,C.fx.step={};var Qe,Je,et,tt,nt=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function it(){Je&&(!1===S.hidden&&T.requestAnimationFrame?T.requestAnimationFrame(it):T.setTimeout(it,C.fx.interval),C.fx.tick())}function ot(){return T.setTimeout(function(){Qe=void 0}),Qe=Date.now()}function at(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function st(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=C.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var e=Qe||ot(),t=Math.max(0,u.startTime+u.duration-e),n=1-(t/u.duration||0),r=0,i=u.tweens.length;r<i;r++)u.tweens[r].run(n);return s.notifyWith(o,[u,n,t]),n<1&&i?t:(i||s.notifyWith(o,[u,1,0]),s.resolveWith(o,[u]),!1)},u=s.promise({elem:o,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},t),originalProperties:e,originalOptions:t,startTime:Qe||ot(),duration:t.duration,tweens:[],createTween:function(e,t){var n=C.Tween(o,u.opts,e,t,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(n),n},stop:function(e){var t=0,n=e?u.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)u.tweens[t].run(1);return e?(s.notifyWith(o,[u,1,0]),s.resolveWith(o,[u,e])):s.rejectWith(o,[u,e]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=Y(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=C.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(u,o,c,u.opts))return y(n.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=n.stop.bind(n)),n;return C.map(c,st,u),y(u.opts.start)&&u.opts.start.call(o,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(l,{elem:o,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return oe(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,u,c,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&re(e),g=K.get(e,"fxshow");for(r in n.queue||(null==(a=C._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,C.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],nt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||C.style(e,r)}if((l=!C.isEmptyObject(t))||!C.isEmptyObject(f))for(r in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=g&&g.display)&&(u=K.get(e,"display")),"none"===(c=C.css(e,"display"))&&(u?c=u:(se([e],!0),u=e.style.display||u,c=C.css(e,"display"),se([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===C.css(e,"float")&&(l||(h.done(function(){p.display=u}),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=K.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&se([e],!0),h.done(function(){for(r in m||se([e]),K.remove(e,"fxshow"),f)C.style(e,r,f[r])})),l=st(m?g[r]:0,r,h),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),C.speed=function(e,t,n){var r=e&&"object"==typeof e?C.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return C.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in C.fx.speeds?r.duration=C.fx.speeds[r.duration]:r.duration=C.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&C.dequeue(this,r.queue)},r},C.fn.extend({fadeTo:function(e,t,n,r){return this.filter(re).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=C.isEmptyObject(t),o=C.speed(e,n,r),a=function(){var e=lt(this,C.extend({},t),o);(i||K.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=C.timers,r=K.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&rt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||C.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=K.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=C.timers,o=n?n.length:0;for(t.finish=!0,C.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),C.each(["toggle","show","hide"],function(e,r){var i=C.fn[r];C.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(at(r,!0),e,t,n)}}),C.each({slideDown:at("show"),slideUp:at("hide"),slideToggle:at("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){C.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),C.timers=[],C.fx.tick=function(){var e,t=0,n=C.timers;for(Qe=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||C.fx.stop(),Qe=void 0},C.fx.timer=function(e){C.timers.push(e),C.fx.start()},C.fx.interval=13,C.fx.start=function(){Je||(Je=!0,it())},C.fx.stop=function(){Je=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(r,e){return r=C.fx&&C.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=T.setTimeout(e,r);t.stop=function(){T.clearTimeout(n)}})},et=S.createElement("input"),tt=S.createElement("select").appendChild(S.createElement("option")),et.type="checkbox",v.checkOn=""!==et.value,v.optSelected=tt.selected,(et=S.createElement("input")).value="t",et.type="radio",v.radioValue="t"===et.value;var ut,ct=C.expr.attrHandle;C.fn.extend({attr:function(e,t){return B(this,C.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){C.removeAttr(this,e)})}}),C.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?C.prop(e,t,n):(1===o&&C.isXMLDoc(e)||(i=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?ut:void 0)),void 0!==n?null===n?void C.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=C.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ut={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ct[t]||C.find.attr;ct[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ct[o],ct[o]=r,r=null!=a(e,t,n)?o:null,ct[o]=i),r}});var dt=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;function ft(e){return(e.match(D)||[]).join(" ")}function pt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}C.fn.extend({prop:function(e,t){return B(this,C.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[C.propFix[e]||e]})}}),C.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(e)||(t=C.propFix[t]||t,i=C.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,l=0;if(y(t))return this.each(function(e){C(this).addClass(t.call(this,e,pt(this)))});if((e=mt(t)).length)for(;n=this[l++];)if(i=pt(n),r=1===n.nodeType&&" "+ft(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ft(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,l=0;if(y(t))return this.each(function(e){C(this).removeClass(t.call(this,e,pt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)for(;n=this[l++];)if(i=pt(n),r=1===n.nodeType&&" "+ft(i)+" "){for(a=0;o=e[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=ft(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):y(i)?this.each(function(e){C(this).toggleClass(i.call(this,e,pt(this),t),t)}):this.each(function(){var e,t,n,r;if(a)for(t=0,n=C(this),r=mt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!==o||((e=pt(this))&&K.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":K.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+ft(pt(n))+" ").indexOf(t))return!0;return!1}});var gt=/\r/g;C.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=y(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,C(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=C.map(t,function(e){return null==e?"":e+""})),(r=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=C.valHooks[t.type]||C.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(gt,""):null==e?"":e:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:ft(C.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(t=C(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=C.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<C.inArray(C.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<C.inArray(C(e).val(),t)}},v.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in T;var vt=/^(?:focusinfocus|focusoutblur)$/,yt=function(e){e.stopPropagation()};C.extend(C.event,{trigger:function(e,t,n,r){var i,o,a,s,l,u,c,d,h=[n||S],f=g.call(e,"type")?e.type:e,p=g.call(e,"namespace")?e.namespace.split("."):[];if(o=d=a=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!vt.test(f+C.event.triggered)&&(-1<f.indexOf(".")&&(f=(p=f.split(".")).shift(),p.sort()),l=f.indexOf(":")<0&&"on"+f,(e=e[C.expando]?e:new C.Event(f,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:C.makeArray(t,[e]),c=C.event.special[f]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!b(n)){for(s=c.delegateType||f,vt.test(s+f)||(o=o.parentNode);o;o=o.parentNode)h.push(o),a=o;a===(n.ownerDocument||S)&&h.push(a.defaultView||a.parentWindow||T)}for(i=0;(o=h[i++])&&!e.isPropagationStopped();)d=o,e.type=1<i?s:c.bindType||f,(u=(K.get(o,"events")||{})[e.type]&&K.get(o,"handle"))&&u.apply(o,t),(u=l&&o[l])&&u.apply&&$(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(h.pop(),t)||!$(n)||l&&y(n[f])&&!b(n)&&((a=n[l])&&(n[l]=null),C.event.triggered=f,e.isPropagationStopped()&&d.addEventListener(f,yt),n[f](),e.isPropagationStopped()&&d.removeEventListener(f,yt),C.event.triggered=void 0,a&&(n[l]=a)),e.result}},simulate:function(e,t,n){var r=C.extend(new C.Event,n,{type:e,isSimulated:!0});C.event.trigger(r,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each(function(){C.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){C.event.simulate(r,e.target,C.event.fix(e))};C.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=K.access(e,r);t||e.addEventListener(n,i,!0),K.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=K.access(e,r)-1;t?K.access(e,r,t):(e.removeEventListener(n,i,!0),K.remove(e,r))}}});var bt=T.location,wt=Date.now(),xt=/\?/;C.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+e),t};var kt=/\[\]$/,Tt=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;function Lt(n,e,r,i){var t;if(Array.isArray(e))C.each(e,function(e,t){r||kt.test(n)?i(n,t):Lt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Lt(n+"["+t+"]",e[t],r,i)}C.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,function(){i(this.name,this.value)});else for(n in e)Lt(n,e[n],t,i);return r.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&Ct.test(this.nodeName)&&!St.test(e)&&(this.checked||!le.test(e))}).map(function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:n.replace(Tt,"\r\n")}}).get()}});var Et=/%20/g,_t=/#.*$/,Nt=/([?&])_=[^&]*/,At=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,Ot=/^\/\//,Rt={},Pt={},Dt="*/".concat("*"),zt=S.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(y(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},l=t===Pt;function u(e){var r;return s[e]=!0,C.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||l||s[n]?l?!(r=n):void 0:(i.dataTypes.unshift(n),u(n),!1)}),r}return u(i.dataTypes[0])||!s["*"]&&u("*")}function Ht(e,t){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&C.extend(!0,e,r),e}zt.href=bt.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dt,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":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ht(Ht(e,C.ajaxSettings),t):Ht(C.ajaxSettings,e)},ajaxPrefilter:It(Rt),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,d,h,n,f,r,p,m,i,o,g=C.ajaxSetup({},t),v=g.context||g,y=g.context&&(v.nodeType||v.jquery)?C(v):C.event,b=C.Deferred(),w=C.Callbacks("once memory"),x=g.statusCode||{},a={},s={},l="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(p){if(!n)for(n={};t=At.exec(h);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return p?h:null},setRequestHeader:function(e,t){return null==p&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==p&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(p)k.always(e[k.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||l;return c&&c.abort(t),u(0,t),this}};if(b.promise(k),g.url=((e||g.url||bt.href)+"").replace(Ot,bt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(D)||[""],null==g.crossDomain){r=S.createElement("a");try{r.href=g.url,r.href=r.href,g.crossDomain=zt.protocol+"//"+zt.host!=r.protocol+"//"+r.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=C.param(g.data,g.traditional)),Wt(Rt,g,t,k),p)return k;for(i in(m=C.event&&g.global)&&0==C.active++&&C.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Mt.test(g.type),d=g.url.replace(_t,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Et,"+")):(o=g.url.slice(d.length),g.data&&(g.processData||"string"==typeof g.data)&&(d+=(xt.test(d)?"&":"?")+g.data,delete g.data),!1===g.cache&&(d=d.replace(Nt,"$1"),o=(xt.test(d)?"&":"?")+"_="+wt+++o),g.url=d+o),g.ifModified&&(C.lastModified[d]&&k.setRequestHeader("If-Modified-Since",C.lastModified[d]),C.etag[d]&&k.setRequestHeader("If-None-Match",C.etag[d])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&k.setRequestHeader("Content-Type",g.contentType),k.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Dt+"; q=0.01":""):g.accepts["*"]),g.headers)k.setRequestHeader(i,g.headers[i]);if(g.beforeSend&&(!1===g.beforeSend.call(v,k,g)||p))return k.abort();if(l="abort",w.add(g.complete),k.done(g.success),k.fail(g.error),c=Wt(Pt,g,t,k)){if(k.readyState=1,m&&y.trigger("ajaxSend",[k,g]),p)return k;g.async&&0<g.timeout&&(f=T.setTimeout(function(){k.abort("timeout")},g.timeout));try{p=!1,c.send(a,u)}catch(e){if(p)throw e;u(-1,e)}}else u(-1,"No Transport");function u(e,t,n,r){var i,o,a,s,l,u=t;p||(p=!0,f&&T.clearTimeout(f),c=void 0,h=r||"",k.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(g,k,n)),s=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(g,s,k,i),i?(g.ifModified&&((l=k.getResponseHeader("Last-Modified"))&&(C.lastModified[d]=l),(l=k.getResponseHeader("etag"))&&(C.etag[d]=l)),204===e||"HEAD"===g.type?u="nocontent":304===e?u="notmodified":(u=s.state,o=s.data,i=!(a=s.error))):(a=u,!e&&u||(u="error",e<0&&(e=0))),k.status=e,k.statusText=(t||u)+"",i?b.resolveWith(v,[o,u,k]):b.rejectWith(v,[k,u,a]),k.statusCode(x),x=void 0,m&&y.trigger(i?"ajaxSuccess":"ajaxError",[k,g,i?o:a]),w.fireWith(v,[k,u]),m&&(y.trigger("ajaxComplete",[k,g]),--C.active||C.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,void 0,t,"script")}}),C.each(["get","post"],function(e,i){C[i]=function(e,t,n,r){return y(t)&&(r=r||n,n=t,t=void 0),C.ajax(C.extend({url:e,type:i,dataType:r,data:t,success:n},C.isPlainObject(e)&&e))}}),C._evalUrl=function(e){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},C.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return y(n)?this.each(function(e){C(this).wrapInner(n.call(this,e))}):this.each(function(){var e=C(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=y(t);return this.each(function(e){C(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var Ft={0:200,1223:204},jt=C.ajaxSettings.xhr();v.cors=!!jt&&"withCredentials"in jt,v.ajax=jt=!!jt,C.ajaxTransport(function(i){var o,a;if(v.cors||jt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ft[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&T.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),C.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return C.globalEval(e),e}}}),C.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),C.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=C("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Bt,Ut=[],qt=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||C.expando+"_"+wt++;return this[e]=!0,e}}),C.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(qt,"$1"+r):!1!==e.jsonp&&(e.url+=(xt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||C.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){void 0===i?C(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Ut.push(r)),o&&y(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Bt=S.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Bt.childNodes.length),C.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=_.exec(e))?[t.createElement(i[1])]:(i=ve([e],t,o),o&&o.length&&C(o).remove(),C.merge([],i.childNodes)));var r,i,o},C.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ft(e.slice(s)),e=e.slice(0,s)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&C.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?C("<div>").append(C.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){C.fn[t]=function(e){return this.on(t,e)}}),C.expr.pseudos.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=C.css(e,"position"),c=C(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=C.css(e,"top"),l=C.css(e,"left"),("absolute"===u||"fixed"===u)&&-1<(o+l).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),y(t)&&(t=t.call(e,n,C.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):c.css(d)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){C.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===C.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===C.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=C(e).offset()).top+=C.css(e,"borderTopWidth",!0),i.left+=C.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-C.css(r,"marginTop",!0),left:t.left-i.left-C.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===C.css(e,"position");)e=e.offsetParent;return e||ye})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;C.fn[t]=function(e){return B(this,function(e,t,n){var r;if(b(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),C.each(["top","left"],function(e,n){C.cssHooks[n]=Fe(v.pixelPosition,function(e,t){if(t)return t=He(e,n),ze.test(t)?C(e).position()[n]+"px":t})}),C.each({Height:"height",Width:"width"},function(a,s){C.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){C.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return b(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?C.css(e,t,i):C.style(e,t,n,i)},s,n?e:void 0,n)}})}),C.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(e,n){C.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),C.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),C.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),C.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||C.guid++,i},C.holdReady=function(e){e?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=E,C.isFunction=y,C.isWindow=b,C.camelCase=Y,C.type=x,C.now=Date.now,C.isNumeric=function(e){var t=C.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return C});var Vt=T.jQuery,Yt=T.$;return C.noConflict=function(e){return T.$===C&&(T.$=Yt),e&&T.jQuery===C&&(T.jQuery=Vt),C},e||(T.jQuery=T.$=C),C}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var C=window,L=C.document,E="addEventListener",_="removeEventListener",N="getBoundingClientRect",A=function(){return!1},M=C.attachEvent&&!C[E],O=["","-webkit-","-moz-","-o-"].filter(function(e){var t=L.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length}).shift()+"calc",R=function(e){return"string"==typeof e||e instanceof String?L.querySelector(e):e};return function(u,i){function c(t,e,n){var r=k(h,e,n);Object.keys(r).forEach(function(e){return t.style[e]=r[e]})}function o(e){var t=l[this.a],n=l[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,c(t.element,t.size,this.aGutterSize),c(n.element,n.size,this.bGutterSize)}function a(){var e=l[this.a].element,t=l[this.b].element;this.size=e[N]()[h]+t[N]()[h]+this.aGutterSize+this.bGutterSize,this.start=e[N]()[n]}function d(e){var t=this,n=l[t.a].element,r=l[t.b].element;!t.dragging&&i.onDragStart&&i.onDragStart(),e.preventDefault(),t.dragging=!0,t.move=function(e){var t;this.dragging&&((t="touches"in e?e.touches[0][s]-this.start:e[s]-this.start)<=l[this.a].minSize+y+this.aGutterSize?t=l[this.a].minSize+this.aGutterSize:t>=this.size-(l[this.b].minSize+y+this.bGutterSize)&&(t=this.size-(l[this.b].minSize+this.bGutterSize)),o.call(this,t),i.onDrag&&i.onDrag())}.bind(t),t.stop=function(){var e=this,t=l[e.a].element,n=l[e.b].element;e.dragging&&i.onDragEnd&&i.onDragEnd(),e.dragging=!1,C[_]("mouseup",e.stop),C[_]("touchend",e.stop),C[_]("touchcancel",e.stop),e.parent[_]("mousemove",e.move),e.parent[_]("touchmove",e.move),delete e.stop,delete e.move,t[_]("selectstart",A),t[_]("dragstart",A),n[_]("selectstart",A),n[_]("dragstart",A),t.style.userSelect="",t.style.webkitUserSelect="",t.style.MozUserSelect="",t.style.pointerEvents="",n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}.bind(t),C[E]("mouseup",t.stop),C[E]("touchend",t.stop),C[E]("touchcancel",t.stop),t.parent[E]("mousemove",t.move),t.parent[E]("touchmove",t.move),n[E]("selectstart",A),n[E]("dragstart",A),r[E]("selectstart",A),r[E]("dragstart",A),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.MozUserSelect="none",n.style.pointerEvents="none",r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",t.gutter.style.cursor=w,t.parent.style.cursor=w,a.call(t)}function e(o){o.forEach(function(e,t){if(0<t){var n=S[t-1],r=l[n.a],i=l[n.b];r.size=o[t-1],i.size=e,c(r.element,r.size,n.aGutterSize),c(i.element,i.size,n.bGutterSize)}})}function t(){S.forEach(function(e){e.parent.removeChild(e.gutter),l[e.a].element.style[h]="",l[e.b].element.style[h]=""})}void 0===i&&(i={});var h,s,n,l,f=R(u[0]).parentNode,p=C.getComputedStyle(f).flexDirection,m=i.sizes||u.map(function(){return 100/u.length}),r=void 0!==i.minSize?i.minSize:100,g=Array.isArray(r)?r:u.map(function(){return r}),v=void 0!==i.gutterSize?i.gutterSize:10,y=void 0!==i.snapOffset?i.snapOffset:30,b=i.direction||"horizontal",w=i.cursor||("horizontal"===b?"ew-resize":"ns-resize"),x=i.gutter||function(e,t){var n=L.createElement("div");return n.className="gutter gutter-"+t,n},k=i.elementStyle||function(e,t,n){var r={};return"string"==typeof t||t instanceof String?r[e]=t:r[e]=M?t+"%":O+"("+t+"% - "+n+"px)",r},T=i.gutterStyle||function(e,t){return(n={})[e]=t+"px",n;var n};"horizontal"===b?(h="width",s="clientX",n="left"):"vertical"===b&&(h="height",s="clientY",n="top");var S=[];return l=u.map(function(e,t){var n,r,i,o={element:R(e),size:m[t],minSize:g[t]};if(0<t&&((n={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:b,parent:f}).aGutterSize=v,n.bGutterSize=v,n.isFirst&&(n.aGutterSize=v/2),n.isLast&&(n.bGutterSize=v/2),"row-reverse"===p||"column-reverse"===p)){var a=n.a;n.a=n.b,n.b=a}if(!M&&0<t){var s=x(t,b);r=s,i=T(h,v),Object.keys(i).forEach(function(e){return r.style[e]=i[e]}),s[E]("mousedown",d.bind(n)),s[E]("touchstart",d.bind(n)),f.insertBefore(s,o.element),n.gutter=s}0===t||t===u.length-1?c(o.element,o.size,v/2):c(o.element,o.size,v);var l=o.element[N]()[h];return l<o.minSize&&(o.minSize=l),0<t&&S.push(n),o}),M?{setSizes:e,destroy:t}:{setSizes:e,getSizes:function(){return l.map(function(e){return e.size})},collapse:function(e){if(e===S.length){var t=S[e-1];a.call(t),M||o.call(t,t.size-t.bGutterSize)}else{var n=S[e];a.call(n),M||o.call(n,n.aGutterSize)}},destroy:t}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";function s(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function b(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function x(e,t){return b(e).appendChild(t)}function k(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function d(e,t,n,r){var i=k(e,t,n,r);return i.setAttribute("role","presentation"),i}function g(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 S(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function r(e,t){var n=e.className;s(t).test(n)||(e.className+=(n?" ":"")+t)}function l(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!s(n[r]).test(t)&&(t+=" "+n[r]);return t}function v(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function h(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function C(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||t<=s)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function w(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function L(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||t<=i+a)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}function T(e){for(;No.length<=e;)No.push(V(No)+" ");return No[e]}function V(e){return e[e.length-1]}function y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function i(){}function n(e,t){var n;return Object.create?n=Object.create(e):(i.prototype=e,n=new i),t&&h(t,n),n}function o(e){return/\w/.test(e)||""<e&&(e.toUpperCase()!=e.toLowerCase()||Ao.test(e))}function E(e,t){return t?!!(-1<t.source.indexOf("\\w")&&o(e))||t.test(e):o(e)}function a(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function _(e){return 768<=e.charCodeAt(0)&&Mo.test(e)}function N(e,t,n){for(;(n<0?0<t:t<e.length)&&_(e.charAt(t));)t+=n;return t}function A(e,t,n){for(var r=n<t?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function u(e,t,n){var r=this;this.input=n,r.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=d("div",null,"CodeMirror-code"),r.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=k("div",null,"CodeMirror-cursors"),r.measure=k("div",null,"CodeMirror-measure"),r.lineMeasure=k("div",null,"CodeMirror-measure"),r.lineSpace=d("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var i=d("div",[r.lineSpace],"CodeMirror-lines");r.mover=k("div",[i],null,"position: relative"),r.sizer=k("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=k("div",null,null,"position: absolute; height: "+So+"px; width: 1px;"),r.gutters=k("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=k("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=k("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Qi&&Ji<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),eo||Gi&&uo||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function M(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function O(e,n,r){var i=[],o=n.line;return e.iter(n.line,r.line+1,function(e){var t=e.text;o==r.line&&(t=t.slice(0,r.ch)),o==n.line&&(t=t.slice(n.ch)),i.push(t),++o}),i}function c(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function R(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function P(e){if(null==e.parent)return null;for(var t=e.parent,n=w(t.lines,e),r=t.parent;r;r=(t=r).parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function f(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function D(e,t){return t>=e.first&&t<e.first+e.size}function z(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function I(e,t,n){if(void 0===n&&(n=null),!(this instanceof I))return new I(e,t,n);this.line=e,this.ch=t,this.sticky=n}function W(e,t){return e.line-t.line||e.ch-t.ch}function H(e,t){return e.sticky==t.sticky&&0==W(e,t)}function p(e){return I(e.line,e.ch)}function F(e,t){return W(e,t)<0?t:e}function j(e,t){return W(e,t)<0?e:t}function m(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function B(e,t){if(t.line<e.first)return I(e.first,0);var n,r,i,o=e.first+e.size-1;return t.line>o?I(o,M(e,o).text.length):(r=M(e,(n=t).line).text.length,null==(i=n.ch)||r<i?I(n.line,r):i<0?I(n.line,0):n)}function U(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=B(e,t[r]);return n}function q(e,t,n){this.marker=e,this.from=t,this.to=n}function Y(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function $(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function G(e,t){if(t.full)return null;var n=D(e,t.from.line)&&M(e,t.from.line).markedSpans,r=D(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==W(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new q(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new q(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),u=1==t.text.length,c=V(t.text).length+(u?i:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var f=Y(l,h.marker);f?u&&(h.to=null==f.to?null:f.to+c):h.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=c),null==m.from?Y(s,m.marker)||(m.from=c,u&&(s||(s=[])).push(m)):(m.from+=c,u&&(s||(s=[])).push(m))}s&&(s=K(s)),l&&l!=s&&(l=K(l));var g=[s];if(!u){var v,y=t.text.length-2;if(0<y&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new q(s[b].marker,null,null));for(var w=0;w<y;++w)g.push(v);g.push(l)}return g}function K(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function X(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Z(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Q(e){return e.inclusiveLeft?-1:0}function J(e){return e.inclusiveRight?1:0}function ee(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=W(r.from,i.from)||Q(e)-Q(t);return o?-o:W(r.to,i.to)||J(e)-J(t)||t.id-e.id}function t(e,t){var n,r=Ro&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||ee(n,i.marker)<0)&&(n=i.marker);return n}function te(e){return t(e,!0)}function ne(e){return t(e,!1)}function re(e,t,n,r,i){var o=M(e,t),a=Ro&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=W(u.from,n)||Q(l.marker)-Q(i),d=W(u.to,r)||J(l.marker)-J(i);if(!(0<=c&&d<=0||c<=0&&0<=d)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?0<=W(u.to,n):0<W(u.to,n))||0<=c&&(l.marker.inclusiveRight&&i.inclusiveLeft?W(u.from,r)<=0:W(u.from,r)<0)))return!0}}}function ie(e){for(var t;t=te(e);)e=t.find(-1,!0).line;return e}function oe(e,t){var n=M(e,t),r=ie(n);return n==r?t:P(r)}function ae(e,t){if(t>e.lastLine())return t;var n,r=M(e,t);if(!se(e,r))return t;for(;n=ne(r);)r=n.find(1,!0).line;return P(r)+1}function se(e,t){var n=Ro&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&le(e,t,r))return!0}}function le(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return le(e,r.line,Y(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&le(e,t,i))return!0}function ue(e){for(var t=0,n=(e=ie(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function ce(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=te(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=ne(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function de(e){var n=e.display,t=e.doc;n.maxLine=M(t,t.first),n.maxLineLength=ce(n.maxLine),n.maxLineChanged=!0,t.iter(function(e){var t=ce(e);t>n.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}function he(e,t,n){var r;Po=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Po=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Po=i)}return null!=r?r:Po}function fe(e,t){var n=e.order;return null==n&&(n=e.order=Do(e.text,t)),n}function pe(e,t){return e._handlers&&e._handlers[t]||zo}function me(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=w(i,n);-1<o&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var n=pe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==w(n,t[r])&&n.push(t[r])}function be(e,t){return 0<pe(e,t).length}function e(e){e.prototype.on=function(e,t){Io(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Te(e){we(e),xe(e)}function Se(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),co&&e.ctrlKey&&1==t&&(t=3),t}function Le(e){if(null==xo){var t=k("span","​");x(e,k("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(xo=t.offsetWidth<=1&&2<t.offsetHeight&&!(Qi&&Ji<8))}var n=xo?k("span","​"):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ee(e){if(null!=ko)return ko;var t=x(e,document.createTextNode("AخA")),n=mo(t,0,1).getBoundingClientRect(),r=mo(t,1,2).getBoundingClientRect();return b(e),!(!n||n.left==n.right)&&(ko=r.right-n.right<3)}function _e(e){if("string"==typeof e&&qo.hasOwnProperty(e))e=qo[e];else if(e&&"string"==typeof e.name&&qo.hasOwnProperty(e.name)){var t=qo[e.name];"string"==typeof t&&(t={name:t}),(e=n(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ne(e,t){t=_e(t);var n=Uo[t.name];if(!n)return Ne(e,"text/plain");var r=n(e,t);if(Vo.hasOwnProperty(t.name)){var i=Vo[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ae(e,t){h(t,Vo.hasOwnProperty(e)?Vo[e]:Vo[e]={})}function Me(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Oe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Re(e,t,n){return!e.startState||e.startState(t,n)}function Pe(t,n,r,e){var l=[t.state.modeGen],i={};Be(t,n.text,t.doc.mode,r,function(e,t){return l.push(e,t)},i,e);for(var u=r.state,o=0;o<t.state.overlays.length;++o)!function(e){r.baseTokens=l;var o=t.state.overlays[e],a=1,s=0;r.state=!0,Be(t,n.text,o.mode,r,function(e,t){for(var n=a;s<e;){var r=l[a];e<r&&l.splice(a,1,e,l[a+1],r),a+=2,s=Math.min(e,r)}if(t)if(o.opaque)l.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var i=l[n+1];l[n+1]=(i?i+" ":"")+"overlay "+t}},i),r.state=u,r.baseTokens=null,r.baseTokenPos=1}(o);return{styles:l,classes:i.bgClass||i.textClass?i:null}}function De(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ze(e,P(t)),i=t.text.length>e.options.maxHighlightLength&&Me(e.doc.mode,r.state),o=Pe(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ze(n,r,e){var t=n.doc,i=n.display;if(!t.mode.startState)return new Go(t,!0,r);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;a<s;--s){if(s<=o.first)return o.first;var l=M(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof $o?u.lookAhead:0)<=o.modeFrontier))return s;var c=C(l.text,null,e.options.tabSize);(null==i||c<r)&&(i=s-1,r=c)}return i}(n,r,e),a=o>t.first&&M(t,o-1).stateAfter,s=a?Go.fromSaved(t,a,o):new Go(t,Re(t.mode),o);return t.iter(o,r,function(e){Ie(n,e.text,s);var t=s.line;e.stateAfter=t==r-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?s.save():null,s.nextLine()}),e&&(t.modeFrontier=s.line),s}function Ie(e,t,n,r){var i=e.doc.mode,o=new Yo(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&We(i,n.state);!o.eol();)He(i,o,n.state),o.start=o.pos}function We(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Oe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function He(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Oe(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Fe(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=M(a,(t=B(a,t)).line),u=ze(e,t.line,n),c=new Yo(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=He(s,c,u.state),r&&o.push(new Ko(c,i,Me(a.mode,u.state)));return r?o:new Ko(c,i,u.state)}function je(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Be(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new Yo(t,e.options.tabSize,r),h=e.options.addModeClass&&[null];for(""==t&&je(We(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&Ie(e,t,r,d.pos),d.pos=t.length,l=null):l=je(He(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<d.start;)i(u=Math.min(d.start,u+5e3),c);c=l}d.start=d.pos}for(;u<d.pos;){var p=Math.min(d.pos,u+5e3);i(p,c),u=p}}function Ue(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jo:Qo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function qe(e,t){var n=d("span",null,null,eo?"padding-right: .1px":null),r={pre:d("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Qi||eo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Ye,Ee(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=$e(r.addToken,a)),r.map=[],Ke(o,r,De(e,o,t!=e.display.externalMeasured&&P(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=l(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=l(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Le(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(eo){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=l(r.pre.className,r.textClass||"")),r}function Ve(e){var t=k("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ye(e,t,n,r,i,o,a){if(t){var s,l=e.splitSpaces?function(e,t){if(1<e.length&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,u=e.cm.state.specialChars,c=!1;if(u.test(t)){s=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var h=u.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(l.slice(d,d+f));Qi&&Ji<9?s.appendChild(k("span",[p])):s.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;d+=f+1;var m=void 0;if("\t"==h[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=s.appendChild(k("span",T(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==h[0]||"\n"==h[0]?(m=s.appendChild(k("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]):((m=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),Qi&&Ji<9?s.appendChild(k("span",[m])):s.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,s=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,s),Qi&&Ji<9&&(c=!0),e.pos+=t.length;if(e.trailingSpace=32==l.charCodeAt(t.length-1),n||r||i||c||a){var y=n||"";r&&(y+=r),i&&(y+=i);var b=k("span",[s],y,a);return o&&(b.title=o),e.content.appendChild(b)}e.content.appendChild(s)}}function $e(d,h){return function(e,t,n,r,i,o,a){n=n?n+" cm-force-border":"cm-force-border";for(var s=e.pos,l=s+t.length;;){for(var u=void 0,c=0;c<h.length&&!((u=h[c]).to>s&&u.from<=s);c++);if(u.to>=l)return d(e,t,n,r,i,o,a);d(e,t.slice(0,u.to-s),n,r,null,o,a),r=null,t=t.slice(u.to-s),s=u.to}}}function Ge(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ke(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,h,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=u=c=d=s="",h=null,v=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var x=r[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?y.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,u=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&x.from==p&&(c+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||ee(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==v&&(u+=" "+b[T]);if(!h||h.from==p)for(var S=0;S<y.length;++S)Ge(t,0,y[S]);if(h&&(h.from||0)==p){if(Ge(t,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(f<=p)break;for(var C=Math.min(f,v);;){if(g){var L=p+g.length;if(!h){var E=C<L?g.slice(0,C-p):g;t.addToken(t,E,a?a+l:l,c,p+E.length==v?u:"",d,s)}if(C<=L){g=g.slice(C-p),p=C;break}p=L,c=""}g=i.slice(o,o=n[m++]),a=Ue(n[m++],t.cm.options)}}else for(var _=1;_<n.length;_+=2)t.addToken(t,i.slice(o,o=n[_]),Ue(n[_+1],t.cm.options))}function Xe(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=ne(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?P(V(this.rest))-n+1:1,this.node=this.text=null,this.hidden=se(e,t)}function Ze(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Xe(e.doc,M(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Qe(e,t){var n=pe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);ea?r=ea.delayedCallbacks:ta?r=ta:(r=ta=[],setTimeout(Je,0));for(var o=0;o<n.length;++o)!function(e){r.push(function(){return n[e].apply(null,i)})}(o)}}function Je(){var e=ta;ta=null;for(var t=0;t<e.length;++t)e[t]()}function et(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?(a=e,void 0,l=(s=t).text.className,u=nt(a,s),s.text==s.node&&(s.node=u.pre),s.text.parentNode.replaceChild(u.pre,s.text),s.text=u.pre,u.bgClass!=s.bgClass||u.textClass!=s.textClass?(s.bgClass=u.bgClass,s.textClass=u.textClass,rt(a,s)):l&&(s.text.className=l)):"gutter"==o?it(e,t,n,r):"class"==o?rt(e,t):"widget"==o&&ot(e,t,r)}var a,s,l,u;t.changes=null}function tt(e){return e.node==e.text&&(e.node=k("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Qi&&Ji<8&&(e.node.style.zIndex=2)),e.node}function nt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):qe(e,t)}function rt(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=tt(t);t.background=r.insertBefore(k("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?tt(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function it(e,t,n,r){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 i=tt(t);t.gutterBackground=k("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=tt(t),s=t.gutter=k("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(k("div",z(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.options.gutters.length;++l){var u=e.options.gutters[l],c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(k("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function ot(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);at(e,t,n)}function at(e,t,n){if(st(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)st(e,t.rest[r],t,n,!1)}function st(e,t,n,r,i){if(t.widgets)for(var o=tt(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],u=k("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),lt(l,u,n,r),e.display.input.setUneditable(u),i&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Qe(l,"redraw")}}function lt(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function ut(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!g(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),x(t.display.measure,k("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function ct(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function dt(e){return e.lineSpace.offsetTop}function ht(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ft(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=x(e.measure,k("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function pt(e){return So-e.display.nativeBarWidth}function mt(e){return e.display.scroller.clientWidth-pt(e)-e.display.barWidth}function gt(e){return e.display.scroller.clientHeight-pt(e)-e.display.barHeight}function vt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(P(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function yt(e,t,n,r){return xt(e,wt(e,t),n,r)}function bt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Gt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function wt(e,t){var n=P(t),r=bt(e,n);r&&!r.text?r=null:r&&r.changes&&(et(e,r,n,Ut(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=P(t=ie(t)),r=e.display.externalMeasured=new Xe(e.doc,t,n);r.lineN=n;var i=r.built=qe(e,r);return r.text=i.pre,x(e.display.lineMeasure,i.pre),r}(e,t));var i=vt(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function xt(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&mt(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];2<Math.abs(l.bottom-u.bottom)&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=kt(t.map,n,r),a=o.node,s=o.start,l=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&_(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&_(t.line.text.charAt(o.coverStart+l));)++l;if((i=Qi&&Ji<9&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Tt(mo(a,s,l).getClientRects(),r)).left||i.right||0==s)break;l=s,s-=1,u="right"}Qi&&Ji<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Bo)return Bo;var t=x(e,k("span","x")),n=t.getBoundingClientRect(),r=mo(t,0,1).getBoundingClientRect();return Bo=1<Math.abs(n.left-r.left)}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;0<s&&(u=r="right"),i=e.options.lineWrapping&&1<(d=a.getClientRects()).length?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(Qi&&Ji<9&&!s&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Bt(e.display),top:h.top,bottom:h.bottom}:na}for(var f=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(f+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=f,w.rbottom=p),w}(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function kt(e,t,n){for(var r,i,o,a,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(u==e.length-3||t==l&&e[u+3]>t)&&(i=(o=l-s)-1,l<=t&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Tt(e,t){var n=na;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;0<=i&&(n=e[i]).left==n.right;i--);return n}function St(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 Ct(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)St(e.display.view[t])}function Lt(e){Ct(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Et(){return no&&lo?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function _t(){return no&&lo?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Nt(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=ut(e.widgets[n]));return t}function At(e,t,n,r,i){if(!i){var o=Nt(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=ue(t);if("local"==r?a+=dt(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:_t());var l=s.left+("window"==r?0:Et());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Mt(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Et(),i-=_t();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Ot(e,t,n,r,i){return r||(r=M(e.doc,t.line)),At(e,r,yt(e,r,t.ch,i),n)}function Rt(r,e,i,o,a,s){function l(e,t){var n=xt(r,a,e,t?"right":"left",s);return t?n.left=n.right:n.right=n.left,At(r,o,n,i)}function t(e,t,n){return l(n?e-1:e,1==u[t].level!=n)}o=o||M(r.doc,e.line),a||(a=wt(r,o));var u=fe(o,r.doc.direction),n=e.ch,c=e.sticky;if(n>=o.text.length?(n=o.text.length,c="before"):n<=0&&(n=0,c="after"),!u)return l("before"==c?n-1:n,"before"==c);var d=he(u,n,c),h=Po,f=t(n,d,"before"==c);return null!=h&&(f.other=t(n,h,"before"!=c)),f}function Pt(e,t){var n=0;t=B(e.doc,t),e.options.lineWrapping||(n=Bt(e.display)*t.ch);var r=M(e.doc,t.line),i=ue(r)+dt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Dt(e,t,n,r,i){var o=I(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function zt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Dt(r.first,0,null,!0,-1);var i=f(r,n),o=r.first+r.size-1;if(o<i)return Dt(r.first+r.size-1,M(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=M(r,i);;){var s=Ft(e,a,i,t,n),l=ne(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&0<s.xRel))return s;i=P(a=u.to.line)}}function It(t,e,n,r){r-=Nt(e);var i=e.text.length,o=A(function(e){return xt(t,n,e-1).bottom<=r},i,0);return{begin:o,end:i=A(function(e){return xt(t,n,e).top>r},o,i)}}function Wt(e,t,n,r){return n||(n=wt(e,t)),It(e,t,n,At(e,t,xt(e,n,r),"line").top)}function Ht(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Ft(n,e,t,r,i){i-=ue(e);var o=wt(n,e),a=Nt(e),s=0,l=e.text.length,u=!0,c=fe(e,n.doc.direction);if(c){var d=(n.options.lineWrapping?function(e,t,n,r,i,o,a){var s=It(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h<i.length;h++){var f=i[h];if(!(f.from>=u||f.to<=l)){var p=xt(e,r,1!=f.level?Math.min(u,f.to)-1:Math.max(l,f.from)).right,m=p<o?o-p+1e9:p-o;(!c||m<d)&&(c=f,d=m)}}return c||(c=i[i.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}:function(r,i,o,a,s,l,u){var e=A(function(e){var t=s[e],n=1!=t.level;return Ht(Rt(r,I(o,n?t.to:t.from,n?"before":"after"),"line",i,a),l,u,!0)},0,s.length-1),t=s[e];if(0<e){var n=1!=t.level,c=Rt(r,I(o,n?t.from:t.to,n?"after":"before"),"line",i,a);Ht(c,l,u,!0)&&c.top>u&&(t=s[e-1])}return t})(n,e,t,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var h,f,p=null,m=null,g=A(function(e){var t=xt(n,o,e);return t.top+=a,t.bottom+=a,!!Ht(t,r,i,!1)&&(t.top<=i&&t.left<=r&&(p=e,m=t),!0)},s,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==u;g=p+(b?0:1),f=b?"after":"before",h=y?m.left:m.right}else{u||g!=l&&g!=s||g++,f=0==g?"after":g==e.text.length?"before":xt(n,o,g-(u?1:0)).bottom+a<=i==u?"after":"before";var w=Rt(n,I(t,g,f),"line",e,o);h=w.left,v=i<w.top||i>=w.bottom}return Dt(t,g=N(e.text,g,1),f,v,r-h)}function jt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Zo){Zo=k("pre");for(var t=0;t<49;++t)Zo.appendChild(document.createTextNode("x")),Zo.appendChild(k("br"));Zo.appendChild(document.createTextNode("x"))}x(e.measure,Zo);var n=Zo.offsetHeight/50;return 3<n&&(e.cachedTextHeight=n),b(e.measure),n||1}function Bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=k("span","xxxxxxxxxx"),n=k("pre",[t]);x(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function Ut(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:qt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function qt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Vt(r){var i=jt(r.display),o=r.options.lineWrapping,a=o&&Math.max(5,r.display.scroller.clientWidth/Bt(r.display)-3);return function(e){if(se(r.doc,e))return 0;var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;n++)e.widgets[n].height&&(t+=e.widgets[n].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function Yt(e){var t=e.doc,n=Vt(e);t.iter(function(e){var t=n(e);t!=e.height&&R(e,t)})}function $t(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=zt(e,o,a);if(r&&1==u.xRel&&(l=M(e.doc,u.line).text).length==u.ch){var c=C(l,l.length,e.options.tabSize)-l.length;u=I(u.line,Math.max(0,Math.round((o-ft(e.display).left)/Bt(e.display))-c))}return u}function Gt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Kt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xt(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&Zt(e,s.head,i),l||Jt(e,s,o)}}return r}function Zt(e,t,n){var r=Rt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(k("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(k("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Qt(e,t){return e.top-t.top||e.left-t.left}function Jt(a,e,t){function L(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(k("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?_-e:n)+"px;\n                             height: "+(r-t)+"px"))}function n(n,y,b){function w(e,t){return Ot(a,I(n,e),"div",o,t)}function x(e,t,n){var r=Wt(a,o,null,e),i="ltr"==t==("after"==n)?"left":"right";return w("after"==n?r.begin:r.end-(/\s/.test(o.text.charAt(r.end-1))?2:1),i)[i]}var k,T,o=M(i,n),S=o.text.length,C=fe(o,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(C,y||0,null==b?S:b,function(e,t,n,r){var i="ltr"==n,o=w(e,i?"left":"right"),a=w(t-1,i?"right":"left"),s=null==y&&0==e,l=null==b&&t==S,u=0==r,c=!C||r==C.length-1;if(a.top-o.top<=3){var d=(N?l:s)&&c,h=(N?s:l)&&u?E:(i?o:a).left,f=d?_:(i?a:o).right;L(h,o.top,f-h,o.bottom)}else{var p,m,g,v;i?(p=N&&s&&u?E:o.left,m=N?_:x(e,n,"before"),g=N?E:x(t,n,"after"),v=N&&l&&c?_:a.right):(p=N?x(e,n,"before"):E,m=!N&&s&&u?_:o.right,g=!N&&l&&c?E:a.left,v=N?x(t,n,"after"):_),L(p,o.top,m-p,o.bottom),o.bottom<a.top&&L(E,o.bottom,null,a.top),L(g,a.top,v-g,a.bottom)}(!k||Qt(o,k)<0)&&(k=o),Qt(a,k)<0&&(k=a),(!T||Qt(o,T)<0)&&(T=o),Qt(a,T)<0&&(T=a)}),{start:k,end:T}}var r=a.display,i=a.doc,o=document.createDocumentFragment(),s=ft(a.display),E=s.left,_=Math.max(r.sizerWidth,mt(a)-r.sizer.offsetLeft)-s.right,N="ltr"==i.direction,l=e.from(),u=e.to();if(l.line==u.line)n(l.line,l.ch,u.ch);else{var c=M(i,l.line),d=M(i,u.line),h=ie(c)==ie(d),f=n(l.line,l.ch,h?c.text.length+1:null).end,p=n(u.line,h?0:null,u.ch).start;h&&(f.top<p.top-2?(L(f.right,f.top,null,f.bottom),L(E,p.top,p.left,p.bottom)):L(f.right,f.top,p.left-f.right,f.bottom)),f.bottom<p.top&&L(E,f.bottom,null,p.top)}t.appendChild(o)}function en(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function tn(e){e.state.focused||(e.display.input.focus(),rn(e))}function nn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,on(e))},100)}function rn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,r(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),eo&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),en(e))}function on(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,yo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function an(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=void 0;if(!i.hidden){if(Qi&&Ji<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-n,n=a}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var l=i.line.height-o;if(o<2&&(o=jt(t)),(.005<l||l<-.005)&&(R(i.line,o),sn(i.line),i.rest))for(var u=0;u<i.rest.length;u++)sn(i.rest[u])}}}function sn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ln(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-dt(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=f(t,r),a=f(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?a=f(t,ue(M(t,o=s))+e.wrapper.clientHeight):Math.min(l,t.lastLine())>=a&&(o=f(t,ue(M(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function un(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=qt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function cn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=z(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(k("div",[k("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Bn(e),!0}return!1}function dn(e,t){var n=e.display,r=jt(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=gt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+ht(n),l=t.top<r,u=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,h=mt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>h;return f&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(f?0:10)):t.right>h+d-3&&(a.scrollLeft=t.right+(f?0:10)-h),a}function hn(e,t){null!=t&&(mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function fn(e){mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function pn(e,t,n){null==t&&null==n||mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gn(e,Pt(e,t.from),Pt(e,t.to),t.margin))}function gn(e,t,n,r){var i=dn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});pn(e,i.scrollLeft,i.scrollTop)}function vn(e,t){Math.abs(e.doc.scrollTop-t)<2||(Gi||jn(e,{top:t}),yn(e,t,!0),Gi&&jn(e),In(e,100))}function yn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bn(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,un(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function wn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ht(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?n:0,docHeight:r,scrollHeight:r+pt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function xn(e,t){t||(t=wn(e));var n=e.display.barWidth,r=e.display.barHeight;kn(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&an(e),kn(e,wn(e)),n=e.display.barWidth,r=e.display.barHeight}function kn(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function Tn(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&&yo(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new oa[n.options.scrollbarStyle](function(e){n.display.wrapper.insertBefore(e,n.display.scrollbarFiller),Io(e,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?bn(n,e):vn(n,e)},n),n.display.scrollbars.addClass&&r(n.display.wrapper,n.display.scrollbars.addClass)}function Sn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++aa},t=e.curOp,ea?ea.ops.push(t):t.ownsGroup=ea={ops:[t],delayedCallbacks:[]}}function Cn(e){!function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{ea=null,t(n)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)o=t[n],void 0,void 0,a=o.cm,s=a.display,r=a,i=void 0,i=r.display,!i.scrollbarsClipped&&i.scroller.offsetWidth&&(i.nativeBarWidth=i.scroller.offsetWidth-i.scroller.clientWidth,i.heightForcer.style.height=pt(r)+"px",i.sizer.style.marginBottom=-i.nativeBarWidth+"px",i.sizer.style.borderRightWidth=pt(r)+"px",i.scrollbarsClipped=!0),o.updateMaxLine&&de(a),o.mustUpdate=o.viewChanged||o.forceUpdate||null!=o.scrollTop||o.scrollToPos&&(o.scrollToPos.from.line<s.viewFrom||o.scrollToPos.to.line>=s.viewTo)||s.maxLineChanged&&a.options.lineWrapping,o.update=o.mustUpdate&&new sa(a,o.mustUpdate&&{top:o.scrollTop,ensure:o.scrollToPos},o.forceUpdate);var r,i;var o,a,s;for(var l=0;l<t.length;l++)u=t[l],u.updatedDisplay=u.mustUpdate&&Hn(u.cm,u.update);var u;for(var c=0;c<t.length;c++)d=t[c],h=void 0,f=void 0,h=d.cm,f=h.display,d.updatedDisplay&&an(h),d.barMeasure=wn(h),f.maxLineChanged&&!h.options.lineWrapping&&(d.adjustWidthTo=yt(h,f.maxLine,f.maxLine.text.length).left+3,h.display.sizerWidth=d.adjustWidthTo,d.barMeasure.scrollWidth=Math.max(f.scroller.clientWidth,f.sizer.offsetLeft+d.adjustWidthTo+pt(h)+h.display.barWidth),d.maxScrollLeft=Math.max(0,f.sizer.offsetLeft+d.adjustWidthTo-mt(h))),(d.updatedDisplay||d.selectionChanged)&&(d.preparedSelection=f.input.prepareSelection());var d,h,f;for(var p=0;p<t.length;p++)Ln(t[p]);for(var m=0;m<t.length;m++)En(t[m])}(e)})}function Ln(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&bn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==S();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&xn(t,e.barMeasure),e.updatedDisplay&&Un(t,e.barMeasure),e.selectionChanged&&en(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&tn(e.cm)}function En(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Fn(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&yn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&bn(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!ao){var o=k("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-dt(e.display))+"px;\n                         height: "+(t.bottom-t.top+pt(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?I(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?I(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Rt(e,t),l=n&&n!=t?Rt(e,n):s,u=dn(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(vn(e,u.scrollTop),1<Math.abs(e.doc.scrollTop-c)&&(a=!0)),null!=u.scrollLeft&&(bn(e,u.scrollLeft),1<Math.abs(e.doc.scrollLeft-d)&&(a=!0)),!a)break}return i}(t,B(r,e.scrollToPos.from),B(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ge(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ge(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _n(e,t){if(e.curOp)return t();Sn(e);try{return t()}finally{Cn(e)}}function Nn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Sn(e);try{return t.apply(e,arguments)}finally{Cn(e)}}}function An(e){return function(){if(this.curOp)return e.apply(this,arguments);Sn(this);try{return e.apply(this,arguments)}finally{Cn(this)}}}function Mn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Sn(e);try{return t.apply(this,arguments)}finally{Cn(e)}}}function On(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ro&&oe(e.doc,t)<i.viewTo&&Pn(e);else if(n<=i.viewFrom)Ro&&ae(e.doc,n+r)>i.viewFrom?Pn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Pn(e);else if(t<=i.viewFrom){var o=Dn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Pn(e)}else if(n>=i.viewTo){var a=Dn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Pn(e)}else{var s=Dn(e,t,t,-1),l=Dn(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Ze(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Pn(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function Rn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Gt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==w(a,n)&&a.push(n)}}}function Pn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Dn(e,t,n,r){var i,o=Gt(e,t),a=e.display.view;if(!Ro||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(0<r){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;oe(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function zn(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function In(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,v(Wn,e))}function Wn(l){var u=l.doc;if(!(u.highlightFrontier>=l.display.viewTo)){var c=+new Date+l.options.workTime,d=ze(l,u.highlightFrontier),h=[];u.iter(d.line,Math.min(u.first+u.size,l.display.viewTo+500),function(e){if(d.line>=l.display.viewFrom){var t=e.styles,n=e.text.length>l.options.maxHighlightLength?Me(u.mode,d.state):null,r=Pe(l,e,d,!0);n&&(d.state=n),e.styles=r.styles;var i=e.styleClasses,o=r.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),s=0;!a&&s<t.length;++s)a=t[s]!=e.styles[s];a&&h.push(d.line),e.stateAfter=d.save(),d.nextLine()}else e.text.length<=l.options.maxHighlightLength&&Ie(l,e.text,d),e.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>c)return In(l,l.options.workDelay),!0}),u.highlightFrontier=d.line,u.modeFrontier=Math.max(u.modeFrontier,d.line),h.length&&_n(l,function(){for(var e=0;e<h.length;e++)Rn(l,h[e],"text")})}}function Hn(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Pn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==zn(e))return!1;cn(e)&&(Pn(e),t.dims=Ut(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ro&&(o=oe(e.doc,o),a=ae(e.doc,a));var s,l,u,c,d=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;l=o,u=a,0==(c=(s=e).display).view.length||l>=c.viewTo||u<=c.viewFrom?(c.view=Ze(s,l,u),c.viewFrom=l):(c.viewFrom>l?c.view=Ze(s,l,c.viewFrom).concat(c.view):c.viewFrom<l&&(c.view=c.view.slice(Gt(s,l))),c.viewFrom=l,c.viewTo<u?c.view=c.view.concat(Ze(s,c.viewTo,u)):c.viewTo>u&&(c.view=c.view.slice(0,Gt(s,u)))),c.viewTo=u,n.viewOffset=ue(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var h=zn(e);if(!d&&0==h&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var f=function(e){if(e.hasFocus())return null;var t=S();if(!t||!g(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&g(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4<h&&(n.lineDiv.style.display="none"),function(n,e,t){function r(e){var t=e.nextSibling;return eo&&co&&n.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var i=n.display,o=n.options.lineNumbers,a=i.lineDiv,s=a.firstChild,l=i.view,u=i.viewFrom,c=0;c<l.length;c++){var d=l[c];if(d.hidden);else if(d.node&&d.node.parentNode==a){for(;s!=d.node;)s=r(s);var h=o&&null!=e&&e<=u&&d.lineNumber;d.changes&&(-1<w(d.changes,"gutter")&&(h=!1),et(n,d,u,t)),h&&(b(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(z(n.options,u)))),s=d.node.nextSibling}else{var f=(g=u,v=t,void 0,y=nt(p=n,m=d),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),rt(p,m),it(p,m,g,v),at(p,m,v),m.node);a.insertBefore(f,s)}u+=d.size}var p,m,g,v,y;for(;s;)s=r(s)}(e,n.updateLineNumbers,t.dims),4<h&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=S()&&(e.activeElt.focus(),e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(f),b(n.cursorDiv),b(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,d&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,In(e,400)),!(n.updateLineNumbers=null)}function Fn(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=mt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+ht(e.display)-gt(e),n.top)}),t.visible=ln(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Hn(e,t);r=!1){an(e);var i=wn(e);Kt(e),xn(e,i),Un(e,i),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 jn(e,t){var n=new sa(e,t);if(Hn(e,n)){an(e),Fn(e,n);var r=wn(e);Kt(e),xn(e,r),Un(e,r),n.finish()}}function Bn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Un(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+pt(e)+"px"}function qn(e){var t=e.display.gutters,n=e.options.gutters;b(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(k("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&((e.display.lineGutter=o).style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",Bn(e)}function Vn(e){var t=w(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1<t&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Yn(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function $n(e){var t=Yn(e);return t.x*=ua,t.y*=ua,t}function Gn(e,t){var n=Yn(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&co&&eo)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var d=0;d<c.length;d++)if(c[d].node==u){e.display.currentWheelTarget=u;break e}if(r&&!Gi&&!ro&&null!=ua)return i&&l&&vn(e,Math.max(0,a.scrollTop+i*ua)),bn(e,Math.max(0,a.scrollLeft+r*ua)),(!i||i&&l)&&we(t),void(o.wheelStartX=null);if(i&&null!=ua){var h=i*ua,f=e.doc.scrollTop,p=f+o.wrapper.clientHeight;h<0?f=Math.max(0,f+h-50):p=Math.min(e.doc.height,p+h+50),jn(e,{top:f,bottom:p})}la<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(ua=(ua*la+n)/(la+1),++la)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function Kn(e,t){var n=e[t];e.sort(function(e,t){return W(e.from(),t.from())}),t=w(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(0<=W(o.to(),i.from())){var a=j(o.from(),i.from()),s=F(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new da(l?s:a,l?a:s))}}return new ca(e,t)}function Xn(e,t){return new ca([new da(e,t||e)],0)}function Zn(e){return e.text?I(e.from.line+e.text.length-1,V(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Qn(e,t){if(W(e,t.from)<0)return e;if(W(e,t.to)<=0)return Zn(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Zn(t).ch-t.to.ch),I(n,r)}function Jn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new da(Qn(i.anchor,t),Qn(i.head,t)))}return Kn(n,e.sel.primIndex)}function er(e,t,n){return e.line==t.line?I(n.line,e.ch-t.ch+n.ch):I(n.line+(e.line-t.line),e.ch)}function tr(e){e.doc.mode=Ne(e.options,e.doc.modeOption),nr(e)}function nr(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,In(e,100),e.state.modeGen++,e.curOp&&On(e)}function rr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==V(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ir(e,r,t,i){function o(e){return t?t[e]:null}function n(e,t,n){(function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),X(e),Z(e,n);var i=r?r(e):1;i!=e.height&&R(e,i)})(e,t,n,i),Qe(e,"change",e,r)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new Xo(u[r],o(r),i));return n}var s=r.from,l=r.to,u=r.text,c=M(e,s.line),d=M(e,l.line),h=V(u),f=o(u.length-1),p=l.line-s.line;if(r.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(rr(e,r)){var m=a(0,u.length-1);n(d,d.text,f),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(c==d)if(1==u.length)n(c,c.text.slice(0,s.ch)+h+c.text.slice(l.ch),f);else{var g=a(1,u.length-1);g.push(new Xo(h+c.text.slice(l.ch),f,i)),n(c,c.text.slice(0,s.ch)+u[0],o(0)),e.insert(s.line+1,g)}else if(1==u.length)n(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),o(0)),e.remove(s.line+1,p);else{n(c,c.text.slice(0,s.ch)+u[0],o(0)),n(d,h+d.text.slice(l.ch),f);var v=a(1,u.length-1);1<p&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}Qe(e,"change",e,r)}function or(e,s,l){!function e(t,n,r){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=n){var a=r&&o.sharedHist;l&&!a||(s(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function ar(e,t){if(t.cm)throw new Error("This document is already in use.");Yt((e.doc=t).cm=e),tr(e),sr(e),e.options.lineWrapping||de(e),e.options.mode=t.modeOption,On(e)}function sr(e){("rtl"==e.doc.direction?r:yo)(e.display.lineDiv,"CodeMirror-rtl")}function lr(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ur(e,t){var n={from:p(t.from),to:Zn(t),text:O(e,t.from,t.to)};return pr(e,n,t.from.line,t.to.line+1),or(e,function(e){return pr(e,n,t.from.line,t.to.line+1)},!0),n}function cr(e){for(;e.length&&V(e).ranges;)e.pop()}function dr(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==r?(cr(s.done),V(s.done)):s.done.length&&!V(s.done).ranges?V(s.done):1<s.done.length&&!s.done[s.done.length-2].ranges?(s.done.pop(),V(s.done)):void 0))a=V(o.changes),0==W(t.from,t.to)&&0==W(t.from,a.to)?a.to=Zn(t):o.changes.push(ur(e,t));else{var u=V(i.done);for(u&&u.ranges||fr(e.sel,i.done),o={changes:[ur(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function hr(e,t,n,r){var i,o,a,s,l,u=e.history,c=r&&r.origin;n==u.lastSelOp||c&&u.lastSelOrigin==c&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==c||(i=e,o=c,a=V(u.done),s=t,"*"==(l=o.charAt(0))||"+"==l&&a.ranges.length==s.ranges.length&&a.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?u.done[u.done.length-1]=t:fr(t,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=c,u.lastSelOp=n,r&&!1!==r.clearRedo&&cr(u.undone)}function fr(e,t){var n=V(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pr(t,n,e,r){var i=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,r),function(e){e.markedSpans&&((i||(i=n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function mr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function gr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(mr(n[i]));return r}(e,t),r=G(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function vr(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ca.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var u=a[l],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&-1<w(t,Number(c[1]))&&(V(s)[d]=u[d],delete u[d])}}}return r}function yr(e,t,n,r){if(r){var i=e.anchor;if(n){var o=W(t,i)<0;o!=W(n,i)<0?(i=t,t=n):o!=W(t,n)<0&&(t=n)}return new da(i,t)}return new da(n||t,t)}function br(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Sr(e,new ca([yr(e.sel.primary(),t,n,i)],0),r)}function wr(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=yr(e.sel.ranges[o],t[o],null,i);Sr(e,Kn(r,e.sel.primIndex),n)}function xr(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Sr(e,Kn(i,e.sel.primIndex),r)}function kr(e,t,n,r){Sr(e,Xn(t,n),r)}function Tr(e,t,n){var r=e.history.done,i=V(r);i&&i.ranges?Cr(e,r[r.length-1]=t,n):Sr(e,t,n)}function Sr(e,t,n){Cr(e,t,n),hr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Cr(e,t,n){var r,i,o,a;(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(r=e,o=n,a={ranges:(i=t).ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new da(B(r,e[t].anchor),B(r,e[t].head))},origin:o&&o.origin},ge(r,"beforeSelectionChange",r,a),r.cm&&ge(r.cm,"beforeSelectionChange",r.cm,a),t=a.ranges!=i.ranges?Kn(a.ranges,a.ranges.length-1):i),Lr(e,_r(e,t,n&&n.bias||(W(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||fn(e.cm)}function Lr(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ye(e.cm)),Qe(e,"cursorActivity",e))}function Er(e){Lr(e,_r(e,e.sel,null,!1))}function _r(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Ar(e,a.anchor,s&&s.anchor,n,r),u=Ar(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new da(l,u))}return i?Kn(i,t.primIndex):t}function Nr(e,t,n,r,i){var o=M(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(ge(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u=l.find(r<0?1:-1),c=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Mr(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=W(u,n))&&(r<0?c<0:0<c))return Nr(e,u,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Mr(e,d,r,d.line==t.line?o:null)),d?Nr(e,d,t,r,i):null}}return t}function Ar(e,t,n,r,i){var o=r||1;return Nr(e,t,n,o,i)||!i&&Nr(e,t,n,o,!0)||Nr(e,t,n,-o,i)||!i&&Nr(e,t,n,-o,!0)||(e.cantEdit=!0,I(e.first,0))}function Mr(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?B(e,I(t.line-1)):null:0<n&&t.ch==(r||M(e,t.line)).text.length?t.line<e.first+e.size-1?I(t.line+1,0):null:new I(t.line,t.ch+n)}function Or(e){e.setSelection(I(e.firstLine(),0),I(e.lastLine()),Lo)}function Rr(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,n,r){e&&(o.from=B(i,e)),t&&(o.to=B(i,t)),n&&(o.text=n),void 0!==r&&(o.origin=r)}),ge(i,"beforeChange",i,o),i.cm&&ge(i.cm,"beforeChange",i.cm,o),o.canceled?null:{from:o.from,to:o.to,text:o.text,origin:o.origin}}function Pr(e,t,n){if(e.cm){if(!e.cm.curOp)return Nn(e.cm,Pr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=Rr(e,t,!0))){var r=Oo&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=w(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var u=i[l];if(!(W(u.to,s.from)<0||0<W(u.from,s.to))){var c=[l,1],d=W(u.from,s.from),h=W(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(0<h||!a.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;0<=i;--i)Dr(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Dr(e,t)}}function Dr(e,n){if(1!=n.text.length||""!=n.text[0]||0!=W(n.from,n.to)){var t=Jn(e,n);dr(e,n,t,e.cm?e.cm.curOp.id:NaN),Wr(e,n,t,G(e,n));var r=[];or(e,function(e,t){t||-1!=w(r,e.history)||(Br(e.history,n),r.push(e.history)),Wr(e,n,null,G(e,n))})}}function zr(i,o,e){if(!i.cm||!i.cm.state.suppressEdits||e){for(var a,t=i.history,n=i.sel,s="undo"==o?t.done:t.undone,r="undo"==o?t.undone:t.done,l=0;l<s.length&&(a=s[l],e?!a.ranges||a.equals(i.sel):a.ranges);l++);if(l!=s.length){for(t.lastOrigin=t.lastSelOrigin=null;(a=s.pop()).ranges;){if(fr(a,r),e&&!a.equals(i.sel))return void Sr(i,a,{clearRedo:!1});n=a}var u=[];fr(n,r),r.push({changes:u,generation:t.generation}),t.generation=a.generation||++t.maxGeneration;for(var c=be(i,"beforeChange")||i.cm&&be(i.cm,"beforeChange"),d=a.changes.length-1;0<=d;--d){var h=function(e){var n=a.changes[e];if(n.origin=o,c&&!Rr(i,n,!1))return s.length=0,{};u.push(ur(i,n));var t=e?Jn(i,n):V(s);Wr(i,n,t,gr(i,n)),!e&&i.cm&&i.cm.scrollIntoView({from:n.from,to:Zn(n)});var r=[];or(i,function(e,t){t||-1!=w(r,e.history)||(Br(e.history,n),r.push(e.history)),Wr(e,n,null,gr(e,n))})}(d);if(h)return h.v}}}}function Ir(e,t){if(0!=t&&(e.first+=t,e.sel=new ca(y(e.sel.ranges,function(e){return new da(I(e.anchor.line+t,e.anchor.ch),I(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){On(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Rn(e.cm,r,"gutter")}}function Wr(e,t,n,r){if(e.cm&&!e.cm.curOp)return Nn(e.cm,Wr)(e,t,n,r);if(t.to.line<e.first)Ir(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 i=t.text.length-1-(e.first-t.from.line);Ir(e,i),t={from:I(e.first,0),to:I(t.to.line+i,t.to.ch),text:[V(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:I(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=O(e,t.from,t.to),n||(n=Jn(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=P(ie(M(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0})),-1<r.sel.contains(t.from,t.to)&&ye(e),ir(r,t,n,Vt(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=ce(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;n<r;r--){var i=M(e,r).stateAfter;if(i&&(!(i instanceof $o)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),In(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?On(e):o.line!=a.line||1!=t.text.length||rr(e.doc,t)?On(e,o.line,a.line+1,u):Rn(e,o.line,"text");var c=be(e,"changes"),d=be(e,"change");if(d||c){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Qe(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,r):ir(e,t,r),Cr(e,n,Lo)}}function Hr(e,t,n,r,i){var o;(r||(r=n),W(r,n)<0)&&(n=(o=[r,n])[0],r=o[1]);"string"==typeof t&&(t=e.splitLines(t)),Pr(e,{from:n,to:r,text:t,origin:i})}function Fr(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function jr(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)Fr(o.ranges[s].anchor,t,n,r),Fr(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var u=o.changes[l];if(n<u.from.line)u.from=I(u.from.line+r,u.from.ch),u.to=I(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Br(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;jr(e.done,n,r,i),jr(e.undone,n,r,i)}function Ur(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=M(e,m(e,t)):i=P(t),null==i?null:(r(o,i)&&e.cm&&Rn(e.cm,i,n),o)}function qr(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Vr(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}function Yr(e,t,n){ue(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&hn(e,n)}function $r(t,r,i,e,n){if(e&&e.shared)return function(e,n,r,i,o){(i=h(i)).shared=!1;var a=[$r(e,n,r,i,o)],s=a[0],l=i.widgetNode;return or(e,function(e){l&&(i.widgetNode=l.cloneNode(!0)),a.push($r(e,B(e,n),B(e,r),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;s=V(a)}),new ma(a,s)}(t,r,i,e,n);if(t.cm&&!t.cm.curOp)return Nn(t.cm,$r)(t,r,i,e,n);var o=new pa(t,n),a=W(r,i);if(e&&h(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=d("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(re(t,r.line,r,i,o)||r.line!=i.line&&re(t,i.line,r,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&dr(t,{from:r,to:i,origin:"markText"},t.sel,NaN);var s,l=r.line,u=t.cm;if(t.iter(l,i.line+1,function(e){var t,n;u&&o.collapsed&&!u.options.lineWrapping&&ie(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=r.line&&R(e,0),t=e,n=new q(o,l==r.line?r.ch:null,l==i.line?i.ch:null),t.markedSpans=t.markedSpans?t.markedSpans.concat([n]):[n],n.marker.attachLine(t),++l}),o.collapsed&&t.iter(r.line,i.line+1,function(e){se(t,e)&&R(e,0)}),o.clearOnEnter&&Io(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Oo=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++fa,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)On(u,r.line,i.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=r.line;c<=i.line;c++)Rn(u,c,"text");o.atomic&&Er(u.doc),Qe(u,"markerAdded",u,o)}return o}function Gr(e){return e.findMarks(I(e.first,0),e.clipPos(I(e.lastLine())),function(e){return e.parent})}function Kr(o){for(var a=0;a<o.length;a++)!function(e){var t=o[a],n=[t.primary.doc];or(t.primary.doc,function(e){return n.push(e)});for(var r=0;r<t.markers.length;r++){var i=t.markers[r];-1==w(n,i.doc)&&(i.parent=null,t.markers.splice(r--,1))}}()}function Xr(e){var i=this;if(Zr(i),!ve(i,e)&&!ct(i.display,e)){we(e),Qi&&(ya=+new Date);var o=$t(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var a=t.length,s=Array(a),l=0,n=0;n<a;++n)!function(e,n){if(!i.options.allowDropFileTypes||-1!=w(i.options.allowDropFileTypes,e.type)){var r=new FileReader;r.onload=Nn(i,function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),s[n]=e,++l==a){var t={from:o=B(i.doc,o),to:o,text:i.doc.splitLines(s.join(i.doc.lineSeparator())),origin:"paste"};Pr(i.doc,t),Tr(i.doc,Xn(o,Zn(t)))}}),r.readAsText(e)}}(t[n],n);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var r=e.dataTransfer.getData("Text");if(r){var u;if(i.state.draggingText&&!i.state.draggingText.copy&&(u=i.listSelections()),Cr(i.doc,Xn(o,o)),u)for(var c=0;c<u.length;++c)Hr(i.doc,"",u[c].anchor,u[c].head,"drag");i.replaceSelection(r,"around","paste"),i.display.input.focus()}}catch(e){}}}}function Zr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Qr(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Jr(){var e;ba||(Io(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Qr(ei)},100))}),Io(window,"blur",function(){return Qr(on)}),ba=!0)}function ei(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function ti(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var s=t[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function ni(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=y(n.split(" "),ti),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function ri(e,t,n,r){var i=(t=si(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ri(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=ri(e,t.fallthrough[o],n,r);if(a)return a}}}function ii(e){var t="string"==typeof e?e:wa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function oi(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(go?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(go?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function ai(e,t){if(ro&&34==e.keyCode&&e.char)return!1;var n=wa[e.keyCode];return null!=n&&!e.altGraphKey&&oi(n,e,t)}function si(e){return"string"==typeof e?Sa[e]:e}function li(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&W(o.from,V(r).to)<=0;){var a=r.pop();if(W(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}_n(t,function(){for(var e=r.length-1;0<=e;e--)Hr(t.doc,"",r[e].from,r[e].to,"+delete");fn(t)})}function ui(e,t,n){var r=N(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ci(e,t,n){var r=ui(e,t.ch,n);return null==r?null:new I(t.line,r,n<0?"after":"before")}function di(e,t,n,r,i){if(e){var o=fe(n,t.doc.direction);if(o){var a,s=i<0?V(o):o[0],l=i<0==(1==s.level)?"after":"before";if(0<s.level||"rtl"==t.doc.direction){var u=wt(t,n);a=i<0?n.text.length-1:0;var c=xt(t,u,a).top;a=A(function(e){return xt(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ui(n,a,1))}else a=i<0?s.to:s.from;return new I(r,a,l)}}return new I(r,i<0?n.text.length:0,i<0?"before":"after")}function hi(e,t){var n=M(e.doc,t),r=ie(n);return r!=n&&(t=P(r)),di(!0,e,r,t,1)}function fi(e,t){var n=M(e.doc,t),r=function(e){for(var t;t=ne(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=P(r)),di(!0,e,n,t,-1)}function pi(e,t){var n=hi(e,t.line),r=M(e.doc,n.line),i=fe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return I(n.line,a?0:o,n.sticky)}return n}function mi(e,t,n){if("string"==typeof t&&!(t=Ca[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Co}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function gi(e,t,n,r){var i=e.state.keySeq;if(i){if(ii(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:La.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),vi(e,i+" "+t,n,r))return!0}return vi(e,t,n,r)}function vi(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=ri(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&ri(t,e.options.extraKeys,n,e)||ri(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Qe(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(we(n),en(e)),!!i}function yi(t,e){var n=ai(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?gi(t,"Shift-"+n,e,function(e){return mi(t,e,!0)})||gi(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return mi(t,e)}):gi(t,n,e,function(e){return mi(t,e)}))}function bi(e){if(this.curOp.focus=S(),!ve(this,e)){Qi&&Ji<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var n=yi(this,e);ro&&(Ea=n?t:null,!n&&88==t&&!jo&&(co?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(yo(n,"CodeMirror-crosshair"),me(document,"keyup",t),me(document,"mouseover",t))}var n=e.display.lineDiv;r(n,"CodeMirror-crosshair"),Io(document,"keyup",t),Io(document,"mouseover",t)}(this)}}function wi(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function xi(e){var t;if(!(ct(this.display,e)||ve(this,e)||e.ctrlKey&&!e.altKey||co&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ro&&n==Ea)return Ea=null,void we(e);if(!ro||e.which&&!(e.which<10)||!yi(this,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(gi(t=this,"'"+i+"'",e,function(e){return mi(t,e,!0)})||this.display.input.onKeyPress(e))}}}function ki(e){var n,t,r,i,o,a,s,l,u,c=this,d=c.display;if(!(ve(c,e)||d.activeTouch&&d.input.supportsTouch()))if(d.input.ensurePolled(),d.shift=e.shiftKey,ct(d,e))eo||(d.scroller.draggable=!1,setTimeout(function(){return d.scroller.draggable=!0},100));else if(!Ci(c,e)){var h=$t(c,e),f=Ce(e),p=h?(s=h,l=f,u=+new Date,Aa&&Aa.compare(u,s,l)?(Na=Aa=null,"triple"):Na&&Na.compare(u,s,l)?(Aa=new _a(u,s,l),Na=null,"double"):(Na=new _a(u,s,l),Aa=null,"single")):"single";window.focus(),1==f&&c.state.selectingText&&c.state.selectingText(e),h&&(r=h,a="Click","double"==(i=p)?a="Double"+a:"triple"==i&&(a="Triple"+a),gi(n=c,oi(a=(1==(t=f)?"Left":2==t?"Middle":"Right")+a,o=e),o,function(e){if("string"==typeof e&&(e=Ca[e]),!e)return!1;var t=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),t=e(n,r)!=Co}finally{n.state.suppressEdits=!1}return t}))||(1==f?h?function(e,t,n,r){Qi?setTimeout(v(tn,e),0):e.curOp.focus=S();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=ho?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=co?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(co?n.altKey:n.ctrlKey)),i}(e,n,r),a=e.doc.sel;e.options.dragDrop&&Wo&&!e.isReadOnly()&&"single"==n&&-1<(i=a.contains(t))&&(W((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<W(i.to(),t)||t.xRel<0)?(s=e,l=r,u=t,c=o,d=s.display,h=!1,f=Nn(s,function(e){eo&&(d.scroller.draggable=!1),s.state.draggingText=!1,me(document,"mouseup",f),me(document,"mousemove",p),me(d.scroller,"dragstart",m),me(d.scroller,"drop",f),h||(we(e),c.addNew||br(s.doc,u,null,null,c.extend),eo||Qi&&9==Ji?setTimeout(function(){document.body.focus(),d.input.focus()},20):d.input.focus())}),p=function(e){h=h||10<=Math.abs(l.clientX-e.clientX)+Math.abs(l.clientY-e.clientY)},m=function(){return h=!0},eo&&(d.scroller.draggable=!0),(s.state.draggingText=f).copy=!c.moveOnDrag,d.scroller.dragDrop&&d.scroller.dragDrop(),Io(document,"mouseup",f),Io(document,"mousemove",p),Io(d.scroller,"dragstart",m),Io(d.scroller,"drop",f),nn(s),setTimeout(function(){return d.input.focus()},20)):function(g,e,v,y){function a(e){if(0!=W(T,e))if(T=e,"rectangle"==y.unit){for(var t=[],n=g.options.tabSize,r=C(M(b,v.line).text,v.ch,n),i=C(M(b,e.line).text,e.ch,n),o=Math.min(r,i),a=Math.max(r,i),s=Math.min(v.line,e.line),l=Math.min(g.lastLine(),Math.max(v.line,e.line));s<=l;s++){var u=M(b,s).text,c=L(u,o,n);o==a?t.push(new da(I(s,c),I(s,c))):u.length>c&&t.push(new da(I(s,c),I(s,L(u,a,n))))}t.length||t.push(new da(v,v)),Sr(b,Kn(k.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var d,h=w,f=Ti(g,e,y.unit),p=h.anchor;0<W(f.anchor,p)?(d=f.head,p=j(h.from(),f.anchor)):(d=f.anchor,p=F(h.to(),f.head));var m=k.ranges.slice(0);m[x]=function(e,t){var n=t.anchor,r=t.head,i=M(e.doc,n.line);if(0==W(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var a=he(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=0<(r.line-n.line)*("ltr"==e.doc.direction?1:-1);else{var c=he(o,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:0<d}var h=o[u+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new da(new I(n.line,p,m),r)}(g,new da(B(b,p),d)),Sr(b,Kn(m,x),Eo)}}function t(e){g.state.selectingText=!1,u=1/0,we(e),s.input.focus(),me(document,"mousemove",i),me(document,"mouseup",o),b.history.lastSelOrigin=null}var s=g.display,b=g.doc;we(e);var w,x,k=b.sel,n=k.ranges;if(y.addNew&&!y.extend?(x=b.sel.contains(v),w=-1<x?n[x]:new da(v,v)):(w=b.sel.primary(),x=b.sel.primIndex),"rectangle"==y.unit)y.addNew||(w=new da(v,v)),v=$t(g,e,!0,!0),x=-1;else{var r=Ti(g,v,y.unit);w=y.extend?yr(w,r.anchor,r.head,y.extend):r}y.addNew?-1==x?(x=n.length,Sr(b,Kn(n.concat([w]),x),{scroll:!1,origin:"*mouse"})):1<n.length&&n[x].empty()&&"char"==y.unit&&!y.extend?(Sr(b,Kn(n.slice(0,x).concat(n.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):xr(b,x,w,Eo):(Sr(b,new ca([w],x=0),Eo),k=b.sel);var T=v,l=s.wrapper.getBoundingClientRect(),u=0,i=Nn(g,function(e){Ce(e)?function e(t){var n=++u,r=$t(g,t,!0,"rectangle"==y.unit);if(r)if(0!=W(r,T)){g.curOp.focus=S(),a(r);var i=ln(s,b);(r.line>=i.to||r.line<i.from)&&setTimeout(Nn(g,function(){u==n&&e(t)}),150)}else{var o=t.clientY<l.top?-20:t.clientY>l.bottom?20:0;o&&setTimeout(Nn(g,function(){u==n&&(s.scroller.scrollTop+=o,e(t))}),50)}}(e):t(e)}),o=Nn(g,t);g.state.selectingText=o,Io(document,"mousemove",i),Io(document,"mouseup",o)}(e,r,t,o);var s,l,u,c,d,h,f,p,m}(c,h,p,e):Se(e)==d.scroller&&we(e):2==f?(h&&br(c.doc,h),setTimeout(function(){return d.input.focus()},20)):3==f&&(vo?Li(c,e):nn(c)))}}function Ti(e,t,n){if("char"==n)return new da(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new da(I(t.line,0),B(e.doc,I(t.line+1,0)));var r=n(e,t);return new da(r.from,r.to)}function Si(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!be(e,n))return ke(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i)return ge(e,n,e,f(e.doc,o),e.options.gutters[l],t),ke(t)}}function Ci(e,t){return Si(e,t,"gutterClick",!0)}function Li(e,t){var n,r;ct(e.display,t)||(r=t,be(n=e,"gutterContextMenu")&&Si(n,r,"gutterContextMenu",!1))||ve(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Ei(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Lt(e)}function _i(e){qn(e),On(e),un(e)}function Ni(e,t,n){if(!t!=!(n&&n!=Ma)){var r=e.display.dragFunctions,i=t?Io:me;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ai(e){e.options.lineWrapping?(r(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(yo(e.display.wrapper,"CodeMirror-wrap"),de(e)),Yt(e),On(e),Lt(e),setTimeout(function(){return xn(e)},100)}function Mi(e,t){var n=this;if(!(this instanceof Mi))return new Mi(e,t);this.options=t=t?h(t):{},h(Oa,t,!1),Vn(t);var r=t.value;"string"==typeof r&&(r=new va(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new Mi.inputStyles[t.inputStyle](this),o=this.display=new u(e,r,i);for(var a in qn(o.wrapper.CodeMirror=this),Ei(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tn(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 wo,keySeq:null,specialChars:null},t.autofocus&&!uo&&o.input.focus(),Qi&&Ji<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(i){function o(){s.activeTouch&&(n=setTimeout(function(){return s.activeTouch=null},1e3),(r=s.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400<n*n+r*r}var s=i.display;Io(s.scroller,"mousedown",Nn(i,ki)),Io(s.scroller,"dblclick",Qi&&Ji<11?Nn(i,function(e){if(!ve(i,e)){var t=$t(i,e);if(t&&!Ci(i,e)&&!ct(i.display,e)){we(e);var n=i.findWordAt(t);br(i.doc,n.anchor,n.head)}}}):function(e){return ve(i,e)||we(e)}),vo||Io(s.scroller,"contextmenu",function(e){return Li(i,e)});var n,r={end:0};Io(s.scroller,"touchstart",function(e){if(!ve(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!Ci(i,e)){s.input.ensurePolled(),clearTimeout(n);var t=+new Date;s.activeTouch={start:t,moved:!1,prev:t-r.end<=300?r:null},1==e.touches.length&&(s.activeTouch.left=e.touches[0].pageX,s.activeTouch.top=e.touches[0].pageY)}}),Io(s.scroller,"touchmove",function(){s.activeTouch&&(s.activeTouch.moved=!0)}),Io(s.scroller,"touchend",function(e){var t=s.activeTouch;if(t&&!ct(s,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var n,r=i.coordsChar(s.activeTouch,"page");n=!t.prev||a(t,t.prev)?new da(r,r):!t.prev.prev||a(t,t.prev.prev)?i.findWordAt(r):new da(I(r.line,0),B(i.doc,I(r.line+1,0))),i.setSelection(n.anchor,n.head),i.focus(),we(e)}o()}),Io(s.scroller,"touchcancel",o),Io(s.scroller,"scroll",function(){s.scroller.clientHeight&&(vn(i,s.scroller.scrollTop),bn(i,s.scroller.scrollLeft,!0),ge(i,"scroll",i))}),Io(s.scroller,"mousewheel",function(e){return Gn(i,e)}),Io(s.scroller,"DOMMouseScroll",function(e){return Gn(i,e)}),Io(s.wrapper,"scroll",function(){return s.wrapper.scrollTop=s.wrapper.scrollLeft=0}),s.dragFunctions={enter:function(e){ve(i,e)||Te(e)},over:function(e){ve(i,e)||(function(e,t){var n=$t(e,t);if(n){var r=document.createDocumentFragment();Zt(e,n,r),e.display.dragCursor||(e.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),x(e.display.dragCursor,r)}}(i,e),Te(e))},start:function(e){return function(e,t){if(Qi&&(!e.state.draggingText||+new Date-ya<100))Te(t);else if(!ve(e,t)&&!ct(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!io)){var n=k("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ro&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ro&&n.parentNode.removeChild(n)}}(i,e)},drop:Nn(i,Xr),leave:function(e){ve(i,e)||Zr(i)}};var e=s.input.getField();Io(e,"keyup",function(e){return wi.call(i,e)}),Io(e,"keydown",Nn(i,bi)),Io(e,"keypress",Nn(i,xi)),Io(e,"focus",function(e){return rn(i,e)}),Io(e,"blur",function(e){return on(i,e)})}(this),Jr(),Sn(this),this.curOp.forceUpdate=!0,ar(this,r),t.autofocus&&!uo||this.hasFocus()?setTimeout(v(rn,this),20):on(this),Ra)Ra.hasOwnProperty(a)&&Ra[a](n,t[a],Ma);cn(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Pa.length;++s)Pa[s](n);Cn(this),eo&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Oi(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=ze(e,t).state:n="prev");var a=e.options.tabSize,s=M(o,t),l=C(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Co||150<u)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?C(M(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)h+=a,d+="\t";if(h<u&&(d+=T(u-h)),d!=c)return Hr(o,d,I(t,0),I(t,c.length),"+input"),!(s.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<c.length){var g=I(t,c.length);xr(o,p,new da(g,g));break}}}function Ri(e){Da=e}function Pi(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=Ho(t),l=null;if(a&&1<r.ranges.length)if(Da&&Da.text.join("\n")==t){if(r.ranges.length%Da.text.length==0){l=[];for(var u=0;u<Da.text.length;u++)l.push(o.splitLines(Da.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=y(s,function(e){return[e]}));for(var c,d=r.ranges.length-1;0<=d;d--){var h=r.ranges[d],f=h.from(),p=h.to();h.empty()&&(n&&0<n?f=I(f.line,f.ch-n):e.state.overwrite&&!a?p=I(p.line,Math.min(M(o,p.line).text.length,p.ch+V(s).length)):Da&&Da.lineWise&&Da.text.join("\n")==t&&(f=p=I(f.line,0))),c=e.curOp.updateInput;var m={from:f,to:p,text:l?l[d%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Pr(e.doc,m),Qe(e,"inputRead",e,m)}t&&!a&&zi(e,t),fn(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Di(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||_n(t,function(){return Pi(t,n,0,null,"paste")}),!0}function zi(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;0<=r;r--){var i=n.ranges[r];if(!(100<i.head.ch||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(-1<t.indexOf(o.electricChars.charAt(s))){a=Oi(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Oi(e,i.head.line,"smart"));a&&Qe(e,"electricInput",e,i.head.line)}}}function Ii(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:I(i,0),head:I(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Wi(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Hi(){var e=k("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=k("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return eo?e.style.width="1000px":e.setAttribute("wrap","off"),so&&(e.style.border="1px solid black"),Wi(e),t}function Fi(r,i,o,e,a){function t(e){var t,n;if(null==(t=a?function(t,n,s,e){var l=fe(n,t.doc.direction);if(!l)return ci(n,s,e);s.ch>=n.text.length?(s.ch=n.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var r=he(l,s.ch,s.sticky),i=l[r];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>s.ch:i.from<s.ch))return ci(n,s,e);var o,u=function(e,t){return ui(n,e instanceof I?e.ch:e,t)},a=function(e){return t.options.lineWrapping?(o=o||wt(t,n),Wt(t,n,o,e)):{begin:0,end:n.text.length}},c=a("before"==s.sticky?u(s,-1):s.ch);if("rtl"==t.doc.direction||1==i.level){var d=1==i.level==e<0,h=u(s,d?1:-1);if(null!=h&&(d?h<=i.to&&h<=c.end:h>=i.from&&h>=c.begin)){var f=d?"before":"after";return new I(s.line,h,f)}}var p=function(e,t,n){for(var r=function(e,t){return t?new I(s.line,u(e,1),"before"):new I(s.line,e,"after")};0<=e&&e<l.length;e+=t){var i=l[e],o=0<t==(1!=i.level),a=o?n.begin:u(n.end,-1);if(i.from<=a&&a<i.to)return r(a,o);if(a=o?i.from:u(i.to,-1),n.begin<=a&&a<n.end)return r(a,o)}},m=p(r+e,e,c);if(m)return m;var g=0<e?c.end:u(c.begin,-1);return null==g||0<e&&g==n.text.length||!(m=p(0<e?0:l.length-1,e,a(g)))?null:m}(r.cm,l,i,o):ci(l,i,o))){if(e||((n=i.line+o)<r.first||n>=r.first+r.size||(i=new I(n,i.ch,i.sticky),!(l=M(r,n)))))return!1;i=di(a,r.cm,l,i.line,o)}else i=t;return!0}var n=i,s=o,l=M(r,i.line);if("char"==e)t();else if("column"==e)t(!0);else if("word"==e||"group"==e)for(var u=null,c="group"==e,d=r.cm&&r.cm.getHelper(i,"wordChars"),h=!0;!(o<0)||t(!h);h=!1){var f=l.text.charAt(i.ch)||"\n",p=E(f,d)?"w":c&&"\n"==f?"n":!c||/\s/.test(f)?null:"p";if(!c||h||p||(p="s"),u&&u!=p){o<0&&(o=1,t(),i.sticky="after");break}if(p&&(u=p),0<o&&!t(!h))break}var m=Ar(r,i,n,s,!0);return H(n,m)&&(m.hitSide=!0),m}function ji(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*jt(e.display),3);i=(0<n?t.bottom:t.top)+n*u}else"line"==r&&(i=0<n?t.bottom+3:t.top-3);for(;(o=zt(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}function Bi(e,t){var n=bt(e,t.line);if(!n||n.hidden)return null;var r=M(e.doc,t.line),i=vt(n,r,t.line),o=fe(r,e.doc.direction),a="left";o&&(a=he(o,t.ch)%2?"right":"left");var s=kt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ui(e,t){return t&&(e.bad=!0),e}function qi(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ui(e.clipPos(I(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Vi(o,t,n)}}function Vi(u,e,t){function n(e,t,n){for(var r=-1;r<(d?d.length:0);r++)for(var i=r<0?c.map:d[r],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var s=P(r<0?u.line:u.rest[r]),l=i[o]+n;return(n<0||a!=e)&&(l=i[o+(n?1:0)]),I(s,l)}}}var r=u.text.firstChild,i=!1;if(!e||!g(r,e))return Ui(I(P(u.line),0),!0);if(e==r&&(i=!0,e=r.childNodes[t],t=0,!e)){var o=u.rest?V(u.rest):u.line;return Ui(I(P(o),o.text.length),i)}var a=3==e.nodeType?e:null,s=e;for(a||1!=e.childNodes.length||3!=e.firstChild.nodeType||(a=e.firstChild,t&&(t=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var c=u.measure,d=c.maps,l=n(a,s,t);if(l)return Ui(l,i);for(var h=s.nextSibling,f=a?a.nodeValue.length-t:0;h;h=h.nextSibling){if(l=n(h,h.firstChild,0))return Ui(I(l.line,l.ch-f),i);f+=h.textContent.length}for(var p=s.previousSibling,m=t;p;p=p.previousSibling){if(l=n(p,p.firstChild,-1))return Ui(I(l.line,l.ch+m),i);m+=p.textContent.length}}var Yi=navigator.userAgent,$i=navigator.platform,Gi=/gecko\/\d/i.test(Yi),Ki=/MSIE \d/.test(Yi),Xi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yi),Zi=/Edge\/(\d+)/.exec(Yi),Qi=Ki||Xi||Zi,Ji=Qi&&(Ki?document.documentMode||6:+(Zi||Xi)[1]),eo=!Zi&&/WebKit\//.test(Yi),to=eo&&/Qt\/\d+\.\d+/.test(Yi),no=!Zi&&/Chrome\//.test(Yi),ro=/Opera\//.test(Yi),io=/Apple Computer/.test(navigator.vendor),oo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Yi),ao=/PhantomJS/.test(Yi),so=!Zi&&/AppleWebKit/.test(Yi)&&/Mobile\/\w+/.test(Yi),lo=/Android/.test(Yi),uo=so||lo||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Yi),co=so||/Mac/.test($i),ho=/\bCrOS\b/.test(Yi),fo=/win/i.test($i),po=ro&&Yi.match(/Version\/(\d*\.\d*)/);po&&(po=Number(po[1])),po&&15<=po&&(eo=!(ro=!1));var mo,go=co&&(to||ro&&(null==po||po<12.11)),vo=Gi||Qi&&9<=Ji,yo=function(e,t){var n=e.className,r=s(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};mo=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var bo=function(e){e.select()};so?bo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Qi&&(bo=function(e){try{e.select()}catch(e){}});var wo=function(){this.id=null};wo.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var xo,ko,To,So=30,Co={toString:function(){return"CodeMirror.Pass"}},Lo={scroll:!1},Eo={origin:"*mouse"},_o={origin:"+move"},No=[""],Ao=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Mo=/[\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]/,Oo=!1,Ro=!1,Po=null,Do=function(){function I(e,t,n){this.level=e,this.from=t,this.to=n}var W="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",H="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",F=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,j=/[stwN]/,B=/[LRr]/,U=/[Lb1n]/,q=/[1n]/;return function(e,t){var n,r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!F.test(e))return!1;for(var i=e.length,o=[],a=0;a<i;++a)o.push((n=e.charCodeAt(a))<=247?W.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?H.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L");for(var s=0,l=r;s<i;++s){var u=o[s];"m"==u?o[s]=l:l=u}for(var c=0,d=r;c<i;++c){var h=o[c];"1"==h&&"r"==d?o[c]="n":B.test(h)&&("r"==(d=h)&&(o[c]="R"))}for(var f=1,p=o[0];f<i-1;++f){var m=o[f];"+"==m&&"1"==p&&"1"==o[f+1]?o[f]="1":","!=m||p!=o[f+1]||"1"!=p&&"n"!=p||(o[f]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",w=g;w<y;++w)o[w]=b;g=y-1}}for(var x=0,k=r;x<i;++x){var T=o[x];"L"==k&&"1"==T?o[x]="L":B.test(T)&&(k=T)}for(var S=0;S<i;++S)if(j.test(o[S])){var C=void 0;for(C=S+1;C<i&&j.test(o[C]);++C);for(var L="L"==(S?o[S-1]:r),E=L==("L"==(C<i?o[C]:r))?L?"L":"R":r,_=S;_<C;++_)o[_]=E;S=C-1}for(var N,A=[],M=0;M<i;)if(U.test(o[M])){var O=M;for(++M;M<i&&U.test(o[M]);++M);A.push(new I(0,O,M))}else{var R=M,P=A.length;for(++M;M<i&&"L"!=o[M];++M);for(var D=R;D<M;)if(q.test(o[D])){R<D&&A.splice(P,0,new I(1,R,D));var z=D;for(++D;D<M&&q.test(o[D]);++D);A.splice(P,0,new I(2,z,D)),R=D}else++D;R<M&&A.splice(P,0,new I(1,R,M))}return"ltr"==t&&(1==A[0].level&&(N=e.match(/^\s+/))&&(A[0].from=N[0].length,A.unshift(new I(0,0,N[0].length))),1==V(A).level&&(N=e.match(/\s+$/))&&(V(A).to-=N[0].length,A.push(new I(0,i-N[0].length,i)))),"rtl"==t?A.reverse():A}}(),zo=[],Io=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||zo).concat(n)}},Wo=function(){if(Qi&&Ji<9)return!1;var e=k("div");return"draggable"in e||"dragDrop"in e}(),Ho=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Fo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},jo="oncopy"in(To=k("div"))||(To.setAttribute("oncopy","return;"),"function"==typeof To.oncopy),Bo=null,Uo={},qo={},Vo={},Yo=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Yo.prototype.eol=function(){return this.pos>=this.string.length},Yo.prototype.sol=function(){return this.pos==this.lineStart},Yo.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yo.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Yo.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},Yo.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Yo.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Yo.prototype.skipToEnd=function(){this.pos=this.string.length},Yo.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Yo.prototype.backUp=function(e){this.pos-=e},Yo.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=C(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?C(this.string,this.lineStart,this.tabSize):0)},Yo.prototype.indentation=function(){return C(this.string,null,this.tabSize)-(this.lineStart?C(this.string,this.lineStart,this.tabSize):0)},Yo.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&0<r.index?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Yo.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yo.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Yo.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Yo.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var $o=function(e,t){this.state=e,this.lookAhead=t},Go=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Go.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Go.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}},Go.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},Go.fromSaved=function(e,t,n){return t instanceof $o?new Go(e,Me(e.mode,t.state),n,t.lookAhead):new Go(e,Me(e.mode,t),n)},Go.prototype.save=function(e){var t=!1!==e?Me(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new $o(t,this.maxLookAhead):t};var Ko=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},Xo=function(e,t,n){this.text=e,Z(this,t),this.height=n?n(this):1};Xo.prototype.lineNo=function(){return P(this)},e(Xo);var Zo,Qo={},Jo={},ea=null,ta=null,na={left:0,right:0,top:0,bottom:0},ra=function(e,t,n){this.cm=n;var r=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Io(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Io(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Qi&&Ji<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ra.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ra.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ra.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ra.prototype.zeroWidthHack=function(){var e=co&&!oo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new wo,this.disableVert=new wo},ra.prototype.enableZeroWidthBar=function(n,r,i){n.style.pointerEvents="auto",r.set(1e3,function e(){var t=n.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=n?n.style.pointerEvents="none":r.set(1e3,e)})},ra.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ia=function(){};ia.prototype.update=function(){return{bottom:0,right:0}},ia.prototype.setScrollLeft=function(){},ia.prototype.setScrollTop=function(){},ia.prototype.clear=function(){};var oa={native:ra,null:ia},aa=0,sa=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ln(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=mt(e),this.force=n,this.dims=Ut(e),this.events=[]};sa.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},sa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var la=0,ua=null;Qi?ua=-.53:Gi?ua=15:no?ua=-.7:io&&(ua=-1/3);var ca=function(e,t){this.ranges=e,this.primIndex=t};ca.prototype.primary=function(){return this.ranges[this.primIndex]},ca.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 n=this.ranges[t],r=e.ranges[t];if(!H(n.anchor,r.anchor)||!H(n.head,r.head))return!1}return!0},ca.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new da(p(this.ranges[t].anchor),p(this.ranges[t].head));return new ca(e,this.primIndex)},ca.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ca.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(0<=W(t,r.from())&&W(e,r.to())<=0)return n}return-1};var da=function(e,t){this.anchor=e,this.head=t};da.prototype.from=function(){return j(this.anchor,this.head)},da.prototype.to=function(){return F(this.anchor,this.head)},da.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},qr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,(o=i).parent=null,X(o),Qe(i,"delete")}var o;this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Vr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof qr))){var s=[];this.collapse(s),this.children=[new qr(s)],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,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&50<i.lines.length){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new qr(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Vr(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=w(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Vr(e.children);(r.parent=e).children=[r,t],e=r}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ha=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ha.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=P(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=ut(this);R(n,Math.max(0,n.height-o)),e&&(_n(e,function(){Yr(e,n,-o),Rn(e,r,"widget")}),Qe(e,"lineWidgetCleared",e,this,r))}},ha.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=ut(this)-t;i&&(R(r,r.height+i),n&&_n(n,function(){n.curOp.forceUpdate=!0,Yr(n,r,i),Qe(n,"lineWidgetChanged",n,e,P(r))}))},e(ha);var fa=0,pa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++fa};pa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Sn(e),be(this,"clear")){var n=this.find();n&&Qe(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Y(a.markedSpans,this);e&&!this.collapsed?Rn(e,P(a),"text"):e&&(null!=s.to&&(i=P(a)),null!=s.from&&(r=P(a))),a.markedSpans=$(a.markedSpans,s),null==s.from&&this.collapsed&&!se(this.doc,a)&&e&&R(a,jt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=ie(this.lines[l]),c=ce(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&On(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Er(e.doc)),e&&Qe(e,"markerCleared",e,this,r,i),t&&Cn(e),this.parent&&this.parent.clear()}},pa.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Y(o.markedSpans,this);if(null!=a.from&&(n=I(t?o:P(o),a.from),-1==e))return n;if(null!=a.to&&(r=I(t?o:P(o),a.to),1==e))return r}return n&&{from:n,to:r}},pa.prototype.changed=function(){var o=this,a=this.find(-1,!0),s=this,l=this.doc.cm;a&&l&&_n(l,function(){var e=a.line,t=P(a.line),n=bt(l,t);if(n&&(St(n),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!se(s.doc,e)&&null!=s.height){var r=s.height;s.height=null;var i=ut(s)-r;i&&R(e,e.height+i)}Qe(l,"markerChanged",l,o)})},pa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=w(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},pa.prototype.detachLine=function(e){if(this.lines.splice(w(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},e(pa);var ma=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};ma.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qe(this,"clear")}},ma.prototype.find=function(e,t){return this.primary.find(e,t)},e(ma);var ga=0,va=function(e,t,n,r,i){if(!(this instanceof va))return new va(e,t,n,r,i);null==n&&(n=0),Vr.call(this,[new qr([new Xo("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=I(n,0);this.sel=Xn(o),this.history=new lr(null),this.id=++ga,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ir(this,{from:o,to:o,text:e}),Sr(this,Xn(o),Lo)};va.prototype=n(Vr.prototype,{constructor:va,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=c(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Mn(function(e){var t=I(this.first,0),n=this.first+this.size-1;Pr(this,{from:t,to:I(n,M(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&pn(this.cm,0,0),Sr(this,Xn(t),Lo)}),replaceRange:function(e,t,n,r){Hr(this,e,t=B(this,t),n=n?B(this,n):t,r)},getRange:function(e,t,n){var r=O(this,B(this,e),B(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(D(this,e))return M(this,e)},getLineNumber:function(e){return P(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),ie(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return B(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:Mn(function(e,t,n){kr(this,B(this,"number"==typeof e?I(e,t||0):e),null,n)}),setSelection:Mn(function(e,t,n){kr(this,B(this,e),B(this,t||e),n)}),extendSelection:Mn(function(e,t,n){br(this,B(this,e),t&&B(this,t),n)}),extendSelections:Mn(function(e,t){wr(this,U(this,e),t)}),extendSelectionsBy:Mn(function(e,t){wr(this,U(this,y(this.sel.ranges,e)),t)}),setSelections:Mn(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new da(B(this,e[i].anchor),B(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Sr(this,Kn(r,t),n)}}),addSelection:Mn(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new da(B(this,e),B(this,t||e))),Sr(this,Kn(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=O(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=O(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Mn(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=I(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=er(s.from,i,o),u=er(Zn(s),i,o);if(i=s.to,o=u,"around"==n){var c=e.sel.ranges[a],d=W(c.head,c.anchor)<0;r[a]=new da(d?u:l,d?l:u)}else r[a]=new da(l,l)}return new ca(r,e.sel.primIndex)}(this,r,t),l=r.length-1;0<=l;l--)Pr(this,r[l]);s?Tr(this,s):this.cm&&fn(this.cm)}),undo:Mn(function(){zr(this,"undo")}),redo:Mn(function(){zr(this,"redo")}),undoSelection:Mn(function(){zr(this,"undo",!0)}),redoSelection:Mn(function(){zr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new lr(this.history.maxGeneration)},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:vr(this.history.done),undone:vr(this.history.undone)}},setHistory:function(e){var t=this.history=new lr(this.history.maxGeneration);t.done=vr(e.done.slice(0),null,!0),t.undone=vr(e.undone.slice(0),null,!0)},setGutterMarker:Mn(function(e,n,r){return Ur(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[n]=r)&&a(t)&&(e.gutterMarkers=null),!0})}),clearGutter:Mn(function(t){var n=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&Ur(n,e,"gutter",function(){return e.gutterMarkers[t]=null,a(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!D(this,e))return null;if(!(e=M(this,t=e)))return null}else if(null==(t=P(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:Mn(function(e,n,r){return Ur(this,e,"gutter"==n?"gutter":"class",function(e){var t="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(e[t]){if(s(r).test(e[t]))return!1;e[t]+=" "+r}else e[t]=r;return!0})}),removeLineClass:Mn(function(e,o,a){return Ur(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",n=e[t];if(!n)return!1;if(null==a)e[t]=null;else{var r=n.match(s(a));if(!r)return!1;var i=r.index+r[0].length;e[t]=n.slice(0,r.index)+(r.index&&i!=n.length?" ":"")+n.slice(i)||null}return!0})}),addLineWidget:Mn(function(e,t,n){return i=e,o=new ha(r=this,t,n),(a=r.cm)&&o.noHScroll&&(a.display.alignWidgets=!0),Ur(r,i,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==o.insertAt?t.push(o):t.splice(Math.min(t.length-1,Math.max(0,o.insertAt)),0,o),o.line=e,a&&!se(r,e)){var n=ue(e)<r.scrollTop;R(e,e.height+ut(o)),n&&hn(a,o.height),a.curOp.forceUpdate=!0}return!0}),Qe(a,"lineWidgetAdded",a,o,"number"==typeof i?i:P(i)),o;var r,i,o,a}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return $r(this,B(this,e),B(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return $r(this,e=B(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=M(this,(e=B(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,a){i=B(this,i),o=B(this,o);var s=[],l=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;n++){var r=t[n];null!=r.to&&l==i.line&&i.ch>=r.to||null==r.from&&l!=i.line||null!=r.from&&l==o.line&&r.from>=o.ch||a&&!a(r.marker)||s.push(r.marker.parent||r.marker)}++l}),s},getAllMarks:function(){var r=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;++n)null!=t[n].from&&r.push(t[n].marker)}),r},posFromIndex:function(n){var r,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(n<t)return r=n,!0;n-=t,++i}),B(this,I(i,r))},indexFromPos:function(e){var t=(e=B(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new va(c(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,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new va(c(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(W(o,a)){var s=$r(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Gr(this)),r},unlinkDoc:function(e){if(e instanceof Mi&&(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),Kr(Gr(this));break}if(e.history==this.history){var n=[e.id];or(e,function(e){return n.push(e.id)},!0),e.history=new lr(null),e.history.done=vr(this.history.done,n),e.history.undone=vr(this.history.undone,n)}},iterLinkedDocs:function(e){or(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ho(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Mn(function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&_n(t=this.cm,function(){sr(t),On(t)}))})}),va.prototype.eachLine=va.prototype.iter;for(var ya=0,ba=!1,wa={3:"Enter",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:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},xa=0;xa<10;xa++)wa[xa+48]=wa[xa+96]=String(xa);for(var ka=65;ka<=90;ka++)wa[ka]=String.fromCharCode(ka);for(var Ta=1;Ta<=12;Ta++)wa[Ta+111]=wa[Ta+63235]="F"+Ta;var Sa={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"},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"},emacsy:{"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},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"]}};Sa.default=co?Sa.macDefault:Sa.pcDefault;var Ca={selectAll:Or,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Lo)},killLine:function(n){return li(n,function(e){if(e.empty()){var t=M(n.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<n.lastLine()?{from:e.head,to:I(e.head.line+1,0)}:{from:e.head,to:I(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return li(t,function(e){return{from:I(e.from().line,0),to:B(t.doc,I(e.to().line+1,0))}})},delLineLeft:function(e){return li(e,function(e){return{from:I(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(n){return li(n,function(e){var t=n.charCoords(e.head,"div").top+5;return{from:n.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(r){return li(r,function(e){var t=r.charCoords(e.head,"div").top+5,n=r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.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(I(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(I(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return hi(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return pi(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return fi(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div")},_o)},goLineLeft:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:0,top:t},"div")},_o)},goLineLeftSmart:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5,n=r.coordsChar({left:0,top:t},"div");return n.ch<r.getLine(n.line).search(/\S/)?pi(r,e.head):n},_o)},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,"char")},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=C(e.getLine(o.line),o.ch,r);t.push(T(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return _n(a,function(){for(var e=a.listSelections(),t=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,i=M(a.doc,r.line).text;if(i)if(r.ch==i.length&&(r=new I(r.line,r.ch-1)),0<r.ch)r=new I(r.line,r.ch+1),a.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),I(r.line,r.ch-2),r,"+transpose");else if(r.line>a.doc.first){var o=M(a.doc,r.line-1).text;o&&(r=new I(r.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),I(r.line-1,o.length-1),r,"+transpose"))}t.push(new da(r,r))}a.setSelections(t)})},newlineAndIndent:function(r){return _n(r,function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=r.listSelections();for(var n=0;n<e.length;n++)r.indentLine(e[n].from().line,null,!0);fn(r)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},La=new wo,Ea=null,_a=function(e,t,n){this.time=e,this.pos=t,this.button=n};_a.prototype.compare=function(e,t,n){return this.time+400>e&&0==W(t,this.pos)&&n==this.button};var Na,Aa,Ma={toString:function(){return"CodeMirror.Init"}},Oa={},Ra={};Mi.defaults=Oa,Mi.optionHandlers=Ra;var Pa=[];Mi.defineInitHook=function(e){return Pa.push(e)};var Da=null,za=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new wo,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};za.prototype.init=function(e){function t(e){if(!ve(s,e)){if(s.somethingSelected())Ri({lineWise:!1,text:s.getSelections()}),"cut"==e.type&&s.replaceSelection("",null,"cut");else{if(!s.options.lineWiseCopyCut)return;var t=Ii(s);Ri({lineWise:!0,text:t.text}),"cut"==e.type&&s.operation(function(){s.setSelections(t.ranges,0,Lo),s.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Da.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var r=Hi(),i=r.firstChild;s.display.lineSpace.insertBefore(r,s.display.lineSpace.firstChild),i.value=Da.text.join("\n");var o=document.activeElement;bo(i),setTimeout(function(){s.display.lineSpace.removeChild(r),o.focus(),o==l&&a.showPrimarySelection()},50)}}var n=this,a=this,s=a.cm,l=a.div=e.lineDiv;Wi(l,s.options.spellcheck),Io(l,"paste",function(e){ve(s,e)||Di(e,s)||Ji<=11&&setTimeout(Nn(s,function(){return n.updateFromDOM()}),20)}),Io(l,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),Io(l,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),Io(l,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Io(l,"touchstart",function(){return a.forceCompositionEnd()}),Io(l,"input",function(){n.composing||n.readFromDOMSoon()}),Io(l,"copy",t),Io(l,"cut",t)},za.prototype.prepareSelection=function(){var e=Xt(this.cm,!1);return e.focus=this.cm.state.focused,e},za.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},za.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=qi(t,e.anchorNode,e.anchorOffset),a=qi(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=W(j(o,a),r)||0!=W(F(o,a),i)){var s=t.display.view,l=r.line>=t.display.viewFrom&&Bi(t,r)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Bi(t,i);if(!u){var c=s[s.length-1].measure,d=c.maps?c.maps[c.maps.length-1]:c.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(l&&u){var h,f=e.rangeCount&&e.getRangeAt(0);try{h=mo(l.node,l.offset,u.offset,u.node)}catch(e){}h&&(!Gi&&t.state.focused?(e.collapse(l.node,l.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),f&&null==e.anchorNode?e.addRange(f):Gi&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},za.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)},za.prototype.showMultipleSelections=function(e){x(this.cm.display.cursorDiv,e.cursors),x(this.cm.display.selectionDiv,e.selection)},za.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},za.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return g(this.div,t)},za.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},za.prototype.blur=function(){this.div.blur()},za.prototype.getField=function(){return this.div},za.prototype.supportsTouch=function(){return!0},za.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():_n(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},za.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},za.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(lo&&no&&this.cm.options.gutters.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 n=qi(t,e.anchorNode,e.anchorOffset),r=qi(t,e.focusNode,e.focusOffset);n&&r&&_n(t,function(){Sr(t.doc,Xn(n,r),Lo),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},za.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=I(a.line-1,M(r.doc,a.line-1).length)),s.ch==M(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=I(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Gt(r,a.line))?(t=P(i.view[0].line),n=i.view[0].node):(t=P(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=Gt(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=P(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(l,e,t,u,c){function d(){p&&(n+=m,p=!1)}function h(e){e&&(d(),n+=e)}function f(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(null!=t)return void h(t||e.textContent.replace(/\u200b/g,""));var n,r=e.getAttribute("cm-marker");if(r){var i=l.findMarks(I(u,0),I(c+1,0),(s=+r,function(e){return e.id==s}));return void(i.length&&(n=i[0].find(0))&&h(O(l.doc,n.from,n.to).join(m)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p)$/i.test(e.nodeName);o&&d();for(var a=0;a<e.childNodes.length;a++)f(e.childNodes[a]);o&&(p=!0)}else 3==e.nodeType&&h(e.nodeValue);var s}for(var n="",p=!1,m=l.doc.lineSeparator();f(e),e!=t;)e=e.nextSibling;return n}(r,n,u,t,l)),h=O(r.doc,I(t,0),I(l,M(r.doc,l).text.length));1<d.length&&1<h.length;)if(V(d)==V(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=V(d),b=V(h),w=Math.min(y.length-(1==d.length?f:0),b.length-(1==h.length?f:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==d.length&&1==h.length&&t==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=I(t,f),k=I(l,h.length?V(h).length-p:0);return 1<d.length||d[0]||W(x,k)?(Hr(r.doc,d,x,k,"+input"),!0):void 0},za.prototype.ensurePolled=function(){this.forceCompositionEnd()},za.prototype.reset=function(){this.forceCompositionEnd()},za.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},za.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))},za.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||_n(this.cm,function(){return On(e.cm)})},za.prototype.setUneditable=function(e){e.contentEditable="false"},za.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||Nn(this.cm,Pi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},za.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},za.prototype.onContextMenu=function(){},za.prototype.resetPosition=function(){},za.prototype.needsContentAttribute=!0;var Ia,Wa,Ha,Fa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new wo,this.hasSelection=!1,this.composing=null};Fa.prototype.init=function(t){function e(e){if(!ve(i,e)){if(i.somethingSelected())Ri({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Ii(i);Ri({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Lo):(r.prevInput="",a.value=t.text.join("\n"),bo(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm,o=this.wrapper=Hi(),a=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),so&&(a.style.width="0px"),Io(a,"input",function(){Qi&&9<=Ji&&n.hasSelection&&(n.hasSelection=null),r.poll()}),Io(a,"paste",function(e){ve(i,e)||Di(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),Io(a,"cut",e),Io(a,"copy",e),Io(t.scroller,"paste",function(e){ct(t,e)||ve(i,e)||(i.state.pasteIncoming=!0,r.focus())}),Io(t.lineSpace,"selectstart",function(e){ct(t,e)||we(e)}),Io(a,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Io(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Fa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xt(e);if(e.options.moveInputWithCursor){var i=Rt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Fa.prototype.showSelection=function(e){var t=this.cm.display;x(t.cursorDiv,e.cursors),x(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Fa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&bo(this.textarea),Qi&&9<=Ji&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",Qi&&9<=Ji&&(this.hasSelection=null))}},Fa.prototype.getField=function(){return this.textarea},Fa.prototype.supportsTouch=function(){return!1},Fa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!uo||S()!=this.textarea))try{this.textarea.focus()}catch(e){}},Fa.prototype.blur=function(){this.textarea.blur()},Fa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fa.prototype.receivedFocus=function(){this.slowPoll()},Fa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Fa.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))})},Fa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Fo(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(Qi&&9<=Ji&&this.hasSelection===i||co&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a<s&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return _n(t,function(){Pi(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Fa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fa.prototype.onKeyPress=function(){Qi&&9<=Ji&&(this.hasSelection=null),this.fastPoll()},Fa.prototype.onContextMenu=function(e){function n(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function t(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=c,a.style.cssText=u,Qi&&Ji<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!Qi||Qi&&Ji<9)&&n();var e=0,t=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&0<a.selectionEnd&&"​"==r.prevInput?Nn(i,Or)(i):e++<10?o.detectingSelectAll=setTimeout(t,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(t,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=$t(i,e),l=o.scroller.scrollTop;if(s&&!ro){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&Nn(i,Sr)(i.doc,Xn(s),Lo);var u=a.style.cssText,c=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var d,h=r.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(Qi?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",eo&&(d=window.scrollY),o.input.focus(),eo&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Qi&&9<=Ji&&n(),vo){Te(e);var f=function(){me(window,"mouseup",f),setTimeout(t,20)};Io(window,"mouseup",f)}else setTimeout(t,50)}},Fa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Fa.prototype.setUneditable=function(){},Fa.prototype.needsContentAttribute=!1,function(i){function e(e,t,r,n){i.defaults[e]=t,r&&(o[e]=n?function(e,t,n){n!=Ma&&r(e,t,n)}:r)}var o=i.optionHandlers;i.defineOption=e,i.Init=Ma,e("value","",function(e,t){return e.setValue(t)},!0),e("mode",null,function(e,t){e.doc.modeOption=t,tr(e)},!0),e("indentUnit",2,tr,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(e){nr(e),Lt(e),On(e)},!0),e("lineSeparator",null,function(e,r){if(e.doc.lineSep=r){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var n=e.text.indexOf(r,t);if(-1==n)break;t=n+r.length,i.push(I(o,n))}o++});for(var t=i.length-1;0<=t;t--)Hr(e.doc,r,i[t],I(i[t].line,i[t].ch+r.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ma&&e.refresh()}),e("specialCharPlaceholder",Ve,function(e){return e.refresh()},!0),e("electricChars",!0),e("inputStyle",uo?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),e("rtlMoveVisually",!fo),e("wholeLineUpdateBefore",!0),e("theme","default",function(e){Ei(e),_i(e)},!0),e("keyMap","default",function(e,t,n){var r=si(t),i=n!=Ma&&si(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ai,!0),e("gutters",[],function(e){Vn(e.options),_i(e)},!0),e("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?qt(e.display)+"px":"0",e.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(e){return xn(e)},!0),e("scrollbarStyle","native",function(e){Tn(e),xn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),e("lineNumbers",!1,function(e){Vn(e.options),_i(e)},!0),e("firstLineNumber",1,_i,!0),e("lineNumberFormatter",function(e){return e},_i,!0),e("showCursorWhenSelecting",!1,Kt,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(e,t){"nocursor"==t&&(on(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),e("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),e("dragDrop",!0,Ni),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Kt,!0),e("singleCursorHeightPerLine",!0,Kt,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,nr,!0),e("addModeClass",!1,nr,!0),e("pollInterval",100),e("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),e("historyEventDelay",1250),e("viewportMargin",10,function(e){return e.refresh()},!0),e("maxHighlightLength",1e4,nr,!0),e("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),e("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),e("autofocus",null),e("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Mi),Wa=(Ia=Mi).optionHandlers,Ha=Ia.helpers={},Ia.prototype={constructor:Ia,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Wa.hasOwnProperty(e)&&Nn(this,Wa[e])(this,t,r),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](si(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:An(function(e,t){var n=e.token?e:Ia.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");(function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)})(this.state.overlays,{mode:n,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,On(this)}),removeOverlay:An(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void On(this)}}),indentLine:An(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),D(this.doc,e)&&Oi(this,e,t,n)}),indentSelection:An(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Oi(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&fn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Oi(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&0<u[r].from().ch&&xr(this.doc,r,new da(o,u[r].to()),Lo)}}}),getTokenAt:function(e,t){return Fe(this,e,t)},getLineTokens:function(e,t){return Fe(this,I(e),t,!0)},getTokenTypeAt:function(e){e=B(this.doc,e);var t,n=De(this,M(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Ia.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Ha.hasOwnProperty(t))return n;var r=Ha[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var s=0;s<r._global.length;s++){var l=r._global[s];l.pred(i,this)&&-1==w(n,l.val)&&n.push(l.val)}return n},getStateAfter:function(e,t){var n=this.doc;return ze(this,(e=m(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Rt(this,null==e?n.head:"object"==typeof e?B(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Ot(this,B(this.doc,e),t||"page")},coordsChar:function(e,t){return zt(this,(e=Mt(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Mt(this,{top:e,left:0},t||"page").top,f(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),r=M(this.doc,e)}else r=e;return At(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-ue(r):0)},defaultTextHeight:function(){return jt(this.display)},defaultCharWidth:function(){return Bt(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,u=(e=Rt(this,B(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(u=e.bottom),c+t.offsetWidth>h&&(c=h-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=dn(o,a)).scrollTop&&vn(o,s.scrollTop),null!=s.scrollLeft&&bn(o,s.scrollLeft))},triggerOnKeyDown:An(bi),triggerOnKeyPress:An(xi),triggerOnKeyUp:wi,triggerOnMouseDown:An(ki),execCommand:function(e){if(Ca.hasOwnProperty(e))return Ca[e].call(null,this)},triggerElectric:An(function(e){zi(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=B(this.doc,e),a=0;a<t&&!(o=Fi(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:An(function(t,n){var r=this;this.extendSelectionsBy(function(e){return r.display.shift||r.doc.extend||e.empty()?Fi(r.doc,e.head,t,n,r.options.rtlMoveVisually):t<0?e.from():e.to()},_o)}),deleteH:An(function(n,r){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):li(this,function(e){var t=Fi(i,e.head,n,r,!1);return n<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=B(this.doc,e),s=0;s<t;++s){var l=Rt(this,a,"div");if(null==o?o=l.left:l.left=o,(a=ji(this,l,i,n)).hitSide)break}return a},moveV:An(function(r,i){var o=this,a=this.doc,s=[],l=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(l)return r<0?e.from():e.to();var t=Rt(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),s.push(t.left);var n=ji(o,t,r,i);return"page"==i&&e==a.sel.primary()&&hn(o,Ot(o,n,"div").top-t.top),n},_o),s.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=s[e]}),findWordAt:function(e){var t=M(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=E(o,i)?function(e){return E(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!E(e)};0<n&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new da(I(e.line,n),I(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?r(this.display.cursorDiv,"CodeMirror-overwrite"):yo(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==S()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:An(function(e,t){pn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-pt(this)-this.display.barHeight,width:e.scrollWidth-pt(this)-this.display.barWidth,clientHeight:gt(this),clientWidth:mt(this)}},scrollIntoView:An(function(e,t){var n,r;null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:I(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?(r=e,mn(n=this),n.curOp.scrollToPos=r):gn(this,e.from,e.to,e.margin)}),setSize:An(function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Ct(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Rn(n,i,"widget");break}++i}),this.curOp.forceUpdate=!0,ge(this,"refresh",this)}),operation:function(e){return _n(this,e)},startOperation:function(){return Sn(this)},endOperation:function(){return Cn(this)},refresh:An(function(){var e=this.display.cachedTextHeight;On(this),this.curOp.forceUpdate=!0,Lt(this),pn(this,this.doc.scrollLeft,this.doc.scrollTop),Bn(this),(null==e||.5<Math.abs(e-jt(this.display)))&&Yt(this),ge(this,"refresh",this)}),swapDoc:An(function(e){var t=this.doc;return t.cm=null,ar(this,e),Lt(this),this.display.input.reset(),pn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Qe(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},e(Ia),Ia.registerHelper=function(e,t,n){Ha.hasOwnProperty(e)||(Ha[e]=Ia[e]={_global:[]}),Ha[e][t]=n},Ia.registerGlobalHelper=function(e,t,n,r){Ia.registerHelper(e,t,r),Ha[e]._global.push({pred:n,val:r})};var ja,Ba="iter insert remove copy getEditor constructor".split(" ");for(var Ua in va.prototype)va.prototype.hasOwnProperty(Ua)&&w(Ba,Ua)<0&&(Mi.prototype[Ua]=function(e){return function(){return e.apply(this.doc,arguments)}}(va.prototype[Ua]));return e(va),Mi.inputStyles={textarea:Fa,contenteditable:za},Mi.defineMode=function(e){Mi.defaults.mode||"null"==e||(Mi.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Uo[e]=t}.apply(this,arguments)},Mi.defineMIME=function(e,t){qo[e]=t},Mi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Mi.defineMIME("text/plain","null"),Mi.defineExtension=function(e,t){Mi.prototype[e]=t},Mi.defineDocExtension=function(e,t){va.prototype[e]=t},Mi.fromTextArea=function(t,e){function n(){t.value=s.getValue()}if((e=e?h(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=S();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}var i;if(t.form&&(Io(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(me(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=Mi(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},(ja=Mi).off=me,ja.on=Io,ja.wheelEventPixels=$n,ja.Doc=va,ja.splitLines=Ho,ja.countColumn=C,ja.findColumn=L,ja.isWordChar=o,ja.Pass=Co,ja.signal=ge,ja.Line=Xo,ja.changeEnd=Zn,ja.scrollbarModel=oa,ja.Pos=I,ja.cmpPos=W,ja.modes=Uo,ja.mimeModes=qo,ja.resolveMode=_e,ja.getMode=Ne,ja.modeExtensions=Vo,ja.extendMode=Ae,ja.copyState=Me,ja.startState=Re,ja.innerMode=Oe,ja.commands=Ca,ja.keyMap=Sa,ja.keyName=ai,ja.isModifierKey=ii,ja.lookupKey=ri,ja.normalizeKeyMap=ni,ja.StringStream=Yo,ja.SharedTextMarker=ma,ja.TextMarker=pa,ja.LineWidget=ha,ja.e_preventDefault=we,ja.e_stopPropagation=xe,ja.e_stop=Te,ja.addClass=r,ja.contains=g,ja.rmClass=yo,ja.keyNames=wa,Mi.version="5.33.0",Mi}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(A){"use strict";function e(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}function n(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}A.defineMode("css",function(e,t){function o(e,t){return h=t,e}function i(i){return function(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==i&&!r){")"==i&&e.backUp(1);break}r=!r&&"\\"==n}return(n==i||!r&&")"!=i)&&(t.tokenize=null),o("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),o(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(!1===r?0:p),e.context),n}function u(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,n){return N[n.context.type](e,t,n)}function d(e,t,n,r){for(var i=r||1;0<i;i--)n.context=n.context.prev;return c(e,t,n)}function r(e){var t=e.current().toLowerCase();f=C.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var n=t.inline;t.propertyKeywords||(t=A.resolveMode("text/css"));var h,f,p=e.indentUnit,m=t.tokenHooks,g=t.documentTypes||{},v=t.mediaTypes||{},y=t.mediaFeatures||{},b=t.mediaValueKeywords||{},w=t.propertyKeywords||{},x=t.nonStandardPropertyKeywords||{},k=t.fontProperties||{},T=t.counterDescriptors||{},S=t.colorKeywords||{},C=t.valueKeywords||{},L=t.allowNested,E=t.lineComment,_=!0===t.supportsAtComponent,N={top:function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return u(n);if(_&&/@component/i.test(e))return l(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return l(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return l(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)f="builtin";else if("word"==e)f="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(L&&"("==e)return l(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return w.hasOwnProperty(r)?(f="property","maybeprop"):x.hasOwnProperty(r)?(f="string-2","maybeprop"):L?(f=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(f+=" error","maybeprop")}return"meta"==e?"block":L||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(f="error","block")},maybeprop:function(e,t,n){return":"==e?l(n,t,"prop"):c(e,t,n)},prop:function(e,t,n){if(";"==e)return u(n);if("{"==e&&L)return l(n,t,"propBlock");if("}"==e||"{"==e)return d(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)r(t);else if("interpolation"==e)return l(n,t,"interpolation")}else f+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?u(n):"word"==e?(f="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?d(e,t,n):")"==e?u(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&r(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(f="variable-3",n.context.type):c(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&g.hasOwnProperty(t.current())?(f="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,n);if("{"==e)return u(n)&&l(n,t,L?"block":"top");if("interpolation"==e)return l(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();f="only"==r||"not"==r||"and"==r||"or"==r?"keyword":v.hasOwnProperty(r)?"attribute":y.hasOwnProperty(r)?"property":b.hasOwnProperty(r)?"keyword":w.hasOwnProperty(r)?"property":x.hasOwnProperty(r)?"string-2":C.hasOwnProperty(r)?"atom":S.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?d(e,t,n):"{"==e?u(n)&&l(n,t,L?"block":"top",!1):("word"==e&&(f="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?u(n):"{"==e||"}"==e?d(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(f="variable","restricted_atBlock_before"):c(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,u(n)):"word"==e?(f="@font-face"==n.stateArg&&!k.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(f="variable","keyframes"):"{"==e?l(n,t,"top"):c(e,t,n)},at:function(e,t,n){return";"==e?u(n):"{"==e||"}"==e?d(e,t,n):("word"==e?f="tag":"hash"==e&&(f="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?u(n):"{"==e||";"==e?d(e,t,n):("word"==e?f="variable":"variable"!=e&&"("!=e&&")"!=e&&(f="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new s(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||function(e,t){var n=e.next();if(m[n]){var r=m[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),o("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?o(null,"compare"):'"'==n||"'"==n?(t.tokenize=i(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),o("atom","hash")):"!"==n?(e.match(/^\s*\w*/),o("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),o("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?o(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?o("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?o(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=a,o("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),o("property","word")):o(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),o("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?o("variable-2","variable-definition"):o("variable-2","variable")):e.match(/^\w+-/)?o("meta","meta"):void 0})(e,t);return n&&"object"==typeof n&&(h=n[1],n=n[0]),f=n,"comment"!=h&&(t.state=N[t.state](h,e,t)),f},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-p)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:E,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(i),a=["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"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","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","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","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","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-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","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-weight","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","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","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","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","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","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","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-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","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","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","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"],d=e(c),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(h),p=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=e(g),y=["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","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","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","copy","counter","counters","cover","crop","cross","crosshair","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","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","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","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","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","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","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","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","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","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","sub","subpixel-antialiased","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","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","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"],b=e(y),w=t.concat(i).concat(a).concat(l).concat(c).concat(h).concat(g).concat(y);A.registerHelper("hintWords","css",w),A.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n)(e,t)}},name:"css"}),A.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),A.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n)(e,t):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),A.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n)(e,t)}},name:"css",helperType:"gss"})});var exports=exports||{},CSSLint=function(){function Reporter(e,t){this.messages=[],this.stats=[],this.lines=e,this.ruleset=t}var parserlib={};!function(){function e(){this._listeners={}}function n(e){this._input=e.replace(/\n\r?/g,"\n"),this._line=1,this._col=1,this._cursor=0}function r(e,t,n){this.col=n,this.line=t,this.message=e}function t(e,t,n,r){this.col=n,this.line=t,this.text=e,this.type=r}function i(e,t){this._reader=e?new n(e.toString()):null,this._token=null,this._tokenData=t,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}e.prototype={constructor:e,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){if("string"==typeof e&&(e={type:e}),void 0!==e.target&&(e.target=this),void 0===e.type)throw new Error("Event object missing 'type' property.");if(this._listeners[e.type])for(var t=this._listeners[e.type].concat(),n=0,r=t.length;n<r;n++)t[n].call(this,e)},removeListener:function(e,t){if(this._listeners[e])for(var n=this._listeners[e],r=0,i=n.length;r<i;r++)if(n[r]===t){n.splice(r,1);break}}},n.prototype={constructor:n,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(e){var t=null;return e=void 0===e?1:e,this._cursor<this._input.length&&(t=this._input.charAt(this._cursor+e-1)),t},read:function(){var e=null;return this._cursor<this._input.length&&("\n"==this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,e=this._input.charAt(this._cursor++)),e},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(e){for(var t,n="";n.length<e.length||n.lastIndexOf(e)!=n.length-e.length;){if(!(t=this.read()))throw new Error('Expected "'+e+'" at line '+this._line+", col "+this._col+".");n+=t}return n},readWhile:function(e){for(var t="",n=this.read();null!==n&&e(n);)t+=n,n=this.read();return t},readMatch:function(e){var t=this._input.substring(this._cursor),n=null;return"string"==typeof e?0===t.indexOf(e)&&(n=this.readCount(e.length)):e instanceof RegExp&&e.test(t)&&(n=this.readCount(RegExp.lastMatch.length)),n},readCount:function(e){for(var t="";e--;)t+=this.read();return t}},r.prototype=new Error,t.fromToken=function(e){return new t(e.value,e.startLine,e.startCol)},t.prototype={constructor:t,valueOf:function(){return this.toString()},toString:function(){return this.text}},i.createTokenData=function(e){var t=[],n={},r=e.concat([]),i=0,o=r.length+1;for(r.UNKNOWN=-1,r.unshift({name:"EOF"});i<o;i++)t.push(r[i].name),r[r[i].name]=i,r[i].text&&(n[r[i].text]=i);return r.name=function(e){return t[e]},r.type=function(e){return n[e]},r},i.prototype={constructor:i,match:function(e,t){e instanceof Array||(e=[e]);for(var n=this.get(t),r=0,i=e.length;r<i;)if(n==e[r++])return!0;return this.unget(),!1},mustMatch:function(e,t){var n;if(e instanceof Array||(e=[e]),!this.match.apply(this,arguments))throw n=this.LT(1),new r("Expected "+this._tokenData[e[0]].name+" at line "+n.startLine+", col "+n.startCol+".",n.startLine,n.startCol)},advance:function(e,t){for(;0!==this.LA(0)&&!this.match(e,t);)this.get();return this.LA(0)},get:function(e){var t,n,r=this._tokenData,i=(this._reader,0);if(r.length,this._lt.length&&0<=this._ltIndex&&this._ltIndex<this._lt.length){for(i++,this._token=this._lt[this._ltIndex++],n=r[this._token.type];void 0!==n.channel&&e!==n.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],n=r[this._token.type],i++;if((void 0===n.channel||e===n.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(i),this._token.type}return-1<(t=this._getToken()).type&&!r[t.type].hide&&(t.channel=r[t.type].channel,this._token=t,this._lt.push(t),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),5<this._lt.length&&this._lt.shift(),5<this._ltIndexCache.length&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),(n=r[t.type])&&(n.hide||void 0!==n.channel&&e!==n.channel)?this.get(e):t.type},LA:function(e){var t,n=e;if(0<e){if(5<e)throw new Error("Too much lookahead.");for(;n;)t=this.get(),n--;for(;n<e;)this.unget(),n++}else if(e<0){if(!this._lt[this._ltIndex+e])throw new Error("Too much lookbehind.");t=this._lt[this._ltIndex+e].type}else t=this._token.type;return t},LT:function(e){return this.LA(e),this._lt[this._ltIndex+e-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(e){return e<0||e>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[e].name},tokenType:function(e){return this._tokenData[e]||-1},unget:function(){if(!this._ltIndexCache.length)throw new Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:n,SyntaxError:r,SyntaxUnit:t,EventTarget:e,TokenStreamBase:i}}(),function(){function Combinator(e,t,n){SyntaxUnit.call(this,e,t,n,Parser.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":">"==e?this.type="child":"+"==e?this.type="adjacent-sibling":"~"==e&&(this.type="sibling")}function MediaFeature(e,t){SyntaxUnit.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}function MediaQuery(e,t,n,r,i){SyntaxUnit.call(this,(e?e+" ":"")+(t||"")+(t&&0<n.length?" and ":"")+n.join(" and "),r,i,Parser.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=n}function Parser(e){EventTarget.call(this),this.options=e||{},this._tokenStream=null}function PropertyName(e,t,n,r){SyntaxUnit.call(this,e,n,r,Parser.PROPERTY_NAME_TYPE),this.hack=t}function PropertyValue(e,t,n){SyntaxUnit.call(this,e.join(" "),t,n,Parser.PROPERTY_VALUE_TYPE),this.parts=e}function PropertyValueIterator(e){this._i=0,this._parts=e.parts,this._marks=[],this.value=e}function PropertyValuePart(text,line,col){var temp;if(SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type="unknown",/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vm":this.type="length";break;case"deg":case"rad":case"grad":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}else/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(text)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(text)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type="color",3==(temp=RegExp.$1).length?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\(["']?([^\)"']+)["']?\)/i.test(text)?(this.type="uri",this.uri=RegExp.$1):/^([^\(]+)\(/i.test(text)?(this.type="function",this.name=RegExp.$1,this.value=text):/^["'][^"']*["']/.test(text)?(this.type="string",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type="color",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\,\/]$/.test(text)?(this.type="operator",this.value=text):/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)&&(this.type="identifier",this.value=text)}function Selector(e,t,n){SyntaxUnit.call(this,e.join(" "),t,n,Parser.SELECTOR_TYPE),this.parts=e,this.specificity=Specificity.calculate(this)}function SelectorPart(e,t,n,r,i){SyntaxUnit.call(this,n,r,i,Parser.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}function SelectorSubPart(e,t,n,r){SyntaxUnit.call(this,e,n,r,Parser.SELECTOR_SUB_PART_TYPE),this.type=t,this.args=[]}function Specificity(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function isHexDigit(e){return null!==e&&h.test(e)}function isDigit(e){return null!==e&&/\d/.test(e)}function isWhitespace(e){return null!==e&&/\s/.test(e)}function isNewLine(e){return null!==e&&nl.test(e)}function isNameStart(e){return null!==e&&/[a-z_\u0080-\uFFFF\\]/i.test(e)}function isNameChar(e){return null!==e&&(isNameStart(e)||/[0-9\-\\]/.test(e))}function isIdentStart(e){return null!==e&&(isNameStart(e)||/\-\\/.test(e))}function mix(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function TokenStream(e){TokenStreamBase.call(this,e,Tokens)}function ValidationError(e,t,n){this.col=n,this.line=t,this.message=e}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var e,t=new EventTarget,n={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,n,r=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();r.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;r.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(n=r.peek();n>Tokens.EOF;){try{switch(n){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(r.get(),this.options.strict)throw new SyntaxError("Unknown @ rule.",r.LT(0).startLine,r.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+r.LT(0).value+".",line:r.LT(0).startLine,col:r.LT(0).startCol}),e=0;r.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)e++;for(;e;)r.advance([Tokens.RBRACE]),e--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(n){case Tokens.CHARSET_SYM:throw t=r.LT(1),this._charset(!1),new SyntaxError("@charset not allowed here.",t.startLine,t.startCol);case Tokens.IMPORT_SYM:throw t=r.LT(1),this._import(!1),new SyntaxError("@import not allowed here.",t.startLine,t.startCol);case Tokens.NAMESPACE_SYM:throw t=r.LT(1),this._namespace(!1),new SyntaxError("@namespace not allowed here.",t.startLine,t.startCol);default:r.get(),this._unexpectedToken(r.token())}}}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}n=r.peek()}n!=Tokens.EOF&&this._unexpectedToken(r.token()),this.fire("endstylesheet")},_charset:function(e){var t,n,r,i=this._tokenStream;i.match(Tokens.CHARSET_SYM)&&(n=i.token().startLine,r=i.token().startCol,this._readWhitespace(),i.mustMatch(Tokens.STRING),t=i.token().value,this._readWhitespace(),i.mustMatch(Tokens.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:n,col:r}))},_import:function(e){var t,n,r,i=this._tokenStream;i.mustMatch(Tokens.IMPORT_SYM),n=i.token(),this._readWhitespace(),i.mustMatch([Tokens.STRING,Tokens.URI]),t=i.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),r=this._media_query_list(),i.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:r,line:n.startLine,col:n.startCol})},_namespace:function(e){var t,n,r,i,o=this._tokenStream;o.mustMatch(Tokens.NAMESPACE_SYM),t=o.token().startLine,n=o.token().startCol,this._readWhitespace(),o.match(Tokens.IDENT)&&(r=o.token().value,this._readWhitespace()),o.mustMatch([Tokens.STRING,Tokens.URI]),i=o.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),o.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:r,uri:i,line:t,col:n})},_media:function(){var e,t,n,r=this._tokenStream;for(r.mustMatch(Tokens.MEDIA_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),n=this._media_query_list(),r.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:n,line:e,col:t});;)if(r.peek()==Tokens.PAGE_SYM)this._page();else if(r.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(!this._ruleset())break;r.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:n,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!=Tokens.IDENT&&e.peek()!=Tokens.LPAREN||t.push(this._media_query());e.match(Tokens.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,n=null,r=null,i=[];if(e.match(Tokens.IDENT)&&("only"!=(n=e.token().value.toLowerCase())&&"not"!=n?(e.unget(),n=null):r=e.token()),this._readWhitespace(),e.peek()==Tokens.IDENT?(t=this._media_type(),null===r&&(r=e.token())):e.peek()==Tokens.LPAREN&&(null===r&&(r=e.LT(1)),i.push(this._media_expression())),null===t&&0===i.length)return null;for(this._readWhitespace();e.match(Tokens.IDENT);)"and"!=e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),i.push(this._media_expression());return new MediaQuery(n,t,i,r.startLine,r.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t,n=this._tokenStream,r=null;return n.mustMatch(Tokens.LPAREN),t=this._media_feature(),this._readWhitespace(),n.match(Tokens.COLON)&&(this._readWhitespace(),e=n.LT(1),r=this._expression()),n.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(t,r?new SyntaxUnit(r,e.startLine,e.startCol):null)},_media_feature:function(){var e=this._tokenStream;return e.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(e.token())},_page:function(){var e,t,n=this._tokenStream,r=null,i=null;n.mustMatch(Tokens.PAGE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),n.match(Tokens.IDENT)&&"auto"===(r=n.token().value).toLowerCase()&&this._unexpectedToken(n.token()),n.peek()==Tokens.COLON&&(i=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:r,pseudo:i,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:r,pseudo:i,line:e,col:t})},_margin:function(){var e,t,n=this._tokenStream,r=this._margin_sym();return!!r&&(e=n.token().startLine,t=n.token().startCol,this.fire({type:"startpagemargin",margin:r,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:r,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(Tokens.COLON),e.mustMatch(Tokens.IDENT),e.token().value},_font_face:function(){var e,t,n=this._tokenStream;n.mustMatch(Tokens.FONT_FACE_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,n=this._tokenStream;n.mustMatch(Tokens.VIEWPORT_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_operator:function(e){var t=this._tokenStream,n=null;return(t.match([Tokens.SLASH,Tokens.COMMA])||e&&t.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(n=t.token(),this._readWhitespace()),n?PropertyValuePart.fromToken(n):null},_combinator:function(){var e,t=this._tokenStream,n=null;return t.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(n=new Combinator((e=t.token()).value,e.startLine,e.startCol),this._readWhitespace()),n},_unary_operator:function(){var e=this._tokenStream;return e.match([Tokens.MINUS,Tokens.PLUS])?e.token().value:null},_property:function(){var e,t,n,r,i=this._tokenStream,o=null,a=null;return i.peek()==Tokens.STAR&&this.options.starHack&&(i.get(),a=(t=i.token()).value,n=t.startLine,r=t.startCol),i.match(Tokens.IDENT)&&("_"==(e=(t=i.token()).value).charAt(0)&&this.options.underscoreHack&&(a="_",e=e.substring(1)),o=new PropertyName(e,a,n||t.startLine,r||t.startCol),this._readWhitespace()),o},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([Tokens.RBRACE])!=Tokens.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,n=[];if(null!==(e=this._selector()))for(n.push(e);t.match(Tokens.COMMA);)this._readWhitespace(),null!==(e=this._selector())?n.push(e):this._unexpectedToken(t.LT(1));return n.length?n:null},_selector:function(){var e=this._tokenStream,t=[],n=null,r=null,i=null;if(null===(n=this._simple_selector_sequence()))return null;for(t.push(n);;)if(null!==(r=this._combinator()))t.push(r),null===(n=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(n);else{if(!this._readWhitespace())break;i=new Combinator(e.token().value,e.token().startLine,e.token().startCol),r=this._combinator(),null===(n=this._simple_selector_sequence())?null!==r&&this._unexpectedToken(e.LT(1)):(null!==r?t.push(r):t.push(i),t.push(n))}return new Selector(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,n=this._tokenStream,r=null,i=[],o="",a=[function(){return n.match(Tokens.HASH)?new SelectorSubPart(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],s=0,l=a.length,u=null;for(e=n.LT(1).startLine,t=n.LT(1).startCol,(r=this._type_selector())||(r=this._universal()),null!==r&&(o+=r);n.peek()!==Tokens.S;){for(;s<l&&null===u;)u=a[s++].call(this);if(null===u){if(""===o)return null;break}s=0,i.push(u),o+=u.toString(),u=null}return""!==o?new SelectorPart(r,i,o,e,t):null},_type_selector:function(){var e=this._tokenStream,t=this._namespace_prefix(),n=this._element_name();return n?(t&&(n.text=t+n.text,n.col-=t.length),n):(t&&(e.unget(),1<t.length&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(Tokens.DOT)?(t.mustMatch(Tokens.IDENT),new SelectorSubPart("."+(e=t.token()).value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(Tokens.IDENT)?new SelectorSubPart((e=t.token()).value,"elementName",e.startLine,e.startCol):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==Tokens.PIPE&&e.LA(2)!==Tokens.PIPE||(e.match([Tokens.IDENT,Tokens.STAR])&&(t+=e.token().value),e.mustMatch(Tokens.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,n="";return(e=this._namespace_prefix())&&(n+=e),t.match(Tokens.STAR)&&(n+="*"),n.length?n:null},_attrib:function(){var e,t,n=this._tokenStream,r=null;return n.match(Tokens.LBRACKET)?(r=(t=n.token()).value,r+=this._readWhitespace(),(e=this._namespace_prefix())&&(r+=e),n.mustMatch(Tokens.IDENT),r+=n.token().value,r+=this._readWhitespace(),n.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(r+=n.token().value,r+=this._readWhitespace(),n.mustMatch([Tokens.IDENT,Tokens.STRING]),r+=n.token().value,r+=this._readWhitespace()),n.mustMatch(Tokens.RBRACKET),new SelectorSubPart(r+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,n=this._tokenStream,r=null,i=":";return n.match(Tokens.COLON)&&(n.match(Tokens.COLON)&&(i+=":"),n.match(Tokens.IDENT)?(r=n.token().value,e=n.token().startLine,t=n.token().startCol-i.length):n.peek()==Tokens.FUNCTION&&(e=n.LT(1).startLine,t=n.LT(1).startCol-i.length,r=this._functional_pseudo()),r&&(r=new SelectorSubPart(i+r,"pseudo",e,t))),r},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(Tokens.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(Tokens.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,n,r=this._tokenStream,i="",o=null;return r.match(Tokens.NOT)&&(i=r.token().value,e=r.token().startLine,t=r.token().startCol,i+=this._readWhitespace(),i+=n=this._negation_arg(),i+=this._readWhitespace(),r.match(Tokens.RPAREN),(o=new SelectorSubPart(i+=r.token().value,"not",e,t)).args.push(n)),o},_negation_arg:function(){var e,t,n=this._tokenStream,r=[this._type_selector,this._universal,function(){return n.match(Tokens.HASH)?new SelectorSubPart(n.token().value,"id",n.token().startLine,n.token().startCol):null},this._class,this._attrib,this._pseudo],i=null,o=0,a=r.length;for(e=n.LT(1).startLine,t=n.LT(1).startCol;o<a&&null===i;)i=r[o].call(this),o++;return null===i&&this._unexpectedToken(n.LT(1)),"elementName"==i.type?new SelectorPart(i,[],i.toString(),e,t):new SelectorPart(null,[i],i.toString(),e,t)},_declaration:function(){var e=this._tokenStream,t=null,n=null,r=null,i=null,o="";if(null!==(t=this._property())){e.mustMatch(Tokens.COLON),this._readWhitespace(),(n=this._expr())&&0!==n.length||this._unexpectedToken(e.LT(1)),r=this._prio(),o=t.toString(),(this.options.starHack&&"*"==t.hack||this.options.underscoreHack&&"_"==t.hack)&&(o=t.text);try{this._validateProperty(o,n)}catch(e){i=e}return this.fire({type:"property",property:t,value:n,important:r,line:t.line,col:t.col,invalid:i}),!0}return!1},_prio:function(){var e=this._tokenStream.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),e},_expr:function(e){this._tokenStream;var t=[],n=null,r=null;if(null!==(n=this._term()))for(t.push(n);(r=this._operator(e))&&t.push(r),null!==(n=this._term());)t.push(n);return 0<t.length?new PropertyValue(t,t[0].line,t[0].col):null},_term:function(){var e,t,n,r,i=this._tokenStream,o=null;return null!==(r=this._unary_operator())&&(t=i.token().startLine,n=i.token().startCol),i.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(o=this._ie_function(),null===r&&(t=i.token().startLine,n=i.token().startCol)):i.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(o=i.token().value,null===r&&(t=i.token().startLine,n=i.token().startCol),this._readWhitespace()):null===(e=this._hexcolor())?(null===r&&(t=i.LT(1).startLine,n=i.LT(1).startCol),null===o&&(o=i.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(o=e.value,null===r&&(t=e.startLine,n=e.startCol)),null!==o?new PropertyValuePart(null!==r?r+o:o,t,n):null},_function:function(){var e,t=this._tokenStream,n=null;if(t.match(Tokens.FUNCTION)){if(n=t.token().value,this._readWhitespace(),n+=this._expr(!0),this.options.ieFilters&&t.peek()==Tokens.EQUALS)do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)==Tokens.COMMA&&(n+=t.token().value),t.match(Tokens.IDENT),n+=t.token().value,t.match(Tokens.EQUALS),n+=t.token().value,e=t.peek();e!=Tokens.COMMA&&e!=Tokens.S&&e!=Tokens.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([Tokens.COMMA,Tokens.S]));t.match(Tokens.RPAREN),n+=")",this._readWhitespace()}return n},_ie_function:function(){var e,t=this._tokenStream,n=null;if(t.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){n=t.token().value;do{for(this._readWhitespace()&&(n+=t.token().value),t.LA(0)==Tokens.COMMA&&(n+=t.token().value),t.match(Tokens.IDENT),n+=t.token().value,t.match(Tokens.EQUALS),n+=t.token().value,e=t.peek();e!=Tokens.COMMA&&e!=Tokens.S&&e!=Tokens.RPAREN;)t.get(),n+=t.token().value,e=t.peek()}while(t.match([Tokens.COMMA,Tokens.S]));t.match(Tokens.RPAREN),n+=")",this._readWhitespace()}return n},_hexcolor:function(){var e,t=this._tokenStream,n=null;if(t.match(Tokens.HASH)){if(e=(n=t.token()).value,!/#[a-f0-9]{3,6}/i.test(e))throw new SyntaxError("Expected a hex color but found '"+e+"' at line "+n.startLine+", col "+n.startCol+".",n.startLine,n.startCol);this._readWhitespace()}return n},_keyframes:function(){var e,t,n,r=this._tokenStream,i="";for(r.mustMatch(Tokens.KEYFRAMES_SYM),e=r.token(),/^@\-([^\-]+)\-/.test(e.value)&&(i=RegExp.$1),this._readWhitespace(),n=this._keyframe_name(),this._readWhitespace(),r.mustMatch(Tokens.LBRACE),this.fire({type:"startkeyframes",name:n,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=r.peek();t==Tokens.IDENT||t==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=r.peek();this.fire({type:"endkeyframes",name:n,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),r.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(e.token())},_keyframe_rule:function(){this._tokenStream;var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(Tokens.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(t.token());if(t.match(Tokens.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return SyntaxUnit.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(e,t){var n,r=this._tokenStream;this._readWhitespace(),e&&r.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(r.match(Tokens.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!r.match(Tokens.SEMICOLON))break}this._readWhitespace()}r.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(n=r.advance([Tokens.SEMICOLON,Tokens.RBRACE]))==Tokens.SEMICOLON)this._readDeclarations(!1,t);else if(n!=Tokens.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(Tokens.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new SyntaxError("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){Validation.validate(e,t)},parse:function(e){this._tokenStream=new TokenStream(e,Tokens),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new TokenStream(e,Tokens);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new TokenStream(e,Tokens),this._readDeclarations()}};for(e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}();var Properties={"alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":{multi:"<time>",comma:!0},"animation-direction":{multi:"normal | alternate",comma:!0},"animation-duration":{multi:"<time>",comma:!0},"animation-iteration-count":{multi:"<number> | infinite",comma:!0},"animation-name":{multi:"none | <ident>",comma:!0},"animation-play-state":{multi:"running | paused",comma:!0},"animation-timing-function":1,"-moz-animation-delay":{multi:"<time>",comma:!0},"-moz-animation-direction":{multi:"normal | alternate",comma:!0},"-moz-animation-duration":{multi:"<time>",comma:!0},"-moz-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-moz-animation-name":{multi:"none | <ident>",comma:!0},"-moz-animation-play-state":{multi:"running | paused",comma:!0},"-ms-animation-delay":{multi:"<time>",comma:!0},"-ms-animation-direction":{multi:"normal | alternate",comma:!0},"-ms-animation-duration":{multi:"<time>",comma:!0},"-ms-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-ms-animation-name":{multi:"none | <ident>",comma:!0},"-ms-animation-play-state":{multi:"running | paused",comma:!0},"-webkit-animation-delay":{multi:"<time>",comma:!0},"-webkit-animation-direction":{multi:"normal | alternate",comma:!0},"-webkit-animation-duration":{multi:"<time>",comma:!0},"-webkit-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-webkit-animation-name":{multi:"none | <ident>",comma:!0},"-webkit-animation-play-state":{multi:"running | paused",comma:!0},"-o-animation-delay":{multi:"<time>",comma:!0},"-o-animation-direction":{multi:"normal | alternate",comma:!0},"-o-animation-duration":{multi:"<time>",comma:!0},"-o-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-o-animation-name":{multi:"none | <ident>",comma:!0},"-o-animation-play-state":{multi:"running | paused",comma:!0},appearance:"icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none | inherit",azimuth:function(e){var t,n=!1,r=!1;if(ValidationTypes.isAny(e,"<angle> | leftwards | rightwards | inherit")||(ValidationTypes.isAny(e,"behind")&&(r=n=!0),ValidationTypes.isAny(e,"left-side | far-left | left | center-left | center | center-right | right | far-right | right-side")&&(r=!0,n||ValidationTypes.isAny(e,"behind"))),e.hasNext())throw t=e.next(),new ValidationError(r?"Expected end of value but found '"+t+"'.":"Expected (<'azimuth'>) but found '"+t+"'.",t.line,t.col)},"backface-visibility":"visible | hidden",background:1,"background-attachment":{multi:"<attachment>",comma:!0},"background-clip":{multi:"<box>",comma:!0},"background-color":"<color> | inherit","background-image":{multi:"<bg-image>",comma:!0},"background-origin":{multi:"<box>",comma:!0},"background-position":{multi:"<bg-position>",comma:!0},"background-repeat":{multi:"<repeat-style>"},"background-size":{multi:"<bg-size>",comma:!0},"baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color> | inherit","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate | inherit","border-color":{multi:"<color> | inherit",max:4},"border-image":1,"border-image-outset":{multi:"<length> | <number>",max:4},"border-image-repeat":{multi:"stretch | repeat | round",max:2},"border-image-slice":function(e){var t,n=!1,r=!1,i=0;for(ValidationTypes.isAny(e,"fill")&&(n=r=!0);e.hasNext()&&i<4&&(n=ValidationTypes.isAny(e,"<number> | <percentage>"));)i++;if(r?n=!0:ValidationTypes.isAny(e,"fill"),e.hasNext())throw t=e.next(),new ValidationError(n?"Expected end of value but found '"+t+"'.":"Expected ([<number> | <percentage>]{1,4} && fill?) but found '"+t+"'.",t.line,t.col)},"border-image-source":"<image> | none","border-image-width":{multi:"<length> | <percentage> | <number> | auto",max:4},"border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color> | inherit","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":function(e){for(var t,n=!1,r=!1,i=0,o=8;e.hasNext()&&i<o;){if(!(n=ValidationTypes.isAny(e,"<length> | <percentage> | inherit"))){if(!("/"==e.peek()&&0<i)||r)break;r=!0,o=i+5,e.next()}i++}if(e.hasNext())throw t=e.next(),new ValidationError(n?"Expected end of value but found '"+t+"'.":"Expected (<'border-radius'>) but found '"+t+"'.",t.line,t.col)},"border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color> | inherit","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":{multi:"<length> | inherit",max:2},"border-style":{multi:"<border-style>",max:4},"border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color> | inherit","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":{multi:"<border-width>",max:4},bottom:"<margin-width> | inherit","box-align":"start | end | center | baseline | stretch","box-decoration-break":"slice |clone","box-direction":"normal | reverse | inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single | multiple","box-ordinal-group":"<integer>","box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","box-pack":"start | end | center | justify","box-shadow":function(e){var t;if(ValidationTypes.isAny(e,"none")){if(e.hasNext())throw new ValidationError("Expected end of value but found '"+(t=e.next())+"'.",t.line,t.col)}else Validation.multiProperty("<shadow>",e,!0,1/0)},"box-sizing":"content-box | border-box | inherit","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom | inherit",clear:"none | right | left | both | inherit",clip:1,color:"<color> | inherit","color-profile":1,"column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before | inherit","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl | inherit",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box","dominant-baseline":1,"drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"initial | <integer>",elevation:"<angle> | below | level | above | higher | lower | inherit","empty-cells":"show | hide | inherit",filter:1,fit:"fill | hidden | meet | slice","fit-position":1,float:"left | right | none | inherit","float-offset":1,font:1,"font-family":1,"font-size":"<absolute-size> | <relative-size> | <length> | <percentage> | inherit","font-size-adjust":"<number> | none | inherit","font-stretch":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit","font-style":"normal | italic | oblique | inherit","font-variant":"normal | small-caps | inherit","font-weight":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit","grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-span":"<integer>","grid-row-sizing":1,"hanging-punctuation":1,height:"<margin-width> | inherit","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":1,"image-resolution":1,"inline-box-align":"initial | last | <integer>",left:"<margin-width> | inherit","letter-spacing":"<length> | normal | inherit","line-height":"<number> | <length> | <percentage> | normal | inherit","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none | inherit","list-style-position":"inside | outside | inherit","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",margin:{multi:"<margin-width> | inherit",max:4},"margin-bottom":"<margin-width> | inherit","margin-left":"<margin-width> | inherit","margin-right":"<margin-width> | inherit","margin-top":"<margin-width> | inherit",mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":"<length> | <percentage> | none | inherit","max-width":"<length> | <percentage> | none | inherit","min-height":"<length> | <percentage> | inherit","min-width":"<length> | <percentage> | inherit","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:"<number> | inherit",orphans:"<integer> | inherit",outline:1,"outline-color":"<color> | invert | inherit","outline-offset":1,"outline-style":"<border-style> | inherit","outline-width":"<border-width> | inherit",overflow:"visible | hidden | scroll | auto | inherit","overflow-style":1,"overflow-x":1,"overflow-y":1,padding:{multi:"<padding-width> | inherit",max:4},"padding-bottom":"<padding-width> | inherit","padding-left":"<padding-width> | inherit","padding-right":"<padding-width> | inherit","padding-top":"<padding-width> | inherit",page:1,"page-break-after":"auto | always | avoid | left | right | inherit","page-break-before":"auto | always | avoid | left | right | inherit","page-break-inside":"auto | avoid | inherit","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",position:"static | relative | absolute | fixed | inherit","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width> | inherit",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:"normal | none | spell-out | inherit","speak-header":"once | always | inherit","speak-numeral":"digits | continuous | inherit","speak-punctuation":"code | none | inherit","speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":"auto | fixed | inherit","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | inherit","text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage> | inherit","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none | inherit","text-wrap":"normal | none | avoid",top:"<margin-width> | inherit",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | bidi-override | inherit","user-modify":"read-only | read-write | write-only | inherit","user-select":"none | text | toggle | element | elements | all | inherit","vertical-align":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",visibility:"visible | hidden | collapse | inherit","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | inherit | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","white-space-collapse":1,widows:"<integer> | inherit",width:"<length> | <percentage> | auto | inherit","word-break":"normal | keep-all | break-all","word-spacing":"<length> | normal | inherit","word-wrap":1,"z-index":"<integer> | auto | inherit",zoom:"<number> | <percentage> | normal"};PropertyName.prototype=new SyntaxUnit,PropertyName.prototype.constructor=PropertyName,PropertyName.prototype.toString=function(){return(this.hack?this.hack:"")+this.text},PropertyValue.prototype=new SyntaxUnit,PropertyValue.prototype.constructor=PropertyValue,PropertyValueIterator.prototype.count=function(){return this._parts.length},PropertyValueIterator.prototype.isFirst=function(){return 0===this._i},PropertyValueIterator.prototype.hasNext=function(){return this._i<this._parts.length},PropertyValueIterator.prototype.mark=function(){this._marks.push(this._i)},PropertyValueIterator.prototype.peek=function(e){return this.hasNext()?this._parts[this._i+(e||0)]:null},PropertyValueIterator.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null},PropertyValueIterator.prototype.previous=function(){return 0<this._i?this._parts[--this._i]:null},PropertyValueIterator.prototype.restore=function(){this._marks.length&&(this._i=this._marks.pop())},PropertyValuePart.prototype=new SyntaxUnit,PropertyValuePart.prototype.constructor=PropertyValuePart,PropertyValuePart.fromToken=function(e){return new PropertyValuePart(e.value,e.startLine,e.startCol)};var Pseudos={":first-letter":1,":first-line":1,":before":1,":after":1,ELEMENT:1,CLASS:2,isElement:function(e){return 0===e.indexOf("::")||Pseudos[e.toLowerCase()]==Pseudos.ELEMENT}};Selector.prototype=new SyntaxUnit,Selector.prototype.constructor=Selector,SelectorPart.prototype=new SyntaxUnit,SelectorPart.prototype.constructor=SelectorPart,SelectorSubPart.prototype=new SyntaxUnit,SelectorSubPart.prototype.constructor=SelectorSubPart,Specificity.prototype={constructor:Specificity,compare:function(e){var t,n,r=["a","b","c","d"];for(t=0,n=r.length;t<n;t++){if(this[r[t]]<e[r[t]])return-1;if(this[r[t]]>e[r[t]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},Specificity.calculate=function(e){function s(e){var t,n,r,i,o,a=e.elementName?e.elementName.text:"";for(a&&"*"!=a.charAt(a.length-1)&&c++,t=0,r=e.modifiers.length;t<r;t++)switch((o=e.modifiers[t]).type){case"class":case"attribute":u++;break;case"id":l++;break;case"pseudo":Pseudos.isElement(o.text)?c++:u++;break;case"not":for(n=0,i=o.args.length;n<i;n++)s(o.args[n])}}var t,n,r,l=0,u=0,c=0;for(t=0,n=e.parts.length;t<n;t++)(r=e.parts[t])instanceof SelectorPart&&s(r);return new Specificity(0,l,u,c)};var h=/^[0-9a-fA-F]$/,nonascii=/^[\u0080-\uFFFF]$/,nl=/\n|\r\n|\r|\f/;TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(e){var t,n=this._reader,r=null,i=n.getLine(),o=n.getCol();for(t=n.read();t;){switch(t){case"/":r="*"==n.peek()?this.commentToken(t,i,o):this.charToken(t,i,o);break;case"|":case"~":case"^":case"$":case"*":r="="==n.peek()?this.comparisonToken(t,i,o):this.charToken(t,i,o);break;case'"':case"'":r=this.stringToken(t,i,o);break;case"#":r=isNameChar(n.peek())?this.hashToken(t,i,o):this.charToken(t,i,o);break;case".":r=isDigit(n.peek())?this.numberToken(t,i,o):this.charToken(t,i,o);break;case"-":r="-"==n.peek()?this.htmlCommentEndToken(t,i,o):isNameStart(n.peek())?this.identOrFunctionToken(t,i,o):this.charToken(t,i,o);break;case"!":r=this.importantToken(t,i,o);break;case"@":r=this.atRuleToken(t,i,o);break;case":":r=this.notToken(t,i,o);break;case"<":r=this.htmlCommentStartToken(t,i,o);break;case"U":case"u":if("+"==n.peek()){r=this.unicodeRangeToken(t,i,o);break}default:r=isDigit(t)?this.numberToken(t,i,o):isWhitespace(t)?this.whitespaceToken(t,i,o):isIdentStart(t)?this.identOrFunctionToken(t,i,o):this.charToken(t,i,o)}break}return r||null!==t||(r=this.createToken(Tokens.EOF,null,i,o)),r},createToken:function(e,t,n,r,i){var o=this._reader;return{value:t,type:e,channel:(i=i||{}).channel,hide:i.hide||!1,startLine:n,startCol:r,endLine:o.getLine(),endCol:o.getCol()}},atRuleToken:function(e,t,n){var r=e,i=this._reader,o=Tokens.CHAR;return i.mark(),r=e+this.readName(),(o=Tokens.type(r.toLowerCase()))!=Tokens.CHAR&&o!=Tokens.UNKNOWN||(1<r.length?o=Tokens.UNKNOWN_SYM:(o=Tokens.CHAR,r=e,i.reset())),this.createToken(o,r,t,n)},charToken:function(e,t,n){var r=Tokens.type(e);return-1==r&&(r=Tokens.CHAR),this.createToken(r,e,t,n)},commentToken:function(e,t,n){this._reader;var r=this.readComment(e);return this.createToken(Tokens.COMMENT,r,t,n)},comparisonToken:function(e,t,n){var r=e+this._reader.read(),i=Tokens.type(r)||Tokens.CHAR;return this.createToken(i,r,t,n)},hashToken:function(e,t,n){this._reader;var r=this.readName(e);return this.createToken(Tokens.HASH,r,t,n)},htmlCommentStartToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),"\x3c!--"==(i+=r.readCount(3))?this.createToken(Tokens.CDO,i,t,n):(r.reset(),this.charToken(e,t,n))},htmlCommentEndToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),"--\x3e"==(i+=r.readCount(2))?this.createToken(Tokens.CDC,i,t,n):(r.reset(),this.charToken(e,t,n))},identOrFunctionToken:function(e,t,n){var r=this._reader,i=this.readName(e),o=Tokens.IDENT;return"("==r.peek()?"url("==(i+=r.read()).toLowerCase()?(o=Tokens.URI,"url("==(i=this.readURI(i)).toLowerCase()&&(o=Tokens.FUNCTION)):o=Tokens.FUNCTION:":"==r.peek()&&"progid"==i.toLowerCase()&&(i+=r.readTo("("),o=Tokens.IE_FUNCTION),this.createToken(o,i,t,n)},importantToken:function(e,t,n){var r,i,o=this._reader,a=e,s=Tokens.CHAR;for(o.mark(),i=o.read();i;){if("/"==i){if("*"!=o.peek())break;if(""===(r=this.readComment(i)))break}else{if(!isWhitespace(i)){if(/i/i.test(i)){r=o.readCount(8),/mportant/i.test(r)&&(a+=i+r,s=Tokens.IMPORTANT_SYM);break}break}a+=i+this.readWhitespace()}i=o.read()}return s==Tokens.CHAR?(o.reset(),this.charToken(e,t,n)):this.createToken(s,a,t,n)},notToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),":not("==(i+=r.readCount(4)).toLowerCase()?this.createToken(Tokens.NOT,i,t,n):(r.reset(),this.charToken(e,t,n))},numberToken:function(e,t,n){var r,i=this._reader,o=this.readNumber(e),a=Tokens.NUMBER,s=i.peek();return isIdentStart(s)?(o+=r=this.readName(i.read()),a=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(r)?Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(r)?Tokens.ANGLE:/^ms$|^s$/i.test(r)?Tokens.TIME:/^hz$|^khz$/i.test(r)?Tokens.FREQ:/^dpi$|^dpcm$/i.test(r)?Tokens.RESOLUTION:Tokens.DIMENSION):"%"==s&&(o+=i.read(),a=Tokens.PERCENTAGE),this.createToken(a,o,t,n)},stringToken:function(e,t,n){for(var r=e,i=e,o=this._reader,a=e,s=Tokens.STRING,l=o.read();l&&(i+=l,l!=r||"\\"==a);){if(isNewLine(o.peek())&&"\\"!=l){s=Tokens.INVALID;break}a=l,l=o.read()}return null===l&&(s=Tokens.INVALID),this.createToken(s,i,t,n)},unicodeRangeToken:function(e,t,n){var r,i=this._reader,o=e,a=Tokens.CHAR;return"+"==i.peek()&&(i.mark(),o+=i.read(),2==(o+=this.readUnicodeRangePart(!0)).length?i.reset():(a=Tokens.UNICODE_RANGE,-1==o.indexOf("?")&&"-"==i.peek()&&(i.mark(),r=i.read(),1==(r+=this.readUnicodeRangePart(!1)).length?i.reset():o+=r))),this.createToken(a,o,t,n)},whitespaceToken:function(e,t,n){this._reader;var r=e+this.readWhitespace();return this.createToken(Tokens.S,r,t,n)},readUnicodeRangePart:function(e){for(var t=this._reader,n="",r=t.peek();isHexDigit(r)&&n.length<6;)t.read(),n+=r,r=t.peek();if(e)for(;"?"==r&&n.length<6;)t.read(),n+=r,r=t.peek();return n},readWhitespace:function(){for(var e=this._reader,t="",n=e.peek();isWhitespace(n);)e.read(),t+=n,n=e.peek();return t},readNumber:function(e){for(var t=this._reader,n=e,r="."==e,i=t.peek();i;){if(isDigit(i))n+=t.read();else{if("."!=i)break;if(r)break;r=!0,n+=t.read()}i=t.peek()}return n},readString:function(){for(var e=this._reader,t=e.read(),n=t,r=t,i=e.peek();i&&(n+=i=e.read(),i!=t||"\\"==r);){if(isNewLine(e.peek())&&"\\"!=i){n="";break}r=i,i=e.peek()}return null===i&&(n=""),n},readURI:function(e){var t,n=this._reader,r=e,i=n.peek();for(n.mark();i&&isWhitespace(i);)n.read(),i=n.peek();for(t="'"==i||'"'==i?this.readString():this.readURL(),i=n.peek();i&&isWhitespace(i);)n.read(),i=n.peek();return""===t||")"!=i?(r=e,n.reset()):r+=t+n.read(),r},readURL:function(){for(var e=this._reader,t="",n=e.peek();/^[!#$%&\\*-~]$/.test(n);)t+=e.read(),n=e.peek();return t},readName:function(e){for(var t=this._reader,n=e||"",r=t.peek();;)if("\\"==r)n+=this.readEscape(t.read()),r=t.peek();else{if(!r||!isNameChar(r))break;n+=t.read(),r=t.peek()}return n},readEscape:function(e){var t=this._reader,n=e||"",r=0,i=t.peek();if(isHexDigit(i))for(;n+=t.read(),(i=t.peek())&&isHexDigit(i)&&++r<6;);return 3==n.length&&/\s/.test(i)||7==n.length||1==n.length?t.read():i="",n+i},readComment:function(e){var t=this._reader,n=e||"",r=t.read();if("*"==r){for(;r;){if(2<(n+=r).length&&"*"==r&&"/"==t.peek()){n+=t.read();break}r=t.read()}return n}return""}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"VIEWPORT_SYM",text:"@viewport"},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];!function(){var t=[],n={};Tokens.UNKNOWN=-1,Tokens.unshift({name:"EOF"});for(var e=0,r=Tokens.length;e<r;e++)if(t.push(Tokens[e].name),Tokens[Tokens[e].name]=e,Tokens[e].text)if(Tokens[e].text instanceof Array)for(var i=0;i<Tokens[e].text.length;i++)n[Tokens[e].text[i]]=e;else n[Tokens[e].text]=e;Tokens.name=function(e){return t[e]},Tokens.type=function(e){return n[e]||-1}}();var Validation={validate:function(e,t){var n=e.toString().toLowerCase(),r=(t.parts,new PropertyValueIterator(t)),i=Properties[n];if(i)"number"!=typeof i&&("string"==typeof i?-1<i.indexOf("||")?this.groupProperty(i,r):this.singleProperty(i,r,1):i.multi?this.multiProperty(i.multi,r,i.comma,i.max||1/0):"function"==typeof i&&i(r));else if(0!==n.indexOf("-"))throw new ValidationError("Unknown property '"+e+"'.",e.line,e.col)},singleProperty:function(e,t,n,r){for(var i,o=!1,a=t.value,s=0;t.hasNext()&&s<n&&(o=ValidationTypes.isAny(t,e));)s++;if(!o)throw t.hasNext()&&!t.isFirst()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col);if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)},multiProperty:function(e,t,n,r){for(var i,o=!1,a=t.value,s=0;t.hasNext()&&!o&&s<r&&ValidationTypes.isAny(t,e);)if(s++,t.hasNext()){if(n){if(","!=t.peek())break;i=t.next()}}else o=!0;if(!o)throw t.hasNext()&&!t.isFirst()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):(i=t.previous(),n&&","==i?new ValidationError("Expected end of value but found '"+i+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col));if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)},groupProperty:function(e,t,n){for(var r,i,o=!1,a=t.value,s=e.split("||").length,l={count:0},u=!1;t.hasNext()&&!o&&(r=ValidationTypes.isAnyOfGroup(t,e))&&!l[r];)l[r]=1,l.count++,u=!0,l.count!=s&&t.hasNext()||(o=!0);if(!o)throw u&&t.hasNext()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col);if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)}};ValidationError.prototype=new Error;var ValidationTypes={isLiteral:function(e,t){var n,r,i=e.text.toString().toLowerCase(),o=t.split(" | "),a=!1;for(n=0,r=o.length;n<r&&!a;n++)i==o[n].toLowerCase()&&(a=!0);return a},isSimple:function(e){return!!this.simple[e]},isComplex:function(e){return!!this.complex[e]},isAny:function(e,t){var n,r,i=t.split(" | "),o=!1;for(n=0,r=i.length;n<r&&!o&&e.hasNext();n++)o=this.isType(e,i[n]);return o},isAnyOfGroup:function(e,t){var n,r,i=t.split(" || "),o=!1;for(n=0,r=i.length;n<r&&!o;n++)o=this.isType(e,i[n]);return!!o&&i[n-1]},isType:function(e,t){var n=e.peek(),r=!1;return"<"!=t.charAt(0)?(r=this.isLiteral(n,t))&&e.next():this.simple[t]?(r=this.simple[t](n))&&e.next():r=this.complex[t](e),r},simple:{"<absolute-size>":function(e){return ValidationTypes.isLiteral(e,"xx-small | x-small | small | medium | large | x-large | xx-large")},"<attachment>":function(e){return ValidationTypes.isLiteral(e,"scroll | fixed | local")},"<attr>":function(e){return"function"==e.type&&"attr"==e.name},"<bg-image>":function(e){return this["<image>"](e)||this["<gradient>"](e)||"none"==e},"<gradient>":function(e){return"function"==e.type&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)},"<box>":function(e){return ValidationTypes.isLiteral(e,"padding-box | border-box | content-box")},"<content>":function(e){return"function"==e.type&&"content"==e.name},"<relative-size>":function(e){return ValidationTypes.isLiteral(e,"smaller | larger")},"<ident>":function(e){return"identifier"==e.type},"<length>":function(e){return!("function"!=e.type||!/^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(e))||"length"==e.type||"number"==e.type||"integer"==e.type||"0"==e},"<color>":function(e){return"color"==e.type||"transparent"==e},"<number>":function(e){return"number"==e.type||this["<integer>"](e)},"<integer>":function(e){return"integer"==e.type},"<line>":function(e){return"integer"==e.type},"<angle>":function(e){return"angle"==e.type},"<uri>":function(e){return"uri"==e.type},"<image>":function(e){return this["<uri>"](e)},"<percentage>":function(e){return"percentage"==e.type||"0"==e},"<border-width>":function(e){return this["<length>"](e)||ValidationTypes.isLiteral(e,"thin | medium | thick")},"<border-style>":function(e){return ValidationTypes.isLiteral(e,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"<margin-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)||ValidationTypes.isLiteral(e,"auto")},"<padding-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)},"<shape>":function(e){return"function"==e.type&&("rect"==e.name||"inset-rect"==e.name)},"<time>":function(e){return"time"==e.type}},complex:{"<bg-position>":function(e){for(var t=!1,n="<percentage> | <length>",r="left | right",i="top | bottom",o=0;e.peek(o)&&","!=e.peek(o);)o++;return o<3?ValidationTypes.isAny(e,r+" | center | "+n)?(t=!0,ValidationTypes.isAny(e,i+" | center | "+n)):ValidationTypes.isAny(e,i)&&(t=!0,ValidationTypes.isAny(e,r+" | center")):ValidationTypes.isAny(e,r)?ValidationTypes.isAny(e,i)?(t=!0,ValidationTypes.isAny(e,n)):ValidationTypes.isAny(e,n)&&(ValidationTypes.isAny(e,i)?(t=!0,ValidationTypes.isAny(e,n)):ValidationTypes.isAny(e,"center")&&(t=!0)):ValidationTypes.isAny(e,i)?ValidationTypes.isAny(e,r)?(t=!0,ValidationTypes.isAny(e,n)):ValidationTypes.isAny(e,n)&&(ValidationTypes.isAny(e,r)?(t=!0,ValidationTypes.isAny(e,n)):ValidationTypes.isAny(e,"center")&&(t=!0)):ValidationTypes.isAny(e,"center")&&ValidationTypes.isAny(e,r+" | "+i)&&(t=!0,ValidationTypes.isAny(e,n)),t},"<bg-size>":function(e){var t=!1,n="<percentage> | <length> | auto";return ValidationTypes.isAny(e,"cover | contain")?t=!0:ValidationTypes.isAny(e,n)&&(t=!0,ValidationTypes.isAny(e,n)),t},"<repeat-style>":function(e){var t,n=!1,r="repeat | space | round | no-repeat";return e.hasNext()&&(t=e.next(),ValidationTypes.isLiteral(t,"repeat-x | repeat-y")?n=!0:ValidationTypes.isLiteral(t,r)&&(n=!0,e.hasNext()&&ValidationTypes.isLiteral(e.peek(),r)&&e.next())),n},"<shadow>":function(e){var t=!1,n=0,r=!1,i=!1;if(e.hasNext()){for(ValidationTypes.isAny(e,"inset")&&(r=!0),ValidationTypes.isAny(e,"<color>")&&(i=!0);ValidationTypes.isAny(e,"<length>")&&n<4;)n++;e.hasNext()&&(i||ValidationTypes.isAny(e,"<color>"),r||ValidationTypes.isAny(e,"inset")),t=2<=n&&n<=4}return t},"<x-one-radius>":function(e){var t=!1,n="<length> | <percentage> | inherit";return ValidationTypes.isAny(e,n)&&(t=!0,ValidationTypes.isAny(e,n)),t}}};parserlib.css={Colors:Colors,Combinator:Combinator,Parser:Parser,PropertyName:PropertyName,PropertyValue:PropertyValue,PropertyValuePart:PropertyValuePart,MediaFeature:MediaFeature,MediaQuery:MediaQuery,Selector:Selector,SelectorPart:SelectorPart,SelectorSubPart:SelectorSubPart,Specificity:Specificity,TokenStream:TokenStream,Tokens:Tokens,ValidationError:ValidationError}}(),function(){for(var e in parserlib)exports[e]=parserlib[e]}();var CSSLint=(EZa=[],FZa=[],GZa=/\/\*csslint([^\*]*)\*\//,HZa=new parserlib.util.EventTarget,HZa.version="0.10.0",HZa.addRule=function(e){EZa.push(e),EZa[e.id]=e},HZa.clearRules=function(){EZa=[]},HZa.getRules=function(){return[].concat(EZa).sort(function(e,t){return e.id>t.id?1:0})},HZa.getRuleset=function(){for(var e={},t=0,n=EZa.length;t<n;)e[EZa[t++].id]=1;return e},HZa.addFormatter=function(e){FZa[e.id]=e},HZa.getFormatter=function(e){return FZa[e]},HZa.format=function(e,t,n,r){var i=this.getFormatter(n),o=null;return i&&(o=i.startFormat(),o+=i.formatResults(e,t,r||{}),o+=i.endFormat()),o},HZa.hasFormat=function(e){return FZa.hasOwnProperty(e)},HZa.verify=function(e,t){var n,r,i,o,a,s,l,u,c=0,d=(EZa.length,new parserlib.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1}));for(c in r=e.replace(/\n\r?/g,"$split$").split("$split$"),t||(t=this.getRuleset()),GZa.test(e)&&(a=t,l=(o=e)&&o.match(GZa),(u=l&&l[1])&&(s={true:2,"":1,false:0,2:2,1:1,0:0},u.toLowerCase().split(",").forEach(function(e){var t=e.split(":"),n=t[0]||"",r=t[1]||"";a[n.trim()]=s[r.trim()]})),t=a),n=new Reporter(r,t),t.errors=2,t)t.hasOwnProperty(c)&&t[c]&&EZa[c]&&EZa[c].init(d,n);try{d.parse(e)}catch(e){n.error("Fatal error, cannot continue: "+e.message,e.line,e.col,{})}return(i={messages:n.messages,stats:n.stats,ruleset:n.ruleset}).messages.sort(function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line}),i},HZa),EZa,FZa,GZa,HZa,U4a;return Reporter.prototype={constructor:Reporter,error:function(e,t,n,r){this.messages.push({type:"error",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r||{}})},warn:function(e,t,n,r){this.report(e,t,n,r)},report:function(e,t,n,r){this.messages.push({type:2==this.ruleset[r.id]?"error":"warning",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r})},info:function(e,t,n,r){this.messages.push({type:"info",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r})},rollupError:function(e,t){this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){this.stats[e]=t}},CSSLint._Reporter=Reporter,CSSLint.Util={mix:function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return n},indexOf:function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t){if(e.forEach)return e.forEach(t);for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)}},CSSLint.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(l,u){var c=this;l.addListener("startrule",function(e){var t,n,r,i,o,a,s=e.selectors;for(i=0;i<s.length;i++)for(t=s[i],o=0;o<t.parts.length;o++)if((n=t.parts[o]).type==l.SELECTOR_PART_TYPE)for(a=r=0;a<n.modifiers.length;a++)"class"==n.modifiers[a].type&&r++,1<r&&u.report("Don't use adjoining classes.",n.line,n.col,c)})}}),CSSLint.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",browsers:"All",init:function(e,n){function t(){l=!(i={})}function r(){var e,t;if(!l){if(i.height)for(e in s)s.hasOwnProperty(e)&&i[e]&&(t=i[e].value,"padding"==e&&2===t.parts.length&&0===t.parts[0].value||n.report("Using height with "+e+" can sometimes make elements larger than you expect.",i[e].line,i[e].col,o));if(i.width)for(e in a)a.hasOwnProperty(e)&&i[e]&&(t=i[e].value,"padding"==e&&2===t.parts.length&&0===t.parts[1].value||n.report("Using width with "+e+" can sometimes make elements larger than you expect.",i[e].line,i[e].col,o))}}var i,o=this,a={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},s={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},l=!1;e.addListener("startrule",t),e.addListener("startfontface",t),e.addListener("startpage",t),e.addListener("startpagemargin",t),e.addListener("startkeyframerule",t),e.addListener("property",function(e){var t=e.property.text.toLowerCase();s[t]||a[t]?/^0\S*$/.test(e.value)||"border"==t&&"none"==e.value||(i[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?i[t]=1:"box-sizing"==t&&(l=!0)}),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r)}}),CSSLint.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(e,t){var n=this;e.addListener("property",function(e){"box-sizing"==e.property.text.toLowerCase()&&t.report("The box-sizing property isn't supported in IE6 and IE7.",e.line,e.col,n)})}}),CSSLint.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",browsers:"All",init:function(e,t){var i,o,n=this,a=!1,s=!0,l=!1;e.addListener("startfontface",function(e){a=!0}),e.addListener("property",function(e){if(a){var t=e.property.toString().toLowerCase(),n=e.value.toString();if(i=e.line,o=e.col,"src"===t){var r=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!n.match(r)&&s?s=!(l=!0):n.match(r)&&!s&&(l=!1)}}}),e.addListener("endfontface",function(e){a=!1,l&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",i,o,n)})}}),CSSLint.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(e,h){var f,p,t,n,r,i,o,m=this,a=!1,s=Array.prototype.push,l=[];for(t in f={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"})if(f.hasOwnProperty(t)){for(n=[],i=0,o=(r=f[t].split(" ")).length;i<o;i++)n.push("-"+r[i]+"-"+t);f[t]=n,s.apply(l,n)}e.addListener("startrule",function(){p=[]}),e.addListener("startkeyframes",function(e){a=e.prefix||!0}),e.addListener("endkeyframes",function(e){a=!1}),e.addListener("property",function(e){var t=e.property;-1<CSSLint.Util.indexOf(l,t.text)&&(a&&"string"==typeof a&&0===t.text.indexOf("-"+a+"-")||p.push(t))}),e.addListener("endrule",function(e){if(p.length){var t,n,r,i,o,a,s,l,u,c,d={};for(t=0,n=p.length;t<n;t++)for(i in r=p[t],f)f.hasOwnProperty(i)&&(o=f[i],-1<CSSLint.Util.indexOf(o,r.text)&&(d[i]||(d[i]={full:o.slice(0),actual:[],actualNodes:[]}),-1===CSSLint.Util.indexOf(d[i].actual,r.text)&&(d[i].actual.push(r.text),d[i].actualNodes.push(r))));for(i in d)if(d.hasOwnProperty(i)&&(s=(a=d[i]).full,l=a.actual,s.length>l.length))for(t=0,n=s.length;t<n;t++)u=s[t],-1===CSSLint.Util.indexOf(l,u)&&(c=1===l.length?l[0]:2==l.length?l.join(" and "):l.join(", "),h.report("The property "+u+" is compatible with "+c+" and should be included as well.",a.actualNodes[0].line,a.actualNodes[0].col,m))}})}}),CSSLint.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",browsers:"All",init:function(e,r){function t(e,t,n){o[e]&&("string"==typeof s[e]&&o[e].value.toLowerCase()==s[e]||r.report(n||e+" can't be used with display: "+t+".",o[e].line,o[e].col,a))}function n(){o={}}function i(){var e=o.display?o.display.value:null;if(e)switch(e){case"inline":t("height",e),t("width",e),t("margin",e),t("margin-top",e),t("margin-bottom",e),t("float",e,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":t("vertical-align",e);break;case"inline-block":t("float",e);break;default:0===e.indexOf("table-")&&(t("margin",e),t("margin-left",e),t("margin-right",e),t("margin-top",e),t("margin-bottom",e),t("float",e))}}var o,a=this,s={display:1,float:"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1};e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startkeyframerule",n),e.addListener("startpagemargin",n),e.addListener("startpage",n),e.addListener("property",function(e){var t=e.property.text.toLowerCase();s[t]&&(o[t]={value:e.value.text,line:e.property.line,col:e.property.col})}),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endkeyframerule",i),e.addListener("endpagemargin",i),e.addListener("endpage",i)}}),CSSLint.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",browsers:"All",init:function(e,o){var a=this,s={};e.addListener("property",function(e){var t,n,r=e.property.text,i=e.value;if(r.match(/background/i))for(t=0,n=i.parts.length;t<n;t++)"uri"==i.parts[t].type&&(void 0===s[i.parts[t].uri]?s[i.parts[t].uri]=e:o.report("Background image '"+i.parts[t].uri+"' was used multiple times, first declared at line "+s[i.parts[t].uri].line+", col "+s[i.parts[t].uri].col+".",e.line,e.col,a))})}}),CSSLint.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(e,n){function t(e){r={}}var r,i,o=this;e.addListener("startrule",t),e.addListener("startfontface",t),e.addListener("startpage",t),e.addListener("startpagemargin",t),e.addListener("startkeyframerule",t),e.addListener("property",function(e){var t=e.property.text.toLowerCase();!r[t]||i==t&&r[t]!=e.value.text||n.report("Duplicate property '"+e.property+"' found.",e.line,e.col,o),r[t]=e.value.text,i=t})}}),CSSLint.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(e,n){var r=this,i=0;e.addListener("startrule",function(){i=0}),e.addListener("property",function(){i++}),e.addListener("endrule",function(e){var t=e.selectors;0===i&&n.report("Rule is empty.",t[0].line,t[0].col,r)})}}),CSSLint.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(e,t){var n=this;e.addListener("error",function(e){t.error(e.message,e.line,e.col,n)})}}),CSSLint.addRule({id:"fallback-colors",name:"Require fallback colors",desc:"For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",browsers:"IE6,IE7,IE8",init:function(e,a){function t(e){({}),s=null}var s,l=this,u={color:1,background:1,"border-color":1,"border-top-color":1,"border-right-color":1,"border-bottom-color":1,"border-left-color":1,border:1,"border-top":1,"border-right":1,"border-bottom":1,"border-left":1,"background-color":1};e.addListener("startrule",t),e.addListener("startfontface",t),e.addListener("startpage",t),e.addListener("startpagemargin",t),e.addListener("startkeyframerule",t),e.addListener("property",function(e){var t=e.property.text.toLowerCase(),n=e.value.parts,r=0,i="",o=n.length;if(u[t])for(;r<o;)"color"==n[r].type&&("alpha"in n[r]||"hue"in n[r]?(/([^\)]+)\(/.test(n[r])&&(i=RegExp.$1.toUpperCase()),s&&s.property.text.toLowerCase()==t&&"compat"==s.colorType||a.report("Fallback "+t+" (hex or RGB) should precede "+i+" "+t+".",e.line,e.col,l)):e.colorType="compat"),r++;s=e})}}),CSSLint.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){"float"==e.property.text.toLowerCase()&&"none"!=e.value.text.toLowerCase()&&r++}),e.addListener("endstylesheet",function(){t.stat("floats",r),10<=r&&t.rollupWarn("Too many floats ("+r+"), you're probably using them for layout. Consider using a grid system instead.",n)})}}),CSSLint.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("startfontface",function(){r++}),e.addListener("endstylesheet",function(){5<r&&t.rollupWarn("Too many @font-face declarations ("+r+").",n)})}}),CSSLint.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){"font-size"==e.property&&r++}),e.addListener("endstylesheet",function(){t.stat("font-sizes",r),10<=r&&t.rollupWarn("Too many font-size declarations ("+r+"), abstraction needed.",n)})}}),CSSLint.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(e,n){var r,i=this;e.addListener("startrule",function(){r={moz:0,webkit:0,oldWebkit:0,o:0}}),e.addListener("property",function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?r[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(r.oldWebkit=1)}),e.addListener("endrule",function(e){var t=[];r.moz||t.push("Firefox 3.6+"),r.webkit||t.push("Webkit (Safari 5+, Chrome)"),r.oldWebkit||t.push("Old Webkit (Safari 4+, Chrome)"),r.o||t.push("Opera 11.1+"),t.length&&t.length<4&&n.report("Missing vendor-prefixed CSS gradients for "+t.join(", ")+".",e.selectors[0].line,e.selectors[0].col,i)})}}),CSSLint.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(l,u){var c=this;l.addListener("startrule",function(e){var t,n,r,i,o,a,s=e.selectors;for(i=0;i<s.length;i++){for(t=s[i],o=r=0;o<t.parts.length;o++)if((n=t.parts[o]).type==l.SELECTOR_PART_TYPE)for(a=0;a<n.modifiers.length;a++)"id"==n.modifiers[a].type&&r++;1==r?u.report("Don't use IDs in selectors.",t.line,t.col,c):1<r&&u.report(r+" IDs in the selector, really?",t.line,t.col,c)}})}}),CSSLint.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(e,t){var n=this;e.addListener("import",function(e){t.report("@import prevents parallel downloads, use <link> instead.",e.line,e.col,n)})}}),CSSLint.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){!0===e.important&&(r++,t.report("Use of !important",e.line,e.col,n))}),e.addListener("endstylesheet",function(){t.stat("important",r),10<=r&&t.rollupWarn("Too many !important declarations ("+r+"), try to use less than 10 to avoid specificity issues.",n)})}}),CSSLint.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){e.property.text.toLowerCase(),e.invalid&&t.report(e.invalid.message,e.line,e.col,n)})}}),CSSLint.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(e,t){function n(e){i=e.selectors?{line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:null}function r(e){i&&i.outline&&(-1==i.selectors.toString().toLowerCase().indexOf(":focus")?t.report("Outlines should only be modified using :focus.",i.line,i.col,o):1==i.propCount&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",i.line,i.col,o))}var i,o=this;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var t=e.property.text.toLowerCase(),n=e.value;i&&(i.propCount++,"outline"!=t||"none"!=n&&"0"!=n||(i.outline=!0))}),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r)}}),CSSLint.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(l,u){var c=this,d={};l.addListener("startrule",function(e){var t,n,r,i,o,a,s=e.selectors;for(i=0;i<s.length;i++)for(t=s[i],o=0;o<t.parts.length;o++)if((n=t.parts[o]).type==l.SELECTOR_PART_TYPE)for(a=0;a<n.modifiers.length;a++)r=n.modifiers[a],n.elementName&&"id"==r.type?u.report("Element ("+n+") is overqualified, just use "+r+" without element name.",n.line,n.col,c):"class"==r.type&&(d[r]||(d[r]=[]),d[r].push({modifier:r,part:n}))}),l.addListener("endstylesheet",function(){var e;for(e in d)d.hasOwnProperty(e)&&1==d[e].length&&d[e][0].part.elementName&&u.report("Element ("+d[e][0].part+") is overqualified, just use "+d[e][0].modifier+" without element name.",d[e][0].part.line,d[e][0].part.col,c)})}}),CSSLint.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(a,s){var l=this;a.addListener("startrule",function(e){var t,n,r,i,o=e.selectors;for(r=0;r<o.length;r++)for(t=o[r],i=0;i<t.parts.length;i++)(n=t.parts[i]).type==a.SELECTOR_PART_TYPE&&n.elementName&&/h[1-6]/.test(n.elementName.toString())&&0<i&&s.report("Heading ("+n.elementName+") should not be qualified.",n.line,n.col,l)})}}),CSSLint.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(l,u){var c=this;l.addListener("startrule",function(e){var t,n,r,i,o,a,s=e.selectors;for(i=0;i<s.length;i++)for(t=s[i],o=0;o<t.parts.length;o++)if((n=t.parts[o]).type==l.SELECTOR_PART_TYPE)for(a=0;a<n.modifiers.length;a++)"attribute"==(r=n.modifiers[a]).type&&/([\~\|\^\$\*]=)/.test(r)&&u.report("Attribute selectors with "+RegExp.$1+" are slow!",r.line,r.col,c)})}}),CSSLint.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(e,t){var n=0;e.addListener("startrule",function(){n++}),e.addListener("endstylesheet",function(){t.stat("rule-count",n)})}}),CSSLint.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(e){r+=e.selectors.length}),e.addListener("endstylesheet",function(){3800<=r&&t.report("You have "+r+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)})}}),CSSLint.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(e){r+=e.selectors.length}),e.addListener("endstylesheet",function(){4095<r&&t.report("You have "+r+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)})}}),CSSLint.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(e,o){function t(e){s={}}function n(e){var t,n,r,i;for(t in c)if(c.hasOwnProperty(t)){for(n=i=0,r=c[t].length;n<r;n++)i+=s[c[t][n]]?1:0;i==c[t].length&&o.report("The properties "+c[t].join(", ")+" can be replaced by "+t+".",e.line,e.col,l)}}var r,i,a,s,l=this,u={},c={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(r in c)if(c.hasOwnProperty(r))for(i=0,a=c[r].length;i<a;i++)u[c[r][i]]=r;e.addListener("startrule",t),e.addListener("startfontface",t),e.addListener("property",function(e){var t=e.property.toString().toLowerCase();e.value.parts[0].value,u[t]&&(s[t]=1)}),e.addListener("endrule",n),e.addListener("endfontface",n)}}),CSSLint.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){"*"==e.property.hack&&t.report("Property with star prefix found.",e.property.line,e.property.col,n)})}}),CSSLint.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(e,t){function n(e){i=!1,o="inherit"}function r(e){i&&"ltr"!=o&&t.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",i.line,i.col,a)}var i,o,a=this;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("property",function(e){var t=e.property.toString().toLowerCase(),n=e.value;"text-indent"==t&&n.parts[0].value<-99?i=e.property:"direction"==t&&"ltr"==n&&(o="ltr")}),e.addListener("endrule",r),e.addListener("endfontface",r)}}),CSSLint.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){"_"==e.property.hack&&t.report("Property with underscore prefix found.",e.property.line,e.property.col,n)})}}),CSSLint.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(e,s){var l=this,u={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};e.addListener("startrule",function(e){var t,n,r,i,o,a=e.selectors;for(i=0;i<a.length;i++)if((n=(t=a[i]).parts[t.parts.length-1]).elementName&&/(h[1-6])/i.test(n.elementName.toString())){for(o=0;o<n.modifiers.length;o++)if("pseudo"==n.modifiers[o].type){r=!0;break}r||(u[RegExp.$1]++,1<u[RegExp.$1]&&s.report("Heading ("+n.elementName+") has already been defined.",n.line,n.col,l))}}),e.addListener("endstylesheet",function(e){var t,n=[];for(t in u)u.hasOwnProperty(t)&&1<u[t]&&n.push(u[t]+" "+t+"s");n.length&&s.rollupWarn("You have "+n.join(", ")+" defined in this stylesheet.",l)})}}),CSSLint.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(e,o){var a=this;e.addListener("startrule",function(e){var t,n,r,i=e.selectors;for(r=0;r<i.length;r++)"*"==(n=(t=i[r]).parts[t.parts.length-1]).elementName&&o.report(a.desc,n.line,n.col,a)})}}),CSSLint.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",browsers:"All",init:function(a,s){var l=this;a.addListener("startrule",function(e){var t,n,r,i,o=e.selectors;for(r=0;r<o.length;r++)if((n=(t=o[r]).parts[t.parts.length-1]).type==a.SELECTOR_PART_TYPE)for(i=0;i<n.modifiers.length;i++)"attribute"!=n.modifiers[i].type||n.elementName&&"*"!=n.elementName||s.report(l.desc,n.line,n.col,l)})}}),CSSLint.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",browsers:"All",init:function(e,s){function t(){l={},r=1}function n(e){var t,n,r,i,o,a=[];for(t in l)c[t]&&a.push({actual:t,needed:c[t]});for(n=0,r=a.length;n<r;n++)i=a[n].needed,o=a[n].actual,l[i]?l[i][0].pos<l[o][0].pos&&s.report("Standard property '"+i+"' should come after vendor-prefixed property '"+o+"'.",l[o][0].name.line,l[o][0].name.col,u):s.report("Missing standard property '"+i+"' to go along with '"+o+"'.",l[o][0].name.line,l[o][0].name.col,u)}var l,r,u=this,c={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing","-moz-user-select":"user-select","-khtml-user-select":"user-select","-webkit-user-select":"user-select"};e.addListener("startrule",t),e.addListener("startfontface",t),e.addListener("startpage",t),e.addListener("startpagemargin",t),e.addListener("startkeyframerule",t),e.addListener("property",function(e){var t=e.property.text.toLowerCase();l[t]||(l[t]=[]),l[t].push({name:e.property,value:e.value,pos:r++})}),e.addListener("endrule",n),e.addListener("endfontface",n),e.addListener("endpage",n),e.addListener("endpagemargin",n),e.addListener("endkeyframerule",n)}}),CSSLint.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",browsers:"All",init:function(e,i){var o=this;e.addListener("property",function(e){for(var t=e.value.parts,n=0,r=t.length;n<r;)!t[n].units&&"percentage"!=t[n].type||0!==t[n].value||"time"==t[n].type||i.report("Values of 0 shouldn't have units specified.",t[n].line,t[n].col,o),n++})}}),U4a=function(e){return e&&e.constructor===String?e.replace(/[\"&><]/g,function(e){switch(e){case'"':return"&quot;";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;"}}):""},CSSLint.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},readError:function(e,t){return'<file name="'+U4a(e)+'"><error line="0" column="0" severty="error" message="'+U4a(t)+'"></error></file>'},formatResults:function(e,t,n){var r=e.messages,i=[];return 0<r.length&&(i.push('<file name="'+t+'">'),CSSLint.Util.forEach(r,function(e,t){var n;e.rollup||i.push('<error line="'+e.line+'" column="'+e.col+'" severity="'+e.type+'" message="'+U4a(e.message)+'" source="'+((n=e.rule)&&"name"in n?"net.csslint."+n.name.replace(/\s/g,""):"")+'"/>')}),i.push("</file>")),i.join("")}}),CSSLint.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,n,t){var r=e.messages,i="";t=t||{};var o=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return 0===r.length?t.quiet?"":n+": Lint Free!":(CSSLint.Util.forEach(r,function(e,t){e.rollup?i+=n+": "+o(e.type)+" - "+e.message+"\n":i+=n+": line "+e.line+", col "+e.col+", "+o(e.type)+" - "+e.message+"\n"}),i)}}),CSSLint.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){return"</csslint>"},formatResults:function(e,t,n){var r=e.messages,i=[],o=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return 0<r.length&&(i.push('<file name="'+t+'">'),CSSLint.Util.forEach(r,function(e,t){e.rollup?i.push('<issue severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>'):i.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>')}),i.push("</file>")),i.join("")}}),CSSLint.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><testsuites>'},endFormat:function(){return"</testsuites>"},formatResults:function(e,t,n){var r=e.messages,i=[],o={error:0,failure:0},a=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return 0<r.length&&(r.forEach(function(e,t){var n,r="warning"===e.type?"error":e.type;e.rollup||(i.push('<testcase time="0" name="'+((n=e.rule)&&"name"in n?"net.csslint."+n.name.replace(/\s/g,""):"")+'">'),i.push("<"+r+' message="'+a(e.message)+'"><![CDATA['+e.line+":"+e.col+":"+a(e.evidence)+"]]></"+r+">"),i.push("</testcase>"),o[r]+=1)}),i.unshift('<testsuite time="0" tests="'+r.length+'" skipped="0" errors="'+o.error+'" failures="'+o.failure+'" package="net.csslint" name="'+t+'">'),i.push("</testsuite>")),i.join("")}}),CSSLint.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><lint>'},endFormat:function(){return"</lint>"},formatResults:function(e,t,n){var r=e.messages,i=[],o=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return 0<r.length&&(i.push('<file name="'+t+'">'),CSSLint.Util.forEach(r,function(e,t){e.rollup?i.push('<issue severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>'):i.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>')}),i.push("</file>")),i.join("")}}),CSSLint.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,t,n){var r=e.messages,i="";if(n=n||{},0===r.length)return n.quiet?"":"\n\ncsslint: No errors in "+t+".";i="\n\ncsslint: There are "+r.length+" problems in "+t+".";var o=t.lastIndexOf("/"),a=t;return-1===o&&(o=t.lastIndexOf("\\")),-1<o&&(a=t.substring(o+1)),CSSLint.Util.forEach(r,function(e,t){i=i+"\n\n"+a,e.rollup?(i+="\n"+(t+1)+": "+e.type,i+="\n"+e.message):(i+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,i+="\n"+e.message,i+="\n"+e.evidence)}),i}}),CSSLint}();!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(l){"use strict";function a(e){e.parentNode&&e.parentNode.removeChild(e)}function c(e,t,n){function r(){var e;l.off(n,"mouseout",r),i&&((e=i).parentNode&&(null==e.style.opacity&&a(e),e.style.opacity=0,setTimeout(function(){a(e)},600)),i=null)}var i=function(e,t){function n(e){if(!r.parentNode)return l.off(document,"mousemove",n);r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",r.style.left=e.clientX+5+"px"}var r=document.createElement("div");return r.className="CodeMirror-lint-tooltip",r.appendChild(t.cloneNode(!0)),document.body.appendChild(r),l.on(document,"mousemove",n),n(e),null!=r.style.opacity&&(r.style.opacity=1),r}(e,t),o=setInterval(function(){if(i)for(var e=n;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){r();break}}if(!i)return clearInterval(o)},400);l.on(n,"mouseout",r)}function u(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=[],l=0;l<a.length;++l){var u=a[l].__annotation;u&&s.push(u)}s.length&&function(e,t){for(var n=t.target||t.srcElement,r=document.createDocumentFragment(),i=0;i<e.length;i++){var o=e[i];r.appendChild(g(o))}c(t,r,n)}(s,t)}}(t,e)},this.waitingFor=0}function p(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(v);for(var n=0;n<t.marked.length;++n)t.marked[n].clear();t.marked.length=0}function m(t,e,n,r){var i=document.createElement("div"),o=i;return i.className="CodeMirror-lint-marker-"+e,n&&((o=i.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker-multiple"),0!=r&&l.on(o,"mouseover",function(e){c(e,t,o)}),i}function g(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function d(t){var e=t.state.lint.options,n=e.options||e,r=e.getAnnotations||t.getHelper(l.Pos(0,0),"lint");if(r)if(e.async||r.async)!function(n,e,t){function r(){o=-1,n.off("change",r)}var i=n.state.lint,o=++i.waitingFor;n.on("change",r),e(n.getValue(),function(e,t){n.off("change",r),i.waitingFor==o&&(t&&e instanceof l&&(e=t),n.operation(function(){s(n,e)}))},t,n)}(t,r,n);else{var i=r(t.getValue(),n,t);if(!i)return;i.then?i.then(function(e){t.operation(function(){s(t,e)})}):t.operation(function(){s(t,i)})}}function s(e,t){p(e);for(var n=e.state.lint,r=n.options,i=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}(t),o=0;o<i.length;++o){var a=i[o];if(a){for(var s=null,l=n.hasGutter&&document.createDocumentFragment(),u=0;u<a.length;++u){var c=a[u],d=c.severity;d||(d="error"),f=d,s="error"==(h=s)?h:f,r.formatAnnotation&&(c=r.formatAnnotation(c)),n.hasGutter&&l.appendChild(g(c)),c.to&&n.marked.push(e.markText(c.from,c.to,{className:"CodeMirror-lint-mark-"+d,__annotation:c}))}n.hasGutter&&e.setGutterMarker(o,v,m(l,s,1<a.length,n.options.tooltips))}}var h,f;r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}var v="CodeMirror-lint-markers";l.defineOption("lint",!1,function(e,t,n){if(n&&n!=l.Init&&(p(e),!1!==e.state.lint.options.lintOnChange&&e.off("change",h),l.off(e.getWrapperElement(),"mouseover",e.state.lint.onMouseOver),clearTimeout(e.state.lint.timeout),delete e.state.lint),t){for(var r=e.getOption("gutters"),i=!1,o=0;o<r.length;++o)r[o]==v&&(i=!0);var a=e.state.lint=new u(e,(s=t)instanceof Function?{getAnnotations:s}:(s&&!0!==s||(s={}),s),i);!1!==a.options.lintOnChange&&e.on("change",h),0!=a.options.tooltips&&"gutter"!=a.options.tooltips&&l.on(e.getWrapperElement(),"mouseover",a.onMouseOver),d(e)}var s}),l.defineExtension("performLint",function(){this.state.lint&&d(this)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(c){"use strict";c.registerHelper("lint","css",function(e,t){var n=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),n;for(var r=CSSLint.verify(e,t).messages,i=null,o=0;o<r.length;o++){var a=(i=r[o]).line-1,s=i.line-1,l=i.col-1,u=i.col;n.push({from:c.Pos(a,l),to:c.Pos(s,u),message:i.message,severity:i.type})}return n})}),jQuery(function(r){var n="split-h",e=window.addEventListener?"addEventListener":"attachEvent";(0,window[e])("attachEvent"==e?"onmessage":"message",function(e){if(e.data&&e.data.action)switch(e.data.action){case"critical-css":t(e.data.css)}},!1);var i=[],t=function(e){if(e,d&&d.setValue(e),i.length)for(var t=i.splice(0),n=t.shift();n;)n(e),n=t.shift()},o=function(e,t){t||(t="#critical-css-view iframe"),r(t)[0].contentWindow.postMessage(e,"*")};Date.now||(Date.now=function(){return(new Date).getTime()});var a=function(){var e=r("#critical-css-view iframe").attr("src");return-1===e.indexOf("&t=")?e+="&t="+Math.floor(Date.now()/1e3):e=e.replace(/&t=([0-9]+)/,"&t="+Math.floor(Date.now()/1e3)),e},s=Split(["#critical-css-view","#full-css-view"],{sizes:[50,50]}),l=function(e){switch(n=e,document.location.hash="#"+e,e){case"editor":r(".syncscroll").hide(),p(!1);break;default:r(".syncscroll").show(),p(r('.syncscroll input[type="checkbox"]').is(":checked"))}},u=function(){s&&(s.destroy(),s=!1),r("#full-css-view").show(),r("#critical-css-view").show(),r("#css-editor-view").hide(),r(".split").removeClass("split-vertical"),r(".split").addClass("split-horizontal"),s=Split(["#critical-css-view","#full-css-view"],{sizes:[50,50],direction:"horizontal"}),l("split-h")};r("#btn_split_h").on("click",u);var c=function(){s&&(s.destroy(),s=!1),r("#full-css-view").show(),r("#critical-css-view").show(),r("#css-editor-view").hide(),r(".split").removeClass("split-horizontal"),r(".split").addClass("split-vertical"),s=Split(["#critical-css-view","#full-css-view"],{sizes:[50,50],direction:"vertical"}),l("split-v")};r("#btn_split_v").on("click",c);var d,h=function(){s&&(s.destroy(),s=!1),r("#css-editor-view").hide(),r(".split").removeClass("split-horizontal").removeClass("split-vertical"),r(".split").css("width","100%");var e=r("#btn_full_toggle").data("active-view");e||(e="full"),"critical-css"===e?(e="full",r("#critical-css-view").hide(),r("#full-css-view").show(),r("#btn_full_toggle").data("active-view","full")):(e="critical-css",r("#critical-css-view").show(),r("#full-css-view").hide(),r("#btn_full_toggle").data("active-view","critical-css")),l("single-"+e)};r("#btn_full_toggle").on("click",h);var f=function(e){s&&(s.destroy(),s=!1),r("#full-css-view").hide(),r("#critical-css-view").show(),r("#css-editor-view").show(),r(".split").removeClass("split-vertical"),r(".split").addClass("split-horizontal"),r("abtfrcss").data("editor")||(r("#abtfrcss").prop("disabled",""),(d=CodeMirror.fromTextArea(r("#abtfrcss")[0],{lineWrapping:!0,lineNumbers:!0,gutters:["CodeMirror-lint-markers"],lint:!0})).on("change",function(){o({action:"set",css:d.getValue()})}),o({action:"get"}),r("abtfrcss").data("editor",d)),s=Split(["#critical-css-view","#css-editor-view"],{sizes:[50,50],direction:"horizontal"}),l("editor"),"function"==typeof e&&e()};r("#btn_editor").on("click",f),r("#btn_reload").on("click",function(){d&&r("#critical-css-view iframe").on("load",function(){o({action:"get"}),r("#critical-css-view iframe").off("load")}),r("#critical-css-view iframe").attr("src",a())}),r("#btn_open").on("click",function(){window.open(a(),"critical-css")}),r("#btn_extract_critical_css").on("click",function(){var t=function(){u(),i.push(function(e){f()}),o({action:"extract",type:"critical-css"},"#full-css-view iframe")};"editor"!==n?(i.push(function(e){setTimeout(function(){t()},100)}),f()):t()}),r("#btn_extract_full_css").on("click",function(){r("#btn_full_toggle").data("active-view","critical-css"),h(),o({action:"extract",type:"full-css"},"#full-css-view iframe")});var p=function(e){var t=r("#critical-css-view iframe"),n=r("#full-css-view iframe");e?(t.contents().scroll(function(){n.contents().scrollTop(t.contents().scrollTop())}),n.contents().scroll(function(){t.contents().scrollTop(n.contents().scrollTop())}),n.contents().scrollTop(t.contents().scrollTop())):(t.contents().off("scroll"),n.contents().off("scroll"))};if(r('.syncscroll input[type="checkbox"]').on("change",function(){p(r(this).is(":checked"))}),document.location.hash)switch(document.location.hash){case"#editor":f(),r("#critical-css-view iframe").on("load",function(){o({action:"get"}),r("#critical-css-view iframe").off("load")}),o({action:"get"});break;case"#split-h":u();break;case"#split-v":c();break;case"#single-full":r("#btn_full_toggle").data("active-view","critical-css"),h();break;case"#single-critical-css":r("#btn_full_toggle").data("active-view","full"),h()}});