!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=283)}([function(e,t,n){"use strict";e.exports=n(289)},function(e,t,n){e.exports=n(302)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(140),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,i.default)(t))&&"function"!==typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(494),o=r(i),a=n(498),s=r(a),u=n(140),l=r(u);t.default=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":(0,l.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(232),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){var r,i;!function(){"use strict";function n(){for(var e=[],t=0;t=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function l(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function c(e,t){var n=0;return o(k,t)?k[t]:35===t.charCodeAt(0)&&C.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?l(n):e}function f(e){return e.indexOf("\\")<0?e:e.replace(T,"$1")}function p(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(w,function(e,t,n){return t||c(e,n)})}function d(e){return x[e]}function h(e){return S.test(e)?e.replace(N,d):e}function m(e){return e.replace(j,"\\$&")}function v(e){switch(e){case 9:case 32:return!0}return!1}function y(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function g(e){return D.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function E(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var O=Object.prototype.hasOwnProperty,T=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,_=/&([a-z#][a-z0-9]{1,31});/gi,w=new RegExp(T.source+"|"+_.source,"gi"),C=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,k=n(194),S=/[&<>"]/,N=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""},j=/[.?*+^$[\]\\(){}|-]/g,D=n(114);t.lib={},t.lib.mdurl=n(195),t.lib.ucmicro=n(343),t.assign=a,t.isString=i,t.has=o,t.unescapeMd=f,t.unescapeAll=p,t.isValidEntityCode=u,t.fromCodePoint=l,t.escapeHtml=h,t.arrayReplaceAt=s,t.isSpace=v,t.isWhiteSpace=y,t.isMdAsciiPunct=b,t.isPunctChar=g,t.escapeRE=m,t.normalizeReference=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return a(e)||u(e)||c(e)||p(e)||h(e)||v(e)||g(e)||E(e)}function o(e){return i(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL type."),e}function a(e){return Object(Q.a)(e,te)}function s(e){return a(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Scalar type."),e}function u(e){return Object(Q.a)(e,ne)}function l(e){return u(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Object type."),e}function c(e){return Object(Q.a)(e,re)}function f(e){return c(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Interface type."),e}function p(e){return Object(Q.a)(e,ie)}function d(e){return p(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Union type."),e}function h(e){return Object(Q.a)(e,oe)}function m(e){return h(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Enum type."),e}function v(e){return Object(Q.a)(e,ae)}function y(e){return v(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Input Object type."),e}function g(e){return Object(Q.a)(e,X.a)}function b(e){return g(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL List type."),e}function E(e){return Object(Q.a)(e,X.b)}function O(e){return E(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL Non-Null type."),e}function T(e){return a(e)||h(e)||v(e)||I(e)&&T(e.ofType)}function _(e){return T(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL input type."),e}function w(e){return a(e)||u(e)||c(e)||p(e)||h(e)||I(e)&&w(e.ofType)}function C(e){return w(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL output type."),e}function k(e){return a(e)||h(e)}function S(e){return k(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL leaf type."),e}function N(e){return u(e)||c(e)||p(e)}function x(e){return N(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL composite type."),e}function j(e){return c(e)||p(e)}function D(e){return j(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL abstract type."),e}function I(e){return g(e)||E(e)}function L(e){return I(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL wrapping type."),e}function A(e){return i(e)&&!E(e)}function P(e){return A(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL nullable type."),e}function M(e){if(e)return E(e)?e.ofType:e}function F(e){return a(e)||u(e)||c(e)||p(e)||h(e)||v(e)}function R(e){return F(e)||Object(K.a)(0,"Expected "+String(e)+" to be a GraphQL named type."),e}function U(e){if(e){for(var t=e;I(t);)t=t.ofType;return t}}function V(e){return"function"===typeof e?e():e}function B(e,t){var n=V(t)||[];return Array.isArray(n)||Object(K.a)(0,e.name+" interfaces must be an Array or a function which returns an Array."),n}function G(e,t){var n=V(t)||{};z(n)||Object(K.a)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.create(null);return Object.keys(n).forEach(function(t){var i=n[t];z(i)||Object(K.a)(0,e.name+"."+t+" field config must be an object"),i.hasOwnProperty("isDeprecated")&&Object(K.a)(0,e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var o=ee({},i,{isDeprecated:Boolean(i.deprecationReason),name:t});q(o.resolve)||Object(K.a)(0,e.name+"."+t+" field resolver must be a function if provided, but got: "+String(o.resolve)+".");var a=i.args;a?(z(a)||Object(K.a)(0,e.name+"."+t+" args must be an object with argument names as keys."),o.args=Object.keys(a).map(function(e){var t=a[e];return{name:e,description:void 0===t.description?null:t.description,type:t.type,defaultValue:t.defaultValue,astNode:t.astNode}})):o.args=[],r[t]=o}),r}function z(e){return e&&"object"===("undefined"===typeof e?"undefined":Z(e))&&!Array.isArray(e)}function q(e){return null==e||"function"===typeof e}function H(e,t){var n=V(t)||[];return Array.isArray(n)||Object(K.a)(0,"Must provide Array of types or a function which returns such an array for Union "+e.name+"."),n}function W(e,t){return z(t)||Object(K.a)(0,e.name+" values must be an object with value names as keys."),Object.keys(t).map(function(n){var r=t[n];return z(r)||Object(K.a)(0,e.name+"."+n+' must refer to an object with a "value" key representing an internal value but got: '+String(r)+"."),r.hasOwnProperty("isDeprecated")&&Object(K.a)(0,e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:n}})}t.N=i,t.u=o,t.M=a,t.t=s,t.K=u,t.r=l,t.E=c,t.l=f,t.O=p,t.v=d,t.B=h,t.i=m,t.C=v,t.j=y,t.G=g,t.n=b,t.I=E,t.p=O,t.D=T,t.k=_,t.L=w,t.s=C,t.F=k,t.m=S,t.A=N,t.h=x,t.z=j,t.g=D,t.P=I,t.w=L,t.J=A,t.q=P,t.y=M,t.H=F,t.o=R,t.x=U,n.d(t,"e",function(){return te}),n.d(t,"d",function(){return ne}),n.d(t,"c",function(){return re}),n.d(t,"f",function(){return ie}),n.d(t,"a",function(){return oe}),n.d(t,"b",function(){return ae});var Q=n(103),K=n(22),$=n(25),Y=n(15),J=n(159),X=n(26),Z="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee=Object.assign||function(e){for(var t=1;t0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(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)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function p(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function h(e){for(;Ka.length<=e;)Ka.push(m(Ka)+" ");return Ka[e]}function m(e){return e[e.length-1]}function v(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||$a.test(e))}function O(e,t){return t?!!(t.source.indexOf("\\w")>-1&&E(e))||t.test(e):E(e)}function T(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function _(e){return e.charCodeAt(0)>=768&&Ya.test(e)}function w(e,t,n){for(;(n<0?t>0:tn?-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 k(e,t,n){var o=this;this.input=n,o.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=r("div",null,"CodeMirror-cursors"),o.measure=r("div",null,"CodeMirror-measure"),o.lineMeasure=r("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=r("div",[a],null,"position: relative"),o.sizer=r("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=r("div",null,null,"position: absolute; height: "+za+"px; width: 1px;"),o.gutters=r("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=r("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=r("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ba&&Ea<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Oa||ma&&ja||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function S(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=e.first&&tn?P(n,S(e,n).text.length):z(t,S(e,t.line).text.length)}function z(e,t){var n=e.ch;return null==n||n>t?P(e.line,t):n<0?P(e.line,0):e}function q(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new Q(a,o.from,u?null:o.to))}}return r}function X(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var O=0;O0)){var c=[u,1],f=M(l.from,s.from),d=M(l.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:l.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:l.to}),i.splice.apply(i,c),u+=c.length-3}}return i}function ne(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||ae(n,o.marker)<0)&&(n=o.marker)}return n}function fe(e,t,n,r,i){var o=S(e,t),a=Xa&&o.markedSpans;if(a)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?M(l.to,n)>=0:M(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?M(l.from,r)<=0:M(l.from,r)<0)))return!0}}}function pe(e){for(var t;t=ue(e);)e=t.find(-1,!0).line;return e}function de(e){for(var t;t=le(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,n;t=le(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function me(e,t){var n=S(e,t),r=pe(n);return n==r?t:D(r)}function ve(e,t){if(t>e.lastLine())return t;var n,r=S(e,t);if(!ye(e,r))return t;for(;n=le(r);)r=n.find(1,!0).line;return D(r)+1}function ye(e,t){var n=Xa&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function Te(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||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")}function _e(e,t,n){var r;Za=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Za=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Za=i)}return null!=r?r:Za}function we(e,t){var n=e.order;return null==n&&(n=e.order=es(e.text,t)),n}function Ce(e,t){return e._handlers&&e._handlers[t]||ts}function ke(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=p(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Se(e,t){var n=Ce(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function De(e){e.prototype.on=function(e,t){ns(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Le(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Pe(e){Ie(e),Le(e)}function Me(e){return e.target||e.srcElement}function Fe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Da&&e.ctrlKey&&1==t&&(t=3),t}function Re(e){if(null==Ba){var t=r("span","\u200b");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ba=t.offsetWidth<=1&&t.offsetHeight>2&&!(ba&&Ea<8))}var i=Ba?r("span","\u200b"):r("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ue(e){if(null!=Ga)return Ga;var r=n(e,document.createTextNode("A\u062eA")),i=Pa(r,0,1).getBoundingClientRect(),o=Pa(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Ga=o.right-i.right<3)}function Ve(e){if(null!=ss)return ss;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=Pa(t,0,1).getBoundingClientRect();return ss=Math.abs(i.left-o.left)>1}function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),us[e]=t}function Ge(e,t){ls[e]=t}function ze(e){if("string"==typeof e&&ls.hasOwnProperty(e))e=ls[e];else if(e&&"string"==typeof e.name&&ls.hasOwnProperty(e.name)){var t=ls[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=ze(t);var n=us[t.name];if(!n)return qe(e,"text/plain");var r=n(e,t);if(cs.hasOwnProperty(t.name)){var i=cs[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 He(e,t){c(t,cs.hasOwnProperty(e)?cs[e]:cs[e]={})}function We(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 Qe(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 Ke(e,t,n){return!e.startState||e.startState(t,n)}function $e(e,t,n,r){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=0;se&&i.splice(u,1,e,i[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&We(e.doc.mode,r.state),o=$e(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 Je(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ds(r,!0,t);var o=it(e,t,n),a=o>r.first&&S(r,o-1).stateAfter,s=a?ds.fromSaved(r,a,o):new ds(r,Ke(r.mode),o);return r.iter(o,t,function(n){Xe(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function tt(e,t,n,r){var i,o=e.doc,a=o.mode;t=G(o,t);var s,u=S(o,t.line),l=Je(e,t.line,n),c=new fs(u.text,e.options.tabSize,l);for(r&&(s=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&Xe(e,t,r,f.pos),f.pos=t.length,u=null):u=nt(et(n,f,r.state,p),o),p){var d=p[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||c!=u){for(;la;--s){if(s<=o.first)return o.first;var u=S(o,s-1),l=u.stateAfter;if(l&&(!n||s+(l instanceof ps?l.lookAhead:0)<=o.modeFrontier))return s;var c=f(u.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=S(e,r).stateAfter;if(i&&(!(i instanceof ps)||r+i.lookAhead1&&!/ /.test(e))return e;for(var n=t,r="",i=0;il&&f.from<=l));p++);if(f.to>=c)return e(n,r,i,o,a,s,u);e(n,r.slice(0,f.to-l),i,o,null,s,u),o=null,r=r.slice(f.to-l),l=f.to}}}function ht(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 mt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,l,c,f,p,d=i.length,h=0,m=1,v="",y=0;;){if(y==h){u=l=c=f=s="",p=null,y=1/0;for(var g=[],b=void 0,E=0;Eh||T.collapsed&&O.to==h&&O.from==h)?(null!=O.to&&O.to!=h&&y>O.to&&(y=O.to,l=""),T.className&&(u+=" "+T.className),T.css&&(s=(s?s+";":"")+T.css),T.startStyle&&O.from==h&&(c+=" "+T.startStyle),T.endStyle&&O.to==y&&(b||(b=[])).push(T.endStyle,O.to),T.title&&!f&&(f=T.title),T.collapsed&&(!p||ae(p.marker,T)<0)&&(p=O)):O.from>h&&y>O.from&&(y=O.from)}if(b)for(var _=0;_=d)break;for(var C=Math.min(d,y);;){if(v){var k=h+v.length;if(!p){var S=k>C?v.slice(0,C-h):v;t.addToken(t,S,a?a+u:u,c,h+S.length==y?l:"",f,s)}if(k>=C){v=v.slice(C-h),h=C;break}h=k,c=""}v=i.slice(o,o=n[m++]),a=ut(n[m++],t.cm.options)}}else for(var N=1;N2&&o.push((u.bottom+l.top)/2-n.top)}}o.push(n.bottom-n.top)}}function qt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ht(e,t){t=pe(t);var r=D(t),i=e.display.externalMeasured=new vt(e.doc,t,r);i.lineN=r;var o=i.built=lt(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Wt(e,t,n,r){return $t(e,Kt(e,t),n,r)}function Qt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=u-s,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[l+2],s==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[2+(l-=3)],a="left";if("right"==n&&i==u-s)for(;l=0&&(n=e[i]).left==n.right;i--);return n}function Xt(e,t,n,r){var i,o=Yt(t.map,n,r),a=o.node,s=o.start,u=o.end,l=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+u0&&(l=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(ba&&Ea<9&&!s&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+On(e.display),top:p.top,bottom:p.bottom}:Os}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,v=t.view.measure.heights,y=0;y=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!u)return a("before"==c?l-1:l,"before"==c);var f=_e(u,l,c),p=Za,d=s(l,f,"before"==c);return null!=p&&(d.other=s(l,p,"before"!=c)),d}function fn(e,t){var n=0;t=G(e.doc,t),e.options.lineWrapping||(n=On(e.display)*t.ch);var r=S(e.doc,t.line),i=be(r)+Ft(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pn(e,t,n,r,i){var o=P(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function dn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return pn(r.first,0,null,!0,-1);var i=I(r,n),o=r.first+r.size-1;if(i>o)return pn(r.first+r.size-1,S(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=S(r,i);;){var s=yn(e,a,i,t,n),u=ce(a,s.ch+(s.xRel>0?1:0));if(!u)return s;var l=u.find(1);if(l.line==i)return l;a=S(r,i=l.line)}}function hn(e,t,n,r){r-=an(t);var i=t.text.length,o=C(function(t){return $t(e,n,t-1).bottom<=r},i,0);return i=C(function(t){return $t(e,n,t).top>r},o,i),{begin:o,end:i}}function mn(e,t,n,r){return n||(n=Kt(e,t)),hn(e,t,n,sn(e,t,$t(e,n,r),"line").top)}function vn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function yn(e,t,n,r,i){i-=be(t);var o=Kt(e,t),a=an(t),s=0,u=t.text.length,l=!0,c=we(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?bn:gn)(e,t,n,o,c,r,i);l=1!=f.level,s=l?f.from:f.to-1,u=l?f.to:f.from-1}var p,d,h=null,m=null,v=C(function(t){var n=$t(e,o,t);return n.top+=a,n.bottom+=a,!!vn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},s,u),y=!1;if(m){var g=r-m.left=E.bottom}return v=w(t.text,v,1),pn(n,v,d,y,r-p)}function gn(e,t,n,r,i,o,a){var s=C(function(s){var u=i[s],l=1!=u.level;return vn(cn(e,P(n,l?u.to:u.from,l?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),u=i[s];if(s>0){var l=1!=u.level,c=cn(e,P(n,l?u.from:u.to,l?"after":"before"),"line",t,r);vn(c,o,a,!0)&&c.top>a&&(u=i[s-1])}return u}function bn(e,t,n,r,i,o,a){var s=hn(e,t,r,a),u=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var c=null,f=null,p=0;p=l||d.to<=u)){var h=1!=d.level,m=$t(e,r,h?Math.min(l,d.to)-1:Math.max(u,d.from)).right,v=mv)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.froml&&(c={from:c.from,to:l,level:c.level}),c}function En(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==vs){vs=r("pre");for(var i=0;i<49;++i)vs.appendChild(document.createTextNode("x")),vs.appendChild(r("br"));vs.appendChild(document.createTextNode("x"))}n(e.measure,vs);var o=vs.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function On(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function Tn(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:_n(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function _n(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wn(e){var t=En(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/On(e.display)-3);return function(i){if(ye(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line0?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 An(e){e.state.focused||(e.display.input.focus(),Mn(e))}function Pn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Fn(e))},100)}function Mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Se(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Oa&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ln(e))}function Fn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Se(e,"blur",e,t),e.state.focused=!1,Ra(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Rn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||u<-.005)&&(j(i.line,o),Un(i.line),i.rest))for(var l=0;l=a&&(o=I(t,be(S(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Bn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=_n(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Sa){var a=r("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Ft(e.display))+"px;\n height: "+(t.bottom-t.top+Vt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function qn(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(t=t.ch?P(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?P(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=cn(e,t),u=n&&n!=t?cn(e,n):s;i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-r,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+r};var l=Wn(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=l.scrollTop&&(Zn(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=l.scrollLeft&&(tr(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function Hn(e,t){var n=Wn(e,t);null!=n.scrollTop&&Zn(e,n.scrollTop),null!=n.scrollLeft&&tr(e,n.scrollLeft)}function Wn(e,t){var n=e.display,r=En(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+Rt(n),u=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(l?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=Bt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>p;return d&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(d?0:10)-p),a}function Qn(e,t){null!=t&&(Jn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Kn(e){Jn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function $n(e,t,n){null==t&&null==n||Jn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Yn(e,t){Jn(e),e.curOp.scrollToPos=t}function Jn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Xn(e,fn(e,t.from),fn(e,t.to),t.margin)}}function Xn(e,t,n,r){var i=Wn(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});$n(e,i.scrollLeft,i.scrollTop)}function Zn(e,t){Math.abs(e.doc.scrollTop-t)<2||(ma||Dr(e,{top:t}),er(e,t,!0),ma&&Dr(e),wr(e,100))}function er(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 tr(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,Bn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function nr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Rt(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+Vt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function rr(e,t){t||(t=nr(e));var n=e.display.barWidth,r=e.display.barHeight;ir(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Rn(e),ir(e,nr(e)),n=e.display.barWidth,r=e.display.barHeight}function ir(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 or(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ra(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ws[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ns(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?tr(e,t):Zn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function ar(e){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:++Cs},gt(e.curOp)}function sr(e){Et(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ks(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function cr(e){e.updatedDisplay=e.mustUpdate&&xr(e.cm,e.update)}function fr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Rn(t),e.barMeasure=nr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Wt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Vt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function pr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Xa&&me(e.doc,t)i.viewFrom?Er(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Er(e);else if(t<=i.viewFrom){var o=Or(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Er(e)}else if(n>=i.viewTo){var a=Or(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Er(e)}else{var s=Or(e,t,t,-1),u=Or(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(yt(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):Er(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Sn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==p(a,n)&&a.push(n)}}}function Er(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Or(e,t,n,r){var i,o=Sn(e,t),a=e.display.view;if(!Xa||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;me(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 Tr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=yt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=yt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Sn(e,n)))),r.viewTo=n}function _r(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Je(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?We(t.mode,r.state):null,u=$e(e,o,r,!0);s&&(r.state=s),o.styles=u.styles;var l=o.styleClasses,c=u.classes;c?o.styleClasses=c:l&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),p=0;!f&&pn)return wr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&hr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==_r(e))return!1;Gn(e)&&(Er(e),n.dims=Tn(e));var o=i.first+i.size,a=Math.max(n.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,n.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(o,r.viewTo)),Xa&&(a=me(e.doc,a),s=ve(e.doc,s));var u=a!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;Tr(e,a,s),r.viewOffset=be(S(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=_r(e);if(!u&&0==l&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=Sr(e);return l>4&&(r.lineDiv.style.display="none"),Ir(e,r.updateLineNumbers,n.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Nr(c),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,u&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,wr(e,400)),r.updateLineNumbers=null,!0}function jr(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Bt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Rt(e.display)-Gt(e),n.top)}),t.visible=Vn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&xr(e,t);r=!1){Rn(e);var i=nr(e);Nn(e),rr(e,i),Ar(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 Dr(e,t){var n=new ks(e,t);if(xr(e,n)){Rn(e),jr(e,n);var r=nr(e);Nn(e),rr(e,r),Ar(e,r),n.finish()}}function Ir(e,n,r){function i(t){var n=t.nextSibling;return Oa&&Da&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,u=s.firstChild,l=o.view,c=o.viewFrom,f=0;f-1&&(h=!1),_t(e,d,c,r)),h&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(A(e.options,c)))),u=d.node.nextSibling}else{var m=Dt(e,d,c,r);s.insertBefore(m,u)}c+=d.size}for(;u;)u=i(u)}function Lr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Ar(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+Vt(e)+"px"}function Pr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Fr(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 Rr(e){var t=Fr(e);return t.x*=Ns,t.y*=Ns,t}function Ur(e,t){var n=Fr(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Da&&Oa)e:for(var l=t.target,c=o.view;l!=a;l=l.parentNode)for(var f=0;f=0){var a=V(o.from(),i.from()),s=U(o.to(),i.to()),u=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new js(u?s:a,u?a:s))}}return new xs(e,t)}function Br(e,t){return new xs([new js(e,t||e)],0)}function Gr(e){return e.text?P(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zr(e,t){if(M(e,t.from)<0)return e;if(M(e,t.to)<=0)return Gr(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+=Gr(t).ch-t.to.ch),P(n,r)}function qr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g)}Ot(e,"change",e,t)}function Jr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r)))a=m(o.changes),0==M(t.from,t.to)&&0==M(t.from,a.to)?a.to=Gr(t):o.changes.push(ni(e,t));else{var u=m(i.done);for(u&&u.ranges||ui(e.sel,i.done),o={changes:[ni(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=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Se(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,m(i.done),t))?i.done[i.done.length-1]=t:ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ri(i.undone)}function ui(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function li(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(m(s)[f]=l[f],delete l[f])}}}return r}function hi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=M(t,i)<0;o!=M(n,i)<0?(i=t,t=n):o!=M(t,n)<0&&(t=n)}return new js(i,t)}return new js(n||t,t)}function mi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Oi(e,new xs([hi(e.sel.primary(),t,n,i)],0),r)}function vi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Se(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var l=u.find(r<0?1:-1),c=void 0;if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(l=Ni(e,l,-r,l&&l.line==t.line?o:null)),l&&l.line==t.line&&(c=M(l,n))&&(r<0?c<0:c>0))return ki(e,l,t,r,i)}var f=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(f=Ni(e,f,r,f.line==t.line?o:null)),f?ki(e,f,t,r,i):null}}return t}function Si(e,t,n,r,i){var o=r||1,a=ki(e,t,n,o,i)||!i&&ki(e,t,n,o,!0)||ki(e,t,n,-o,i)||!i&&ki(e,t,n,-o,!0);return a||(e.cantEdit=!0,P(e.first,0))}function Ni(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?G(e,P(t.line-1)):null:n>0&&t.ch==(r||S(e,t.line)).text.length?t.line=0;--i)Ii(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ii(e,t)}}function Ii(e,t){if(1!=t.text.length||""!=t.text[0]||0!=M(t.from,t.to)){var n=qr(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),Pi(e,t,n,Z(e,t));var r=[];Jr(e,function(e,n){n||-1!=p(r,e.history)||(Vi(e.history,t),r.push(e.history)),Pi(e,t,null,Z(e,t))})}}function Li(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,l=0;l=0;--d){var h=function(n){var r=i.changes[n];if(r.origin=t,f&&!ji(e,r,!1))return s.length=0,{};c.push(ni(e,r));var o=n?qr(e,r):m(s);Pi(e,r,o,pi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Gr(r)});var a=[];Jr(e,function(e,t){t||-1!=p(a,e.history)||(Vi(e.history,r),a.push(e.history)),Pi(e,r,null,pi(e,r))})}(d);if(h)return h.v}}}}function Ai(e,t){if(0!=t&&(e.first+=t,e.sel=new xs(v(e.sel.ranges,function(e){return new js(P(e.anchor.line+t,e.anchor.ch),P(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:P(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),n||(n=qr(e,t)),e.cm?Mi(e.cm,t,r):Yr(e,t,r),Ti(e,n,Ha)}}function Mi(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,u=o.line;e.options.lineWrapping||(u=D(pe(S(r,o.line))),r.iter(u,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&xe(e),Yr(r,t,n,wn(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=Ee(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),ot(r,o.line),wr(e,400);var l=t.text.length-(a.line-o.line)-1;t.full?gr(e):o.line!=a.line||1!=t.text.length||$r(e.doc,t)?gr(e,o.line,a.line+1,l):br(e,o.line,"text");var c=je(e,"changes"),f=je(e,"change");if(f||c){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Ot(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Fi(e,t,n,r,i){if(r||(r=n),M(r,n)<0){var o;o=[r,n],n=o[0],r=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Di(e,{from:n,to:r,text:t,origin:i})}function Ri(e,t,n,r){n0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(fe(e,t.line,t,n,a)||t.line!=n.line&&fe(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");W()}a.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u,l=t.line,f=e.cm;if(e.iter(l,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&pe(e)==f.display.maxLine&&(u=!0),a.collapsed&&l!=t.line&&j(e,0),Y(e,new Q(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),a.collapsed&&e.iter(t.line,n.line+1,function(t){ye(e,t)&&j(t,0)}),a.clearOnEnter&&ns(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(H(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Is,a.atomic=!0),f){if(u&&(f.curOp.updateMaxLine=!0),a.collapsed)gr(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)br(f,p,"text");a.atomic&&wi(f.doc),Ot(f,"markerAdded",f,a)}return a}function Qi(e,t,n,r,i){r=c(r),r.shared=!1;var o=[Wi(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Jr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Wi(e,G(e,t),G(e,n),r,i));for(var u=0;u-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var l;if(t.state.draggingText&&!t.state.draggingText.copy&&(l=t.listSelections()),Ti(t.doc,Br(n,n)),l)for(var c=0;c=0;t--)Fi(e.doc,"",r[t].from,r[t].to,"+delete");Kn(e)})}function ho(e,t,n){var r=w(e.text,t+n,n);return r<0||r>e.text.length?null:r}function mo(e,t,n){var r=ho(e,t.ch,n);return null==r?null:new P(t.line,r,n<0?"after":"before")}function vo(e,t,n,r,i){if(e){var o=we(n,t.doc.direction);if(o){var a,s=i<0?m(o):o[0],u=i<0==(1==s.level),l=u?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Kt(t,n);a=i<0?n.text.length-1:0;var f=$t(t,c,a).top;a=C(function(e){return $t(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ho(n,a,1))}else a=i<0?s.to:s.from;return new P(r,a,l)}}return new P(r,i<0?n.text.length:0,i<0?"before":"after")}function yo(e,t,n,r){var i=we(t,e.doc.direction);if(!i)return mo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=_e(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=c.begin)){var d=f?"before":"after";return new P(n.line,p,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new P(n.line,u(e,1),"before"):new P(n.line,e,"after")};e>=0&&e0==(1!=a.level),l=s?r.begin:u(r.end,-1);if(a.from<=l&&l0?c.end:u(c.begin,-1);return null==v||r>0&&v==t.text.length||!(m=h(r>0?0:i.length-1,r,l(v)))?null:m}function go(e,t){var n=S(e.doc,t),r=pe(n);return r!=n&&(t=D(r)),vo(!0,e,r,t,1)}function bo(e,t){var n=S(e.doc,t),r=de(n);return r!=n&&(t=D(r)),vo(!0,e,n,t,-1)}function Eo(e,t){var n=go(e,t.line),r=S(e.doc,n.line),i=we(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 P(n.line,a?0:o,n.sticky)}return n}function Oo(e,t,n){if("string"==typeof t&&!(t=qs[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)!=qa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function To(e,t,n){for(var r=0;r-1&&(M((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(M(i.to(),t)>0||t.xRel<0)?Mo(e,r,t,o):Ro(e,r,t,o)}function Mo(e,t,n,r){var i=e.display,o=!1,a=mr(e,function(t){Oa&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(i.wrapper.ownerDocument,"mouseup",a),ke(i.wrapper.ownerDocument,"mousemove",s),ke(i.scroller,"dragstart",u),ke(i.scroller,"drop",a),o||(Ie(t),r.addNew||mi(e.doc,n,null,null,r.extend),Oa||ba&&9==Ea?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},u=function(){return o=!0};Oa&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ns(i.wrapper.ownerDocument,"mouseup",a),ns(i.wrapper.ownerDocument,"mousemove",s),ns(i.scroller,"dragstart",u),ns(i.scroller,"drop",a),Pn(e),setTimeout(function(){return i.input.focus()},20)}function Fo(e,t,n){if("char"==n)return new js(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new js(P(t.line,0),G(e.doc,P(t.line+1,0)));var r=n(e,t);return new js(r.from,r.to)}function Ro(e,t,n,r){function i(t){if(0!=M(y,t))if(y=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,a=f(S(l,n.line).text,n.ch,o),s=f(S(l,t.line).text,t.ch,o),u=Math.min(a,s),m=Math.max(a,s),v=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));v<=g;v++){var b=S(l,v).text,E=d(b,u,o);u==m?i.push(new js(P(v,E),P(v,E))):b.length>E&&i.push(new js(P(v,E),P(v,d(b,m,o))))}i.length||i.push(new js(n,n)),Oi(l,Vr(h.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var O,T=c,_=Fo(e,t,r.unit),w=T.anchor;M(_.anchor,w)>0?(O=_.head,w=V(T.from(),_.anchor)):(O=_.anchor,w=U(T.to(),_.head));var C=h.ranges.slice(0);C[p]=Uo(e,new js(G(l,w),O)),Oi(l,Vr(C,p),Wa)}}function o(t){var n=++b,s=kn(e,t,!0,"rectangle"==r.unit);if(s)if(0!=M(s,y)){e.curOp.focus=a(),i(s);var c=Vn(u,l);(s.line>=c.to||s.lineg.bottom?20:0;f&&setTimeout(mr(e,function(){b==n&&(u.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,Ie(t),u.input.focus(),ke(u.wrapper.ownerDocument,"mousemove",E),ke(u.wrapper.ownerDocument,"mouseup",O),l.history.lastSelOrigin=null}var u=e.display,l=e.doc;Ie(t);var c,p,h=l.sel,m=h.ranges;if(r.addNew&&!r.extend?(p=l.sel.contains(n),c=p>-1?m[p]:new js(n,n)):(c=l.sel.primary(),p=l.sel.primIndex),"rectangle"==r.unit)r.addNew||(c=new js(n,n)),n=kn(e,t,!0,!0),p=-1;else{var v=Fo(e,n,r.unit);c=r.extend?hi(c,v.anchor,v.head,r.extend):v}r.addNew?-1==p?(p=m.length,Oi(l,Vr(m.concat([c]),p),{scroll:!1,origin:"*mouse"})):m.length>1&&m[p].empty()&&"char"==r.unit&&!r.extend?(Oi(l,Vr(m.slice(0,p).concat(m.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),h=l.sel):yi(l,p,c,Wa):(p=0,Oi(l,new xs([c],0),Wa),h=l.sel);var y=n,g=u.wrapper.getBoundingClientRect(),b=0,E=mr(e,function(e){0!==e.buttons&&Fe(e)?o(e):s(e)}),O=mr(e,s);e.state.selectingText=O,ns(u.wrapper.ownerDocument,"mousemove",E),ns(u.wrapper.ownerDocument,"mouseup",O)}function Uo(e,t){var n=t.anchor,r=t.head,i=S(e.doc,n.line);if(0==M(n,r)&&n.sticky==r.sticky)return t;var o=we(i);if(!o)return t;var a=_e(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;var l;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=_e(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?f<0:f>0}var p=o[u+(l?-1:0)],d=l==(1==p.level),h=d?p.from:p.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new js(new P(n.line,h,m),r)}function Vo(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&&Ie(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!je(e,n))return Ae(t);o-=s.top-a.viewOffset;for(var u=0;u=i){return Se(e,n,e,I(e.doc,o),e.options.gutters[u],t),Ae(t)}}}function Bo(e,t){return Vo(e,t,"gutterClick",!0)}function Go(e,t){Mt(e.display,t)||zo(e,t)||Ne(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function zo(e,t){return!!je(e,"gutterContextMenu")&&Vo(e,t,"gutterContextMenu",!1)}function qo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nn(e)}function Ho(e){Pr(e),gr(e),Bn(e)}function Wo(e,t,n){if(!t!=!(n&&n!=Ys)){var r=e.display.dragFunctions,i=t?ns:ke;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 Qo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ra(e.display.wrapper,"CodeMirror-wrap"),Oe(e)),Cn(e),gr(e),nn(e),setTimeout(function(){return rr(e)},100)}function Ko(e,t){var n=this;if(!(this instanceof Ko))return new Ko(e,t);this.options=t=t?c(t):{},c(Js,t,!1),Mr(t);var r=t.value;"string"==typeof r&&(r=new Ms(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new Ko.inputStyles[t.inputStyle](this),o=this.display=new k(e,r,i);o.wrapper.CodeMirror=this,Pr(this),qo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),or(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 Va,keySeq:null,specialChars:null},t.autofocus&&!ja&&o.input.focus(),ba&&Ea<11&&setTimeout(function(){return n.display.input.reset(!0)},20),$o(this),no(),ar(this),this.curOp.forceUpdate=!0,Xr(this,r),t.autofocus&&!ja||this.hasFocus()?setTimeout(l(Mn,this),20):Fn(this);for(var a in Xs)Xs.hasOwnProperty(a)&&Xs[a](n,t[a],Ys);Gn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;ns(i.scroller,"mousedown",mr(e,Io)),ba&&Ea<11?ns(i.scroller,"dblclick",mr(e,function(t){if(!Ne(e,t)){var n=kn(e,t);if(n&&!Bo(e,t)&&!Mt(e.display,t)){Ie(t);var r=e.findWordAt(n);mi(e.doc,r.anchor,r.head)}}})):ns(i.scroller,"dblclick",function(t){return Ne(e,t)||Ie(t)}),Fa||ns(i.scroller,"contextmenu",function(t){return Go(e,t)});var o,a={end:0};ns(i.scroller,"touchstart",function(t){if(!Ne(e,t)&&!n(t)&&!Bo(e,t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),ns(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ns(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Mt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new js(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new js(P(s.line,0),G(e.doc,P(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ie(n)}t()}),ns(i.scroller,"touchcancel",t),ns(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zn(e,i.scroller.scrollTop),tr(e,i.scroller.scrollLeft,!0),Se(e,"scroll",e))}),ns(i.scroller,"mousewheel",function(t){return Ur(e,t)}),ns(i.scroller,"DOMMouseScroll",function(t){return Ur(e,t)}),ns(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ne(e,t)||Pe(t)},over:function(t){Ne(e,t)||(Zi(e,t),Pe(t))},start:function(t){return Xi(e,t)},drop:mr(e,Ji),leave:function(t){Ne(e,t)||eo(e)}};var s=i.input.getField();ns(s,"keyup",function(t){return xo.call(e,t)}),ns(s,"keydown",mr(e,So)),ns(s,"keypress",mr(e,jo)),ns(s,"focus",function(t){return Mn(e,t)}),ns(s,"blur",function(t){return Fn(e,t)})}function Yo(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Je(e,t).state:n="prev");var a=e.options.tabSize,s=S(o,t),u=f(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var l,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((l=o.mode.indent(i,s.text.slice(c.length),s.text))==qa||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=t>o.first?f(S(o,t-1).text,null,a):0:"add"==n?l=u+e.options.indentUnit:"subtract"==n?l=u-e.options.indentUnit:"number"==typeof n&&(l=u+n),l=Math.max(0,l);var p="",d=0;if(e.options.indentWithTabs)for(var m=Math.floor(l/a);m;--m)d+=a,p+="\t";if(d1)if(eu&&eu.text.join("\n")==t){if(r.ranges.length%eu.text.length==0){u=[];for(var l=0;l=0;f--){var p=r.ranges[f],d=p.from(),h=p.to();p.empty()&&(n&&n>0?d=P(d.line,d.ch-n):e.state.overwrite&&!a?h=P(h.line,Math.min(S(o,h.line).text.length,h.ch+m(s).length)):eu&&eu.lineWise&&eu.text.join("\n")==t&&(d=h=P(d.line,0))),c=e.curOp.updateInput;var y={from:d,to:h,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Di(e.doc,y),Ot(e,"inputRead",e,y)}t&&!a&&ea(e,t),Kn(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Zo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||hr(t,function(){return Xo(t,n,0,null,"paste")}),!0}function ea(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Yo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Yo(e,i.head.line,"smart"));a&&Ot(e,"electricInput",e,i.head.line)}}}function ta(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new P(r,t.ch,t.sticky),l=S(e,r))}function a(r){var a;if(null==(a=i?yo(e.cm,l,t,n):mo(l,t,n))){if(r||!o())return!1;t=vo(i,e.cm,l,t.line,n)}else t=a;return!0}var s=t,u=n,l=S(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var c=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||a(!d);d=!1){var h=l.text.charAt(t.ch)||"\n",m=O(h,p)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||d||m||(m="s"),c&&c!=m){n<0&&(n=1,a(),t.sticky="after");break}if(m&&(c=m),n>0&&!a(!d))break}var v=Si(e,t,s,u,!0);return F(s,v)&&(v.hitSide=!0),v}function oa(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*En(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var l;l=dn(e,a,i),l.outside;){if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function aa(e,t){var n=Qt(e,t.line);if(!n||n.hidden)return null;var r=S(e.doc,t.line),i=qt(n,r,t.line),o=we(r,e.doc.direction),a="left";if(o){a=_e(o,t.ch)%2?"right":"left"}var s=Yt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function sa(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ua(e,t){return t&&(e.bad=!0),e}function la(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(){c&&(l+=f,p&&(l+=f),c=p=!1)}function s(e){e&&(a(),l+=e)}function u(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void s(n);var l,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(P(r,0),P(i+1,0),o(+d));return void(h.length&&(l=h[0].find(0))&&s(N(e.doc,l.from,l.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&a();for(var v=0;v=15&&(wa=!1,Oa=!0);var Pa,Ma=Da&&(Ta||wa&&(null==Aa||Aa<12.11)),Fa=ma||ba&&Ea>=9,Ra=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};Pa=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 Ua=function(e){e.select()};Na?Ua=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ba&&(Ua=function(e){try{e.select()}catch(e){}});var Va=function(){this.id=null};Va.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ba,Ga,za=30,qa={toString:function(){return"CodeMirror.Pass"}},Ha={scroll:!1},Wa={origin:"*mouse"},Qa={origin:"+move"},Ka=[""],$a=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ya=/[\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]/,Ja=!1,Xa=!1,Za=null,es=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,u=/[1n]/;return function(n,r){var l="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!i.test(n))return!1;for(var c=n.length,f=[],p=0;p=this.string.length},fs.prototype.sol=function(){return this.pos==this.lineStart},fs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fs.prototype.next=function(){if(this.post},fs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},fs.prototype.skipToEnd=function(){this.pos=this.string.length},fs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},fs.prototype.backUp=function(e){this.pos-=e},fs.prototype.column=function(){return this.lastColumnPos0?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},fs.prototype.current=function(){return this.string.slice(this.start,this.pos)},fs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},fs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},fs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ps=function(e,t){this.state=e,this.lookAhead=t},ds=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};ds.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ds.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ds.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ds.fromSaved=function(e,t,n){return t instanceof ps?new ds(e,We(e.mode,t.state),n,t.lookAhead):new ds(e,We(e.mode,t),n)},ds.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ps(t,this.maxLookAhead):t};var hs=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},ms=function(e,t,n){this.text=e,re(this,t),this.height=n?n(this):1};ms.prototype.lineNo=function(){return D(this)},De(ms);var vs,ys={},gs={},bs=null,Es=null,Os={left:0,right:0,top:0,bottom:0},Ts=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),ns(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ns(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&Ea<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ts.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&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ts.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ts.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ts.prototype.zeroWidthHack=function(){var e=Da&&!ka?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Va,this.disableVert=new Va},Ts.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},Ts.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _s=function(){};_s.prototype.update=function(){return{bottom:0,right:0}},_s.prototype.setScrollLeft=function(){},_s.prototype.setScrollTop=function(){},_s.prototype.clear=function(){};var ws={native:Ts,null:_s},Cs=0,ks=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Vn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Bt(e),this.force=n,this.dims=Tn(e),this.events=[]};ks.prototype.signal=function(e,t){je(e,t)&&this.events.push(arguments)},ks.prototype.finish=function(){for(var e=this,t=0;t=0&&M(e,i.to())<=0)return r}return-1};var js=function(e,t){this.anchor=e,this.head=t};js.prototype.from=function(){return V(this.anchor,this.head)},js.prototype.to=function(){return U(this.anchor,this.head)},js.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,i=e+t;r1||!(this.children[0]instanceof Gi))){var u=[];this.collapse(u),this.children=[new Gi(u)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,u=s;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&gr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&wi(t.doc)),t&&Ot(t,"markerCleared",t,this,i,o),n&&sr(t),this.parent&&this.parent.clear()}},Ls.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;l--)Di(r,i[l]);u?Ei(this,u):this.cm&&Kn(this.cm)}),undo:yr(function(){Li(this,"undo")}),redo:yr(function(){Li(this,"redo")}),undoSelection:yr(function(){Li(this,"undo",!0)}),redoSelection:yr(function(){Li(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.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=G(this,e),t=G(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),G(this,P(n,t))},indexFromPos:function(e){e=G(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new P(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),P(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new P(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),P(i.line-1,a.length-1),i,"+transpose"))}n.push(new js(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return hr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==M(t,this.pos)&&n==this.button};var Ks,$s,Ys={toString:function(){return"CodeMirror.Init"}},Js={},Xs={};Ko.defaults=Js,Ko.optionHandlers=Xs;var Zs=[];Ko.defineInitHook=function(e){return Zs.push(e)};var eu=null,tu=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Va,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};tu.prototype.init=function(e){function t(e){if(!Ne(i,e)){if(i.somethingSelected())Jo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=ta(i);Jo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Ha),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=eu.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=ra(),s=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),s.value=eu.text.join("\n");var u=document.activeElement;Ua(s),setTimeout(function(){i.display.lineSpace.removeChild(a),u.focus(),u==o&&r.showPrimarySelection()},50)}}var n=this,r=this,i=r.cm,o=r.div=e.lineDiv;na(o,i.options.spellcheck),ns(o,"paste",function(e){Ne(i,e)||Zo(e,i)||Ea<=11&&setTimeout(mr(i,function(){return n.updateFromDOM()}),20)}),ns(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ns(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ns(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ns(o,"touchstart",function(){return r.forceCompositionEnd()}),ns(o,"input",function(){n.composing||n.readFromDOMSoon()}),ns(o,"copy",t),ns(o,"cut",t)},tu.prototype.prepareSelection=function(){var e=xn(this.cm,!1);return e.focus=this.cm.state.focused,e},tu.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},tu.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},tu.prototype.showPrimarySelection=function(){var e=this.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&&aa(t,r)||{node:s[0].measure.map[2],offset:0},l=i.linee.firstLine()&&(r=P(r.line-1,S(e.doc,r.line-1).length)),i.ch==S(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=Sn(e,r.line))?(a=D(t.view[0].line),s=t.view[0].node):(a=D(t.view[o].line),s=t.view[o-1].node.nextSibling);var u,l,c=Sn(e,i.line);if(c==t.view.length-1?(u=t.viewTo-1,l=t.lineDiv.lastChild):(u=D(t.view[c+1].line)-1,l=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(la(e,s,l,a,u)),p=N(e.doc,P(a,0),P(u,S(e.doc,u).text.length));f.length>1&&p.length>1;)if(m(f)==m(p))f.pop(),p.pop(),u--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),a++}for(var d=0,h=0,v=f[0],y=p[0],g=Math.min(v.length,y.length);dr.ch&&b.charCodeAt(b.length-h-1)==E.charCodeAt(E.length-h-1);)d--,h++;f[f.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var T=P(a,d),_=P(u,p.length?m(p).length-h:0);return f.length>1||f[0]||M(T,_)?(Fi(e.doc,f,T,_,"+input"),!0):void 0},tu.prototype.ensurePolled=function(){this.forceCompositionEnd()},tu.prototype.reset=function(){this.forceCompositionEnd()},tu.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},tu.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))},tu.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||hr(this.cm,function(){return gr(e.cm)})},tu.prototype.setUneditable=function(e){e.contentEditable="false"},tu.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||mr(this.cm,Xo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},tu.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},tu.prototype.onContextMenu=function(){},tu.prototype.resetPosition=function(){},tu.prototype.needsContentAttribute=!0;var nu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Va,this.hasSelection=!1,this.composing=null};nu.prototype.init=function(e){function t(e){if(!Ne(i,e)){if(i.somethingSelected())Jo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ta(i);Jo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Ha):(r.prevInput="",o.value=t.text.join("\n"),Ua(o))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Na&&(o.style.width="0px"),ns(o,"input",function(){ba&&Ea>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),ns(o,"paste",function(e){Ne(i,e)||Zo(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),ns(o,"cut",t),ns(o,"copy",t),ns(e.scroller,"paste",function(t){Mt(e,t)||Ne(i,t)||(i.state.pasteIncoming=!0,r.focus())}),ns(e.lineSpace,"selectstart",function(t){Mt(e,t)||Ie(t)}),ns(o,"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"})}}),ns(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},nu.prototype.createField=function(e){this.wrapper=ra(),this.textarea=this.wrapper.firstChild},nu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xn(e);if(e.options.moveInputWithCursor){var i=cn(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},nu.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nu.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&&Ua(this.textarea),ba&&Ea>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ba&&Ea>=9&&(this.hasSelection=null))}},nu.prototype.getField=function(){return this.textarea},nu.prototype.supportsTouch=function(){return!1},nu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!ja||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},nu.prototype.blur=function(){this.textarea.blur()},nu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nu.prototype.receivedFocus=function(){this.slowPoll()},nu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},nu.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},nu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||os(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(ba&&Ea>=9&&this.hasSelection===i||Da&&/[\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="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-1?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},nu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nu.prototype.onKeyPress=function(){ba&&Ea>=9&&(this.hasSelection=null),this.fastPoll()},nu.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="\u200b"+(e?a.value:"");a.value="\u21da",a.value=t,r.prevInput=e?"":"\u200b",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=c,a.style.cssText=l,ba&&Ea<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=u),null!=a.selectionStart){(!ba||ba&&Ea<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"\u200b"==r.prevInput?mr(i,xi)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=kn(i,e),u=o.scroller.scrollTop;if(s&&!wa){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&mr(i,Oi)(i.doc,Br(s),Ha);var l=a.style.cssText,c=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(Oa&&(p=window.scrollY),o.input.focus(),Oa&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ba&&Ea>=9&&t(),Fa){Pe(e);var d=function(){ke(window,"mouseup",d),setTimeout(n,20)};ns(window,"mouseup",d)}else setTimeout(n,50)}},nu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},nu.prototype.setUneditable=function(){},nu.prototype.needsContentAttribute=!1,function(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=Ys&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=Ys,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Qr(e)},!0),t("indentUnit",2,Qr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Kr(e),nn(e),gr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(P(r,o))}r++});for(var i=n.length-1;i>=0;i--)Fi(e.doc,t,n[i],P(n[i].line,n[i].ch+t.length))}}),t("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!=Ys&&e.refresh()}),t("specialCharPlaceholder",ct,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",ja?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!La),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){qo(e),Ho(e)},!0),t("keyMap","default",function(e,t,n){var r=fo(t),i=n!=Ys&&fo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Qo,!0),t("gutters",[],function(e){Mr(e.options),Ho(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?_n(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return rr(e)},!0),t("scrollbarStyle","native",function(e){or(e),rr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Mr(e.options),Ho(e)},!0),t("firstLineNumber",1,Ho,!0),t("lineNumberFormatter",function(e){return e},Ho,!0),t("showCursorWhenSelecting",!1,Nn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Fn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Wo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Nn,!0),t("singleCursorHeightPerLine",!0,Nn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Kr,!0),t("addModeClass",!1,Kr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Kr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Ko),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&mr(this,t[e])(this,n,i),Se(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"](fo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&(Yo(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Kn(t));else{var a=o.from(),s=o.to(),u=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var l=u;l0&&yi(t.doc,i,new js(a,c[i].to()),Ha)}}}),getTokenAt:function(e,t){return tt(this,e,t)},getLineTokens:function(e,t){return tt(this,P(e),t,!0)},getTokenTypeAt:function(e){e=G(this.doc,e);var t,n=Ye(this,S(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&&(e=o,i=!0),r=S(this.doc,e)}else r=e;return sn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-be(r):0)},defaultTextHeight:function(){return En(this.display)},defaultCharWidth:function(){return On(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=cn(this,G(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Hn(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:vr(So),triggerOnKeyPress:vr(jo),triggerOnKeyUp:xo,triggerOnMouseDown:vr(Io),execCommand:function(e){if(qs.hasOwnProperty(e))return qs[e].call(null,this)},triggerElectric:vr(function(e){ea(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=G(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;i.5)&&Cn(this),Se(this,"refresh",this)}),swapDoc:vr(function(e){var t=this.doc;return t.cm=null,Xr(this,e),nn(this),this.display.input.reset(),$n(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ot(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}},De(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ko);var ru="iter insert remove copy getEditor constructor".split(" ");for(var iu in Ms.prototype)Ms.prototype.hasOwnProperty(iu)&&p(ru,iu)<0&&(Ko.prototype[iu]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ms.prototype[iu]));return De(Ms),Ko.inputStyles={textarea:nu,contenteditable:tu},Ko.defineMode=function(e){Ko.defaults.mode||"null"==e||(Ko.defaults.mode=e),Be.apply(this,arguments)},Ko.defineMIME=Ge,Ko.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ko.defineMIME("text/plain","null"),Ko.defineExtension=function(e,t){Ko.prototype[e]=t},Ko.defineDocExtension=function(e,t){Ms.prototype[e]=t},Ko.fromTextArea=pa,function(e){e.off=ke,e.on=ns,e.wheelEventPixels=Rr,e.Doc=Ms,e.splitLines=is,e.countColumn=f,e.findColumn=d,e.isWordChar=E,e.Pass=qa,e.signal=Se,e.Line=ms,e.changeEnd=Gr,e.scrollbarModel=ws,e.Pos=P,e.cmpPos=M,e.modes=us,e.mimeModes=ls,e.resolveMode=ze,e.getMode=qe,e.modeExtensions=cs,e.extendMode=He,e.copyState=We,e.startState=Ke,e.innerMode=Qe,e.commands=qs,e.keyMap=zs,e.keyName=co,e.isModifierKey=uo,e.lookupKey=so,e.normalizeKeyMap=ao,e.StringStream=fs,e.SharedTextMarker=As,e.TextMarker=Ls,e.LineWidget=Ds,e.e_preventDefault=Ie,e.e_stopPropagation=Le,e.e_stop=Pe,e.addClass=s,e.contains=o,e.rmClass=Ra,e.keyNames=Us}(Ko),Ko.version="5.38.0",Ko})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r,i){var o=e[t];return a.default.isValidElement(o)?new Error("Invalid "+r+" `"+i+"` of type ReactElement supplied to `"+n+"`,expected an element type (a string , component class, or function component)."):(0,s.isValidElementType)(o)?null:new Error("Invalid "+r+" `"+i+"` of value `"+o+"` supplied to `"+n+"`, expected an element type (a string , component class, or function component).")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=r(o),s=n(510),u=n(91),l=r(u);t.default=(0,l.default)(i),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(304);n.d(t,"graphql",function(){return r.a}),n.d(t,"graphqlSync",function(){return r.b});var i=n(311);n.d(t,"GraphQLSchema",function(){return i.p}),n.d(t,"GraphQLScalarType",function(){return i.o}),n.d(t,"GraphQLObjectType",function(){return i.n}),n.d(t,"GraphQLInterfaceType",function(){return i.k}),n.d(t,"GraphQLUnionType",function(){return i.s}),n.d(t,"GraphQLEnumType",function(){return i.e}),n.d(t,"GraphQLInputObjectType",function(){return i.i}),n.d(t,"GraphQLList",function(){return i.l}),n.d(t,"GraphQLNonNull",function(){return i.m}),n.d(t,"GraphQLDirective",function(){return i.d}),n.d(t,"TypeKind",function(){return i.u}),n.d(t,"specifiedScalarTypes",function(){return i._23}),n.d(t,"GraphQLInt",function(){return i.j}),n.d(t,"GraphQLFloat",function(){return i.f}),n.d(t,"GraphQLString",function(){return i.r}),n.d(t,"GraphQLBoolean",function(){return i.b}),n.d(t,"GraphQLID",function(){return i.g}),n.d(t,"specifiedDirectives",function(){return i._22}),n.d(t,"GraphQLIncludeDirective",function(){return i.h}),n.d(t,"GraphQLSkipDirective",function(){return i.q}),n.d(t,"GraphQLDeprecatedDirective",function(){return i.c}),n.d(t,"DEFAULT_DEPRECATION_REASON",function(){return i.a}),n.d(t,"SchemaMetaFieldDef",function(){return i.t}),n.d(t,"TypeMetaFieldDef",function(){return i.v}),n.d(t,"TypeNameMetaFieldDef",function(){return i.w}),n.d(t,"introspectionTypes",function(){return i.Z}),n.d(t,"__Schema",function(){return i.C}),n.d(t,"__Directive",function(){return i.x}),n.d(t,"__DirectiveLocation",function(){return i.y}),n.d(t,"__Type",function(){return i.D}),n.d(t,"__Field",function(){return i.A}),n.d(t,"__InputValue",function(){return i.B}),n.d(t,"__EnumValue",function(){return i.z}),n.d(t,"__TypeKind",function(){return i.E}),n.d(t,"isSchema",function(){return i._16}),n.d(t,"isDirective",function(){return i._2}),n.d(t,"isType",function(){return i._19}),n.d(t,"isScalarType",function(){return i._15}),n.d(t,"isObjectType",function(){return i._13}),n.d(t,"isInterfaceType",function(){return i._6}),n.d(t,"isUnionType",function(){return i._20}),n.d(t,"isEnumType",function(){return i._3}),n.d(t,"isInputObjectType",function(){return i._4}),n.d(t,"isListType",function(){return i._9}),n.d(t,"isNonNullType",function(){return i._11}),n.d(t,"isInputType",function(){return i._5}),n.d(t,"isOutputType",function(){return i._14}),n.d(t,"isLeafType",function(){return i._8}),n.d(t,"isCompositeType",function(){return i._1}),n.d(t,"isAbstractType",function(){return i._0}),n.d(t,"isWrappingType",function(){return i._21}),n.d(t,"isNullableType",function(){return i._12}),n.d(t,"isNamedType",function(){return i._10}),n.d(t,"isSpecifiedScalarType",function(){return i._18}),n.d(t,"isIntrospectionType",function(){return i._7}),n.d(t,"isSpecifiedDirective",function(){return i._17}),n.d(t,"assertType",function(){return i.T}),n.d(t,"assertScalarType",function(){return i.S}),n.d(t,"assertObjectType",function(){return i.Q}),n.d(t,"assertInterfaceType",function(){return i.K}),n.d(t,"assertUnionType",function(){return i.U}),n.d(t,"assertEnumType",function(){return i.H}),n.d(t,"assertInputObjectType",function(){return i.I}),n.d(t,"assertListType",function(){return i.M}),n.d(t,"assertNonNullType",function(){return i.O}),n.d(t,"assertInputType",function(){return i.J}),n.d(t,"assertOutputType",function(){return i.R}),n.d(t,"assertLeafType",function(){return i.L}),n.d(t,"assertCompositeType",function(){return i.G}),n.d(t,"assertAbstractType",function(){return i.F}),n.d(t,"assertWrappingType",function(){return i.W}),n.d(t,"assertNullableType",function(){return i.P}),n.d(t,"assertNamedType",function(){return i.N}),n.d(t,"getNullableType",function(){return i.Y}),n.d(t,"getNamedType",function(){return i.X}),n.d(t,"validateSchema",function(){return i._24}),n.d(t,"assertValidSchema",function(){return i.V});var o=n(312);n.d(t,"Source",function(){return o.d}),n.d(t,"getLocation",function(){return o.f}),n.d(t,"parse",function(){return o.h}),n.d(t,"parseValue",function(){return o.j}),n.d(t,"parseType",function(){return o.i}),n.d(t,"print",function(){return o.k}),n.d(t,"visit",function(){return o.l}),n.d(t,"visitInParallel",function(){return o.m}),n.d(t,"visitWithTypeInfo",function(){return o.n}),n.d(t,"getVisitFn",function(){return o.g}),n.d(t,"Kind",function(){return o.c}),n.d(t,"TokenKind",function(){return o.e}),n.d(t,"DirectiveLocation",function(){return o.b}),n.d(t,"BREAK",function(){return o.a});var a=n(313);n.d(t,"execute",function(){return a.b}),n.d(t,"defaultFieldResolver",function(){return a.a}),n.d(t,"responsePathAsArray",function(){return a.d}),n.d(t,"getDirectiveValues",function(){return a.c});var s=n(314);n.d(t,"subscribe",function(){return s.b}),n.d(t,"createSourceEventStream",function(){return s.a});var u=n(317);n.d(t,"validate",function(){return u.C}),n.d(t,"ValidationContext",function(){return u.w}),n.d(t,"specifiedRules",function(){return u.B}),n.d(t,"FieldsOnCorrectTypeRule",function(){return u.a}),n.d(t,"FragmentsOnCompositeTypesRule",function(){return u.b}),n.d(t,"KnownArgumentNamesRule",function(){return u.c}),n.d(t,"KnownDirectivesRule",function(){return u.d}),n.d(t,"KnownFragmentNamesRule",function(){return u.e}),n.d(t,"KnownTypeNamesRule",function(){return u.f}),n.d(t,"LoneAnonymousOperationRule",function(){return u.g}),n.d(t,"NoFragmentCyclesRule",function(){return u.h}),n.d(t,"NoUndefinedVariablesRule",function(){return u.i}),n.d(t,"NoUnusedFragmentsRule",function(){return u.j}),n.d(t,"NoUnusedVariablesRule",function(){return u.k}),n.d(t,"OverlappingFieldsCanBeMergedRule",function(){return u.l}),n.d(t,"PossibleFragmentSpreadsRule",function(){return u.m}),n.d(t,"ProvidedNonNullArgumentsRule",function(){return u.n}),n.d(t,"ScalarLeafsRule",function(){return u.o}),n.d(t,"SingleFieldSubscriptionsRule",function(){return u.p}),n.d(t,"UniqueArgumentNamesRule",function(){return u.q}),n.d(t,"UniqueDirectivesPerLocationRule",function(){return u.r}),n.d(t,"UniqueFragmentNamesRule",function(){return u.s}),n.d(t,"UniqueInputFieldNamesRule",function(){return u.t}),n.d(t,"UniqueOperationNamesRule",function(){return u.u}),n.d(t,"UniqueVariableNamesRule",function(){return u.v}),n.d(t,"ValuesOfCorrectTypeRule",function(){return u.x}),n.d(t,"VariablesAreInputTypesRule",function(){return u.y}),n.d(t,"VariablesDefaultValueAllowedRule",function(){return u.z}),n.d(t,"VariablesInAllowedPositionRule",function(){return u.A});var l=n(9);n.d(t,"GraphQLError",function(){return l.a}),n.d(t,"formatError",function(){return l.b}),n.d(t,"printError",function(){return l.d});var c=n(318);n.d(t,"getIntrospectionQuery",function(){return c.q}),n.d(t,"introspectionQuery",function(){return c.t}),n.d(t,"getOperationAST",function(){return c.r}),n.d(t,"introspectionFromSchema",function(){return c.s}),n.d(t,"buildClientSchema",function(){return c.g}),n.d(t,"buildASTSchema",function(){return c.f}),n.d(t,"buildSchema",function(){return c.h}),n.d(t,"getDescription",function(){return c.p}),n.d(t,"extendSchema",function(){return c.l}),n.d(t,"lexicographicSortSchema",function(){return c.y}),n.d(t,"printSchema",function(){return c.A}),n.d(t,"printIntrospectionSchema",function(){return c.z}),n.d(t,"printType",function(){return c.B}),n.d(t,"typeFromAST",function(){return c.D}),n.d(t,"valueFromAST",function(){return c.E}),n.d(t,"valueFromASTUntyped",function(){return c.F}),n.d(t,"astFromValue",function(){return c.e}),n.d(t,"TypeInfo",function(){return c.c}),n.d(t,"coerceValue",function(){return c.i}),n.d(t,"isValidJSValue",function(){return c.w}),n.d(t,"isValidLiteralValue",function(){return c.x}),n.d(t,"concatAST",function(){return c.j}),n.d(t,"separateOperations",function(){return c.C}),n.d(t,"isEqualType",function(){return c.u}),n.d(t,"isTypeSubTypeOf",function(){return c.v}),n.d(t,"doTypesOverlap",function(){return c.k}),n.d(t,"assertValidName",function(){return c.d}),n.d(t,"findBreakingChanges",function(){return c.m}),n.d(t,"findDangerousChanges",function(){return c.n}),n.d(t,"BreakingChangeType",function(){return c.a}),n.d(t,"DangerousChangeType",function(){return c.b}),n.d(t,"findDeprecatedUsages",function(){return c.o})},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",VARIABLE:"Variable",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension",DIRECTIVE_DEFINITION:"DirectiveDefinition"})},function(e,t,n){"use strict";function r(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(290)},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;nl||t=c)return t}}}),p=new s.e({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:i,parseValue:i,parseLiteral:function(e){return e.kind===u.a.FLOAT||e.kind===u.a.INT?parseFloat(e.value):void 0}}),d=new s.e({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:o,parseValue:o,parseLiteral:function(e){return e.kind===u.a.STRING?e.value:void 0}}),h=new s.e({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===u.a.BOOLEAN?e.value:void 0}}),m=new s.e({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===u.a.STRING||e.kind===u.a.INT?e.value:void 0}}),v=[d,f,p,h,m]},function(e,t,n){"use strict";function r(e){return Object(c.c)(e,{leave:f})}function i(e){return function(t){return o([t.description,e(t)],"\n")}}function o(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function a(e){return e&&0!==e.length?"{\n"+u(o(e,"\n"))+"\n}":""}function s(e,t,n){return t?e+t+(n||""):""}function u(e){return e&&" "+e.replace(/\n/g,"\n ")}function l(e,t){var n=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'+(t?n:u(n))+'\n"""':'"""'+n.replace(/"$/,'"\n')+'"""'}t.a=r;var c=n(46),f={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return o(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=s("(",o(e.variableDefinitions,", "),")"),i=o(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?o([t,o([n,r]),i,a]," "):a},VariableDefinition:function(e){return e.variable+": "+e.type+s(" = ",e.defaultValue)},SelectionSet:function(e){return a(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet;return o([s("",t,": ")+n+s("(",o(r,", "),")"),o(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+s(" ",o(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return o(["...",s("on ",t),o(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment "+t+s("(",o(r,", "),")")+" on "+n+" "+s("",o(i," ")," ")+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?l(n,"description"===t):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+o(e.values,", ")+"]"},ObjectValue:function(e){return"{"+o(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+s("(",o(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return o(["schema",o(t," "),a(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:i(function(e){return o(["scalar",e.name,o(e.directives," ")]," ")}),ObjectTypeDefinition:i(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")}),FieldDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+s("(",o(n,", "),")")+": "+r+s(" ",o(i," "))}),InputValueDefinition:i(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return o([t+": "+n,s("= ",r),o(i," ")]," ")}),InterfaceTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["interface",t,o(n," "),a(r)]," ")}),UnionTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.types;return o(["union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")}),EnumTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.values;return o(["enum",t,o(n," "),a(r)]," ")}),EnumValueDefinition:i(function(e){return o([e.name,o(e.directives," ")]," ")}),InputObjectTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["input",t,o(n," "),a(r)]," ")}),ScalarTypeExtension:function(e){return o(["extend scalar",e.name,o(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["extend type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend interface",t,o(n," "),a(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return o(["extend union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return o(["extend enum",t,o(n," "),a(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend input",t,o(n," "),a(r)]," ")},DirectiveDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+s("(",o(n,", "),")")+" on "+o(r," | ")})}},function(e,t,n){"use strict";function r(e,t,n,i,a,s,u){var l=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,c=n;if(!c&&l){var f=l[0];c=f&&f.loc&&f.loc.source}var p=i;!p&&l&&(p=l.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),p&&0===p.length&&(p=void 0);var d=void 0;if(i&&n){var h=n;d=i.map(function(e){return Object(o.a)(h,e)})}else l&&(d=l.reduce(function(e,t){return t.loc&&e.push(Object(o.a)(t.loc.source,t.loc.start)),e},[]));Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:d||void 0,enumerable:!0},path:{value:a||void 0,enumerable:!0},nodes:{value:l||void 0},source:{value:c||void 0},positions:{value:p||void 0},originalError:{value:s},extensions:{value:u||s&&s.extensions}}),s&&s.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}t.a=r;var i=n(160),o=n(105);r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"},toString:{value:function(){return Object(i.a)(this)}}})},function(e,t,n){"use strict";function r(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},Object.create(null))}t.a=r},function(e,t,n){var r=n(37),i=n(23),o=n(130),a=n(49),s=n(41),u=function(e,t,n){var l,c,f,p=e&u.F,d=e&u.G,h=e&u.S,m=e&u.P,v=e&u.B,y=e&u.W,g=d?i:i[t]||(i[t]={}),b=g.prototype,E=d?r:h?r[t]:(r[t]||{}).prototype;d&&(n=t);for(l in n)(c=!p&&E&&void 0!==E[l])&&s(g,l)||(f=c?E[l]:n[l],g[l]=d&&"function"!=typeof E[l]?n[l]:v&&c?o(f,r):y&&E[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):m&&"function"==typeof f?o(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[l]=f,e&u.R&&b&&!b[l]&&a(b,l,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})};t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",VARIABLE:"Variable",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension",DIRECTIVE_DEFINITION:"DirectiveDefinition"})},function(e,t,n){var r=n(50),i=n(233),o=n(131),a=Object.defineProperty;t.f=n(52)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(236),i=n(133);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";function r(e,t,n,r,i){n&&(e._notifying=!0,n.call.apply(n,[e,r].concat(i)),e._notifying=!1),e._values[t]=r,e.unmounted||e.forceUpdate()}t.__esModule=!0;var i=n(501),o=function(e){return e&&e.__esModule?e:{default:e}}(i),a={shouldComponentUpdate:function(){return!this._notifying}};t.default=(0,o.default)(a,r),e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})},function(e,t){function n(e){return!!a(e)}function r(e){var t=null!=e&&e.length;return"number"===typeof t&&t>=0&&t%1===0}function i(e){return Object(e)===e&&(r(e)||n(e))}function o(e){var t=a(e);if(t)return t.call(e)}function a(e){if(null!=e){var t=v&&e[v]||e["@@iterator"];if("function"===typeof t)return t}}function s(e){if(null!=e){var t=o(e);if(t)return t;if(r(e))return new u(e)}}function u(e){this._o=e,this._i=0}function l(e,t,n){if(null!=e){if("function"===typeof e.forEach)return e.forEach(t,n);var i=0,a=o(e);if(a){for(var s;!(s=a.next()).done;)if(t.call(n,s.value,i++,e),i>9999999)throw new TypeError("Near-infinite iteration.")}else if(r(e))for(;i=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}},t.forEach=l;var g="function"===typeof Symbol&&Symbol.asyncIterator,b=g||"@@asyncIterator";t.$$asyncIterator=b,t.isAsyncIterable=c,t.getAsyncIterator=f,t.getAsyncIteratorMethod=p,t.createAsyncIterator=d,h.prototype[b]=function(){return this},h.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})},t.forAwaitEach=m},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=void 0,o=Array.isArray(e),a=[e],c=-1,f=[],p=void 0,d=void 0,h=void 0,m=[],v=[],y=e;do{c++;var g=c===a.length,b=g&&0!==f.length;if(g){if(d=0===v.length?void 0:m[m.length-1],p=h,h=v.pop(),b){if(o)p=p.slice();else{var E={};for(var O in p)p.hasOwnProperty(O)&&(E[O]=p[O]);p=E}for(var T=0,_=0;_1&&r>1&&o[n-1]===a[r-2]&&o[n-2]===a[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+l))}return i[s][u]}t.a=r},function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e,n){for(var r=t(e),i=r,o=0;ol);c++){var f=e.getLine(u++);a=null==a?f:a+"\n"+f}s*=2,t.lastIndex=o.ch;var p=t.exec(a);if(p){var d=a.slice(0,p.index).split("\n"),h=p[0].split("\n"),v=o.line+d.length-1,y=d[d.length-1].length;return{from:m(v,y),to:m(v+h.length-1,1==h.length?y+h[0].length:h[h.length-1].length),match:p}}}}function a(e,t){for(var n,r=0;;){t.lastIndex=r;var i=t.exec(e);if(!i)return n;if(n=i,(r=n.index+(n[0].length||1))==e.length)return n}}function s(e,t,r){t=n(t,"g");for(var i=r.line,o=r.ch,s=e.firstLine();i>=s;i--,o=-1){var u=e.getLine(i);o>-1&&(u=u.slice(0,o));var l=a(u,t);if(l)return{from:m(i,l.index),to:m(i,l.index+l[0].length),match:l}}}function u(e,t,r){t=n(t,"gm");for(var i,o=1,s=r.line,u=e.firstLine();s>=u;){for(var l=0;l>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function c(e,t,n,r){if(!t.length)return null;var i=r?d:h,o=i(t).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,u=e.lastLine()+1-o.length;a<=u;a++,s=0){var c=e.getLine(a).slice(s),f=i(c);if(1==o.length){var p=f.indexOf(o[0]);if(-1==p)continue e;var n=l(c,f,p,i)+s;return{from:m(a,l(c,f,p,i)+s),to:m(a,l(c,f,p+o[0].length,i)+s)}}var v=f.length-o[0].length;if(f.slice(v)==o[0]){for(var y=1;y=u;a--,s=-1){var c=e.getLine(a);s>-1&&(c=c.slice(0,s));var f=i(c);if(1==o.length){var p=f.lastIndexOf(o[0]);if(-1==p)continue e;return{from:m(a,l(c,f,p,i)),to:m(a,l(c,f,p+o[0].length,i))}}var v=o[o.length-1];if(f.slice(0,v.length)==v){for(var y=1,n=a-o.length+1;y0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})},function(e,t,n){!function(e){e(n(12))}(function(e){function t(t,n,r){var i,o=t.getWrapperElement();return i=o.appendChild(document.createElement("div")),i.className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(r,i,o){function a(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),c.focus(),o.onClose&&o.onClose(u)}}o||(o={}),n(this,null);var s,u=t(this,r,o.bottom),l=!1,c=this,f=u.getElementsByTagName("input")[0];return f?(f.focus(),o.value&&(f.value=o.value,!1!==o.selectValueOnOpen&&f.select()),o.onInput&&e.on(f,"input",function(e){o.onInput(e,f.value,a)}),o.onKeyUp&&e.on(f,"keyup",function(e){o.onKeyUp(e,f.value,a)}),e.on(f,"keydown",function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,a)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),a()),13==t.keyCode&&i(f.value,t))}),!1!==o.closeOnBlur&&e.on(f,"blur",a)):(s=u.getElementsByTagName("button")[0])&&(e.on(s,"click",function(){a(),c.focus()}),!1!==o.closeOnBlur&&e.on(s,"blur",a),s.focus()),a}),e.defineExtension("openConfirm",function(r,i,o){function a(){l||(l=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),c.focus())}n(this,null);var s=t(this,r,o&&o.bottom),u=s.getElementsByTagName("button"),l=!1,c=this,f=1;u[0].focus();for(var p=0;p=t.character)return n=a,r=v({},o),i=e.current(),"BREAK"});return{start:o.start,end:o.end,string:i||o.string,state:r||o.state,style:n||o.style}}function p(e,t){for(var n=e.split("\n"),r=(0,g.onlineParser)(),i=r.startState(),o="",a=new g.CharacterStream(""),s=0;s1)return void e.reportError("Field "+t.name+"."+n.name+" can only be defined once.",r);Object(D.L)(n.type)||e.reportError("The type of "+t.name+"."+n.name+" must be Output Type but got: "+String(n.type)+".",_(t,n.name));var i=Object.create(null);n.args.forEach(function(r){var o=r.name;l(e,r),i[o]&&e.reportError("Field argument "+t.name+"."+n.name+"("+o+":) can only be defined once.",C(t,n.name,o)),i[o]=!0,Object(D.D)(r.type)||e.reportError("The type of "+t.name+"."+n.name+"("+o+":) must be Input Type but got: "+String(r.type)+".",k(t,n.name,o))})})}function p(e,t){var n=Object.create(null);t.getInterfaces().forEach(function(r){if(n[r.name])return void e.reportError("Type "+t.name+" can only implement "+r.name+" once.",E(t,r));n[r.name]=!0,d(e,t,r)})}function d(e,t,n){if(!Object(D.E)(n))return void e.reportError("Type "+String(t)+" must only implement Interface types, it cannot implement "+String(n)+".",b(t,n));var r=t.getFields(),i=n.getFields();Object.keys(i).forEach(function(o){var a=r[o],s=i[o];if(!a)return void e.reportError("Interface field "+n.name+"."+o+" expected but "+t.name+" does not provide it.",[O(n,o),t.astNode]);Object(V.c)(e.schema,a.type,s.type)||e.reportError("Interface field "+n.name+"."+o+" expects type "+String(s.type)+" but "+t.name+"."+o+" is type "+String(a.type)+".",[_(n,o),_(t,o)]),s.args.forEach(function(r){var i=r.name,s=Object(P.a)(a.args,function(e){return e.name===i});if(!s)return void e.reportError("Interface field argument "+n.name+"."+o+"("+i+":) expected but "+t.name+"."+o+" does not provide it.",[w(n,o,i),O(t,o)]);Object(V.b)(r.type,s.type)||e.reportError("Interface field argument "+n.name+"."+o+"("+i+":) expects type "+String(r.type)+" but "+t.name+"."+o+"("+i+":) is type "+String(s.type)+".",[k(n,o,i),k(t,o,i)])}),a.args.forEach(function(r){var i=r.name;!Object(P.a)(s.args,function(e){return e.name===i})&&Object(D.I)(r.type)&&e.reportError("Object field argument "+t.name+"."+o+"("+i+":) is of required type "+String(r.type)+" but is not also provided by the Interface field "+n.name+"."+o+".",[k(t,o,i),O(n,o)])})})}function h(e,t){var n=t.getTypes();0===n.length&&e.reportError("Union type "+t.name+" must define one or more member types.",t.astNode);var r=Object.create(null);n.forEach(function(n){if(r[n.name])return void e.reportError("Union type "+t.name+" can only include type "+n.name+" once.",x(t,n.name));r[n.name]=!0,Object(D.K)(n)||e.reportError("Union type "+t.name+" can only include Object types, it cannot include "+String(n)+".",x(t,String(n)))})}function m(e,t){var n=t.getValues();0===n.length&&e.reportError("Enum type "+t.name+" must define one or more values.",t.astNode),n.forEach(function(n){var r=n.name,i=j(t,r);i&&i.length>1&&e.reportError("Enum type "+t.name+" can include value "+r+" only once.",i),l(e,n),"true"!==r&&"false"!==r&&"null"!==r||e.reportError("Enum type "+t.name+" cannot include value: "+r+".",n.astNode)})}function v(e,t){var n=Object(F.a)(t.getFields());0===n.length&&e.reportError("Input Object type "+t.name+" must define one or more fields.",t.astNode),n.forEach(function(n){l(e,n),Object(D.D)(n.type)||e.reportError("The type of "+t.name+"."+n.name+" must be Input Type but got: "+String(n.type)+".",n.astNode&&n.astNode.type)})}function y(e){return e.astNode?e.extensionASTNodes?[e.astNode].concat(e.extensionASTNodes):[e.astNode]:e.extensionASTNodes||[]}function g(e){return e.astNode?e.extensionASTNodes?[e.astNode].concat(e.extensionASTNodes):[e.astNode]:e.extensionASTNodes||[]}function b(e,t){return E(e,t)[0]}function E(e,t){for(var n=[],r=y(e),i=0;i1)for(var n=1;n0)return this._typeStack[this._typeStack.length-1]},e.prototype.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},e.prototype.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},e.prototype.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},e.prototype.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},e.prototype.getDirective=function(){return this._directive},e.prototype.getArgument=function(){return this._argument},e.prototype.getEnumValue=function(){return this._enumValue},e.prototype.enter=function(e){var t=this._schema;switch(e.kind){case o.a.SELECTION_SET:var n=Object(a.x)(this.getType());this._parentTypeStack.push(Object(a.A)(n)?n:void 0);break;case o.a.FIELD:var r=this.getParentType(),i=void 0,s=void 0;r&&(i=this._getFieldDef(t,r,e))&&(s=i.type),this._fieldDefStack.push(i),this._typeStack.push(Object(a.L)(s)?s:void 0);break;case o.a.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case o.a.OPERATION_DEFINITION:var c=void 0;"query"===e.operation?c=t.getQueryType():"mutation"===e.operation?c=t.getMutationType():"subscription"===e.operation&&(c=t.getSubscriptionType()),this._typeStack.push(Object(a.K)(c)?c:void 0);break;case o.a.INLINE_FRAGMENT:case o.a.FRAGMENT_DEFINITION:var f=e.typeCondition,p=f?Object(u.a)(t,f):Object(a.x)(this.getType());this._typeStack.push(Object(a.L)(p)?p:void 0);break;case o.a.VARIABLE_DEFINITION:var d=Object(u.a)(t,e.type);this._inputTypeStack.push(Object(a.D)(d)?d:void 0);break;case o.a.ARGUMENT:var h=void 0,m=void 0,v=this.getDirective()||this.getFieldDef();v&&(h=Object(l.a)(v.args,function(t){return t.name===e.name.value}))&&(m=h.type),this._argument=h,this._inputTypeStack.push(Object(a.D)(m)?m:void 0);break;case o.a.LIST:var y=Object(a.y)(this.getInputType()),g=Object(a.G)(y)?y.ofType:y;this._inputTypeStack.push(Object(a.D)(g)?g:void 0);break;case o.a.OBJECT_FIELD:var b=Object(a.x)(this.getInputType()),E=void 0;if(Object(a.C)(b)){var O=b.getFields()[e.name.value];O&&(E=O.type)}this._inputTypeStack.push(Object(a.D)(E)?E:void 0);break;case o.a.ENUM:var T=Object(a.x)(this.getInputType()),_=void 0;Object(a.B)(T)&&(_=T.getValue(e.value)),this._enumValue=_}},e.prototype.leave=function(e){switch(e.kind){case o.a.SELECTION_SET:this._parentTypeStack.pop();break;case o.a.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case o.a.DIRECTIVE:this._directive=null;break;case o.a.OPERATION_DEFINITION:case o.a.INLINE_FRAGMENT:case o.a.FRAGMENT_DEFINITION:this._typeStack.pop();break;case o.a.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case o.a.ARGUMENT:this._argument=null,this._inputTypeStack.pop();break;case o.a.LIST:case o.a.OBJECT_FIELD:this._inputTypeStack.pop();break;case o.a.ENUM:this._enumValue=null}},e}()},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s){return 1===arguments.length?i(e.schema,e.document,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver):i(e,t,n,r,o,a,s)}function i(e,t,n,r,i,a,s){u(e,t,i);var f=l(e,t,n,r,i,a,s);return Array.isArray(f)?{errors:f}:o(f,c(f,f.operation,n))}function o(e,t){var n=Object(F.a)(t);return n?n.then(function(t){return o(e,t)}):0===e.errors.length?{data:t}:{errors:e.errors,data:t}}function a(e){for(var t=[],n=e;n;)t.push(n.key),n=n.prev;return t.reverse()}function s(e,t){return{prev:e,key:t}}function u(e,t,n){t||Object(R.a)(0,"Must provide document"),Object(Y.a)(e),n&&"object"!==("undefined"===typeof n?"undefined":J(n))&&Object(R.a)(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function l(e,t,n,r,i,o,a){for(var s=[],u=void 0,l=!1,c=Object.create(null),f=0;f=0;i--)t(n[i])}function a(e){for(var t=Object.keys(e),n=t.length,r=new Array(n),i=0;it.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}function p(e,t){var n=void 0,r=void 0,i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){var s=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+s))}return i[o][a]}Object.defineProperty(t,"__esModule",{value:!0}),t.getDefinitionState=r,t.getFieldDef=i,t.forEachState=o,t.objectValues=a,t.hintList=s;var d=n(14),h=n(207)},function(e,t,n){"use strict";function r(e){return void 0===e||e!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return s(e)||l(e)||f(e)||d(e)||m(e)||y(e)||b(e)||O(e)}function a(e){return o(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL type."),e}function s(e){return(0,J.default)(e,oe)}function u(e){return s(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Scalar type."),e}function l(e){return(0,J.default)(e,ae)}function c(e){return l(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Object type."),e}function f(e){return(0,J.default)(e,se)}function p(e){return f(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Interface type."),e}function d(e){return(0,J.default)(e,ue)}function h(e){return d(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Union type."),e}function m(e){return(0,J.default)(e,le)}function v(e){return m(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Enum type."),e}function y(e){return(0,J.default)(e,ce)}function g(e){return y(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Input Object type."),e}function b(e){return(0,J.default)(e,ie.GraphQLList)}function E(e){return b(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL List type."),e}function O(e){return(0,J.default)(e,ie.GraphQLNonNull)}function T(e){return O(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL Non-Null type."),e}function _(e){return s(e)||m(e)||y(e)||L(e)&&_(e.ofType)}function w(e){return _(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL input type."),e}function C(e){return s(e)||l(e)||f(e)||d(e)||m(e)||L(e)&&C(e.ofType)}function k(e){return C(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL output type."),e}function S(e){return s(e)||m(e)}function N(e){return S(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL leaf type."),e}function x(e){return l(e)||f(e)||d(e)}function j(e){return x(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL composite type."),e}function D(e){return f(e)||d(e)}function I(e){return D(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL abstract type."),e}function L(e){return b(e)||O(e)}function A(e){return L(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL wrapping type."),e}function P(e){return o(e)&&!O(e)}function M(e){return P(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL nullable type."),e}function F(e){if(e)return O(e)?e.ofType:e}function R(e){return s(e)||l(e)||f(e)||d(e)||m(e)||y(e)}function U(e){return R(e)||(0,Z.default)(0,"Expected "+String(e)+" to be a GraphQL named type."),e}function V(e){if(e){for(var t=e;L(t);)t=t.ofType;return t}}function B(e){return"function"===typeof e?e():e}function G(e,t){var n=B(t)||[];return Array.isArray(n)||(0,Z.default)(0,e.name+" interfaces must be an Array or a function which returns an Array."),n}function z(e,t){var n=B(t)||{};q(n)||(0,Z.default)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.create(null);return Object.keys(n).forEach(function(t){var i=n[t];q(i)||(0,Z.default)(0,e.name+"."+t+" field config must be an object"),i.hasOwnProperty("isDeprecated")&&(0,Z.default)(0,e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var o=$({},i,{isDeprecated:Boolean(i.deprecationReason),name:t});H(o.resolve)||(0,Z.default)(0,e.name+"."+t+" field resolver must be a function if provided, but got: "+String(o.resolve)+".");var a=i.args;a?(q(a)||(0,Z.default)(0,e.name+"."+t+" args must be an object with argument names as keys."),o.args=Object.keys(a).map(function(e){var t=a[e];return{name:e,description:void 0===t.description?null:t.description,type:t.type,defaultValue:t.defaultValue,astNode:t.astNode}})):o.args=[],r[t]=o}),r}function q(e){return e&&"object"===("undefined"===typeof e?"undefined":K(e))&&!Array.isArray(e)}function H(e){return null==e||"function"===typeof e}function W(e,t){var n=B(t)||[];return Array.isArray(n)||(0,Z.default)(0,"Must provide Array of types or a function which returns such an array for Union "+e.name+"."),n}function Q(e,t){return q(t)||(0,Z.default)(0,e.name+" values must be an object with value names as keys."),Object.keys(t).map(function(n){var r=t[n];return q(r)||(0,Z.default)(0,e.name+"."+n+' must refer to an object with a "value" key representing an internal value but got: '+String(r)+"."),r.hasOwnProperty("isDeprecated")&&(0,Z.default)(0,e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:n}})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLInputObjectType=t.GraphQLEnumType=t.GraphQLUnionType=t.GraphQLInterfaceType=t.GraphQLObjectType=t.GraphQLScalarType=void 0;var K="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],o=null;try{o=(0,f.parse)(e)}catch(t){var a=s(t.locations[0],e);return[{severity:h.ERROR,message:t.message,source:"GraphQL: Syntax",range:a}]}return i(o,t,n,r)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3];if(!t)return[];var i=o((0,d.validateWithCustomRules)(t,e,n,r),function(e){return a(e,h.ERROR,"Validation")}),s=f.findDeprecatedUsages?o((0,f.findDeprecatedUsages)(t,e),function(e){return a(e,h.WARNING,"Deprecation")}):[];return i.concat(s)}function o(e,t){return Array.prototype.concat.apply([],e.map(t))}function a(e,t,n){return e.nodes?e.nodes.map(function(r){var i="Variable"!==r.kind&&r.name?r.name:r.variable?r.variable:r;(0,c.default)(e.locations,"GraphQL validation error requires locations.");var o=e.locations[0],a=u(i),s=o.column+(a.end-a.start);return{source:"GraphQL: "+n,message:e.message,severity:t,range:new d.Range(new d.Position(o.line-1,o.column-1),new d.Position(o.line-1,s))}}):[]}function s(e,t){var n=(0,p.onlineParser)(),r=n.startState(),i=t.split("\n");(0,c.default)(i.length>=e.line,"Query text must have more lines than where the error happened");for(var o=null,a=0;a>",u=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+u+"` was not specified in `"+s+"`."):null;for(var l=arguments.length,c=Array(l>6?l-6:0),f=6;f>",s=o||n;if(null==t[n])return new Error("The "+i+" `"+s+"` is required to make `"+a+"` accessible for users of assistive technologies such as screen readers.");for(var u=arguments.length,l=Array(u>5?u-5:0),c=5;c=i)return new s(T.EOF,i,i,a,l,t);var h=_.call(r,o);if(h<32&&9!==h&&10!==h&&13!==h)throw Object(E.e)(n,o,"Cannot contain the invalid character "+u(h)+".");switch(h){case 33:return new s(T.BANG,o,o+1,a,l,t);case 35:return p(n,o,a,l,t);case 36:return new s(T.DOLLAR,o,o+1,a,l,t);case 38:return new s(T.AMP,o,o+1,a,l,t);case 40:return new s(T.PAREN_L,o,o+1,a,l,t);case 41:return new s(T.PAREN_R,o,o+1,a,l,t);case 46:if(46===_.call(r,o+1)&&46===_.call(r,o+2))return new s(T.SPREAD,o,o+3,a,l,t);break;case 58:return new s(T.COLON,o,o+1,a,l,t);case 61:return new s(T.EQUALS,o,o+1,a,l,t);case 64:return new s(T.AT,o,o+1,a,l,t);case 91:return new s(T.BRACKET_L,o,o+1,a,l,t);case 93:return new s(T.BRACKET_R,o,o+1,a,l,t);case 123:return new s(T.BRACE_L,o,o+1,a,l,t);case 124:return new s(T.PIPE,o,o+1,a,l,t);case 125:return new s(T.BRACE_R,o,o+1,a,l,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return b(n,o,a,l,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d(n,o,h,a,l,t);case 34:return 34===_.call(r,o+1)&&34===_.call(r,o+2)?v(n,o,a,l,t):m(n,o,a,l,t)}throw Object(E.e)(n,o,c(h))}function c(e){return 39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character "+u(e)+"."}function f(e,t,n){for(var r=e.length,i=t;i31||9===a));return new s(T.COMMENT,t,u,n,r,i,w.call(o,t+1,u))}function d(e,t,n,r,i,o){var a=e.body,l=n,c=t,f=!1;if(45===l&&(l=_.call(a,++c)),48===l){if((l=_.call(a,++c))>=48&&l<=57)throw Object(E.e)(e,c,"Invalid number, unexpected digit after 0: "+u(l)+".")}else c=h(e,c,l),l=_.call(a,c);return 46===l&&(f=!0,l=_.call(a,++c),c=h(e,c,l),l=_.call(a,c)),69!==l&&101!==l||(f=!0,l=_.call(a,++c),43!==l&&45!==l||(l=_.call(a,++c)),c=h(e,c,l)),new s(f?T.FLOAT:T.INT,t,c,r,i,o,w.call(a,t,c))}function h(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=_.call(r,++i)}while(o>=48&&o<=57);return i}throw Object(E.e)(e,i,"Invalid number, expected digit but got: "+u(o)+".")}function m(e,t,n,r,i){for(var o=e.body,a=t+1,l=a,c=0,f="";a=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function b(e,t,n,r,i){for(var o=e.body,a=o.length,u=t+1,l=0;u!==a&&null!==(l=_.call(o,u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new s(T.NAME,t,u,n,r,i,w.call(o,t,u))}t.b=r,n.d(t,"a",function(){return T}),t.c=a;var E=n(9),O=n(164),T=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),_=String.prototype.charCodeAt,w=String.prototype.slice;s.prototype.toJSON=s.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n,r){return t||Object(a.a)(0,"Must provide document"),Object(l.a)(e),o(e,r||new c.a(e),t,n||f.a)}function o(e,t,n,r){var i=new p(e,n,t),o=r.map(function(e){return e(i)});return Object(s.c)(n,Object(s.e)(t,Object(s.d)(o))),i.getErrors()}t.b=i,n.d(t,"a",function(){return p});var a=n(22),s=(n(9),n(46)),u=n(15),l=(n(21),n(72)),c=n(77),f=n(165),p=function(){function e(t,n,i){r(this,e),this._schema=t,this._ast=n,this._typeInfo=i,this._errors=[],this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}return e.prototype.reportError=function(e){this._errors.push(e)},e.prototype.getErrors=function(){return this._errors},e.prototype.getSchema=function(){return this._schema},e.prototype.getDocument=function(){return this._ast},e.prototype.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===u.a.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},Object.create(null))),t[e]},e.prototype.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var n=[e];0!==n.length;)for(var r=n.pop(),i=0;i2?", ":" ")+(r===t.length-1?"or ":"")+n})}t.a=r;var i=5},function(e,t,n){"use strict";function r(e,t,n){return"Expected type "+e+", found "+t+(n?"; "+n:".")}function i(e,t,n){return"Field "+e+"."+t+" of required type "+n+" was not provided."}function o(e,t,n){return'Field "'+t+'" is not defined by type '+e+(n?"; "+n:".")}function a(e){return{NullValue:function(t){var n=e.getInputType();Object(f.I)(n)&&e.reportError(new l.a(r(String(n),Object(c.a)(t)),t))},ListValue:function(t){var n=Object(f.y)(e.getParentInputType());if(!Object(f.G)(n))return s(e,t),!1},ObjectValue:function(t){var n=Object(f.x)(e.getInputType());if(!Object(f.C)(n))return s(e,t),!1;var r=n.getFields(),o=Object(d.a)(t.fields,function(e){return e.name.value});Object.keys(r).forEach(function(a){var s=r[a].type;!o[a]&&Object(f.I)(s)&&e.reportError(new l.a(i(n.name,a,String(s)),t))})},ObjectField:function(t){var n=Object(f.x)(e.getParentInputType());if(!e.getInputType()&&Object(f.C)(n)){var r=Object(m.a)(t.name.value,Object.keys(n.getFields())),i=0!==r.length?"Did you mean "+Object(h.a)(r)+"?":void 0;e.reportError(new l.a(o(n.name,t.name.value,i),t))}},EnumValue:function(t){var n=Object(f.x)(e.getInputType());Object(f.B)(n)?n.getValue(t.value)||e.reportError(new l.a(r(n.name,Object(c.a)(t),u(n,t)),t)):s(e,t)},IntValue:function(t){return s(e,t)},FloatValue:function(t){return s(e,t)},StringValue:function(t){return s(e,t)},BooleanValue:function(t){return s(e,t)}}}function s(e,t){var n=e.getInputType();if(n){var i=Object(f.x)(n);if(!Object(f.M)(i))return void e.reportError(new l.a(r(String(n),Object(c.a)(t),u(i,t)),t));try{var o=i.parseLiteral(t,void 0);Object(p.a)(o)&&e.reportError(new l.a(r(String(n),Object(c.a)(t)),t))}catch(i){e.reportError(new l.a(r(String(n),Object(c.a)(t),i.message),t,void 0,void 0,void 0,i))}}}function u(e,t){if(Object(f.B)(e)){var n=Object(m.a)(Object(c.a)(t),e.getValues().map(function(e){return e.name}));if(0!==n.length)return"Did you mean the enum value "+Object(h.a)(n)+"?"}}t.a=a;var l=n(9),c=n(33),f=n(11),p=n(25),d=n(35),h=n(109),m=n(59)},function(e,t,n){"use strict";function r(e,t,n){for(var r=[],i={},o=0;o=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){!function(e){e(n(12))}(function(e){function t(e,t,r){var i=e.getLineHandle(t.line),o=t.ch-1,u=r&&r.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var l=!u&&o>=0&&s[i.text.charAt(o)]||s[i.text.charAt(++o)];if(!l)return null;var c=">"==l.charAt(1)?1:-1;if(r&&r.strict&&c>0!=(o==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,o+1)),p=n(e,a(t.line,o+(c>0?1:0)),c,f||null,r);return null==p?null:{from:a(t.line,o),to:p&&p.pos,match:p&&p.ch==l.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,u=i&&i.maxScanLines||1e3,l=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),p=t.line;p!=f;p+=n){var d=e.getLine(p);if(d){var h=n>0?0:d.length-1,m=n>0?d.length:-1;if(!(d.length>o))for(p==t.line&&(h=t.ch-(n<0?1:0));h!=m;h+=n){var v=d.charAt(h);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(p,h+1))==r)){var y=s[v];if(">"==y.charAt(1)==n>0)l.push(v);else{if(!l.length)return{pos:a(p,h),ch:v};l.pop()}}}}}return p-n!=(n>0?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],u=e.listSelections(),l=0;l",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",i),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return(r||"boolean"==typeof n)&&(r?(r.strict=n,n=r):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(12),n(394))}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function r(e,t){for(var n=e.findMarks(f(t,0),f(t+1,0)),r=0;r=s&&(n=i(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function s(e,t,n){var i=e.state.foldGutter;if(i){var o=i.options;if(n==o.gutter){var a=r(e,t);a?a.clear():e.foldCode(f(t,0),o.rangeFinder)}}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&rt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i),s=a.indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(i,s)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var u=r(s.line+1);if(null==u)break;s=u.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,n){function r(n){if(nt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;;){if(null==r(a+1))break;++a}return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}})})},function(e,t,n){!function(e){e(n(12),n(61))}(function(e){"use strict";function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function n(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var r=e.getCursor();t(e,'Jump to line: (Use line:column or scroll% syntax)',"Jump to line:",r.line+1+":"+r.ch,function(t){if(t){var i;if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(o=r.line+o+1),e.setCursor(o-1,r.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,i[1]),r.ch)}})},e.keyMap.default["Alt-G"]="jumpToLine"})},function(e,t,n){!function(e){e(n(12),n(60),n(117))}(function(e){"use strict";function t(t,n,r){if(r<0&&0==n.ch)return t.clipPos(d(n.line-1));var i=t.getLine(n.line);if(r>0&&n.ch>=i.length)return t.clipPos(d(n.line+1,0));for(var o,a="start",s=n.ch,u=r<0?0:i.length,l=0;s!=u;s+=r,l++){var c=i.charAt(r<0?s-1:s),f="_"!=c&&e.isWordChar(c)?"w":"o";if("w"==f&&c.toUpperCase()==c&&(f="W"),"start"==a)"o"!=f&&(a="in",o=f);else if("in"==a&&o!=f){if("w"==o&&"W"==f&&r<0&&s--,"W"==o&&"w"==f&&r>0){o="w";continue}break}}return d(n.line,s)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):n<0?r.from():r.to()})}function r(t,n){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,r=[],i=-1,o=0;o=0;s--){var u=r[o[s]];if(!(l&&e.cmpPos(u.head,l)>0)){var c=i(t,u.head);l=c.from,t.replaceRange(n(c.word),c.from,c.to)}}})}function c(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function f(e,t){var n=c(e);if(n){var r=n.query,i=e.getSearchCursor(r,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(r,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}var p=e.commands,d=e.Pos;p.goSubwordLeft=function(e){n(e,-1)},p.goSubwordRight=function(e){n(e,1)},p.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},p.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},p.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],r=0;ri.line&&a==o.line&&0==o.ch||n.push({anchor:a==i.line?i:d(a,0),head:a==o.line?o:d(a)});e.setSelections(n,0)},p.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},p.selectLine=function(e){for(var t=e.listSelections(),n=[],r=0;ri?r.push(u,l):r.length&&(r[r.length-1]=l),i=l}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,d(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",d(i,0),null,"+swapLine")}t.setSelections(o),t.scrollIntoView()})},p.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],i=t.lastLine()+1,o=n.length-1;o>=0;o--){var a=n[o],s=a.to().line+1,u=a.from().line;0!=a.to().ch||a.empty()||s--,s=0;e-=2){var n=r[e],i=r[e+1],o=t.getLine(n);n==t.lastLine()?t.replaceRange("",d(n-1),d(n),"+swapLine"):t.replaceRange("",d(n,0),d(n+1,0),"+swapLine"),t.replaceRange(o+"\n",d(i,0),null,"+swapLine")}t.scrollIntoView()})},p.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},p.joinLines=function(e){for(var t=e.listSelections(),n=[],r=0;r=0;i--){var o=n[i].head,a=t.getRange({line:o.line,ch:0},o),s=e.countColumn(a,null,t.getOption("tabSize")),u=t.findPosH(o,-1,"char",!1);if(a&&!/\S/.test(a)&&s%r==0){var l=new d(o.line,e.findColumn(a,s-r,r));l.ch!=o.ch&&(u=l)}t.replaceRange("",u,o,"+delete")}})},p.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,d(t[n].to().line),"+delete");e.scrollIntoView()})},p.upcaseAtCursor=function(e){l(e,function(e){return e.toUpperCase()})},p.downcaseAtCursor=function(e){l(e,function(e){return e.toLowerCase()})},p.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},p.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},p.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},p.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},p.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},p.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},p.findUnder=function(e){f(e,!0)},p.findUnderPrevious=function(e){f(e,!1)},p.findAllUnder=function(e){var t=c(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var m=e.keyMap;m.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F9:"sortLines","Cmd-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(m.macSublime),m.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(m.pcSublime);var v=m.default==m.macDefault;m.sublime=v?m.macSublime:m.pcSublime})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(123);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}});var i=n(409);Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}});var o=n(410);Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return o.locatedError}});var a=n(216);Object.defineProperty(t,"printError",{enumerable:!0,get:function(){return a.printError}});var s=n(411);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return s.formatError}})},function(e,t,n){"use strict";function r(e,t,n,i,a,s,u){var l=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,c=n;if(!c&&l){var f=l[0];c=f&&f.loc&&f.loc.source}var p=i;!p&&l&&(p=l.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),p&&0===p.length&&(p=void 0);var d=void 0;if(i&&n){var h=n;d=i.map(function(e){return(0,o.getLocation)(h,e)})}else l&&(d=l.reduce(function(e,t){return t.loc&&e.push((0,o.getLocation)(t.loc.source,t.loc.start)),e},[]));Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:d||void 0,enumerable:!0},path:{value:a||void 0,enumerable:!0},nodes:{value:l||void 0},source:{value:c||void 0},positions:{value:p||void 0},originalError:{value:s},extensions:{value:u||s&&s.extensions}}),s&&s.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLError=r;var i=n(216),o=n(217);r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"},toString:{value:function(){return(0,i.printError)(this)}}})},function(e,t,n){"use strict";function r(e){var t=void 0;try{t=(0,u.parse)(e)}catch(e){return null}var n=i(e);return{outlineTrees:(0,u.visit)(t,{leave:function(e){return f.hasOwnProperty(e.kind)&&n[e.kind]?n[e.kind](e):null}})}}function i(e){var t=function(t){return{representativeName:t.name,startPosition:(0,c.offsetToPosition)(e,t.loc.start),endPosition:(0,c.offsetToPosition)(e,t.loc.end),children:t.selectionSet||[]}};return{Field:function(e){var n=e.alias?[o("plain",e.alias),o("plain",": ")]:[];return n.push(o("plain",e.name)),s({tokenizedText:n},t(e))},OperationDefinition:function(e){return s({tokenizedText:[o("keyword",e.operation),o("whitespace"," "),o("class-name",e.name)]},t(e))},Document:function(e){return e.definitions},SelectionSet:function(e){return a(e.selections,function(e){return e.kind===l.INLINE_FRAGMENT?e.selectionSet:e})},Name:function(e){return e.value},FragmentDefinition:function(e){return s({tokenizedText:[o("keyword","fragment"),o("whitespace"," "),o("class-name",e.name)]},t(e))},FragmentSpread:function(e){return s({tokenizedText:[o("plain","..."),o("class-name",e.name)]},t(e))},InlineFragment:function(e){return e.selectionSet}}}function o(e,t){return{kind:e,value:t}}function a(e,t){for(var n=[],r=0;r0?r:n)(e)}},function(e,t,n){var r=n(136)("keys"),i=n(89);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(23),i=n(37),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(88)?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(133);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(473),o=r(i),a=n(484),s=r(a),u="function"===typeof s.default&&"symbol"===typeof o.default?function(e){return typeof e}:function(e){return e&&"function"===typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"===typeof s.default&&"symbol"===u(o.default)?function(e){return"undefined"===typeof e?"undefined":u(e)}:function(e){return e&&"function"===typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":"undefined"===typeof e?"undefined":u(e)}},function(e,t,n){var r=n(50),i=n(477),o=n(137),a=n(135)("IE_PROTO"),s=function(){},u=function(){var e,t=n(234)("iframe"),r=o.length;for(t.style.display="none",n(478).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("