All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.graphiql.ci-graphiql-2.31.2.js Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
(function(self) {
  'use strict';

  if (self.fetch) {
    return
  }

  var support = {
    searchParams: 'URLSearchParams' in self,
    iterable: 'Symbol' in self && 'iterator' in Symbol,
    blob: 'FileReader' in self && 'Blob' in self && (function() {
      try {
        new Blob()
        return true
      } catch(e) {
        return false
      }
    })(),
    formData: 'FormData' in self,
    arrayBuffer: 'ArrayBuffer' in self
  }

  function normalizeName(name) {
    if (typeof name !== 'string') {
      name = String(name)
    }
    if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
      throw new TypeError('Invalid character in header field name')
    }
    return name.toLowerCase()
  }

  function normalizeValue(value) {
    if (typeof value !== 'string') {
      value = String(value)
    }
    return value
  }

  // Build a destructive iterator for the value list
  function iteratorFor(items) {
    var iterator = {
      next: function() {
        var value = items.shift()
        return {done: value === undefined, value: value}
      }
    }

    if (support.iterable) {
      iterator[Symbol.iterator] = function() {
        return iterator
      }
    }

    return iterator
  }

  function Headers(headers) {
    this.map = {}

    if (headers instanceof Headers) {
      headers.forEach(function(value, name) {
        this.append(name, value)
      }, this)

    } else if (headers) {
      Object.getOwnPropertyNames(headers).forEach(function(name) {
        this.append(name, headers[name])
      }, this)
    }
  }

  Headers.prototype.append = function(name, value) {
    name = normalizeName(name)
    value = normalizeValue(value)
    var list = this.map[name]
    if (!list) {
      list = []
      this.map[name] = list
    }
    list.push(value)
  }

  Headers.prototype['delete'] = function(name) {
    delete this.map[normalizeName(name)]
  }

  Headers.prototype.get = function(name) {
    var values = this.map[normalizeName(name)]
    return values ? values[0] : null
  }

  Headers.prototype.getAll = function(name) {
    return this.map[normalizeName(name)] || []
  }

  Headers.prototype.has = function(name) {
    return this.map.hasOwnProperty(normalizeName(name))
  }

  Headers.prototype.set = function(name, value) {
    this.map[normalizeName(name)] = [normalizeValue(value)]
  }

  Headers.prototype.forEach = function(callback, thisArg) {
    Object.getOwnPropertyNames(this.map).forEach(function(name) {
      this.map[name].forEach(function(value) {
        callback.call(thisArg, value, name, this)
      }, this)
    }, this)
  }

  Headers.prototype.keys = function() {
    var items = []
    this.forEach(function(value, name) { items.push(name) })
    return iteratorFor(items)
  }

  Headers.prototype.values = function() {
    var items = []
    this.forEach(function(value) { items.push(value) })
    return iteratorFor(items)
  }

  Headers.prototype.entries = function() {
    var items = []
    this.forEach(function(value, name) { items.push([name, value]) })
    return iteratorFor(items)
  }

  if (support.iterable) {
    Headers.prototype[Symbol.iterator] = Headers.prototype.entries
  }

  function consumed(body) {
    if (body.bodyUsed) {
      return Promise.reject(new TypeError('Already read'))
    }
    body.bodyUsed = true
  }

  function fileReaderReady(reader) {
    return new Promise(function(resolve, reject) {
      reader.onload = function() {
        resolve(reader.result)
      }
      reader.onerror = function() {
        reject(reader.error)
      }
    })
  }

  function readBlobAsArrayBuffer(blob) {
    var reader = new FileReader()
    reader.readAsArrayBuffer(blob)
    return fileReaderReady(reader)
  }

  function readBlobAsText(blob) {
    var reader = new FileReader()
    reader.readAsText(blob)
    return fileReaderReady(reader)
  }

  function Body() {
    this.bodyUsed = false

    this._initBody = function(body) {
      this._bodyInit = body
      if (typeof body === 'string') {
        this._bodyText = body
      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
        this._bodyBlob = body
      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
        this._bodyFormData = body
      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
        this._bodyText = body.toString()
      } else if (!body) {
        this._bodyText = ''
      } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
        // Only support ArrayBuffers for POST method.
        // Receiving ArrayBuffers happens via Blobs, instead.
      } else {
        throw new Error('unsupported BodyInit type')
      }

      if (!this.headers.get('content-type')) {
        if (typeof body === 'string') {
          this.headers.set('content-type', 'text/plain;charset=UTF-8')
        } else if (this._bodyBlob && this._bodyBlob.type) {
          this.headers.set('content-type', this._bodyBlob.type)
        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
        }
      }
    }

    if (support.blob) {
      this.blob = function() {
        var rejected = consumed(this)
        if (rejected) {
          return rejected
        }

        if (this._bodyBlob) {
          return Promise.resolve(this._bodyBlob)
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as blob')
        } else {
          return Promise.resolve(new Blob([this._bodyText]))
        }
      }

      this.arrayBuffer = function() {
        return this.blob().then(readBlobAsArrayBuffer)
      }

      this.text = function() {
        var rejected = consumed(this)
        if (rejected) {
          return rejected
        }

        if (this._bodyBlob) {
          return readBlobAsText(this._bodyBlob)
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as text')
        } else {
          return Promise.resolve(this._bodyText)
        }
      }
    } else {
      this.text = function() {
        var rejected = consumed(this)
        return rejected ? rejected : Promise.resolve(this._bodyText)
      }
    }

    if (support.formData) {
      this.formData = function() {
        return this.text().then(decode)
      }
    }

    this.json = function() {
      return this.text().then(JSON.parse)
    }

    return this
  }

  // HTTP methods whose capitalization should be normalized
  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']

  function normalizeMethod(method) {
    var upcased = method.toUpperCase()
    return (methods.indexOf(upcased) > -1) ? upcased : method
  }

  function Request(input, options) {
    options = options || {}
    var body = options.body
    if (Request.prototype.isPrototypeOf(input)) {
      if (input.bodyUsed) {
        throw new TypeError('Already read')
      }
      this.url = input.url
      this.credentials = input.credentials
      if (!options.headers) {
        this.headers = new Headers(input.headers)
      }
      this.method = input.method
      this.mode = input.mode
      if (!body) {
        body = input._bodyInit
        input.bodyUsed = true
      }
    } else {
      this.url = input
    }

    this.credentials = options.credentials || this.credentials || 'omit'
    if (options.headers || !this.headers) {
      this.headers = new Headers(options.headers)
    }
    this.method = normalizeMethod(options.method || this.method || 'GET')
    this.mode = options.mode || this.mode || null
    this.referrer = null

    if ((this.method === 'GET' || this.method === 'HEAD') && body) {
      throw new TypeError('Body not allowed for GET or HEAD requests')
    }
    this._initBody(body)
  }

  Request.prototype.clone = function() {
    return new Request(this)
  }

  function decode(body) {
    var form = new FormData()
    body.trim().split('&').forEach(function(bytes) {
      if (bytes) {
        var split = bytes.split('=')
        var name = split.shift().replace(/\+/g, ' ')
        var value = split.join('=').replace(/\+/g, ' ')
        form.append(decodeURIComponent(name), decodeURIComponent(value))
      }
    })
    return form
  }

  function headers(xhr) {
    var head = new Headers()
    var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
    pairs.forEach(function(header) {
      var split = header.trim().split(':')
      var key = split.shift().trim()
      var value = split.join(':').trim()
      head.append(key, value)
    })
    return head
  }

  Body.call(Request.prototype)

  function Response(bodyInit, options) {
    if (!options) {
      options = {}
    }

    this.type = 'default'
    this.status = options.status
    this.ok = this.status >= 200 && this.status < 300
    this.statusText = options.statusText
    this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
    this.url = options.url || ''
    this._initBody(bodyInit)
  }

  Body.call(Response.prototype)

  Response.prototype.clone = function() {
    return new Response(this._bodyInit, {
      status: this.status,
      statusText: this.statusText,
      headers: new Headers(this.headers),
      url: this.url
    })
  }

  Response.error = function() {
    var response = new Response(null, {status: 0, statusText: ''})
    response.type = 'error'
    return response
  }

  var redirectStatuses = [301, 302, 303, 307, 308]

  Response.redirect = function(url, status) {
    if (redirectStatuses.indexOf(status) === -1) {
      throw new RangeError('Invalid status code')
    }

    return new Response(null, {status: status, headers: {location: url}})
  }

  self.Headers = Headers
  self.Request = Request
  self.Response = Response

  self.fetch = function(input, init) {
    return new Promise(function(resolve, reject) {
      var request
      if (Request.prototype.isPrototypeOf(input) && !init) {
        request = input
      } else {
        request = new Request(input, init)
      }

      var xhr = new XMLHttpRequest()

      function responseURL() {
        if ('responseURL' in xhr) {
          return xhr.responseURL
        }

        // Avoid security warnings on getResponseHeader when not allowed by CORS
        if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
          return xhr.getResponseHeader('X-Request-URL')
        }

        return
      }

      xhr.onload = function() {
        var options = {
          status: xhr.status,
          statusText: xhr.statusText,
          headers: headers(xhr),
          url: responseURL()
        }
        var body = 'response' in xhr ? xhr.response : xhr.responseText
        resolve(new Response(body, options))
      }

      xhr.onerror = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.ontimeout = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.open(request.method, request.url, true)

      if (request.credentials === 'include') {
        xhr.withCredentials = true
      }

      if ('responseType' in xhr && support.blob) {
        xhr.responseType = 'blob'
      }

      request.headers.forEach(function(value, name) {
        xhr.setRequestHeader(name, value)
      })

      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
    })
  }
  self.fetch.polyfill = true
})(typeof self !== 'undefined' ? self : this);

/**
 * React v15.3.2
 *
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i8&&x<=11),w=32,P=String.fromCharCode(w),k=f.topLevelTypes,M={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[k.topCompositionEnd,k.topKeyPress,k.topTextInput,k.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[k.topBlur,k.topCompositionEnd,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[k.topBlur,k.topCompositionStart,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[k.topBlur,k.topCompositionUpdate,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]}},S=!1,R=null,I={eventTypes:M,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};t.exports=I},{140:140,158:158,16:16,20:20,21:21,95:95,99:99}],3:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=s},{}],4:[function(e,t,n){"use strict";var r=e(3),o=e(140),a=(e(66),e(142),e(113)),i=e(153),s=e(159),u=(e(161),s(function(e){return i(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(e){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=u(r)+":",n+=a(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=a(i,t[i],n);if("float"!==i&&"cssFloat"!==i||(i=c),s)o[i]=s;else{var u=l&&r.shorthandPropertyExpansions[i];if(u)for(var p in u)o[p]="";else o[i]=""}}}};t.exports=d},{113:113,140:140,142:142,153:153,159:159,161:161,3:3,66:66}],5:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(132),a=e(162),i=e(25);e(154);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var L=!1;_.canUseDOM&&(L=w("input")&&(!document.documentMode||document.documentMode>11));var U={get:function(){return D.get.call(this)},set:function(e){O=""+e,D.set.call(this,e)}},F={eventTypes:S,extractEvents:function(e,t,n,o){var a,i,s=t?E.getNodeFromInstance(t):window;if(r(s)?A?a=u:i=l:P(s)?L?a=f:(a=m,i=h):v(s)&&(a=g),a){var c=a(e,t);if(c){var p=T.getPooled(S.change,c,n,o);return p.type="change",C.accumulateTwoPhaseDispatches(p),p}}i&&i(e,s,t)}};t.exports=F},{121:121,128:128,129:129,140:140,158:158,16:16,17:17,20:20,40:40,88:88,97:97}],7:[function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):v(e,t,n)}function i(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var o=t;;){var a=o.nextSibling;if(v(e,o,r),o===n)break;o=a}}function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&v(r,document.createTextNode(n),o):n?(m(o,n),u(r,o,t)):u(r,e,t)}var c=e(8),p=e(12),d=e(70),f=(e(40),e(66),e(112)),h=e(134),m=e(135),v=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n-1?void 0:i("96",e),!l.plugins[n]){t.extractEvents?void 0:i("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i("98",a,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];a(s,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){l.registrationNameModules[e]?i("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(132),s=(e(154),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?i("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?i("102",n):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{132:132,154:154}],19:[function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function a(e){return e===y.topMouseDown||e===y.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(o,n,e):v.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),a.addPoolingTo(r),t.exports=r},{125:125,162:162,25:25}],22:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_PROPERTY,a=r.injection.HAS_BOOLEAN_VALUE,i=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,as:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|a,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,coords:0,crossOrigin:0,data:0,dateTime:0,default:a,defer:a,dir:0,disabled:a,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|a,muted:o|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,playsInline:a,poster:0,preload:0,profile:0,radioGroup:0,readOnly:a,referrerPolicy:0,rel:0,required:a,reversed:a,role:0,rows:s,rowSpan:i,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:o|a,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:i,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};t.exports=l},{10:10}],23:[function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var a={escape:r,unescape:o};t.exports=a},{}],24:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?s("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?s("88"):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?s("89"):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=e(132),u=e(76),l=e(75),c=e(77),p=(e(154),e(161),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){return!e[t]||p[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},f={},h={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var o=d[r](t,r,e,l.prop,null,c);o instanceof Error&&!(o.message in f)&&(f[o.message]=!0,i(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=h},{132:132,154:154,161:161,75:75,76:76,77:77}],25:[function(e,t,n){"use strict";var r=e(132),o=(e(154),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},u=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=e(132),v=e(162),g=e(1),y=e(4),b=e(8),C=e(9),_=e(10),E=e(11),x=e(16),T=e(17),N=e(18),w=e(27),P=e(37),k=e(39),M=e(40),S=e(46),R=e(47),I=e(48),O=e(52),D=(e(66),e(69)),A=e(84),L=(e(146),e(114)),U=(e(154),e(128),e(158)),F=(e(160),e(138),e(161),k),V=T.deleteListener,j=M.getNodeFromInstance,B=w.listenTo,W=N.registrationNameModules,H={string:!0,number:!0},q=U({style:null}),K=U({__html:null}),Y={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},z=11,X={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=v({menuitem:!0},G),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":a=P.getHostProps(this,a,t);break;case"input":S.mountWrapper(this,a,t),a=S.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"option":R.mountWrapper(this,a,t),a=R.getHostProps(this,a);break;case"select":I.mountWrapper(this,a,t),a=I.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"textarea":O.mountWrapper(this,a,t),a=O.getHostProps(this,a),e.getReactMountReady().enqueue(c,this)}o(this,a);var i,p;null!=t?(i=t._namespaceURI,p=t._tag):n._tag&&(i=n._namespaceURI,p=n._tag),(null==i||i===C.svg&&"foreignobject"===p)&&(i=C.html),i===C.html&&("svg"===this._tag?i=C.svg:"math"===this._tag&&(i=C.mathml)),this._namespaceURI=i;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(i===C.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+">",f=m.removeChild(m.firstChild)}else f=a.is?h.createElement(this._currentElement.type,a.is):h.createElement(this._currentElement.type);else f=h.createElementNS(i,this._currentElement.type);M.precacheNode(this,f),this._flags|=F.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(f),this._updateDOMProperties(null,a,e);var y=b(f);this._createInitialChildren(e,a,r,y),d=y}else{var _=this._createOpenTagMarkupAndPutListeners(e,a),x=this._createContentMarkup(e,a,r);d=!x&&G[this._tag]?_+"/>":_+">"+x+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&a(this,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=y.createMarkupForStyles(o,this));var i=null;null!=this._tag&&f(this._tag,t)?Y.hasOwnProperty(r)||(i=E.createMarkupForCustomAttribute(r,o)):i=E.createMarkupForProperty(r,o),i&&(n+=" "+i)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=H[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=L(a);else if(null!=i){var s=this.mountChildren(i,e,n);r=s.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&b.queueHTML(r,o.__html);else{var a=H[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)b.queueText(r,a);else if(null!=i)for(var s=this.mountChildren(i,e,n),u=0;u"},receiveComponent:function(){},getHostNode:function(){return a.getNodeFromInstance(this)},unmountComponent:function(){a.uncacheNode(this)}}),t.exports=i},{162:162,40:40,8:8}],43:[function(e,t,n){"use strict";var r=e(56),o=r.createFactory,a={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=a},{56:56}],44:[function(e,t,n){"use strict";var r={useCreateElement:!0};t.exports=r},{}],45:[function(e,t,n){"use strict";var r=e(7),o=e(40),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};t.exports=a},{40:40,7:7}],46:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=c.getNodeFromInstance(this),s=i;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var s=l(e,o),u=l(e,a);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=e(140),l=e(124),c=e(125),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:s};t.exports=d},{124:124,125:125,140:140}],50:[function(e,t,n){"use strict";var r=e(55),o=e(83),a=e(89);r.inject();var i={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:a};t.exports=i},{55:55,83:83,89:89}],51:[function(e,t,n){"use strict";var r=e(132),o=e(162),a=e(7),i=e(8),s=e(40),u=e(114),l=(e(154),e(138),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,a=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(a),d=c.createComment(l),f=i(c.createDocumentFragment());return i.queueChild(f,i(p)),this._stringText&&i.queueChild(f,i(c.createTextNode(this._stringText))),i.queueChild(f,i(d)),s.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();a.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=l},{114:114,132:132,138:138,154:154,162:162,40:40,7:7,8:8}],52:[function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return c.asap(r,this),n}var a=e(132),i=e(162),s=e(14),u=e(24),l=e(40),c=e(88),p=(e(154),e(161),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?a("91"):void 0;var n=i({},s.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=u.getValue(t),r=n;if(null==n){var i=t.defaultValue,s=t.children;null!=s&&(null!=i?a("92"):void 0,Array.isArray(s)&&(s.length<=1?void 0:a("93"),s=s[0]),i=""+s),null==i&&(i=""),r=i}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=u.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});t.exports=p},{132:132,14:14,154:154,161:161,162:162,24:24,40:40,88:88}],53:[function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,a=t;a;a=a._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var i=n;i--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function a(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function i(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o0;)n(u[l],!1,a)}var u=e(132);e(154);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:a,traverseTwoPhase:i,traverseEnterLeave:s}},{132:132,154:154}],54:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(162),a=e(88),i=e(106),s=e(146),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:a.flushBatchedUpdates.bind(a)},c=[l,u];o(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{106:106,146:146,162:162,88:88}],55:[function(e,t,n){"use strict";function r(){E||(E=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(i),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(f),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:C,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(u),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(l))}var o=e(2),a=e(6),i=e(13),s=e(15),u=e(22),l=e(32),c=e(38),p=e(40),d=e(42),f=e(53),h=e(51),m=e(54),v=e(60),g=e(63),y=e(79),b=e(90),C=e(91),_=e(92),E=!1;t.exports={inject:r}},{13:13,15:15,2:2,22:22,32:32,38:38,40:40,42:42,51:51,53:53,54:54,6:6,60:60,63:63,79:79,90:90,91:91,92:92}],56:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var a=e(162),i=e(35),s=(e(161),e(110),Object.prototype.hasOwnProperty),u="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,l={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,a,i){var s={$$typeof:u,type:e,key:t,ref:n,props:i,_owner:a};return s};c.createElement=function(e,t,n){var a,u={},p=null,d=null,f=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(p=""+t.key),f=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(a in t)s.call(t,a)&&!l.hasOwnProperty(a)&&(u[a]=t[a])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var v=Array(m),g=0;g1){for(var b=Array(y),C=0;C/,a=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return a.test(e)?e:e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=i},{109:109}],68:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,s=C(F,null,null,null,null,null,t);if(e){var u=E.get(e);i=u._processChildContext(u._context)}else i=P;var c=d(n);if(c){var p=c._currentElement,h=p.props;if(S(h,t)){var m=c._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return V._updateRootComponent(c,s,i,n,v),m}V.unmountComponentAtNode(n)}var g=o(n),y=g&&!!a(g),b=l(n),_=y&&!c&&!b,x=V._renderNewRootComponent(s,n,_,i)._renderedComponent.getPublicInstance();return r&&r.call(x),x},render:function(e,t,n){return V._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);return t?(delete L[t._instance.rootID],w.batchedUpdates(u,t,e,!1),!0):(l(e),1===e.nodeType&&e.hasAttribute(I),!1)},_mountImageIntoNode:function(e,t,n,a,i){if(c(t)?void 0:f("41"),a){var s=o(t);if(x.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(x.CHECKSUM_ATTR_NAME);s.removeAttribute(x.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(x.CHECKSUM_ATTR_NAME,u);var p=e,d=r(p,l),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===D?f("42",m):void 0}if(t.nodeType===D?f("43"):void 0,i.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else M(t,e),g.precacheNode(n,t.firstChild)}};t.exports=V},{10:10,127:127,132:132,134:134,136:136,147:147,154:154,161:161,27:27,35:35,40:40,41:41,44:44,56:56,61:61,65:65,66:66,67:67,8:8,80:80,87:87,88:88}],69:[function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function a(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function i(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=e(132),p=e(33),d=(e(65),e(66),e(70)),f=(e(35),e(80)),h=e(28),m=(e(146),e(116)),v=(e(154),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,a){var i,s=0;return i=m(t,s),h.updateChildren(e,i,n,r,o,this,this._hostContainerInfo,a,s),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i],u=0,l=f.mountComponent(s,t,this,this._hostContainerInfo,n,u);s._mountIndex=a++,o.push(l)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[s(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[i(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},a=[],i=this._reconcilerUpdateChildren(r,e,a,o,t,n);if(i||r){var s,c=null,p=0,d=0,h=0,m=null;for(s in i)if(i.hasOwnProperty(s)){var v=r&&r[s],g=i[s];v===g?(c=u(c,this.moveChild(v,m,p,d)),d=Math.max(v._mountIndex,d),v._mountIndex=p):(v&&(d=Math.max(v._mountIndex,d)),c=u(c,this._mountChildAtIndex(g,a[h],m,p,t,n)),h++),p++,m=f.getHostNode(g)}for(s in o)o.hasOwnProperty(s)&&(c=u(c,this._unmountChild(r[s],o[s])));c&&l(this,c),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex>"),P={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:s(),arrayOf:u,element:l(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:m};o.prototype=Error.prototype,t.exports=P},{123:123,146:146,161:161,56:56,74:74,77:77}],77:[function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},{}],78:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var a=e(162),i=e(31),s=e(72),u=e(147);o.prototype=i.prototype,r.prototype=new o,r.prototype.constructor=r,a(r.prototype,i.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},{147:147,162:162,31:31,72:72}],79:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=a.getPooled(null),this.useCreateElement=e}var o=e(162),a=e(5),i=e(25),s=e(27),u=e(64),l=(e(66),e(106)),c=e(87),p={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return c},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,m),i.addPoolingTo(r),t.exports=r},{106:106,162:162,25:25,27:27,5:5,64:64,66:66,87:87}],80:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(81),a=(e(66),e(161),{mountComponent:function(e,t,n,o,a,i){var s=e.mountComponent(t,n,o,a,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),s},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var s=o.shouldUpdateRefs(i,t);s&&o.detachRefs(e,i),e.receiveComponent(t,n,a),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});t.exports=a},{161:161,66:66,81:81}],81:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=e(73),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t.ref!==e.ref||"string"==typeof t.ref&&t._owner!==e._owner},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=i},{73:73}],82:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],83:[function(e,t,n){"use strict";function r(e,t){var n;try{return h.injection.injectBatchingStrategy(d),n=f.getPooled(t),g++,n.perform(function(){var r=v(e,!0),o=p.mountComponent(r,n,null,s(),m,0);return t||(o=c.addChecksumToMarkup(o)),o},null)}finally{g--,f.release(n),g||h.injection.injectBatchingStrategy(u)}}function o(e){return l.isValidElement(e)?void 0:i("46"),r(e,!1)}function a(e){return l.isValidElement(e)?void 0:i("47"),r(e,!0)}var i=e(132),s=e(41),u=e(54),l=e(56),c=(e(66),e(67)),p=e(80),d=e(82),f=e(84),h=e(88),m=e(147),v=e(127),g=(e(154),0);t.exports={renderToString:o,renderToStaticMarkup:a}},{127:127,132:132,147:147,154:154,41:41,54:54,56:56,66:66,67:67,80:80,82:82,84:84,88:88}],84:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new s(this)}var o=e(162),a=e(25),i=e(106),s=(e(66),e(85)),u=[],l={enqueue:function(){}},c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return l},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,i.Mixin,c),a.addPoolingTo(r),t.exports=r},{106:106,162:162,25:25,66:66,85:85}],85:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var a=e(87),i=(e(106),e(161),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&a.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?a.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?a.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?a.enqueueSetState(e,t):o(e,"setState")},e}());t.exports=i},{106:106,161:161,87:87}],86:[function(e,t,n){"use strict";var r=e(162),o=e(36),a=e(50),i=e(26),s=r({__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:o,__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:a},i);t.exports=s},{162:162,26:26,36:36,50:50}],87:[function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function a(e,t){var n=s.get(e);return n?n:null}var i=e(132),s=(e(35),e(65)),u=(e(66),e(88)),l=(e(154),e(161),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=a(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=a(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?i("122",t,o(e)):void 0}});t.exports=l},{132:132,154:154,161:161,35:35,65:65,66:66,88:88}],88:[function(e,t,n){"use strict";function r(){P.ReactReconcileTransaction&&_?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=P.ReactReconcileTransaction.getPooled(!0)}function a(e,t,n,o,a,i){r(),_.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?c("124",t,g.length):void 0,g.sort(i),y++;for(var n=0;n]/;t.exports=o},{}],115:[function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=s(t),t?a.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=e(132),a=(e(35),e(40)),i=e(65),s=e(122);e(154),e(161);t.exports=r},{122:122,132:132,154:154,161:161,35:35,40:40,65:65}],116:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,a=void 0===o[n];a&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return a(e,r,n),n}var a=(e(23),e(137));e(161);"undefined"!=typeof n&&n.env,t.exports=o}).call(this,void 0)},{137:137,161:161,23:23}],117:[function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}t.exports=r},{}],118:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],119:[function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(118),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{118:118}],120:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return!!r&&!!n[r]}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],121:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}t.exports=r},{}],122:[function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=e(71);t.exports=r},{71:71}],123:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[a]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],124:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,a<=t&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],125:[function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(140),a=null;t.exports=r},{140:140}],126:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var a=e(140),i={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};a.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),t.exports=o},{140:140}],127:[function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function a(e,t){var n;if(null===e||e===!1)n=l.create(a);else if("object"==typeof e){var s=e;!s||"function"!=typeof s.type&&"string"!=typeof s.type?i("130",null==s.type?s.type:typeof s.type,r(s._owner)):void 0,"string"==typeof s.type?n=c.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):i("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var i=e(132),s=e(162),u=e(34),l=e(57),c=e(62),p=(e(154),e(161),function(e){this.construct(e)});s(p.prototype,u.Mixin,{_instantiateReactComponent:a});t.exports=a},{132:132,154:154,161:161,162:162,34:34,57:57,62:62}],128:[function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=e(140);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{140:140}],129:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],130:[function(e,t,n){"use strict";function r(e){return a.isValidElement(e)?void 0:o("143"),e}var o=e(132),a=e(56);e(154);t.exports=r},{132:132,154:154,56:56}],131:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(114);t.exports=r},{114:114}],132:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r]/,u=e(112),l=u(function(e,t){if(e.namespaceURI!==a.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}t.exports=l},{112:112,140:140,9:9}],135:[function(e,t,n){"use strict";var r=e(140),o=e(114),a=e(134),i=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),t.exports=i},{114:114,134:134,140:140}],136:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],137:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,a){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||s.isValidElement(e))return n(a,e,""===t?c+r(e,0):t),1;var f,h,m=0,v=""===t?c:t+p;if(Array.isArray(e))for(var g=0;g":i.innerHTML="<"+e+">",s[e]=!i.firstChild),s[e]?d[e]:null}var o=e(140),a=e(154),i=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),t.exports=r},{140:140,154:154}],151:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],152:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],153:[function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=e(152),a=/^ms-/;t.exports=r},{152:152}],154:[function(e,t,n){"use strict";function r(e,t,n,r,o,a,i,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}t.exports=r},{}],155:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],156:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(155);t.exports=r},{155:155}],157:[function(e,t,n){"use strict";var r=e(154),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{154:154}],158:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],159:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],160:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i0&&(a=t[t.length-1]);var r=void 0,n=void 0;a?"Search Results"===a.name?(r=a.name,n=_react2.default.createElement(SearchDoc,{searchValue:a.searchValue,schema:e,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField})):(r=a.name,n=(0,_graphql.isType)(a)?_react2.default.createElement(TypeDoc,{key:a.name,schema:e,type:a,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField}):_react2.default.createElement(FieldDoc,{key:a.name,field:a,onClickType:this.handleClickTypeOrField})):e&&(r="Documentation Explorer",n=_react2.default.createElement(SchemaDoc,{schema:e,onClickType:this.handleClickTypeOrField}));var c=void 0;1===t.length?c="Schema":t.length>1&&(c=t[t.length-2].name);var l=_react2.default.createElement("div",{className:"spinner-container"},_react2.default.createElement("div",{className:"spinner"})),o=n&&(n.type===SearchDoc||n.type===SchemaDoc);return _react2.default.createElement("div",{className:"doc-explorer"},_react2.default.createElement("div",{className:"doc-explorer-title-bar"},c&&_react2.default.createElement("div",{className:"doc-explorer-back",onClick:this.handleNavBackClick},c),_react2.default.createElement("div",{className:"doc-explorer-title"},r),_react2.default.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),_react2.default.createElement("div",{className:"doc-explorer-contents"},_react2.default.createElement(SearchBox,{isShown:o,onSearch:this.handleSearch}),this.props.schema?n:l))}},{key:"showDoc",value:function(e){var t=this.state.navStack,a=t.length>0&&t[t.length-1]===e;a||(t=t.concat([e])),this.setState({navStack:t})}},{key:"showSearch",value:function(e){var t=this.state.navStack,a=t.length>0&&t[t.length-1];a?a.searchValue!==e.searchValue&&(t=t.slice(0,-1).concat([e])):t=t.concat([e]),this.setState({navStack:t})}}]),t}(_react2.default.Component);DocExplorer.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema)};var SearchBox=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.handleChange=function(e){a.setState({value:e.target.value}),a._debouncedOnSearch()},a.state={value:""},a._debouncedOnSearch=(0,_debounce2.default)(200,function(){a.props.onSearch(a.state.value)}),a}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e,t){return e.isShown!==this.props.isShown||t.value!==this.state.value}},{key:"render",value:function(){return _react2.default.createElement("div",null,this.props.isShown&&_react2.default.createElement("label",{className:"search-box-outer"},_react2.default.createElement("input",{className:"search-box-input",onChange:this.handleChange,type:"text",value:this.state.value,placeholder:"Search the schema ..."})))}}]),t}(_react2.default.Component);SearchBox.propTypes={isShown:_react.PropTypes.bool,onSearch:_react.PropTypes.func};var SearchDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue}},{key:"render",value:function(){var e=this,t=this.props.searchValue,a=this.props.schema,r=this.props.onClickType,n=this.props.onClickField,c=a.getTypeMap(),l=[],o=[],s=Object.keys(c),i=!0,p=!1,u=void 0;try{for(var d,m=function(){var a=d.value;if(l.length+o.length>=100)return"break";var s=c[a],i=[];e._isMatch(a,t)&&i.push("Type Name"),i.length&&l.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement(TypeLink,{type:s,onClick:r}))),s.getFields&&!function(){var a=s.getFields();Object.keys(a).forEach(function(c){var l=a[c];if(e._isMatch(c,t))o.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(e){return n(l,s,e)}},l.name)," on ",_react2.default.createElement(TypeLink,{type:s,onClick:r})));else if(l.args&&l.args.length){var i=l.args.filter(function(a){return e._isMatch(a.name,t)});i.length>0&&o.push(_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(e){return n(l,s,e)}},l.name),"(",_react2.default.createElement("span",null,i.map(function(e){return _react2.default.createElement("span",{className:"arg",key:e.name},_react2.default.createElement("span",{className:"arg-name"},e.name),": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:r}))})),")"," on ",_react2.default.createElement(TypeLink,{type:s,onClick:r})))}})}()},h=s[Symbol.iterator]();!(i=(d=h.next()).done);i=!0){var f=m();if("break"===f)break}}catch(e){p=!0,u=e}finally{try{!i&&h.return&&h.return()}finally{if(p)throw u}}return 0===l.length&&0===o.length?_react2.default.createElement("span",{className:"doc-alert-text"},"No results found."):_react2.default.createElement("div",null,_react2.default.createElement("div",{className:"doc-category"},(l.length>0||o.length>0)&&_react2.default.createElement("div",{className:"doc-category-title"},"search results"),l,o))}},{key:"_isMatch",value:function(e,t){try{var a=t.replace(/[^_0-9A-Za-z]/g,function(e){return"\\"+e});return e.search(new RegExp(a,"i"))!==-1}catch(a){return e.toLowerCase().indexOf(t.toLowerCase())!==-1}}}]),t}(_react2.default.Component);SearchDoc.propTypes={schema:_react.PropTypes.object,searchValue:_react.PropTypes.string,onClickType:_react.PropTypes.func,onClickField:_react.PropTypes.func};var SchemaDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.schema!==e.schema}},{key:"render",value:function(){var e=this.props.schema,t=e.getQueryType(),a=e.getMutationType&&e.getMutationType(),r=e.getSubscriptionType&&e.getSubscriptionType();return _react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:"A GraphQL schema provides a root type for each kind of operation."}),_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"root types"),_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"query"),": ",_react2.default.createElement(TypeLink,{type:t,onClick:this.props.onClickType})),a&&_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"mutation"),": ",_react2.default.createElement(TypeLink,{type:a,onClick:this.props.onClickType})),r&&_react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("span",{className:"keyword"},"subscription"),": ",_react2.default.createElement(TypeLink,{type:r,onClick:this.props.onClickType}))))}}]),t}(_react2.default.Component);SchemaDoc.propTypes={schema:_react.PropTypes.object,onClickType:_react.PropTypes.func};var TypeDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.type!==e.type||this.props.schema!==e.schema}},{key:"render",value:function(){var e=this.props.schema,t=this.props.type,a=this.props.onClickType,r=this.props.onClickField,n=void 0,c=void 0;t instanceof _graphql.GraphQLUnionType?(n="possible types",c=e.getPossibleTypes(t)):t instanceof _graphql.GraphQLInterfaceType?(n="implementations",c=e.getPossibleTypes(t)):t instanceof _graphql.GraphQLObjectType&&(n="implements",c=t.getInterfaces());var l=void 0;c&&c.length>0&&(l=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},n),c.map(function(e){return _react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement(TypeLink,{type:e,onClick:a}))})));var o=void 0;t.getFields&&!function(){var e=t.getFields(),n=Object.keys(e).map(function(t){return e[t]});o=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"fields"),n.map(function(e){var n=void 0;return e.args&&e.args.length>0&&(n=e.args.map(function(e){return _react2.default.createElement("span",{className:"arg",key:e.name},_react2.default.createElement("span",{className:"arg-name"},e.name),": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:a}))})),_react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(a){return r(e,t,a)}},e.name),n&&["(",_react2.default.createElement("span",{key:"args"},n),")"],": ",_react2.default.createElement(TypeLink,{type:e.type,onClick:a}),(e.isDeprecated||e.deprecationReason)&&_react2.default.createElement("span",{className:"doc-alert-text"}," (DEPRECATED)"))}))}();var s=void 0;return t instanceof _graphql.GraphQLEnumType&&(s=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"values"),t.getValues().map(function(e){return _react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement("div",{className:"enum-value"},e.name,(e.isDeprecated||e.deprecationReason)&&_react2.default.createElement("span",{className:"doc-alert-text"}," (DEPRECATED)")),_react2.default.createElement(MarkdownContent,{className:"doc-value-description",markdown:e.description}),e.deprecationReason&&_react2.default.createElement(MarkdownContent,{className:"doc-alert-text",markdown:e.deprecationReason}))}))),_react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:t.description||"No Description"}),t instanceof _graphql.GraphQLObjectType&&l,o,s,!(t instanceof _graphql.GraphQLObjectType)&&l)}}]),t}(_react2.default.Component);TypeDoc.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),type:_react.PropTypes.object,onClickType:_react.PropTypes.func,onClickField:_react.PropTypes.func};var FieldDoc=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.field!==e.field}},{key:"render",value:function(){var e=this,t=this.props.field,a=void 0;return t.args&&t.args.length>0&&(a=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"arguments"),t.args.map(function(t){return _react2.default.createElement("div",{key:t.name,className:"doc-category-item"},_react2.default.createElement("div",null,_react2.default.createElement("span",{className:"arg-name"},t.name),": ",_react2.default.createElement(TypeLink,{type:t.type,onClick:e.props.onClickType})),_react2.default.createElement(MarkdownContent,{className:"doc-value-description",markdown:t.description}))}))),_react2.default.createElement("div",null,_react2.default.createElement(MarkdownContent,{className:"doc-type-description",markdown:t.description||"No Description"}),t.deprecationReason&&_react2.default.createElement(MarkdownContent,{className:"doc-alert-text",markdown:t.deprecationReason}),_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"type"),_react2.default.createElement(TypeLink,{type:t.type,onClick:this.props.onClickType})),a)}}]),t}(_react2.default.Component);FieldDoc.propTypes={field:_react.PropTypes.object,onClickType:_react.PropTypes.func};var TypeLink=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.type!==e.type}},{key:"render",value:function(){return renderType(this.props.type,this.props.onClick)}}]),t}(_react2.default.Component);TypeLink.propTypes={type:_react.PropTypes.object,onClick:_react.PropTypes.func};var MarkdownContent=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.markdown!==e.markdown}},{key:"render",value:function(){var e=this.props.markdown;if(!e)return _react2.default.createElement("div",null);var t=(0,_marked2.default)(e,{sanitize:!0});return _react2.default.createElement("div",{className:this.props.className,dangerouslySetInnerHTML:{__html:t}})}}]),t}(_react2.default.Component);MarkdownContent.propTypes={markdown:_react.PropTypes.string,className:_react.PropTypes.string}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/debounce":10,graphql:57,marked:127}],2:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExecuteButton=void 0;var _createClass=function(){function e(e,t){for(var n=0;n1,r=null;o&&n&&!function(){var n=e.state.highlight;r=_react2.default.createElement("ul",{className:"execute-options"},t.map(function(t){return _react2.default.createElement("li",{key:t.name?t.name.value:"*",className:t===n&&"selected",onMouseOver:function(){return e.setState({highlight:t})},onMouseOut:function(){return e.setState({highlight:null})},onMouseUp:function(){return e._onOptionSelected(t)}},t.name?t.name.value:"")}))}();var a=void 0;!this.props.isRunning&&o||(a=this._onClick);var u=void 0;this.props.isRunning||!o||n||(u=this._onOptionsOpen);var i=this.props.isRunning?_react2.default.createElement("path",{d:"M 10 10 L 23 10 L 23 23 L 10 23 z"}):_react2.default.createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"});return _react2.default.createElement("div",{className:"execute-button-wrap"},_react2.default.createElement("button",{className:"execute-button",onMouseDown:u,onClick:a,title:"Execute Query (Ctrl-Enter)"},_react2.default.createElement("svg",{width:"34",height:"34"},i)),r)}}]),t}(_react2.default.Component);ExecuteButton.propTypes={onRun:_react.PropTypes.func,onStop:_react.PropTypes.func,isRunning:_react.PropTypes.bool,operations:_react.PropTypes.array}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function isPromise(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&"function"==typeof e.then}function observableToPromise(e){return isObservable(e)?new Promise(function(t,r){var o=e.subscribe(function(e){t(e),o.unsubscribe()},r,function(){r(new Error("no value resolved"))})}):e}function isObservable(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&"function"==typeof e.subscribe}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphiQL=void 0;var _typeof="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},_extends=Object.assign||function(e){for(var t=1;t0&&!function(){var t=e.queryEditorComponent.getCodeMirror();t.operation(function(){var e=t.getCursor(),n=t.indexFromPos(e);t.setValue(o);var i=0,a=r.map(function(e){var r=e.index,o=e.string;return t.markText(t.posFromIndex(r+i),t.posFromIndex(r+(i+=o.length)),{className:"autoInsertedLeaf",clearOnEnter:!0,title:"Automatically added leaf fields"})});setTimeout(function(){return a.forEach(function(e){return e.clear()})},7e3);var s=n;r.forEach(function(e){var t=e.index,r=e.string;t=n){e=a.name&&a.name.value;break}}}this.handleRunQuery(e)}},{key:"_didClickDragBar",value:function(e){if(0!==e.button||e.ctrlKey)return!1;var t=e.target;if(0!==t.className.indexOf("CodeMirror-gutter"))return!1; for(var r=_reactDom2.default.findDOMNode(this.resultComponent);t;){if(t===r)return!0;t=t.parentNode}return!1}}]),t}(_react2.default.Component);GraphiQL.propTypes={fetcher:_react.PropTypes.func.isRequired,schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),query:_react.PropTypes.string,variables:_react.PropTypes.string,operationName:_react.PropTypes.string,response:_react.PropTypes.string,storage:_react.PropTypes.shape({getItem:_react.PropTypes.func,setItem:_react.PropTypes.func}),defaultQuery:_react.PropTypes.string,onEditQuery:_react.PropTypes.func,onEditVariables:_react.PropTypes.func,onEditOperationName:_react.PropTypes.func,onToggleDocs:_react.PropTypes.func,getDefaultFieldNames:_react.PropTypes.func};var _initialiseProps=function(){var e=this;this.handleRunQuery=function(t){e._editorQueryID++;var r=e._editorQueryID,o=e.autoCompleteLeafs()||e.state.query,n=e.state.variables,i=e.state.operationName;if(t&&t!==i){i=t;var a=e.props.onEditOperationName;a&&a(i)}try{e.setState({isWaitingForResponse:!0,response:null,operationName:i});var s=e._fetchQuery(o,n,i,function(t){r===e._editorQueryID&&e.setState({isWaitingForResponse:!1,response:JSON.stringify(t,null,2)})});e.setState({subscription:s})}catch(t){e.setState({isWaitingForResponse:!1,response:t.message})}},this.handleStopQuery=function(){var t=e.state.subscription;e.setState({isWaitingForResponse:!1,subscription:null}),t&&t.unsubscribe()},this.handlePrettifyQuery=function(){var t=(0,_graphql.print)((0,_graphql.parse)(e.state.query)),r=e.queryEditorComponent.getCodeMirror();r.setValue(t)},this.handleEditQuery=function(t){if(e.state.schema&&e._updateQueryFacts(t),e.setState({query:t}),e.props.onEditQuery)return e.props.onEditQuery(t)},this._updateQueryFacts=(0,_debounce2.default)(150,function(t){var r=(0,_getQueryFacts2.default)(e.state.schema,t);if(r){var o=(0,_getSelectedOperationName2.default)(e.state.operations,e.state.operationName,r.operations),n=e.props.onEditOperationName;n&&o!==e.state.operationName&&n(o),e.setState(_extends({operationName:o},r))}}),this.handleEditVariables=function(t){e.setState({variables:t}),e.props.onEditVariables&&e.props.onEditVariables(t)},this.handleHintInformationRender=function(t){t.addEventListener("click",e._onClickHintInformation);var r=void 0;t.addEventListener("DOMNodeRemoved",r=function(){t.removeEventListener("DOMNodeRemoved",r),t.removeEventListener("click",e._onClickHintInformation)})},this.handleEditorRunQuery=function(){e._runQueryAtCursor()},this._onClickHintInformation=function(t){if("typeName"===t.target.className){var r=t.target.innerHTML,o=e.state.schema;o&&!function(){var t=o.getType(r);t&&e.setState({docExplorerOpen:!0},function(){e.docExplorerComponent.showDoc(t)})}()}},this.handleToggleDocs=function(){"function"==typeof e.props.onToggleDocs&&e.props.onToggleDocs(!e.state.docExplorerOpen),e.setState({docExplorerOpen:!e.state.docExplorerOpen})},this.handleResizeStart=function(t){if(e._didClickDragBar(t)){t.preventDefault();var r=t.clientX-(0,_elementPosition.getLeft)(t.target),o=function(t){if(0===t.buttons)return n();var o=_reactDom2.default.findDOMNode(e.editorBarComponent),i=t.clientX-(0,_elementPosition.getLeft)(o)-r,a=o.clientWidth-i;e.setState({editorFlex:i/a})},n=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n),o=null,n=null});document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}},this.handleDocsResizeStart=function(t){t.preventDefault();var r=e.state.docExplorerWidth,o=t.clientX-(0,_elementPosition.getLeft)(t.target),n=function(t){if(0===t.buttons)return i();var r=_reactDom2.default.findDOMNode(e),n=t.clientX-(0,_elementPosition.getLeft)(r)-o,a=r.clientWidth-n;a<100?e.setState({docExplorerOpen:!1}):e.setState({docExplorerOpen:!0,docExplorerWidth:Math.min(a,650)})},i=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.state.docExplorerOpen||e.setState({docExplorerWidth:r}),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),n=null,i=null});document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)},this.handleVariableResizeStart=function(t){t.preventDefault();var r=!1,o=e.state.variableEditorOpen,n=e.state.variableEditorHeight,i=t.clientY-(0,_elementPosition.getTop)(t.target),a=function(t){if(0===t.buttons)return s();r=!0;var o=_reactDom2.default.findDOMNode(e.editorBarComponent),a=t.clientY-(0,_elementPosition.getTop)(o)-i,u=o.clientHeight-a;u<60?e.setState({variableEditorOpen:!1,variableEditorHeight:n}):e.setState({variableEditorOpen:!0,variableEditorHeight:u})},s=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){r||e.setState({variableEditorOpen:!o}),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),a=null,s=null});document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}};GraphiQL.Logo=function(e){return _react2.default.createElement("div",{className:"title"},e.children||_react2.default.createElement("span",null,"Graph",_react2.default.createElement("em",null,"i"),"QL"))},GraphiQL.Toolbar=function(e){return _react2.default.createElement("div",{className:"toolbar"},e.children)},GraphiQL.ToolbarButton=_ToolbarButton.ToolbarButton,GraphiQL.Footer=function(e){return _react2.default.createElement("div",{className:"footer"},e.children)};var defaultQuery="# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser IDE for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will\n# see intelligent typeaheads aware of the current GraphQL type schema and\n# live syntax and validation errors highlighted within the text.\n#\n# To bring up the auto-complete at any point, just press Ctrl-Space.\n#\n# Press the run button above, or Cmd-Enter to execute the query, and the result\n# will appear in the pane to the right.\n\n"}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/CodeMirrorSizer":9,"../utility/debounce":10,"../utility/elementPosition":11,"../utility/fillLeafs":12,"../utility/find":13,"../utility/getQueryFacts":14,"../utility/getSelectedOperationName":15,"../utility/introspectionQueries":16,"./DocExplorer":1,"./ExecuteButton":2,"./QueryEditor":4,"./ResultViewer":5,"./ToolbarButton":6,"./VariableEditor":7,graphql:57}],4:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryEditor=void 0;var _createClass=function(){function e(e,t){for(var o=0;o=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&50===r||t.shiftKey&&57===r)&&o.editor.execCommand("autocomplete")},o._onEdit=function(){o.ignoreChangeEvent||(o.cachedValue=o.editor.getValue(),o.props.onEdit&&o.props.onEdit(o.cachedValue))},o._onHasCompletion=function(e,t){(0,_onHasCompletion2.default)(e,t,o.props.onHintInformationRender)},o.cachedValue=e.value||"",o}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=this,t=require("codemirror");require("codemirror/addon/hint/show-hint"),require("codemirror/addon/comment/comment"),require("codemirror/addon/edit/matchbrackets"),require("codemirror/addon/edit/closebrackets"),require("codemirror/addon/fold/foldgutter"),require("codemirror/addon/fold/brace-fold"),require("codemirror/addon/lint/lint"),require("codemirror/keymap/sublime"),require("codemirror-graphql/hint"),require("codemirror-graphql/lint"),require("codemirror-graphql/mode"),this.editor=t(_reactDom2.default.findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,foldGutter:{minFoldSize:4},lint:{schema:this.props.schema},hintOptions:{schema:this.props.schema,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!0})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!0})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!0})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)}},{key:"componentDidUpdate",value:function(e){var t=require("codemirror");this.ignoreChangeEvent=!0,this.props.schema!==e.schema&&(this.editor.options.lint.schema=this.props.schema,this.editor.options.hintOptions.schema=this.props.schema,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1}},{key:"componentWillUnmount",value:function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"query-editor"})}},{key:"getCodeMirror",value:function(){return this.editor}}]),t}(_react2.default.Component);QueryEditor.propTypes={schema:_react.PropTypes.instanceOf(_graphql.GraphQLSchema),value:_react.PropTypes.string,onEdit:_react.PropTypes.func,onHintInformationRender:_react.PropTypes.func,onRunQuery:_react.PropTypes.func}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/onHasCompletion":17,codemirror:47,"codemirror-graphql/hint":18,"codemirror-graphql/lint":19,"codemirror-graphql/mode":20,"codemirror/addon/comment/comment":35,"codemirror/addon/edit/closebrackets":37,"codemirror/addon/edit/matchbrackets":38,"codemirror/addon/fold/brace-fold":39,"codemirror/addon/fold/foldgutter":41,"codemirror/addon/hint/show-hint":42,"codemirror/addon/lint/lint":43,"codemirror/keymap/sublime":46,graphql:57}],5:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResultViewer=void 0;var _createClass=function(){function e(e,r){for(var t=0;t=65&&r<=90||!t.shiftKey&&r>=48&&r<=57||t.shiftKey&&189===r||t.shiftKey&&222===r)&&o.editor.execCommand("autocomplete")},o._onEdit=function(){o.ignoreChangeEvent||(o.cachedValue=o.editor.getValue(),o.props.onEdit&&o.props.onEdit(o.cachedValue))},o._onHasCompletion=function(e,t){(0,_onHasCompletion2.default)(e,t,o.props.onHintInformationRender)},o.cachedValue=e.value||"",o}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=this,t=require("codemirror");require("codemirror/addon/hint/show-hint"),require("codemirror/addon/edit/matchbrackets"),require("codemirror/addon/edit/closebrackets"),require("codemirror/addon/fold/brace-fold"),require("codemirror/addon/fold/foldgutter"),require("codemirror/addon/lint/lint"),require("codemirror/keymap/sublime"),require("codemirror-graphql/variables/hint"),require("codemirror-graphql/variables/lint"),require("codemirror-graphql/variables/mode"),this.editor=t(_reactDom2.default.findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,foldGutter:{minFoldSize:4},lint:{variableToType:this.props.variableToType},hintOptions:{variableToType:this.props.variableToType},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)}},{key:"componentDidUpdate",value:function(e){var t=require("codemirror");this.ignoreChangeEvent=!0,this.props.variableToType!==e.variableToType&&(this.editor.options.lint.variableToType=this.props.variableToType,this.editor.options.hintOptions.variableToType=this.props.variableToType,t.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1}},{key:"componentWillUnmount",value:function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"codemirrorWrap"})}},{key:"getCodeMirror",value:function(){return this.editor}}]),t}(_react2.default.Component);VariableEditor.propTypes={variableToType:_react.PropTypes.object,value:_react.PropTypes.string,onEdit:_react.PropTypes.func,onHintInformationRender:_react.PropTypes.func,onRunQuery:_react.PropTypes.func}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/onHasCompletion":17,codemirror:47,"codemirror-graphql/variables/hint":32,"codemirror-graphql/variables/lint":33,"codemirror-graphql/variables/mode":34,"codemirror/addon/edit/closebrackets":37,"codemirror/addon/edit/matchbrackets":38,"codemirror/addon/fold/brace-fold":39,"codemirror/addon/fold/foldgutter":41,"codemirror/addon/hint/show-hint":42,"codemirror/addon/lint/lint":43,"codemirror/keymap/sublime":46}],8:[function(require,module,exports){"use strict";module.exports=require("./components/GraphiQL").GraphiQL},{"./components/GraphiQL":3}],9:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r'+renderType(r.type)+"":"";a.innerHTML='
'+("

"===i.slice(0,3)?"

"+d+i.slice(3):d+i)+"

",t&&t(a)})}function renderType(e){return e instanceof _graphql.GraphQLNonNull?renderType(e.ofType)+"!":e instanceof _graphql.GraphQLList?"["+renderType(e.ofType)+"]":''+e.name+""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=onHasCompletion;var _graphql=require("graphql"),_marked=require("marked"),_marked2=_interopRequireDefault(_marked)},{codemirror:47,graphql:57,marked:127}],18:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_getHintsAtPosition=require("./utils/getHintsAtPosition"),_getHintsAtPosition2=_interopRequireDefault(_getHintsAtPosition);_codemirror2.default.registerHelper("hint","graphql",function(e,t){var r=t.schema;if(r){var o=e.getCursor(),i=e.getTokenAt(o),n=(0,_getHintsAtPosition2.default)(r,e.getValue(),o,i);return n&&n.list&&n.list.length>0&&(n.from=_codemirror2.default.Pos(n.from.line,n.from.column),n.to=_codemirror2.default.Pos(n.to.line,n.to.column),_codemirror2.default.signal(e,"hasCompletion",e,n,i)),n}})},{"./utils/getHintsAtPosition":26,codemirror:47}],19:[function(require,module,exports){"use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function errorAnnotations(r,e){return e.nodes.map(function(o){var t="Variable"!==o.kind&&o.name?o.name:o.variable?o.variable:o;return{message:e.message,severity:"error",type:"validation", from:r.posFromIndex(t.loc.start),to:r.posFromIndex(t.loc.end)}})}function mapCat(r,e){return Array.prototype.concat.apply([],r.map(e))}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_graphql=require("graphql");_codemirror2.default.registerHelper("lint","graphql",function(r,e,o){var t=e.schema;try{var a=(0,_graphql.parse)(r),n=t?(0,_graphql.validate)(t,a):[];return mapCat(n,function(r){return errorAnnotations(o,r)})}catch(r){var i=r.locations[0],l=_codemirror2.default.Pos(i.line-1,i.column),s=o.getTokenAt(l);return[{message:r.message,severity:"error",type:"syntax",from:_codemirror2.default.Pos(i.line-1,s.start),to:_codemirror2.default.Pos(i.line-1,s.end)}]}})},{codemirror:47,graphql:57}],20:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,r){var t=e.levels,n=t&&0!==t.length?t[t.length-1]-(this.electricInput.test(r)?1:0):e.indentLevel;return n*this.config.indentUnit}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_onlineParser=require("./utils/onlineParser"),_onlineParser2=_interopRequireDefault(_onlineParser),_Rules=require("./utils/Rules");_codemirror2.default.defineMode("graphql",function(e){var r=(0,_onlineParser2.default)({eatWhitespace:function(e){return e.eatWhile(_Rules.isIgnored)},LexRules:_Rules.LexRules,ParseRules:_Rules.ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:r.startState,token:r.token,indent:indent,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}})},{"./utils/Rules":24,"./utils/onlineParser":30,codemirror:47}],21:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,r){var l=e.levels,u=l&&0!==l.length?l[l.length-1]-(this.electricInput.test(r)?1:0):e.indentLevel;return u*this.config.indentUnit}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_onlineParser=require("../utils/onlineParser"),_onlineParser2=_interopRequireDefault(_onlineParser),_RuleHelpers=require("../utils/RuleHelpers");_codemirror2.default.defineMode("graphql-results",function(e){var r=(0,_onlineParser2.default)({eatWhitespace:function(e){return e.eatSpace()},LexRules:LexRules,ParseRules:ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:r.startState,token:r.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("Entry",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("}")],Entry:[(0,_RuleHelpers.t)("String","def"),(0,_RuleHelpers.p)(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,_RuleHelpers.t)("Number","number")],StringValue:[(0,_RuleHelpers.t)("String","string")],BooleanValue:[(0,_RuleHelpers.t)("Keyword","builtin")],NullValue:[(0,_RuleHelpers.t)("Keyword","keyword")],ListValue:[(0,_RuleHelpers.p)("["),(0,_RuleHelpers.list)("Value",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("]")],ObjectValue:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("ObjectField",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("}")],ObjectField:[(0,_RuleHelpers.t)("String","property"),(0,_RuleHelpers.p)(":"),"Value"]}},{"../utils/RuleHelpers":23,"../utils/onlineParser":30,codemirror:47}],22:[function(require,module,exports){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var CharacterStream=function(){function t(e){_classCallCheck(this,t),this._start=0,this._pos=0,this._sourceText=e}return t.prototype.getStartOfToken=function(){return this._start},t.prototype.getCurrentPosition=function(){return this._pos},t.prototype._testNextCharacter=function(t){var e=this._sourceText.charAt(this._pos);return"string"==typeof t?e===t:t.test?t.test(e):t(e)},t.prototype.eol=function(){return this._sourceText.length===this._pos},t.prototype.sol=function(){return 0===this._pos},t.prototype.peek=function(){return this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null},t.prototype.next=function(){var t=this._sourceText.charAt(this._pos);return this._pos++,t},t.prototype.eat=function(t){var e=this._testNextCharacter(t);if(e)return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},t.prototype.eatWhile=function(t){var e=this._testNextCharacter(t),s=!1;for(e&&(s=e,this._start=this._pos);e;)this._pos++,e=this._testNextCharacter(t),s=!0;return s},t.prototype.eatSpace=function(){return this.eatWhile(/[\s\u00a0]/)},t.prototype.skipToEnd=function(){this._pos=this._sourceText.length},t.prototype.skipTo=function(t){this._pos=t},t.prototype.match=function t(e){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments[2],r=null,t=null;switch(typeof e){case"string":var i=new RegExp(e,o?"i":"");t=i.test(this._sourceText.substr(this._pos,e.length)),r=e;break;case"object":case"function":t=this._sourceText.slice(this._pos).match(e),r=t&&t[0]}return!(!t||"string"!=typeof e&&0!==t.index)&&(s&&(this._start=this._pos,this._pos+=r.length),t)},t.prototype.backUp=function(t){this._pos-=t},t.prototype.column=function(){return this._pos},t.prototype.indentation=function(){var t=this._sourceText.match(/\s*/),e=0;if(t&&0===t.index)for(var s=t[0],o=0;s.length>o;)9===s.charCodeAt(o)?e+=2:e++,o++;return e},t.prototype.current=function(){return this._sourceText.slice(this._start,this._pos)},t}();exports.default=CharacterStream},{}],23:[function(require,module,exports){"use strict";function opt(t){return{ofRule:t}}function list(t,n){return{ofRule:t,isList:!0,separator:n}}function butNot(t,n){var e=t.match;return t.match=function(t){return e(t)&&n.every(function(n){return!n.match(t)})},t}function t(t,n){return{style:n,match:function(n){return n.kind===t}}}function p(t,n){return{style:n||"punctuation",match:function(n){return"Punctuation"===n.kind&&n.value===t}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.opt=opt,exports.list=list,exports.butNot=butNot,exports.t=t,exports.p=p},{}],24:[function(require,module,exports){"use strict";function word(e){return{style:"keyword",match:function(l){return"Name"===l.kind&&l.value===e}}}function name(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,l){e.name=l.value}}}function type(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,l){e.prevState.type=l.value}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParseRules=exports.LexRules=exports.isIgnored=void 0;var _RuleHelpers=require("../utils/RuleHelpers");exports.isIgnored=function(e){return" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e},exports.LexRules={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/},exports.ParseRules={Document:[(0,_RuleHelpers.list)("Definition")],Definition:function(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[word("query"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Mutation:[word("mutation"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Subscription:[word("subscription"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],VariableDefinitions:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("VariableDefinition"),(0,_RuleHelpers.p)(")")],VariableDefinition:["Variable",(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue")],Variable:[(0,_RuleHelpers.p)("$","variable"),name("variable")],DefaultValue:[(0,_RuleHelpers.p)("="),"Value"],SelectionSet:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("Selection"),(0,_RuleHelpers.p)("}")],Selection:function(e,l){return"..."===e.value?l.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":l.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[name("property"),(0,_RuleHelpers.p)(":"),name("qualifier"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Field:[name("property"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Arguments:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("Argument"),(0,_RuleHelpers.p)(")")],Argument:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],FragmentSpread:[(0,_RuleHelpers.p)("..."),name("def"),(0,_RuleHelpers.list)("Directive")],InlineFragment:[(0,_RuleHelpers.p)("..."),(0,_RuleHelpers.opt)("TypeCondition"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],FragmentDefinition:[word("fragment"),(0,_RuleHelpers.opt)((0,_RuleHelpers.butNot)(name("def"),[word("on")])),"TypeCondition",(0,_RuleHelpers.list)("Directive"),"SelectionSet"],TypeCondition:[word("on"),type("atom")],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[(0,_RuleHelpers.t)("Number","number")],StringValue:[(0,_RuleHelpers.t)("String","string")],BooleanValue:[(0,_RuleHelpers.t)("Name","builtin")],NullValue:[(0,_RuleHelpers.t)("Name","keyword")],EnumValue:[name("string-2")],ListValue:[(0,_RuleHelpers.p)("["),(0,_RuleHelpers.list)("Value"),(0,_RuleHelpers.p)("]")],ObjectValue:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("ObjectField"),(0,_RuleHelpers.p)("}")],ObjectField:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],Type:function(e){return"["===e.value?"ListType":"NamedType"},ListType:[(0,_RuleHelpers.p)("["),"Type",(0,_RuleHelpers.p)("]"),(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],NamedType:[name("atom"),(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],Directive:[(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("Arguments")],SchemaDef:[word("schema"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("OperationTypeDef"),(0,_RuleHelpers.p)("}")],OperationTypeDef:[name("keyword"),(0,_RuleHelpers.p)(":"),name("atom")],ScalarDef:[word("scalar"),name("atom"),(0,_RuleHelpers.list)("Directive")],ObjectTypeDef:[word("type"),name("atom"),(0,_RuleHelpers.opt)("Implements"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],Implements:[word("implements"),(0,_RuleHelpers.list)(name("atom"))],FieldDef:[name("property"),(0,_RuleHelpers.opt)("ArgumentsDef"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.list)("Directive")],ArgumentsDef:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)(")")],InputValueDef:[name("attribute"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue"),(0,_RuleHelpers.list)("Directive")],InterfaceDef:[word("interface"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],UnionDef:[word("union"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("="),name("atom"),(0,_RuleHelpers.list)("UnionMember")],UnionMember:[(0,_RuleHelpers.p)("|"),name("atom")],EnumDef:[word("enum"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("EnumValueDef"),(0,_RuleHelpers.p)("}")],EnumValueDef:[name("string-2"),(0,_RuleHelpers.list)("Directive")],InputDef:[word("input"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)("}")],ExtendDef:[word("extend"),"ObjectTypeDef"],DirectiveDef:[word("directive"),(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("ArgumentsDef"),word("on"),name("string-2"),(0,_RuleHelpers.list)("DirectiveLocation")],DirectiveLocation:[(0,_RuleHelpers.p)("|"),name("string-2")]}},{"../utils/RuleHelpers":23}],25:[function(require,module,exports){"use strict";function forEachState(e,t){for(var r=[],a=e;a&&a.kind;)r.push(a),a=a.prevState;for(var o=r.length-1;o>=0;o--)t(r[o])}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=forEachState},{}],26:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getHintsAtPosition(e,t,i,n){var a=getTypeInfo(e,n.state),r=n.state,p=r.kind,u=r.step;if("comment"!==n.type){if("Document"===p)return(0,_hintList2.default)(i,n,[{text:"query"},{text:"mutation"},{text:"subscription"},{text:"fragment"},{text:"{"}]);if(("SelectionSet"===p||"Field"===p||"AliasedField"===p)&&a.parentType){var s=a.parentType.getFields?(0,_objectValues2.default)(a.parentType.getFields()):[];return(0,_graphql.isAbstractType)(a.parentType)&&s.push(_introspection.TypeNameMetaFieldDef),a.parentType===e.getQueryType()&&s.push(_introspection.SchemaMetaFieldDef,_introspection.TypeMetaFieldDef),(0,_hintList2.default)(i,n,s.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("Arguments"===p||"Argument"===p&&0===u){var l=a.argDefs;if(l)return(0,_hintList2.default)(i,n,l.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if(("ObjectValue"===p||"ObjectField"===p&&0===u)&&a.objectFieldDefs){var o=(0,_objectValues2.default)(a.objectFieldDefs);return(0,_hintList2.default)(i,n,o.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("EnumValue"===p||"ListValue"===p&&1===u||"ObjectField"===p&&2===u||"Argument"===p&&2===u){var f=function(){var e=(0,_graphql.getNamedType)(a.inputType);if(e instanceof _graphql.GraphQLEnumType){var t=e.getValues(),r=(0,_objectValues2.default)(t);return{v:(0,_hintList2.default)(i,n,r.map(function(t){return{text:t.name,type:e,description:t.description}}))}}if(e===_graphql.GraphQLBoolean)return{v:(0,_hintList2.default)(i,n,[{text:"true",type:_graphql.GraphQLBoolean,description:"Not false."},{text:"false",type:_graphql.GraphQLBoolean,description:"Not true."}])}}();if("object"==typeof f)return f.v}if("TypeCondition"===p&&1===u||"NamedType"===p&&"TypeCondition"===r.prevState.kind){var c=void 0;if(a.parentType)(0,_graphql.isAbstractType)(a.parentType)?!function(){var t=e.getPossibleTypes(a.parentType),i=Object.create(null);t.forEach(function(e){e.getInterfaces().forEach(function(e){i[e.name]=e})}),c=t.concat((0,_objectValues2.default)(i))}():c=[a.parentType];else{var d=e.getTypeMap();c=(0,_objectValues2.default)(d).filter(_graphql.isCompositeType)}return(0,_hintList2.default)(i,n,c.map(function(e){return{text:e.name,description:e.description}}))}if("FragmentSpread"===p&&1===u){var y=function(){var r=e.getTypeMap(),p=getDefinitionState(n.state),u=getFragmentDefinitions(t),s=u.filter(function(t){return r[t.typeCondition.name.value]&&!(p&&"FragmentDefinition"===p.kind&&p.name===t.name.value)&&(0,_graphql.doTypesOverlap)(e,a.parentType,r[t.typeCondition.name.value])});return{v:(0,_hintList2.default)(i,n,s.map(function(e){return{text:e.name.value,type:r[e.typeCondition.name.value],description:"fragment "+e.name.value+" on "+e.typeCondition.name.value}}))}}();if("object"==typeof y)return y.v}if("VariableDefinition"===p&&2===u||"ListType"===p&&1===u||"NamedType"===p&&("VariableDefinition"===r.prevState.kind||"ListType"===r.prevState.kind)){var g=e.getTypeMap(),m=(0,_objectValues2.default)(g).filter(_graphql.isInputType);return(0,_hintList2.default)(i,n,m.map(function(e){return{text:e.name,description:e.description}}))}if("Directive"===p){var _=e.getDirectives().filter(function(e){return canUseDirective(r.prevState.kind,e)});return(0,_hintList2.default)(i,n,_.map(function(e){return{text:e.name,description:e.description}}))}}}function canUseDirective(e,t){var i=t.locations;switch(e){case"Query":return i.indexOf("QUERY")!==-1;case"Mutation":return i.indexOf("MUTATION")!==-1;case"Subscription":return i.indexOf("SUBSCRIPTION")!==-1;case"Field":case"AliasedField":return i.indexOf("FIELD")!==-1;case"FragmentDefinition":return i.indexOf("FRAGMENT_DEFINITION")!==-1;case"FragmentSpread":return i.indexOf("FRAGMENT_SPREAD")!==-1;case"InlineFragment":return i.indexOf("INLINE_FRAGMENT")!==-1}return!1}function getTypeInfo(e,t){var i={type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return(0,_forEachState2.default)(t,function(t){switch(t.kind){case"Query":case"ShortQuery":i.type=e.getQueryType();break;case"Mutation":i.type=e.getMutationType();break;case"Subscription":i.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(i.type=e.getType(t.type));break;case"Field":i.fieldDef=i.type&&t.name?getFieldDef(e,i.parentType,t.name):null,i.type=i.fieldDef&&i.fieldDef.type;break;case"SelectionSet":i.parentType=(0,_graphql.getNamedType)(i.type);break;case"Directive":i.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":i.argDefs="Field"===t.prevState.kind?i.fieldDef&&i.fieldDef.args:"Directive"===t.prevState.kind?i.directiveDef&&i.directiveDef.args:"AliasedField"===t.prevState.kind?t.prevState.name&&getFieldDef(e,i.parentType,t.prevState.name).args:null;break;case"Argument":if(i.argDef=null,i.argDefs)for(var n=0;n0?n:t}function normalizeText(t){return t.toLowerCase().replace(/\W/g,"")}function getProximity(t,e){var n=lexicalDistance(e,t);return t.length>e.length&&(n-=t.length-e.length-1,n+=0===t.indexOf(e)?0:.5),n}function lexicalDistance(t,e){var n=void 0,r=void 0,i=[],o=t.length,l=e.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=l;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=l;r++){var u=t[n-1]===e[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+u),n>1&&r>1&&t[n-1]===e[r-2]&&t[n-2]===e[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+u))}return i[o][l]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=hintList},{}],28:[function(require,module,exports){"use strict";function jsonParse(e){string=e,strLen=e.length,start=end=lastEnd=-1,ch(),lex();var r=parseObj();return expect("EOF"),r}function parseObj(){var e=start,r=[];if(expect("{"),!skip("}")){do r.push(parseMember());while(skip(","));expect("}")}return{kind:"Object",start:e,end:lastEnd,members:r}}function parseMember(){var e=start,r="String"===kind?curToken():null;expect("String"),expect(":");var t=parseVal();return{kind:"Member",start:e,end:lastEnd,key:r,value:t}}function parseArr(){var e=start,r=[];if(expect("["),!skip("]")){do r.push(parseVal());while(skip(","));expect("]")}return{kind:"Array",start:e,end:lastEnd,values:r}}function parseVal(){switch(kind){case"[":return parseArr();case"{":return parseObj();case"String":case"Number":case"Boolean":case"Null":var e=curToken();return lex(),e}return expect("Value")}function curToken(){return{kind:kind,start:start,end:end,value:JSON.parse(string.slice(start,end))}}function expect(e){if(kind===e)return void lex();var r=void 0;if("EOF"===kind)r="[end of file]";else if(end-start>1)r="`"+string.slice(start,end)+"`";else{var t=string.slice(start).match(/^.+?\b/);r="`"+(t?t[0]:string[start])+"`"}throw syntaxError("Expected "+e+" but found "+r+".")}function syntaxError(e){return{message:e,start:start,end:end}}function skip(e){if(kind===e)return lex(),!0}function ch(){end31;)if(92===code)switch(ch(),code){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:ch();break;case 117:ch(),readHex(),readHex(),readHex(),readHex();break;default:throw syntaxError("Bad character escape sequence.")}else{if(end===strLen)throw syntaxError("Unterminated string.");ch()}if(34===code)return void ch();throw syntaxError("Unterminated string.")}function readHex(){if(code>=48&&code<=57||code>=65&&code<=70||code>=97&&code<=102)return ch();throw syntaxError("Expected hexadecimal digit.")}function readNumber(){45===code&&ch(),48===code?ch():readDigits(),46===code&&(ch(),readDigits()),69!==code&&101!==code||(ch(),43!==code&&45!==code||ch(),readDigits())}function readDigits(){if(code<48||code>57)throw syntaxError("Expected decimal digit.");do ch();while(code>=48&&code<=57)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=jsonParse;var string=void 0,strLen=void 0,start=void 0,end=void 0,lastEnd=void 0,code=void 0,kind=void 0},{}],29:[function(require,module,exports){"use strict";function objectValues(e){for(var t=Object.keys(e),r=t.length,o=new Array(r),s=0;s0&&o[o.length-1]0&&(a.from=_codemirror2.default.Pos(a.from.line,a.from.column),a.to=_codemirror2.default.Pos(a.to.line,a.to.column),_codemirror2.default.signal(e,"hasCompletion",e,a,i)),a})},{"../utils/forEachState":25,"../utils/hintList":27,codemirror:47,graphql:57}],33:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validateVariables(e,r,a){var n=[];return a.members.forEach(function(a){var t=a.key.value,i=r[t];i?validateValue(i,a.value).forEach(function(r){var a=r[0],t=r[1];n.push(lintError(e,a,t))}):n.push(lintError(e,a.key,'Variable "$'+t+'" does not appear in any GraphQL query.'))}),n}function validateValue(e,r){if(e instanceof _graphql.GraphQLNonNull)return"Null"===r.kind?[[r,'Type "'+e+'" is non-nullable and cannot be null.']]:validateValue(e.ofType,r);if("Null"===r.kind)return[];if(e instanceof _graphql.GraphQLList){var a=function(){var a=e.ofType;return"Array"===r.kind?{v:mapCat(r.values,function(e){ return validateValue(a,e)})}:{v:validateValue(a,r)}}();if("object"==typeof a)return a.v}if(e instanceof _graphql.GraphQLInputObjectType){var n=function(){if("Object"!==r.kind)return{v:[[r,'Type "'+e+'" must be an Object.']]};var a=Object.create(null),n=mapCat(r.members,function(r){var n=r.key.value;a[n]=!0;var t=e.getFields()[n];if(!t)return[[r.key,'Type "'+e+'" does not have a field "'+n+'".']];var i=t?t.type:void 0;return validateValue(i,r.value)});return Object.keys(e.getFields()).forEach(function(t){if(!a[t]){var i=e.getFields()[t].type;i instanceof _graphql.GraphQLNonNull&&n.push([r,'Object of type "'+e+'" is missing required field "'+t+'".'])}}),{v:n}}();if("object"==typeof n)return n.v}return"Boolean"===e.name&&"Boolean"!==r.kind||"String"===e.name&&"String"!==r.kind||"ID"===e.name&&"Number"!==r.kind&&"String"!==r.kind||"Float"===e.name&&"Number"!==r.kind||"Int"===e.name&&("Number"!==r.kind||(0|r.value)!==r.value)?[[r,'Expected value of type "'+e+'".']]:(e instanceof _graphql.GraphQLEnumType||e instanceof _graphql.GraphQLScalarType)&&("String"!==r.kind&&"Number"!==r.kind&&"Boolean"!==r.kind&&"Null"!==r.kind||isNullish(e.parseValue(r.value)))?[[r,'Expected value of type "'+e+'".']]:[]}function lintError(e,r,a){return{message:a,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}function isNullish(e){return null===e||void 0===e||e!==e}function mapCat(e,r){return Array.prototype.concat.apply([],e.map(r))}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_graphql=require("graphql"),_jsonParse=require("../utils/jsonParse"),_jsonParse2=_interopRequireDefault(_jsonParse);_codemirror2.default.registerHelper("lint","graphql-variables",function(e,r,a){if(!e)return[];var n=void 0;try{n=(0,_jsonParse2.default)(e)}catch(e){if(e.stack)throw e;return[lintError(a,e,e.message)]}var t=r.variableToType;return t?validateVariables(a,t,n):[]})},{"../utils/jsonParse":28,codemirror:47,graphql:57}],34:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function indent(e,r){var l=e.levels,u=l&&0!==l.length?l[l.length-1]-(this.electricInput.test(r)?1:0):e.indentLevel;return u*this.config.indentUnit}function namedKey(e){return{style:e,match:function(e){return"String"===e.kind},update:function(e,r){e.name=r.value.slice(1,-1)}}}var _codemirror=require("codemirror"),_codemirror2=_interopRequireDefault(_codemirror),_onlineParser=require("../utils/onlineParser"),_onlineParser2=_interopRequireDefault(_onlineParser),_RuleHelpers=require("../utils/RuleHelpers");_codemirror2.default.defineMode("graphql-variables",function(e){var r=(0,_onlineParser2.default)({eatWhitespace:function(e){return e.eatSpace()},LexRules:LexRules,ParseRules:ParseRules,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:r.startState,token:r.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("Variable",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("}")],Variable:[namedKey("variable"),(0,_RuleHelpers.p)(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,_RuleHelpers.t)("Number","number")],StringValue:[(0,_RuleHelpers.t)("String","string")],BooleanValue:[(0,_RuleHelpers.t)("Keyword","builtin")],NullValue:[(0,_RuleHelpers.t)("Keyword","keyword")],ListValue:[(0,_RuleHelpers.p)("["),(0,_RuleHelpers.list)("Value",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("]")],ObjectValue:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("ObjectField",(0,_RuleHelpers.p)(",")),(0,_RuleHelpers.p)("}")],ObjectField:[namedKey("attribute"),(0,_RuleHelpers.p)(":"),"Value"]}},{"../utils/RuleHelpers":23,"../utils/onlineParser":30,codemirror:47}],35:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.search(l);return n==-1?0:n}function t(e,n,t){return/\bstring\b/.test(e.getTokenTypeAt(o(n.line,0)))&&!/^[\'\"`]/.test(t)}var i={},l=/[^\s\u00a0]/,o=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=i);for(var n=this,t=1/0,l=this.listSelections(),r=null,a=l.length-1;a>=0;a--){var m=l[a].from(),c=l[a].to();m.line>=t||(c.line>=t&&(c=o(t,0)),t=m.line,null==r?n.uncomment(m,c,e)?r="un":(n.lineComment(m,c,e),r="line"):"un"==r?n.uncomment(m,c,e):n.lineComment(m,c,e))}}),e.defineExtension("lineComment",function(e,r,a){a||(a=i);var m=this,c=m.getModeAt(e),f=m.getLine(e.line);if(null!=f&&!t(m,e,f)){var g=a.lineComment||c.lineComment;if(!g)return void((a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,m.blockComment(e,r,a)));var s=Math.min(0!=r.ch||r.line==e.line?r.line+1:r.line,m.lastLine()+1),d=null==a.padding?" ":a.padding,u=a.commentBlankLines||e.line==r.line;m.operation(function(){if(a.indent){for(var t=null,i=e.line;ic.length)&&(t=c)}for(var i=e.line;if||r.operation(function(){if(0!=t.fullLines){var i=l.test(r.getLine(f));r.replaceRange(g+c,o(f)),r.replaceRange(m+g,o(e.line,0));var s=t.blockCommentLead||a.blockCommentLead;if(null!=s)for(var d=e.line+1;d<=f;++d)(d!=f||i)&&r.replaceRange(s+g,o(d,0))}else r.replaceRange(c,n),r.replaceRange(m,e)})}}),e.defineExtension("uncomment",function(e,n,t){t||(t=i);var r,a=this,m=a.getModeAt(e),c=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,a.lastLine()),f=Math.min(e.line,c),g=t.lineComment||m.lineComment,s=[],d=null==t.padding?" ":t.padding;e:if(g){for(var u=f;u<=c;++u){var h=a.getLine(u),v=h.indexOf(g);if(v>-1&&!/comment/.test(a.getTokenTypeAt(o(u,v+1)))&&(v=-1),v==-1&&l.test(h))break e;if(v>-1&&l.test(h.slice(0,v)))break e;s.push(h)}if(a.operation(function(){for(var e=f;e<=c;++e){var n=s[e-f],t=n.indexOf(g),i=t+g.length;t<0||(n.slice(i,i+d.length)==d&&(i+=d.length),r=!0,a.replaceRange("",o(e,t),o(e,i)))}}),r)return!0}var p=t.blockCommentStart||m.blockCommentStart,C=t.blockCommentEnd||m.blockCommentEnd;if(!p||!C)return!1;var b=t.blockCommentLead||m.blockCommentLead,k=a.getLine(f),L=k.indexOf(p);if(L==-1)return!1;var x=c==f?k:a.getLine(c),R=x.indexOf(C,c==f?L+p.length:0);if(R==-1&&f!=c&&(x=a.getLine(--c),R=x.indexOf(C)),R==-1||!/comment/.test(a.getTokenTypeAt(o(f,L+1)))||!/comment/.test(a.getTokenTypeAt(o(c,R+1))))return!1;var O=k.lastIndexOf(p,e.ch),T=O==-1?-1:k.slice(0,e.ch).indexOf(C,O+p.length);if(O!=-1&&T!=-1&&T+C.length!=e.ch)return!1;T=x.indexOf(C,n.ch);var y=x.slice(n.ch).lastIndexOf(p,T-n.ch);return O=T==-1||y==-1?-1:n.ch+y,(T==-1||O==-1||O==n.ch)&&(a.operation(function(){a.replaceRange("",o(c,R-(d&&x.slice(R-d.length,R)==d?d.length:0)),o(c,R+C.length));var e=L+p.length;if(d&&k.slice(e,e+d.length)==d&&(e+=d.length),a.replaceRange("",o(f,L),o(f,e)),b)for(var n=f+1;n<=c;++n){var t=a.getLine(n),i=t.indexOf(b);if(i!=-1&&!l.test(t.slice(0,i))){var r=i+b.length;d&&t.slice(r,r+d.length)==d&&(r+=d.length),a.replaceRange("",o(n,i),o(n,r))}}}),!0)})})},{"../../lib/codemirror":47}],36:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function o(e,o,n){var t,i=e.getWrapperElement();return t=i.appendChild(document.createElement("div")),n?t.className="CodeMirror-dialog CodeMirror-dialog-bottom":t.className="CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?t.innerHTML=o:t.appendChild(o),t}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",function(t,i,r){function u(e){if("string"==typeof e)s.value=e;else{if(f)return;f=!0,c.parentNode.removeChild(c),a.focus(),r.onClose&&r.onClose(c)}}r||(r={}),n(this,null);var l,c=o(this,t,r.bottom),f=!1,a=this,s=c.getElementsByTagName("input")[0];return s?(s.focus(),r.value&&(s.value=r.value,r.selectValueOnOpen!==!1&&s.select()),r.onInput&&e.on(s,"input",function(e){r.onInput(e,s.value,u)}),r.onKeyUp&&e.on(s,"keyup",function(e){r.onKeyUp(e,s.value,u)}),e.on(s,"keydown",function(o){r&&r.onKeyDown&&r.onKeyDown(o,s.value,u)||((27==o.keyCode||r.closeOnEnter!==!1&&13==o.keyCode)&&(s.blur(),e.e_stop(o),u()),13==o.keyCode&&i(s.value,o))}),r.closeOnBlur!==!1&&e.on(s,"blur",u)):(l=c.getElementsByTagName("button")[0])&&(e.on(l,"click",function(){u(),a.focus()}),r.closeOnBlur!==!1&&e.on(l,"blur",u),l.focus()),u}),e.defineExtension("openConfirm",function(t,i,r){function u(){f||(f=!0,l.parentNode.removeChild(l),a.focus())}n(this,null);var l=o(this,t,r&&r.bottom),c=l.getElementsByTagName("button"),f=!1,a=this,s=1;c[0].focus();for(var d=0;d=0;s--){var f=o[s].head;n.replaceRange("",d(f.line,f.ch-1),d(f.line,f.ch+1),"+delete")}}function a(n){var i=r(n),a=i&&t(i,"explode");if(!a||n.getOption("disableInput"))return e.Pass;for(var o=n.listSelections(),s=0;s0;return{anchor:new d(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new d(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var a=r(n);if(!a||n.getOption("disableInput"))return e.Pass;var s=t(a,"pairs"),c=s.indexOf(i);if(c==-1)return e.Pass;for(var u,g=t(a,"triples"),p=s.charAt(c+1)==i,v=n.listSelections(),m=c%2==0,b=0;b1&&g.indexOf(i)>=0&&n.getRange(d(k.line,k.ch-2),k)==i+i&&(k.ch<=2||n.getRange(d(k.line,k.ch-3),d(k.line,k.ch-2))!=i))x="addFour";else if(p){if(e.isWordChar(P)||!f(n,k,i))return e.Pass;x="both"}else{if(!m||n.getLine(k.line).length!=k.ch&&!l(P,s)&&!/\s/.test(P))return e.Pass;x="both"}else x=p&&h(n,k)?"both":g.indexOf(i)>=0&&n.getRange(k,d(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=x)return e.Pass}else u=x}var S=c%2?s.charAt(c-1):i,y=c%2?i:s.charAt(c+1);n.operation(function(){if("skip"==u)n.execCommand("goCharRight");else if("skipThree"==u)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==u){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function c(e,t){var n=e.getRange(d(t.line,t.ch-1),d(t.line,t.ch+1));return 2==n.length?n:null}function f(t,n,r){var i=t.getLine(n.line),a=t.getTokenAt(n);if(/\bstring2?\b/.test(a.type))return!1;var o=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(o.pos=o.start=a.start;;){var s=t.getMode().token(o,a.state);if(o.pos>=n.ch+1)return/\bstring2?\b/.test(s);o.start=o.pos}}function h(e,t){var n=e.getTokenAt(d(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var u={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},d=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var g=u.pairs+"`",p={Backspace:i,Enter:a},v=0;v=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i)){var v=c[p];if(">"==v.charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})})},{"../../lib/codemirror":47}],39:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(r,n){function t(t){for(var f=n.ch,s=0;;){var u=f<=0?-1:l.lastIndexOf(t,f-1);if(u!=-1){if(1==s&&ur.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));if(/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=n,o=Math.min(r.lastLine(),n+10);i<=o;++i){var l=r.getLine(i),f=l.indexOf(";");if(f!=-1)return{startCh:t.end,end:e.Pos(i,f)}}}var i,o=n.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var s=t(f.line+1);if(null==s)break;f=s.end}return{from:r.clipPos(e.Pos(o,l.startCh+1)),to:f}}),e.registerHelper("fold","include",function(r,n){function t(n){if(nr.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));return/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=n.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;;){var f=t(l+1);if(null==f)break;++l}return{from:e.Pos(i,o+1),to:r.clipPos(e.Pos(l))}})})},{"../../lib/codemirror":47}],40:[function(require,module,exports){!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function o(o,i,t,l){function f(n){var e=d(o,i);if(!e||e.to.line-e.from.lineo.firstLine();)i=n.Pos(i.line-1,0),a=f(!1);if(a&&!a.cleared&&"unfold"!==l){var c=e(o,t);n.on(c,"mousedown",function(o){s.clear(),n.e_preventDefault(o)});var s=o.markText(a.from,a.to,{replacedWith:c,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});s.on("clear",function(e,r){n.signal(o,"unfold",o,e,r)}),n.signal(o,"fold",o,a.from,a.to)}}function e(n,o){var e=r(n,o,"widget");if("string"==typeof e){var i=document.createTextNode(e);e=document.createElement("span"),e.appendChild(i),e.className="CodeMirror-foldmarker"}return e}function r(n,o,e){if(o&&void 0!==o[e])return o[e];var r=n.options.foldOptions;return r&&void 0!==r[e]?r[e]:i[e]}n.newFoldFunction=function(n,e){return function(r,i){o(r,i,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",function(n,e,r){o(this,n,e,r)}),n.defineExtension("isFolded",function(n){for(var o=this.findMarksAt(n),e=0;e=d&&(e=n(i.indicatorOpen))}o.setGutterMarker(t,i.gutter,e),++f})}function f(o){var t=o.getViewport(),e=o.state.foldGutter;e&&(o.operation(function(){i(o,t.from,t.to)}),e.from=t.from,e.to=t.to)}function d(o,t,e){var n=o.state.foldGutter;if(n){var i=n.options;if(e==i.gutter){var f=r(o,t);f?f.clear():o.foldCode(c(t,0),i.rangeFinder)}}}function a(o){var t=o.state.foldGutter;if(t){var e=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(o)},e.foldOnChangeTimeSpan||600)}}function u(o){var t=o.state.foldGutter;if(t){var e=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var e=o.getViewport();t.from==t.to||e.from-t.to>20||t.from-e.to>20?f(o):o.operation(function(){e.fromt.to&&(i(o,t.to,e.to),t.to=e.to)})},e.updateViewportTimeSpan||400)}}function l(o,t){var e=o.state.foldGutter;if(e){var r=t.line;r>=e.from&&r0&&i.to.ch-i.from.ch!=e.to.ch-e.from.ch}function n(t,i,e){var n=t.options.hintOptions,o={};for(var s in m)o[s]=m[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,i)),o}function o(t){return"string"==typeof t?t:t.text}function s(t,i){function e(t,e){var o;o="string"!=typeof e?function(t){return e(t,i)}:n.hasOwnProperty(e)?n[e]:e,s[t]=o}var n={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(-i.menuSize()+1,!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},o=t.options.customKeys,s=o?{}:n;if(o)for(var c in o)o.hasOwnProperty(c)&&e(c,o[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&e(c,r[c]);return s}function c(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function r(i,e){this.completion=i,this.data=e,this.picked=!1;var n=this,r=i.cm,h=this.hints=document.createElement("ul");h.className="CodeMirror-hints",this.selectedHint=e.selectedHint||0;for(var l=e.list,a=0;ah.clientHeight+1,A=r.getScrollInfo();if(b>0){var S=C.bottom-C.top,T=g.top-(g.bottom-C.top);if(T-S>0)h.style.top=(y=g.top-S)+"px",w=!1;else if(S>k){h.style.height=k-5+"px",h.style.top=(y=g.bottom-C.top)+"px";var M=r.getCursor();e.from.ch!=M.ch&&(g=r.cursorCoords(M),h.style.left=(v=g.left)+"px",C=h.getBoundingClientRect())}}var F=C.right-H;if(F>0&&(C.right-C.left>H&&(h.style.width=H-5+"px",F-=C.right-C.left-H),h.style.left=(v=g.left-F)+"px"),x)for(var N=h.firstChild;N;N=N.nextSibling)N.style.paddingRight=r.display.nativeBarWidth+"px";if(r.addKeyMap(this.keyMap=s(i,{moveFocus:function(t,i){n.changeActive(n.selectedHint+t,i)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:l.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus){var E;r.on("blur",this.onBlur=function(){E=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(E)})}return r.on("scroll",this.onScroll=function(){var t=r.getScrollInfo(),e=r.getWrapperElement().getBoundingClientRect(),n=y+A.top-t.top,o=n-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return w||(o+=h.offsetHeight),o<=e.top||o>=e.bottom?i.close():(h.style.top=n+"px",void(h.style.left=v+A.left-t.left+"px"))}),t.on(h,"dblclick",function(t){var i=c(h,t.target||t.srcElement);i&&null!=i.hintId&&(n.changeActive(i.hintId),n.pick())}),t.on(h,"click",function(t){var e=c(h,t.target||t.srcElement);e&&null!=e.hintId&&(n.changeActive(e.hintId),i.options.completeOnSingleClick&&n.pick())}),t.on(h,"mousedown",function(){setTimeout(function(){r.focus()},20)}),t.signal(e,"select",l[0],h.firstChild),!0}function h(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):n(o+1)})}var s=h(t,o);n(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=i.getHelper(i.getCursor(),"hintWords"))?function(i){return t.hint.fromList(i,{words:n})}:t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}var u="CodeMirror-hint",f="CodeMirror-hint-active";t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(e){e=n(this,this.getCursor("start"),e);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var s=0;s=this.data.list.length?i=e?this.data.list.length-1:0:i<0&&(i=e?0:this.data.list.length-1),this.selectedHint!=i){var n=this.hints.childNodes[this.selectedHint];n.className=n.className.replace(" "+f,""),n=this.hints.childNodes[this.selectedHint=i],n.className+=" "+f,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:a}),t.registerHelper("hint","fromList",function(i,e){ var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else var c="",r=s;for(var h=[],l=0;l,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)})},{"../../lib/codemirror":47}],43:[function(require,module,exports){!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,n){function o(e){return r.parentNode?(r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",void(r.style.left=e.clientX+5+"px")):t.off(document,"mousemove",o)}var r=document.createElement("div");return r.className="CodeMirror-lint-tooltip",r.appendChild(n.cloneNode(!0)),document.body.appendChild(r),t.on(document,"mousemove",o),o(e),null!=r.style.opacity&&(r.style.opacity=1),r}function n(t){t.parentNode&&t.parentNode.removeChild(t)}function o(t){t.parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout(function(){n(t)},600))}function r(n,r,i){function a(){t.off(i,"mouseout",a),l&&(o(l),l=null)}var l=e(n,r),s=setInterval(function(){if(l)for(var t=i;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){a();break}}if(!l)return clearInterval(s)},400);t.on(i,"mouseout",a)}function i(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){g(t,e)},this.waitingFor=0}function a(t,e){return e instanceof Function?{getAnnotations:e}:(e&&e!==!0||(e={}),e)}function l(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(y);for(var n=0;n1,n.options.tooltips))}}o.onUpdateLinting&&o.onUpdateLinting(e,r,t)}function h(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay||500))}function v(t,e){for(var n=e.target||e.srcElement,o=document.createDocumentFragment(),i=0;io.cursorCoords(n,"window").top&&((l=t).style.opacity=.4)}))};a(o,h,u,p,function(n,r){var i=e.keyName(n),a=e.keyMap[o.getOption("keyMap")][i];a||(a=o.getOption("extraKeys")[i]),"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(n),f(o,t(o),r),o.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(n),p(r,n))}),i&&u&&(f(o,c,u),d(o,n))}else s(o,h,"Search for:",u,function(e){e&&!c.query&&o.operation(function(){f(o,c,e),c.posFrom=c.posTo=o.getCursor(),d(o,n)})})}function d(o,n,r){o.operation(function(){var a=t(o),s=i(o,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=i(o,a.query,n?e.Pos(o.lastLine()):e.Pos(o.firstLine(),0)),s.find(n)))&&(o.setSelection(s.from(),s.to()),o.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),r&&r(s.from(),s.to()))})}function y(e){e.operation(function(){var o=t(e);o.lastQuery=o.query,o.query&&(o.query=o.queryText=null,e.removeOverlay(o.overlay),o.annotate&&(o.annotate.clear(),o.annotate=null))})}function m(e,o,n){e.operation(function(){for(var t=i(e,o);t.findNext();)if("string"!=typeof o){var r=e.getRange(t.from(),t.to()).match(o);t.replace(n.replace(/\$(\d)/g,function(e,o){return r[o]}))}else t.replace(n)})}function g(e,o){if(!e.getOption("readOnly")){var n=e.getSelection()||t(e).lastQuery,r=o?"Replace all:":"Replace:";s(e,r+v,r,n,function(n){n&&(n=l(n),s(e,x,"Replace with:","",function(t){if(t=u(t),o)m(e,n,t);else{y(e);var r=i(e,n,e.getCursor("from")),a=function(){var o,u=r.from();!(o=r.findNext())&&(r=i(e,n),!(o=r.findNext())||u&&r.from().line==u.line&&r.from().ch==u.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),c(e,q,"Replace?",[function(){s(o)},a,function(){m(e,n,t)}]))},s=function(e){r.replace("string"==typeof n?t:t.replace(/\$(\d)/g,function(o,n){return e[n]})),a()};a()}}))})}}var h='Search: (Use /re/ syntax for regexp search)',v=' (Use /re/ syntax for regexp search)',x='With: ',q="Replace? ";e.commands.find=function(e){y(e),p(e)},e.commands.findPersistent=function(e){y(e),p(e,!1,!0)},e.commands.findPersistentNext=function(e){p(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){p(e,!0,!0,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=y,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}})},{"../../lib/codemirror":47,"../dialog/dialog":36,"./searchcursor":45}],45:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),r=r?e.clipPos(r):i(0,0),this.pos={from:r,to:r},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,r){if(n){t.lastIndex=0;for(var o,s,l=e.getLine(r.line).slice(0,r.ch),f=0;;){t.lastIndex=f;var h=t.exec(l);if(!h)break;if(o=h,s=o.index,f=o.index+(o[0].length||1),f==l.length)break}var c=o&&o[0].length||0;c||(0==s&&0==l.length?o=void 0:s!=e.getLine(r.line).length&&c++)}else{t.lastIndex=r.ch;var l=e.getLine(r.line),o=t.exec(l),c=o&&o[0].length||0,s=o&&o.index;s+c==l.length||c||(c=1)}if(o&&c)return{from:i(r.line,s),to:i(r.line,s+c),match:o}};else{var s=t;o&&(t=t.toLowerCase());var l=o?function(e){return e.toLowerCase()}:function(e){return e},f=t.split("\n");if(1==f.length)t.length?this.matches=function(r,o){if(r){var f=e.getLine(o.line).slice(0,o.ch),h=l(f),c=h.lastIndexOf(t);if(c>-1)return c=n(f,h,c),{from:i(o.line,c),to:i(o.line,c+s.length)}}else{var f=e.getLine(o.line).slice(o.ch),h=l(f),c=h.indexOf(t);if(c>-1)return c=n(f,h,c)+o.ch,{from:i(o.line,c),to:i(o.line,c+s.length)}}}:this.matches=function(){};else{var h=s.split("\n");this.matches=function(t,n){var r=f.length-1;if(t){if(n.line-(f.length-1)=1;--c,--s)if(f[c]!=l(e.getLine(s)))return;var u=e.getLine(s),a=u.length-h[0].length;if(l(u.slice(a))!=f[0])return;return{from:i(s,a),to:o}}if(!(n.line+(f.length-1)>e.lastLine())){var u=e.getLine(n.line),a=u.length-h[0].length;if(l(u.slice(a))==f[0]){for(var g=i(n.line,a),s=n.line+1,c=1;cn))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return t(0);r=i(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return t(o);r=i(r.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,i){return new t(this.doc,e,n,i)}),e.defineDocExtension("getSearchCursor",function(e,n,i){return new t(this,e,n,i)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})})},{"../../lib/codemirror":47}],46:[function(require,module,exports){!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n,r){if(r<0&&0==n.ch)return t.clipPos(h(n.line-1));var o=t.getLine(n.line);if(r>0&&n.ch>=o.length)return t.clipPos(h(n.line+1,0));for(var i,a="start",l=n.ch,s=r<0?0:o.length,c=0;l!=s;l+=r,c++){var f=o.charAt(r<0?l-1:l),u="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==u&&f.toUpperCase()==f&&(u="W"),"start"==a)"o"!=u&&(a="in",i=u);else if("in"==a&&i!=u){if("w"==i&&"W"==u&&r<0&&l--,"W"==i&&"w"==u&&r>0){i="w";continue}break}}return h(n.line,l)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):n<0?r.from():r.to()})}function r(t,n){return t.isReadOnly()?e.Pass:(t.operation(function(){for(var e=t.listSelections().length,r=[],o=-1,i=0;i=0;l--){var s=r[i[l]];if(!(c&&e.cmpPos(s.head,c)>0)){var f=o(t,s.head);c=f.from,t.replaceRange(n(f.word),f.from,f.to)}}})}function s(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 c(e,t){var n=s(e);if(n){var r=n.query,o=e.getSearchCursor(r,t?n.to:n.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(r,t?h(e.firstLine(),0):e.clipPos(h(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):n.word&&e.setSelection(n.from,n.to))}}var f=e.keyMap.sublime={fallthrough:"default"},u=e.commands,h=e.Pos,d=e.keyMap.default==e.keyMap.macDefault,p=d?"Cmd-":"Ctrl-",m=d?"Ctrl-":"Alt-";u[f[m+"Left"]="goSubwordLeft"]=function(e){n(e,-1)},u[f[m+"Right"]="goSubwordRight"]=function(e){n(e,1)},d&&(f["Cmd-Left"]="goLineStartSmart");var g=d?"Ctrl-Alt-":"Ctrl-";u[f[g+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},u[f[g+"Down"]="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())},u[f["Shift-"+p+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro.line&&a==i.line&&0==i.ch||n.push({anchor:a==o.line?o:h(a,0),head:a==i.line?i:h(a)});e.setSelections(n,0)},f["Shift-Tab"]="indentLess",u[f.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},u[f[p+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro?r.push(s,c):r.length&&(r[r.length-1]=c),o=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,h(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",h(o,0),null,"+swapLine")}t.setSelections(i),t.scrollIntoView()})},u[f[S+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.lastLine()+1,i=n.length-1;i>=0;i--){var a=n[i],l=a.to().line+1,s=a.from().line;0!=a.to().ch||a.empty()||l--,l=0;e-=2){var n=r[e],o=r[e+1],i=t.getLine(n);n==t.lastLine()?t.replaceRange("",h(n-1),h(n),"+swapLine"):t.replaceRange("",h(n,0),h(n+1,0),"+swapLine"),t.replaceRange(i+"\n",h(o,0),null,"+swapLine")}t.scrollIntoView()})},u[f[p+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},u[f[p+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r=0;o--){var i=n[o].head,a=t.getRange({line:i.line,ch:0},i),l=e.countColumn(a,null,t.getOption("tabSize")),s=t.findPosH(i,-1,"char",!1);if(a&&!/\S/.test(a)&&l%r==0){var c=new h(i.line,e.findColumn(a,l-r,r));c.ch!=i.ch&&(s=c)}t.replaceRange("",s,i,"+delete")}})},u[f[k+p+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,h(t[n].to().line),"+delete");e.scrollIntoView()})},u[f[k+p+"U"]="upcaseAtCursor"]=function(e){l(e,function(e){return e.toUpperCase()})},u[f[k+p+"L"]="downcaseAtCursor"]=function(e){l(e,function(e){return e.toLowerCase()})},u[f[k+p+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},u[f[k+p+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},u[f[k+p+"W"]="deleteToSublimeMark"]=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},u[f[k+p+"X"]="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))},u[f[k+p+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},f[k+p+"G"]="clearBookmarks",u[f[k+p+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};var L=d?"Ctrl-Shift-":"Ctrl-Alt-";u[f[L+"Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;ne.firstLine()&&e.addSelection(h(r.head.line-1,r.head.ch))}})},u[f[L+"Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function c(){this.id=null}function f(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function d(e){for(;Pl.length<=e;)Pl.push(p(Pl)+" ");return Pl[e]}function p(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||El.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&zl.test(e)}function S(e,t,r){var i=this;this.input=r,i.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=n("div",null,"CodeMirror-code"),i.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=n("div",null,"CodeMirror-cursors"),i.measure=n("div",null,"CodeMirror-measure"),i.lineMeasure=n("div",null,"CodeMirror-measure"),i.lineSpace=n("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=n("div",[n("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=n("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=n("div",null,null,"position: absolute; height: "+Wl+"px; width: 1px;"),i.gutters=n("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=n("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=n("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ll&&sl<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),al||nl&&vl||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function L(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?D(r,L(e,r).text.length):R(t,L(e,t.line).text.length)}function R(e,t){var r=e.ch;return null==r||r>t?D(e.line,t):r<0?D(e.line,0):e}function B(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new V(l,o.from,a?null:o.to))}}return n}function _(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t); if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;x0)){var c=[a,1],h=H(u.from,s.from),d=H(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-1}}return i}function Q(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?H(u.to,r)>=0:H(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?H(u.from,n)<=0:H(u.from,n)<0)))return!0}}}function se(e){for(var t;t=ie(e);)e=t.find(-1,!0).line;return e}function ae(e){for(var t,r;t=oe(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ue(e,t){var r=L(e,t),n=se(r);return r==n?t:N(n)}function ce(e,t){if(t>e.lastLine())return t;var r,n=L(e,t);if(!fe(e,n))return t;for(;r=oe(n);)n=r.find(1,!0).line;return N(n)+1}function fe(e,t){var r=Fl&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function ve(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function me(e){return e.level%2?e.to:e.from}function ye(e){return e.level%2?e.from:e.to}function be(e){var t=ke(e);return t?me(t[0]):0}function we(e){var t=ke(e);return t?ye(p(t)):e.text.length}function xe(e,t,r){var n=e[0].level;return t==n||r!=n&&tt)return n;if(i.from==t||i.to==t){if(null!=r)return xe(e,i.level,e[r].level)?(i.from!=i.to&&(Rl=r),n):(i.from!=i.to&&(Rl=n),r);r=n}}return r}function Se(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&C(e.text.charAt(t)));return t}function Le(e,t,r,n){var i=ke(e);if(!i)return Te(e,t,r,n);for(var o=Ce(i,t),l=i[o],s=Se(e,t,l.level%2?-r:r,n);;){if(s>l.from&&s0==l.level%2?l.to:l.from);if(l=i[o+=r],!l)return null;s=r>0==l.level%2?Se(e,l.to,-1,n):Se(e,l.from,1,n)}}function Te(e,t,r,n){var i=t+r;if(n)for(;i>0&&C(e.text.charAt(i));)i+=r;return i<0||i>e.text.length?null:i}function ke(e){var t=e.order;return null==t&&(t=e.order=Bl(e.text)),t}function Me(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():Ul:n||Ul}function Ne(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=Me(e,t,!1),i=0;i0}function He(e){e.prototype.on=function(e,t){Gl(this,e,t)},e.prototype.off=function(e,t){Ne(this,e,t)}}function Pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ze(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ie(e){Pe(e),Ee(e)}function Fe(e){return e.target||e.srcElement}function Re(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ml&&e.ctrlKey&&1==t&&(t=3),t}function Be(e){if(null==Ml){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ml=t.offsetWidth<=1&&t.offsetHeight>2&&!(ll&&sl<8))}var i=Ml?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ge(e){if(null!=Nl)return Nl;var n=r(e,document.createTextNode("AخA")),i=xl(n,0,1).getBoundingClientRect(),o=xl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Nl=o.right-i.right<3)}function Ue(e){if(null!=Yl)return Yl;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=xl(t,0,1).getBoundingClientRect();return Yl=Math.abs(i.left-o.left)>1}function Ve(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_l[e]=t}function Ke(e,t){ql[e]=t}function je(e){if("string"==typeof e&&ql.hasOwnProperty(e))e=ql[e];else if(e&&"string"==typeof e.name&&ql.hasOwnProperty(e.name)){var t=ql[e.name];"string"==typeof t&&(t={name:t}),e=y(t,e),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 Xe(e,t){t=je(t);var r=_l[t.name];if(!r)return Xe(e,"text/plain");var n=r(e,t);if($l.hasOwnProperty(t.name)){var i=$l[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function Ye(e,t){var r=$l.hasOwnProperty(e)?$l[e]:$l[e]={};a(t,r)}function _e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function qe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),r&&r.mode!=e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function $e(e,t,r){return!e.startState||e.startState(t,r)}function Ze(e,t,r,n){var i=[e.state.modeGen],o={};ot(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=function(r){var n=e.state.overlays[r],l=1,s=0;ot(e,t.text,n.mode,!0,function(e,t){for(var r=l;se&&i.splice(l,1,e,i[l+1],o),l+=2,s=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;re.options.maxHighlightLength?_e(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Je(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=lt(e,t,r),l=o>n.first&&L(n,o-1).stateAfter;return l=l?_e(n.mode,l):$e(n.mode),n.iter(o,t,function(r){et(e,r.text,l);var s=o==t-1||o%5==0||o>=i.viewFrom&&ot.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function nt(e,t,r,n){var i,o=function(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?_e(l.mode,c):c}},l=e.doc,s=l.mode;t=F(l,t);var a,u=L(l,t.line),c=Je(e,t.line,r),f=new Zl(u.text,e.options.tabSize);for(n&&(a=[]);(n||f.pose.options.maxHighlightLength?(s=!1,l&&et(e,t,n,f.pos),f.pos=t.length,a=null):a=it(rt(r,f,n,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ul;--s){if(s<=o.first)return o.first;var a=L(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var c=u(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function st(e,t,r){this.text=e,J(this,t),this.height=r?r(this):1}function at(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Q(e),J(e,r);var i=n?n(e):1;i!=e.height&&M(e,i)}function ut(e){e.parent=null,Q(e)}function ct(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?es:Jl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,t){var r=n("span",null,null,al?"padding-right: .1px":null),i={pre:n("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ll||al)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var s=o?t.rest[o-1]:t.line,a=void 0;i.pos=0,i.addToken=dt,Ge(e.display.measure)&&(a=ke(s))&&(i.addToken=gt(i.addToken,a)),i.map=[];var u=t!=e.display.externalMeasured&&N(s);mt(s,i,Qe(e,s,u)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=l(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=l(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Be(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(al){var c=i.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return We(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=l(i.pre.className,i.textClass||"")),i}function ht(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function dt(e,t,r,i,o,l,s){if(t){var a,u=e.splitSpaces?pt(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){a=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var p=c.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));ll&&sl<9?a.appendChild(n("span",[v])):a.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=a.appendChild(n("span",d(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=a.appendChild(n("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),ll&&sl<9?a.appendChild(n("span",[m])):a.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,a=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,a),ll&&sl<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||i||o||f||s){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[a],w,s);return l&&(x.title=l),e.content.appendChild(x)}e.content.appendChild(a)}}function pt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function vt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function mt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||re(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var T=Math.min(d,m);;){if(v){var k=p+v.length;if(!h){var M=k>T?v.slice(0,T-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(k>=T){v=v.slice(T-p),p=T;break}p=k,c=""}v=i.slice(o,o=r[g++]),l=ct(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Xt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Yt(e,t){t=se(t);var n=N(t),i=e.display.externalMeasured=new yt(e.doc,t,n);i.lineN=n;var o=i.built=ft(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function _t(e,t,r,n){return Zt(e,$t(e,t),r,n)}function qt(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function er(e,t,r,n){var i,o=Qt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&C(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(ll&&sl<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+vr(e.display),top:h.top,bottom:h.bottom}:ns}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;mr.from?l(e-1):l(e,n)}n=n||L(e.doc,t.line),i||(i=$t(e,n));var a=ke(n),u=t.ch;if(!a)return l(u);var c=Ce(a,u),f=s(u,c);return null!=Rl&&(f.other=s(u,Rl)),f}function fr(e,t){var r=0;t=F(e.doc,t),e.options.lineWrapping||(r=vr(e.display)*t.ch);var n=L(e.doc,t.line),i=de(n)+Rt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function hr(e,t,r,n){var i=D(e,t);return i.xRel=n,r&&(i.outside=!0),i}function dr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return hr(n.first,0,!0,-1);var i=W(n,r),o=n.first+n.size-1;if(i>o)return hr(n.first+n.size-1,L(n,o).text.length,!0,1);t<0&&(t=0);for(var l=L(n,i);;){var s=pr(e,l,i,t,r),a=oe(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=N(l=u.to.line)}}function pr(e,t,r,n,i){function o(n){var i=cr(e,D(r,n),"line",t,u);return s=!0,l>i.bottom?i.left-a:lv)return hr(r,d,m,1);for(;;){if(c?d==h||d==Le(t,h,1):d-h<=1){var y=n0&&y1){var x=Zt(e,u,y,"right");l<=x.bottom&&l>=x.top&&Math.abs(n-x.right)1?1:0);return S}var L=Math.ceil(f/2),T=h+L;if(c){T=h;for(var k=0;kn?(d=T,v=M,(m=s)&&(v+=1e3),f=L):(h=T,p=M,g=s,f-=L)}}function gr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ql){Ql=n("pre");for(var i=0;i<49;++i)Ql.appendChild(document.createTextNode("x")),Ql.appendChild(n("br"));Ql.appendChild(document.createTextNode("x"))}r(e.measure,Ql);var o=Ql.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function vr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function mr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:yr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function yr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function br(e){var t=gr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/vr(e.display)-3);return function(i){if(fe(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().line3&&(i(d,g.top,null,g.bottom),d=c,g.bottoma.bottom||u.bottom==a.bottom&&u.right>a.right)&&(a=u),d0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Nr(e){e.state.focused||(e.display.input.focus(),Ar(e))}function Wr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Or(e))},100)}function Ar(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(We(e,"focus",e,t),e.state.focused=!0,o(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),al&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Mr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(We(e,"blur",e,t),e.state.focused=!1,Ll(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Dr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=yr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l.001||a<-.001)&&(M(i.line,o),Er(i.line),i.rest))for(var u=0;u=l&&(o=W(t,de(L(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Ir(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,nl||kn(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),nl&&kn(e),wn(e,100))}function Fr(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Dr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Br(e){var t=Rr(e);return t.x*=os,t.y*=os,t}function Gr(e,t){var r=Rr(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&ml&&al)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!pl){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Rt(e.display))+"px;\n height: "+(t.bottom-t.top+Ut(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function qr(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var l=!1;i=cr(e,t);var s=r&&r!=t?cr(e,r):i,a=Zr(e,Math.min(i.left,s.left),Math.min(i.top,s.top)-n,Math.max(i.left,s.left),Math.max(i.bottom,s.bottom)+n),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=a.scrollTop&&(Ir(e,a.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(l=!0)),null!=a.scrollLeft&&(Fr(e,a.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(l=!0)),!l)break}return i}function $r(e,t,r,n,i){var o=Zr(e,t,r,n,i);null!=o.scrollTop&&Ir(e,o.scrollTop),null!=o.scrollLeft&&Fr(e,o.scrollLeft)}function Zr(e,t,r,n,i){var o=e.display,l=gr(e.display);r<0&&(r=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,a=Kt(e),u={};i-r>a&&(i=r+a);var c=e.doc.height+Bt(o),f=rc-l;if(rs+a){var d=Math.min(r,(h?c:i)-a);d!=s&&(u.scrollTop=d)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Vt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=n-t>g;return v&&(n=t+g),t<10?u.scrollLeft=0:tg+p-3&&(u.scrollLeft=n+(v?0:10)-g),u}function Qr(e,t,r){null==t&&null==r||en(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Jr(e){en(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?D(t.line,t.ch-1):t,n=D(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=fr(e,t.from),n=fr(e,t.to),i=Zr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function tn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ss},wt(e.curOp)}function rn(e){var t=e.curOp;Ct(t,function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Cn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ln(e){e.updatedDisplay=e.mustUpdate&&Ln(e.cm,e.update)}function sn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Pr(t),e.barMeasure=Ur(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_t(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Vt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function an(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Fl&&ue(e.doc,t)i.viewFrom?vn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)vn(e);else if(t<=i.viewFrom){var o=mn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):vn(e)}else if(r>=i.viewTo){var l=mn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):vn(e)}else{var s=mn(e,t,t,-1),a=mn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(bt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):vn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Cr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);f(l,r)==-1&&l.push(r)}}}function vn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mn(e,t,r,n){var i,o=Cr(e,t),l=e.display.view;if(!Fl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;ue(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function yn(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=bt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=bt(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Cr(e,r)))),n.viewTo=r}function bn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=_e(t.mode,Je(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength,a=Ze(e,o,s?_e(t.mode,n):n,!0);o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&hr)return wn(e,e.options.workDelay),!0}),i.length&&cn(e,function(){for(var t=0;t=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==bn(e))return!1;Hr(e)&&(vn(e),r.dims=mr(e));var o=i.first+i.size,l=Math.max(r.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(o,n.viewTo)),Fl&&(l=ue(e.doc,l),s=ce(e.doc,s));var a=l!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;yn(e,l,s),n.viewOffset=de(L(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=bn(e);if(!a&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Tl();return u>4&&(n.lineDiv.style.display="none"),Mn(e,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Tl()!=c&&c.offsetHeight&&c.focus(),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function Tn(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Vt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Bt(e.display)-Kt(e),r.top)}),t.visible=zr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Ln(e,t);n=!1){Pr(e);var i=Ur(e);Sr(e),jr(e,i),Wn(e,i)}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 kn(e,t){var r=new Cn(e,t);if(Ln(e,r)){Pr(e),Tn(e,r);var n=Ur(e);Sr(e),jr(e,n),Wn(e,n),r.finish()}}function Mn(e,r,n){function i(t){var r=t.nextSibling;return al&&ml&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,h=0;h-1&&(p=!1),Tt(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(O(e.options,c)))),a=d.node.nextSibling}else{var g=Ht(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Nn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Wn(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+Ut(e)+"px"}function An(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Dn(e,t){this.ranges=e,this.primIndex=t}function Hn(e,t){this.anchor=e,this.head=t}function Pn(e,t){var r=e[t];e.sort(function(e,t){return H(e.from(),t.from())}),t=f(e,r);for(var n=1;n=0){var l=z(o.from(),i.from()),s=E(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new Hn(a?s:l,a?l:s))}}return new Dn(e,t)}function En(e,t){return new Dn([new Hn(e,t||e)],0)}function zn(e){return e.text?D(e.from.line+e.text.length-1,p(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function In(e,t){if(H(e,t.from)<0)return e;if(H(e,t.to)<=0)return zn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=zn(t).ch-t.to.ch),D(r,n)}function Fn(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,g-1),e.insert(s.line+1,y)}St(e,"change",e,t)}function jn(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),p(e.done)):void 0}function Zn(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=$n(i,i.lastOp==n)))l=p(o.changes),0==H(t.from,t.to)&&0==H(t.from,l.to)?l.to=zn(t):o.changes.push(_n(e,t));else{var a=p(i.done);for(a&&a.ranges||ei(e.sel,i.done),o={changes:[_n(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||We(e,"historyAdded")}function Qn(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Jn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Qn(e,o,p(i.done),t))?i.done[i.done.length-1]=t:ei(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&qn(i.undone)}function ei(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ti(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ri(e){if(!e)return null;for(var t,r=0;r-1&&(p(s)[h]=u[h],delete u[h])}}}return n}function li(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=H(r,i)<0;o!=H(n,i)<0?(i=r,r=n):o!=H(r,n)<0&&(r=n)}return new Hn(i,r)}return new Hn(n||r,r)}function si(e,t,r,n){di(e,new Dn([li(e,e.sel.primary(),t,r)],0),n)}function ai(e,t,r){for(var n=[],i=0;i=t.ch:s.to>t.ch))){if(i&&(We(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=wi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=H(u,r))&&(n<0?c<0:c>0))return yi(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=wi(e,f,n,f.line==t.line?o:null)),f?yi(e,f,t,n,i):null}}return t}function bi(e,t,r,n,i){var o=n||1,l=yi(e,t,r,o,i)||!i&&yi(e,t,r,o,!0)||yi(e,t,r,-o,i)||!i&&yi(e,t,r,-o,!0);return l?l:(e.cantEdit=!0,D(e.first,0))}function wi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?F(e,D(t.line-1)):null:r>0&&t.ch==(n||L(e,t.line)).text.length?t.line=0;--i)Li(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Li(e,t)}}function Li(e,t){if(1!=t.text.length||""!=t.text[0]||0!=H(t.from,t.to)){var r=Fn(e,t);Zn(e,t,r,e.cm?e.cm.curOp.id:NaN),Mi(e,t,r,q(e,t));var n=[];jn(e,function(e,r){r||f(n,e.history)!=-1||(Di(e.history,t),n.push(e.history)),Mi(e,t,null,q(e,t))})}}function Ti(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--d){var g=h(d);if(g)return g.v}}}}function ki(e,t){if(0!=t&&(e.first+=t,e.sel=new Dn(g(e.sel.ranges,function(e){return new Hn(D(e.anchor.line+t,e.anchor.ch),D(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:D(o,L(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=Fn(e,t)),e.cm?Ni(e.cm,t,n):Kn(e,t,n),pi(e,r,Ol)}}function Ni(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=N(se(L(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Oe(e),Kn(n,t,r,br(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=pe(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,o.line),wn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?pn(e):o.line!=l.line||1!=t.text.length||Vn(e.doc,t)?pn(e,o.line,l.line+1,u):gn(e,o.line,"text");var c=De(e,"changes"),f=De(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&St(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Wi(e,t,r,n,i){if(n||(n=r),H(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Si(e,{from:r,to:n,text:t,origin:i})}function Ai(e,t,r,n){r0||0==s&&l.clearWhenEmpty!==!1)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=n("span",[l.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(le(e,t.line,t,r,l)||t.line!=r.line&&le(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");U()}l.addToHistory&&Zn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var u,c=t.line,f=e.cm;if(e.iter(c,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&se(e)==f.display.maxLine&&(u=!0),l.collapsed&&c!=t.line&&M(e,0),X(e,new V(l,c==t.line?t.ch:null,c==r.line?r.ch:null)),++c}),l.collapsed&&e.iter(t.line,r.line+1,function(t){fe(e,t)&&M(t,0)}),l.clearOnEnter&&Gl(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(G(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++as,l.atomic=!0),f){if(u&&(f.curOp.updateMaxLine=!0),l.collapsed)pn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)gn(f,h,"text");l.atomic&&vi(f.doc),St(f,"markerAdded",f,l)}return l}function Gi(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),pi(t.doc,En(r,r)),c)for(var h=0;h=0;t--)Wi(e.doc,"",n[t].from,n[t].to,"+delete");Jr(e)})}function so(e,t){var r=L(e.doc,t),n=se(r);n!=r&&(t=N(n));var i=ke(n),o=i?i[0].level%2?we(n):be(n):0;return D(t,o)}function ao(e,t){for(var r,n=L(e.doc,t);r=oe(n);)n=r.find(1,!0).line,t=null;var i=ke(n),o=i?i[0].level%2?be(n):we(n):n.text.length;return D(null==t?N(n):t,o)}function uo(e,t){var r=so(e,t.line),n=L(e.doc,r.line),i=ke(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return D(r.line,l?0:o)}return r}function co(e,t,r){if("string"==typeof t&&(t=ws[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Al}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function fo(e,t,r){for(var n=0;ni-400&&0==H(bs.pos,r)?n="triple":ys&&ys.time>i-400&&0==H(ys.pos,r)?(n="double",bs={time:i,pos:r}):(n="single",ys={time:i,pos:r});var o,l=e.doc.sel,a=ml?t.metaKey:t.ctrlKey;e.options.dragDrop&&Vl&&!e.isReadOnly()&&"single"==n&&(o=l.contains(r))>-1&&(H((o=l.ranges[o]).from(),r)<0||r.xRel>0)&&(H(o.to(),r)>0||r.xRel<0)?Co(e,t,r,a):So(e,t,r,n,a)}function Co(e,t,r,n){var i=e.display,o=+new Date,l=fn(e,function(s){al&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ne(document,"mouseup",l),Ne(i.scroller,"drop",l),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Pe(s),!n&&+new Date-200w&&i.push(new Hn(D(v,w),D(v,h(b,g,o))))}i.length||i.push(new Hn(r,r)),di(c,Pn(p.ranges.slice(0,d).concat(i),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=f,C=x.anchor,S=t;if("single"!=n){var T;T="double"==n?e.findWordAt(t):new Hn(D(t.line,0),F(c,D(t.line+1,0))),H(T.anchor,C)>0?(S=T.head,C=z(x.from(),T.anchor)):(S=T.anchor,C=E(x.to(),T.head))}var k=p.ranges.slice(0);k[d]=new Hn(F(c,C),S),di(c,Pn(k,d),Dl)}}function l(t){var r=++w,i=xr(e,t,!0,"rect"==n);if(i)if(0!=H(i,y)){e.curOp.focus=Tl(),o(i);var s=zr(a,c);(i.line>=s.to||i.lineb.bottom?20:0;u&&setTimeout(fn(e,function(){w==r&&(a.scroller.scrollTop+=u,l(t))}),50)}}function s(t){e.state.selectingText=!1,w=1/0,Pe(t),a.input.focus(),Ne(document,"mousemove",x),Ne(document,"mouseup",C),c.history.lastSelOrigin=null}var a=e.display,c=e.doc;Pe(t);var f,d,p=c.sel,g=p.ranges;if(i&&!t.shiftKey?(d=c.sel.contains(r),f=d>-1?g[d]:new Hn(r,r)):(f=c.sel.primary(),d=c.sel.primIndex),yl?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(f=new Hn(r,r)),r=xr(e,t,!0,!0),d=-1;else if("double"==n){var v=e.findWordAt(r);f=e.display.shift||c.extend?li(c,f,v.anchor,v.head):v}else if("triple"==n){var m=new Hn(D(r.line,0),F(c,D(r.line+1,0)));f=e.display.shift||c.extend?li(c,f,m.anchor,m.head):m}else f=li(c,f,r);i?d==-1?(d=g.length,di(c,Pn(g.concat([f]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"single"==n&&!t.shiftKey?(di(c,Pn(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):ui(c,d,f,Dl):(d=0,di(c,new Dn([f],0),Dl),p=c.sel);var y=r,b=a.wrapper.getBoundingClientRect(),w=0,x=fn(e,function(e){Re(e)?l(e):s(e)}),C=fn(e,s);e.state.selectingText=C,Gl(document,"mousemove",x),Gl(document,"mouseup",C)}function Lo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Pe(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!De(e,r))return ze(t);o-=s.top-l.viewOffset;for(var a=0;a=i){var c=W(e.doc,o),f=e.options.gutters[a];return We(e,r,e,c,f,t),ze(t)}}}function To(e,t){return Lo(e,t,"gutterClick",!0)}function ko(e,t){Ft(e.display,t)||Mo(e,t)||Ae(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Mo(e,t){return!!De(e,"gutterContextMenu")&&Lo(e,t,"gutterContextMenu",!1)}function No(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ir(e)}function Wo(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Ss&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Ss,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Gn(e)},!0),t("indentUnit",2,Gn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Un(e),ir(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(D(n,o))}n++});for(var i=r.length-1;i>=0;i--)Wi(e.doc,t,r[i],D(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Ss&&e.refresh()}),t("specialCharPlaceholder",ht,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",vl?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!bl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){No(e),Ao(e)},!0),t("keyMap","default",function(e,t,r){var n=oo(t),i=r!=Ss&&oo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,Do,!0),t("gutters",[],function(e){On(e.options),Ao(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?yr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return jr(e)},!0),t("scrollbarStyle","native",function(e){Yr(e),jr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){On(e.options),Ao(e)},!0),t("firstLineNumber",1,Ao,!0),t("lineNumberFormatter",function(e){return e},Ao,!0),t("showCursorWhenSelecting",!1,Sr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Or(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Oo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Sr,!0),t("singleCursorHeightPerLine",!0,Sr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Un,!0),t("addModeClass",!1,Un,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Un,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function Ao(e){An(e),pn(e),setTimeout(function(){return Dr(e)},20)}function Oo(e,t,r){var n=r&&r!=Ss;if(!t!=!n){var i=e.display.dragFunctions,o=t?Gl:Ne;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 Do(e){e.options.lineWrapping?(o(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ll(e.display.wrapper,"CodeMirror-wrap"),ge(e)),wr(e),pn(e),ir(e),setTimeout(function(){return jr(e)},100)}function Ho(e,t){var r=this;if(!(this instanceof Ho))return new Ho(e,t);this.options=t=t?a(t):{},a(Ls,t,!1),On(t);var n=t.value;"string"==typeof n&&(n=new cs(n,t.mode,null,t.lineSeparator)),this.doc=n;var i=new Ho.inputStyles[t.inputStyle](this),o=this.display=new S(e,n,i);o.wrapper.CodeMirror=this,An(this),No(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!vl&&o.input.focus(),Yr(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 c,keySeq:null,specialChars:null},ll&&sl<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Po(this),Zi(),tn(this),this.curOp.forceUpdate=!0,Xn(this,n),t.autofocus&&!vl||this.hasFocus()?setTimeout(s(Ar,this),20):Or(this);for(var l in Ts)Ts.hasOwnProperty(l)&&Ts[l](r,t[l],Ss);Hr(this),t.finishInit&&t.finishInit(this);for(var u=0;u400}var i=e.display;Gl(i.scroller,"mousedown",fn(e,wo)),ll&&sl<11?Gl(i.scroller,"dblclick",fn(e,function(t){if(!Ae(e,t)){var r=xr(e,t);if(r&&!To(e,t)&&!Ft(e.display,t)){Pe(t);var n=e.findWordAt(r);si(e.doc,n.anchor,n.head)}}})):Gl(i.scroller,"dblclick",function(t){return Ae(e,t)||Pe(t)}),Sl||Gl(i.scroller,"contextmenu",function(t){return ko(e,t)});var o,l={end:0};Gl(i.scroller,"touchstart",function(t){if(!Ae(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Gl(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Gl(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Ft(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new Hn(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new Hn(D(s.line,0),F(e.doc,D(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Pe(r)}t()}),Gl(i.scroller,"touchcancel",t),Gl(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Ir(e,i.scroller.scrollTop),Fr(e,i.scroller.scrollLeft,!0),We(e,"scroll",e))}),Gl(i.scroller,"mousewheel",function(t){return Gr(e,t)}),Gl(i.scroller,"DOMMouseScroll",function(t){return Gr(e,t)}),Gl(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ae(e,t)||Ie(t)},over:function(t){Ae(e,t)||(_i(e,t),Ie(t))},start:function(t){return Yi(e,t)},drop:fn(e,Xi),leave:function(t){Ae(e,t)||qi(e)}};var s=i.input.getField();Gl(s,"keyup",function(t){return yo.call(e,t)}),Gl(s,"keydown",fn(e,vo)),Gl(s,"keypress",fn(e,bo)),Gl(s,"focus",function(t){return Ar(e,t)}),Gl(s,"blur",function(t){return Or(e,t)})}function Eo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Je(e,t):r="prev");var l=e.options.tabSize,s=L(o,t),a=u(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var c,f=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&(c=o.mode.indent(i,s.text.slice(f.length),s.text),c==Al||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?u(L(o,t-1).text,null,l):0:"add"==r?c=a+e.options.indentUnit:"subtract"==r?c=a-e.options.indentUnit:"number"==typeof r&&(c=a+r),c=Math.max(0,c);var h="",p=0;if(e.options.indentWithTabs)for(var g=Math.floor(c/l);g;--g)p+=l,h+="\t";if(p1)if(Ms&&Ms.text.join("\n")==t){if(n.ranges.length%Ms.text.length==0){a=[];for(var u=0;u=0;f--){var h=n.ranges[f],d=h.from(),v=h.to();h.empty()&&(r&&r>0?d=D(d.line,d.ch-r):e.state.overwrite&&!l?v=D(v.line,Math.min(L(o,v.line).text.length,v.ch+p(s).length)):Ms&&Ms.lineWise&&Ms.text.join("\n")==t&&(d=v=D(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:v,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Si(e.doc,m),St(e,"inputRead",e,m)}t&&!l&&Ro(e,t),Jr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Fo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cn(t,function(){return Io(t,r,0,null,"paste")}),!0}function Ro(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=Eo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(L(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Eo(e,i.head.line,"smart"));l&&St(e,"electricInput",e,i.head.line)}}}function Bo(e){for(var t=[],r=[],n=0;nn&&(Eo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Jr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u0&&ui(t.doc,i,new Hn(l,c[i].to()),Ol)}}}),getTokenAt:function(e,t){return nt(this,e,t)},getLineTokens:function(e,t){return nt(this,D(e),t,!0)},getTokenTypeAt:function(e){e=F(this.doc,e);var t,r=Qe(this,L(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]i&&(e=i,n=!0),r=L(this.doc,e)}else r=e;return sr(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-de(r):0)},defaultTextHeight:function(){return gr(this.display)},defaultCharWidth:function(){return vr(this.display)},setGutterMarker:hn(function(e,t,r){return Hi(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:hn(function(e){var t=this,r=this.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,gn(t,n,"gutter"),x(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){var t;if("number"==typeof e){if(!A(this.doc,e))return null;if(t=e,e=L(this.doc,e),!e)return null}else if(t=N(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=cr(this,F(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){ var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&$r(this,s,l,s+t.offsetWidth,l+t.offsetHeight)},triggerOnKeyDown:hn(vo),triggerOnKeyPress:hn(bo),triggerOnKeyUp:yo,execCommand:function(e){if(ws.hasOwnProperty(e))return ws[e].call(null,this)},triggerElectric:hn(function(e){Ro(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=F(this.doc,e),s=0;s0&&s(r.charAt(n-1));)--n;for(;i.5)&&wr(this),We(this,"refresh",this)}),swapDoc:hn(function(e){var t=this.doc;return t.cm=null,Xn(this,e),ir(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},He(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Ko(e,t,r,n,i){function o(){var t=s+r;return!(t=e.first+e.size)&&(s=t,c=L(e,t))}function l(e){var t=(i?Le:Te)(c,a,r,!0);if(null==t){if(e||!o())return!1;a=i?(r<0?we:be)(c):r<0?c.text.length:0}else a=t;return!0}var s=t.line,a=t.ch,u=r,c=L(e,s);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var f=null,h="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||l(!p);p=!1){var g=c.text.charAt(a)||"\n",v=w(g,d)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||v||(v="s"),f&&f!=v){r<0&&(r=1,l());break}if(v&&(f=v),r>0&&!l(!p))break}var m=bi(e,D(s,a),t,u,!0);return H(t,m)||(m.hitSide=!0),m}function jo(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*gr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=dr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function Xo(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new c,this.gracePeriod=!1}function Yo(e,t){var r=qt(e,t.line);if(!r||r.hidden)return null;var n=L(e.doc,t.line),i=Xt(r,n,t.line),o=ke(n),l="left";if(o){var s=Ce(o,t.ch);l=s%2?"right":"left"}var a=Qt(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function _o(e,t){return t&&(e.bad=!0),e}function qo(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(s+=r);var c,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(D(n,0),D(i+1,0),o(+f));return void(h.length&&(c=h[0].find())&&(s+=T(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=15&&(fl=!1,al=!0);var xl,Cl=ml&&(ul||fl&&(null==wl||wl<12.11)),Sl=nl||ll&&sl>=9,Ll=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};xl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Tl=function(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e};ll&&sl<11&&(Tl=function(){try{return document.activeElement}catch(e){return document.body}});var kl=function(e){e.select()};gl?kl=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ll&&(kl=function(e){try{e.select()}catch(e){}}),c.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ml,Nl,Wl=30,Al={toString:function(){return"CodeMirror.Pass"}},Ol={scroll:!1},Dl={origin:"*mouse"},Hl={origin:"+move"},Pl=[""],El=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,zl=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Il=!1,Fl=!1,Rl=null,Bl=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/,u="L";return function(r){if(!i.test(r))return!1;for(var n=r.length,c=[],f=0;f=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},He(st),st.prototype.lineNo=function(){return N(this)};var Ql,Jl={},es={},ts=null,rs=null,ns={left:0,right:0,top:0,bottom:0},is=0,os=null;ll?os=-.53:nl?os=15:cl?os=-.7:hl&&(os=-1/3),Vr.prototype=a({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=ml&&!dl?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new c,this.disableVert=new c},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},Vr.prototype),Kr.prototype=a({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Kr.prototype);var ls={native:Vr,null:Kr},ss=0;Cn.prototype.signal=function(e,t){De(e,t)&&this.events.push(arguments)},Cn.prototype.finish=function(){for(var e=this,t=0;t=0&&H(e,i.to())<=0)return n}return-1}},Hn.prototype={from:function(){return z(this.anchor,this.head)},to:function(){return E(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},Pi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n1||!(this.children[0]instanceof Pi))){var a=[];this.collapse(a),this.children=[new Pi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r50){for(var s=o.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&vi(t.doc)),t&&St(t,"markerCleared",t,this),r&&rn(t),this.parent&&this.parent.clear()}},Ri.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o=0;u--)Si(n,i[u]);a?hi(this,a):this.cm&&Jr(this.cm)}),undo:dn(function(){Ti(this,"undo")}),redo:dn(function(){Ti(this,"redo")}),undoSelection:dn(function(){Ti(this,"undo",!0)}),redoSelection:dn(function(){Ti(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=F(this,e),t=F(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne?(t=e,!0):(e-=o,void++r)}),F(this,D(r,t))},indexFromPos:function(e){e=F(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=L(e.doc,i.line-1).text;l&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),D(i.line-1,l.length-1),i,"+transpose"))}r.push(new Hn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return cn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&l<=i.head.ch&&(r.composing.sel=En(D(i.head.line,l),D(i.head.line,l+t.length)))}}),Gl(i,"compositionupdate",function(e){return r.composing.data=e.data}),Gl(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Gl(i,"touchstart",function(){return r.forceCompositionEnd()}),Gl(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||cn(r.cm,function(){return pn(n)})}),Gl(i,"copy",t),Gl(i,"cut",t)},prepareSelection:function(){var e=Lr(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=$o(this.cm,e.anchorNode,e.anchorOffset),n=$o(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=H(z(r,n),t.from())||0!=H(E(r,n),t.to())){var i=Yo(this.cm,t.from()),o=Yo(this.cm,t.to());if(i||o){var l=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var a=l[l.length-1].measure,u=a.maps?a.maps[a.maps.length-1]:a.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:l[0].measure.map[2],offset:0};var c;try{c=xl(i.node,i.offset,o.offset,o.node)}catch(e){}c&&(!nl&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||(e.removeAllRanges(),e.addRange(c))):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):nl&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():cn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=$o(t,e.anchorNode,e.anchorOffset),n=$o(t,e.focusNode,e.focusOffset);r&&n&&cn(t,function(){di(t.doc,En(r,n),Ol),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.linet.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=Cr(e,n.line))?(l=N(t.view[0].line),s=t.view[0].node):(l=N(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=Cr(e,i.line);c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=N(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling);for(var f=e.doc.splitLines(qo(e,s,u,l,a)),h=T(e.doc,D(l,0),D(a,L(e.doc,a).text.length));f.length>1&&h.length>1;)if(p(f)==p(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,g=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);d1||f[0]||H(C,S)?(Wi(e.doc,f,C,S,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?fn(this.cm,pn)(this.cm):e.data&&e.data!=e.startData&&fn(this.cm,Io)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||fn(this.cm,Io)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:m,resetPosition:m,needsContentAttribute:!0},Xo.prototype),Qo.prototype=a({init:function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())zo({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,l.value=Ms.text.join("\n"),kl(l));else{if(!i.options.lineWiseCopyCut)return;var t=Bo(i);zo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Ol):(n.prevInput="",l.value=t.text.join("\n"),kl(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Uo(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),gl&&(l.style.width="0px"),Gl(l,"input",function(){ll&&sl>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Gl(l,"paste",function(e){Ae(i,e)||Fo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Gl(l,"cut",t),Gl(l,"copy",t),Gl(e.scroller,"paste",function(t){Ft(e,t)||Ae(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Gl(e.lineSpace,"selectstart",function(t){Ft(e,t)||Pe(t)}),Gl(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Gl(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Lr(e);if(e.options.moveInputWithCursor){var i=cr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},showSelection:function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Xl&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var l=t?"-":r||n.getSelection();this.textarea.value=l,n.state.focused&&kl(this.textarea),ll&&sl>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",ll&&sl>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!vl||Tl()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||jl(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(ll&&sl>=9&&this.hasSelection===i||ml&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l1e3||i.indexOf("\n")>-1?r.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},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){ll&&sl>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=f,l.style.cssText=c,ll&&sl<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!ll||ll&&sl<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?fn(i,xi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=xr(i,e),a=o.scroller.scrollTop;if(s&&!fl){var u=i.options.resetSelectionOnContextMenu;u&&i.doc.sel.contains(s)==-1&&fn(i,di)(i.doc,En(s),Ol);var c=l.style.cssText,f=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var h=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(ll?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(al&&(d=window.scrollY),o.input.focus(),al&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ll&&sl>=9&&t(),Sl){Ie(e);var p=function(){Ne(window,"mouseup",p),setTimeout(r,20)};Gl(window,"mouseup",p)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:m,needsContentAttribute:!1},Qo.prototype),Wo(Ho),Vo(Ho);var Ns="iter insert remove copy getEditor constructor".split(" ");for(var Ws in cs.prototype)cs.prototype.hasOwnProperty(Ws)&&f(Ns,Ws)<0&&(Ho.prototype[Ws]=function(e){return function(){return e.apply(this.doc,arguments)}}(cs.prototype[Ws]));return He(cs),Ho.inputStyles={textarea:Qo,contenteditable:Xo},Ho.defineMode=function(e){Ho.defaults.mode||"null"==e||(Ho.defaults.mode=e),Ve.apply(this,arguments)},Ho.defineMIME=Ke,Ho.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(e,t){Ho.prototype[e]=t},Ho.defineDocExtension=function(e,t){cs.prototype[e]=t},Ho.fromTextArea=Jo,el(Ho),Ho.version="5.20.2",Ho})},{}],48:[function(require,module,exports){"use strict";function GraphQLError(r,e,a,o,t,i){i&&i.stack?Object.defineProperty(this,"stack",{value:i.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0});var u=a;if(!u&&e&&e.length>0){var c=e[0];u=c&&c.loc&&c.loc.source}var l=o;!l&&e&&(l=e.filter(function(r){return Boolean(r.loc)}).map(function(r){return r.loc.start})),l&&0===l.length&&(l=void 0);var n=void 0,s=u;s&&l&&(n=l.map(function(r){return(0,_language.getLocation)(s,r)})),Object.defineProperties(this,{message:{value:r,enumerable:!0,writable:!0},locations:{value:n||void 0,enumerable:!0},path:{value:t||void 0,enumerable:!0},nodes:{value:e||void 0},source:{value:u||void 0},positions:{value:l||void 0},originalError:{value:i}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLError=GraphQLError;var _language=require("../language");GraphQLError.prototype=Object.create(Error.prototype,{constructor:{value:GraphQLError},name:{value:"GraphQLError"}})},{"../language":66}],49:[function(require,module,exports){"use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function formatError(r){return(0,_invariant2.default)(r,"Received null or undefined error."),{message:r.message,locations:r.locations,path:r.path}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=formatError;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant)},{"../jsutils/invariant":59}],50:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _GraphQLError=require("./GraphQLError");Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _GraphQLError.GraphQLError}});var _syntaxError=require("./syntaxError");Object.defineProperty(exports,"syntaxError",{enumerable:!0,get:function(){return _syntaxError.syntaxError}});var _locatedError=require("./locatedError");Object.defineProperty(exports,"locatedError",{enumerable:!0,get:function(){return _locatedError.locatedError}});var _formatError=require("./formatError");Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _formatError.formatError}})},{"./GraphQLError":48,"./formatError":49,"./locatedError":51,"./syntaxError":52}],51:[function(require,module,exports){"use strict";function locatedError(r,e,o){if(r&&r.path)return r;var t=r?r.message||String(r):"An unknown error occurred.";return new _GraphQLError.GraphQLError(t,r&&r.nodes||e,r&&r.source,r&&r.positions,o,r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.locatedError=locatedError;var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":48}],52:[function(require,module,exports){"use strict";function syntaxError(r,n,o){var t=(0,_location.getLocation)(r,n),e=new _GraphQLError.GraphQLError("Syntax Error "+r.name+" ("+t.line+":"+t.column+") "+o+"\n\n"+highlightSourceAtLocation(r,t),void 0,r,[n]);return e}function highlightSourceAtLocation(r,n){var o=n.line,t=(o-1).toString(),e=o.toString(),a=(o+1).toString(),i=a.length,l=r.body.split(/\r\n|[\n\r]/g);return(o>=2?lpad(i,t)+": "+l[o-2]+"\n":"")+lpad(i,e)+": "+l[o-1]+"\n"+Array(2+i+n.column).join(" ")+"^\n"+(o0?{errors:c}:(0,_execute.execute)(e,s,a,t,u,i))}).then(void 0,function(e){return{errors:[e]}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.graphql=graphql;var _source=require("./language/source"),_parser=require("./language/parser"),_validate=require("./validation/validate"),_execute=require("./execution/execute")},{"./execution/execute":53,"./language/parser":70,"./language/source":72,"./validation/validate":125}],57:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _graphql=require("./graphql");Object.defineProperty(exports,"graphql",{enumerable:!0,get:function(){return _graphql.graphql}});var _type=require("./type");Object.defineProperty(exports,"GraphQLSchema",{enumerable:!0,get:function(){return _type.GraphQLSchema}}),Object.defineProperty(exports,"GraphQLScalarType",{enumerable:!0,get:function(){return _type.GraphQLScalarType}}),Object.defineProperty(exports,"GraphQLObjectType",{enumerable:!0,get:function(){return _type.GraphQLObjectType}}),Object.defineProperty(exports,"GraphQLInterfaceType",{enumerable:!0,get:function(){return _type.GraphQLInterfaceType}}),Object.defineProperty(exports,"GraphQLUnionType",{enumerable:!0,get:function(){return _type.GraphQLUnionType}}),Object.defineProperty(exports,"GraphQLEnumType",{enumerable:!0,get:function(){return _type.GraphQLEnumType}}),Object.defineProperty(exports,"GraphQLInputObjectType",{enumerable:!0,get:function(){return _type.GraphQLInputObjectType}}),Object.defineProperty(exports,"GraphQLList",{enumerable:!0,get:function(){return _type.GraphQLList}}),Object.defineProperty(exports,"GraphQLNonNull",{enumerable:!0,get:function(){return _type.GraphQLNonNull}}),Object.defineProperty(exports,"GraphQLDirective",{enumerable:!0,get:function(){return _type.GraphQLDirective}}),Object.defineProperty(exports,"TypeKind",{enumerable:!0,get:function(){return _type.TypeKind}}),Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _type.DirectiveLocation}}),Object.defineProperty(exports,"GraphQLInt",{enumerable:!0,get:function(){return _type.GraphQLInt}}),Object.defineProperty(exports,"GraphQLFloat",{enumerable:!0,get:function(){return _type.GraphQLFloat}}),Object.defineProperty(exports,"GraphQLString",{enumerable:!0,get:function(){return _type.GraphQLString}}),Object.defineProperty(exports,"GraphQLBoolean",{enumerable:!0,get:function(){return _type.GraphQLBoolean}}),Object.defineProperty(exports,"GraphQLID",{enumerable:!0,get:function(){return _type.GraphQLID}}),Object.defineProperty(exports,"specifiedDirectives",{enumerable:!0,get:function(){return _type.specifiedDirectives}}),Object.defineProperty(exports,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return _type.GraphQLIncludeDirective}}),Object.defineProperty(exports,"GraphQLSkipDirective",{enumerable:!0,get:function(){return _type.GraphQLSkipDirective}}),Object.defineProperty(exports,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return _type.GraphQLDeprecatedDirective}}),Object.defineProperty(exports,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return _type.DEFAULT_DEPRECATION_REASON}}),Object.defineProperty(exports,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _type.SchemaMetaFieldDef}}),Object.defineProperty(exports,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeMetaFieldDef}}),Object.defineProperty(exports,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeNameMetaFieldDef}}),Object.defineProperty(exports,"__Schema",{enumerable:!0,get:function(){return _type.__Schema}}),Object.defineProperty(exports,"__Directive",{enumerable:!0,get:function(){return _type.__Directive}}),Object.defineProperty(exports,"__DirectiveLocation",{enumerable:!0,get:function(){return _type.__DirectiveLocation}}),Object.defineProperty(exports,"__Type",{enumerable:!0,get:function(){return _type.__Type}}),Object.defineProperty(exports,"__Field",{enumerable:!0,get:function(){return _type.__Field}}),Object.defineProperty(exports,"__InputValue",{enumerable:!0,get:function(){return _type.__InputValue}}),Object.defineProperty(exports,"__EnumValue",{enumerable:!0,get:function(){return _type.__EnumValue}}),Object.defineProperty(exports,"__TypeKind",{enumerable:!0,get:function(){return _type.__TypeKind}}),Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _type.isType}}),Object.defineProperty(exports,"isInputType",{enumerable:!0,get:function(){return _type.isInputType}}),Object.defineProperty(exports,"isOutputType",{enumerable:!0,get:function(){return _type.isOutputType}}),Object.defineProperty(exports,"isLeafType",{enumerable:!0,get:function(){return _type.isLeafType}}),Object.defineProperty(exports,"isCompositeType",{enumerable:!0,get:function(){return _type.isCompositeType}}),Object.defineProperty(exports,"isAbstractType",{enumerable:!0,get:function(){return _type.isAbstractType}}),Object.defineProperty(exports,"getNullableType",{enumerable:!0,get:function(){return _type.getNullableType}}),Object.defineProperty(exports,"getNamedType",{enumerable:!0,get:function(){return _type.getNamedType}});var _language=require("./language");Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _language.Source}}),Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _language.getLocation}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _language.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _language.parseValue}}),Object.defineProperty(exports,"parseType",{enumerable:!0,get:function(){return _language.parseType}}),Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _language.print}}),Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _language.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _language.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _language.visitWithTypeInfo}}),Object.defineProperty(exports,"Kind",{enumerable:!0,get:function(){return _language.Kind}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _language.TokenKind}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _language.BREAK}});var _execution=require("./execution");Object.defineProperty(exports,"execute",{enumerable:!0,get:function(){return _execution.execute}}),Object.defineProperty(exports,"defaultFieldResolver",{enumerable:!0,get:function(){return _execution.defaultFieldResolver}}),Object.defineProperty(exports,"responsePathAsArray",{enumerable:!0,get:function(){return _execution.responsePathAsArray}});var _validation=require("./validation");Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return _validation.validate}}),Object.defineProperty(exports,"specifiedRules",{enumerable:!0,get:function(){return _validation.specifiedRules}});var _error=require("./error");Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _error.GraphQLError}}),Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _error.formatError}});var _utilities=require("./utilities");Object.defineProperty(exports,"introspectionQuery",{enumerable:!0,get:function(){return _utilities.introspectionQuery}}),Object.defineProperty(exports,"getOperationAST",{enumerable:!0,get:function(){return _utilities.getOperationAST}}),Object.defineProperty(exports,"buildClientSchema",{enumerable:!0,get:function(){return _utilities.buildClientSchema}}),Object.defineProperty(exports,"buildASTSchema",{enumerable:!0,get:function(){return _utilities.buildASTSchema}}),Object.defineProperty(exports,"buildSchema",{enumerable:!0,get:function(){return _utilities.buildSchema}}),Object.defineProperty(exports,"extendSchema",{enumerable:!0,get:function(){return _utilities.extendSchema}}),Object.defineProperty(exports,"printSchema",{enumerable:!0,get:function(){return _utilities.printSchema}}),Object.defineProperty(exports,"printType",{enumerable:!0,get:function(){return _utilities.printType}}),Object.defineProperty(exports,"typeFromAST",{enumerable:!0,get:function(){return _utilities.typeFromAST}}),Object.defineProperty(exports,"valueFromAST",{enumerable:!0,get:function(){return _utilities.valueFromAST}}),Object.defineProperty(exports,"astFromValue",{enumerable:!0,get:function(){return _utilities.astFromValue}}),Object.defineProperty(exports,"TypeInfo",{enumerable:!0,get:function(){return _utilities.TypeInfo}}),Object.defineProperty(exports,"isValidJSValue",{enumerable:!0,get:function(){return _utilities.isValidJSValue}}),Object.defineProperty(exports,"isValidLiteralValue",{enumerable:!0,get:function(){return _utilities.isValidLiteralValue}}),Object.defineProperty(exports,"concatAST",{enumerable:!0,get:function(){return _utilities.concatAST}}),Object.defineProperty(exports,"separateOperations",{enumerable:!0,get:function(){return _utilities.separateOperations}}),Object.defineProperty(exports,"isEqualType",{enumerable:!0,get:function(){return _utilities.isEqualType}}),Object.defineProperty(exports,"isTypeSubTypeOf",{enumerable:!0,get:function(){return _utilities.isTypeSubTypeOf}}),Object.defineProperty(exports,"doTypesOverlap",{enumerable:!0,get:function(){return _utilities.doTypesOverlap}}),Object.defineProperty(exports,"assertValidName",{enumerable:!0,get:function(){return _utilities.assertValidName}}),Object.defineProperty(exports,"findBreakingChanges",{enumerable:!0,get:function(){return _utilities.findBreakingChanges}})},{"./error":50,"./execution":54,"./graphql":56,"./language":66,"./type":76,"./utilities":89,"./validation":98}],58:[function(require,module,exports){"use strict";function find(e,t){for(var r=0;r2?", ":" ")+(u===t.length-1?"or ":"")+r})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=quotedOrList;var MAX_LENGTH=5},{}],65:[function(require,module,exports){"use strict";function suggestionList(t,e){for(var n=Object.create(null),r=e.length,i=t.length/2,o=0;o1&&r>1&&t[n-1]===e[r-2]&&t[n-2]===e[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+s))}return i[o][a]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=suggestionList},{}],66:[function(require,module,exports){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BREAK=exports.visitWithTypeInfo=exports.visitInParallel=exports.visit=exports.Source=exports.print=exports.parseType=exports.parseValue=exports.parse=exports.TokenKind=exports.createLexer=exports.Kind=exports.getLocation=void 0;var _location=require("./location");Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _location.getLocation}});var _lexer=require("./lexer");Object.defineProperty(exports,"createLexer",{enumerable:!0,get:function(){return _lexer.createLexer}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _lexer.TokenKind}});var _parser=require("./parser");Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _parser.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _parser.parseValue}}),Object.defineProperty(exports,"parseType",{enumerable:!0,get:function(){return _parser.parseType}});var _printer=require("./printer");Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _printer.print}});var _source=require("./source");Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _source.Source}});var _visitor=require("./visitor");Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _visitor.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _visitor.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _visitor.visitWithTypeInfo}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _visitor.BREAK}});var _kinds=require("./kinds"),Kind=_interopRequireWildcard(_kinds);exports.Kind=Kind},{"./kinds":67,"./lexer":68,"./location":69,"./parser":70,"./printer":71,"./source":72,"./visitor":73}],67:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.NAME="Name",exports.DOCUMENT="Document",exports.OPERATION_DEFINITION="OperationDefinition",exports.VARIABLE_DEFINITION="VariableDefinition",exports.VARIABLE="Variable",exports.SELECTION_SET="SelectionSet",exports.FIELD="Field",exports.ARGUMENT="Argument",exports.FRAGMENT_SPREAD="FragmentSpread",exports.INLINE_FRAGMENT="InlineFragment",exports.FRAGMENT_DEFINITION="FragmentDefinition",exports.INT="IntValue",exports.FLOAT="FloatValue",exports.STRING="StringValue",exports.BOOLEAN="BooleanValue",exports.NULL="NullValue",exports.ENUM="EnumValue",exports.LIST="ListValue",exports.OBJECT="ObjectValue",exports.OBJECT_FIELD="ObjectField",exports.DIRECTIVE="Directive",exports.NAMED_TYPE="NamedType",exports.LIST_TYPE="ListType",exports.NON_NULL_TYPE="NonNullType",exports.SCHEMA_DEFINITION="SchemaDefinition",exports.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",exports.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",exports.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",exports.FIELD_DEFINITION="FieldDefinition",exports.INPUT_VALUE_DEFINITION="InputValueDefinition",exports.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",exports.UNION_TYPE_DEFINITION="UnionTypeDefinition",exports.ENUM_TYPE_DEFINITION="EnumTypeDefinition",exports.ENUM_VALUE_DEFINITION="EnumValueDefinition",exports.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",exports.TYPE_EXTENSION_DEFINITION="TypeExtensionDefinition",exports.DIRECTIVE_DEFINITION="DirectiveDefinition"},{}],68:[function(require,module,exports){"use strict";function createLexer(e,r){var a=new Tok(SOF,0,0,0,0,null),t={source:e,options:r,lastToken:a,token:a,line:1,lineStart:0,advance:advanceLexer};return t}function advanceLexer(){var e=this.lastToken=this.token;if(e.kind!==EOF){do e=e.next=readToken(this,e);while(e.kind===COMMENT);this.token=e}return e}function getTokenDesc(e){var r=e.value;return r?e.kind+' "'+r+'"':e.kind}function Tok(e,r,a,t,c,n,o){this.kind=e,this.start=r,this.end=a,this.line=t,this.column=c,this.value=o,this.prev=n,this.next=null}function printCharCode(e){return isNaN(e)?EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function readToken(e,r){var a=e.source,t=a.body,c=t.length,n=positionAfterWhitespace(t,r.end,e),o=e.line,s=1+n-e.lineStart;if(n>=c)return new Tok(EOF,c,c,o,s,r);var i=charCodeAt.call(t,n);if(i<32&&9!==i&&10!==i&&13!==i)throw(0,_error.syntaxError)(a,n,"Cannot contain the invalid character "+printCharCode(i)+".");switch(i){case 33:return new Tok(BANG,n,n+1,o,s,r);case 35:return readComment(a,n,o,s,r);case 36:return new Tok(DOLLAR,n,n+1,o,s,r);case 40:return new Tok(PAREN_L,n,n+1,o,s,r);case 41:return new Tok(PAREN_R,n,n+1,o,s,r);case 46:if(46===charCodeAt.call(t,n+1)&&46===charCodeAt.call(t,n+2))return new Tok(SPREAD,n,n+3,o,s,r);break;case 58:return new Tok(COLON,n,n+1,o,s,r);case 61:return new Tok(EQUALS,n,n+1,o,s,r);case 64:return new Tok(AT,n,n+1,o,s,r);case 91:return new Tok(BRACKET_L,n,n+1,o,s,r);case 93:return new Tok(BRACKET_R,n,n+1,o,s,r);case 123:return new Tok(BRACE_L,n,n+1,o,s,r);case 124:return new Tok(PIPE,n,n+1,o,s,r);case 125:return new Tok(BRACE_R,n,n+1,o,s,r);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 readName(a,n,o,s,r);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(a,n,i,o,s,r);case 34:return readString(a,n,o,s,r)}throw(0,_error.syntaxError)(a,n,unexpectedCharacterMessage(i))}function unexpectedCharacterMessage(e){return 39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character "+printCharCode(e)+"."}function positionAfterWhitespace(e,r,a){for(var t=e.length,c=r;c31||9===o));return new Tok(COMMENT,r,s,a,t,c,slice.call(n,r+1,s))}function readNumber(e,r,a,t,c,n){var o=e.body,s=a,i=r,l=!1;if(45===s&&(s=charCodeAt.call(o,++i)),48===s){if(s=charCodeAt.call(o,++i),s>=48&&s<=57)throw(0,_error.syntaxError)(e,i,"Invalid number, unexpected digit after 0: "+printCharCode(s)+".")}else i=readDigits(e,i,s),s=charCodeAt.call(o,i);return 46===s&&(l=!0,s=charCodeAt.call(o,++i),i=readDigits(e,i,s),s=charCodeAt.call(o,i)),69!==s&&101!==s||(l=!0,s=charCodeAt.call(o,++i),43!==s&&45!==s||(s=charCodeAt.call(o,++i)),i=readDigits(e,i,s)),new Tok(l?FLOAT:INT,r,i,t,c,n,slice.call(o,r,i))}function readDigits(e,r,a){var t=e.body,c=r,n=a;if(n>=48&&n<=57){do n=charCodeAt.call(t,++c);while(n>=48&&n<=57);return c}throw(0,_error.syntaxError)(e,c,"Invalid number, expected digit but got: "+printCharCode(n)+".")}function readString(e,r,a,t,c){for(var n=e.body,o=r+1,s=o,i=0,l="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function readName(e,r,a,t,c){for(var n=e.body,o=n.length,s=r+1,i=0;s!==o&&null!==(i=charCodeAt.call(n,s))&&(95===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122);)++s;return new Tok(NAME,r,s,a,t,c,slice.call(n,r,s))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenKind=void 0,exports.createLexer=createLexer,exports.getTokenDesc=getTokenDesc;var _error=require("../error"),SOF="",EOF="",BANG="!",DOLLAR="$",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",COMMENT="Comment",charCodeAt=(exports.TokenKind={SOF:SOF,EOF:EOF,BANG:BANG,DOLLAR:DOLLAR,PAREN_L:PAREN_L,PAREN_R:PAREN_R,SPREAD:SPREAD,COLON:COLON,EQUALS:EQUALS,AT:AT,BRACKET_L:BRACKET_L,BRACKET_R:BRACKET_R,BRACE_L:BRACE_L,PIPE:PIPE,BRACE_R:BRACE_R,NAME:NAME,INT:INT,FLOAT:FLOAT,STRING:STRING,COMMENT:COMMENT},String.prototype.charCodeAt),slice=String.prototype.slice;Tok.prototype.toJSON=Tok.prototype.inspect=function(){return{kind:this.kind,value:this.value, line:this.line,column:this.column}}},{"../error":50}],69:[function(require,module,exports){"use strict";function getLocation(e,o){for(var t=/\r\n|[\n\r]/g,n=1,r=o+1,i=void 0;(i=t.exec(e.body))&&i.index0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var i={};return a.forEach(function(t){(0,_assertValidName.assertValidName)(t);var a=n[t];(0,_invariant2.default)(!a.hasOwnProperty("isDeprecated"),e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var r=_extends({},a,{isDeprecated:Boolean(a.deprecationReason),name:t});(0,_invariant2.default)(isOutputType(r.type),e.name+"."+t+" field type must be Output Type but "+("got: "+String(r.type)+"."));var s=a.args;s?((0,_invariant2.default)(isPlainObj(s),e.name+"."+t+" args must be an object with argument names as keys."),r.args=Object.keys(s).map(function(n){(0,_assertValidName.assertValidName)(n);var a=s[n];return(0,_invariant2.default)(isInputType(a.type),e.name+"."+t+"("+n+":) argument type must be "+("Input Type but got: "+String(a.type)+".")),{name:n,description:void 0===a.description?null:a.description,type:a.type,defaultValue:a.defaultValue}})):r.args=[],i[t]=r}),i}function isPlainObj(e){return e&&"object"==typeof e&&!Array.isArray(e)}function defineTypes(e,t){var n=resolveThunk(t);return(0,_invariant2.default)(Array.isArray(n)&&n.length>0,"Must provide Array of types or a function which returns "+("such an array for Union "+e.name+".")),n.forEach(function(t){(0,_invariant2.default)(t instanceof GraphQLObjectType,e.name+" may only contain Object types, it cannot contain: "+(String(t)+".")),"function"!=typeof e.resolveType&&(0,_invariant2.default)("function"==typeof t.isTypeOf,'Union type "'+e.name+'" does not provide a "resolveType" '+('function and possible type "'+t.name+'" does not provide an ')+'"isTypeOf" function. There is no way to resolve this possible type during execution.')}),n}function defineEnumValues(e,t){(0,_invariant2.default)(isPlainObj(t),e.name+" values must be an object with value names as keys.");var n=Object.keys(t);return(0,_invariant2.default)(n.length>0,e.name+" values must be an object with value names as keys."),n.map(function(n){(0,_assertValidName.assertValidName)(n);var a=t[n];return(0,_invariant2.default)(isPlainObj(a),e.name+"."+n+' must refer to an object with a "value" key '+("representing an internal value but got: "+String(a)+".")),(0,_invariant2.default)(!a.hasOwnProperty("isDeprecated"),e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:a.description,isDeprecated:Boolean(a.deprecationReason),deprecationReason:a.deprecationReason,value:(0,_isNullish2.default)(a.value)?n:a.value}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLNonNull=exports.GraphQLList=exports.GraphQLInputObjectType=exports.GraphQLEnumType=exports.GraphQLUnionType=exports.GraphQLInterfaceType=exports.GraphQLObjectType=exports.GraphQLScalarType=void 0;var _extends=Object.assign||function(e){for(var t=1;t0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var a={};return n.forEach(function(n){(0,_assertValidName.assertValidName)(n);var i=_extends({},t[n],{name:n});(0,_invariant2.default)(isInputType(i.type),e.name+"."+n+" field type must be Input Type but "+("got: "+String(i.type)+".")),a[n]=i}),a},e.prototype.toString=function(){return this.name},e}(),GraphQLList=exports.GraphQLList=function(){function e(t){_classCallCheck(this,e),(0,_invariant2.default)(isType(t),"Can only create List of a GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){ return"["+String(this.ofType)+"]"},e}(),GraphQLNonNull=exports.GraphQLNonNull=function(){function e(t){_classCallCheck(this,e),(0,_invariant2.default)(isType(t)&&!(t instanceof e),"Can only create NonNull of a Nullable GraphQLType but got: "+(String(t)+".")),this.ofType=t}return e.prototype.toString=function(){return this.ofType.toString()+"!"},e}()},{"../jsutils/invariant":59,"../jsutils/isNullish":61,"../language/kinds":67,"../utilities/assertValidName":81}],75:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.specifiedDirectives=exports.GraphQLDeprecatedDirective=exports.DEFAULT_DEPRECATION_REASON=exports.GraphQLSkipDirective=exports.GraphQLIncludeDirective=exports.GraphQLDirective=exports.DirectiveLocation=void 0;var _definition=require("./definition"),_scalars=require("./scalars"),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_assertValidName=require("../utilities/assertValidName"),DirectiveLocation=exports.DirectiveLocation={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"},GraphQLDirective=exports.GraphQLDirective=function e(i){_classCallCheck(this,e),(0,_invariant2.default)(i.name,"Directive must be named."),(0,_assertValidName.assertValidName)(i.name),(0,_invariant2.default)(Array.isArray(i.locations),"Must provide locations for directive."),this.name=i.name,this.description=i.description,this.locations=i.locations;var t=i.args;t?((0,_invariant2.default)(!Array.isArray(t),"@"+i.name+" args must be an object with argument names as keys."),this.args=Object.keys(t).map(function(e){(0,_assertValidName.assertValidName)(e);var r=t[e];return(0,_invariant2.default)((0,_definition.isInputType)(r.type),"@"+i.name+"("+e+":) argument type must be "+("Input Type but got: "+String(r.type)+".")),{name:e,description:void 0===r.description?null:r.description,type:r.type,defaultValue:r.defaultValue}})):this.args=[]},GraphQLIncludeDirective=exports.GraphQLIncludeDirective=new GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=exports.GraphQLSkipDirective=new GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),description:"Skipped when true."}}}),DEFAULT_DEPRECATION_REASON=exports.DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=exports.GraphQLDeprecatedDirective=new GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE],args:{reason:{type:_scalars.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",defaultValue:DEFAULT_DEPRECATION_REASON}}});exports.specifiedDirectives=[GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective]},{"../jsutils/invariant":59,"../utilities/assertValidName":81,"./definition":74,"./scalars":78}],76:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _schema=require("./schema");Object.defineProperty(exports,"GraphQLSchema",{enumerable:!0,get:function(){return _schema.GraphQLSchema}});var _definition=require("./definition");Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _definition.isType}}),Object.defineProperty(exports,"isInputType",{enumerable:!0,get:function(){return _definition.isInputType}}),Object.defineProperty(exports,"isOutputType",{enumerable:!0,get:function(){return _definition.isOutputType}}),Object.defineProperty(exports,"isLeafType",{enumerable:!0,get:function(){return _definition.isLeafType}}),Object.defineProperty(exports,"isCompositeType",{enumerable:!0,get:function(){return _definition.isCompositeType}}),Object.defineProperty(exports,"isAbstractType",{enumerable:!0,get:function(){return _definition.isAbstractType}}),Object.defineProperty(exports,"getNullableType",{enumerable:!0,get:function(){return _definition.getNullableType}}),Object.defineProperty(exports,"getNamedType",{enumerable:!0,get:function(){return _definition.getNamedType}}),Object.defineProperty(exports,"GraphQLScalarType",{enumerable:!0,get:function(){return _definition.GraphQLScalarType}}),Object.defineProperty(exports,"GraphQLObjectType",{enumerable:!0,get:function(){return _definition.GraphQLObjectType}}),Object.defineProperty(exports,"GraphQLInterfaceType",{enumerable:!0,get:function(){return _definition.GraphQLInterfaceType}}),Object.defineProperty(exports,"GraphQLUnionType",{enumerable:!0,get:function(){return _definition.GraphQLUnionType}}),Object.defineProperty(exports,"GraphQLEnumType",{enumerable:!0,get:function(){return _definition.GraphQLEnumType}}),Object.defineProperty(exports,"GraphQLInputObjectType",{enumerable:!0,get:function(){return _definition.GraphQLInputObjectType}}),Object.defineProperty(exports,"GraphQLList",{enumerable:!0,get:function(){return _definition.GraphQLList}}),Object.defineProperty(exports,"GraphQLNonNull",{enumerable:!0,get:function(){return _definition.GraphQLNonNull}});var _directives=require("./directives");Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _directives.DirectiveLocation}}),Object.defineProperty(exports,"GraphQLDirective",{enumerable:!0,get:function(){return _directives.GraphQLDirective}}),Object.defineProperty(exports,"specifiedDirectives",{enumerable:!0,get:function(){return _directives.specifiedDirectives}}),Object.defineProperty(exports,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return _directives.GraphQLIncludeDirective}}),Object.defineProperty(exports,"GraphQLSkipDirective",{enumerable:!0,get:function(){return _directives.GraphQLSkipDirective}}),Object.defineProperty(exports,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return _directives.GraphQLDeprecatedDirective}}),Object.defineProperty(exports,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return _directives.DEFAULT_DEPRECATION_REASON}});var _scalars=require("./scalars");Object.defineProperty(exports,"GraphQLInt",{enumerable:!0,get:function(){return _scalars.GraphQLInt}}),Object.defineProperty(exports,"GraphQLFloat",{enumerable:!0,get:function(){return _scalars.GraphQLFloat}}),Object.defineProperty(exports,"GraphQLString",{enumerable:!0,get:function(){return _scalars.GraphQLString}}),Object.defineProperty(exports,"GraphQLBoolean",{enumerable:!0,get:function(){return _scalars.GraphQLBoolean}}),Object.defineProperty(exports,"GraphQLID",{enumerable:!0,get:function(){return _scalars.GraphQLID}});var _introspection=require("./introspection");Object.defineProperty(exports,"TypeKind",{enumerable:!0,get:function(){return _introspection.TypeKind}}),Object.defineProperty(exports,"__Schema",{enumerable:!0,get:function(){return _introspection.__Schema}}),Object.defineProperty(exports,"__Directive",{enumerable:!0,get:function(){return _introspection.__Directive}}),Object.defineProperty(exports,"__DirectiveLocation",{enumerable:!0,get:function(){return _introspection.__DirectiveLocation}}),Object.defineProperty(exports,"__Type",{enumerable:!0,get:function(){return _introspection.__Type}}),Object.defineProperty(exports,"__Field",{enumerable:!0,get:function(){return _introspection.__Field}}),Object.defineProperty(exports,"__InputValue",{enumerable:!0,get:function(){return _introspection.__InputValue}}),Object.defineProperty(exports,"__EnumValue",{enumerable:!0,get:function(){return _introspection.__EnumValue}}),Object.defineProperty(exports,"__TypeKind",{enumerable:!0,get:function(){return _introspection.__TypeKind}}),Object.defineProperty(exports,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _introspection.SchemaMetaFieldDef}}),Object.defineProperty(exports,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _introspection.TypeMetaFieldDef}}),Object.defineProperty(exports,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _introspection.TypeNameMetaFieldDef}})},{"./definition":74,"./directives":75,"./introspection":77,"./scalars":78,"./schema":79}],77:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TypeNameMetaFieldDef=exports.TypeMetaFieldDef=exports.SchemaMetaFieldDef=exports.__TypeKind=exports.TypeKind=exports.__EnumValue=exports.__InputValue=exports.__Field=exports.__Type=exports.__DirectiveLocation=exports.__Directive=exports.__Schema=void 0;var _isNullish=require("../jsutils/isNullish"),_isNullish2=_interopRequireDefault(_isNullish),_astFromValue=require("../utilities/astFromValue"),_printer=require("../language/printer"),_definition=require("./definition"),_scalars=require("./scalars"),_directives=require("./directives"),__Schema=exports.__Schema=new _definition.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:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))),resolve:function(e){var i=e.getTypeMap();return Object.keys(i).map(function(e){return i[e]})}},queryType:{description:"The type that query operations will be rooted at.",type:new _definition.GraphQLNonNull(__Type),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))),resolve:function(e){return e.getDirectives()}}}}}),__Directive=exports.__Directive=new _definition.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:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},locations:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation)))},args:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),resolve:function(e){return e.args||[]}},onOperation:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.QUERY)!==-1||e.locations.indexOf(_directives.DirectiveLocation.MUTATION)!==-1||e.locations.indexOf(_directives.DirectiveLocation.SUBSCRIPTION)!==-1}},onFragment:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.FRAGMENT_SPREAD)!==-1||e.locations.indexOf(_directives.DirectiveLocation.INLINE_FRAGMENT)!==-1||e.locations.indexOf(_directives.DirectiveLocation.FRAGMENT_DEFINITION)!==-1}},onField:{deprecationReason:"Use `locations`.",type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),resolve:function(e){return e.locations.indexOf(_directives.DirectiveLocation.FIELD)!==-1}}}}}),__DirectiveLocation=exports.__DirectiveLocation=new _definition.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:_directives.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:_directives.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:_directives.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:_directives.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:_directives.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:_directives.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:_directives.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},SCHEMA:{value:_directives.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:_directives.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:_directives.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:_directives.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:_directives.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:_directives.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:_directives.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:_directives.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:_directives.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:_directives.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:_directives.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),__Type=exports.__Type=new _definition.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:new _definition.GraphQLNonNull(__TypeKind),resolve:function(e){if(e instanceof _definition.GraphQLScalarType)return TypeKind.SCALAR;if(e instanceof _definition.GraphQLObjectType)return TypeKind.OBJECT;if(e instanceof _definition.GraphQLInterfaceType)return TypeKind.INTERFACE;if(e instanceof _definition.GraphQLUnionType)return TypeKind.UNION;if(e instanceof _definition.GraphQLEnumType)return TypeKind.ENUM;if(e instanceof _definition.GraphQLInputObjectType)return TypeKind.INPUT_OBJECT;if(e instanceof _definition.GraphQLList)return TypeKind.LIST;if(e instanceof _definition.GraphQLNonNull)return TypeKind.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:_scalars.GraphQLString},description:{type:_scalars.GraphQLString},fields:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)),args:{includeDeprecated:{type:_scalars.GraphQLBoolean,defaultValue:!1}},resolve:function(e,i){var n=i.includeDeprecated;if(e instanceof _definition.GraphQLObjectType||e instanceof _definition.GraphQLInterfaceType){var t=function(){var i=e.getFields(),t=Object.keys(i).map(function(e){return i[e]});return n||(t=t.filter(function(e){return!e.deprecationReason})),{v:t}}();if("object"==typeof t)return t.v}return null}},interfaces:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),resolve:function(e){if(e instanceof _definition.GraphQLObjectType)return e.getInterfaces()}},possibleTypes:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),resolve:function(e,i,n,t){var a=t.schema;if(e instanceof _definition.GraphQLInterfaceType||e instanceof _definition.GraphQLUnionType)return a.getPossibleTypes(e)}},enumValues:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:_scalars.GraphQLBoolean,defaultValue:!1}},resolve:function(e,i){var n=i.includeDeprecated;if(e instanceof _definition.GraphQLEnumType){var t=e.getValues();return n||(t=t.filter(function(e){return!e.deprecationReason})),t}}},inputFields:{type:new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)),resolve:function(e){if(e instanceof _definition.GraphQLInputObjectType){var i=function(){var i=e.getFields();return{v:Object.keys(i).map(function(e){return i[e]})}}();if("object"==typeof i)return i.v}}},ofType:{type:__Type}}}}),__Field=exports.__Field=new _definition.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:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},args:{type:new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),resolve:function(e){return e.args||[]}},type:{type:new _definition.GraphQLNonNull(__Type)},isDeprecated:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean)},deprecationReason:{type:_scalars.GraphQLString}}}}),__InputValue=exports.__InputValue=new _definition.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:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},type:{type:new _definition.GraphQLNonNull(__Type)},defaultValue:{type:_scalars.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){return(0,_isNullish2.default)(e.defaultValue)?null:(0,_printer.print)((0,_astFromValue.astFromValue)(e.defaultValue,e.type))}}}}}),__EnumValue=exports.__EnumValue=new _definition.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:new _definition.GraphQLNonNull(_scalars.GraphQLString)},description:{type:_scalars.GraphQLString},isDeprecated:{type:new _definition.GraphQLNonNull(_scalars.GraphQLBoolean)},deprecationReason:{type:_scalars.GraphQLString}}}}),TypeKind=exports.TypeKind={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},__TypeKind=exports.__TypeKind=new _definition.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});exports.SchemaMetaFieldDef={name:"__schema",type:new _definition.GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",args:[],resolve:function(e,i,n,t){var a=t.schema;return a}},exports.TypeMetaFieldDef={name:"__type",type:__Type,description:"Request the type information of a single type.",args:[{name:"name",type:new _definition.GraphQLNonNull(_scalars.GraphQLString)}],resolve:function(e,i,n,t){var a=i.name,r=t.schema;return r.getType(a)}},exports.TypeNameMetaFieldDef={name:"__typename",type:new _definition.GraphQLNonNull(_scalars.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,i,n,t){var a=t.parentType;return a.name}}},{"../jsutils/isNullish":61,"../language/printer":71,"../utilities/astFromValue":82,"./definition":74,"./directives":75,"./scalars":78}],78:[function(require,module,exports){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r.default=e,r}function coerceInt(e){if(""===e)throw new TypeError("Int cannot represent non 32-bit signed integer value: (empty string)");var r=Number(e);if(r===r&&r<=MAX_INT&&r>=MIN_INT)return(r<0?Math.ceil:Math.floor)(r);throw new TypeError("Int cannot represent non 32-bit signed integer value: "+String(e))}function coerceFloat(e){if(""===e)throw new TypeError("Float cannot represent non numeric value: (empty string)");var r=Number(e);if(r===r)return r;throw new TypeError("Float cannot represent non numeric value: "+String(e))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLID=exports.GraphQLBoolean=exports.GraphQLString=exports.GraphQLFloat=exports.GraphQLInt=void 0;var _definition=require("./definition"),_kinds=require("../language/kinds"),Kind=_interopRequireWildcard(_kinds),MAX_INT=2147483647,MIN_INT=-2147483648;exports.GraphQLInt=new _definition.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:coerceInt,parseValue:coerceInt,parseLiteral:function(e){if(e.kind===Kind.INT){var r=parseInt(e.value,10);if(r<=MAX_INT&&r>=MIN_INT)return r}return null}}),exports.GraphQLFloat=new _definition.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:coerceFloat,parseValue:coerceFloat,parseLiteral:function(e){return e.kind===Kind.FLOAT||e.kind===Kind.INT?parseFloat(e.value):null}}),exports.GraphQLString=new _definition.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:String,parseValue:String,parseLiteral:function(e){return e.kind===Kind.STRING?e.value:null}}),exports.GraphQLBoolean=new _definition.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===Kind.BOOLEAN?e.value:null}}),exports.GraphQLID=new _definition.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:String,parseValue:String,parseLiteral:function(e){return e.kind===Kind.STRING||e.kind===Kind.INT?e.value:null}})},{"../language/kinds":67,"./definition":74}],79:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function typeMapReducer(e,t){if(!t)return e;if(t instanceof _definition.GraphQLList||t instanceof _definition.GraphQLNonNull)return typeMapReducer(e,t.ofType);if(e[t.name])return(0,_invariant2.default)(e[t.name]===t,"Schema must contain unique named types but contains multiple "+('types named "'+t.name+'".')),e;e[t.name]=t;var i=e;return t instanceof _definition.GraphQLUnionType&&(i=t.getTypes().reduce(typeMapReducer,i)),t instanceof _definition.GraphQLObjectType&&(i=t.getInterfaces().reduce(typeMapReducer,i)),(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType)&&!function(){var e=t.getFields();Object.keys(e).forEach(function(t){var n=e[t];if(n.args){var r=n.args.map(function(e){return e.type});i=r.reduce(typeMapReducer,i)}i=typeMapReducer(i,n.type)})}(),t instanceof _definition.GraphQLInputObjectType&&!function(){var e=t.getFields();Object.keys(e).forEach(function(t){var n=e[t];i=typeMapReducer(i,n.type)})}(),i}function assertObjectImplementsInterface(e,t,i){var n=t.getFields(),r=i.getFields();Object.keys(r).forEach(function(a){var p=n[a],o=r[a];(0,_invariant2.default)(p,'"'+i.name+'" expects field "'+a+'" but "'+t.name+'" does not provide it.'),(0,_invariant2.default)((0,_typeComparators.isTypeSubTypeOf)(e,p.type,o.type),i.name+"."+a+' expects type "'+String(o.type)+'" but '+(t.name+"."+a+' provides type "'+String(p.type)+'".')),o.args.forEach(function(e){var n=e.name,r=(0,_find2.default)(p.args,function(e){return e.name===n});(0,_invariant2.default)(r,i.name+"."+a+' expects argument "'+n+'" but '+(t.name+"."+a+" does not provide it.")),(0,_invariant2.default)((0,_typeComparators.isEqualType)(e.type,r.type),i.name+"."+a+"("+n+":) expects type "+('"'+String(e.type)+'" but ')+(t.name+"."+a+"("+n+":) provides type ")+('"'+String(r.type)+'".'))}),p.args.forEach(function(e){var n=e.name,r=(0,_find2.default)(o.args,function(e){return e.name===n});r||(0,_invariant2.default)(!(e.type instanceof _definition.GraphQLNonNull),t.name+"."+a+"("+n+":) is of required type "+('"'+String(e.type)+'" but is not also provided by the ')+("interface "+i.name+"."+a+"."))})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLSchema=void 0;var _definition=require("./definition"),_directives=require("./directives"),_introspection=require("./introspection"),_find=require("../jsutils/find"),_find2=_interopRequireDefault(_find),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_typeComparators=require("../utilities/typeComparators");exports.GraphQLSchema=function(){function e(t){var i=this;_classCallCheck(this,e),(0,_invariant2.default)("object"==typeof t,"Must provide configuration object."),(0,_invariant2.default)(t.query instanceof _definition.GraphQLObjectType,"Schema query must be Object Type but got: "+String(t.query)+"."),this._queryType=t.query,(0,_invariant2.default)(!t.mutation||t.mutation instanceof _definition.GraphQLObjectType,"Schema mutation must be Object Type if provided but got: "+String(t.mutation)+"."),this._mutationType=t.mutation,(0,_invariant2.default)(!t.subscription||t.subscription instanceof _definition.GraphQLObjectType,"Schema subscription must be Object Type if provided but got: "+String(t.subscription)+"."),this._subscriptionType=t.subscription,(0,_invariant2.default)(!t.types||Array.isArray(t.types),"Schema types must be Array if provided but got: "+String(t.types)+"."),(0,_invariant2.default)(!t.directives||Array.isArray(t.directives)&&t.directives.every(function(e){return e instanceof _directives.GraphQLDirective}),"Schema directives must be Array if provided but got: "+String(t.directives)+"."),this._directives=t.directives||_directives.specifiedDirectives;var n=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),_introspection.__Schema],r=t.types;r&&(n=n.concat(r)),this._typeMap=n.reduce(typeMapReducer,Object.create(null)),this._implementations=Object.create(null),Object.keys(this._typeMap).forEach(function(e){var t=i._typeMap[e];t instanceof _definition.GraphQLObjectType&&t.getInterfaces().forEach(function(e){var n=i._implementations[e.name];n?n.push(t):i._implementations[e.name]=[t]})}),Object.keys(this._typeMap).forEach(function(e){var t=i._typeMap[e];t instanceof _definition.GraphQLObjectType&&t.getInterfaces().forEach(function(e){return assertObjectImplementsInterface(i,t,e)})})}return e.prototype.getQueryType=function(){return this._queryType},e.prototype.getMutationType=function(){return this._mutationType},e.prototype.getSubscriptionType=function(){return this._subscriptionType},e.prototype.getTypeMap=function(){return this._typeMap},e.prototype.getType=function(e){return this.getTypeMap()[e]},e.prototype.getPossibleTypes=function(e){return e instanceof _definition.GraphQLUnionType?e.getTypes():((0,_invariant2.default)(e instanceof _definition.GraphQLInterfaceType),this._implementations[e.name])},e.prototype.isPossibleType=function(e,t){var i=this._possibleTypeMap;if(i||(this._possibleTypeMap=i=Object.create(null)),!i[e.name]){var n=this.getPossibleTypes(e);(0,_invariant2.default)(Array.isArray(n),"Could not find possible implementing types for "+e.name+" in schema. Check that schema.types is defined and is an array of all possible types in the schema."),i[e.name]=n.reduce(function(e,t){return e[t.name]=!0,e},Object.create(null))}return Boolean(i[e.name][t.name])},e.prototype.getDirectives=function(){return this._directives},e.prototype.getDirective=function(e){return(0,_find2.default)(this.getDirectives(),function(t){return t.name===e})},e}()},{"../jsutils/find":58,"../jsutils/invariant":59,"../utilities/typeComparators":95,"./definition":74,"./directives":75,"./introspection":77}],80:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function"); }function getFieldDef(e,t,i){var n=i.name.value;return n===_introspection.SchemaMetaFieldDef.name&&e.getQueryType()===t?_introspection.SchemaMetaFieldDef:n===_introspection.TypeMetaFieldDef.name&&e.getQueryType()===t?_introspection.TypeMetaFieldDef:n===_introspection.TypeNameMetaFieldDef.name&&(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType||t instanceof _definition.GraphQLUnionType)?_introspection.TypeNameMetaFieldDef:t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType?t.getFields()[n]:void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TypeInfo=void 0;var _kinds=require("../language/kinds"),Kind=_interopRequireWildcard(_kinds),_definition=require("../type/definition"),_introspection=require("../type/introspection"),_typeFromAST=require("./typeFromAST"),_find=require("../jsutils/find"),_find2=_interopRequireDefault(_find);exports.TypeInfo=function(){function e(t,i){_classCallCheck(this,e),this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._directive=null,this._argument=null,this._getFieldDef=i||getFieldDef}return e.prototype.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},e.prototype.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},e.prototype.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},e.prototype.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},e.prototype.getDirective=function(){return this._directive},e.prototype.getArgument=function(){return this._argument},e.prototype.enter=function(e){var t=this._schema;switch(e.kind){case Kind.SELECTION_SET:var i=(0,_definition.getNamedType)(this.getType()),n=void 0;(0,_definition.isCompositeType)(i)&&(n=i),this._parentTypeStack.push(n);break;case Kind.FIELD:var a=this.getParentType(),p=void 0;a&&(p=this._getFieldDef(t,a,e)),this._fieldDefStack.push(p),this._typeStack.push(p&&p.type);break;case Kind.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case Kind.OPERATION_DEFINITION:var r=void 0;"query"===e.operation?r=t.getQueryType():"mutation"===e.operation?r=t.getMutationType():"subscription"===e.operation&&(r=t.getSubscriptionType()),this._typeStack.push(r);break;case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:var s=e.typeCondition,o=s?(0,_typeFromAST.typeFromAST)(t,s):this.getType();this._typeStack.push(o);break;case Kind.VARIABLE_DEFINITION:var c=(0,_typeFromAST.typeFromAST)(t,e.type);this._inputTypeStack.push(c);break;case Kind.ARGUMENT:var u=void 0,_=void 0,d=this.getDirective()||this.getFieldDef();d&&(u=(0,_find2.default)(d.args,function(t){return t.name===e.name.value}),u&&(_=u.type)),this._argument=u,this._inputTypeStack.push(_);break;case Kind.LIST:var f=(0,_definition.getNullableType)(this.getInputType());this._inputTypeStack.push(f instanceof _definition.GraphQLList?f.ofType:void 0);break;case Kind.OBJECT_FIELD:var h=(0,_definition.getNamedType)(this.getInputType()),y=void 0;if(h instanceof _definition.GraphQLInputObjectType){var T=h.getFields()[e.name.value];y=T?T.type:void 0}this._inputTypeStack.push(y)}},e.prototype.leave=function(e){switch(e.kind){case Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Kind.DIRECTIVE:this._directive=null;break;case Kind.OPERATION_DEFINITION:case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Kind.ARGUMENT:this._argument=null,this._inputTypeStack.pop();break;case Kind.LIST:case Kind.OBJECT_FIELD:this._inputTypeStack.pop()}},e}()},{"../jsutils/find":58,"../language/kinds":67,"../type/definition":74,"../type/introspection":77,"./typeFromAST":96}],81:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assertValidName(e){(0,_invariant2.default)(NAME_RX.test(e),'Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'+e+'" does not.')}Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertValidName=assertValidName;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/},{"../jsutils/invariant":59}],82:[function(require,module,exports){"use strict";function _interopRequireDefault(i){return i&&i.__esModule?i:{default:i}}function astFromValue(i,e){var n=i;if(e instanceof _definition.GraphQLNonNull){var r=astFromValue(n,e.ofType);return r&&r.kind===_kinds.NULL?null:r}if(null===n)return{kind:_kinds.NULL};if((0,_isInvalid2.default)(n))return null;if(e instanceof _definition.GraphQLList){var t=function(){var i=e.ofType;if((0,_iterall.isCollection)(n)){var r=function(){var e=[];return(0,_iterall.forEach)(n,function(n){var r=astFromValue(n,i);r&&e.push(r)}),{v:{v:{kind:_kinds.LIST,values:e}}}}();if("object"==typeof r)return r.v}return{v:astFromValue(n,i)}}();if("object"==typeof t)return t.v}if(e instanceof _definition.GraphQLInputObjectType){var a=function(){if(null===n||"object"!=typeof n)return{v:null};var i=e.getFields(),r=[];return Object.keys(i).forEach(function(e){var t=i[e].type,a=astFromValue(n[e],t);a&&r.push({kind:_kinds.OBJECT_FIELD,name:{kind:_kinds.NAME,value:e},value:a})}),{v:{kind:_kinds.OBJECT,fields:r}}}();if("object"==typeof a)return a.v}(0,_invariant2.default)(e instanceof _definition.GraphQLScalarType||e instanceof _definition.GraphQLEnumType,"Must provide Input Type, cannot use: "+String(e));var u=e.serialize(n);if((0,_isNullish2.default)(u))return null;if("boolean"==typeof u)return{kind:_kinds.BOOLEAN,value:u};if("number"==typeof u){var l=String(u);return/^[0-9]+$/.test(l)?{kind:_kinds.INT,value:l}:{kind:_kinds.FLOAT,value:l}}if("string"==typeof u)return e instanceof _definition.GraphQLEnumType?{kind:_kinds.ENUM,value:u}:e===_scalars.GraphQLID&&/^[0-9]+$/.test(u)?{kind:_kinds.INT,value:u}:{kind:_kinds.STRING,value:JSON.stringify(u).slice(1,-1)};throw new TypeError("Cannot convert value to AST: "+String(u))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.astFromValue=astFromValue;var _iterall=require("iterall"),_invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_isNullish=require("../jsutils/isNullish"),_isNullish2=_interopRequireDefault(_isNullish),_isInvalid=require("../jsutils/isInvalid"),_isInvalid2=_interopRequireDefault(_isInvalid),_kinds=require("../language/kinds"),_definition=require("../type/definition"),_scalars=require("../type/scalars")},{"../jsutils/invariant":59,"../jsutils/isInvalid":60,"../jsutils/isNullish":61,"../language/kinds":67,"../type/definition":74,"../type/scalars":78,iterall:126}],83:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildWrappedType(e,n){if(n.kind===_kinds.LIST_TYPE)return new _definition.GraphQLList(buildWrappedType(e,n.type));if(n.kind===_kinds.NON_NULL_TYPE){var i=buildWrappedType(e,n.type);return(0,_invariant2.default)(!(i instanceof _definition.GraphQLNonNull),"No nesting nonnull."),new _definition.GraphQLNonNull(i)}return e}function getNamedTypeNode(e){for(var n=e;n.kind===_kinds.LIST_TYPE||n.kind===_kinds.NON_NULL_TYPE;)n=n.type;return n}function buildASTSchema(e){function n(e){return new _directives.GraphQLDirective({name:e.name.value,description:getDescription(e),locations:e.locations.map(function(e){return e.value}),args:e.arguments&&f(e.arguments)})}function i(e){var n=c(e.name.value);return(0,_invariant2.default)(n instanceof _definition.GraphQLObjectType,"AST must provide object type."),n}function r(e){var n=getNamedTypeNode(e).name.value,i=c(n);return buildWrappedType(i,e)}function t(e){var n=r(e);return(0,_invariant2.default)((0,_definition.isInputType)(n),"Expected Input type."),n}function a(e){var n=r(e);return(0,_invariant2.default)((0,_definition.isOutputType)(n),"Expected Output type."),n}function o(e){var n=r(e);return(0,_invariant2.default)(n instanceof _definition.GraphQLObjectType,"Expected Object type."),n}function u(e){var n=r(e);return(0,_invariant2.default)(n instanceof _definition.GraphQLInterfaceType,"Expected Object type."),n}function c(e){if(L[e])return L[e];if(!I[e])throw new Error('Type "'+e+'" not found in document.');var n=s(I[e]);if(!n)throw new Error('Nothing constructed for "'+e+'".');return L[e]=n,n}function s(e){if(!e)throw new Error("def must be defined");switch(e.kind){case _kinds.OBJECT_TYPE_DEFINITION:return p(e);case _kinds.INTERFACE_TYPE_DEFINITION:return l(e);case _kinds.ENUM_TYPE_DEFINITION:return v(e);case _kinds.UNION_TYPE_DEFINITION:return m(e);case _kinds.SCALAR_TYPE_DEFINITION:return T(e);case _kinds.INPUT_OBJECT_TYPE_DEFINITION:return y(e);default:throw new Error('Type kind "'+e.kind+'" not supported.')}}function p(e){var n=e.name.value;return new _definition.GraphQLObjectType({name:n,description:getDescription(e),fields:function(){return d(e)},interfaces:function(){return _(e)}})}function d(e){return(0,_keyValMap2.default)(e.fields,function(e){return e.name.value},function(e){return{type:a(e.type),description:getDescription(e),args:f(e.arguments),deprecationReason:getDeprecationReason(e.directives)}})}function _(e){return e.interfaces&&e.interfaces.map(function(e){return u(e)})}function f(e){return(0,_keyValMap2.default)(e,function(e){return e.name.value},function(e){var n=t(e.type);return{type:n,description:getDescription(e),defaultValue:(0,_valueFromAST.valueFromAST)(e.defaultValue,n)}})}function l(e){var n=e.name.value;return new _definition.GraphQLInterfaceType({name:n,description:getDescription(e),fields:function(){return d(e)},resolveType:cannotExecuteSchema})}function v(e){var n=new _definition.GraphQLEnumType({name:e.name.value,description:getDescription(e),values:(0,_keyValMap2.default)(e.values,function(e){return e.name.value},function(e){return{description:getDescription(e),deprecationReason:getDeprecationReason(e.directives)}})});return n}function m(e){return new _definition.GraphQLUnionType({name:e.name.value,description:getDescription(e),types:e.types.map(function(e){return o(e)}),resolveType:cannotExecuteSchema})}function T(e){return new _definition.GraphQLScalarType({name:e.name.value,description:getDescription(e),serialize:function(){return null},parseValue:function(){return!1},parseLiteral:function(){return!1}})}function y(e){return new _definition.GraphQLInputObjectType({name:e.name.value,description:getDescription(e),fields:function(){return f(e.fields)}})}if(!e||e.kind!==_kinds.DOCUMENT)throw new Error("Must provide a document ast.");for(var h=void 0,E=[],I=Object.create(null),N=[],D=0;D1&&void 0!==arguments[1]?arguments[1]:"";return 0===n.length?"":n.every(function(n){return!n.description})?"("+n.map(printInputValue).join(", ")+")":"(\n"+n.map(function(n,i){return printDescription(n," "+e,!i)+" "+e+printInputValue(n)}).join("\n")+"\n"+e+")"}function printInputValue(n){var e=n.name+": "+String(n.type);return(0,_isInvalid2.default)(n.defaultValue)||(e+=" = "+(0,_printer.print)((0,_astFromValue.astFromValue)(n.defaultValue,n.type))),e}function printDirective(n){return printDescription(n)+"directive @"+n.name+printArgs(n.args)+" on "+n.locations.join(" | ")}function printDeprecated(n){var e=n.deprecationReason;return(0,_isNullish2.default)(e)?"":""===e||e===_directives.DEFAULT_DEPRECATION_REASON?" @deprecated":" @deprecated(reason: "+(0,_printer.print)((0,_astFromValue.astFromValue)(e,_scalars.GraphQLString))+")"}function printDescription(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n.description)return"";for(var t=n.description.split("\n"),r=e&&!i?"\n":"",a=0;a0&&e.reportError(new _error.GraphQLError(badValueMessage(r.name.value,a.type,(0,_printer.print)(r.value),t),[r.value]))}return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.badValueMessage=badValueMessage,exports.ArgumentsOfCorrectType=ArgumentsOfCorrectType;var _error=require("../../error"),_printer=require("../../language/printer"),_isValidLiteralValue=require("../../utilities/isValidLiteralValue")},{"../../error":50,"../../language/printer":71,"../../utilities/isValidLiteralValue":92}],100:[function(require,module,exports){"use strict";function defaultForNonNullArgMessage(e,r,a){return'Variable "$'+e+'" of type "'+String(r)+'" is required and will not use the default value. '+('Perhaps you meant to use type "'+String(a)+'".')}function badValueForDefaultArgMessage(e,r,a,t){var i=t?"\n"+t.join("\n"):"";return'Variable "$'+e+'" of type "'+String(r)+'" has invalid '+("default value "+a+"."+i)}function DefaultValuesOfCorrectType(e){return{VariableDefinition:function(r){var a=r.variable.name.value,t=r.defaultValue,i=e.getInputType();if(i instanceof _definition.GraphQLNonNull&&t&&e.reportError(new _error.GraphQLError(defaultForNonNullArgMessage(a,i,i.ofType),[t])),i&&t){var l=(0,_isValidLiteralValue.isValidLiteralValue)(i,t);l&&l.length>0&&e.reportError(new _error.GraphQLError(badValueForDefaultArgMessage(a,i,(0,_printer.print)(t),l),[t]))}return!1},SelectionSet:function(){return!1},FragmentDefinition:function(){return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultForNonNullArgMessage=defaultForNonNullArgMessage,exports.badValueForDefaultArgMessage=badValueForDefaultArgMessage,exports.DefaultValuesOfCorrectType=DefaultValuesOfCorrectType;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_isValidLiteralValue=require("../../utilities/isValidLiteralValue")},{"../../error":50,"../../language/printer":71,"../../type/definition":74,"../../utilities/isValidLiteralValue":92}],101:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function undefinedFieldMessage(e,t,n,i){var r='Cannot query field "'+e+'" on type "'+t+'".';if(0!==n.length){var s=(0,_quotedOrList2.default)(n);r+=" Did you mean to use an inline fragment on "+s+"?"}else 0!==i.length&&(r+=" Did you mean "+(0,_quotedOrList2.default)(i)+"?");return r}function FieldsOnCorrectType(e){return{Field:function(t){var n=e.getParentType();if(n){var i=e.getFieldDef();if(!i){var r=e.getSchema(),s=t.name.value,u=getSuggestedTypeNames(r,n,s),o=0!==u.length?[]:getSuggestedFieldNames(r,n,s);e.reportError(new _error.GraphQLError(undefinedFieldMessage(s,n.name,u,o),[t]))}}}}}function getSuggestedTypeNames(e,t,n){if(t instanceof _definition.GraphQLInterfaceType||t instanceof _definition.GraphQLUnionType){var i=function(){var i=[],r=Object.create(null);e.getPossibleTypes(t).forEach(function(e){e.getFields()[n]&&(i.push(e.name),e.getInterfaces().forEach(function(e){e.getFields()[n]&&(r[e.name]=(r[e.name]||0)+1)}))});var s=Object.keys(r).sort(function(e,t){return r[t]-r[e]});return{v:s.concat(i)}}();if("object"==typeof i)return i.v}return[]}function getSuggestedFieldNames(e,t,n){if(t instanceof _definition.GraphQLObjectType||t instanceof _definition.GraphQLInterfaceType){var i=Object.keys(t.getFields());return(0,_suggestionList2.default)(n,i)}return[]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.undefinedFieldMessage=undefinedFieldMessage,exports.FieldsOnCorrectType=FieldsOnCorrectType;var _error=require("../../error"),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList),_definition=require("../../type/definition")},{"../../error":50,"../../jsutils/quotedOrList":64,"../../jsutils/suggestionList":65,"../../type/definition":74}],102:[function(require,module,exports){"use strict";function inlineFragmentOnNonCompositeErrorMessage(e){return'Fragment cannot condition on non composite type "'+String(e)+'".'}function fragmentOnNonCompositeErrorMessage(e,n){return'Fragment "'+e+'" cannot condition on non composite '+('type "'+String(n)+'".')}function FragmentsOnCompositeTypes(e){return{InlineFragment:function(n){var r=e.getType();n.typeCondition&&r&&!(0,_definition.isCompositeType)(r)&&e.reportError(new _error.GraphQLError(inlineFragmentOnNonCompositeErrorMessage((0,_printer.print)(n.typeCondition)),[n.typeCondition]))},FragmentDefinition:function(n){var r=e.getType();r&&!(0,_definition.isCompositeType)(r)&&e.reportError(new _error.GraphQLError(fragmentOnNonCompositeErrorMessage(n.name.value,(0,_printer.print)(n.typeCondition)),[n.typeCondition]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.inlineFragmentOnNonCompositeErrorMessage=inlineFragmentOnNonCompositeErrorMessage,exports.fragmentOnNonCompositeErrorMessage=fragmentOnNonCompositeErrorMessage,exports.FragmentsOnCompositeTypes=FragmentsOnCompositeTypes;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition")},{"../../error":50,"../../language/printer":71,"../../type/definition":74}],103:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownArgMessage(e,n,r,t){var i='Unknown argument "'+e+'" on field "'+n+'" of '+('type "'+String(r)+'".');return t.length&&(i+=" Did you mean "+(0,_quotedOrList2.default)(t)+"?"),i}function unknownDirectiveArgMessage(e,n,r){var t='Unknown argument "'+e+'" on directive "@'+n+'".';return r.length&&(t+=" Did you mean "+(0,_quotedOrList2.default)(r)+"?"),t}function KnownArgumentNames(e){return{Argument:function(n,r,t,i,u){var a=u[u.length-1];if(a.kind===_kinds.FIELD){var s=e.getFieldDef();if(s){var o=(0,_find2.default)(s.args,function(e){return e.name===n.name.value});if(!o){var g=e.getParentType();(0,_invariant2.default)(g),e.reportError(new _error.GraphQLError(unknownArgMessage(n.name.value,s.name,g.name,(0,_suggestionList2.default)(n.name.value,s.args.map(function(e){return e.name}))),[n]))}}}else if(a.kind===_kinds.DIRECTIVE){var f=e.getDirective();if(f){var d=(0,_find2.default)(f.args,function(e){return e.name===n.name.value});d||e.reportError(new _error.GraphQLError(unknownDirectiveArgMessage(n.name.value,f.name,(0,_suggestionList2.default)(n.name.value,f.args.map(function(e){return e.name}))),[n]))}}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownArgMessage=unknownArgMessage,exports.unknownDirectiveArgMessage=unknownDirectiveArgMessage,exports.KnownArgumentNames=KnownArgumentNames;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_invariant=require("../../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList),_kinds=require("../../language/kinds")},{"../../error":50,"../../jsutils/find":58,"../../jsutils/invariant":59,"../../jsutils/quotedOrList":64,"../../jsutils/suggestionList":65,"../../language/kinds":67}],104:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownDirectiveMessage(e){return'Unknown directive "'+e+'".'}function misplacedDirectiveMessage(e,i){return'Directive "'+e+'" may not be used on '+i+"."}function KnownDirectives(e){return{Directive:function(i,r,t,n,c){var s=(0,_find2.default)(e.getSchema().getDirectives(),function(e){return e.name===i.name.value});if(!s)return void e.reportError(new _error.GraphQLError(unknownDirectiveMessage(i.name.value),[i]));var o=getDirectiveLocationForASTPath(c);o?s.locations.indexOf(o)===-1&&e.reportError(new _error.GraphQLError(misplacedDirectiveMessage(i.name.value,o),[i])):e.reportError(new _error.GraphQLError(misplacedDirectiveMessage(i.name.value,i.type),[i])); }}}function getDirectiveLocationForASTPath(e){var i=e[e.length-1];switch(i.kind){case _kinds.OPERATION_DEFINITION:switch(i.operation){case"query":return _directives.DirectiveLocation.QUERY;case"mutation":return _directives.DirectiveLocation.MUTATION;case"subscription":return _directives.DirectiveLocation.SUBSCRIPTION}break;case _kinds.FIELD:return _directives.DirectiveLocation.FIELD;case _kinds.FRAGMENT_SPREAD:return _directives.DirectiveLocation.FRAGMENT_SPREAD;case _kinds.INLINE_FRAGMENT:return _directives.DirectiveLocation.INLINE_FRAGMENT;case _kinds.FRAGMENT_DEFINITION:return _directives.DirectiveLocation.FRAGMENT_DEFINITION;case _kinds.SCHEMA_DEFINITION:return _directives.DirectiveLocation.SCHEMA;case _kinds.SCALAR_TYPE_DEFINITION:return _directives.DirectiveLocation.SCALAR;case _kinds.OBJECT_TYPE_DEFINITION:return _directives.DirectiveLocation.OBJECT;case _kinds.FIELD_DEFINITION:return _directives.DirectiveLocation.FIELD_DEFINITION;case _kinds.INTERFACE_TYPE_DEFINITION:return _directives.DirectiveLocation.INTERFACE;case _kinds.UNION_TYPE_DEFINITION:return _directives.DirectiveLocation.UNION;case _kinds.ENUM_TYPE_DEFINITION:return _directives.DirectiveLocation.ENUM;case _kinds.ENUM_VALUE_DEFINITION:return _directives.DirectiveLocation.ENUM_VALUE;case _kinds.INPUT_OBJECT_TYPE_DEFINITION:return _directives.DirectiveLocation.INPUT_OBJECT;case _kinds.INPUT_VALUE_DEFINITION:var r=e[e.length-3];return r.kind===_kinds.INPUT_OBJECT_TYPE_DEFINITION?_directives.DirectiveLocation.INPUT_FIELD_DEFINITION:_directives.DirectiveLocation.ARGUMENT_DEFINITION}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownDirectiveMessage=unknownDirectiveMessage,exports.misplacedDirectiveMessage=misplacedDirectiveMessage,exports.KnownDirectives=KnownDirectives;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_kinds=require("../../language/kinds"),_directives=require("../../type/directives")},{"../../error":50,"../../jsutils/find":58,"../../language/kinds":67,"../../type/directives":75}],105:[function(require,module,exports){"use strict";function unknownFragmentMessage(e){return'Unknown fragment "'+e+'".'}function KnownFragmentNames(e){return{FragmentSpread:function(n){var r=n.name.value,a=e.getFragment(r);a||e.reportError(new _error.GraphQLError(unknownFragmentMessage(r),[n.name]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownFragmentMessage=unknownFragmentMessage,exports.KnownFragmentNames=KnownFragmentNames;var _error=require("../../error")},{"../../error":50}],106:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unknownTypeMessage(e,n){var t='Unknown type "'+String(e)+'".';return n.length&&(t+=" Did you mean "+(0,_quotedOrList2.default)(n)+"?"),t}function KnownTypeNames(e){return{ObjectTypeDefinition:function(){return!1},InterfaceTypeDefinition:function(){return!1},UnionTypeDefinition:function(){return!1},InputObjectTypeDefinition:function(){return!1},NamedType:function(n){var t=e.getSchema(),r=n.name.value,i=t.getType(r);i||e.reportError(new _error.GraphQLError(unknownTypeMessage(r,(0,_suggestionList2.default)(r,Object.keys(t.getTypeMap()))),[n]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.unknownTypeMessage=unknownTypeMessage,exports.KnownTypeNames=KnownTypeNames;var _error=require("../../error"),_suggestionList=require("../../jsutils/suggestionList"),_suggestionList2=_interopRequireDefault(_suggestionList),_quotedOrList=require("../../jsutils/quotedOrList"),_quotedOrList2=_interopRequireDefault(_quotedOrList)},{"../../error":50,"../../jsutils/quotedOrList":64,"../../jsutils/suggestionList":65}],107:[function(require,module,exports){"use strict";function anonOperationNotAloneMessage(){return"This anonymous operation must be the only defined operation."}function LoneAnonymousOperation(n){var e=0;return{Document:function(n){e=n.definitions.filter(function(n){return n.kind===_kinds.OPERATION_DEFINITION}).length},OperationDefinition:function(o){!o.name&&e>1&&n.reportError(new _error.GraphQLError(anonOperationNotAloneMessage(),[o]))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.anonOperationNotAloneMessage=anonOperationNotAloneMessage,exports.LoneAnonymousOperation=LoneAnonymousOperation;var _error=require("../../error"),_kinds=require("../../language/kinds")},{"../../error":50,"../../language/kinds":67}],108:[function(require,module,exports){"use strict";function cycleErrorMessage(e,r){var n=r.length?" via "+r.join(", "):"";return'Cannot spread fragment "'+e+'" within itself'+n+"."}function NoFragmentCycles(e){function r(o){var i=o.name.value;n[i]=!0;var c=e.getFragmentSpreads(o.selectionSet);if(0!==c.length){a[i]=t.length;for(var l=0;l1)for(var l=0;l0)return[[n,e.map(function(e){var n=e[0];return n})],e.reduce(function(e,n){var t=n[1];return e.concat(t)},[t]),e.reduce(function(e,n){var t=n[2];return e.concat(t)},[i])]}function _pairSetAdd(e,n,t,i){var r=e[n];r||(r=Object.create(null),e[n]=r),r[t]=i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fieldsConflictMessage=fieldsConflictMessage,exports.OverlappingFieldsCanBeMerged=OverlappingFieldsCanBeMerged;var _error=require("../../error"),_find=require("../../jsutils/find"),_find2=_interopRequireDefault(_find),_kinds=require("../../language/kinds"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_typeFromAST=require("../../utilities/typeFromAST"),PairSet=function(){function e(){_classCallCheck(this,e),this._data=Object.create(null)}return e.prototype.has=function(e,n,t){var i=this._data[e],r=i&&i[n];return void 0!==r&&(t!==!1||r===!1)},e.prototype.add=function(e,n,t){_pairSetAdd(this._data,e,n,t),_pairSetAdd(this._data,n,e,t)},e}()},{"../../error":50,"../../jsutils/find":58,"../../language/kinds":67,"../../language/printer":71,"../../type/definition":74,"../../utilities/typeFromAST":96}],113:[function(require,module,exports){"use strict";function typeIncompatibleSpreadMessage(e,r,t){return'Fragment "'+e+'" cannot be spread here as objects of '+('type "'+String(r)+'" can never be of type "'+String(t)+'".')}function typeIncompatibleAnonSpreadMessage(e,r){return"Fragment cannot be spread here as objects of "+('type "'+String(e)+'" can never be of type "'+String(r)+'".')}function PossibleFragmentSpreads(e){return{InlineFragment:function(r){var t=e.getType(),a=e.getParentType();t&&a&&!(0,_typeComparators.doTypesOverlap)(e.getSchema(),t,a)&&e.reportError(new _error.GraphQLError(typeIncompatibleAnonSpreadMessage(a,t),[r]))},FragmentSpread:function(r){var t=r.name.value,a=getFragmentType(e,t),p=e.getParentType();a&&p&&!(0,_typeComparators.doTypesOverlap)(e.getSchema(),a,p)&&e.reportError(new _error.GraphQLError(typeIncompatibleSpreadMessage(t,p,a),[r]))}}}function getFragmentType(e,r){var t=e.getFragment(r);return t&&(0,_typeFromAST.typeFromAST)(e.getSchema(),t.typeCondition)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.typeIncompatibleSpreadMessage=typeIncompatibleSpreadMessage,exports.typeIncompatibleAnonSpreadMessage=typeIncompatibleAnonSpreadMessage,exports.PossibleFragmentSpreads=PossibleFragmentSpreads;var _error=require("../../error"),_typeComparators=require("../../utilities/typeComparators"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":50,"../../utilities/typeComparators":95,"../../utilities/typeFromAST":96}],114:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function missingFieldArgMessage(e,r,i){return'Field "'+e+'" argument "'+r+'" of type '+('"'+String(i)+'" is required but not provided.')}function missingDirectiveArgMessage(e,r,i){return'Directive "@'+e+'" argument "'+r+'" of type '+('"'+String(i)+'" is required but not provided.')}function ProvidedNonNullArguments(e){return{Field:{leave:function(r){var i=e.getFieldDef();if(!i)return!1;var n=r.arguments||[],t=(0,_keyMap2.default)(n,function(e){return e.name.value});i.args.forEach(function(i){var n=t[i.name];!n&&i.type instanceof _definition.GraphQLNonNull&&e.reportError(new _error.GraphQLError(missingFieldArgMessage(r.name.value,i.name,i.type),[r]))})}},Directive:{leave:function(r){var i=e.getDirective();if(!i)return!1;var n=r.arguments||[],t=(0,_keyMap2.default)(n,function(e){return e.name.value});i.args.forEach(function(i){var n=t[i.name];!n&&i.type instanceof _definition.GraphQLNonNull&&e.reportError(new _error.GraphQLError(missingDirectiveArgMessage(r.name.value,i.name,i.type),[r]))})}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.missingFieldArgMessage=missingFieldArgMessage,exports.missingDirectiveArgMessage=missingDirectiveArgMessage,exports.ProvidedNonNullArguments=ProvidedNonNullArguments;var _error=require("../../error"),_keyMap=require("../../jsutils/keyMap"),_keyMap2=_interopRequireDefault(_keyMap),_definition=require("../../type/definition")},{"../../error":50,"../../jsutils/keyMap":62,"../../type/definition":74}],115:[function(require,module,exports){"use strict";function noSubselectionAllowedMessage(e,r){return'Field "'+e+'" must not have a selection since '+('type "'+String(r)+'" has no subfields.')}function requiredSubselectionMessage(e,r){return'Field "'+e+'" of type "'+String(r)+'" must have a '+('selection of subfields. Did you mean "'+e+' { ... }"?')}function ScalarLeafs(e){return{Field:function(r){var o=e.getType();o&&((0,_definition.isLeafType)(o)?r.selectionSet&&e.reportError(new _error.GraphQLError(noSubselectionAllowedMessage(r.name.value,o),[r.selectionSet])):r.selectionSet||e.reportError(new _error.GraphQLError(requiredSubselectionMessage(r.name.value,o),[r])))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.noSubselectionAllowedMessage=noSubselectionAllowedMessage,exports.requiredSubselectionMessage=requiredSubselectionMessage,exports.ScalarLeafs=ScalarLeafs;var _error=require("../../error"),_definition=require("../../type/definition")},{"../../error":50,"../../type/definition":74}],116:[function(require,module,exports){"use strict";function duplicateArgMessage(e){return'There can be only one argument named "'+e+'".'}function UniqueArgumentNames(e){var r=Object.create(null);return{Field:function(){r=Object.create(null)},Directive:function(){r=Object.create(null)},Argument:function(n){var t=n.name.value;return r[t]?e.reportError(new _error.GraphQLError(duplicateArgMessage(t),[r[t],n.name])):r[t]=n.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateArgMessage=duplicateArgMessage,exports.UniqueArgumentNames=UniqueArgumentNames;var _error=require("../../error")},{"../../error":50}],117:[function(require,module,exports){"use strict";function duplicateDirectiveMessage(e){return'The directive "'+e+'" can only be used once at this location.'}function UniqueDirectivesPerLocation(e){return{enter:function(r){r.directives&&!function(){var i=Object.create(null);r.directives.forEach(function(r){var t=r.name.value;i[t]?e.reportError(new _error.GraphQLError(duplicateDirectiveMessage(t),[i[t],r])):i[t]=r})}()}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateDirectiveMessage=duplicateDirectiveMessage,exports.UniqueDirectivesPerLocation=UniqueDirectivesPerLocation;var _error=require("../../error")},{"../../error":50}],118:[function(require,module,exports){"use strict";function duplicateFragmentNameMessage(e){return'There can only be one fragment named "'+e+'".'}function UniqueFragmentNames(e){var r=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var a=n.name.value;return r[a]?e.reportError(new _error.GraphQLError(duplicateFragmentNameMessage(a),[r[a],n.name])):r[a]=n.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateFragmentNameMessage=duplicateFragmentNameMessage,exports.UniqueFragmentNames=UniqueFragmentNames;var _error=require("../../error")},{"../../error":50}],119:[function(require,module,exports){"use strict";function duplicateInputFieldMessage(e){return'There can be only one input field named "'+e+'".'}function UniqueInputFieldNames(e){var r=[],n=Object.create(null);return{ObjectValue:{enter:function(){r.push(n),n=Object.create(null)},leave:function(){n=r.pop()}},ObjectField:function(r){var t=r.name.value;return n[t]?e.reportError(new _error.GraphQLError(duplicateInputFieldMessage(t),[n[t],r.name])):n[t]=r.name,!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateInputFieldMessage=duplicateInputFieldMessage,exports.UniqueInputFieldNames=UniqueInputFieldNames;var _error=require("../../error")},{"../../error":50}],120:[function(require,module,exports){"use strict";function duplicateOperationNameMessage(e){return'There can only be one operation named "'+e+'".'}function UniqueOperationNames(e){var r=Object.create(null);return{OperationDefinition:function(a){var n=a.name;return n&&(r[n.value]?e.reportError(new _error.GraphQLError(duplicateOperationNameMessage(n.value),[r[n.value],n])):r[n.value]=n),!1},FragmentDefinition:function(){return!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateOperationNameMessage=duplicateOperationNameMessage,exports.UniqueOperationNames=UniqueOperationNames;var _error=require("../../error")},{"../../error":50}],121:[function(require,module,exports){"use strict";function duplicateVariableMessage(e){return'There can be only one variable named "'+e+'".'}function UniqueVariableNames(e){var a=Object.create(null);return{OperationDefinition:function(){a=Object.create(null)},VariableDefinition:function(r){var i=r.variable.name.value;a[i]?e.reportError(new _error.GraphQLError(duplicateVariableMessage(i),[a[i],r.variable.name])):a[i]=r.variable.name}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.duplicateVariableMessage=duplicateVariableMessage,exports.UniqueVariableNames=UniqueVariableNames;var _error=require("../../error")},{"../../error":50}],122:[function(require,module,exports){"use strict";function nonInputTypeOnVarMessage(e,r){return'Variable "$'+e+'" cannot be non-input type "'+r+'".'}function VariablesAreInputTypes(e){return{VariableDefinition:function(r){var n=(0,_typeFromAST.typeFromAST)(e.getSchema(),r.type);if(n&&!(0,_definition.isInputType)(n)){var t=r.variable.name.value;e.reportError(new _error.GraphQLError(nonInputTypeOnVarMessage(t,(0,_printer.print)(r.type)),[r.type]))}}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.nonInputTypeOnVarMessage=nonInputTypeOnVarMessage,exports.VariablesAreInputTypes=VariablesAreInputTypes;var _error=require("../../error"),_printer=require("../../language/printer"),_definition=require("../../type/definition"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":50,"../../language/printer":71,"../../type/definition":74,"../../utilities/typeFromAST":96}],123:[function(require,module,exports){"use strict";function badVarPosMessage(e,r,i){return'Variable "$'+e+'" of type "'+String(r)+'" used in '+('position expecting type "'+String(i)+'".')}function VariablesInAllowedPosition(e){var r=Object.create(null);return{OperationDefinition:{enter:function(){r=Object.create(null)},leave:function(i){var t=e.getRecursiveVariableUsages(i);t.forEach(function(i){var t=i.node,o=i.type,a=t.name.value,n=r[a];if(n&&o){var s=e.getSchema(),l=(0,_typeFromAST.typeFromAST)(s,n.type);l&&!(0,_typeComparators.isTypeSubTypeOf)(s,effectiveType(l,n),o)&&e.reportError(new _error.GraphQLError(badVarPosMessage(a,l,o),[n,t]))}})}},VariableDefinition:function(e){r[e.variable.name.value]=e}}}function effectiveType(e,r){return!r.defaultValue||e instanceof _definition.GraphQLNonNull?e:new _definition.GraphQLNonNull(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.badVarPosMessage=badVarPosMessage,exports.VariablesInAllowedPosition=VariablesInAllowedPosition;var _error=require("../../error"),_definition=require("../../type/definition"),_typeComparators=require("../../utilities/typeComparators"),_typeFromAST=require("../../utilities/typeFromAST")},{"../../error":50,"../../type/definition":74,"../../utilities/typeComparators":95,"../../utilities/typeFromAST":96}],124:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.specifiedRules=void 0;var _UniqueOperationNames=require("./rules/UniqueOperationNames"),_LoneAnonymousOperation=require("./rules/LoneAnonymousOperation"),_KnownTypeNames=require("./rules/KnownTypeNames"),_FragmentsOnCompositeTypes=require("./rules/FragmentsOnCompositeTypes"),_VariablesAreInputTypes=require("./rules/VariablesAreInputTypes"),_ScalarLeafs=require("./rules/ScalarLeafs"),_FieldsOnCorrectType=require("./rules/FieldsOnCorrectType"),_UniqueFragmentNames=require("./rules/UniqueFragmentNames"),_KnownFragmentNames=require("./rules/KnownFragmentNames"),_NoUnusedFragments=require("./rules/NoUnusedFragments"),_PossibleFragmentSpreads=require("./rules/PossibleFragmentSpreads"),_NoFragmentCycles=require("./rules/NoFragmentCycles"),_UniqueVariableNames=require("./rules/UniqueVariableNames"),_NoUndefinedVariables=require("./rules/NoUndefinedVariables"),_NoUnusedVariables=require("./rules/NoUnusedVariables"),_KnownDirectives=require("./rules/KnownDirectives"),_UniqueDirectivesPerLocation=require("./rules/UniqueDirectivesPerLocation"),_KnownArgumentNames=require("./rules/KnownArgumentNames"),_UniqueArgumentNames=require("./rules/UniqueArgumentNames"),_ArgumentsOfCorrectType=require("./rules/ArgumentsOfCorrectType"),_ProvidedNonNullArguments=require("./rules/ProvidedNonNullArguments"),_DefaultValuesOfCorrectType=require("./rules/DefaultValuesOfCorrectType"),_VariablesInAllowedPosition=require("./rules/VariablesInAllowedPosition"),_OverlappingFieldsCanBeMerged=require("./rules/OverlappingFieldsCanBeMerged"),_UniqueInputFieldNames=require("./rules/UniqueInputFieldNames");exports.specifiedRules=[_UniqueOperationNames.UniqueOperationNames,_LoneAnonymousOperation.LoneAnonymousOperation,_KnownTypeNames.KnownTypeNames,_FragmentsOnCompositeTypes.FragmentsOnCompositeTypes,_VariablesAreInputTypes.VariablesAreInputTypes,_ScalarLeafs.ScalarLeafs,_FieldsOnCorrectType.FieldsOnCorrectType,_UniqueFragmentNames.UniqueFragmentNames,_KnownFragmentNames.KnownFragmentNames,_NoUnusedFragments.NoUnusedFragments,_PossibleFragmentSpreads.PossibleFragmentSpreads,_NoFragmentCycles.NoFragmentCycles,_UniqueVariableNames.UniqueVariableNames,_NoUndefinedVariables.NoUndefinedVariables,_NoUnusedVariables.NoUnusedVariables,_KnownDirectives.KnownDirectives,_UniqueDirectivesPerLocation.UniqueDirectivesPerLocation,_KnownArgumentNames.KnownArgumentNames,_UniqueArgumentNames.UniqueArgumentNames,_ArgumentsOfCorrectType.ArgumentsOfCorrectType,_ProvidedNonNullArguments.ProvidedNonNullArguments,_DefaultValuesOfCorrectType.DefaultValuesOfCorrectType,_VariablesInAllowedPosition.VariablesInAllowedPosition,_OverlappingFieldsCanBeMerged.OverlappingFieldsCanBeMerged,_UniqueInputFieldNames.UniqueInputFieldNames]},{"./rules/ArgumentsOfCorrectType":99,"./rules/DefaultValuesOfCorrectType":100,"./rules/FieldsOnCorrectType":101,"./rules/FragmentsOnCompositeTypes":102,"./rules/KnownArgumentNames":103,"./rules/KnownDirectives":104,"./rules/KnownFragmentNames":105,"./rules/KnownTypeNames":106,"./rules/LoneAnonymousOperation":107,"./rules/NoFragmentCycles":108,"./rules/NoUndefinedVariables":109,"./rules/NoUnusedFragments":110,"./rules/NoUnusedVariables":111,"./rules/OverlappingFieldsCanBeMerged":112,"./rules/PossibleFragmentSpreads":113,"./rules/ProvidedNonNullArguments":114,"./rules/ScalarLeafs":115,"./rules/UniqueArgumentNames":116,"./rules/UniqueDirectivesPerLocation":117,"./rules/UniqueFragmentNames":118,"./rules/UniqueInputFieldNames":119,"./rules/UniqueOperationNames":120,"./rules/UniqueVariableNames":121,"./rules/VariablesAreInputTypes":122,"./rules/VariablesInAllowedPosition":123}],125:[function(require,module,exports){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function validate(e,t,r){(0,_invariant2.default)(e,"Must provide schema"),(0,_invariant2.default)(t,"Must provide document"),(0,_invariant2.default)(e instanceof _schema.GraphQLSchema,"Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.");var i=new _TypeInfo.TypeInfo(e);return visitUsingRules(e,i,t,r||_specifiedRules.specifiedRules)}function visitUsingRules(e,t,r,i){var n=new ValidationContext(e,r,t),s=i.map(function(e){return e(n)});return(0,_visitor.visit)(r,(0,_visitor.visitWithTypeInfo)(t,(0,_visitor.visitInParallel)(s))),n.getErrors()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationContext=void 0,exports.validate=validate,exports.visitUsingRules=visitUsingRules;var _invariant=require("../jsutils/invariant"),_invariant2=_interopRequireDefault(_invariant),_visitor=(require("../error"),require("../language/visitor")),_kinds=require("../language/kinds"),Kind=_interopRequireWildcard(_kinds),_schema=require("../type/schema"),_TypeInfo=require("../utilities/TypeInfo"),_specifiedRules=require("./specifiedRules"),ValidationContext=exports.ValidationContext=function(){function e(t,r,i){_classCallCheck(this,e),this._schema=t,this._ast=r,this._typeInfo=i,this._errors=[],this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}return e.prototype.reportError=function(e){this._errors.push(e)},e.prototype.getErrors=function(){return this._errors},e.prototype.getSchema=function(){return this._schema},e.prototype.getDocument=function(){return this._ast},e.prototype.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===Kind.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},{})),t[e]},e.prototype.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var r=[e];0!==r.length;)for(var i=r.pop(),n=0;n=0&&r%1===0}function isCollection(t){return Object(t)===t&&(isArrayLike(t)||isIterable(t))}function getIterator(t){var r=getIteratorMethod(t);if(r)return r.call(t)}function getIteratorMethod(t){if(null!=t){var r=SYMBOL_ITERATOR&&t[SYMBOL_ITERATOR]||t["@@iterator"];if("function"==typeof r)return r}}function forEach(t,r,e){if(null!=t){if("function"==typeof t.forEach)return t.forEach(r,e);var o=0,i=getIterator(t);if(i){for(var a;!(a=i.next()).done;)if(r.call(e,a.value,o++,t),o>9999999)throw new TypeError("Near-infinite iteration.")}else if(isArrayLike(t))for(;o=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}}},{}],127:[function(require,module,exports){(function(global){(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=u.breaks:this.rules=u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;rAn error occured:

"+s(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;u1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=this.renderer.text(s(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:s(e,!0))+"\n
\n":"
"+(n?e:s(e,!0))+"\n
"},n.prototype.blockquote=function(e){return"
\n"+e+"
\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var s='
    "},n.prototype.image=function(e,t,n){var r=''+n+'":">"},n.prototype.text=function(e){return e},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy