t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var se=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(u,s){var c,f="ltr"==s?"L":"R";if(0==u.length||"ltr"==s&&!n.test(u))return!1;for(var p=u.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){Te(e),ke(e)}function we(e){return e.target||e.srcElement}function xe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Ce,Ne=function(){if(a&&l<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Se){var t=O("span","");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Se?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Ce)return Ce;var t=N(e,document.createTextNode("AخA")),n=x(t,0,1).getBoundingClientRect(),r=x(t,1,2).getBoundingClientRect();return C(e),!(!n||n.left==n.right)&&(Ce=r.right-n.right<3)}var De,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me="oncopy"in(De=O("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Pe=null,Fe={},Re={};function je(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=je(t);var n=Fe[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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}var Ue={};function qe(e,t){var n=Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={};R(t,n)}function Be(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 Ge(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 Qe(e,t,n){return!e.startState||e.startState(t,n)}var ze=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(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?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function ut(e,t){for(var n=[],r=0;r=this.string.length},ze.prototype.sol=function(){return this.pos==this.lineStart},ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ze.prototype.next=function(){if(this.post},ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ze.prototype.skipToEnd=function(){this.pos=this.string.length},ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ze.prototype.backUp=function(e){this.pos-=e},ze.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},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var st=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,l=function(r){n.baseTokens=i;var l=e.state.overlays[r],u=1,s=0;n.state=!0,Tt(e,t.text,l.mode,n,function(e,t){for(var n=u;se&&i.splice(u,1,e,i[u+1],r),u+=2,s=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&Be(e.doc.mode,r.state),o=ft(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 dt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var u=Ke(o,l-1),s=u.stateAfter;if(s&&(!n||l+(s instanceof st?s.lookAhead:0)<=o.modeFrontier))return l;var c=j(u.text,null,e.options.tabSize);(null==i||r>c)&&(i=l-1,r=c)}return i}(e,t,n),a=o>r.first&&Ke(r,o-1).stateAfter,l=a?ct.fromSaved(r,a,o):new ct(r,Qe(r.mode),o);return r.iter(o,t,function(n){ht(e,n.text,l);var r=l.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.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof st?new ct(e,Be(e.mode,t.state),n,t.lookAhead):new ct(e,Be(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?Be(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new st(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o=e.doc,a=o.mode;t=lt(o,t);var l,u=Ke(o,t.line),s=dt(e,t.line,n),c=new ze(u.text,e.options.tabSize,s);for(r&&(l=[]);(r||c.pose.options.maxHighlightLength?(l=!1,a&&ht(e,t,r,f.pos),f.pos=t.length,u=null):u=bt(vt(n,f,r.state,p),o),p){var d=p[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!l||c!=u){for(;s=t:o.to>t);(r||(r=[])).push(new _t(a,o.from,u?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&l)for(var T=0;Tt)&&(!n||Lt(n,o.marker)<0)&&(n=o.marker)}return n}function Rt(e,t,n,r,i){var o=Ke(e,t),a=Et&&o.markedSpans;if(a)for(var l=0;l=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(s.to,n)>=0:tt(s.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(s.from,r)<=0:tt(s.from,r)<0)))return!0}}}function jt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ke(e,t),r=jt(n);return n==r?t:$e(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!qt(e,r))return t;for(;n=Pt(r);)r=n.find(1,!0).line;return $e(r)+1}function qt(e,t){var n=Et&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Kt=function(e,t,n){this.text=e,Ot(this,t),this.height=n?n(this):1};function Ht(e){e.parent=null,Nt(e)}Kt.prototype.lineNo=function(){return $e(this)},be(Kt);var Wt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Wt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=A("span",null,null,u?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Ae(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&$e(o);nn(o,r,pt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Xt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,o,u){if(t){var s,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;is&&f.from<=s);p++);if(f.to>=c)return e(n,r,i,o,a,l,u);e(n,r.slice(0,f.to-s),i,o,null,l,u),o=null,r=r.slice(f.to-s),s=f.to}}}function tn(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 nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,u,s,c,f,p,d=i.length,h=0,m=1,v="",g=0;;){if(g==h){u=s=c=l="",p=null,f=null,g=1/0;for(var y=[],b=void 0,T=0;Th||E.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&g>k.to&&(g=k.to,s=""),E.className&&(u+=" "+E.className),E.css&&(l=(l?l+";":"")+E.css),E.startStyle&&k.from==h&&(c+=" "+E.startStyle),E.endStyle&&k.to==g&&(b||(b=[])).push(E.endStyle,k.to),E.title&&((p||(p={})).title=E.title),E.attributes)for(var _ in E.attributes)(p||(p={}))[_]=E.attributes[_];E.collapsed&&(!f||Lt(f.marker,E)<0)&&(f=k)}else k.from>h&&g>k.from&&(g=k.from)}if(b)for(var w=0;w=d)break;for(var S=Math.min(d,g);;){if(v){var C=h+v.length;if(!f){var N=C>S?v.slice(0,S-h):v;t.addToken(t,N,a?a+u:u,c,h+N.length==g?s:"",l,p)}if(C>=S){v=v.slice(S-h),h=S;break}h=C,c=""}v=i.slice(o,o=n[m++]),a=$t(n[m++],t.cm.options)}}else for(var O=1;On)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function An(e,t,n,r){return In(e,Ln(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((u.bottom+s.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Fn(t.map,n,r),u=o.node,s=o.start,c=o.end,f=o.collapse;if(3==u.nodeType){for(var p=0;p<4;p++){for(;s&&ie(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+c1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;s>0&&(f=r="right"),i=e.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==r?d.length-1:0]:u.getBoundingClientRect()}if(a&&l<9&&!s&&(!i||!i.left&&!i.right)){var h=u.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+nr(e.display),top:h.top,bottom:h.bottom}:Pn}for(var m=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=u-l)-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],a="left";if("right"==n&&i==u-l)for(;s=0&&(n=e[i]).left==n.right;i--);return n}function jn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return a("before"==s?u-1:u,"before"==s);function c(e,t,n){var r=l[t],i=1==r.level;return a(n?e-1:e,i!=n)}var f=ue(l,u,s),p=le,d=c(u,f,"before"==s);return null!=p&&(d.other=c(u,p,"before"!=s)),d}function Wn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=nr(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Gt(r)+_n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,!0,-1);var i=Je(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ke(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=Ke(r,i);;){var l=er(e,a,i,t,n),u=Ft(a,l.ch+(l.xRel>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==i)return s;a=Ke(r,i=s.line)}}function Jn(e,t,n,r){r-=Gn(t);var i=t.text.length,o=ae(function(t){return In(e,n,t-1).bottom<=r},i,0);return i=ae(function(t){return In(e,n,t).top>r},o,i),{begin:o,end:i}}function Xn(e,t,n,r){n||(n=Ln(e,t));var i=Qn(e,t,In(e,n,r),"line").top;return Jn(e,t,n,i)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Gt(t);var o=Ln(e,t),a=Gn(t),l=0,u=t.text.length,s=!0,c=ce(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var l=Jn(e,t,r,a),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,f=null,p=0;p=s||d.to<=u)){var h=1!=d.level,m=In(e,r,h?Math.min(s,d.to)-1:Math.max(u,d.from)).right,v=mv)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.froms&&(c={from:c.from,to:s,level:c.level}),c}:function(e,t,n,r,i,o,a){var l=ae(function(l){var u=i[l],s=1!=u.level;return Zn(Hn(e,et(n,s?u.to:u.from,s?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),u=i[l];if(l>0){var s=1!=u.level,c=Hn(e,et(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Zn(c,o,a,!0)&&c.top>a&&(u=i[l-1])}return u})(e,t,n,o,c,r,i);s=1!=f.level,l=s?f.from:f.to-1,u=s?f.to:f.from-1}var p,d,h=null,m=null,v=ae(function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},l,u),g=!1;if(m){var y=r-m.left=T.bottom}return v=oe(t.text,v,1),Yn(n,v,d,g,r-p)}function tr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=O("pre");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(O("br"));Mn.appendChild(document.createTextNode("x"))}N(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),C(e.measure),n||1}function nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t]);N(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function or(e){var t=tr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/nr(e.display)-3);return function(i){if(qt(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;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Vt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var l=pr(e,t,t,-1),u=pr(e,n,n+r,1);l&&u?(i.view=i.view.slice(0,l.index).concat(on(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):fr(e)}var s=i.externalMeasured;s&&(n=i.lineN&&t=r.viewTo)){var o=r.view[ur(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=ur(e,t),a=e.display.view;if(!Et||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Vt(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 dr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().linet||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")}(m,n||0,null==r?p:r,function(e,t,i,f){var v="ltr"==i,g=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,T=null==r&&t==p,k=0==f,E=!m||f==m.length-1;if(y.top-g.top<=3){var _=(s?b:T)&&k,w=(s?T:b)&&E,x=_?l:(v?g:y).left,S=w?u:(v?y:g).right;c(x,g.top,S-x,g.bottom)}else{var C,N,O,A;v?(C=s&&b&&k?l:g.left,N=s?u:h(e,i,"before"),O=s?l:h(t,i,"after"),A=s&&T&&E?u:y.right):(C=s?h(e,i,"before"):l,N=!s&&b&&k?u:g.right,O=!s&&T&&E?l:y.left,A=s?h(t,i,"after"):u),c(C,g.top,N-C,g.bottom),g.bottom0?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 Tr(e){e.state.focused||(e.display.input.focus(),Er(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_r(e))},100)}function Er(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),br(e))}function _r(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(Ye(i.line,u),xr(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(s/nr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function xr(e){if(e.widgets)for(var t=0;t=a&&(o=Je(t,Gt(Ke(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Cr(e,t){var n=e.display,r=tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Nn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+wn(n),u=t.topl-r;if(t.topi+o){var c=Math.min(t.top,(s?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=Cn(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 Nr(e,t){null!=t&&(Dr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Or(e){Dr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ar(e,t,n){null==t&&null==n||Dr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Dr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Wn(e,t.from),r=Wn(e,t.to);Lr(e,n,r,t.margin)}}function Lr(e,t,n,r){var i=Cr(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});Ar(e,i.scrollLeft,i.scrollTop)}function Ir(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||oi(e,{top:t}),Mr(e,t,!0),n&&oi(e),ei(e,100))}function Mr(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 Pr(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,ui(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Rr=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),pe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Rr.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}},Rr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Rr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Rr.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},Rr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)})},Rr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var jr=function(){};function Vr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&wr(e),Ur(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(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=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var qr={native:Rr,null:jr};function Br(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(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?Pr(e,t):Ir(e,t)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Qr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function zr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Hr(e){var t=e.cm,n=t.display;e.updatedDisplay&&wr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(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+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Cn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Wr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(a=!0)),null!=s.scrollLeft&&(Pr(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=O("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-_n(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l=e.display.viewTo)){var n=+new Date+e.options.workTime,r=dt(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,l=o.text.length>e.options.maxHighlightLength?Be(t.mode,r.state):null,u=ft(e,o,r,!0);l&&(r.state=l),o.styles=u.styles;var s=o.styleClasses,c=u.classes;c?o.styleClasses=c:s&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),p=0;!f&&pn)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&$r(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==dr(e))return!1;si(e)&&(fr(e),t.dims=rr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Et&&(o=Vt(e.doc,o),a=Ut(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Gt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=dr(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=L();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return s>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return u&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var s=r.view,c=r.viewFrom,f=0;f-1&&(d=!1),cn(e,p,c,n)),d&&(C(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Ze(e.options,c)))),a=p.node.nextSibling}else{var h=gn(e,p,c,n);o.insertBefore(h,a)}c+=p.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),C(n.cursorDiv),C(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ei(e,400)),n.updateLineNumbers=null,!0}function ii(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Cn(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-Nn(e),n.top)}),t.visible=Sr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ri(e,t);r=!1){wr(e);var i=Fr(e);hr(e),Vr(e,i),li(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 oi(e,t){var n=new ni(e,t);if(ri(e,n)){wr(e),ii(e,n);var r=Fr(e);hr(e),Vr(e,r),li(e,r),n.finish()}}function ai(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function li(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+Sn(e)+"px"}function ui(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;al.clientWidth,c=l.scrollHeight>l.clientHeight;if(i&&s||o&&c){if(o&&y&&u)e:for(var p=t.target,d=a.view;p!=l;p=p.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var Ti=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return tt(e.from(),t.from())}),n=U(t,i);for(var o=1;o0:u>=0){var s=ot(l.from(),a.from()),c=it(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Ti(f?c:s,f?s:c))}}return new bi(t,n)}function Ei(e,t){return new bi([new Ti(e,t||e)],0)}function _i(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function wi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return _i(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+=_i(t).ch-t.to.ch),et(n,r)}function xi(e,t){for(var n=[],r=0;r1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}un(e,"change",e,t)}function Di(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;al-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=_i(t):o.changes.push(Pi(e,t));else{var u=Y(i.done);for(u&&u.ranges||Vi(e.sel,i.done),o={changes:[Pi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||me(e,"historyAdded")}function ji(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||function(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)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Vi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ui(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 qi(e){if(!e)return null;for(var t,n=0;n-1&&(Y(l)[f]=s[f],delete s[f])}}}return r}function Qi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ti(i,t)}return new Ti(n||t,t)}function zi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new bi([Qi(e.sel.primary(),t,n,i)],0),r)}function Ki(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:l.to>t.ch))){if(i&&(me(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var s=u.find(r<0?1:-1),c=void 0;if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(s=ro(e,s,-r,s&&s.line==t.line?o:null)),s&&s.line==t.line&&(c=tt(s,n))&&(r<0?c<0:c>0))return to(e,s,t,r,i)}var f=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(f=ro(e,f,r,f.line==t.line?o:null)),f?to(e,f,t,r,i):null}}return t}function no(e,t,n,r,i){var o=r||1,a=to(e,t,n,o,i)||!i&&to(e,t,n,o,!0)||to(e,t,n,-o,i)||!i&&to(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ro(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var c=[u,1],f=tt(s.from,l.from),p=tt(s.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:s.from,to:l.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:l.to,to:s.to}),i.splice.apply(i,c),u+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)lo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=xi(e,t);Ri(e,t,n,e.cm?e.cm.curOp.id:NaN),co(e,t,n,St(e,t));var r=[];Di(e,function(e,n){n||-1!=U(r,e.history)||(mo(e.history,t),r.push(e.history)),co(e,t,null,St(e,t))})}}function uo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,s=0;s=0;--d){var h=p(d);if(h)return h.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new bi($(e.sel.ranges,function(e){return new Ti(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){sr(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:et(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=He(e,t.from,t.to),n||(n=xi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,u=o.line;e.options.lineWrapping||(u=$e(jt(Ke(r,o.line))),r.iter(u,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ge(e),Ai(r,t,n,or(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=Qt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof st)||r+i.lookAhead1||!(this.children[0]instanceof go))){var l=[];this.collapse(l),this.children=[new go(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Rt(e,t.line,t,n,o)||t.line!=n.line&&Rt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&Ri(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,n.line+1,function(e){s&&o.collapsed&&!s.options.lineWrapping&&jt(e)==s.display.maxLine&&(l=!0),o.collapsed&&u!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new _t(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),o.collapsed&&e.iter(t.line,n.line+1,function(t){qt(e,t)&&Ye(t,0)}),o.clearOnEnter&&pe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),o.collapsed)sr(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)cr(s,c,"text");o.atomic&&Zi(s.doc),un(s,"markerAdded",s,o)}return o}Eo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Qr(e),ye(this,"clear")){var n=this.find();n&&un(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&sr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&un(e,"markerCleared",e,this,r,i),t&&zr(e),this.parent&&this.parent.clear()}},Eo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)ao(this,r[u]);l?Yi(this,l):this.cm&&Or(this.cm)}),undo:Zr(function(){uo(this,"undo")}),redo:Zr(function(){uo(this,"redo")}),undoSelection:Zr(function(){uo(this,"undo",!0)}),redoSelection:Zr(function(){uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(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 l=0;l=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}),lt(this,et(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ji(t.doc,Ei(n,n)),f)for(var p=0;p=0;t--)fo(e.doc,"",r[t].from,r[t].to,"+delete");Or(e)})}function Yo(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function $o(e,t,n){var r=Yo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Jo(e,t,n,r,i){if(e){var o=ce(n,t.doc.direction);if(o){var a,l=i<0?Y(o):o[0],u=i<0==(1==l.level),s=u?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=Ln(t,n);a=i<0?n.text.length-1:0;var f=In(t,c,a).top;a=ae(function(e){return In(t,c,e).top==f},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Yo(n,a,1))}else a=i<0?l.to:l.from;return new et(r,a,s)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Uo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Uo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Uo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Uo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Uo.default=y?Uo.macDefault:Uo.pcDefault;var Xo={selectAll:io,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Wo(e,function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ti(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return $r(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;r-1&&(tt((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,s=Jr(e,function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",s),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",f),he(i.scroller,"drop",s),o||(Te(t),r.addNew||zi(e.doc,n,null,null,r.extend),u||a&&9==l?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=s,s.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",s),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",s),kr(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;Te(t);var a,l,u=o.sel,s=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),a=l>-1?s[l]:new Ti(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ti(n,n)),n=lr(e,t,!0,!0),l=-1;else{var c=ha(e,n,r.unit);a=r.extend?Qi(a,c.anchor,c.head,r.extend):c}r.addNew?-1==l?(l=s.length,$i(o,ki(e,s.concat([a]),l),{scroll:!1,origin:"*mouse"})):s.length>1&&s[l].empty()&&"char"==r.unit&&!r.extend?($i(o,ki(e,s.slice(0,l).concat(s.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Hi(o,l,a,Q):(l=0,$i(o,new bi([a],0),Q),u=o.sel);var f=n;function p(t){if(0!=tt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],s=e.options.tabSize,c=j(Ke(o,n.line).text,n.ch,s),p=j(Ke(o,t.line).text,t.ch,s),d=Math.min(c,p),h=Math.max(c,p),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Ke(o,m).text,y=K(g,d,s);d==h?i.push(new Ti(et(m,y),et(m,y))):g.length>y&&i.push(new Ti(et(m,y),et(m,K(g,h,s))))}i.length||i.push(new Ti(n,n)),$i(o,ki(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,T=a,k=ha(e,t,r.unit),E=T.anchor;tt(k.anchor,E)>0?(b=k.head,E=ot(T.from(),k.anchor)):(b=k.anchor,E=it(T.to(),k.head));var _=u.ranges.slice(0);_[l]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=ue(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var u,s=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ue(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var p=o[s+(u?-1:0)],d=u==(1==p.level),h=d?p.from:p.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new Ti(new et(n.line,h,m),r)}(e,new Ti(lt(o,E),b)),$i(o,ki(e,_,l),Q)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(Te(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",v),he(i.wrapper.ownerDocument,"mouseup",g),o.history.lastSelOrigin=null}var v=Jr(e,function(t){0!==t.buttons&&xe(t)?function t(n){var a=++h,l=lr(e,n,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,f)){e.curOp.focus=L(),p(l);var u=Sr(i,o);(l.line>=u.to||l.lined.bottom?20:0;s&&setTimeout(Jr(e,function(){h==a&&(i.scroller.scrollTop+=s,t(n))}),50)}}(t):m(t)}),g=Jr(e,m);e.state.selectingText=g,pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",g)}(e,r,t,o)}(t,r,o,e):we(e)==n.scroller&&Te(e):2==i?(r&&zi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(_?t.display.input.onContextMenu(e):kr(t)))}}function ha(e,t,n){if("char"==n)return new Ti(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ti(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ti(r.from,r.to)}function ma(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&&Te(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ye(e,n))return Ee(t);o-=l.top-a.viewOffset;for(var u=0;u=i){var c=Je(e.doc,o),f=e.display.gutterSpecs[u];return me(e,n,e,c,f.className,t),Ee(t)}}}function va(e,t){return ma(e,t,"gutterClick",!0)}function ga(e,t){En(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ma(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||_||e.display.input.onContextMenu(t)}function ya(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}pa.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var ba={toString:function(){return"CodeMirror.Init"}},Ta={},ka={};function Ea(e,t,n){var r=n&&n!=ba;if(!t!=!r){var i=e.display.dragFunctions,o=t?pe:he;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function _a(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),zt(e)),ar(e),sr(e),Un(e),setTimeout(function(){return Vr(e)},100)}function wa(e,t){var n=this;if(!(this instanceof wa))return new wa(e,t);this.options=t=t?R(t):{},R(Ta,t,!1);var r=t.value;"string"==typeof r?r=new No(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new wa.inputStyles[t.inputStyle](this),o=this.display=new di(e,r,i,t);for(var s in o.wrapper.CodeMirror=this,ya(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Br(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 V,keySeq:null,specialChars:null},t.autofocus&&!g&&o.input.focus(),a&&l<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;pe(t.scroller,"mousedown",Jr(e,da)),pe(t.scroller,"dblclick",a&&l<11?Jr(e,function(t){if(!ve(e,t)){var n=lr(e,t);if(n&&!va(e,t)&&!En(e.display,t)){Te(t);var r=e.findWordAt(n);zi(e.doc,r.anchor,r.head)}}}):function(t){return ve(e,t)||Te(t)}),pe(t.scroller,"contextmenu",function(t){return ga(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!va(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),pe(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!En(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Ti(l,l):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(l):new Ti(et(l.line,0),lt(e.doc,et(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Te(n)}i()}),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ir(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))}),pe(t.scroller,"mousewheel",function(t){return yi(e,t)}),pe(t.scroller,"DOMMouseScroll",function(t){return yi(e,t)}),pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ve(e,t)||_e(t)},over:function(t){ve(e,t)||(function(e,t){var n=lr(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,r)}}(e,t),_e(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Oo<100))_e(t);else if(!ve(e,t)&&!En(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:Jr(e,Ao),leave:function(t){ve(e,t)||Do(e)}};var u=t.input.getField();pe(u,"keyup",function(t){return ua.call(e,t)}),pe(u,"keydown",Jr(e,la)),pe(u,"keypress",Jr(e,sa)),pe(u,"focus",function(t){return Er(e,t)}),pe(u,"blur",function(t){return _r(e,t)})}(this),Mo(),Qr(this),this.curOp.forceUpdate=!0,Li(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout(F(Er,this),20):_r(this),ka)ka.hasOwnProperty(s)&&ka[s](n,t[s],ba);si(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>o.first?j(Ke(o,t-1).text,null,a):0:"add"==n?s=u+e.options.indentUnit:"subtract"==n?s=u-e.options.indentUnit:"number"==typeof n&&(s=u+n),s=Math.max(0,s);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(s/a);d;--d)p+=a,f+="\t";if(pa,u=Le(t),s=null;if(l&&r.ranges.length>1)if(Ca&&Ca.text.join("\n")==t){if(r.ranges.length%Ca.text.length==0){s=[];for(var c=0;c=0;p--){var d=r.ranges[p],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!l?m=et(m.line,Math.min(Ke(o,m.line).text.length,m.ch+Y(u).length)):l&&Ca&&Ca.lineWise&&Ca.text.join("\n")==t&&(h=m=et(h.line,0)));var v={from:h,to:m,text:s?s[p%s.length]:u,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ao(e.doc,v),un(e,"inputRead",e,v)}t&&!l&&Da(e,t),Or(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||$r(t,function(){return Oa(t,n,0,null,"paste")}),!0}function Da(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 l=0;l-1){a=Sa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Sa(e,i.head.line,"smart"));a&&un(e,"electricInput",e,i.head.line)}}}function La(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(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 et(n.line,p,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,u(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),s=l?r.begin:u(r.end,-1);if(a.from<=s&&s0?c.end:u(c.begin,-1);return null==v||r>0&&v==t.text.length||!(m=h(r>0?0:i.length-1,r,s(v)))?null:m}(e.cm,l,t,n):$o(l,t,n))){if(r||((a=t.line+n)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(l=Ke(e,a)))))return!1;t=Jo(i,e.cm,l,t.line,n)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var s=null,c="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var d=l.text.charAt(t.ch)||"\n",h=te(d,f)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||p||h||(h="s"),s&&s!=h){n<0&&(n=1,u(),t.sticky="after");break}if(h&&(s=h),n>0&&!u(!p))break}var m=no(e,t,o,a,!0);return nt(o,m)&&(m.hitSide=!0),m}function Fa(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(u-.5*tr(e.display),3);i=(n>0?t.bottom:t.top)+n*s}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=$n(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ra=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function ja(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=On(n,r,t.line),o=ce(r,e.doc.direction),a="left";if(o){var l=ue(o,t.ch);a=l%2?"right":"left"}var u=Fn(i.map,t.ch,a);return u.offset="right"==u.collapse?u.end:u.start,u}function Va(e,t){return t&&(e.bad=!0),e}function Ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&ja(t,i)||{node:u[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=et(a.line-1,Ke(r.doc,a.line-1).length)),l.ch==Ke(r.doc,l.line).text.length&&l.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ur(r,a.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,s,c=ur(r,l.line);if(c==i.view.length-1?(u=i.viewTo-1,s=i.lineDiv.lastChild):(u=$e(i.view[c+1].line)-1,s=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),u=!1;function s(){a&&(o+=l,u&&(o+=l),a=u=!1)}function c(e){e&&(s(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(et(r,0),et(i+1,0),(v=+p,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c(He(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&s();for(var m=0;m1&&p.length>1;)if(Y(f)==Y(p))f.pop(),p.pop(),u--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,m=f[0],v=p[0],g=Math.min(m.length,v.length);da.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var k=et(t,d),E=et(u,p.length?Y(p).length-h:0);return f.length>1||f[0]||tt(k,E)?(fo(r.doc,f,k,E,"+input"),!0):void 0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.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))},Ra.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||$r(this.cm,function(){return sr(e.cm)})},Ra.prototype.setUneditable=function(e){e.contentEditable="false"},Ra.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Jr(this.cm,Oa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ra.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;var Ba=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};Ba.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(r,e)){if(r.somethingSelected())Na({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=La(r);Na({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,G):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),pe(i,"paste",function(e){ve(r,e)||Aa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",function(t){if(!En(e,t)&&!ve(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),pe(e.lineSpace,"selectstart",function(t){En(e,t)||Te(t)}),pe(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ba.prototype.createField=function(e){this.wrapper=Ma(),this.textarea=this.wrapper.firstChild},Ba.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=mr(e);if(e.options.moveInputWithCursor){var i=Hn(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},Ba.prototype.showSelection=function(e){var t=this.cm,n=t.display;N(n.cursorDiv,e.cursors),N(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ba.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&&P(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},Ba.prototype.getField=function(){return this.textarea},Ba.prototype.supportsTouch=function(){return!1},Ba.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ba.prototype.blur=function(){this.textarea.blur()},Ba.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ba.prototype.receivedFocus=function(){this.slowPoll()},Ba.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ba.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Ba.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(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(a&&l>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,s=Math.min(r.length,i.length);u1e3||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},Ba.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ba.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},Ba.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=lr(n,e),s=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Jr(n,$i)(n.doc,Ei(o),G);var p,d=i.style.cssText,h=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(p=window.scrollY),r.input.focus(),u&&window.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&g(),_){_e(e);var v=function(){he(window,"mouseup",v),setTimeout(y,20)};pe(window,"mouseup",v)}else setTimeout(y,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=s),null!=i.selectionStart)){(!a||a&&l<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Jr(n,io)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ba.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ba.prototype.setUneditable=function(){},Ba.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=ba&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ba,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,Ci(e)},!0),n("indentUnit",2,Ci,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){Ni(e),Un(e),sr(e)},!0),n("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(et(r,o))}r++});for(var i=n.length-1;i>=0;i--)fo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}}),n("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!=ba&&e.refresh()}),n("specialCharPlaceholder",Xt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){ya(e),pi(e)},!0),n("keyMap","default",function(e,t,n){var r=Ho(t),i=n!=ba&&Ho(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=ci(t,e.options.lineNumbers),pi(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ir(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Vr(e)},!0),n("scrollbarStyle","native",function(e){Br(e),Vr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ci(e.options.gutters,t),pi(e)},!0),n("firstLineNumber",1,pi,!0),n("lineNumberFormatter",function(e){return e},pi,!0),n("showCursorWhenSelecting",!1,hr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(_r(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Ea),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,hr,!0),n("singleCursorHeightPerLine",!0,hr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ni,!0),n("addModeClass",!1,Ni,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,Ni,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}(wa),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)&&Jr(this,t[e])(this,n,i),me(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"](Ho(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Sa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Or(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u0&&Hi(this.doc,r,new Ti(o,s[r].to()),G)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=pt(this,Ke(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=Ke(this.doc,e)}else r=e;return Qn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,l,u=this.display,s=(e=Hn(this,lt(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),u.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var f=Math.max(u.wrapper.clientHeight,this.doc.height),p=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(s=e.bottom),c+t.offsetWidth>p&&(c=p-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(c=u.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(u.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:s,right:c+t.offsetWidth,bottom:s+t.offsetHeight},null!=(l=Cr(o,a)).scrollTop&&Ir(o,l.scrollTop),null!=l.scrollLeft&&Pr(o,l.scrollLeft))},triggerOnKeyDown:Xr(la),triggerOnKeyPress:Xr(sa),triggerOnKeyUp:ua,triggerOnMouseDown:Xr(da),execCommand:function(e){if(Xo.hasOwnProperty(e))return Xo[e].call(null,this)},triggerElectric:Xr(function(e){Da(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=lt(this.doc,e),a=0;a0&&l(n.charAt(r-1));)--r;for(;i.5)&&ar(this),me(this,"refresh",this)}),swapDoc:Xr(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Li(this,e),Un(this),this.display.input.reset(),Ar(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,un(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(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})}}(wa);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Qa in No.prototype)No.prototype.hasOwnProperty(Qa)&&U(Ga,Qa)<0&&(wa.prototype[Qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(No.prototype[Qa]));return be(No),wa.inputStyles={textarea:Ba,contenteditable:Ra},wa.defineMode=function(e){wa.defaults.mode||"null"==e||(wa.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}.apply(this,arguments)},wa.defineMIME=function(e,t){Re[e]=t},wa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wa.defineMIME("text/plain","null"),wa.defineExtension=function(e,t){wa.prototype[e]=t},wa.defineDocExtension=function(e,t){No.prototype[e]=t},wa.fromTextArea=function(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var l=wa(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=he,e.on=pe,e.wheelEventPixels=gi,e.Doc=No,e.splitLines=Le,e.countColumn=j,e.findColumn=K,e.isWordChar=ee,e.Pass=B,e.signal=me,e.Line=Kt,e.changeEnd=_i,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=Fe,e.mimeModes=Re,e.resolveMode=je,e.getMode=Ve,e.modeExtensions=Ue,e.extendMode=qe,e.copyState=Be,e.startState=Qe,e.innerMode=Ge,e.commands=Xo,e.keyMap=Uo,e.keyName=Ko,e.isModifierKey=Qo,e.lookupKey=Go,e.normalizeKeyMap=Bo,e.StringStream=ze,e.SharedTextMarker=wo,e.TextMarker=Eo,e.LineWidget=bo,e.e_preventDefault=Te,e.e_stopPropagation=ke,e.e_stop=_e,e.addClass=I,e.contains=D,e.rmClass=S,e.keyNames=Fo}(wa),wa.version="5.47.0",wa}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u(e,[])};var r,i=(r=n(89))&&r.__esModule?r:{default:r};function o(e){return(o="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})(e)}var a=10,l=2;function u(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]);if(e){var r=function(e){var t=e[String(i.default)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var o=r.call(e);if(o!==e)return"string"==typeof o?o:u(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>l)return"[Array]";for(var n=Math.min(a,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>l)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n)return n}return t}(e)+"]";return"{ "+n.map(function(n){var r=u(e[n],t);return n+": "+r}).join(", ")+" }"}(e,n)}return String(e)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return r.validate}}),Object.defineProperty(t,"ValidationContext",{enumerable:!0,get:function(){return i.ValidationContext}}),Object.defineProperty(t,"specifiedRules",{enumerable:!0,get:function(){return o.specifiedRules}}),Object.defineProperty(t,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return a.FieldsOnCorrectType}}),Object.defineProperty(t,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return l.FragmentsOnCompositeTypes}}),Object.defineProperty(t,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return u.KnownArgumentNames}}),Object.defineProperty(t,"KnownDirectivesRule",{enumerable:!0,get:function(){return s.KnownDirectives}}),Object.defineProperty(t,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return c.KnownFragmentNames}}),Object.defineProperty(t,"KnownTypeNamesRule",{enumerable:!0,get:function(){return f.KnownTypeNames}}),Object.defineProperty(t,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return p.LoneAnonymousOperation}}),Object.defineProperty(t,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return d.NoFragmentCycles}}),Object.defineProperty(t,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return h.NoUndefinedVariables}}),Object.defineProperty(t,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return m.NoUnusedFragments}}),Object.defineProperty(t,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return v.NoUnusedVariables}}),Object.defineProperty(t,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return g.OverlappingFieldsCanBeMerged}}),Object.defineProperty(t,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return y.PossibleFragmentSpreads}}),Object.defineProperty(t,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return b.ProvidedRequiredArguments}}),Object.defineProperty(t,"ScalarLeafsRule",{enumerable:!0,get:function(){return T.ScalarLeafs}}),Object.defineProperty(t,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return k.SingleFieldSubscriptions}}),Object.defineProperty(t,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return E.UniqueArgumentNames}}),Object.defineProperty(t,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return _.UniqueDirectivesPerLocation}}),Object.defineProperty(t,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return w.UniqueFragmentNames}}),Object.defineProperty(t,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return x.UniqueInputFieldNames}}),Object.defineProperty(t,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return S.UniqueOperationNames}}),Object.defineProperty(t,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return C.UniqueVariableNames}}),Object.defineProperty(t,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return N.ValuesOfCorrectType}}),Object.defineProperty(t,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return O.VariablesAreInputTypes}}),Object.defineProperty(t,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return A.VariablesInAllowedPosition}});var r=n(50),i=n(71),o=n(95),a=n(104),l=n(101),u=n(113),s=n(111),c=n(68),f=n(100),p=n(98),d=n(107),h=n(109),m=n(69),v=n(110),g=n(117),y=n(106),b=n(115),T=n(103),k=n(99),E=n(114),_=n(112),w=n(105),x=n(118),S=n(97),C=n(108),N=n(70),O=n(102),A=n(116)},function(e,t,n){"use strict";n.r(t);var r=n(61);n.d(t,"graphql",function(){return r.graphql}),n.d(t,"graphqlSync",function(){return r.graphqlSync});var i=n(0);n.d(t,"GraphQLSchema",function(){return i.GraphQLSchema}),n.d(t,"GraphQLDirective",function(){return i.GraphQLDirective}),n.d(t,"GraphQLScalarType",function(){return i.GraphQLScalarType}),n.d(t,"GraphQLObjectType",function(){return i.GraphQLObjectType}),n.d(t,"GraphQLInterfaceType",function(){return i.GraphQLInterfaceType}),n.d(t,"GraphQLUnionType",function(){return i.GraphQLUnionType}),n.d(t,"GraphQLEnumType",function(){return i.GraphQLEnumType}),n.d(t,"GraphQLInputObjectType",function(){return i.GraphQLInputObjectType}),n.d(t,"GraphQLList",function(){return i.GraphQLList}),n.d(t,"GraphQLNonNull",function(){return i.GraphQLNonNull}),n.d(t,"specifiedScalarTypes",function(){return i.specifiedScalarTypes}),n.d(t,"GraphQLInt",function(){return i.GraphQLInt}),n.d(t,"GraphQLFloat",function(){return i.GraphQLFloat}),n.d(t,"GraphQLString",function(){return i.GraphQLString}),n.d(t,"GraphQLBoolean",function(){return i.GraphQLBoolean}),n.d(t,"GraphQLID",function(){return i.GraphQLID}),n.d(t,"specifiedDirectives",function(){return i.specifiedDirectives}),n.d(t,"GraphQLIncludeDirective",function(){return i.GraphQLIncludeDirective}),n.d(t,"GraphQLSkipDirective",function(){return i.GraphQLSkipDirective}),n.d(t,"GraphQLDeprecatedDirective",function(){return i.GraphQLDeprecatedDirective}),n.d(t,"TypeKind",function(){return i.TypeKind}),n.d(t,"DEFAULT_DEPRECATION_REASON",function(){return i.DEFAULT_DEPRECATION_REASON}),n.d(t,"introspectionTypes",function(){return i.introspectionTypes}),n.d(t,"__Schema",function(){return i.__Schema}),n.d(t,"__Directive",function(){return i.__Directive}),n.d(t,"__DirectiveLocation",function(){return i.__DirectiveLocation}),n.d(t,"__Type",function(){return i.__Type}),n.d(t,"__Field",function(){return i.__Field}),n.d(t,"__InputValue",function(){return i.__InputValue}),n.d(t,"__EnumValue",function(){return i.__EnumValue}),n.d(t,"__TypeKind",function(){return i.__TypeKind}),n.d(t,"SchemaMetaFieldDef",function(){return i.SchemaMetaFieldDef}),n.d(t,"TypeMetaFieldDef",function(){return i.TypeMetaFieldDef}),n.d(t,"TypeNameMetaFieldDef",function(){return i.TypeNameMetaFieldDef}),n.d(t,"isSchema",function(){return i.isSchema}),n.d(t,"isDirective",function(){return i.isDirective}),n.d(t,"isType",function(){return i.isType}),n.d(t,"isScalarType",function(){return i.isScalarType}),n.d(t,"isObjectType",function(){return i.isObjectType}),n.d(t,"isInterfaceType",function(){return i.isInterfaceType}),n.d(t,"isUnionType",function(){return i.isUnionType}),n.d(t,"isEnumType",function(){return i.isEnumType}),n.d(t,"isInputObjectType",function(){return i.isInputObjectType}),n.d(t,"isListType",function(){return i.isListType}),n.d(t,"isNonNullType",function(){return i.isNonNullType}),n.d(t,"isInputType",function(){return i.isInputType}),n.d(t,"isOutputType",function(){return i.isOutputType}),n.d(t,"isLeafType",function(){return i.isLeafType}),n.d(t,"isCompositeType",function(){return i.isCompositeType}),n.d(t,"isAbstractType",function(){return i.isAbstractType}),n.d(t,"isWrappingType",function(){return i.isWrappingType}),n.d(t,"isNullableType",function(){return i.isNullableType}),n.d(t,"isNamedType",function(){return i.isNamedType}),n.d(t,"isRequiredArgument",function(){return i.isRequiredArgument}),n.d(t,"isRequiredInputField",function(){return i.isRequiredInputField}),n.d(t,"isSpecifiedScalarType",function(){return i.isSpecifiedScalarType}),n.d(t,"isIntrospectionType",function(){return i.isIntrospectionType}),n.d(t,"isSpecifiedDirective",function(){return i.isSpecifiedDirective}),n.d(t,"assertSchema",function(){return i.assertSchema}),n.d(t,"assertDirective",function(){return i.assertDirective}),n.d(t,"assertType",function(){return i.assertType}),n.d(t,"assertScalarType",function(){return i.assertScalarType}),n.d(t,"assertObjectType",function(){return i.assertObjectType}),n.d(t,"assertInterfaceType",function(){return i.assertInterfaceType}),n.d(t,"assertUnionType",function(){return i.assertUnionType}),n.d(t,"assertEnumType",function(){return i.assertEnumType}),n.d(t,"assertInputObjectType",function(){return i.assertInputObjectType}),n.d(t,"assertListType",function(){return i.assertListType}),n.d(t,"assertNonNullType",function(){return i.assertNonNullType}),n.d(t,"assertInputType",function(){return i.assertInputType}),n.d(t,"assertOutputType",function(){return i.assertOutputType}),n.d(t,"assertLeafType",function(){return i.assertLeafType}),n.d(t,"assertCompositeType",function(){return i.assertCompositeType}),n.d(t,"assertAbstractType",function(){return i.assertAbstractType}),n.d(t,"assertWrappingType",function(){return i.assertWrappingType}),n.d(t,"assertNullableType",function(){return i.assertNullableType}),n.d(t,"assertNamedType",function(){return i.assertNamedType}),n.d(t,"getNullableType",function(){return i.getNullableType}),n.d(t,"getNamedType",function(){return i.getNamedType}),n.d(t,"validateSchema",function(){return i.validateSchema}),n.d(t,"assertValidSchema",function(){return i.assertValidSchema});var o=n(10);n.d(t,"Source",function(){return o.Source}),n.d(t,"getLocation",function(){return o.getLocation}),n.d(t,"createLexer",function(){return o.createLexer}),n.d(t,"TokenKind",function(){return o.TokenKind}),n.d(t,"parse",function(){return o.parse}),n.d(t,"parseValue",function(){return o.parseValue}),n.d(t,"parseType",function(){return o.parseType}),n.d(t,"print",function(){return o.print}),n.d(t,"visit",function(){return o.visit}),n.d(t,"visitInParallel",function(){return o.visitInParallel}),n.d(t,"visitWithTypeInfo",function(){return o.visitWithTypeInfo}),n.d(t,"getVisitFn",function(){return o.getVisitFn}),n.d(t,"BREAK",function(){return o.BREAK}),n.d(t,"Kind",function(){return o.Kind}),n.d(t,"DirectiveLocation",function(){return o.DirectiveLocation}),n.d(t,"isDefinitionNode",function(){return o.isDefinitionNode}),n.d(t,"isExecutableDefinitionNode",function(){return o.isExecutableDefinitionNode}),n.d(t,"isSelectionNode",function(){return o.isSelectionNode}),n.d(t,"isValueNode",function(){return o.isValueNode}),n.d(t,"isTypeNode",function(){return o.isTypeNode}),n.d(t,"isTypeSystemDefinitionNode",function(){return o.isTypeSystemDefinitionNode}),n.d(t,"isTypeDefinitionNode",function(){return o.isTypeDefinitionNode}),n.d(t,"isTypeSystemExtensionNode",function(){return o.isTypeSystemExtensionNode}),n.d(t,"isTypeExtensionNode",function(){return o.isTypeExtensionNode});var a=n(29);n.d(t,"execute",function(){return a.execute}),n.d(t,"defaultFieldResolver",function(){return a.defaultFieldResolver}),n.d(t,"defaultTypeResolver",function(){return a.defaultTypeResolver}),n.d(t,"responsePathAsArray",function(){return a.responsePathAsArray}),n.d(t,"getDirectiveValues",function(){return a.getDirectiveValues});var l=n(75);n.d(t,"subscribe",function(){return l.subscribe}),n.d(t,"createSourceEventStream",function(){return l.createSourceEventStream});var u=n(7);n.d(t,"validate",function(){return u.validate}),n.d(t,"ValidationContext",function(){return u.ValidationContext}),n.d(t,"specifiedRules",function(){return u.specifiedRules}),n.d(t,"FieldsOnCorrectTypeRule",function(){return u.FieldsOnCorrectTypeRule}),n.d(t,"FragmentsOnCompositeTypesRule",function(){return u.FragmentsOnCompositeTypesRule}),n.d(t,"KnownArgumentNamesRule",function(){return u.KnownArgumentNamesRule}),n.d(t,"KnownDirectivesRule",function(){return u.KnownDirectivesRule}),n.d(t,"KnownFragmentNamesRule",function(){return u.KnownFragmentNamesRule}),n.d(t,"KnownTypeNamesRule",function(){return u.KnownTypeNamesRule}),n.d(t,"LoneAnonymousOperationRule",function(){return u.LoneAnonymousOperationRule}),n.d(t,"NoFragmentCyclesRule",function(){return u.NoFragmentCyclesRule}),n.d(t,"NoUndefinedVariablesRule",function(){return u.NoUndefinedVariablesRule}),n.d(t,"NoUnusedFragmentsRule",function(){return u.NoUnusedFragmentsRule}),n.d(t,"NoUnusedVariablesRule",function(){return u.NoUnusedVariablesRule}),n.d(t,"OverlappingFieldsCanBeMergedRule",function(){return u.OverlappingFieldsCanBeMergedRule}),n.d(t,"PossibleFragmentSpreadsRule",function(){return u.PossibleFragmentSpreadsRule}),n.d(t,"ProvidedRequiredArgumentsRule",function(){return u.ProvidedRequiredArgumentsRule}),n.d(t,"ScalarLeafsRule",function(){return u.ScalarLeafsRule}),n.d(t,"SingleFieldSubscriptionsRule",function(){return u.SingleFieldSubscriptionsRule}),n.d(t,"UniqueArgumentNamesRule",function(){return u.UniqueArgumentNamesRule}),n.d(t,"UniqueDirectivesPerLocationRule",function(){return u.UniqueDirectivesPerLocationRule}),n.d(t,"UniqueFragmentNamesRule",function(){return u.UniqueFragmentNamesRule}),n.d(t,"UniqueInputFieldNamesRule",function(){return u.UniqueInputFieldNamesRule}),n.d(t,"UniqueOperationNamesRule",function(){return u.UniqueOperationNamesRule}),n.d(t,"UniqueVariableNamesRule",function(){return u.UniqueVariableNamesRule}),n.d(t,"ValuesOfCorrectTypeRule",function(){return u.ValuesOfCorrectTypeRule}),n.d(t,"VariablesAreInputTypesRule",function(){return u.VariablesAreInputTypesRule}),n.d(t,"VariablesInAllowedPositionRule",function(){return u.VariablesInAllowedPositionRule});var s=n(20);n.d(t,"GraphQLError",function(){return s.GraphQLError}),n.d(t,"syntaxError",function(){return s.syntaxError}),n.d(t,"locatedError",function(){return s.locatedError}),n.d(t,"printError",function(){return s.printError}),n.d(t,"formatError",function(){return s.formatError});var c=n(2);n.d(t,"getIntrospectionQuery",function(){return c.getIntrospectionQuery}),n.d(t,"introspectionQuery",function(){return c.introspectionQuery}),n.d(t,"getOperationAST",function(){return c.getOperationAST}),n.d(t,"getOperationRootType",function(){return c.getOperationRootType}),n.d(t,"introspectionFromSchema",function(){return c.introspectionFromSchema}),n.d(t,"buildClientSchema",function(){return c.buildClientSchema}),n.d(t,"buildASTSchema",function(){return c.buildASTSchema}),n.d(t,"buildSchema",function(){return c.buildSchema}),n.d(t,"getDescription",function(){return c.getDescription}),n.d(t,"extendSchema",function(){return c.extendSchema}),n.d(t,"lexicographicSortSchema",function(){return c.lexicographicSortSchema}),n.d(t,"printSchema",function(){return c.printSchema}),n.d(t,"printType",function(){return c.printType}),n.d(t,"printIntrospectionSchema",function(){return c.printIntrospectionSchema}),n.d(t,"typeFromAST",function(){return c.typeFromAST}),n.d(t,"valueFromAST",function(){return c.valueFromAST}),n.d(t,"valueFromASTUntyped",function(){return c.valueFromASTUntyped}),n.d(t,"astFromValue",function(){return c.astFromValue}),n.d(t,"TypeInfo",function(){return c.TypeInfo}),n.d(t,"coerceValue",function(){return c.coerceValue}),n.d(t,"isValidJSValue",function(){return c.isValidJSValue}),n.d(t,"isValidLiteralValue",function(){return c.isValidLiteralValue}),n.d(t,"concatAST",function(){return c.concatAST}),n.d(t,"separateOperations",function(){return c.separateOperations}),n.d(t,"stripIgnoredCharacters",function(){return c.stripIgnoredCharacters}),n.d(t,"isEqualType",function(){return c.isEqualType}),n.d(t,"isTypeSubTypeOf",function(){return c.isTypeSubTypeOf}),n.d(t,"doTypesOverlap",function(){return c.doTypesOverlap}),n.d(t,"assertValidName",function(){return c.assertValidName}),n.d(t,"isValidNameError",function(){return c.isValidNameError}),n.d(t,"BreakingChangeType",function(){return c.BreakingChangeType}),n.d(t,"DangerousChangeType",function(){return c.DangerousChangeType}),n.d(t,"findBreakingChanges",function(){return c.findBreakingChanges}),n.d(t,"findDangerousChanges",function(){return c.findDangerousChanges}),n.d(t,"findDeprecatedUsages",function(){return c.findDeprecatedUsages})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",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",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",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"});t.Kind=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return r.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return i.getLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"createLexer",{enumerable:!0,get:function(){return a.createLexer}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return a.TokenKind}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return l.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return l.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return l.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return u.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return s.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return s.visitInParallel}}),Object.defineProperty(t,"visitWithTypeInfo",{enumerable:!0,get:function(){return s.visitWithTypeInfo}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return s.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return s.BREAK}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return c.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return c.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return c.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return c.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return c.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return c.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return c.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return c.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return c.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return f.DirectiveLocation}});var r=n(65),i=n(64),o=n(9),a=n(49),l=n(35),u=n(18),s=n(22),c=n(27),f=n(32)},function(e,t,n){"use strict";e.exports=n(149)},function(e,t,n){e.exports=n(155)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDirective=h,t.assertDirective=function(e){return h(e)||(0,s.default)(0,"Expected ".concat((0,c.default)(e)," to be a GraphQL directive.")),e},t.isSpecifiedDirective=function(e){return h(e)&&b.some(function(t){var n=t.name;return n===e.name})},t.specifiedDirectives=t.GraphQLDeprecatedDirective=t.DEFAULT_DEPRECATION_REASON=t.GraphQLSkipDirective=t.GraphQLIncludeDirective=t.GraphQLDirective=void 0;var r=p(n(31)),i=n(3),o=n(17),a=p(n(47)),l=p(n(46)),u=p(n(62)),s=p(n(13)),c=p(n(6)),f=n(32);function p(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="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})(e)}function h(e){return(0,u.default)(e,m)}var m=function(){function e(e){this.name=e.name,this.description=e.description,this.locations=e.locations,this.astNode=e.astNode,e.name||(0,s.default)(0,"Directive must be named."),Array.isArray(e.locations)||(0,s.default)(0,"@".concat(e.name," locations must be an Array."));var t=e.args||{};("object"!==d(t)||Array.isArray(t))&&(0,s.default)(0,"@".concat(e.name," args must be an object with argument names as keys.")),this.args=(0,r.default)(t).map(function(e){var t=e[0],n=e[1];return{name:t,description:void 0===n.description?null:n.description,type:n.type,defaultValue:n.defaultValue,astNode:n.astNode}})}var t=e.prototype;return t.toString=function(){return"@"+this.name},t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:(0,i.argsToArgsConfig)(this.args),astNode:this.astNode}},e}();t.GraphQLDirective=m,(0,a.default)(m),(0,l.default)(m);var v=new m({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[f.DirectiveLocation.FIELD,f.DirectiveLocation.FRAGMENT_SPREAD,f.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:(0,i.GraphQLNonNull)(o.GraphQLBoolean),description:"Included when true."}}});t.GraphQLIncludeDirective=v;var g=new m({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[f.DirectiveLocation.FIELD,f.DirectiveLocation.FRAGMENT_SPREAD,f.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:(0,i.GraphQLNonNull)(o.GraphQLBoolean),description:"Skipped when true."}}});t.GraphQLSkipDirective=g;t.DEFAULT_DEPRECATION_REASON="No longer supported";var y=new m({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[f.DirectiveLocation.FIELD_DEFINITION,f.DirectiveLocation.ENUM_VALUE],args:{reason:{type:o.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax (as specified by [CommonMark](https://commonmark.org/).",defaultValue:"No longer supported"}}});t.GraphQLDeprecatedDirective=y;var b=[v,g,y];t.specifiedDirectives=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIntrospectionType=function(e){return(0,l.isNamedType)(e)&&_.some(function(t){var n=t.name;return e.name===n})},t.introspectionTypes=t.TypeNameMetaFieldDef=t.TypeMetaFieldDef=t.SchemaMetaFieldDef=t.__TypeKind=t.TypeKind=t.__EnumValue=t.__InputValue=t.__Field=t.__Type=t.__DirectiveLocation=t.__Directive=t.__Schema=void 0;var r=c(n(14)),i=c(n(6)),o=n(63),a=n(18),l=n(3),u=n(17),s=n(32);function c(e){return e&&e.__esModule?e:{default:e}}var f=new l.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:(0,l.GraphQLNonNull)((0,l.GraphQLList)((0,l.GraphQLNonNull)(h))),resolve:function(e){return(0,r.default)(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:(0,l.GraphQLNonNull)(h),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:h,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:h,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:(0,l.GraphQLNonNull)((0,l.GraphQLList)((0,l.GraphQLNonNull)(p))),resolve:function(e){return e.getDirectives()}}}}});t.__Schema=f;var p=new l.GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:(0,l.GraphQLNonNull)(u.GraphQLString),resolve:function(e){return e.name}},description:{type:u.GraphQLString,resolve:function(e){return e.description}},locations:{type:(0,l.GraphQLNonNull)((0,l.GraphQLList)((0,l.GraphQLNonNull)(d))),resolve:function(e){return e.locations}},args:{type:(0,l.GraphQLNonNull)((0,l.GraphQLList)((0,l.GraphQLNonNull)(v))),resolve:function(e){return e.args||[]}}}}});t.__Directive=p;var d=new l.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:s.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:s.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:s.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:s.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:s.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:s.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:s.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:s.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:s.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:s.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:s.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:s.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:s.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:s.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:s.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:s.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:s.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:s.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:s.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});t.__DirectiveLocation=d;var h=new l.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:(0,l.GraphQLNonNull)(b),resolve:function(e){if((0,l.isScalarType)(e))return y.SCALAR;if((0,l.isObjectType)(e))return y.OBJECT;if((0,l.isInterfaceType)(e))return y.INTERFACE;if((0,l.isUnionType)(e))return y.UNION;if((0,l.isEnumType)(e))return y.ENUM;if((0,l.isInputObjectType)(e))return y.INPUT_OBJECT;if((0,l.isListType)(e))return y.LIST;if((0,l.isNonNullType)(e))return y.NON_NULL;throw new Error('Unexpected type: "'.concat((0,i.default)(e),'".'))}},name:{type:u.GraphQLString,resolve:function(e){return e.name}},description:{type:u.GraphQLString,resolve:function(e){return e.description}},fields:{type:(0,l.GraphQLList)((0,l.GraphQLNonNull)(m)),args:{includeDeprecated:{type:u.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if((0,l.isObjectType)(e)||(0,l.isInterfaceType)(e)){var i=(0,r.default)(e.getFields());return n||(i=i.filter(function(e){return!e.deprecationReason})),i}return null}},interfaces:{type:(0,l.GraphQLList)((0,l.GraphQLNonNull)(h)),resolve:function(e){if((0,l.isObjectType)(e))return e.getInterfaces()}},possibleTypes:{type:(0,l.GraphQLList)((0,l.GraphQLNonNull)(h)),resolve:function(e,t,n,r){var i=r.schema;if((0,l.isAbstractType)(e))return i.getPossibleTypes(e)}},enumValues:{type:(0,l.GraphQLList)((0,l.GraphQLNonNull)(g)),args:{includeDeprecated:{type:u.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if((0,l.isEnumType)(e)){var r=e.getValues();return n||(r=r.filter(function(e){return!e.deprecationReason})),r}}},inputFields:{type:(0,l.GraphQLList)((0,l.GraphQLNonNull)(v)),resolve:function(e){if((0,l.isInputObjectType)(e))return(0,r.default)(e.getFields())}},ofType:{type:h,resolve:function(e){return e.ofType}}}}});t.__Type=h;var m=new l.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:(0,l.GraphQLNonNull)(u.GraphQLString),resolve:function(e){return e.name}},description:{type:u.GraphQLString,resolve:function(e){return e.description}},args:{type:(0,l.GraphQLNonNull)((0,l.GraphQLList)((0,l.GraphQLNonNull)(v))),resolve:function(e){return e.args||[]}},type:{type:(0,l.GraphQLNonNull)(h),resolve:function(e){return e.type}},isDeprecated:{type:(0,l.GraphQLNonNull)(u.GraphQLBoolean),resolve:function(e){return e.isDeprecated}},deprecationReason:{type:u.GraphQLString,resolve:function(e){return e.deprecationReason}}}}});t.__Field=m;var v=new l.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:(0,l.GraphQLNonNull)(u.GraphQLString),resolve:function(e){return e.name}},description:{type:u.GraphQLString,resolve:function(e){return e.description}},type:{type:(0,l.GraphQLNonNull)(h),resolve:function(e){return e.type}},defaultValue:{type:u.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){var t=(0,o.astFromValue)(e.defaultValue,e.type);return t?(0,a.print)(t):null}}}}});t.__InputValue=v;var g=new l.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:(0,l.GraphQLNonNull)(u.GraphQLString),resolve:function(e){return e.name}},description:{type:u.GraphQLString,resolve:function(e){return e.description}},isDeprecated:{type:(0,l.GraphQLNonNull)(u.GraphQLBoolean),resolve:function(e){return e.isDeprecated}},deprecationReason:{type:u.GraphQLString,resolve:function(e){return e.deprecationReason}}}}});t.__EnumValue=g;var y={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"};t.TypeKind=y;var b=new l.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:y.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:y.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:y.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:y.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:y.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:y.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:y.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:y.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});t.__TypeKind=b;var T={name:"__schema",type:(0,l.GraphQLNonNull)(f),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n,r){return r.schema}};t.SchemaMetaFieldDef=T;var k={name:"__type",type:h,description:"Request the type information of a single type.",args:[{name:"name",type:(0,l.GraphQLNonNull)(u.GraphQLString)}],resolve:function(e,t,n,r){var i=t.name;return r.schema.getType(i)}};t.TypeMetaFieldDef=k;var E={name:"__typename",type:(0,l.GraphQLNonNull)(u.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n,r){return r.parentType.name}};t.TypeNameMetaFieldDef=E;var _=[f,p,d,h,m,v,g,b];t.introspectionTypes=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSpecifiedScalarType=function(e){return(0,a.isScalarType)(e)&&y.some(function(t){var n=t.name;return e.name===n})},t.specifiedScalarTypes=t.GraphQLID=t.GraphQLBoolean=t.GraphQLString=t.GraphQLFloat=t.GraphQLInt=void 0;var r=u(n(157)),i=u(n(158)),o=u(n(6)),a=n(3),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="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})(e)}var c=2147483647,f=-2147483648;var p=new a.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",serialize:function(e){if("boolean"==typeof e)return e?1:0;var t=e;if("string"==typeof e&&""!==e&&(t=Number(e)),!(0,i.default)(t))throw new TypeError("Int cannot represent non-integer value: ".concat((0,o.default)(e)));if(t>c||tc||e=f)return t}}});t.GraphQLInt=p;var d=new a.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:function(e){if("boolean"==typeof e)return e?1:0;var t=e;if("string"==typeof e&&""!==e&&(t=Number(e)),!(0,r.default)(t))throw new TypeError("Float cannot represent non numeric value: ".concat((0,o.default)(e)));return t},parseValue:function(e){if(!(0,r.default)(e))throw new TypeError("Float cannot represent non numeric value: ".concat((0,o.default)(e)));return e},parseLiteral:function(e){return e.kind===l.Kind.FLOAT||e.kind===l.Kind.INT?parseFloat(e.value):void 0}});function h(e){if("object"===s(e)&&null!==e){if("function"==typeof e.valueOf){var t=e.valueOf();if("object"!==s(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}t.GraphQLFloat=d;var m=new a.GraphQLScalarType({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:function(e){var t=h(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if((0,r.default)(t))return t.toString();throw new TypeError("String cannot represent value: ".concat((0,o.default)(e)))},parseValue:function(e){if("string"!=typeof e)throw new TypeError("String cannot represent a non string value: ".concat((0,o.default)(e)));return e},parseLiteral:function(e){return e.kind===l.Kind.STRING?e.value:void 0}});t.GraphQLString=m;var v=new a.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){if("boolean"==typeof e)return e;if((0,r.default)(e))return 0!==e;throw new TypeError("Boolean cannot represent a non boolean value: ".concat((0,o.default)(e)))},parseValue:function(e){if("boolean"!=typeof e)throw new TypeError("Boolean cannot represent a non boolean value: ".concat((0,o.default)(e)));return e},parseLiteral:function(e){return e.kind===l.Kind.BOOLEAN?e.value:void 0}});t.GraphQLBoolean=v;var g=new a.GraphQLScalarType({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:function(e){var t=h(e);if("string"==typeof t)return t;if((0,i.default)(t))return String(t);throw new TypeError("ID cannot represent value: ".concat((0,o.default)(e)))},parseValue:function(e){if("string"==typeof e)return e;if((0,i.default)(e))return e.toString();throw new TypeError("ID cannot represent value: ".concat((0,o.default)(e)))},parseLiteral:function(e){return e.kind===l.Kind.STRING||e.kind===l.Kind.INT?e.value:void 0}});t.GraphQLID=g;var y=[m,p,d,v,g];t.specifiedScalarTypes=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,r.visit)(e,{leave:o})};var r=n(22),i=n(34);var o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=s("(",l(e.variableDefinitions,", "),")"),i=l(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?l([t,l([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+s(" = ",r)+s(" ",l(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return l([s("",t,": ")+n+s("(",l(r,", "),")"),l(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+s(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",s("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(s("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(s("",l(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,i.printBlockString)(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"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+s("(",l(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 l(["schema",l(t," "),u(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a(function(e){return l(["scalar",e.name,l(e.directives," ")]," ")}),ObjectTypeDefinition:a(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return l(["type",t,s("implements ",l(n," & ")),l(r," "),u(i)]," ")}),FieldDefinition:a(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(p(n)?s("(\n",c(l(n,"\n")),"\n)"):s("(",l(n,", "),")"))+": "+r+s(" ",l(i," "))}),InputValueDefinition:a(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return l([t+": "+n,s("= ",r),l(i," ")]," ")}),InterfaceTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.fields;return l(["interface",t,l(n," "),u(r)]," ")}),UnionTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")}),EnumTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),u(r)]," ")}),EnumValueDefinition:a(function(e){return l([e.name,l(e.directives," ")]," ")}),InputObjectTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),u(r)]," ")}),DirectiveDefinition:a(function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+(p(n)?s("(\n",c(l(n,"\n")),"\n)"):s("(",l(n,", "),")"))+" on "+l(r," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),u(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return l(["extend type",t,s("implements ",l(n," & ")),l(r," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend interface",t,l(n," "),u(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),u(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),u(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function u(e){return e&&0!==e.length?"{\n"+c(l(e,"\n"))+"\n}":""}function s(e,t,n){return t?e+t+(n||""):""}function c(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function p(e){return e&&e.some(f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeFromAST=function e(t,n){var r;if(n.kind===o.Kind.LIST_TYPE)return(r=e(t,n.type))&&(0,a.GraphQLList)(r);if(n.kind===o.Kind.NON_NULL_TYPE)return(r=e(t,n.type))&&(0,a.GraphQLNonNull)(r);if(n.kind===o.Kind.NAMED_TYPE)return t.getType(n.name.value);throw new Error('Unexpected type node: "'.concat((0,i.default)(n),'".'))};var r,i=(r=n(6))&&r.__esModule?r:{default:r},o=n(9),a=n(3)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}}),Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}}),Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return o.locatedError}}),Object.defineProperty(t,"printError",{enumerable:!0,get:function(){return a.printError}}),Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return l.formatError}});var r=n(1),i=n(159),o=n(66),a=n(93),l=n(160)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},Object.create(null))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,r=void 0,s=Array.isArray(e),c=[e],f=-1,p=[],d=void 0,h=void 0,m=void 0,v=[],g=[],y=e;do{var b=++f===c.length,T=b&&0!==p.length;if(b){if(h=0===g.length?void 0:v[v.length-1],d=m,m=g.pop(),T){if(s)d=d.slice();else{for(var k={},E=0,_=Object.keys(d);E<_.length;E++){var w=_[E];k[w]=d[w]}d=k}for(var x=0,S=0;S1&&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]+s))}return i[l][u]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var n=Object.create(null),i=t.length,o=e.length/2,a=0;a=0&&t%1==0}function u(e){return Object(e)===e&&(l(e)||a(e))}function s(e){var t=c(e);if(t)return t.call(e)}function c(e){if(null!=e){var t=i&&e[i]||e["@@iterator"];if("function"==typeof t)return t}}function f(e){if(null!=e){var t=s(e);if(t)return t;if(l(e))return new p(e)}}function p(e){this._o=e,this._i=0}function d(e,t,n){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,n);var r=0,i=s(e);if(i){for(var o;!(o=i.next()).done;)if(t.call(n,o.value,r++,e),r>9999999)throw new TypeError("Near-infinite iteration.")}else if(l(e))for(;r=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}};var h=r&&r.asyncIterator,m=h||"@@asyncIterator";function v(e){return!!y(e)}function g(e){var t=y(e);if(t)return t.call(e)}function y(e){if(null!=e){var t=h&&e[h]||e["@@asyncIterator"];if("function"==typeof t)return t}}function b(e){if(null!=e){var t=g(e);if(t)return t;var n=f(e);if(n)return new T(n)}}function T(e){this._i=e}function k(e,t,n){var r=b(e);if(r){var i=0;return new Promise(function(o,a){!function l(){return r.next().then(function(r){return r.done?o():Promise.resolve(t.call(n,r.value,i++,e)).then(l).catch(a),null}).catch(a),null}()})}}T.prototype[m]=function(){return this},T.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})}},function(e,t,n){"use strict";function r(e){for(var t=null,n=1;n0&&o(t[0]);)t.shift();for(;t.length>0&&o(t[t.length-1]);)t.pop();return t.join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!r||o||n,l="";!a||r&&i||(l+="\n"+t);l+=t?e.replace(/\n/g,"\n"+t):e,a&&(l+="\n");return'"""'+l.replace(/"""/g,'\\"""')+'"""'}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){var n="string"==typeof e?new o.Source(e):e;if(!(n instanceof o.Source))throw new TypeError("Must provide Source. Received: ".concat((0,r.default)(n)));return function(e){var t=e.token;return{kind:u.Kind.DOCUMENT,definitions:ne(e,l.TokenKind.SOF,p,l.TokenKind.EOF),loc:H(e,t)}}((0,l.createLexer)(n,t||{}))},t.parseValue=function(e,t){var n="string"==typeof e?new o.Source(e):e,r=(0,l.createLexer)(n,t||{});$(r,l.TokenKind.SOF);var i=x(r,!1);return $(r,l.TokenKind.EOF),i},t.parseType=function(e,t){var n="string"==typeof e?new o.Source(e):e,r=(0,l.createLexer)(n,t||{});$(r,l.TokenKind.SOF);var i=D(r);return $(r,l.TokenKind.EOF),i},t.parseConstValue=C,t.parseTypeReference=D,t.parseNamedType=L;var r=c(n(6)),i=c(n(46)),o=n(65),a=n(20),l=n(49),u=n(9),s=n(32);function c(e){return e&&e.__esModule?e:{default:e}}function f(e){var t=$(e,l.TokenKind.NAME);return{kind:u.Kind.NAME,value:t.value,loc:H(e,t)}}function p(e){if(Y(e,l.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return d(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return I(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===l.TokenKind.NAME)switch(t.value){case"schema":return function(e){var t=e.token;X(e,"extend"),X(e,"schema");var n=O(e,!0),r=Y(e,l.TokenKind.BRACE_L)?ne(e,l.TokenKind.BRACE_L,F,l.TokenKind.BRACE_R):[];if(0===n.length&&0===r.length)throw ee(e);return{kind:u.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r,loc:H(e,t)}}(e);case"scalar":return function(e){var t=e.token;X(e,"extend"),X(e,"scalar");var n=f(e),r=O(e,!0);if(0===r.length)throw ee(e);return{kind:u.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:H(e,t)}}(e);case"type":return function(e){var t=e.token;X(e,"extend"),X(e,"type");var n=f(e),r=R(e),i=O(e,!0),o=j(e);if(0===r.length&&0===i.length&&0===o.length)throw ee(e);return{kind:u.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:H(e,t)}}(e);case"interface":return function(e){var t=e.token;X(e,"extend"),X(e,"interface");var n=f(e),r=O(e,!0),i=j(e);if(0===r.length&&0===i.length)throw ee(e);return{kind:u.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:H(e,t)}}(e);case"union":return function(e){var t=e.token;X(e,"extend"),X(e,"union");var n=f(e),r=O(e,!0),i=B(e);if(0===r.length&&0===i.length)throw ee(e);return{kind:u.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:H(e,t)}}(e);case"enum":return function(e){var t=e.token;X(e,"extend"),X(e,"enum");var n=f(e),r=O(e,!0),i=G(e);if(0===r.length&&0===i.length)throw ee(e);return{kind:u.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:H(e,t)}}(e);case"input":return function(e){var t=e.token;X(e,"extend"),X(e,"input");var n=f(e),r=O(e,!0),i=z(e);if(0===r.length&&0===i.length)throw ee(e);return{kind:u.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:H(e,t)}}(e)}throw ee(e,t)}(e)}else{if(Y(e,l.TokenKind.BRACE_L))return d(e);if(M(e))return I(e)}throw ee(e)}function d(e){if(Y(e,l.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return h(e);case"fragment":return function(e){var t=e.token;if(X(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:u.Kind.FRAGMENT_DEFINITION,name:w(e),variableDefinitions:v(e),typeCondition:(X(e,"on"),L(e)),directives:O(e,!1),selectionSet:b(e),loc:H(e,t)};return{kind:u.Kind.FRAGMENT_DEFINITION,name:w(e),typeCondition:(X(e,"on"),L(e)),directives:O(e,!1),selectionSet:b(e),loc:H(e,t)}}(e)}else if(Y(e,l.TokenKind.BRACE_L))return h(e);throw ee(e)}function h(e){var t=e.token;if(Y(e,l.TokenKind.BRACE_L))return{kind:u.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:b(e),loc:H(e,t)};var n,r=m(e);return Y(e,l.TokenKind.NAME)&&(n=f(e)),{kind:u.Kind.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:v(e),directives:O(e,!1),selectionSet:b(e),loc:H(e,t)}}function m(e){var t=$(e,l.TokenKind.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw ee(e,t)}function v(e){return Y(e,l.TokenKind.PAREN_L)?ne(e,l.TokenKind.PAREN_L,g,l.TokenKind.PAREN_R):[]}function g(e){var t=e.token;return{kind:u.Kind.VARIABLE_DEFINITION,variable:y(e),type:($(e,l.TokenKind.COLON),D(e)),defaultValue:J(e,l.TokenKind.EQUALS)?x(e,!0):void 0,directives:O(e,!0),loc:H(e,t)}}function y(e){var t=e.token;return $(e,l.TokenKind.DOLLAR),{kind:u.Kind.VARIABLE,name:f(e),loc:H(e,t)}}function b(e){var t=e.token;return{kind:u.Kind.SELECTION_SET,selections:ne(e,l.TokenKind.BRACE_L,T,l.TokenKind.BRACE_R),loc:H(e,t)}}function T(e){return Y(e,l.TokenKind.SPREAD)?function(e){var t=e.token;$(e,l.TokenKind.SPREAD);var n=Z(e,"on");if(!n&&Y(e,l.TokenKind.NAME))return{kind:u.Kind.FRAGMENT_SPREAD,name:w(e),directives:O(e,!1),loc:H(e,t)};return{kind:u.Kind.INLINE_FRAGMENT,typeCondition:n?L(e):void 0,directives:O(e,!1),selectionSet:b(e),loc:H(e,t)}}(e):function(e){var t,n,r=e.token,i=f(e);J(e,l.TokenKind.COLON)?(t=i,n=f(e)):n=i;return{kind:u.Kind.FIELD,alias:t,name:n,arguments:k(e,!1),directives:O(e,!1),selectionSet:Y(e,l.TokenKind.BRACE_L)?b(e):void 0,loc:H(e,r)}}(e)}function k(e,t){var n=t?_:E;return Y(e,l.TokenKind.PAREN_L)?ne(e,l.TokenKind.PAREN_L,n,l.TokenKind.PAREN_R):[]}function E(e){var t=e.token,n=f(e);return $(e,l.TokenKind.COLON),{kind:u.Kind.ARGUMENT,name:n,value:x(e,!1),loc:H(e,t)}}function _(e){var t=e.token;return{kind:u.Kind.ARGUMENT,name:f(e),value:($(e,l.TokenKind.COLON),C(e)),loc:H(e,t)}}function w(e){if("on"===e.token.value)throw ee(e);return f(e)}function x(e,t){var n=e.token;switch(n.kind){case l.TokenKind.BRACKET_L:return function(e,t){var n=e.token,r=t?C:N;return{kind:u.Kind.LIST,values:te(e,l.TokenKind.BRACKET_L,r,l.TokenKind.BRACKET_R),loc:H(e,n)}}(e,t);case l.TokenKind.BRACE_L:return function(e,t){var n=e.token;return{kind:u.Kind.OBJECT,fields:te(e,l.TokenKind.BRACE_L,function(){return function(e,t){var n=e.token,r=f(e);return $(e,l.TokenKind.COLON),{kind:u.Kind.OBJECT_FIELD,name:r,value:x(e,t),loc:H(e,n)}}(e,t)},l.TokenKind.BRACE_R),loc:H(e,n)}}(e,t);case l.TokenKind.INT:return e.advance(),{kind:u.Kind.INT,value:n.value,loc:H(e,n)};case l.TokenKind.FLOAT:return e.advance(),{kind:u.Kind.FLOAT,value:n.value,loc:H(e,n)};case l.TokenKind.STRING:case l.TokenKind.BLOCK_STRING:return S(e);case l.TokenKind.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:u.Kind.BOOLEAN,value:"true"===n.value,loc:H(e,n)}):"null"===n.value?(e.advance(),{kind:u.Kind.NULL,loc:H(e,n)}):(e.advance(),{kind:u.Kind.ENUM,value:n.value,loc:H(e,n)});case l.TokenKind.DOLLAR:if(!t)return y(e)}throw ee(e)}function S(e){var t=e.token;return e.advance(),{kind:u.Kind.STRING,value:t.value,block:t.kind===l.TokenKind.BLOCK_STRING,loc:H(e,t)}}function C(e){return x(e,!0)}function N(e){return x(e,!1)}function O(e,t){for(var n=[];Y(e,l.TokenKind.AT);)n.push(A(e,t));return n}function A(e,t){var n=e.token;return $(e,l.TokenKind.AT),{kind:u.Kind.DIRECTIVE,name:f(e),arguments:k(e,t),loc:H(e,n)}}function D(e){var t,n=e.token;return J(e,l.TokenKind.BRACKET_L)?(t=D(e),$(e,l.TokenKind.BRACKET_R),t={kind:u.Kind.LIST_TYPE,type:t,loc:H(e,n)}):t=L(e),J(e,l.TokenKind.BANG)?{kind:u.Kind.NON_NULL_TYPE,type:t,loc:H(e,n)}:t}function L(e){var t=e.token;return{kind:u.Kind.NAMED_TYPE,name:f(e),loc:H(e,t)}}function I(e){var t=M(e)?e.lookahead():e.token;if(t.kind===l.TokenKind.NAME)switch(t.value){case"schema":return function(e){var t=e.token;X(e,"schema");var n=O(e,!0),r=ne(e,l.TokenKind.BRACE_L,F,l.TokenKind.BRACE_R);return{kind:u.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:H(e,t)}}(e);case"scalar":return function(e){var t=e.token,n=P(e);X(e,"scalar");var r=f(e),i=O(e,!0);return{kind:u.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:H(e,t)}}(e);case"type":return function(e){var t=e.token,n=P(e);X(e,"type");var r=f(e),i=R(e),o=O(e,!0),a=j(e);return{kind:u.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a,loc:H(e,t)}}(e);case"interface":return function(e){var t=e.token,n=P(e);X(e,"interface");var r=f(e),i=O(e,!0),o=j(e);return{kind:u.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:H(e,t)}}(e);case"union":return function(e){var t=e.token,n=P(e);X(e,"union");var r=f(e),i=O(e,!0),o=B(e);return{kind:u.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:H(e,t)}}(e);case"enum":return function(e){var t=e.token,n=P(e);X(e,"enum");var r=f(e),i=O(e,!0),o=G(e);return{kind:u.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:H(e,t)}}(e);case"input":return function(e){var t=e.token,n=P(e);X(e,"input");var r=f(e),i=O(e,!0),o=z(e);return{kind:u.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:H(e,t)}}(e);case"directive":return function(e){var t=e.token,n=P(e);X(e,"directive"),$(e,l.TokenKind.AT);var r=f(e),i=U(e);X(e,"on");var o=function(e){J(e,l.TokenKind.PIPE);var t=[];do{t.push(K(e))}while(J(e,l.TokenKind.PIPE));return t}(e);return{kind:u.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:H(e,t)}}(e)}throw ee(e,t)}function M(e){return Y(e,l.TokenKind.STRING)||Y(e,l.TokenKind.BLOCK_STRING)}function P(e){if(M(e))return S(e)}function F(e){var t=e.token,n=m(e);$(e,l.TokenKind.COLON);var r=L(e);return{kind:u.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:H(e,t)}}function R(e){var t=[];if(Z(e,"implements")){J(e,l.TokenKind.AMP);do{t.push(L(e))}while(J(e,l.TokenKind.AMP)||e.options.allowLegacySDLImplementsInterfaces&&Y(e,l.TokenKind.NAME))}return t}function j(e){return e.options.allowLegacySDLEmptyFields&&Y(e,l.TokenKind.BRACE_L)&&e.lookahead().kind===l.TokenKind.BRACE_R?(e.advance(),e.advance(),[]):Y(e,l.TokenKind.BRACE_L)?ne(e,l.TokenKind.BRACE_L,V,l.TokenKind.BRACE_R):[]}function V(e){var t=e.token,n=P(e),r=f(e),i=U(e);$(e,l.TokenKind.COLON);var o=D(e),a=O(e,!0);return{kind:u.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a,loc:H(e,t)}}function U(e){return Y(e,l.TokenKind.PAREN_L)?ne(e,l.TokenKind.PAREN_L,q,l.TokenKind.PAREN_R):[]}function q(e){var t=e.token,n=P(e),r=f(e);$(e,l.TokenKind.COLON);var i,o=D(e);J(e,l.TokenKind.EQUALS)&&(i=C(e));var a=O(e,!0);return{kind:u.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:a,loc:H(e,t)}}function B(e){var t=[];if(J(e,l.TokenKind.EQUALS)){J(e,l.TokenKind.PIPE);do{t.push(L(e))}while(J(e,l.TokenKind.PIPE))}return t}function G(e){return Y(e,l.TokenKind.BRACE_L)?ne(e,l.TokenKind.BRACE_L,Q,l.TokenKind.BRACE_R):[]}function Q(e){var t=e.token,n=P(e),r=f(e),i=O(e,!0);return{kind:u.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:H(e,t)}}function z(e){return Y(e,l.TokenKind.BRACE_L)?ne(e,l.TokenKind.BRACE_L,q,l.TokenKind.BRACE_R):[]}function K(e){var t=e.token,n=f(e);if(void 0!==s.DirectiveLocation[n.value])return n;throw ee(e,t)}function H(e,t){if(!e.options.noLocation)return new W(t,e.lastToken,e.source)}function W(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function Y(e,t){return e.token.kind===t}function $(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw(0,a.syntaxError)(e.source,n.start,"Expected ".concat(t,", found ").concat((0,l.getTokenDesc)(n)))}function J(e,t){var n=e.token;if(n.kind===t)return e.advance(),n}function X(e,t){var n=e.token;if(n.kind===l.TokenKind.NAME&&n.value===t)return e.advance(),n;throw(0,a.syntaxError)(e.source,n.start,'Expected "'.concat(t,'", found ').concat((0,l.getTokenDesc)(n)))}function Z(e,t){var n=e.token;if(n.kind===l.TokenKind.NAME&&n.value===t)return e.advance(),n}function ee(e,t){var n=t||e.token;return(0,a.syntaxError)(e.source,n.start,"Unexpected ".concat((0,l.getTokenDesc)(n)))}function te(e,t,n,r){$(e,t);for(var i=[];!J(e,r);)i.push(n(e));return i}function ne(e,t,n,r){$(e,t);for(var i=[n(e)];!J(e,r);)i.push(n(e));return i}(0,i.default)(W,function(){return{start:this.start,end:this.end}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeInfo=void 0;var r,i=(r=n(24))&&r.__esModule?r:{default:r},o=n(9),a=n(3),l=n(16),u=n(19);var s=function(){function e(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=t||c,n&&((0,a.isInputType)(n)&&this._inputTypeStack.push(n),(0,a.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,a.isOutputType)(n)&&this._typeStack.push(n))}var t=e.prototype;return t.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(e){var t=this._schema;switch(e.kind){case o.Kind.SELECTION_SET:var n=(0,a.getNamedType)(this.getType());this._parentTypeStack.push((0,a.isCompositeType)(n)?n:void 0);break;case o.Kind.FIELD:var r,l,s=this.getParentType();s&&(r=this._getFieldDef(t,s,e))&&(l=r.type),this._fieldDefStack.push(r),this._typeStack.push((0,a.isOutputType)(l)?l:void 0);break;case o.Kind.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case o.Kind.OPERATION_DEFINITION:var c;"query"===e.operation?c=t.getQueryType():"mutation"===e.operation?c=t.getMutationType():"subscription"===e.operation&&(c=t.getSubscriptionType()),this._typeStack.push((0,a.isObjectType)(c)?c:void 0);break;case o.Kind.INLINE_FRAGMENT:case o.Kind.FRAGMENT_DEFINITION:var f=e.typeCondition,p=f?(0,u.typeFromAST)(t,f):(0,a.getNamedType)(this.getType());this._typeStack.push((0,a.isOutputType)(p)?p:void 0);break;case o.Kind.VARIABLE_DEFINITION:var d=(0,u.typeFromAST)(t,e.type);this._inputTypeStack.push((0,a.isInputType)(d)?d:void 0);break;case o.Kind.ARGUMENT:var h,m,v=this.getDirective()||this.getFieldDef();v&&(h=(0,i.default)(v.args,function(t){return t.name===e.name.value}))&&(m=h.type),this._argument=h,this._defaultValueStack.push(h?h.defaultValue:void 0),this._inputTypeStack.push((0,a.isInputType)(m)?m:void 0);break;case o.Kind.LIST:var g=(0,a.getNullableType)(this.getInputType()),y=(0,a.isListType)(g)?g.ofType:g;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,a.isInputType)(y)?y:void 0);break;case o.Kind.OBJECT_FIELD:var b,T,k=(0,a.getNamedType)(this.getInputType());(0,a.isInputObjectType)(k)&&(T=k.getFields()[e.name.value])&&(b=T.type),this._defaultValueStack.push(T?T.defaultValue:void 0),this._inputTypeStack.push((0,a.isInputType)(b)?b:void 0);break;case o.Kind.ENUM:var E,_=(0,a.getNamedType)(this.getInputType());(0,a.isEnumType)(_)&&(E=_.getValue(e.value)),this._enumValue=E}},t.leave=function(e){switch(e.kind){case o.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case o.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case o.Kind.DIRECTIVE:this._directive=null;break;case o.Kind.OPERATION_DEFINITION:case o.Kind.INLINE_FRAGMENT:case o.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case o.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case o.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case o.Kind.LIST:case o.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case o.Kind.ENUM:this._enumValue=null}},e}();function c(e,t,n){var r=n.name.value;return r===l.SchemaMetaFieldDef.name&&e.getQueryType()===t?l.SchemaMetaFieldDef:r===l.TypeMetaFieldDef.name&&e.getQueryType()===t?l.TypeMetaFieldDef:r===l.TypeNameMetaFieldDef.name&&(0,a.isCompositeType)(t)?l.TypeNameMetaFieldDef:(0,a.isObjectType)(t)||(0,a.isInterfaceType)(t)?t.getFields()[r]:void 0}t.TypeInfo=s},function(e,t,n){!function(e){"use strict";var t,n,r=e.Pos;function i(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),r=n,i=0;i>1,l=r(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:i=a+1}}function u(e,u,s,c){var f;this.atOccurrence=!1,this.doc=e,s=s?e.clipPos(s):r(0,0),this.pos={from:s,to:s},"object"==typeof c?f=c.caseFold:(f=c,c=null),"string"==typeof u?(null==f&&(f=!1),this.matches=function(i,o){return(i?function(e,i,o,a){if(!i.length)return null;var u=a?t:n,s=u(i).split(/\r|\n\r?/);e:for(var c=o.line,f=o.ch,p=e.firstLine()-1+s.length;c>=p;c--,f=-1){var d=e.getLine(c);f>-1&&(d=d.slice(0,f));var h=u(d);if(1==s.length){var m=h.lastIndexOf(s[0]);if(-1==m)continue e;return{from:r(c,l(d,h,m,u)),to:r(c,l(d,h,m+s[0].length,u))}}var v=s[s.length-1];if(h.slice(0,v.length)==v){for(var g=1,o=c-s.length+1;g=u;o--,l=-1){var s=e.getLine(o);l>-1&&(s=s.slice(0,l));var c=a(s,t);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}:o)(e,u,n)}:this.matches=function(t,n){return(t?function(e,t,n){t=i(t,"gm");for(var o,l=1,u=n.line,s=e.firstLine();u>=s;){for(var c=0;cs);c++){var f=e.getLine(u++);a=null==a?f:a+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(a);if(p){var d=a.slice(0,p.index).split("\n"),h=p[0].split("\n"),m=n.line+d.length-1,v=d[d.length-1].length;return{from:r(m,v),to:r(m+h.length-1,1==h.length?v+h[0].length:h[h.length-1].length),match:p}}}})(e,u,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),u.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=r(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(r(n.from.line-1))):n.to.ch0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})}(n(5))},function(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).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){o||(o={}),n(this,null);var a=t(this,r,o.bottom),l=!1,u=this;function s(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus(),o.onClose&&o.onClose(a)}}var c,f=a.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,s)}),o.onKeyUp&&e.on(f,"keyup",function(e){o.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,s)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),s()),13==t.keyCode&&i(f.value,t))}),!1!==o.closeOnBlur&&e.on(f,"blur",s)):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==o.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),l=a.getElementsByTagName("button"),u=!1,s=this,c=1;function f(){u||(u=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),s.focus())}l[0].focus();for(var p=0;p=t.character)return n=l,i=r({},a),o=e.current(),"BREAK"});return{start:a.start,end:a.end,string:o||a.string,state:i||a.state,style:n||a.style}}function u(e,t){for(var n=e.split("\n"),r=(0,o.onlineParser)(),i=r.startState(),a="",l=new o.CharacterStream(""),u=0;u1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var r,i=(r=n(89))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualType=function e(t,n){if(t===n)return!0;if((0,r.isNonNullType)(t)&&(0,r.isNonNullType)(n))return e(t.ofType,n.ofType);if((0,r.isListType)(t)&&(0,r.isListType)(n))return e(t.ofType,n.ofType);return!1},t.isTypeSubTypeOf=function e(t,n,i){if(n===i)return!0;if((0,r.isNonNullType)(i))return!!(0,r.isNonNullType)(n)&&e(t,n.ofType,i.ofType);if((0,r.isNonNullType)(n))return e(t,n.ofType,i);if((0,r.isListType)(i))return!!(0,r.isListType)(n)&&e(t,n.ofType,i.ofType);if((0,r.isListType)(n))return!1;if((0,r.isAbstractType)(i)&&(0,r.isObjectType)(n)&&t.isPossibleType(i,n))return!0;return!1},t.doTypesOverlap=function(e,t,n){if(t===n)return!0;if((0,r.isAbstractType)(t))return(0,r.isAbstractType)(n)?e.getPossibleTypes(t).some(function(t){return e.isPossibleType(n,t)}):e.isPossibleType(t,n);if((0,r.isAbstractType)(n))return e.isPossibleType(n,t);return!1};var r=n(3)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLexer=function(e,t){var n=new c(s.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:l,lookahead:u}},t.isPunctuatorToken=function(e){var t=e.kind;return t===s.BANG||t===s.DOLLAR||t===s.AMP||t===s.PAREN_L||t===s.PAREN_R||t===s.SPREAD||t===s.COLON||t===s.EQUALS||t===s.AT||t===s.BRACKET_L||t===s.BRACKET_R||t===s.BRACE_L||t===s.PIPE||t===s.BRACE_R},t.getTokenDesc=function(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind},t.TokenKind=void 0;var r,i=(r=n(46))&&r.__esModule?r:{default:r},o=n(20),a=n(34);function l(){return this.lastToken=this.token,this.token=this.lookahead()}function u(){var e=this.token;if(e.kind!==s.EOF)do{e=e.next||(e.next=p(this,e))}while(e.kind===s.COMMENT);return e}var s=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"});function c(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function f(e){return isNaN(e)?s.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function p(e,t){var n=e.source,r=n.body,i=r.length,l=function(e,t,n){var r=e.length,i=t;for(;i=i)return new c(s.EOF,i,i,u,p,t);var m=r.charCodeAt(l);switch(m){case 33:return new c(s.BANG,l,l+1,u,p,t);case 35:return function(e,t,n,r,i){var o,a=e.body,l=t;do{o=a.charCodeAt(++l)}while(!isNaN(o)&&(o>31||9===o));return new c(s.COMMENT,t,l,n,r,i,a.slice(t+1,l))}(n,l,u,p,t);case 36:return new c(s.DOLLAR,l,l+1,u,p,t);case 38:return new c(s.AMP,l,l+1,u,p,t);case 40:return new c(s.PAREN_L,l,l+1,u,p,t);case 41:return new c(s.PAREN_R,l,l+1,u,p,t);case 46:if(46===r.charCodeAt(l+1)&&46===r.charCodeAt(l+2))return new c(s.SPREAD,l,l+3,u,p,t);break;case 58:return new c(s.COLON,l,l+1,u,p,t);case 61:return new c(s.EQUALS,l,l+1,u,p,t);case 64:return new c(s.AT,l,l+1,u,p,t);case 91:return new c(s.BRACKET_L,l,l+1,u,p,t);case 93:return new c(s.BRACKET_R,l,l+1,u,p,t);case 123:return new c(s.BRACE_L,l,l+1,u,p,t);case 124:return new c(s.PIPE,l,l+1,u,p,t);case 125:return new c(s.BRACE_R,l,l+1,u,p,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 function(e,t,n,r,i){var o=e.body,a=o.length,l=t+1,u=0;for(;l!==a&&!isNaN(u=o.charCodeAt(l))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++l;return new c(s.NAME,t,l,n,r,i,o.slice(t,l))}(n,l,u,p,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,a){var l=e.body,u=n,p=t,h=!1;45===u&&(u=l.charCodeAt(++p));if(48===u){if((u=l.charCodeAt(++p))>=48&&u<=57)throw(0,o.syntaxError)(e,p,"Invalid number, unexpected digit after 0: ".concat(f(u),"."))}else p=d(e,p,u),u=l.charCodeAt(p);46===u&&(h=!0,u=l.charCodeAt(++p),p=d(e,p,u),u=l.charCodeAt(p));69!==u&&101!==u||(h=!0,43!==(u=l.charCodeAt(++p))&&45!==u||(u=l.charCodeAt(++p)),p=d(e,p,u));return new c(h?s.FLOAT:s.INT,t,p,r,i,a,l.slice(t,p))}(n,l,m,u,p,t);case 34:return 34===r.charCodeAt(l+1)&&34===r.charCodeAt(l+2)?function(e,t,n,r,i,l){var u=e.body,p=t+3,d=p,h=0,m="";for(;p=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw(0,o.syntaxError)(e,i,"Invalid number, expected digit but got: ".concat(f(a),"."))}function h(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}t.TokenKind=s,(0,i.default)(c,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.specifiedRules,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new l.TypeInfo(e);t||(0,i.default)(0,"Must provide document"),(0,a.assertValidSchema)(e);var c=new s.ValidationContext(e,t,r),f=(0,o.visitInParallel)(n.map(function(e){return e(c)}));return(0,o.visit)(t,(0,o.visitWithTypeInfo)(r,f)),c.getErrors()},t.validateSDL=c,t.assertValidSDL=function(e){var t=c(e);if(0!==t.length)throw new Error(t.map(function(e){return e.message}).join("\n\n"))},t.assertValidSDLExtension=function(e,t){var n=c(e,t);if(0!==n.length)throw new Error(n.map(function(e){return e.message}).join("\n\n"))};var r,i=(r=n(13))&&r.__esModule?r:{default:r},o=n(22),a=n(44),l=n(36),u=n(95),s=n(71);function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.specifiedSDLRules,r=new s.SDLValidationContext(e,t),i=n.map(function(e){return e(r)});return(0,o.visit)(e,(0,o.visitInParallel)(i)),r.getErrors()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e.map(function(e){return'"'.concat(e,'"')}))};var r,i=(r=n(67))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.execute=function(e,t,n,r,i,o,a,l){return 1===arguments.length?w(e.schema,e.document,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver,e.typeResolver):w(e,t,n,r,i,o,a,l)},t.responsePathAsArray=x,t.addPath=S,t.assertValidExecutionArguments=C,t.buildExecutionContext=N,t.collectFields=A,t.buildResolveInfo=M,t.resolveFieldValueOrError=P,t.getFieldDef=H,t.defaultFieldResolver=t.defaultTypeResolver=void 0;var r=n(33),i=n(1),o=n(66),a=E(n(6)),l=E(n(13)),u=E(n(26)),s=E(n(92)),c=E(n(43)),f=E(n(168)),p=E(n(169)),d=E(n(170)),h=n(72),m=n(19),v=n(9),g=n(73),y=n(3),b=n(16),T=n(15),k=n(44);function E(e){return e&&e.__esModule?e:{default:e}}function _(e){return(_="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})(e)}function w(e,t,n,r,i,o,a,l){C(e,t,i);var u=N(e,t,n,r,i,o,a,l);if(Array.isArray(u))return{errors:u};var s=function(e,t,n){var r=(0,h.getOperationRootType)(e.schema,t),i=A(e,r,t.selectionSet,Object.create(null),Object.create(null)),o=void 0;try{var a="mutation"===t.operation?function(e,t,n,r,i){return(0,d.default)(Object.keys(i),function(o,a){var l=i[a],u=S(r,a),s=I(e,t,n,l,u);return void 0===s?o:(0,c.default)(s)?s.then(function(e){return o[a]=e,o}):(o[a]=s,o)},Object.create(null))}(e,r,n,o,i):O(e,r,n,o,i);return(0,c.default)(a)?a.then(void 0,function(t){return e.errors.push(t),Promise.resolve(null)}):a}catch(t){return e.errors.push(t),null}}(u,u.operation,n);return function e(t,n){if((0,c.default)(n))return n.then(function(n){return e(t,n)});return 0===t.errors.length?{data:n}:{errors:t.errors,data:n}}(u,s)}function x(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 C(e,t,n){t||(0,l.default)(0,"Must provide document"),(0,k.assertValidSchema)(e),n&&"object"!==_(n)&&(0,l.default)(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 N(e,t,n,r,o,a,u,s){for(var c,f,p=[],d=!1,h=Object.create(null),m=0;m=0;i--)t(n[i])}function a(e,t){var n=e.filter(t);return 0===n.length?e:n}function l(e){return e.toLowerCase().replace(/\W/g,"")}function u(e,t){var n=function(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 l=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]+l),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]+l))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.LANGUAGE=void 0,t.getDefinitionQueryResultForNamedType=function(t,n,r){var i,o,a;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(i=n.name.value,0!==(o=r.filter(function(e){var t=e.definition;return t.name&&t.name.value===i})).length){l.next=5;break}return e.stderr.write("Definition not found for GraphQL type "+i),l.abrupt("return",{queryRange:[],definitions:[]});case 5:return a=o.map(function(e){var t=e.filePath,n=e.content,r=e.definition;return f(t||"",n,r)}),l.abrupt("return",{definitions:a,queryRange:a.map(function(e){return u(t,n)})});case 7:case"end":return l.stop()}},null,this)},t.getDefinitionQueryResultForFragmentSpread=function(t,n,r){var i,o,a;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(i=n.name.value,0!==(o=r.filter(function(e){var t=e.definition;return t.name.value===i})).length){l.next=5;break}return e.stderr.write("Definition not found for GraphQL fragment "+i),l.abrupt("return",{queryRange:[],definitions:[]});case 5:return a=o.map(function(e){var t=e.filePath,n=e.content,r=e.definition;return c(t||"",n,r)}),l.abrupt("return",{definitions:a,queryRange:a.map(function(e){return u(t,n)})});case 7:case"end":return l.stop()}},null,this)},t.getDefinitionQueryResultForDefinitionNode=function(e,t,n){return{definitions:[c(e,t,n)],queryRange:n.name?[u(t,n.name)]:[]}};var r,i=n(56),o=n(138),a=(r=o)&&r.__esModule?r:{default:r};var l=t.LANGUAGE="GraphQL";function u(e,t){var n=t.loc;return(0,a.default)(n,"Expected ASTNode to have a location."),(0,i.locToRange)(e,n)}function s(e,t){var n=t.loc;return(0,a.default)(n,"Expected ASTNode to have a location."),(0,i.offsetToPosition)(e,n.start)}function c(e,t,n){var r=n.name;return(0,a.default)(r,"Expected ASTNode to have a Name."),{path:e,position:s(t,n),range:u(t,n),name:r.value||"",language:l,projectRoot:e}}function f(e,t,n){var r=n.name;return(0,a.default)(r,"Expected ASTNode to have a Name."),{path:e,position:s(t,n),range:u(t,n),name:r.value||"",language:l,projectRoot:e}}}).call(this,n(136))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(253);Object.defineProperty(t,"getASTNodeAtPosition",{enumerable:!0,get:function(){return r.getASTNodeAtPosition}}),Object.defineProperty(t,"pointToOffset",{enumerable:!0,get:function(){return r.pointToOffset}});var i=n(137);Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return i.Position}}),Object.defineProperty(t,"Range",{enumerable:!0,get:function(){return i.Range}}),Object.defineProperty(t,"locToRange",{enumerable:!0,get:function(){return i.locToRange}}),Object.defineProperty(t,"offsetToPosition",{enumerable:!0,get:function(){return i.offsetToPosition}});var o=n(254);Object.defineProperty(t,"validateWithCustomRules",{enumerable:!0,get:function(){return o.validateWithCustomRules}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEVERITY=void 0,t.getDiagnostics=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=null;try{i=(0,a.parse)(e)}catch(t){var o=d(t.locations[0],e);return[{severity:s.ERROR,message:t.message,source:"GraphQL: Syntax",range:o}]}return c(i,t,n,r)},t.validateQuery=c,t.getRange=d;var r,i=n(138),o=(r=i)&&r.__esModule?r:{default:r},a=n(8),l=n(40),u=n(56);var s=t.SEVERITY={ERROR:1,WARNING:2,INFORMATION:3,HINT:4};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3];if(!t)return[];var i=f((0,u.validateWithCustomRules)(t,e,n,r),function(e){return p(e,s.ERROR,"Validation")}),o=a.findDeprecatedUsages?f((0,a.findDeprecatedUsages)(t,e),function(e){return p(e,s.WARNING,"Deprecation")}):[];return i.concat(o)}function f(e,t){return Array.prototype.concat.apply([],e.map(t))}function p(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,o.default)(e.locations,"GraphQL validation error requires locations.");var a=e.locations[0],l=function(e){var t=e.loc;return(0,o.default)(t,"Expected ASTNode to have a location."),t}(i),s=a.column+(l.end-l.start);return{source:"GraphQL: "+n,message:e.message,severity:t,range:new u.Range(new u.Position(a.line-1,a.column-1),new u.Position(a.line-1,s))}}):[]}function d(e,t){var n=(0,l.onlineParser)(),r=n.startState(),i=t.split("\n");(0,o.default)(i.length>=e.line,"Query text must have more lines than where the error happened");for(var a=null,s=0;s0)return{errors:d};try{p=(0,a.parse)(t)}catch(e){return{errors:[e]}}var h=(0,l.validate)(e,p);return h.length>0?{errors:h}:(0,u.execute)(e,p,n,r,i,s,c,f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){return e instanceof t};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.astFromValue=function e(t,n){if((0,s.isNonNullType)(n)){var f=e(t,n.ofType);return f&&f.kind===u.Kind.NULL?null:f}if(null===t)return{kind:u.Kind.NULL};if((0,l.default)(t))return null;if((0,s.isListType)(n)){var h=n.ofType;if((0,r.isCollection)(t)){var m=[];return(0,r.forEach)(t,function(t){var n=e(t,h);n&&m.push(n)}),{kind:u.Kind.LIST,values:m}}return e(t,h)}if((0,s.isInputObjectType)(n)){if(null===t||"object"!==p(t))return null;var v=(0,i.default)(n.getFields()),g=[],y=!0,b=!1,T=void 0;try{for(var k,E=v[Symbol.iterator]();!(y=(k=E.next()).done);y=!0){var _=k.value,w=e(t[_.name],_.type);w&&g.push({kind:u.Kind.OBJECT_FIELD,name:{kind:u.Kind.NAME,value:_.name},value:w})}}catch(e){b=!0,T=e}finally{try{y||null==E.return||E.return()}finally{if(b)throw T}}return{kind:u.Kind.OBJECT,fields:g}}if((0,s.isLeafType)(n)){var x=n.serialize(t);if((0,a.default)(x))return null;if("boolean"==typeof x)return{kind:u.Kind.BOOLEAN,value:x};if("number"==typeof x){var S=String(x);return d.test(S)?{kind:u.Kind.INT,value:S}:{kind:u.Kind.FLOAT,value:S}}if("string"==typeof x)return(0,s.isEnumType)(n)?{kind:u.Kind.ENUM,value:x}:n===c.GraphQLID&&d.test(x)?{kind:u.Kind.INT,value:x}:{kind:u.Kind.STRING,value:x};throw new TypeError("Cannot convert value to AST: ".concat((0,o.default)(x)))}throw new Error('Unexpected input type: "'.concat((0,o.default)(n),'".'))};var r=n(33),i=f(n(14)),o=f(n(6)),a=f(n(92)),l=f(n(26)),u=n(9),s=n(3),c=n(17);function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="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})(e)}var d=/^-?(?:0|[1-9][0-9]*)$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;for(;(n=r.exec(e.body))&&n.index0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive")};t.Source=a,(0,i.default)(a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.locatedError=function(e,t,n){if(e&&Array.isArray(e.path))return e;return new r.GraphQLError(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(0===e.length&&(0,i.default)(0),1===e.length)return e[0];if(2===e.length)return e[0]+" or "+e[1];var t=e.slice(0,o),n=t.pop();return t.join(", ")+", or "+n};var r,i=(r=n(13))&&r.__esModule?r:{default:r};var o=5},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unknownFragmentMessage=i,t.KnownFragmentNames=function(e){return{FragmentSpread:function(t){var n=t.name.value,o=e.getFragment(n);o||e.reportError(new r.GraphQLError(i(n),t.name))}}};var r=n(1);function i(e){return'Unknown fragment "'.concat(e,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unusedFragMessage=i,t.NoUnusedFragments=function(e){var t=[],n=[];return{OperationDefinition:function(e){return t.push(e),!1},FragmentDefinition:function(e){return n.push(e),!1},Document:{leave:function(){for(var o=Object.create(null),a=0,l=t;a=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){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var l=e.getLineHandle(t.line),u=t.ch-1,s=o&&o.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),f=!s&&u>=0&&c.test(l.text.charAt(u))&&r[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&r[l.text.charAt(++u)];if(!f)return null;var p=">"==f.charAt(1)?1:-1;if(o&&o.strict&&p>0!=(u==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,u+1)),h=a(e,n(t.line,u+(p>0?1:0)),p,d||null,o);return null==h?null:{from:n(t.line,u),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:p>0}}function a(e,t,o,a,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],f=i(l),p=o>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=p;d+=o){var h=e.getLine(d);if(h){var m=o>0?0:h.length-1,v=o>0?h.length:-1;if(!(h.length>u))for(d==t.line&&(m=t.ch-(o<0?1:0));m!=v;m+=o){var g=h.charAt(m);if(f.test(g)&&(void 0===a||e.getTokenTypeAt(n(d,m+1))==a)){var y=r[g];if(y&&">"==y.charAt(1)==o>0)c.push(g);else{if(!c.length)return{pos:n(d,m),ch:g};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function l(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],u=e.listSelections(),s=0;s=u&&(o=i(a.indicatorOpen))}e.setGutterMarker(n,a.gutter,o),++l})}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 l(e,n,i){var o=e.state.foldGutter;if(o){var a=o.options;if(i==a.gutter){var l=r(e,n);l?l.clear():e.foldCode(t(n,0),a.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 s(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),l=a.indexOf(";");if(-1!=l)return{startCh:r.end,end:e.Pos(i,l)}}}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 l=a.end;;){var u=r(l.line+1);if(null==u)break;l=u.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:l}}),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;;){var l=r(a+1);if(null==l)break;++a}return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}})}(n(5))},function(e,t,n){!function(e){"use strict";function t(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var n=e.getCursor();!function(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}(e,function(e){return e.phrase("Jump to line:")+' '+e.phrase("(Use line:column or scroll% syntax)")+""}(e),e.phrase("Jump to line:"),n.line+1+":"+n.ch,function(r){var i;if(r)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(t(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var o=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(o=n.line+o+1),e.setCursor(o-1,n.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(t(e,i[1]),n.ch)})},e.keyMap.default["Alt-G"]="jumpToLine"}(n(5),n(38))},function(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy(function(i){return t.display.shift||t.doc.extend||i.empty()?function(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,l="start",u=r.ch,s=i<0?0:o.length,c=0;u!=s;u+=i,c++){var f=o.charAt(i<0?u-1:u),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==l)"o"!=p&&(l="in",a=p);else if("in"==l&&a!=p){if("w"==a&&"W"==p&&i<0&&u--,"W"==a&&"w"==p&&i>0){a="w";continue}break}}return n(r.line,u)}(t.doc,i.head,r):r<0?i.from():i.to()})}function i(t,r){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.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())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;io.line&&l==a.line&&0==a.ch||r.push({anchor:l==o.line?o:n(l,0),head:l==a.line?a:n(l)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;l--){var u=r[i[l]];if(!(s&&e.cmpPos(u.head,s)>0)){var c=o(t,u.head);s=c.from,t.replaceRange(n(c.word),c.from,c.to)}}})}function f(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function p(e,t){var r=f(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy(function(r){var i=t.scanForBracket(r.head,1);if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1);return o&&n(o.pos.line,o.pos.ch+1)||r.head})},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],l=0;lo?i.push(s,c):i.length&&(i[i.length-1]=c),o=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+l,n(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()})},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var l=r[a],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()})},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;o--){var a=r[o].head,l=t.getRange({line:a.line,ch:0},a),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(a,-1,"char",!1);if(l&&!/\S/.test(l)&&u%i==0){var c=new n(a.line,e.findColumn(l,u-i,i));c.ch!=a.ch&&(s=c)}t.replaceRange("",s,a,"+delete")}})},t.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()})},t.upcaseAtCursor=function(e){c(e,function(e){return e.toUpperCase()})},t.downcaseAtCursor=function(e){c(e,function(e){return e.toLowerCase()})},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.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)}},t.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))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){p(e,!0)},t.findUnderPrevious=function(e){p(e,!1)},t.findAllUnder=function(e){var t=f(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 d=e.keyMap;d.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",F5:"sortLines","Cmd-F5":"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(d.macSublime),d.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(d.pcSublime);var h=d.default==d.macDefault;d.sublime=h?d.macSublime:d.pcSublime}(n(5),n(37),n(80))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&"_"===e[0]&&"_"===e[1]?new i.GraphQLError('Name "'.concat(e,'" must not begin with "__", which is reserved by ')+"GraphQL introspection.",t):a.test(e)?void 0:new i.GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specifiedSDLRules=t.specifiedRules=void 0;var r=n(96),i=n(97),o=n(98),a=n(99),l=n(100),u=n(101),s=n(102),c=n(103),f=n(104),p=n(105),d=n(68),h=n(69),m=n(106),v=n(107),g=n(108),y=n(109),b=n(110),T=n(111),k=n(112),E=n(113),_=n(114),w=n(70),x=n(115),S=n(116),C=n(117),N=n(118),O=n(161),A=n(162),D=n(163),L=n(164),I=n(165),M=n(166),P=n(167),F=[r.ExecutableDefinitions,i.UniqueOperationNames,o.LoneAnonymousOperation,a.SingleFieldSubscriptions,l.KnownTypeNames,u.FragmentsOnCompositeTypes,s.VariablesAreInputTypes,c.ScalarLeafs,f.FieldsOnCorrectType,p.UniqueFragmentNames,d.KnownFragmentNames,h.NoUnusedFragments,m.PossibleFragmentSpreads,v.NoFragmentCycles,g.UniqueVariableNames,y.NoUndefinedVariables,b.NoUnusedVariables,T.KnownDirectives,k.UniqueDirectivesPerLocation,E.KnownArgumentNames,_.UniqueArgumentNames,w.ValuesOfCorrectType,x.ProvidedRequiredArguments,S.VariablesInAllowedPosition,C.OverlappingFieldsCanBeMerged,N.UniqueInputFieldNames];t.specifiedRules=F;var R=[O.LoneSchemaDefinition,A.UniqueOperationTypes,D.UniqueTypeNames,L.UniqueEnumValueNames,I.UniqueFieldDefinitionNames,M.UniqueDirectiveNames,l.KnownTypeNames,T.KnownDirectives,k.UniqueDirectivesPerLocation,P.PossibleTypeExtensions,E.KnownArgumentNamesOnDirectives,_.UniqueArgumentNames,N.UniqueInputFieldNames,x.ProvidedRequiredArgumentsOnDirectives];t.specifiedSDLRules=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nonExecutableDefinitionMessage=a,t.ExecutableDefinitions=function(e){return{Document:function(t){var n=!0,l=!1,u=void 0;try{for(var s,c=t.definitions[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var f=s.value;(0,o.isExecutableDefinitionNode)(f)||e.reportError(new r.GraphQLError(a(f.kind===i.Kind.SCHEMA_DEFINITION||f.kind===i.Kind.SCHEMA_EXTENSION?"schema":f.name.value),f))}}catch(e){l=!0,u=e}finally{try{n||null==c.return||c.return()}finally{if(l)throw u}}return!1}}};var r=n(1),i=n(9),o=n(27);function a(e){return"The ".concat(e," definition is not executable.")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateOperationNameMessage=i,t.UniqueOperationNames=function(e){var t=Object.create(null);return{OperationDefinition:function(n){var o=n.name;return o&&(t[o.value]?e.reportError(new r.GraphQLError(i(o.value),[t[o.value],o])):t[o.value]=o),!1},FragmentDefinition:function(){return!1}}};var r=n(1);function i(e){return'There can be only one operation named "'.concat(e,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.anonOperationNotAloneMessage=o,t.LoneAnonymousOperation=function(e){var t=0;return{Document:function(e){t=e.definitions.filter(function(e){return e.kind===i.Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new r.GraphQLError("This anonymous operation must be the only defined operation.",n))}}};var r=n(1),i=n(9);function o(){return"This anonymous operation must be the only defined operation."}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleFieldOnlyMessage=i,t.SingleFieldSubscriptions=function(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new r.GraphQLError(i(t.name&&t.name.value),t.selectionSet.selections.slice(1)))}}};var r=n(1);function i(e){return(e?'Subscription "'.concat(e,'" '):"Anonymous Subscription ")+"must select only one top level field."}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unknownTypeMessage=u,t.KnownTypeNames=function(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),o=Object.create(null),l=!0,c=!1,f=void 0;try{for(var p,d=e.getDocument().definitions[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var h=p.value;(0,a.isTypeDefinitionNode)(h)&&(o[h.name.value]=!0)}}catch(e){c=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw f}}var m=Object.keys(n).concat(Object.keys(o));return{NamedType:function(t,l,c,f,p){var d,h=t.name.value;if(!n[h]&&!o[h]){var v=p[2]||c,g=(d=v,Boolean(d&&!Array.isArray(d)&&((0,a.isTypeSystemDefinitionNode)(d)||(0,a.isTypeSystemExtensionNode)(d))));if(g&&function(e){return-1!==s.indexOf(e)}(h))return;var y=(0,i.default)(h,g?s.concat(m):m);e.reportError(new r.GraphQLError(u(h,y),t))}}}};var r=n(1),i=l(n(28)),o=l(n(51)),a=n(27);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n='Unknown type "'.concat(e,'".');return t.length&&(n+=" Did you mean ".concat((0,o.default)(t),"?")),n}var s=n(17).specifiedScalarTypes.map(function(e){return e.name})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inlineFragmentOnNonCompositeErrorMessage=l,t.fragmentOnNonCompositeErrorMessage=u,t.FragmentsOnCompositeTypes=function(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var u=(0,a.typeFromAST)(e.getSchema(),n);u&&!(0,o.isCompositeType)(u)&&e.reportError(new r.GraphQLError(l((0,i.print)(n)),n))}},FragmentDefinition:function(t){var n=(0,a.typeFromAST)(e.getSchema(),t.typeCondition);n&&!(0,o.isCompositeType)(n)&&e.reportError(new r.GraphQLError(u(t.name.value,(0,i.print)(t.typeCondition)),t.typeCondition))}}};var r=n(1),i=n(18),o=n(3),a=n(19);function l(e){return'Fragment cannot condition on non composite type "'.concat(e,'".')}function u(e,t){return'Fragment "'.concat(e,'" cannot condition on non composite ')+'type "'.concat(t,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nonInputTypeOnVarMessage=l,t.VariablesAreInputTypes=function(e){return{VariableDefinition:function(t){var n=(0,a.typeFromAST)(e.getSchema(),t.type);if(n&&!(0,o.isInputType)(n)){var u=t.variable.name.value;e.reportError(new r.GraphQLError(l(u,(0,i.print)(t.type)),t.type))}}}};var r=n(1),i=n(18),o=n(3),a=n(19);function l(e,t){return'Variable "$'.concat(e,'" cannot be non-input type "').concat(t,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noSubselectionAllowedMessage=l,t.requiredSubselectionMessage=u,t.ScalarLeafs=function(e){return{Field:function(t){var n=e.getType(),r=t.selectionSet;n&&((0,a.isLeafType)((0,a.getNamedType)(n))?r&&e.reportError(new o.GraphQLError(l(t.name.value,(0,i.default)(n)),r)):r||e.reportError(new o.GraphQLError(u(t.name.value,(0,i.default)(n)),t)))}}};var r,i=(r=n(6))&&r.__esModule?r:{default:r},o=n(1),a=n(3);function l(e,t){return'Field "'.concat(e,'" must not have a selection since ')+'type "'.concat(t,'" has no subfields.')}function u(e,t){return'Field "'.concat(e,'" of type "').concat(t,'" must have a ')+'selection of subfields. Did you mean "'.concat(e,' { ... }"?')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.undefinedFieldMessage=u,t.FieldsOnCorrectType=function(e){return{Field:function(t){var n=e.getParentType();if(n){var o=e.getFieldDef();if(!o){var l=e.getSchema(),s=t.name.value,c=function(e,t,n){if((0,a.isAbstractType)(t)){var r=[],i=Object.create(null),o=!0,l=!1,u=void 0;try{for(var s,c=e.getPossibleTypes(t)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var f=s.value;if(f.getFields()[n]){r.push(f.name);var p=!0,d=!1,h=void 0;try{for(var m,v=f.getInterfaces()[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var g=m.value;g.getFields()[n]&&(i[g.name]=(i[g.name]||0)+1)}}catch(e){d=!0,h=e}finally{try{p||null==v.return||v.return()}finally{if(d)throw h}}}}}catch(e){l=!0,u=e}finally{try{o||null==c.return||c.return()}finally{if(l)throw u}}var y=Object.keys(i).sort(function(e,t){return i[t]-i[e]});return y.concat(r)}return[]}(l,n,s),f=0!==c.length?[]:function(e,t,n){if((0,a.isObjectType)(t)||(0,a.isInterfaceType)(t)){var r=Object.keys(t.getFields());return(0,i.default)(n,r)}return[]}(0,n,s);e.reportError(new r.GraphQLError(u(s,n.name,c,f),t))}}}}};var r=n(1),i=l(n(28)),o=l(n(51)),a=n(3);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r){var i='Cannot query field "'.concat(e,'" on type "').concat(t,'".');if(0!==n.length){var a=(0,o.default)(n);i+=" Did you mean to use an inline fragment on ".concat(a,"?")}else 0!==r.length&&(i+=" Did you mean ".concat((0,o.default)(r),"?"));return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateFragmentNameMessage=i,t.UniqueFragmentNames=function(e){var t=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var o=n.name.value;return t[o]?e.reportError(new r.GraphQLError(i(o),[t[o],n.name])):t[o]=n.name,!1}}};var r=n(1);function i(e){return'There can be only one fragment named "'.concat(e,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeIncompatibleSpreadMessage=s,t.typeIncompatibleAnonSpreadMessage=c,t.PossibleFragmentSpreads=function(e){return{InlineFragment:function(t){var n=e.getType(),r=e.getParentType();(0,u.isCompositeType)(n)&&(0,u.isCompositeType)(r)&&!(0,a.doTypesOverlap)(e.getSchema(),n,r)&&e.reportError(new o.GraphQLError(c((0,i.default)(r),(0,i.default)(n)),t))},FragmentSpread:function(t){var n=t.name.value,r=function(e,t){var n=e.getFragment(t);if(n){var r=(0,l.typeFromAST)(e.getSchema(),n.typeCondition);if((0,u.isCompositeType)(r))return r}}(e,n),c=e.getParentType();r&&c&&!(0,a.doTypesOverlap)(e.getSchema(),r,c)&&e.reportError(new o.GraphQLError(s(n,(0,i.default)(c),(0,i.default)(r)),t))}}};var r,i=(r=n(6))&&r.__esModule?r:{default:r},o=n(1),a=n(48),l=n(19),u=n(3);function s(e,t,n){return'Fragment "'.concat(e,'" cannot be spread here as objects of ')+'type "'.concat(t,'" can never be of type "').concat(n,'".')}function c(e,t){return"Fragment cannot be spread here as objects of "+'type "'.concat(e,'" can never be of type "').concat(t,'".')}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cycleErrorMessage=i,t.NoFragmentCycles=function(e){var t=Object.create(null),n=[],o=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(a){return function a(l){if(t[l.name.value])return;var u=l.name.value;t[u]=!0;var s=e.getFragmentSpreads(l.selectionSet);if(0===s.length)return;o[u]=n.length;for(var c=0;c1)for(var h=0;h0)return[[t,e.map(function(e){var t=e[0];return t})],e.reduce(function(e,t){var n=t[1];return e.concat(n)},[n]),e.reduce(function(e,t){var n=t[2];return e.concat(n)},[r])]}(function(e,t,n,r,i,o,a,l){var u=[],s=g(e,t,i,o),c=s[0],f=s[1],p=g(e,t,a,l),v=p[0],y=p[1];if(m(e,u,t,n,r,c,v),0!==y.length)for(var b=Object.create(null),T=0;T0?function(){return n.map(function(e){return t.getNamedType(e)})}:[],o=r&&r.length>0?function(){return x(r,function(e){return t.buildField(e)})}:Object.create(null);return new v.GraphQLObjectType({name:e.name.value,description:C(e,this._options),interfaces:i,fields:o,astNode:e})},t._makeInterfaceDef=function(e){var t=this,n=e.fields,r=n&&n.length>0?function(){return x(n,function(e){return t.buildField(e)})}:Object.create(null);return new v.GraphQLInterfaceType({name:e.name.value,description:C(e,this._options),fields:r,astNode:e})},t._makeEnumDef=function(e){var t=this,n=e.values||[];return new v.GraphQLEnumType({name:e.name.value,description:C(e,this._options),values:x(n,function(e){return t.buildEnumValue(e)}),astNode:e})},t._makeUnionDef=function(e){var t=this,n=e.types,r=n&&n.length>0?function(){return n.map(function(e){return t.getNamedType(e)})}:[];return new v.GraphQLUnionType({name:e.name.value,description:C(e,this._options),types:r,astNode:e})},t._makeScalarDef=function(e){return new v.GraphQLScalarType({name:e.name.value,description:C(e,this._options),astNode:e,serialize:function(e){return e}})},t._makeInputObjectDef=function(e){var t=this,n=e.fields;return new v.GraphQLInputObjectType({name:e.name.value,description:C(e,this._options),fields:n?function(){return x(n,function(e){return t.buildInputField(e)})}:Object.create(null),astNode:e})},e}();function x(e,t){return(0,l.default)(e,function(e){return e.name.value},t)}function S(e){var t=(0,d.getDirectiveValues)(g.GraphQLDeprecatedDirective,e);return t&&t.reason}function C(e,t){if(e.description)return e.description.value;if(t&&t.commentDescriptions){var n=function(e){var t=e.loc;if(!t)return;var n=[],r=t.startToken.prev;for(;r&&r.kind===f.TokenKind.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.reverse().join("\n")}(e);if(void 0!==n)return(0,c.dedentBlockStringValue)("\n"+n)}}t.ASTDefinitionBuilder=w},function(e,t,n){"use strict";e.exports=n(193)},function(e,t,n){"use strict";e.exports.encode=n(194),e.exports.decode=n(195),e.exports.format=n(196),e.exports.parse=n(197)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";e.exports.tokenize=function(e,t){var n,r,i,o,a=e.pos,l=e.src.charCodeAt(a);if(t)return!1;if(126!==l)return!1;if(i=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(l),i<2)return!1;for(i%2&&(e.push("text","",0).content=o,i--),n=0;n=0;t--)95!==(n=l[t]).marker&&42!==n.marker||-1!==n.end&&(r=l[n.end],a=t>0&&l[t-1].end===n.end+1&&l[t-1].token===n.token-1&&l[n.end+1].token===r.token+1&&l[t-1].marker===n.marker,o=String.fromCharCode(n.marker),(i=e.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?o+o:o,i.content="",(i=e.tokens[r.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?o+o:o,i.content="",a&&(e.tokens[l[t-1].token].content="",e.tokens[l[n.end+1].token].content="",t--))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var o=n(5),l=void 0,u=void 0;o.on(t,"select",function(e,t){if(!l){var n=t.parentNode;(l=document.createElement("div")).className="CodeMirror-hint-information",n.appendChild(l),(u=document.createElement("div")).className="CodeMirror-hint-deprecation",n.appendChild(u);var o=void 0;n.addEventListener("DOMNodeRemoved",o=function(e){e.target===n&&(n.removeEventListener("DOMNodeRemoved",o),l=null,u=null,o=null)})}var s=e.description?a.render(e.description):"Self descriptive.",c=e.type?''+function e(t){if(t instanceof i.GraphQLNonNull)return e(t.ofType)+"!";if(t instanceof i.GraphQLList)return"["+e(t.ofType)+"]";return''+t.name+""}(e.type)+"":"";if(l.innerHTML=''+("
"===s.slice(0,3)?"
"+c+s.slice(3):c+s)+"
",e.isDeprecated){var f=e.deprecationReason?a.render(e.deprecationReason):"";u.innerHTML='Deprecated'+f,u.style.display="block"}else u.style.display="none";r&&r(l)})};var r,i=n(8),o=n(76);var a=new((r=o)&&r.__esModule?r:{default:r}).default},function(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",function(t){t=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in c)i[o]=c[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;if.clientHeight+1,M=u.getScrollInfo();if(L>0){var P=D.bottom-D.top,F=b.top-(b.bottom-D.top);if(F-P>0)f.style.top=(k=b.top-P-w)+"px",E=!1;else if(P>A){f.style.height=A-5+"px",f.style.top=(k=b.bottom-D.top-w)+"px";var R=u.getCursor();i.from.ch!=R.ch&&(b=u.cursorCoords(R),f.style.left=(T=b.left-_)+"px",D=f.getBoundingClientRect())}}var j,V=D.right-O;if(V>0&&(D.right-D.left>O&&(f.style.width=O-5+"px",V-=D.right-D.left-O),f.style.left=(T=b.left-V-_)+"px"),I)for(var U=f.firstChild;U;U=U.nextSibling)U.style.paddingRight=u.display.nativeBarWidth+"px";return u.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var l=e.options.extraKeys;if(l)for(var a in l)l.hasOwnProperty(a)&&o(a,l[a]);return i}(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:d.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(u.on("blur",this.onBlur=function(){j=setTimeout(function(){r.close()},100)}),u.on("focus",this.onFocus=function(){clearTimeout(j)})),u.on("scroll",this.onScroll=function(){var e=u.getScrollInfo(),t=u.getWrapperElement().getBoundingClientRect(),n=k+M.top-e.top,i=n-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(E||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=T+M.left-e.left+"px"}),e.on(f,"dblclick",function(e){var t=l(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())}),e.on(f,"click",function(e){var t=l(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())}),e.on(f,"mousedown",function(){setTimeout(function(){u.focus()},20)}),e.signal(i,"select",d[this.selectedHint],f.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(a(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,"")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):i(o+1)})}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),l=i;o.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}(n(5))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:function(t){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),s=0;s=0;s--){var f=a[s].head;t.replaceRange("",n(f.line,f.ch-1),n(f.line,f.ch+1),"+delete")}},Enter:function(t){var n=l(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a